Skip to main content
Logo image

Section 31 Customizations

View Source

Subsection 31.1 Renaming Document Parts, Plus This Is A Really Long Title So That We Can Test How Well It Reacts To The Right Margin And Wraps Around To Form A Couple Of Lines, Plus How It Sits Relative To The Number Of The Subsection

“Names” for various parts of a document are determined exactly once for each language, ensuring consistency and saving you the bother of always typing them in.
However, you may want to have “Conundrum” s in your document and you have no use for any “Proposition” s. So you can repurpose the proposition tag to render a different name. Or you might have a Lab Manual and want to rename subsection as “Activity”. See the docinfo portion of this sample article to see how this is done, in concert with the example below. Note that you may provide versions for different languages by specifying a @xml:lang attribute.

Important Notes.

If you are renaming many parts of your document, then you may not understand the design philosophy of PreTeXt. In particular, you should not be doing a wholesale shuffle of part, chapter, section, etc. This feature is intended for very limited use and is not considered best practice.
This feature could also be abused to provide a comprehensive suite of translations into a language not yet supported. If so, please contact us about moving your translations into PreTeXt for the benefit of all. Thanks.

Subsection 31.2 Customizing Phrases

There is a facility for providing alternate text for small or short phrases, or other components of a paragraph. Here we just provide some tests. Each is inside of a block quote to identify it clearly.
We have two auxiliary files of custom elements, so you need to adjust the publisher file to specify the second one during testing. First, a very simple string as the variation.
This is an article about alligators.
Now a string which is partially text and partially simple markup.
We like to write with feeling, since it is more fun.
And a mildly more complicated structure (a list) as the variable text.
Some of our favorite colors are
  • Red
  • Blue
  • Green
A cross-reference to test, since context is critical.
See also 2.1.
The URLs used as a replacement have the @visual attribute which is also managed by the assembly pre-processor to provide a footnote. So this is a good test of the organization of the multiple passes employed by the pre-processor.
A URL that should have a footnote: example.com.