Skip to main content
Logo image

Section 31 Customizations

View Source for section
<section label="section-customizations">
  <title>Customizations</title>
  <subsection xml:id="rename-facility">
    <title>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</title>
    <p>
      <q>Names</q>
          <idx>name</idx>
      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.
    </p>
    <p>
      However, you may want to have
      <q>Conundrum</q>
      s<idx><h>conundrum</h><h>repurposed from proposition</h></idx> in your document and you have no use for any
      <q>Proposition</q>
      s.
          <idx><h>conundrum</h><h>repurposed from proposition</h></idx>
          <idx><h>rename an environment</h><h>conundrum</h></idx>
      So you can repurpose the <c>proposition</c> tag to render a different name.
      Or you might have a Lab Manual and want to rename <c>subsection</c> as
      <q>Activity</q>. See the <c>docinfo</c> 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 <attr>xml:lang</attr> attribute.
    </p>
    <proposition xml:id="proposition-as-conundrum">
      <creator>Smith</creator>
      <statement>
        <p>
          Aah, this <em>is</em> confusing!
        </p>
      </statement>
    </proposition>
    <paragraphs>
      <title>Important Notes</title>
      <p>
        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 <c>part</c>,
        <c>chapter</c>,
        <c>section</c>,
        <etc /> This feature is intended for very limited use and is
        <em>not considered best practice</em>.
      </p>
      <p>
        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.
      </p>
    </paragraphs>
  </subsection>
  <subsection>
    <title>Customizing Phrases</title>
    <p>
      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.
    </p>
    <p>
      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.
    </p>
    <blockquote>
      <p>
        This is an article about <custom ref="plural-animal" />.
      </p>
    </blockquote>
    <p>
      Now a string which is partially text and partially simple markup.
    </p>
    <blockquote>
      <p>
        We like to write with <custom ref="an-emotional-style" />.
      </p>
    </blockquote>
    <p>
      And a mildly more complicated structure (a list) as the variable text.
    </p>

    <blockquote>
      <p>
        Some of our favorite colors are<custom ref="color-list" />
      </p>
    </blockquote>
    <p>
      A cross-reference to test, since context is critical.
    </p>
    <blockquote>
      <p>
        See also <custom ref="xref-to-result" />.
      </p>
    </blockquote>
    <p>
      The URLs used as a replacement have the <attr>visual</attr> 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.
    </p>
    <blockquote>
      <p>
        A <init>URL</init> that should have a footnote:
        <custom ref="a-URL" />.
      </p>
    </blockquote>
  </subsection>
</section>

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

View Source for subsection
<subsection xml:id="rename-facility">
  <title>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</title>
  <p>
    <q>Names</q>
        <idx>name</idx>
    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.
  </p>
  <p>
    However, you may want to have
    <q>Conundrum</q>
    s<idx><h>conundrum</h><h>repurposed from proposition</h></idx> in your document and you have no use for any
    <q>Proposition</q>
    s.
        <idx><h>conundrum</h><h>repurposed from proposition</h></idx>
        <idx><h>rename an environment</h><h>conundrum</h></idx>
    So you can repurpose the <c>proposition</c> tag to render a different name.
    Or you might have a Lab Manual and want to rename <c>subsection</c> as
    <q>Activity</q>. See the <c>docinfo</c> 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 <attr>xml:lang</attr> attribute.
  </p>
  <proposition xml:id="proposition-as-conundrum">
    <creator>Smith</creator>
    <statement>
      <p>
        Aah, this <em>is</em> confusing!
      </p>
    </statement>
  </proposition>
  <paragraphs>
    <title>Important Notes</title>
    <p>
      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 <c>part</c>,
      <c>chapter</c>,
      <c>section</c>,
      <etc /> This feature is intended for very limited use and is
      <em>not considered best practice</em>.
    </p>
    <p>
      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.
    </p>
  </paragraphs>
</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.

View Source for paragraphs
<paragraphs>
  <title>Important Notes</title>
  <p>
    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 <c>part</c>,
    <c>chapter</c>,
    <c>section</c>,
    <etc /> This feature is intended for very limited use and is
    <em>not considered best practice</em>.
  </p>
  <p>
    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.
  </p>
</paragraphs>
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

View Source for subsection
<subsection>
  <title>Customizing Phrases</title>
  <p>
    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.
  </p>
  <p>
    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.
  </p>
  <blockquote>
    <p>
      This is an article about <custom ref="plural-animal" />.
    </p>
  </blockquote>
  <p>
    Now a string which is partially text and partially simple markup.
  </p>
  <blockquote>
    <p>
      We like to write with <custom ref="an-emotional-style" />.
    </p>
  </blockquote>
  <p>
    And a mildly more complicated structure (a list) as the variable text.
  </p>

  <blockquote>
    <p>
      Some of our favorite colors are<custom ref="color-list" />
    </p>
  </blockquote>
  <p>
    A cross-reference to test, since context is critical.
  </p>
  <blockquote>
    <p>
      See also <custom ref="xref-to-result" />.
    </p>
  </blockquote>
  <p>
    The URLs used as a replacement have the <attr>visual</attr> 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.
  </p>
  <blockquote>
    <p>
      A <init>URL</init> that should have a footnote:
      <custom ref="a-URL" />.
    </p>
  </blockquote>
</subsection>
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.
View Source for blockquote
<blockquote>
  <p>
    This is an article about <custom ref="plural-animal" />.
  </p>
</blockquote>
This is an article about alligators.
Now a string which is partially text and partially simple markup.
View Source for blockquote
<blockquote>
  <p>
    We like to write with <custom ref="an-emotional-style" />.
  </p>
</blockquote>
We like to write with feeling, since it is more fun.
And a mildly more complicated structure (a list) as the variable text.
View Source for blockquote
<blockquote>
  <p>
    Some of our favorite colors are<custom ref="color-list" />
  </p>
</blockquote>
Some of our favorite colors are
  • Red
  • Blue
  • Green
A cross-reference to test, since context is critical.
View Source for blockquote
<blockquote>
  <p>
    See also <custom ref="xref-to-result" />.
  </p>
</blockquote>
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.
View Source for blockquote
<blockquote>
  <p>
    A <init>URL</init> that should have a footnote:
    <custom ref="a-URL" />.
  </p>
</blockquote>
A URL that should have a footnote: example.com.