Skip to main content
Logo image

Section 8 Entering Text in Paragraphs, Titles, Captions

View Source for section
<section xml:id="text-in-paragraphs" label="section-text-paragraphs">
    <title>Entering Text in Paragraphs, Titles, Captions</title>
    <shorttitle>Text in Paragraphs</shorttitle>


    <plaintitle>Entering Text in Paragraphs</plaintitle>
    <introduction>
      <p>
        <init>XML</init>, and therefore <pretext />, is a markup language.
        But by and large,
        what you type into your source will be what you see in your output.
        So there is not much to say.
        Except that <xref ref="subsection-xml-escape" text="type-global" /> eventually will be essential.
        However we do test various tricky situations here
        (which have technical explanations we avoid).
        See the Author's Guide for a superior treatment of the topics addressed here.
      </p>
    </introduction>
    <subsection xml:id="subsection-xml-escape">
      <title>Special <init>XML</init> characters</title>
      <p>
        One of the goals of <pretext /> is to relieve an author of managing the numerous conflicts when mixing languages that use different characters for special purposes.
        But, of course, <init>XML</init> has its own special characters.
      </p>
      <p>
        If you type a
        <q>less-than</q>
        symbol in your source,
        the <init>XML</init> processor thinks you are starting an opening,
        or closing, tag.
        So how do you get a less-than sign into your source so that it survives into your output,
        like this: &lt;<nbsp />?
        You use an <term>escaped version</term>.
        Type literally,
        the four characters <c>&amp;lt;</c> in your source.
        Then the <init>XML</init> processor will know you want the character and will not mistake it for a tag.
        But now we want to get an ampersand into our source like: &amp;. How?
        Another escaped version of a character,
        literally the five characters <c>&amp;amp;</c>.
      </p>
      <p>
        Otherwise, keys on your keyboard,
        even international versions,
        should be fine in your source and behave as expected.
        <init>WYTIWYG</init> = What You Type Is What You Get.
        So the principal concession to using <init>XML</init> markup is the following very simple rule.
      </p>
      <blockquote>
        <p>
          Rather than pressing the &lt; and &amp;
          keys on your keyboard,
          instead always enter the escape sequences <c>&amp;lt;</c> and <c>&amp;amp;</c> as replacements.
        </p>
      </blockquote>
      <p>
        Simple.
        And it will work in
        <q>running text,</q>
        verbatim text
        (like when authoring the content of <tag>c</tag> or <tag>pre</tag> elements),
        and mixed into <latex /> syntax to desribe mathematical expressions.
        <init>XML</init> has three other escape sequences <c>&amp;gt;</c>,
        <c>&amp;apos;</c>,
        and <c>&amp;quot;</c>,
        for the characters &gt;, ', and "
        (respectively).
        But they seem largely unnecessary for authoring in PreTeXt, as we now demonstrate by typing them directly from our keyboard into our source: &gt;, ', and ".
      </p>
      <exercise>
        <p>
          How was <c>&amp;amp;</c> authored?
          Work it out, and then check the source here for the answer.
        </p>
      </exercise>
    </subsection>
    <subsection>
      <title>Quotations</title>
      <p>
        The <tag>q</tag>
            <idx><h>quotations</h></idx>
        tag will provide beginning and ending double quotations,
        while the <tag>sq</tag> tag will behave similarly but provide single quotes.
        Given the complexity of quotations,
        the different symbols used in different languages,
        and the over-simplified versions provided on keyboards,
        it is necessary to use markup.
      </p>
      <p>
        <q>The roots of education are bitter,
        but the fruit is sweet.</q>
        (Aristotle)
      </p>
      <p>
        <sq>It is always wise to look ahead,
        but difficult to look further than you can see.</sq> (Winston Churchill)
      </p>
      <p>
        A large quote can be accomodated with the <tag>blockquote</tag> tag,
        which can carry within itself an <tag>attribution</tag> element.
      </p>
      <blockquote>
        <p>
          The problem with writing a book in verse is, to be successful,
          it has to sound like you knocked it off on a rainy Friday afternoon.
          It has to sound easy.
          When you can do it,
          it helps tremendously because it's a thing that forces kids to read on.
          You have this unconsummated feeling if you stop.
        </p>
        <attribution>Dr. Seuss</attribution>
      </blockquote>
      <p>
        We say that again,
        to test a multiline attribution of a block quotation.
        Notice how the dash appears automatically,
        and that it is a <term>quotation dash</term>
        in HTML, distinct from other sorts of dashes.
      </p>
      <blockquote>
        <p>
          The problem with writing a book in verse is, to be successful,
          it has to sound like you knocked it off on a rainy Friday afternoon.
          It has to sound easy.
          When you can do it,
          it helps tremendously because it's a thing that forces kids to read on.
          You have this unconsummated feeling if you stop.
        </p>
        <attribution>
        <line>Dr. Seuss</line>
        <line>Children's Author</line></attribution>
      </blockquote>
      <p>
        Sometimes a quote may extend across several paragraphs.
        Or a balanced pair of quotations marks crosses an XML boundary,
        so we need left, right, single and double versions.
        (For example,
        see Section<nbsp /><xref ref="poetry" /> on poetry.)
        Here are all four in a haphazard order:
        <rq />, <lsq />, <lq />, <rsq />.
        These should be a last resort,
        and <em>not</em> a replacement for the <c>q</c> and <c>sq</c> tags.
        The left/right versions are used for the following quote from Abraham Lincoln,
        which we have edited into two paragraphs.
      </p>
      <p>
        <lq />I am not bound to win, but I am bound to be true.
        I am not bound to succeed, but I am bound to live by the light that I have.
      </p>
      <p>
        I must stand with anybody that stands right,
        and stand with him while he is right,
        and part with him when he goes wrong.<rq />
      </p>
      <p>
        And as a tests, we try some crazy combinations of quotes,
        which would normally give <latex /> some trouble where the quotation marks are adjacent.
        <ul>
          <li>
            <p>
              <q>we use <sq>single quotes inside of double quotes</sq></q>
            </p>
          </li>
          <li>
            <p>
              <sq>
              <q>double quotes inside of single quotes</q>
              with more</sq>
            </p>
          </li>
          <li>
            <p>
              <q><sq>single quotes tight inside of double quotes</sq></q>
            </p>
          </li>
          <li>
            <p>
              <sq>
              <q>double quotes tight inside of single quotes</q>
              </sq>
            </p>
          </li>
          <li>
            <p>
              An
              <q><sq><sq>
              <q>absurd test</q>
              </sq></sq></q>
              of two adjacent single quotes inside a pair of double quotes
            </p>
          </li>
          <li>
            <p>
              you would never do this, but a <sq><sq>pair of single quotes</sq></sq>
            </p>
          </li>
        </ul>
      </p>
      <p>
        <abbr>N.B.</abbr> We have taken no special care to protect against interactions of the actual quote characters
        (described above)
        in <latex /> with themselves,
        or with the grouping tags.
      </p>
    </subsection>
    <subsection>
      <title>Groupings</title>
      <p>
        It is possible to make some other groupings like quotations,
        such as {some <em>emphasized text</em>
        grouped within braces}, or [a
        <pubtitle>Book Title</pubtitle>
        inside brackets], an <articletitle>Article Title</articletitle>,
        <angles>some <foreign>foreign words</foreign> inside angle brackets</angles>,
        or <dblbrackets>just a bit of text within double brackets</dblbrackets>.
        Some of these are used extensively by scholars who study texts to note various restorations or deletions.
        Note that the <tag>foreign</tag> element may have a <c>xml:lang</c> attribute.
      </p>
      <p>
        Note that the angle brackets,
        <langle /> and <rangle />, are <em>not</em>
        the keyboard characters, &lt;
        and &gt;. Your best bet is to use the provided <tag>angles</tag> element when constructing a balanced pair.
        Similarly, <tag>dblbrackets</tag> is provided to make the double-bracket characters easily available,
        since they are likely not on your keyboard.
      </p>
    </subsection>
    <subsection>
      <title>Characters, Symbols, and Constructions</title>
      <p>
        Some keyboard characters are ambiguous.
        Is the character <c>'</c> an apostrophe or a right single quote?
        We presume the former, ', and provide markup as an alternative for the latter
        (described above).
        Is <c>/</c> used to separate words, or to form a fraction?
        We presume the former, /, and provide <tage>solidus</tage>,
        <solidus />, for the latter.
        We test some other characters straight from our US keyboard
        (with two being escape sequences).
      </p>
      <p>
        ~ ` ! @ # $ % ^ &amp; * ( ) _ - + = [ ] { } | \ ; : ' " , &lt; . &gt; ? /
      </p>
      <p>
        And again as verbatim text.
      </p>
      <p>
        <c>~ ` ! @ # $ % ^ &amp; * ( ) _ - + = [ ] { } | \ ; : ' " , &lt; . &gt; ? /</c>
      </p>
      <p>
        Note that for a long time <pretext /> had empty elements for many of these characters,
        as a consequence of naïveté. So you might see <tage>dollar</tage>,
        <tage>ampersand</tage>, or others in old source.
        They will be deprecated and will raise warnings.
      </p>
      <p>
        Now, when a character is nowhere to be found on your keyboard,
        we provide conveniences as markup.
        Or a keyboard character may have a different variant which we implement as an empty element.
        Here we test many of these.
        Read the Author's Guide for tags and more detail.
      </p>
      <p>
        <copyright /><nbsp /><nbsp /> <phonomark /><nbsp /><nbsp /> <copyleft /><nbsp /><nbsp /> <registered /><nbsp /><nbsp /> <trademark /><nbsp /><nbsp /> <servicemark /><nbsp /><nbsp /> <ellipsis /><nbsp /><nbsp /> <midpoint /><nbsp /><nbsp /> <swungdash /><nbsp /><nbsp /> <permille /><nbsp /><nbsp /> <pilcrow /><nbsp /><nbsp /> <section-mark /><nbsp /><nbsp /> <minus /><nbsp /><nbsp /> <times /><nbsp /><nbsp /> <solidus /><nbsp /><nbsp /> <obelus /><nbsp /><nbsp /> <plusminus />
      </p>
      <p>
        There are a few common abbreviations of Latin phrases that can be achieved in HTML one way,
        and in <latex /> with a slightly different mechanism.
        These are due to <latex />'s treatment of a period
        (full stop),
        depending on its surroundings.
        So not reserved characters, but just divergent treatment.
        Using these will lead to the best quality in all your outputs.
        See Will Robertson's informative and arcane
        <url href="http://latex-alive.tumblr.com/post/827168808/correct-punctuation-spaces" visual="latex-alive.tumblr.com/post/827168808">blog post</url>
        on the topic if you want the full story for the treatment of a full stop in <latex />.
      </p>
      <tabular>
        <row>
          <cell>Tag</cell>
          <cell>Realization</cell>
          <cell>Meaning</cell>
        </row>

        <row>
          <cell><c>ad</c></cell>
          <cell><ad /></cell>
          <cell><foreign>anno Domini</foreign>, in the year of the Lord</cell>
        </row>
        <row>
          <cell><c>am</c></cell>
          <cell><am /></cell>
          <cell><foreign>ante meridiem</foreign>, before midday</cell>
        </row>
        <row>
          <cell><c>bc</c></cell>
          <cell><bc /></cell>
          <cell>English, before Christ</cell>
        </row>
        <row>
          <cell><c>ca</c></cell>
          <cell><ca /></cell>
          <cell><foreign>circa</foreign>, about</cell>
        </row>
        <row>
          <cell><c>eg</c></cell>
          <cell><eg /></cell>
          <cell><foreign>exempli gratia</foreign>, for example</cell>
        </row>
        <row>
          <cell><c>etal</c></cell>
          <cell><etal /></cell>
          <cell><foreign>et alia</foreign>, and others</cell>
        </row>
        <row>
          <cell><c>etc</c></cell>
          <cell><etc /></cell>
          <cell><foreign>et caetera</foreign>, and the rest</cell>
        </row>
        <row>
          <cell><c>ie</c></cell>
          <cell><ie /></cell>
          <cell><foreign>id est</foreign>, in other words</cell>
        </row>
        <row>
          <cell><c>nb</c></cell>
          <cell><nb /></cell>
          <cell><foreign>nota bene</foreign>, note well</cell>
        </row>
        <row>
          <cell><c>pm</c></cell>
          <cell><pm /></cell>
          <cell><foreign>post meridiem</foreign>, after midday</cell>
        </row>
        <row>
          <cell><c>ps</c></cell>
          <cell><ps /></cell>
          <cell><foreign>post scriptum</foreign>, after what has been written</cell>
        </row>
        <row>
          <cell><c>vs</c></cell>
          <cell><vs /></cell>
          <cell><foreign>versus</foreign>, against</cell>
        </row>
        <row>
          <cell><c>viz</c></cell>
          <cell><viz /></cell>
          <cell><foreign>videlicet</foreign>, namely</cell>
        </row>
      </tabular>
      <p>
        We also distinguish between abbreviations (<abbr>vs.</abbr>),
        acronyms (<acro>SCUBA</acro>) and initialisms
        (<init>XML</init>).
        This is a test of the text version of a multiplication symbol: 2<nbsp /><times /><nbsp />4.
      </p>

      <p>
        Simple coordinates with degrees, minutes,
        seconds, or temperature, or distance in feet and inches.
        <q>We parked the car at 36<degree />16<prime />0.83<dblprime />N, 122<degree />35<prime />47.27<dblprime />W, and since it was 93<degree />F, we walked 505<prime />3.6<dblprime /> so we could swim in the bay.</q>
      </p>
      <p>
        An <term>em dash</term> is the long dash used much like parentheses
        (not an <term>en dash</term> used to denote a range,
        such as a range of page numbers).
        It should not have spaces around it,
        but some style guides allow for a <em>thin</em> space,
        which<mdash />we test right now.
        A publication file entry can be set to <c>none</c> or <c>thin</c> to control this.
      </p>
    </subsection>
    <subsection>
      <title>Currency</title>
      <p>
        For best results,
        be certain the right Unicode characters are in your source.
        If you only need a certain symbol rarely,
        you can enter it in your source via its Unicode number.
        For example, to obtain a peso,
        type <c>&amp;#x20B1;</c>.
        This table has been tested with our default fonts,
        and should be fine for <init>HTML</init> output.
        Please report any difficulties with different <latex /> fonts,
        as there are extra measures we can take to make these more robust.
        (We've already done this for the Paraguayan guaraní.)
      </p>
      <table>
        <title>Supported Currency</title>
        <tabular>
          <row bottom="medium">
            <cell>Sign</cell>
            <cell>Unicode</cell>
            <cell>Name</cell>
          </row>
          <row>
            <cell>$</cell>
            <cell><c>U+0024</c></cell>
            <cell>dollar</cell>
          </row>
          <row>
            <cell>¢</cell>
            <cell><c>U+00A2</c></cell>
            <cell>cent</cell>
          </row>
          <row>
            <cell>£</cell>
            <cell><c>U+00A3</c></cell>
            <cell>sterling</cell>
          </row>
          <row>
            <cell>¤</cell>
            <cell><c>U+00A4</c></cell>
            <cell>currency</cell>
          </row>
          <row>
            <cell>¥</cell>
            <cell><c>U+00A5</c></cell>
            <cell>yen</cell>
          </row>
          <row>
            <cell>ƒ</cell>
            <cell><c>U+0192</c></cell>
            <cell>florin</cell>
          </row>
          <row>
            <cell>฿</cell>
            <cell><c>U+0E3F</c></cell>
            <cell>baht</cell>
          </row>
          <row>
            <cell>₡</cell>
            <cell><c>U+20A1</c></cell>
            <cell>colon</cell>
          </row>
          <row>
            <cell>₤</cell>
            <cell><c>U+20A4</c></cell>
            <cell>lira</cell>
          </row>
          <row>
            <cell>₦</cell>
            <cell><c>U+20A6</c></cell>
            <cell>naira</cell>
          </row>
          <row>
            <cell>₩</cell>
            <cell><c>U+20A9</c></cell>
            <cell>won</cell>
          </row>
          <row>
            <cell>₫</cell>
            <cell><c>U+20AB</c></cell>
            <cell>dong</cell>
          </row>
          <row>
            <cell>€</cell>
            <cell><c>U+20AC</c></cell>
            <cell>euro</cell>
          </row>
          <row>
            <cell>₱</cell>
            <cell><c>U+20B1</c></cell>
            <cell>peso</cell>
          </row>
          <row>
            <cell>₲</cell>
            <cell><c>U+20B2</c></cell>
            <cell>guarani</cell>
          </row>
        </tabular>
      </table>
    </subsection>
    <subsection xml:id="subsection-icons-in-text">
      <title>Icons in Text</title>
      <p>
        A limited supply of icons can be used when explaining how to use some computer application.
        The empty element is <tage>icon</tage> and the attribute is <attr>name</attr>.
      </p>
      <p>
        We sprinkle <icon name="gear" /> a few into a few sentences <icon name="wrench" /> to check baselines <icon name="file-save" /> and font sizing.
        We sprinkle <icon name="gear" /> a few into a few sentences <icon name="wrench" /> to check baselines <icon name="file-save" /> and font sizing.
        We sprinkle <icon name="gear" /> a few into a few sentences <icon name="wrench" /> to check baselines <icon name="file-save" /> and font sizing.
        We sprinkle <icon name="gear" /> a few into a few sentences <icon name="wrench" /> to check baselines <icon name="file-save" /> and font sizing.
      </p>
      <table>
        <title>User-Interface Icons</title>
        <tabular>
          <col />
          <col halign="center" right="medium" />
          <col />
          <col halign="center" right="medium" />
          <col />
          <col halign="center" />
          <row bottom="medium">
            <cell>Name</cell>
            <cell>Icon</cell>
            <cell>Name</cell>
            <cell>Icon</cell>
            <cell>Name</cell>
            <cell>Icon</cell>
          </row>
          <row>
            <cell><c>arrow-down</c></cell>
            <cell><icon name="arrow-down" /></cell>
            <cell><c>arrow-left</c></cell>
            <cell><icon name="arrow-left" /></cell>
            <cell><c>arrow-right</c></cell>
            <cell><icon name="arrow-right" /></cell>
          </row>
          <row>
            <cell><c>arrow-up</c></cell>
            <cell><icon name="arrow-up" /></cell>
            <cell><c>file-save</c></cell>
            <cell><icon name="file-save" /></cell>
            <cell><c>gear</c></cell>
            <cell><icon name="gear" /></cell>
          </row>
          <row>
            <cell><c>menu</c></cell>
            <cell><icon name="menu" /></cell>
            <cell><c>wrench</c></cell>
            <cell><icon name="wrench" /></cell>
            <cell />
            <cell />

          </row>

        </tabular>
      </table>
      <table>
        <title>Creative Commons License Icons</title>
        <tabular>
          <col />
          <col halign="center" right="medium" />
          <col />
          <col halign="center" right="medium" />
          <col />
          <col halign="center" />
          <row bottom="medium">
            <cell>Name</cell>
            <cell>Icon</cell>
            <cell>Name</cell>
            <cell>Icon</cell>
            <cell>Name</cell>
            <cell>Icon</cell>
          </row>
          <row>
            <cell><c>cc</c></cell>
            <cell><icon name="cc" /></cell>
            <cell><c>cc-by</c></cell>
            <cell><icon name="cc-by" /></cell>
            <cell><c>cc-sa</c></cell>
            <cell><icon name="cc-sa" /></cell>
          </row>
          <row>
            <cell><c>cc-nc</c></cell>
            <cell><icon name="cc-nc" /></cell>
            <cell><c>cc-pd</c></cell>
            <cell><icon name="cc-pd" /></cell>
            <cell><c>cc-zero</c></cell>
            <cell><icon name="cc-zero" /></cell>

          </row>

        </tabular>
      </table>
      <p>
        Nominations of new icons must
        <ul>
          <li>Have a Unicode character representation.</li>
          <li>
            Be in the <init>HTML/CSS/JS</init> Font Awesome 5 catalog.
          </li>
          <li>Be in the <latex /> <c>fontawesome5</c> package.</li>
          <li>Have a reasonably semantic <pretext /> name.</li>
        </ul>
        Please supply all this information,
        including the official Unicode name, with your request.
        Better yet, form a pull request.
      </p>
      <warning>
        <title>Icons, <c>xelatex</c>, and Fonts</title>
        <p>
          When processing a <latex /> file with <c>xelatex</c> the Font Awesome 5 icons are expected to be in a <em>system</em>
          font whose name is <c>Font Awesome 5 Free</c>.
          This is not a filename,
          and installing the <latex /> <c>fontawesome5</c> package into your <latex /> installation does not always guarantee that this font will automatically be available as a <em>system</em> font.
        </p>
        <p>
          The Publisher's Guide contains some discussion about installing fonts into a system,
          as part of the documentation of creating a <latex /> style,
          and has particular warnings about only using the <latex /> <c>fontawesome5</c> package as a vehicle for installing and accessing these fonts.
        </p>
      </warning>
    </subsection>
    <subsection xml:id="subsection-keyboard">
      <title>Keyboard Keys</title>
      <idx>keyboard keys</idx>
      <p>
        Your text can include specialized text meant to look like a key on the keyboard of a calculator or other device.
        So you can go <kbd>b</kbd> <kbd>Enter</kbd> <kbd>&lt;</kbd> or <kbd>F1</kbd>.
        Or maybe a sequence as: <kbd>Tab</kbd> &gt;
        <kbd>Ctrl</kbd> &gt; <kbd>T</kbd>.
        Use the <tag>kbd</tag> element,
        with the label of the key as content.
      </p>
      <p>
        There is a growing supply of keys which are labeled with graphics rather than text,
        such as a left arrow <kbd name="left" />,
        right arrow <kbd name="right" />, up arrow <kbd name="up" />,
        down arrow <kbd name="down" />, and Enter <kbd name="enter" />.
        See
        <pubtitle>The <pretext /> Guide</pubtitle>
        for the definitive list.
        In <xref ref="named-keyboard-keys" /> the literal column means the symbol/character is the content of a <tag>kbd</tag> element,
        while the named column means the symbol/character has been chosen via the value of the <attr>name</attr> attribute of an empty <tage>kbd</tage> element.
      </p>
      <table xml:id="named-keyboard-keys">
        <title>Named keys</title>
        <tabular halign="center">
          <row>
            <cell />
            <cell>Literal</cell>
            <cell>Named</cell>
          </row>
          <row>
            <cell>Ampersand</cell>
            <cell><kbd>&amp;</kbd></cell>
            <cell><kbd name="ampersand" /></cell>
          </row>
          <row>
            <cell>Less than</cell>
            <cell><kbd>&lt;</kbd></cell>
            <cell><kbd name="less" /></cell>
          </row>
          <row>
            <cell>Greater than</cell>
            <cell><kbd>&gt;</kbd></cell>
            <cell><kbd name="greater" /></cell>
          </row>
          <row>
            <cell>Dollar</cell>
            <cell><kbd>$</kbd></cell>
            <cell><kbd name="dollar" /></cell>
          </row>
          <row>
            <cell>Per cent</cell>
            <cell><kbd>%</kbd></cell>
            <cell><kbd name="percent" /></cell>
          </row>
          <row>
            <cell>Open brace</cell>
            <cell><kbd>{</kbd></cell>
            <cell><kbd name="openbrace" /></cell>
          </row>
          <row>
            <cell>Close brace</cell>
            <cell><kbd>}</kbd></cell>
            <cell><kbd name="closebrace" /></cell>
          </row>
          <row>
            <cell>Hash</cell>
            <cell><kbd>#</kbd></cell>
            <cell><kbd name="hash" /></cell>
          </row>
          <row>
            <cell>Backslash</cell>
            <cell><kbd>\</kbd></cell>
            <cell><kbd name="backslash" /></cell>
          </row>
          <row>
            <cell>Tilde</cell>
            <cell><kbd>~</kbd></cell>
            <cell><kbd name="tilde" /></cell>
          </row>
          <row>
            <cell>Circumflex</cell>
            <cell><kbd>^</kbd></cell>
            <cell><kbd name="circumflex" /></cell>
          </row>
          <row>
            <cell>Underscore</cell>
            <cell><kbd>_</kbd></cell>
            <cell><kbd name="underscore" /></cell>
          </row>
        </tabular>
      </table>
      <table>
        <title>Upper Case</title>
        <tabular halign="center">
          <row>
            <cell><kbd>~</kbd></cell>
            <cell><kbd>!</kbd></cell>
            <cell><kbd>@</kbd></cell>
            <cell><kbd>#</kbd></cell>
            <cell><kbd>$</kbd></cell>
            <cell><kbd>%</kbd></cell>
            <cell><kbd>^</kbd></cell>
            <cell><kbd>&amp;</kbd></cell>
            <cell><kbd>*</kbd></cell>
            <cell><kbd>(</kbd></cell>
            <cell><kbd>)</kbd></cell>
            <cell><kbd>_</kbd></cell>
            <cell><kbd>+</kbd></cell>
            <cell />
          </row>
          <row>
            <cell><kbd>Tab</kbd></cell>
            <cell><kbd>Q</kbd></cell>
            <cell><kbd>W</kbd></cell>
            <cell><kbd>E</kbd></cell>
            <cell><kbd>R</kbd></cell>
            <cell><kbd>T</kbd></cell>
            <cell><kbd>Y</kbd></cell>
            <cell><kbd>U</kbd></cell>
            <cell><kbd>I</kbd></cell>
            <cell><kbd>O</kbd></cell>
            <cell><kbd>P</kbd></cell>
            <cell><kbd>{</kbd></cell>
            <cell><kbd>}</kbd></cell>
            <cell><kbd>|</kbd></cell>
          </row>
          <row>
            <cell><kbd>CapsLock</kbd></cell>
            <cell><kbd>A</kbd></cell>
            <cell><kbd>S</kbd></cell>
            <cell><kbd>D</kbd></cell>
            <cell><kbd>F</kbd></cell>
            <cell><kbd>G</kbd></cell>
            <cell><kbd>H</kbd></cell>
            <cell><kbd>J</kbd></cell>
            <cell><kbd>K</kbd></cell>
            <cell><kbd>L</kbd></cell>
            <cell><kbd>:</kbd></cell>
            <cell><kbd>'</kbd></cell>
            <cell><kbd>Enter</kbd></cell>
            <cell />
          </row>
          <row>
            <cell><kbd>Shift</kbd></cell>
            <cell><kbd>Z</kbd></cell>
            <cell><kbd>X</kbd></cell>
            <cell><kbd>C</kbd></cell>
            <cell><kbd>V</kbd></cell>
            <cell><kbd>B</kbd></cell>
            <cell><kbd>N</kbd></cell>
            <cell><kbd>M</kbd></cell>
            <cell><kbd>&lt;</kbd></cell>
            <cell><kbd>&gt;</kbd></cell>
            <cell><kbd>?</kbd></cell>
            <cell><kbd>Shift</kbd></cell>
            <cell />
          </row>
        </tabular>
      </table>
      <table>
        <title>Lower Case</title>
        <tabular halign="center">
          <row>
            <cell><kbd>`</kbd></cell>
            <cell><kbd>1</kbd></cell>
            <cell><kbd>2</kbd></cell>
            <cell><kbd>3</kbd></cell>
            <cell><kbd>4</kbd></cell>
            <cell><kbd>5</kbd></cell>
            <cell><kbd>6</kbd></cell>
            <cell><kbd>7</kbd></cell>
            <cell><kbd>8</kbd></cell>
            <cell><kbd>9</kbd></cell>
            <cell><kbd>0</kbd></cell>
            <cell><kbd>-</kbd></cell>
            <cell><kbd>=</kbd></cell>
            <cell />
          </row>
          <row>
            <cell><kbd>Tab</kbd></cell>
            <cell><kbd>q</kbd></cell>
            <cell><kbd>w</kbd></cell>
            <cell><kbd>e</kbd></cell>
            <cell><kbd>r</kbd></cell>
            <cell><kbd>t</kbd></cell>
            <cell><kbd>y</kbd></cell>
            <cell><kbd>u</kbd></cell>
            <cell><kbd>i</kbd></cell>
            <cell><kbd>o</kbd></cell>
            <cell><kbd>p</kbd></cell>
            <cell><kbd>[</kbd></cell>
            <cell><kbd>]</kbd></cell>
            <cell><kbd>\</kbd></cell>
          </row>
          <row>
            <cell><kbd>CapsLock</kbd></cell>
            <cell><kbd>a</kbd></cell>
            <cell><kbd>s</kbd></cell>
            <cell><kbd>d</kbd></cell>
            <cell><kbd>f</kbd></cell>
            <cell><kbd>g</kbd></cell>
            <cell><kbd>h</kbd></cell>
            <cell><kbd>j</kbd></cell>
            <cell><kbd>k</kbd></cell>
            <cell><kbd>l</kbd></cell>
            <cell><kbd>;</kbd></cell>
            <cell><kbd>'</kbd></cell>
            <cell><kbd>Enter</kbd></cell>
            <cell />
          </row>
          <row>
            <cell><kbd>Shift</kbd></cell>
            <cell><kbd>z</kbd></cell>
            <cell><kbd>x</kbd></cell>
            <cell><kbd>c</kbd></cell>
            <cell><kbd>v</kbd></cell>
            <cell><kbd>b</kbd></cell>
            <cell><kbd>n</kbd></cell>
            <cell><kbd>m</kbd></cell>
            <cell><kbd>,</kbd></cell>
            <cell><kbd>.</kbd></cell>
            <cell><kbd>/</kbd></cell>
            <cell><kbd>Shift</kbd></cell>
            <cell />
          </row>
        </tabular>
      </table>
    </subsection>
    <subsection xml:id="section-urls">
      <title>URLs, such as <url href="http://example.com" /></title>
      <idx><h>link</h><h>external, url</h></idx>
      <idx><h>reference</h><h>external, url</h></idx>
      <p>
        The <tag>url</tag> element can be used to create an external reference.
        The mandatory <attr>href</attr> attribute is the actual <init>URL</init> complete with the protocol (e.g.
        <c>https://</c>).
        Content for the element is optional,
        and if provided will be the
        <q>clickable</q>
        text.
        In this case, a <attr>visual</attr> attribute can be provided,
        and this will become a footnote with a more friendly version of the <init>URL</init>.
        When no content is provided, the
        <q>clickable</q>
        will be the <init>URL</init> with a preference for an optional <attr>visual</attr>.
        This subsection has some (extreme) tests and we leave complete documentation and full details for the <pretext /> Guide.
      </p>
      <p>
        A long <init>URL</init> for testing:
        <url href="http://www.pcc.edu/enroll/registration/dropping.html#withdraw" visual="www.pcc.edu/enroll/registration/dropping.html#withdraw" />.
        Notice in the source that you <em>do not</em>
        put any tags inside the <attr>href</attr> or <attr>visual</attr> attributes,
        but you may need to provide XML escape sequences
        (see <xref ref="subsection-xml-escape" text="type-global" />).
      </p>
      <p>
        A <tag>url</tag> element with content will get a footnote,
        by containing the (simplified) URL in the highly-recommended <attr>visual</attr> attribute.
        If you do not provide the <attr>visual</attr> attribute in this case,
        then you will get the <attr>href</attr> value repeated,
        possibly with some editing.
        If you insist,
        you can make the <attr>visual</attr> attribute identical to the <attr>href</attr> attribute.
        Some tests:
        <ul>
          <li>
            <url href="http://example.com/" visual="example.com">With a useful <attr>visual</attr> attribute</url>
          </li>
          <li>
            <url href="http://example.com/" visual="http://example.com/">With a duplicate <attr>visual</attr> attribute</url>
          </li>
          <li>
            <url href="http://example.com/">With no <attr>visual</attr> attribute</url>,
            so an edited one is formulated (no protocol)
          </li>
        </ul>
      </p>
      <p>
        Here is a totally bogus <init>URL</init>,
        which contains every possible legal character,
        so if this fails to convert there is some problematic character.
        In order to test the use of a percent sign (<c>%</c>) in a URL, we follow it by two hex digits,
        specifically,
        <c>58</c>,
        which is a way to represent the character <c>X</c> in a <init>URL</init>.
        Normal text,
        monospace text, <tag>url</tag> with just <attr>href</attr>,
        <tag>url</tag> with <attr>href</attr> and <attr>visual</attr>,
        <tag>url</tag> with <attr>href</attr>,
        <attr>visual</attr> and content.
        Notice how the various versions do,
        or do not, line-break in <latex />/PDF output, including the
        (potentially confusing)
        use of a use of a hyphen in the normal text version
      </p>
      <blockquote>
        <p>
          ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%-._~:/?#[]@!$&amp;'()*+,;=
        </p>
        <p>
          <c>ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%-._~:/?#[]@!$&amp;'()*+,;=</c>
        </p>
        <p>
          <url href="http://example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&amp;'()*+,;=" />
        </p>
        <p>
          <url href="http://example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&amp;'()*+,;=" visual="example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&amp;'()*+,;=" />
        </p>
        <p>
          <url href="http://example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&amp;'()*+,;=" visual="example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&amp;'()*+,;=">Characters to a footnote</url>
        </p>
      </blockquote>
      <p>
        Line-breaking in <latex />/PDF output is specialized,
        using path separators (slashes) as candidates for splitting across lines:
        <url href="http://example.com/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer" />
      </p>
      <p>
        We are not fans of footnotes,
        they are totally unstructured.<fn>
        <url href="https://en.wikipedia.org/wiki/Carleson%27s_theorem" visual="">Carleson's Theorem</url>
        </fn> A URL in a footnote migrates around,
        and so care must be taken.<fn>
        <url href="http://example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&amp;'()*+,;=" />
        </fn> This paragraph has two footnotes,
        one with a real URL from Jesse Oldroyd,
        another with a fake URL from the above suite.
        For good measure,
        we repeat the URL found in the first footnote (which lacks its own footnote by design<fn>
        And if you do provide a link like
        <url href="https://en.wikipedia.org/wiki/Carleson%27s_theorem" visual="en.wikipedia.org/wiki/Carleson%27s_theorem">Carleson's Theorem</url>
        in a footnote, provide an easy-to-read reference,
        such as <c>en.wikipedia.org/wiki/Carleson%27s_theorem</c> since the extra footnote and any visual will be squelched.
        </fn>):
        <url href="https://en.wikipedia.org/wiki/Carleson%27s_theorem" visual="">Carleson's Theorem</url>.
        And we include a no-content version of the same link,
        with a visual version provided and employed:
        <url href="https://en.wikipedia.org/wiki/Carleson%27s_theorem" visual="en.wikipedia.org/wiki/Carleson%27s_theorem" />.
      </p>
    </subsection>
    <subsection>
      <title>Biological Names</title>
      <idx>biological names</idx>
      <idx><h>biological names</h><h>taxon</h></idx>
      <idx><h>scientific names</h><see>biological names</see></idx>
      <p>
        The <c>taxon</c>
            <idx>taxon</idx>
            <idx><h>biological names</h><h>taxon</h></idx>
        element can be used all by itself to get an italicized scientific name,
        as in <taxon>Escherichia coli</taxon>.
        It can also be structured with the elements <c>genus</c>
            <idx>genus</idx>
            <idx><h>biological names</h><h>genus</h></idx>
        and <c>species</c>,
            <idx>species</idx>
            <idx><h>biological names</h><h>species</h></idx>
        as in using both together in <taxon><genus>Cyclops</genus><species>kolensis</species></taxon>.
        Or the subelements can be used individually.
        Rules for capitalization are presently your responsibility as an author.
        Possible improvements include new subelements,
        attributes for database identifiers,
        and checks on capitalization.
        Also, we might automatically abbreviate the genus after first use.
      </p>
      <p>
        There is an attribute, <c>@ncbi</c>
            <idx>ncbi attribute</idx>
            <idx><h>attributes</h><h>ncbi attribute</h></idx>
            <idx><h>biological names</h><h>ncbi attribute</h></idx>
        that you can use on the <c>taxon</c> element to precisely identify the organism you are discussing using an identification number from the
        <url href="https://www.ncbi.nlm.nih.gov/" visual="www.ncbi.nlm.nih.gov">National Center for Biotechnology Information</url>.
        Their
        <url href="https://www.ncbi.nlm.nih.gov/taxonomy" visual="www.ncbi.nlm.nih.gov/taxonomy">taxonomy</url>
        is at <c>www.ncbi.nlm.nih.gov/taxonomy</c>.
        Right now, we do not do anything with this attribute,
        but things like links are certainly possible.
        See the source of this document to see it in use with <taxon ncbi="7229"><genus>Drosophila</genus><species>miranda</species></taxon> which could be used to construct a link to
        <url href="https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=7229" visual="www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=7229">further information via id number</url>
        or even
        <url href="https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?name=Drosophila+miranda" visual="www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?name=Drosophila+miranda">further information via just the name</url>.
      </p>
    </subsection>
    <subsection>
      <title>Verbatim in titles, <c>\a&amp;b#c%d~e{f}g$h_i^j</c>, OK</title>
      <p>
        You can test the migration of the <latex /> special characters in this section title by requesting a 2-deep Table of Contents via the publication file.
      </p>
    </subsection>
    <subsection xml:id="subsection-special-situations">
      <title>Special Situations</title>
      <p>
        Sage defines a nice syntax for generators of algebraic structures,
        but we must remember to use an escape sequence for the &lt; symbol
        (see <xref ref="subsection-xml-escape" text="type-global" />).
      </p>
<sage>
<input>
P.&lt;t&gt; = ZZ[]
P
</input>
<output>Univariate Polynomial Ring in t over Integer Ring</output>
</sage>
      <p>
        There is an alternate Sage syntax,
        which avoids the less-than and greater symbols.
      </p>
<sage>
<input>
R = ZZ['u']
u = R.gen(0)
(u, R)
</input>
<output>(u, Univariate Polynomial Ring in u over Integer Ring)</output>
</sage>
      <p>
        Ampersands, less-than,
        and greater symbols are likely to be necessary in source code,
        such as Sage code
        (think generators of field extensions)
        or TikZ code
        (think arrowheads),
        and in matrices
        (think separating entries).
        If you have a big matrix, or a huge chunk of TikZ code,
        you can protect it all at once from the XML processor by wrapping it in <c>&lt;![CDATA[</c><nbsp /><nbsp /><nbsp /><c>]]&gt;</c>.
        It should be possible to write without ever using the
        <q>CDATA</q>
        mechanism, but it might get tedious in places to use the supplied macros or <init>XML</init> escape sequences.
        This construction is often mis-understood as a solution better remedied by reading <xref ref="subsection-xml-escape" text="type-global" /> again.
      </p>
      <p>
        We test the three pre-defined <latex /> macros for &amp;, &lt;, and &gt;
        with a pair of aligned equations:
        <md>
          <mrow>a^2 + b^2\amp\lt c^2</mrow>
          <mrow>c^2\amp\gt a^2 + b^2</mrow>
        </md>
      </p>
    </subsection>
    <subsection xml:id="subsection-jupyter-dollars">
      <title>Jupyter Notebook, Markdown, MathJax, Delimiters</title>
      <p>
        A Jupyter notebook allows a mix of <init>HTML</init>
        (our logistical preference for a conversion)
        and Markown
        (another set of special characters and their escaped versions).
        Certain pairs of delimiters,
        when appearing in consecutive <init>HTML</init> <tag>code</tag> elements require extraordinary care.
        But the one nut we cannot crack is pairs of dollar signs.
        So the next paragraph is known to render badly in a Jupyter notebook,
        but should otherwise be a bit boring.
      </p>
      <p>
        <c>$</c> and <c>$</c>
      </p>
    </subsection>
    <subsection>
      <title><latex /> Characters, Ligatures, and More</title>
      <p>
        This section is just for testing,
        and the more you know about <latex />,
        the more we would encourage you to
        <em>not</em> to read this.
        Look to the Author's Guide for the <em>right</em>
        way to author your source.
      </p>
      <p>
        The ten reserved characters,
        directly in the source: # $ % ^ &amp; _ { } ~ \. And again: X#X$X%X^X&amp;X_X{X}X~X\X, but smashed up tight to intermediate characters.
      </p>
      <p>
        In a verbatim presentation: <c># $ % ^ &amp; _ { } ~ \</c>.
      </p>
      <p>
        And <c>X#X$X%X^X&amp;X_X{X}X~X\X</c>. (These verbatim versions are authored in different paragraphs to work around the Jupyter notebook bug described above.)
      </p>
      <p>
        We also disrupt certain constructions from <latex />.
        Attempting to sneak-in any traditional macro for the purposes of <latex />-only output, such as,
        say a \newpage,
        will fail since the leading backslash will be caught and converted to <c>\textbackslash</c>. (See?
        It just happened twice.) For technical reasons we want to particularly test \textbackslash, \textbraceleft,
        and \textbraceright.
      </p>
      <p>
        Four
        <q><tex /> ligatures</q>, <c>--</c>,
        <c>---</c>,
        <c>``</c>,
        and <c>''</c>,
        authored in running text, --, ---, ``, ''. It may be hard to tell that the two consecutive apostrophes have not coalesced into a curly left smart quote,
        but see below,
        the spacing is subtly different.
      </p>
      <p>
        We want the double quote mark from your keyboard,
        <c>"</c>,
        to not morph into some other character: "<nbsp />.
      </p>
      <p>
        More testing: runs of hyphens.
        Such as: - (one), -- (two), --- (three), ---- (four), ----- (five), ------ (six), -------
        (seven).
        Use the empty elements <tage>ndash</tage> and <tage>mdash</tage> for the longer dashes/hyphens.
      </p>
      <p>
        Runs of apostrophes should not become smart right double quotes: ' (one), '' (two), ''' (three), '''' (four), ''''' (five), '''''' (six), '''''''
        (seven).
        You might want to cut-and-paste these into a text file to convince yourself there are the right number of characters.
        Here are two smart right double quotes,
        separated by a non-breaking space,
        for visual comparison: <rq /><nbsp /><rq />.
        Or 30 apostrophes on a line of their own (longer) followed by 15 smart right double quotes
        (shorter).
      </p>
      <p>
        ''''''''''''''''''''''''''''''.
      </p>
      <p>
        <rq /><rq /><rq /><rq /><rq /><rq /><rq /><rq /><rq /><rq /><rq /><rq /><rq /><rq /><rq />.
      </p>
      <p>
        Runs of backticks
        (accent grave)
        should not become smart left double quotes when the output is processed by <latex />: ` (one), `` (two), ``` (three), ```` (four), ````` (five), `````` (six), ```````
        (seven).
        Furthermore,
        in a context where Markdown syntax is recognized as well (<eg /> a Jupyter notebook),
        paired backticks should <em>not</em>
        produce `inline verbatim text`.
      </p>
      <p>
        The next paragraph has a long run of words separated/joined by the keyboard forward-slash character.
        With this input, <latex /> will not line-break at the slash,
        nor will it hypenate anywhere.
        <pretext /> automatically provides an improved slash,
        which will line-break, as you should see below in <latex /> output.
        There is a bad right margin, but that is due to the absurdity of this test.
        This sort of problem should be no better or worse for the use of this character.
        Further refinements (zero-width space) and packages can be used to get hyphenation.
        <init>HTML</init> will line-break rationally with no extra help.
        Remember the <tage>solidus</tage> character for super-simple text fractions like 7<solidus />32
        (which will <em>not</em> line-break),
        and math elements or SI unit markup for technical work.
      </p>
      <p>
        A/test/of/some/short/words/that/go/off/the/end/of/a/line/A/test/of/some/short/words/that/go/off/the/end/of/a/line/A/test/of/some/short/words/that/go/off/the/end/of/a/line/A/test/of/some/short/words/that/go/off/the/end/of/a/line/A/test/of/some/short/words/that/go/off/the/end/of/a/line.
      </p>
    </subsection>
    <subsection>
      <title><init>HTML</init> and accidental mathematics</title>
      <p>
        We render mathematics in web pages with the fantastic MathJax Javascript library.
        Simplifying just a bit, it recognizes <latex /> syntax within a page,
        takes control of that text, and replaces it wth nice fonts and formatting.
        Now, if you write about <latex /> you might well have some mathematics in your examples.
        Best practice would be to use verbatim text for that,
        and we mark off such text as being off-limits to MathJax.
      </p>
      <p>
        But if you are writing running text,
        then you can (accidentally) author some text which MathJax recognizes and converts to something
        (unintended).
        And if you are doing this intentionally,
        then you have ignored <pretext /> markup for mathematics,
        and are missing out on some features.
      </p>
      <p>
        A few tests that we can prevent any accidents.
      </p>
      <p>
        Inline mathematics: \(x^2\).
      </p>
      <p>
        Display mathematics: \begin{align}x^2+y^2=z^2\end{align}
      </p>
      <p>
        Double backticks is a common <latex /> construction,
        which in <latex />/PDF output <em>should not</em>
        become an opening quote-mark.
        Also, a single backtick in HTML is a signal for MathJax to interpret ASCIIMath,
        and then a double backtick causes
        <q>random</q>
        pieces of mathematics on a page to not render at all.
        So we have a quotation authored <latex />-style: ``We have nothing to fear,
        but fear itself.''
      </p>
    </subsection>
  </section>
XML, and therefore PreTeXt, is a markup language. But by and large, what you type into your source will be what you see in your output. So there is not much to say. Except that Subsection 8.1 eventually will be essential. However we do test various tricky situations here (which have technical explanations we avoid). See the Author’s Guide for a superior treatment of the topics addressed here.

Subsection 8.1 Special XML characters

View Source for subsection
<subsection xml:id="subsection-xml-escape">
  <title>Special <init>XML</init> characters</title>
  <p>
    One of the goals of <pretext /> is to relieve an author of managing the numerous conflicts when mixing languages that use different characters for special purposes.
    But, of course, <init>XML</init> has its own special characters.
  </p>
  <p>
    If you type a
    <q>less-than</q>
    symbol in your source,
    the <init>XML</init> processor thinks you are starting an opening,
    or closing, tag.
    So how do you get a less-than sign into your source so that it survives into your output,
    like this: &lt;<nbsp />?
    You use an <term>escaped version</term>.
    Type literally,
    the four characters <c>&amp;lt;</c> in your source.
    Then the <init>XML</init> processor will know you want the character and will not mistake it for a tag.
    But now we want to get an ampersand into our source like: &amp;. How?
    Another escaped version of a character,
    literally the five characters <c>&amp;amp;</c>.
  </p>
  <p>
    Otherwise, keys on your keyboard,
    even international versions,
    should be fine in your source and behave as expected.
    <init>WYTIWYG</init> = What You Type Is What You Get.
    So the principal concession to using <init>XML</init> markup is the following very simple rule.
  </p>
  <blockquote>
    <p>
      Rather than pressing the &lt; and &amp;
      keys on your keyboard,
      instead always enter the escape sequences <c>&amp;lt;</c> and <c>&amp;amp;</c> as replacements.
    </p>
  </blockquote>
  <p>
    Simple.
    And it will work in
    <q>running text,</q>
    verbatim text
    (like when authoring the content of <tag>c</tag> or <tag>pre</tag> elements),
    and mixed into <latex /> syntax to desribe mathematical expressions.
    <init>XML</init> has three other escape sequences <c>&amp;gt;</c>,
    <c>&amp;apos;</c>,
    and <c>&amp;quot;</c>,
    for the characters &gt;, ', and "
    (respectively).
    But they seem largely unnecessary for authoring in PreTeXt, as we now demonstrate by typing them directly from our keyboard into our source: &gt;, ', and ".
  </p>
  <exercise>
    <p>
      How was <c>&amp;amp;</c> authored?
      Work it out, and then check the source here for the answer.
    </p>
  </exercise>
</subsection>
One of the goals of PreTeXt is to relieve an author of managing the numerous conflicts when mixing languages that use different characters for special purposes. But, of course, XML has its own special characters.
If you type a “less-than” symbol in your source, the XML processor thinks you are starting an opening, or closing, tag. So how do you get a less-than sign into your source so that it survives into your output, like this: < ? You use an escaped version. Type literally, the four characters &lt; in your source. Then the XML processor will know you want the character and will not mistake it for a tag. But now we want to get an ampersand into our source like: &. How? Another escaped version of a character, literally the five characters &amp;.
Otherwise, keys on your keyboard, even international versions, should be fine in your source and behave as expected. WYTIWYG = What You Type Is What You Get. So the principal concession to using XML markup is the following very simple rule.
View Source for blockquote
<blockquote>
  <p>
    Rather than pressing the &lt; and &amp;
    keys on your keyboard,
    instead always enter the escape sequences <c>&amp;lt;</c> and <c>&amp;amp;</c> as replacements.
  </p>
</blockquote>
Rather than pressing the < and & keys on your keyboard, instead always enter the escape sequences &lt; and &amp; as replacements.
Simple. And it will work in “running text,” verbatim text (like when authoring the content of <c> or <pre> elements), and mixed into syntax to desribe mathematical expressions. XML has three other escape sequences &gt;, &apos;, and &quot;, for the characters >, ’, and " (respectively). But they seem largely unnecessary for authoring in PreTeXt, as we now demonstrate by typing them directly from our keyboard into our source: >, ’, and ".

Checkpoint 8.1.

View Source for exercise
<exercise>
  <p>
    How was <c>&amp;amp;</c> authored?
    Work it out, and then check the source here for the answer.
  </p>
</exercise>
How was &amp; authored? Work it out, and then check the source here for the answer.

Subsection 8.2 Quotations

View Source for subsection
<subsection>
  <title>Quotations</title>
  <p>
    The <tag>q</tag>
        <idx><h>quotations</h></idx>
    tag will provide beginning and ending double quotations,
    while the <tag>sq</tag> tag will behave similarly but provide single quotes.
    Given the complexity of quotations,
    the different symbols used in different languages,
    and the over-simplified versions provided on keyboards,
    it is necessary to use markup.
  </p>
  <p>
    <q>The roots of education are bitter,
    but the fruit is sweet.</q>
    (Aristotle)
  </p>
  <p>
    <sq>It is always wise to look ahead,
    but difficult to look further than you can see.</sq> (Winston Churchill)
  </p>
  <p>
    A large quote can be accomodated with the <tag>blockquote</tag> tag,
    which can carry within itself an <tag>attribution</tag> element.
  </p>
  <blockquote>
    <p>
      The problem with writing a book in verse is, to be successful,
      it has to sound like you knocked it off on a rainy Friday afternoon.
      It has to sound easy.
      When you can do it,
      it helps tremendously because it's a thing that forces kids to read on.
      You have this unconsummated feeling if you stop.
    </p>
    <attribution>Dr. Seuss</attribution>
  </blockquote>
  <p>
    We say that again,
    to test a multiline attribution of a block quotation.
    Notice how the dash appears automatically,
    and that it is a <term>quotation dash</term>
    in HTML, distinct from other sorts of dashes.
  </p>
  <blockquote>
    <p>
      The problem with writing a book in verse is, to be successful,
      it has to sound like you knocked it off on a rainy Friday afternoon.
      It has to sound easy.
      When you can do it,
      it helps tremendously because it's a thing that forces kids to read on.
      You have this unconsummated feeling if you stop.
    </p>
    <attribution>
    <line>Dr. Seuss</line>
    <line>Children's Author</line></attribution>
  </blockquote>
  <p>
    Sometimes a quote may extend across several paragraphs.
    Or a balanced pair of quotations marks crosses an XML boundary,
    so we need left, right, single and double versions.
    (For example,
    see Section<nbsp /><xref ref="poetry" /> on poetry.)
    Here are all four in a haphazard order:
    <rq />, <lsq />, <lq />, <rsq />.
    These should be a last resort,
    and <em>not</em> a replacement for the <c>q</c> and <c>sq</c> tags.
    The left/right versions are used for the following quote from Abraham Lincoln,
    which we have edited into two paragraphs.
  </p>
  <p>
    <lq />I am not bound to win, but I am bound to be true.
    I am not bound to succeed, but I am bound to live by the light that I have.
  </p>
  <p>
    I must stand with anybody that stands right,
    and stand with him while he is right,
    and part with him when he goes wrong.<rq />
  </p>
  <p>
    And as a tests, we try some crazy combinations of quotes,
    which would normally give <latex /> some trouble where the quotation marks are adjacent.
    <ul>
      <li>
        <p>
          <q>we use <sq>single quotes inside of double quotes</sq></q>
        </p>
      </li>
      <li>
        <p>
          <sq>
          <q>double quotes inside of single quotes</q>
          with more</sq>
        </p>
      </li>
      <li>
        <p>
          <q><sq>single quotes tight inside of double quotes</sq></q>
        </p>
      </li>
      <li>
        <p>
          <sq>
          <q>double quotes tight inside of single quotes</q>
          </sq>
        </p>
      </li>
      <li>
        <p>
          An
          <q><sq><sq>
          <q>absurd test</q>
          </sq></sq></q>
          of two adjacent single quotes inside a pair of double quotes
        </p>
      </li>
      <li>
        <p>
          you would never do this, but a <sq><sq>pair of single quotes</sq></sq>
        </p>
      </li>
    </ul>
  </p>
  <p>
    <abbr>N.B.</abbr> We have taken no special care to protect against interactions of the actual quote characters
    (described above)
    in <latex /> with themselves,
    or with the grouping tags.
  </p>
</subsection>
The <q> tag will provide beginning and ending double quotations, while the <sq> tag will behave similarly but provide single quotes. Given the complexity of quotations, the different symbols used in different languages, and the over-simplified versions provided on keyboards, it is necessary to use markup.
“The roots of education are bitter, but the fruit is sweet.” (Aristotle)
‘It is always wise to look ahead, but difficult to look further than you can see.’ (Winston Churchill)
A large quote can be accomodated with the <blockquote> tag, which can carry within itself an <attribution> element.
View Source for blockquote
<blockquote>
  <p>
    The problem with writing a book in verse is, to be successful,
    it has to sound like you knocked it off on a rainy Friday afternoon.
    It has to sound easy.
    When you can do it,
    it helps tremendously because it's a thing that forces kids to read on.
    You have this unconsummated feeling if you stop.
  </p>
  <attribution>Dr. Seuss</attribution>
</blockquote>
The problem with writing a book in verse is, to be successful, it has to sound like you knocked it off on a rainy Friday afternoon. It has to sound easy. When you can do it, it helps tremendously because it’s a thing that forces kids to read on. You have this unconsummated feeling if you stop.
―Dr. Seuss
We say that again, to test a multiline attribution of a block quotation. Notice how the dash appears automatically, and that it is a quotation dash in HTML, distinct from other sorts of dashes.
View Source for blockquote
<blockquote>
  <p>
    The problem with writing a book in verse is, to be successful,
    it has to sound like you knocked it off on a rainy Friday afternoon.
    It has to sound easy.
    When you can do it,
    it helps tremendously because it's a thing that forces kids to read on.
    You have this unconsummated feeling if you stop.
  </p>
  <attribution>
  <line>Dr. Seuss</line>
  <line>Children's Author</line></attribution>
</blockquote>
The problem with writing a book in verse is, to be successful, it has to sound like you knocked it off on a rainy Friday afternoon. It has to sound easy. When you can do it, it helps tremendously because it’s a thing that forces kids to read on. You have this unconsummated feeling if you stop.
―Dr. Seuss
Children’s Author
Sometimes a quote may extend across several paragraphs. Or a balanced pair of quotations marks crosses an XML boundary, so we need left, right, single and double versions. (For example, see Section 28 on poetry.) Here are all four in a haphazard order: ”, ‘, “, ’. These should be a last resort, and not a replacement for the q and sq tags. The left/right versions are used for the following quote from Abraham Lincoln, which we have edited into two paragraphs.
“I am not bound to win, but I am bound to be true. I am not bound to succeed, but I am bound to live by the light that I have.
I must stand with anybody that stands right, and stand with him while he is right, and part with him when he goes wrong.”
And as a tests, we try some crazy combinations of quotes, which would normally give some trouble where the quotation marks are adjacent.
  • “we use ‘single quotes inside of double quotes’”
  • ‘“double quotes inside of single quotes” with more’
  • “‘single quotes tight inside of double quotes’”
  • ‘“double quotes tight inside of single quotes”’
  • An “‘‘“absurd test”’’” of two adjacent single quotes inside a pair of double quotes
  • you would never do this, but a ‘‘pair of single quotes’’
N.B. We have taken no special care to protect against interactions of the actual quote characters (described above) in with themselves, or with the grouping tags.

Subsection 8.3 Groupings

View Source for subsection
<subsection>
  <title>Groupings</title>
  <p>
    It is possible to make some other groupings like quotations,
    such as {some <em>emphasized text</em>
    grouped within braces}, or [a
    <pubtitle>Book Title</pubtitle>
    inside brackets], an <articletitle>Article Title</articletitle>,
    <angles>some <foreign>foreign words</foreign> inside angle brackets</angles>,
    or <dblbrackets>just a bit of text within double brackets</dblbrackets>.
    Some of these are used extensively by scholars who study texts to note various restorations or deletions.
    Note that the <tag>foreign</tag> element may have a <c>xml:lang</c> attribute.
  </p>
  <p>
    Note that the angle brackets,
    <langle /> and <rangle />, are <em>not</em>
    the keyboard characters, &lt;
    and &gt;. Your best bet is to use the provided <tag>angles</tag> element when constructing a balanced pair.
    Similarly, <tag>dblbrackets</tag> is provided to make the double-bracket characters easily available,
    since they are likely not on your keyboard.
  </p>
</subsection>
It is possible to make some other groupings like quotations, such as {some emphasized text grouped within braces}, or [a Book Title inside brackets], an “Article Title”, 〈some foreign words inside angle brackets〉, or ⟦just a bit of text within double brackets⟧. Some of these are used extensively by scholars who study texts to note various restorations or deletions. Note that the <foreign> element may have a xml:lang attribute.
Note that the angle brackets, 〈 and 〉, are not the keyboard characters, < and >. Your best bet is to use the provided <angles> element when constructing a balanced pair. Similarly, <dblbrackets> is provided to make the double-bracket characters easily available, since they are likely not on your keyboard.

Subsection 8.4 Characters, Symbols, and Constructions

View Source for subsection
<subsection>
  <title>Characters, Symbols, and Constructions</title>
  <p>
    Some keyboard characters are ambiguous.
    Is the character <c>'</c> an apostrophe or a right single quote?
    We presume the former, ', and provide markup as an alternative for the latter
    (described above).
    Is <c>/</c> used to separate words, or to form a fraction?
    We presume the former, /, and provide <tage>solidus</tage>,
    <solidus />, for the latter.
    We test some other characters straight from our US keyboard
    (with two being escape sequences).
  </p>
  <p>
    ~ ` ! @ # $ % ^ &amp; * ( ) _ - + = [ ] { } | \ ; : ' " , &lt; . &gt; ? /
  </p>
  <p>
    And again as verbatim text.
  </p>
  <p>
    <c>~ ` ! @ # $ % ^ &amp; * ( ) _ - + = [ ] { } | \ ; : ' " , &lt; . &gt; ? /</c>
  </p>
  <p>
    Note that for a long time <pretext /> had empty elements for many of these characters,
    as a consequence of naïveté. So you might see <tage>dollar</tage>,
    <tage>ampersand</tage>, or others in old source.
    They will be deprecated and will raise warnings.
  </p>
  <p>
    Now, when a character is nowhere to be found on your keyboard,
    we provide conveniences as markup.
    Or a keyboard character may have a different variant which we implement as an empty element.
    Here we test many of these.
    Read the Author's Guide for tags and more detail.
  </p>
  <p>
    <copyright /><nbsp /><nbsp /> <phonomark /><nbsp /><nbsp /> <copyleft /><nbsp /><nbsp /> <registered /><nbsp /><nbsp /> <trademark /><nbsp /><nbsp /> <servicemark /><nbsp /><nbsp /> <ellipsis /><nbsp /><nbsp /> <midpoint /><nbsp /><nbsp /> <swungdash /><nbsp /><nbsp /> <permille /><nbsp /><nbsp /> <pilcrow /><nbsp /><nbsp /> <section-mark /><nbsp /><nbsp /> <minus /><nbsp /><nbsp /> <times /><nbsp /><nbsp /> <solidus /><nbsp /><nbsp /> <obelus /><nbsp /><nbsp /> <plusminus />
  </p>
  <p>
    There are a few common abbreviations of Latin phrases that can be achieved in HTML one way,
    and in <latex /> with a slightly different mechanism.
    These are due to <latex />'s treatment of a period
    (full stop),
    depending on its surroundings.
    So not reserved characters, but just divergent treatment.
    Using these will lead to the best quality in all your outputs.
    See Will Robertson's informative and arcane
    <url href="http://latex-alive.tumblr.com/post/827168808/correct-punctuation-spaces" visual="latex-alive.tumblr.com/post/827168808">blog post</url>
    on the topic if you want the full story for the treatment of a full stop in <latex />.
  </p>
  <tabular>
    <row>
      <cell>Tag</cell>
      <cell>Realization</cell>
      <cell>Meaning</cell>
    </row>

    <row>
      <cell><c>ad</c></cell>
      <cell><ad /></cell>
      <cell><foreign>anno Domini</foreign>, in the year of the Lord</cell>
    </row>
    <row>
      <cell><c>am</c></cell>
      <cell><am /></cell>
      <cell><foreign>ante meridiem</foreign>, before midday</cell>
    </row>
    <row>
      <cell><c>bc</c></cell>
      <cell><bc /></cell>
      <cell>English, before Christ</cell>
    </row>
    <row>
      <cell><c>ca</c></cell>
      <cell><ca /></cell>
      <cell><foreign>circa</foreign>, about</cell>
    </row>
    <row>
      <cell><c>eg</c></cell>
      <cell><eg /></cell>
      <cell><foreign>exempli gratia</foreign>, for example</cell>
    </row>
    <row>
      <cell><c>etal</c></cell>
      <cell><etal /></cell>
      <cell><foreign>et alia</foreign>, and others</cell>
    </row>
    <row>
      <cell><c>etc</c></cell>
      <cell><etc /></cell>
      <cell><foreign>et caetera</foreign>, and the rest</cell>
    </row>
    <row>
      <cell><c>ie</c></cell>
      <cell><ie /></cell>
      <cell><foreign>id est</foreign>, in other words</cell>
    </row>
    <row>
      <cell><c>nb</c></cell>
      <cell><nb /></cell>
      <cell><foreign>nota bene</foreign>, note well</cell>
    </row>
    <row>
      <cell><c>pm</c></cell>
      <cell><pm /></cell>
      <cell><foreign>post meridiem</foreign>, after midday</cell>
    </row>
    <row>
      <cell><c>ps</c></cell>
      <cell><ps /></cell>
      <cell><foreign>post scriptum</foreign>, after what has been written</cell>
    </row>
    <row>
      <cell><c>vs</c></cell>
      <cell><vs /></cell>
      <cell><foreign>versus</foreign>, against</cell>
    </row>
    <row>
      <cell><c>viz</c></cell>
      <cell><viz /></cell>
      <cell><foreign>videlicet</foreign>, namely</cell>
    </row>
  </tabular>
  <p>
    We also distinguish between abbreviations (<abbr>vs.</abbr>),
    acronyms (<acro>SCUBA</acro>) and initialisms
    (<init>XML</init>).
    This is a test of the text version of a multiplication symbol: 2<nbsp /><times /><nbsp />4.
  </p>

  <p>
    Simple coordinates with degrees, minutes,
    seconds, or temperature, or distance in feet and inches.
    <q>We parked the car at 36<degree />16<prime />0.83<dblprime />N, 122<degree />35<prime />47.27<dblprime />W, and since it was 93<degree />F, we walked 505<prime />3.6<dblprime /> so we could swim in the bay.</q>
  </p>
  <p>
    An <term>em dash</term> is the long dash used much like parentheses
    (not an <term>en dash</term> used to denote a range,
    such as a range of page numbers).
    It should not have spaces around it,
    but some style guides allow for a <em>thin</em> space,
    which<mdash />we test right now.
    A publication file entry can be set to <c>none</c> or <c>thin</c> to control this.
  </p>
</subsection>
Some keyboard characters are ambiguous. Is the character ' an apostrophe or a right single quote? We presume the former, ’, and provide markup as an alternative for the latter (described above). Is / used to separate words, or to form a fraction? We presume the former, /, and provide <solidus/>, ⁄, for the latter. We test some other characters straight from our US keyboard (with two being escape sequences).
~ ` ! @ # $ % ^ & * ( ) _ - + = [ ] { } | \ ; : ’ " , < . > ? /
And again as verbatim text.
~ ` ! @ # $ % ^ & * ( ) _ - + = [ ] { } | \ ; : ' " , < . > ? /
Note that for a long time PreTeXt had empty elements for many of these characters, as a consequence of naïveté. So you might see <dollar/>, <ampersand/>, or others in old source. They will be deprecated and will raise warnings.
Now, when a character is nowhere to be found on your keyboard, we provide conveniences as markup. Or a keyboard character may have a different variant which we implement as an empty element. Here we test many of these. Read the Author’s Guide for tags and more detail.
©   ℗   🄯   ®   ™   ℠   …   ·   ⁓   ‰   ¶   §   −   ×   ⁄   ÷   ±
There are a few common abbreviations of Latin phrases that can be achieved in HTML one way, and in with a slightly different mechanism. These are due to ’s treatment of a period (full stop), depending on its surroundings. So not reserved characters, but just divergent treatment. Using these will lead to the best quality in all your outputs. See Will Robertson’s informative and arcane blog post
 1 
latex-alive.tumblr.com/post/827168808
on the topic if you want the full story for the treatment of a full stop in .
Tag Realization Meaning
ad AD anno Domini, in the year of the Lord
am AM ante meridiem, before midday
bc BC English, before Christ
ca ca. circa, about
eg e.g. exempli gratia, for example
etal et al. et alia, and others
etc etc. et caetera, and the rest
ie i.e. id est, in other words
nb NB nota bene, note well
pm PM post meridiem, after midday
ps PS post scriptum, after what has been written
vs vs. versus, against
viz viz. videlicet, namely
We also distinguish between abbreviations (vs.), acronyms (SCUBA) and initialisms (XML). This is a test of the text version of a multiplication symbol: 2 × 4.
Simple coordinates with degrees, minutes, seconds, or temperature, or distance in feet and inches. “We parked the car at 36°16′0.83″N, 122°35′47.27″W, and since it was 93°F, we walked 505′3.6″ so we could swim in the bay.”
An em dash is the long dash used much like parentheses (not an en dash used to denote a range, such as a range of page numbers). It should not have spaces around it, but some style guides allow for a thin space, which—we test right now. A publication file entry can be set to none or thin to control this.

Subsection 8.5 Currency

View Source for subsection
<subsection>
  <title>Currency</title>
  <p>
    For best results,
    be certain the right Unicode characters are in your source.
    If you only need a certain symbol rarely,
    you can enter it in your source via its Unicode number.
    For example, to obtain a peso,
    type <c>&amp;#x20B1;</c>.
    This table has been tested with our default fonts,
    and should be fine for <init>HTML</init> output.
    Please report any difficulties with different <latex /> fonts,
    as there are extra measures we can take to make these more robust.
    (We've already done this for the Paraguayan guaraní.)
  </p>
  <table>
    <title>Supported Currency</title>
    <tabular>
      <row bottom="medium">
        <cell>Sign</cell>
        <cell>Unicode</cell>
        <cell>Name</cell>
      </row>
      <row>
        <cell>$</cell>
        <cell><c>U+0024</c></cell>
        <cell>dollar</cell>
      </row>
      <row>
        <cell>¢</cell>
        <cell><c>U+00A2</c></cell>
        <cell>cent</cell>
      </row>
      <row>
        <cell>£</cell>
        <cell><c>U+00A3</c></cell>
        <cell>sterling</cell>
      </row>
      <row>
        <cell>¤</cell>
        <cell><c>U+00A4</c></cell>
        <cell>currency</cell>
      </row>
      <row>
        <cell>¥</cell>
        <cell><c>U+00A5</c></cell>
        <cell>yen</cell>
      </row>
      <row>
        <cell>ƒ</cell>
        <cell><c>U+0192</c></cell>
        <cell>florin</cell>
      </row>
      <row>
        <cell>฿</cell>
        <cell><c>U+0E3F</c></cell>
        <cell>baht</cell>
      </row>
      <row>
        <cell>₡</cell>
        <cell><c>U+20A1</c></cell>
        <cell>colon</cell>
      </row>
      <row>
        <cell>₤</cell>
        <cell><c>U+20A4</c></cell>
        <cell>lira</cell>
      </row>
      <row>
        <cell>₦</cell>
        <cell><c>U+20A6</c></cell>
        <cell>naira</cell>
      </row>
      <row>
        <cell>₩</cell>
        <cell><c>U+20A9</c></cell>
        <cell>won</cell>
      </row>
      <row>
        <cell>₫</cell>
        <cell><c>U+20AB</c></cell>
        <cell>dong</cell>
      </row>
      <row>
        <cell>€</cell>
        <cell><c>U+20AC</c></cell>
        <cell>euro</cell>
      </row>
      <row>
        <cell>₱</cell>
        <cell><c>U+20B1</c></cell>
        <cell>peso</cell>
      </row>
      <row>
        <cell>₲</cell>
        <cell><c>U+20B2</c></cell>
        <cell>guarani</cell>
      </row>
    </tabular>
  </table>
</subsection>
For best results, be certain the right Unicode characters are in your source. If you only need a certain symbol rarely, you can enter it in your source via its Unicode number. For example, to obtain a peso, type &#x20B1;. This table has been tested with our default fonts, and should be fine for HTML output. Please report any difficulties with different fonts, as there are extra measures we can take to make these more robust. (We’ve already done this for the Paraguayan guaraní.)
View Source for table
<table>
  <title>Supported Currency</title>
  <tabular>
    <row bottom="medium">
      <cell>Sign</cell>
      <cell>Unicode</cell>
      <cell>Name</cell>
    </row>
    <row>
      <cell>$</cell>
      <cell><c>U+0024</c></cell>
      <cell>dollar</cell>
    </row>
    <row>
      <cell>¢</cell>
      <cell><c>U+00A2</c></cell>
      <cell>cent</cell>
    </row>
    <row>
      <cell>£</cell>
      <cell><c>U+00A3</c></cell>
      <cell>sterling</cell>
    </row>
    <row>
      <cell>¤</cell>
      <cell><c>U+00A4</c></cell>
      <cell>currency</cell>
    </row>
    <row>
      <cell>¥</cell>
      <cell><c>U+00A5</c></cell>
      <cell>yen</cell>
    </row>
    <row>
      <cell>ƒ</cell>
      <cell><c>U+0192</c></cell>
      <cell>florin</cell>
    </row>
    <row>
      <cell>฿</cell>
      <cell><c>U+0E3F</c></cell>
      <cell>baht</cell>
    </row>
    <row>
      <cell>₡</cell>
      <cell><c>U+20A1</c></cell>
      <cell>colon</cell>
    </row>
    <row>
      <cell>₤</cell>
      <cell><c>U+20A4</c></cell>
      <cell>lira</cell>
    </row>
    <row>
      <cell>₦</cell>
      <cell><c>U+20A6</c></cell>
      <cell>naira</cell>
    </row>
    <row>
      <cell>₩</cell>
      <cell><c>U+20A9</c></cell>
      <cell>won</cell>
    </row>
    <row>
      <cell>₫</cell>
      <cell><c>U+20AB</c></cell>
      <cell>dong</cell>
    </row>
    <row>
      <cell>€</cell>
      <cell><c>U+20AC</c></cell>
      <cell>euro</cell>
    </row>
    <row>
      <cell>₱</cell>
      <cell><c>U+20B1</c></cell>
      <cell>peso</cell>
    </row>
    <row>
      <cell>₲</cell>
      <cell><c>U+20B2</c></cell>
      <cell>guarani</cell>
    </row>
  </tabular>
</table>
Table 8.2. Supported Currency
Sign Unicode Name
$ U+0024 dollar
¢ U+00A2 cent
£ U+00A3 sterling
¤ U+00A4 currency
¥ U+00A5 yen
ƒ U+0192 florin
฿ U+0E3F baht
U+20A1 colon
U+20A4 lira
U+20A6 naira
U+20A9 won
U+20AB dong
U+20AC euro
U+20B1 peso
U+20B2 guarani

Subsection 8.6 Icons in Text

View Source for subsection
<subsection xml:id="subsection-icons-in-text">
  <title>Icons in Text</title>
  <p>
    A limited supply of icons can be used when explaining how to use some computer application.
    The empty element is <tage>icon</tage> and the attribute is <attr>name</attr>.
  </p>
  <p>
    We sprinkle <icon name="gear" /> a few into a few sentences <icon name="wrench" /> to check baselines <icon name="file-save" /> and font sizing.
    We sprinkle <icon name="gear" /> a few into a few sentences <icon name="wrench" /> to check baselines <icon name="file-save" /> and font sizing.
    We sprinkle <icon name="gear" /> a few into a few sentences <icon name="wrench" /> to check baselines <icon name="file-save" /> and font sizing.
    We sprinkle <icon name="gear" /> a few into a few sentences <icon name="wrench" /> to check baselines <icon name="file-save" /> and font sizing.
  </p>
  <table>
    <title>User-Interface Icons</title>
    <tabular>
      <col />
      <col halign="center" right="medium" />
      <col />
      <col halign="center" right="medium" />
      <col />
      <col halign="center" />
      <row bottom="medium">
        <cell>Name</cell>
        <cell>Icon</cell>
        <cell>Name</cell>
        <cell>Icon</cell>
        <cell>Name</cell>
        <cell>Icon</cell>
      </row>
      <row>
        <cell><c>arrow-down</c></cell>
        <cell><icon name="arrow-down" /></cell>
        <cell><c>arrow-left</c></cell>
        <cell><icon name="arrow-left" /></cell>
        <cell><c>arrow-right</c></cell>
        <cell><icon name="arrow-right" /></cell>
      </row>
      <row>
        <cell><c>arrow-up</c></cell>
        <cell><icon name="arrow-up" /></cell>
        <cell><c>file-save</c></cell>
        <cell><icon name="file-save" /></cell>
        <cell><c>gear</c></cell>
        <cell><icon name="gear" /></cell>
      </row>
      <row>
        <cell><c>menu</c></cell>
        <cell><icon name="menu" /></cell>
        <cell><c>wrench</c></cell>
        <cell><icon name="wrench" /></cell>
        <cell />
        <cell />

      </row>

    </tabular>
  </table>
  <table>
    <title>Creative Commons License Icons</title>
    <tabular>
      <col />
      <col halign="center" right="medium" />
      <col />
      <col halign="center" right="medium" />
      <col />
      <col halign="center" />
      <row bottom="medium">
        <cell>Name</cell>
        <cell>Icon</cell>
        <cell>Name</cell>
        <cell>Icon</cell>
        <cell>Name</cell>
        <cell>Icon</cell>
      </row>
      <row>
        <cell><c>cc</c></cell>
        <cell><icon name="cc" /></cell>
        <cell><c>cc-by</c></cell>
        <cell><icon name="cc-by" /></cell>
        <cell><c>cc-sa</c></cell>
        <cell><icon name="cc-sa" /></cell>
      </row>
      <row>
        <cell><c>cc-nc</c></cell>
        <cell><icon name="cc-nc" /></cell>
        <cell><c>cc-pd</c></cell>
        <cell><icon name="cc-pd" /></cell>
        <cell><c>cc-zero</c></cell>
        <cell><icon name="cc-zero" /></cell>

      </row>

    </tabular>
  </table>
  <p>
    Nominations of new icons must
    <ul>
      <li>Have a Unicode character representation.</li>
      <li>
        Be in the <init>HTML/CSS/JS</init> Font Awesome 5 catalog.
      </li>
      <li>Be in the <latex /> <c>fontawesome5</c> package.</li>
      <li>Have a reasonably semantic <pretext /> name.</li>
    </ul>
    Please supply all this information,
    including the official Unicode name, with your request.
    Better yet, form a pull request.
  </p>
  <warning>
    <title>Icons, <c>xelatex</c>, and Fonts</title>
    <p>
      When processing a <latex /> file with <c>xelatex</c> the Font Awesome 5 icons are expected to be in a <em>system</em>
      font whose name is <c>Font Awesome 5 Free</c>.
      This is not a filename,
      and installing the <latex /> <c>fontawesome5</c> package into your <latex /> installation does not always guarantee that this font will automatically be available as a <em>system</em> font.
    </p>
    <p>
      The Publisher's Guide contains some discussion about installing fonts into a system,
      as part of the documentation of creating a <latex /> style,
      and has particular warnings about only using the <latex /> <c>fontawesome5</c> package as a vehicle for installing and accessing these fonts.
    </p>
  </warning>
</subsection>
A limited supply of icons can be used when explaining how to use some computer application. The empty element is <icon/> and the attribute is @name.
We sprinkle a few into a few sentences to check baselines and font sizing. We sprinkle a few into a few sentences to check baselines and font sizing. We sprinkle a few into a few sentences to check baselines and font sizing. We sprinkle a few into a few sentences to check baselines and font sizing.
View Source for table
<table>
  <title>User-Interface Icons</title>
  <tabular>
    <col />
    <col halign="center" right="medium" />
    <col />
    <col halign="center" right="medium" />
    <col />
    <col halign="center" />
    <row bottom="medium">
      <cell>Name</cell>
      <cell>Icon</cell>
      <cell>Name</cell>
      <cell>Icon</cell>
      <cell>Name</cell>
      <cell>Icon</cell>
    </row>
    <row>
      <cell><c>arrow-down</c></cell>
      <cell><icon name="arrow-down" /></cell>
      <cell><c>arrow-left</c></cell>
      <cell><icon name="arrow-left" /></cell>
      <cell><c>arrow-right</c></cell>
      <cell><icon name="arrow-right" /></cell>
    </row>
    <row>
      <cell><c>arrow-up</c></cell>
      <cell><icon name="arrow-up" /></cell>
      <cell><c>file-save</c></cell>
      <cell><icon name="file-save" /></cell>
      <cell><c>gear</c></cell>
      <cell><icon name="gear" /></cell>
    </row>
    <row>
      <cell><c>menu</c></cell>
      <cell><icon name="menu" /></cell>
      <cell><c>wrench</c></cell>
      <cell><icon name="wrench" /></cell>
      <cell />
      <cell />

    </row>

  </tabular>
</table>
Table 8.3. User-Interface Icons
Name Icon Name Icon Name Icon
arrow-down arrow-left arrow-right
arrow-up file-save gear
menu wrench
View Source for table
<table>
  <title>Creative Commons License Icons</title>
  <tabular>
    <col />
    <col halign="center" right="medium" />
    <col />
    <col halign="center" right="medium" />
    <col />
    <col halign="center" />
    <row bottom="medium">
      <cell>Name</cell>
      <cell>Icon</cell>
      <cell>Name</cell>
      <cell>Icon</cell>
      <cell>Name</cell>
      <cell>Icon</cell>
    </row>
    <row>
      <cell><c>cc</c></cell>
      <cell><icon name="cc" /></cell>
      <cell><c>cc-by</c></cell>
      <cell><icon name="cc-by" /></cell>
      <cell><c>cc-sa</c></cell>
      <cell><icon name="cc-sa" /></cell>
    </row>
    <row>
      <cell><c>cc-nc</c></cell>
      <cell><icon name="cc-nc" /></cell>
      <cell><c>cc-pd</c></cell>
      <cell><icon name="cc-pd" /></cell>
      <cell><c>cc-zero</c></cell>
      <cell><icon name="cc-zero" /></cell>

    </row>

  </tabular>
</table>
Table 8.4. Creative Commons License Icons
Name Icon Name Icon Name Icon
cc cc-by cc-sa
cc-nc cc-pd cc-zero
Nominations of new icons must
  • Have a Unicode character representation.
  • Be in the HTML/CSS/JS Font Awesome 5 catalog.
  • Be in the fontawesome5 package.
  • Have a reasonably semantic PreTeXt name.
Please supply all this information, including the official Unicode name, with your request. Better yet, form a pull request.

Warning 8.5. Icons, xelatex, and Fonts.

View Source for warning
<warning>
  <title>Icons, <c>xelatex</c>, and Fonts</title>
  <p>
    When processing a <latex /> file with <c>xelatex</c> the Font Awesome 5 icons are expected to be in a <em>system</em>
    font whose name is <c>Font Awesome 5 Free</c>.
    This is not a filename,
    and installing the <latex /> <c>fontawesome5</c> package into your <latex /> installation does not always guarantee that this font will automatically be available as a <em>system</em> font.
  </p>
  <p>
    The Publisher's Guide contains some discussion about installing fonts into a system,
    as part of the documentation of creating a <latex /> style,
    and has particular warnings about only using the <latex /> <c>fontawesome5</c> package as a vehicle for installing and accessing these fonts.
  </p>
</warning>
When processing a file with xelatex the Font Awesome 5 icons are expected to be in a system font whose name is Font Awesome 5 Free. This is not a filename, and installing the fontawesome5 package into your installation does not always guarantee that this font will automatically be available as a system font.
The Publisher’s Guide contains some discussion about installing fonts into a system, as part of the documentation of creating a style, and has particular warnings about only using the fontawesome5 package as a vehicle for installing and accessing these fonts.

Subsection 8.7 Keyboard Keys

View Source for subsection
<subsection xml:id="subsection-keyboard">
  <title>Keyboard Keys</title>
  <idx>keyboard keys</idx>
  <p>
    Your text can include specialized text meant to look like a key on the keyboard of a calculator or other device.
    So you can go <kbd>b</kbd> <kbd>Enter</kbd> <kbd>&lt;</kbd> or <kbd>F1</kbd>.
    Or maybe a sequence as: <kbd>Tab</kbd> &gt;
    <kbd>Ctrl</kbd> &gt; <kbd>T</kbd>.
    Use the <tag>kbd</tag> element,
    with the label of the key as content.
  </p>
  <p>
    There is a growing supply of keys which are labeled with graphics rather than text,
    such as a left arrow <kbd name="left" />,
    right arrow <kbd name="right" />, up arrow <kbd name="up" />,
    down arrow <kbd name="down" />, and Enter <kbd name="enter" />.
    See
    <pubtitle>The <pretext /> Guide</pubtitle>
    for the definitive list.
    In <xref ref="named-keyboard-keys" /> the literal column means the symbol/character is the content of a <tag>kbd</tag> element,
    while the named column means the symbol/character has been chosen via the value of the <attr>name</attr> attribute of an empty <tage>kbd</tage> element.
  </p>
  <table xml:id="named-keyboard-keys">
    <title>Named keys</title>
    <tabular halign="center">
      <row>
        <cell />
        <cell>Literal</cell>
        <cell>Named</cell>
      </row>
      <row>
        <cell>Ampersand</cell>
        <cell><kbd>&amp;</kbd></cell>
        <cell><kbd name="ampersand" /></cell>
      </row>
      <row>
        <cell>Less than</cell>
        <cell><kbd>&lt;</kbd></cell>
        <cell><kbd name="less" /></cell>
      </row>
      <row>
        <cell>Greater than</cell>
        <cell><kbd>&gt;</kbd></cell>
        <cell><kbd name="greater" /></cell>
      </row>
      <row>
        <cell>Dollar</cell>
        <cell><kbd>$</kbd></cell>
        <cell><kbd name="dollar" /></cell>
      </row>
      <row>
        <cell>Per cent</cell>
        <cell><kbd>%</kbd></cell>
        <cell><kbd name="percent" /></cell>
      </row>
      <row>
        <cell>Open brace</cell>
        <cell><kbd>{</kbd></cell>
        <cell><kbd name="openbrace" /></cell>
      </row>
      <row>
        <cell>Close brace</cell>
        <cell><kbd>}</kbd></cell>
        <cell><kbd name="closebrace" /></cell>
      </row>
      <row>
        <cell>Hash</cell>
        <cell><kbd>#</kbd></cell>
        <cell><kbd name="hash" /></cell>
      </row>
      <row>
        <cell>Backslash</cell>
        <cell><kbd>\</kbd></cell>
        <cell><kbd name="backslash" /></cell>
      </row>
      <row>
        <cell>Tilde</cell>
        <cell><kbd>~</kbd></cell>
        <cell><kbd name="tilde" /></cell>
      </row>
      <row>
        <cell>Circumflex</cell>
        <cell><kbd>^</kbd></cell>
        <cell><kbd name="circumflex" /></cell>
      </row>
      <row>
        <cell>Underscore</cell>
        <cell><kbd>_</kbd></cell>
        <cell><kbd name="underscore" /></cell>
      </row>
    </tabular>
  </table>
  <table>
    <title>Upper Case</title>
    <tabular halign="center">
      <row>
        <cell><kbd>~</kbd></cell>
        <cell><kbd>!</kbd></cell>
        <cell><kbd>@</kbd></cell>
        <cell><kbd>#</kbd></cell>
        <cell><kbd>$</kbd></cell>
        <cell><kbd>%</kbd></cell>
        <cell><kbd>^</kbd></cell>
        <cell><kbd>&amp;</kbd></cell>
        <cell><kbd>*</kbd></cell>
        <cell><kbd>(</kbd></cell>
        <cell><kbd>)</kbd></cell>
        <cell><kbd>_</kbd></cell>
        <cell><kbd>+</kbd></cell>
        <cell />
      </row>
      <row>
        <cell><kbd>Tab</kbd></cell>
        <cell><kbd>Q</kbd></cell>
        <cell><kbd>W</kbd></cell>
        <cell><kbd>E</kbd></cell>
        <cell><kbd>R</kbd></cell>
        <cell><kbd>T</kbd></cell>
        <cell><kbd>Y</kbd></cell>
        <cell><kbd>U</kbd></cell>
        <cell><kbd>I</kbd></cell>
        <cell><kbd>O</kbd></cell>
        <cell><kbd>P</kbd></cell>
        <cell><kbd>{</kbd></cell>
        <cell><kbd>}</kbd></cell>
        <cell><kbd>|</kbd></cell>
      </row>
      <row>
        <cell><kbd>CapsLock</kbd></cell>
        <cell><kbd>A</kbd></cell>
        <cell><kbd>S</kbd></cell>
        <cell><kbd>D</kbd></cell>
        <cell><kbd>F</kbd></cell>
        <cell><kbd>G</kbd></cell>
        <cell><kbd>H</kbd></cell>
        <cell><kbd>J</kbd></cell>
        <cell><kbd>K</kbd></cell>
        <cell><kbd>L</kbd></cell>
        <cell><kbd>:</kbd></cell>
        <cell><kbd>'</kbd></cell>
        <cell><kbd>Enter</kbd></cell>
        <cell />
      </row>
      <row>
        <cell><kbd>Shift</kbd></cell>
        <cell><kbd>Z</kbd></cell>
        <cell><kbd>X</kbd></cell>
        <cell><kbd>C</kbd></cell>
        <cell><kbd>V</kbd></cell>
        <cell><kbd>B</kbd></cell>
        <cell><kbd>N</kbd></cell>
        <cell><kbd>M</kbd></cell>
        <cell><kbd>&lt;</kbd></cell>
        <cell><kbd>&gt;</kbd></cell>
        <cell><kbd>?</kbd></cell>
        <cell><kbd>Shift</kbd></cell>
        <cell />
      </row>
    </tabular>
  </table>
  <table>
    <title>Lower Case</title>
    <tabular halign="center">
      <row>
        <cell><kbd>`</kbd></cell>
        <cell><kbd>1</kbd></cell>
        <cell><kbd>2</kbd></cell>
        <cell><kbd>3</kbd></cell>
        <cell><kbd>4</kbd></cell>
        <cell><kbd>5</kbd></cell>
        <cell><kbd>6</kbd></cell>
        <cell><kbd>7</kbd></cell>
        <cell><kbd>8</kbd></cell>
        <cell><kbd>9</kbd></cell>
        <cell><kbd>0</kbd></cell>
        <cell><kbd>-</kbd></cell>
        <cell><kbd>=</kbd></cell>
        <cell />
      </row>
      <row>
        <cell><kbd>Tab</kbd></cell>
        <cell><kbd>q</kbd></cell>
        <cell><kbd>w</kbd></cell>
        <cell><kbd>e</kbd></cell>
        <cell><kbd>r</kbd></cell>
        <cell><kbd>t</kbd></cell>
        <cell><kbd>y</kbd></cell>
        <cell><kbd>u</kbd></cell>
        <cell><kbd>i</kbd></cell>
        <cell><kbd>o</kbd></cell>
        <cell><kbd>p</kbd></cell>
        <cell><kbd>[</kbd></cell>
        <cell><kbd>]</kbd></cell>
        <cell><kbd>\</kbd></cell>
      </row>
      <row>
        <cell><kbd>CapsLock</kbd></cell>
        <cell><kbd>a</kbd></cell>
        <cell><kbd>s</kbd></cell>
        <cell><kbd>d</kbd></cell>
        <cell><kbd>f</kbd></cell>
        <cell><kbd>g</kbd></cell>
        <cell><kbd>h</kbd></cell>
        <cell><kbd>j</kbd></cell>
        <cell><kbd>k</kbd></cell>
        <cell><kbd>l</kbd></cell>
        <cell><kbd>;</kbd></cell>
        <cell><kbd>'</kbd></cell>
        <cell><kbd>Enter</kbd></cell>
        <cell />
      </row>
      <row>
        <cell><kbd>Shift</kbd></cell>
        <cell><kbd>z</kbd></cell>
        <cell><kbd>x</kbd></cell>
        <cell><kbd>c</kbd></cell>
        <cell><kbd>v</kbd></cell>
        <cell><kbd>b</kbd></cell>
        <cell><kbd>n</kbd></cell>
        <cell><kbd>m</kbd></cell>
        <cell><kbd>,</kbd></cell>
        <cell><kbd>.</kbd></cell>
        <cell><kbd>/</kbd></cell>
        <cell><kbd>Shift</kbd></cell>
        <cell />
      </row>
    </tabular>
  </table>
</subsection>
Your text can include specialized text meant to look like a key on the keyboard of a calculator or other device. So you can go b Enter < or F1. Or maybe a sequence as: Tab > Ctrl > T. Use the <kbd> element, with the label of the key as content.
There is a growing supply of keys which are labeled with graphics rather than text, such as a left arrow , right arrow , up arrow , down arrow , and Enter . See The PreTeXt Guide for the definitive list. In 8.6 the literal column means the symbol/character is the content of a <kbd> element, while the named column means the symbol/character has been chosen via the value of the @name attribute of an empty <kbd/> element.
View Source for table
<table xml:id="named-keyboard-keys">
  <title>Named keys</title>
  <tabular halign="center">
    <row>
      <cell />
      <cell>Literal</cell>
      <cell>Named</cell>
    </row>
    <row>
      <cell>Ampersand</cell>
      <cell><kbd>&amp;</kbd></cell>
      <cell><kbd name="ampersand" /></cell>
    </row>
    <row>
      <cell>Less than</cell>
      <cell><kbd>&lt;</kbd></cell>
      <cell><kbd name="less" /></cell>
    </row>
    <row>
      <cell>Greater than</cell>
      <cell><kbd>&gt;</kbd></cell>
      <cell><kbd name="greater" /></cell>
    </row>
    <row>
      <cell>Dollar</cell>
      <cell><kbd>$</kbd></cell>
      <cell><kbd name="dollar" /></cell>
    </row>
    <row>
      <cell>Per cent</cell>
      <cell><kbd>%</kbd></cell>
      <cell><kbd name="percent" /></cell>
    </row>
    <row>
      <cell>Open brace</cell>
      <cell><kbd>{</kbd></cell>
      <cell><kbd name="openbrace" /></cell>
    </row>
    <row>
      <cell>Close brace</cell>
      <cell><kbd>}</kbd></cell>
      <cell><kbd name="closebrace" /></cell>
    </row>
    <row>
      <cell>Hash</cell>
      <cell><kbd>#</kbd></cell>
      <cell><kbd name="hash" /></cell>
    </row>
    <row>
      <cell>Backslash</cell>
      <cell><kbd>\</kbd></cell>
      <cell><kbd name="backslash" /></cell>
    </row>
    <row>
      <cell>Tilde</cell>
      <cell><kbd>~</kbd></cell>
      <cell><kbd name="tilde" /></cell>
    </row>
    <row>
      <cell>Circumflex</cell>
      <cell><kbd>^</kbd></cell>
      <cell><kbd name="circumflex" /></cell>
    </row>
    <row>
      <cell>Underscore</cell>
      <cell><kbd>_</kbd></cell>
      <cell><kbd name="underscore" /></cell>
    </row>
  </tabular>
</table>
Table 8.6. Named keys
Literal Named
Ampersand & &
Less than < <
Greater than > >
Dollar $ $
Per cent % %
Open brace { {
Close brace } }
Hash # #
Backslash \ \
Tilde ~ ~
Circumflex ^ ^
Underscore _ _
View Source for table
<table>
  <title>Upper Case</title>
  <tabular halign="center">
    <row>
      <cell><kbd>~</kbd></cell>
      <cell><kbd>!</kbd></cell>
      <cell><kbd>@</kbd></cell>
      <cell><kbd>#</kbd></cell>
      <cell><kbd>$</kbd></cell>
      <cell><kbd>%</kbd></cell>
      <cell><kbd>^</kbd></cell>
      <cell><kbd>&amp;</kbd></cell>
      <cell><kbd>*</kbd></cell>
      <cell><kbd>(</kbd></cell>
      <cell><kbd>)</kbd></cell>
      <cell><kbd>_</kbd></cell>
      <cell><kbd>+</kbd></cell>
      <cell />
    </row>
    <row>
      <cell><kbd>Tab</kbd></cell>
      <cell><kbd>Q</kbd></cell>
      <cell><kbd>W</kbd></cell>
      <cell><kbd>E</kbd></cell>
      <cell><kbd>R</kbd></cell>
      <cell><kbd>T</kbd></cell>
      <cell><kbd>Y</kbd></cell>
      <cell><kbd>U</kbd></cell>
      <cell><kbd>I</kbd></cell>
      <cell><kbd>O</kbd></cell>
      <cell><kbd>P</kbd></cell>
      <cell><kbd>{</kbd></cell>
      <cell><kbd>}</kbd></cell>
      <cell><kbd>|</kbd></cell>
    </row>
    <row>
      <cell><kbd>CapsLock</kbd></cell>
      <cell><kbd>A</kbd></cell>
      <cell><kbd>S</kbd></cell>
      <cell><kbd>D</kbd></cell>
      <cell><kbd>F</kbd></cell>
      <cell><kbd>G</kbd></cell>
      <cell><kbd>H</kbd></cell>
      <cell><kbd>J</kbd></cell>
      <cell><kbd>K</kbd></cell>
      <cell><kbd>L</kbd></cell>
      <cell><kbd>:</kbd></cell>
      <cell><kbd>'</kbd></cell>
      <cell><kbd>Enter</kbd></cell>
      <cell />
    </row>
    <row>
      <cell><kbd>Shift</kbd></cell>
      <cell><kbd>Z</kbd></cell>
      <cell><kbd>X</kbd></cell>
      <cell><kbd>C</kbd></cell>
      <cell><kbd>V</kbd></cell>
      <cell><kbd>B</kbd></cell>
      <cell><kbd>N</kbd></cell>
      <cell><kbd>M</kbd></cell>
      <cell><kbd>&lt;</kbd></cell>
      <cell><kbd>&gt;</kbd></cell>
      <cell><kbd>?</kbd></cell>
      <cell><kbd>Shift</kbd></cell>
      <cell />
    </row>
  </tabular>
</table>
Table 8.7. Upper Case
~ ! @ # $ % ^ & * ( ) _ +
Tab Q W E R T Y U I O P { } |
CapsLock A S D F G H J K L : ' Enter
Shift Z X C V B N M < > ? Shift
View Source for table
<table>
  <title>Lower Case</title>
  <tabular halign="center">
    <row>
      <cell><kbd>`</kbd></cell>
      <cell><kbd>1</kbd></cell>
      <cell><kbd>2</kbd></cell>
      <cell><kbd>3</kbd></cell>
      <cell><kbd>4</kbd></cell>
      <cell><kbd>5</kbd></cell>
      <cell><kbd>6</kbd></cell>
      <cell><kbd>7</kbd></cell>
      <cell><kbd>8</kbd></cell>
      <cell><kbd>9</kbd></cell>
      <cell><kbd>0</kbd></cell>
      <cell><kbd>-</kbd></cell>
      <cell><kbd>=</kbd></cell>
      <cell />
    </row>
    <row>
      <cell><kbd>Tab</kbd></cell>
      <cell><kbd>q</kbd></cell>
      <cell><kbd>w</kbd></cell>
      <cell><kbd>e</kbd></cell>
      <cell><kbd>r</kbd></cell>
      <cell><kbd>t</kbd></cell>
      <cell><kbd>y</kbd></cell>
      <cell><kbd>u</kbd></cell>
      <cell><kbd>i</kbd></cell>
      <cell><kbd>o</kbd></cell>
      <cell><kbd>p</kbd></cell>
      <cell><kbd>[</kbd></cell>
      <cell><kbd>]</kbd></cell>
      <cell><kbd>\</kbd></cell>
    </row>
    <row>
      <cell><kbd>CapsLock</kbd></cell>
      <cell><kbd>a</kbd></cell>
      <cell><kbd>s</kbd></cell>
      <cell><kbd>d</kbd></cell>
      <cell><kbd>f</kbd></cell>
      <cell><kbd>g</kbd></cell>
      <cell><kbd>h</kbd></cell>
      <cell><kbd>j</kbd></cell>
      <cell><kbd>k</kbd></cell>
      <cell><kbd>l</kbd></cell>
      <cell><kbd>;</kbd></cell>
      <cell><kbd>'</kbd></cell>
      <cell><kbd>Enter</kbd></cell>
      <cell />
    </row>
    <row>
      <cell><kbd>Shift</kbd></cell>
      <cell><kbd>z</kbd></cell>
      <cell><kbd>x</kbd></cell>
      <cell><kbd>c</kbd></cell>
      <cell><kbd>v</kbd></cell>
      <cell><kbd>b</kbd></cell>
      <cell><kbd>n</kbd></cell>
      <cell><kbd>m</kbd></cell>
      <cell><kbd>,</kbd></cell>
      <cell><kbd>.</kbd></cell>
      <cell><kbd>/</kbd></cell>
      <cell><kbd>Shift</kbd></cell>
      <cell />
    </row>
  </tabular>
</table>
Table 8.8. Lower Case
` 1 2 3 4 5 6 7 8 9 0 - =
Tab q w e r t y u i o p [ ] \
CapsLock a s d f g h j k l ; ' Enter
Shift z x c v b n m , . / Shift

Subsection 8.8 URLs, such as http://example.com

View Source for subsection
<subsection xml:id="section-urls">
  <title>URLs, such as <url href="http://example.com" /></title>
  <idx><h>link</h><h>external, url</h></idx>
  <idx><h>reference</h><h>external, url</h></idx>
  <p>
    The <tag>url</tag> element can be used to create an external reference.
    The mandatory <attr>href</attr> attribute is the actual <init>URL</init> complete with the protocol (e.g.
    <c>https://</c>).
    Content for the element is optional,
    and if provided will be the
    <q>clickable</q>
    text.
    In this case, a <attr>visual</attr> attribute can be provided,
    and this will become a footnote with a more friendly version of the <init>URL</init>.
    When no content is provided, the
    <q>clickable</q>
    will be the <init>URL</init> with a preference for an optional <attr>visual</attr>.
    This subsection has some (extreme) tests and we leave complete documentation and full details for the <pretext /> Guide.
  </p>
  <p>
    A long <init>URL</init> for testing:
    <url href="http://www.pcc.edu/enroll/registration/dropping.html#withdraw" visual="www.pcc.edu/enroll/registration/dropping.html#withdraw" />.
    Notice in the source that you <em>do not</em>
    put any tags inside the <attr>href</attr> or <attr>visual</attr> attributes,
    but you may need to provide XML escape sequences
    (see <xref ref="subsection-xml-escape" text="type-global" />).
  </p>
  <p>
    A <tag>url</tag> element with content will get a footnote,
    by containing the (simplified) URL in the highly-recommended <attr>visual</attr> attribute.
    If you do not provide the <attr>visual</attr> attribute in this case,
    then you will get the <attr>href</attr> value repeated,
    possibly with some editing.
    If you insist,
    you can make the <attr>visual</attr> attribute identical to the <attr>href</attr> attribute.
    Some tests:
    <ul>
      <li>
        <url href="http://example.com/" visual="example.com">With a useful <attr>visual</attr> attribute</url>
      </li>
      <li>
        <url href="http://example.com/" visual="http://example.com/">With a duplicate <attr>visual</attr> attribute</url>
      </li>
      <li>
        <url href="http://example.com/">With no <attr>visual</attr> attribute</url>,
        so an edited one is formulated (no protocol)
      </li>
    </ul>
  </p>
  <p>
    Here is a totally bogus <init>URL</init>,
    which contains every possible legal character,
    so if this fails to convert there is some problematic character.
    In order to test the use of a percent sign (<c>%</c>) in a URL, we follow it by two hex digits,
    specifically,
    <c>58</c>,
    which is a way to represent the character <c>X</c> in a <init>URL</init>.
    Normal text,
    monospace text, <tag>url</tag> with just <attr>href</attr>,
    <tag>url</tag> with <attr>href</attr> and <attr>visual</attr>,
    <tag>url</tag> with <attr>href</attr>,
    <attr>visual</attr> and content.
    Notice how the various versions do,
    or do not, line-break in <latex />/PDF output, including the
    (potentially confusing)
    use of a use of a hyphen in the normal text version
  </p>
  <blockquote>
    <p>
      ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%-._~:/?#[]@!$&amp;'()*+,;=
    </p>
    <p>
      <c>ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%-._~:/?#[]@!$&amp;'()*+,;=</c>
    </p>
    <p>
      <url href="http://example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&amp;'()*+,;=" />
    </p>
    <p>
      <url href="http://example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&amp;'()*+,;=" visual="example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&amp;'()*+,;=" />
    </p>
    <p>
      <url href="http://example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&amp;'()*+,;=" visual="example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&amp;'()*+,;=">Characters to a footnote</url>
    </p>
  </blockquote>
  <p>
    Line-breaking in <latex />/PDF output is specialized,
    using path separators (slashes) as candidates for splitting across lines:
    <url href="http://example.com/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/long/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer/longer" />
  </p>
  <p>
    We are not fans of footnotes,
    they are totally unstructured.<fn>
    <url href="https://en.wikipedia.org/wiki/Carleson%27s_theorem" visual="">Carleson's Theorem</url>
    </fn> A URL in a footnote migrates around,
    and so care must be taken.<fn>
    <url href="http://example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&amp;'()*+,;=" />
    </fn> This paragraph has two footnotes,
    one with a real URL from Jesse Oldroyd,
    another with a fake URL from the above suite.
    For good measure,
    we repeat the URL found in the first footnote (which lacks its own footnote by design<fn>
    And if you do provide a link like
    <url href="https://en.wikipedia.org/wiki/Carleson%27s_theorem" visual="en.wikipedia.org/wiki/Carleson%27s_theorem">Carleson's Theorem</url>
    in a footnote, provide an easy-to-read reference,
    such as <c>en.wikipedia.org/wiki/Carleson%27s_theorem</c> since the extra footnote and any visual will be squelched.
    </fn>):
    <url href="https://en.wikipedia.org/wiki/Carleson%27s_theorem" visual="">Carleson's Theorem</url>.
    And we include a no-content version of the same link,
    with a visual version provided and employed:
    <url href="https://en.wikipedia.org/wiki/Carleson%27s_theorem" visual="en.wikipedia.org/wiki/Carleson%27s_theorem" />.
  </p>
</subsection>
The <url> element can be used to create an external reference. The mandatory @href attribute is the actual URL complete with the protocol (e.g. https://). Content for the element is optional, and if provided will be the “clickable” text. In this case, a @visual attribute can be provided, and this will become a footnote with a more friendly version of the URL. When no content is provided, the “clickable” will be the URL with a preference for an optional @visual. This subsection has some (extreme) tests and we leave complete documentation and full details for the PreTeXt Guide.
A long URL for testing: www.pcc.edu/enroll/registration/dropping.html#withdraw. Notice in the source that you do not put any tags inside the @href or @visual attributes, but you may need to provide XML escape sequences (see Subsection 8.1).
A <url> element with content will get a footnote, by containing the (simplified) URL in the highly-recommended @visual attribute. If you do not provide the @visual attribute in this case, then you will get the @href value repeated, possibly with some editing. If you insist, you can make the @visual attribute identical to the @href attribute. Some tests:
Here is a totally bogus URL, which contains every possible legal character, so if this fails to convert there is some problematic character. In order to test the use of a percent sign (%) in a URL, we follow it by two hex digits, specifically, 58, which is a way to represent the character X in a URL. Normal text, monospace text, <url> with just @href, <url> with @href and @visual, <url> with @href, @visual and content. Notice how the various versions do, or do not, line-break in /PDF output, including the (potentially confusing) use of a use of a hyphen in the normal text version
View Source for blockquote
<blockquote>
  <p>
    ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%-._~:/?#[]@!$&amp;'()*+,;=
  </p>
  <p>
    <c>ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%-._~:/?#[]@!$&amp;'()*+,;=</c>
  </p>
  <p>
    <url href="http://example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&amp;'()*+,;=" />
  </p>
  <p>
    <url href="http://example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&amp;'()*+,;=" visual="example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&amp;'()*+,;=" />
  </p>
  <p>
    <url href="http://example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&amp;'()*+,;=" visual="example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&amp;'()*+,;=">Characters to a footnote</url>
  </p>
</blockquote>
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%-._~:/?#[]@!$&’()*+,;=
ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%-._~:/?#[]@!$&'()*+,;=
Characters to a footnote
 5 
example.com/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789%58-._~:/?#[]@!$&'()*+,;=
We are not fans of footnotes, they are totally unstructured.
 6 
A URL in a footnote migrates around, and so care must be taken.
 7 
This paragraph has two footnotes, one with a real URL from Jesse Oldroyd, another with a fake URL from the above suite. For good measure, we repeat the URL found in the first footnote (which lacks its own footnote by design
 8 
And if you do provide a link like Carleson’s Theorem in a footnote, provide an easy-to-read reference, such as en.wikipedia.org/wiki/Carleson%27s_theorem since the extra footnote and any visual will be squelched.
): Carleson’s Theorem. And we include a no-content version of the same link, with a visual version provided and employed: en.wikipedia.org/wiki/Carleson%27s_theorem.

Subsection 8.9 Biological Names

View Source for subsection
<subsection>
  <title>Biological Names</title>
  <idx>biological names</idx>
  <idx><h>biological names</h><h>taxon</h></idx>
  <idx><h>scientific names</h><see>biological names</see></idx>
  <p>
    The <c>taxon</c>
        <idx>taxon</idx>
        <idx><h>biological names</h><h>taxon</h></idx>
    element can be used all by itself to get an italicized scientific name,
    as in <taxon>Escherichia coli</taxon>.
    It can also be structured with the elements <c>genus</c>
        <idx>genus</idx>
        <idx><h>biological names</h><h>genus</h></idx>
    and <c>species</c>,
        <idx>species</idx>
        <idx><h>biological names</h><h>species</h></idx>
    as in using both together in <taxon><genus>Cyclops</genus><species>kolensis</species></taxon>.
    Or the subelements can be used individually.
    Rules for capitalization are presently your responsibility as an author.
    Possible improvements include new subelements,
    attributes for database identifiers,
    and checks on capitalization.
    Also, we might automatically abbreviate the genus after first use.
  </p>
  <p>
    There is an attribute, <c>@ncbi</c>
        <idx>ncbi attribute</idx>
        <idx><h>attributes</h><h>ncbi attribute</h></idx>
        <idx><h>biological names</h><h>ncbi attribute</h></idx>
    that you can use on the <c>taxon</c> element to precisely identify the organism you are discussing using an identification number from the
    <url href="https://www.ncbi.nlm.nih.gov/" visual="www.ncbi.nlm.nih.gov">National Center for Biotechnology Information</url>.
    Their
    <url href="https://www.ncbi.nlm.nih.gov/taxonomy" visual="www.ncbi.nlm.nih.gov/taxonomy">taxonomy</url>
    is at <c>www.ncbi.nlm.nih.gov/taxonomy</c>.
    Right now, we do not do anything with this attribute,
    but things like links are certainly possible.
    See the source of this document to see it in use with <taxon ncbi="7229"><genus>Drosophila</genus><species>miranda</species></taxon> which could be used to construct a link to
    <url href="https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=7229" visual="www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=7229">further information via id number</url>
    or even
    <url href="https://www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?name=Drosophila+miranda" visual="www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?name=Drosophila+miranda">further information via just the name</url>.
  </p>
</subsection>
The taxon element can be used all by itself to get an italicized scientific name, as in Escherichia coli. It can also be structured with the elements genus and species, as in using both together in Cyclops kolensis. Or the subelements can be used individually. Rules for capitalization are presently your responsibility as an author. Possible improvements include new subelements, attributes for database identifiers, and checks on capitalization. Also, we might automatically abbreviate the genus after first use.
There is an attribute, @ncbi that you can use on the taxon element to precisely identify the organism you are discussing using an identification number from the National Center for Biotechnology Information
 9 
www.ncbi.nlm.nih.gov
. Their taxonomy
 10 
www.ncbi.nlm.nih.gov/taxonomy
is at www.ncbi.nlm.nih.gov/taxonomy. Right now, we do not do anything with this attribute, but things like links are certainly possible. See the source of this document to see it in use with Drosophila miranda which could be used to construct a link to further information via id number
 11 
www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?id=7229
or even further information via just the name
 12 
www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi?name=Drosophila+miranda
.

Subsection 8.10 Verbatim in titles, \a&b#c%d~e{f}g$h_i^j, OK

View Source for subsection
<subsection>
  <title>Verbatim in titles, <c>\a&amp;b#c%d~e{f}g$h_i^j</c>, OK</title>
  <p>
    You can test the migration of the <latex /> special characters in this section title by requesting a 2-deep Table of Contents via the publication file.
  </p>
</subsection>
You can test the migration of the special characters in this section title by requesting a 2-deep Table of Contents via the publication file.

Subsection 8.11 Special Situations

View Source for subsection
<subsection xml:id="subsection-special-situations">
      <title>Special Situations</title>
      <p>
        Sage defines a nice syntax for generators of algebraic structures,
        but we must remember to use an escape sequence for the &lt; symbol
        (see <xref ref="subsection-xml-escape" text="type-global" />).
      </p>
<sage>
<input>
P.&lt;t&gt; = ZZ[]
P
</input>
<output>Univariate Polynomial Ring in t over Integer Ring</output>
</sage>
      <p>
        There is an alternate Sage syntax,
        which avoids the less-than and greater symbols.
      </p>
<sage>
<input>
R = ZZ['u']
u = R.gen(0)
(u, R)
</input>
<output>(u, Univariate Polynomial Ring in u over Integer Ring)</output>
</sage>
      <p>
        Ampersands, less-than,
        and greater symbols are likely to be necessary in source code,
        such as Sage code
        (think generators of field extensions)
        or TikZ code
        (think arrowheads),
        and in matrices
        (think separating entries).
        If you have a big matrix, or a huge chunk of TikZ code,
        you can protect it all at once from the XML processor by wrapping it in <c>&lt;![CDATA[</c><nbsp /><nbsp /><nbsp /><c>]]&gt;</c>.
        It should be possible to write without ever using the
        <q>CDATA</q>
        mechanism, but it might get tedious in places to use the supplied macros or <init>XML</init> escape sequences.
        This construction is often mis-understood as a solution better remedied by reading <xref ref="subsection-xml-escape" text="type-global" /> again.
      </p>
      <p>
        We test the three pre-defined <latex /> macros for &amp;, &lt;, and &gt;
        with a pair of aligned equations:
        <md>
          <mrow>a^2 + b^2\amp\lt c^2</mrow>
          <mrow>c^2\amp\gt a^2 + b^2</mrow>
        </md>
      </p>
    </subsection>
Sage defines a nice syntax for generators of algebraic structures, but we must remember to use an escape sequence for the < symbol (see Subsection 8.1).
There is an alternate Sage syntax, which avoids the less-than and greater symbols.
Ampersands, less-than, and greater symbols are likely to be necessary in source code, such as Sage code (think generators of field extensions) or TikZ code (think arrowheads), and in matrices (think separating entries). If you have a big matrix, or a huge chunk of TikZ code, you can protect it all at once from the XML processor by wrapping it in <![CDATA[   ]]>. It should be possible to write without ever using the “CDATA” mechanism, but it might get tedious in places to use the supplied macros or XML escape sequences. This construction is often mis-understood as a solution better remedied by reading Subsection 8.1 again.
We test the three pre-defined macros for &, <, and > with a pair of aligned equations:
\begin{align*} a^2 + b^2\amp\lt c^2\\ c^2\amp\gt a^2 + b^2 \end{align*}

Subsection 8.12 Jupyter Notebook, Markdown, MathJax, Delimiters

View Source for subsection
<subsection xml:id="subsection-jupyter-dollars">
  <title>Jupyter Notebook, Markdown, MathJax, Delimiters</title>
  <p>
    A Jupyter notebook allows a mix of <init>HTML</init>
    (our logistical preference for a conversion)
    and Markown
    (another set of special characters and their escaped versions).
    Certain pairs of delimiters,
    when appearing in consecutive <init>HTML</init> <tag>code</tag> elements require extraordinary care.
    But the one nut we cannot crack is pairs of dollar signs.
    So the next paragraph is known to render badly in a Jupyter notebook,
    but should otherwise be a bit boring.
  </p>
  <p>
    <c>$</c> and <c>$</c>
  </p>
</subsection>
A Jupyter notebook allows a mix of HTML (our logistical preference for a conversion) and Markown (another set of special characters and their escaped versions). Certain pairs of delimiters, when appearing in consecutive HTML <code> elements require extraordinary care. But the one nut we cannot crack is pairs of dollar signs. So the next paragraph is known to render badly in a Jupyter notebook, but should otherwise be a bit boring.
$ and $

Subsection 8.13 Characters, Ligatures, and More

View Source for subsection
<subsection>
  <title><latex /> Characters, Ligatures, and More</title>
  <p>
    This section is just for testing,
    and the more you know about <latex />,
    the more we would encourage you to
    <em>not</em> to read this.
    Look to the Author's Guide for the <em>right</em>
    way to author your source.
  </p>
  <p>
    The ten reserved characters,
    directly in the source: # $ % ^ &amp; _ { } ~ \. And again: X#X$X%X^X&amp;X_X{X}X~X\X, but smashed up tight to intermediate characters.
  </p>
  <p>
    In a verbatim presentation: <c># $ % ^ &amp; _ { } ~ \</c>.
  </p>
  <p>
    And <c>X#X$X%X^X&amp;X_X{X}X~X\X</c>. (These verbatim versions are authored in different paragraphs to work around the Jupyter notebook bug described above.)
  </p>
  <p>
    We also disrupt certain constructions from <latex />.
    Attempting to sneak-in any traditional macro for the purposes of <latex />-only output, such as,
    say a \newpage,
    will fail since the leading backslash will be caught and converted to <c>\textbackslash</c>. (See?
    It just happened twice.) For technical reasons we want to particularly test \textbackslash, \textbraceleft,
    and \textbraceright.
  </p>
  <p>
    Four
    <q><tex /> ligatures</q>, <c>--</c>,
    <c>---</c>,
    <c>``</c>,
    and <c>''</c>,
    authored in running text, --, ---, ``, ''. It may be hard to tell that the two consecutive apostrophes have not coalesced into a curly left smart quote,
    but see below,
    the spacing is subtly different.
  </p>
  <p>
    We want the double quote mark from your keyboard,
    <c>"</c>,
    to not morph into some other character: "<nbsp />.
  </p>
  <p>
    More testing: runs of hyphens.
    Such as: - (one), -- (two), --- (three), ---- (four), ----- (five), ------ (six), -------
    (seven).
    Use the empty elements <tage>ndash</tage> and <tage>mdash</tage> for the longer dashes/hyphens.
  </p>
  <p>
    Runs of apostrophes should not become smart right double quotes: ' (one), '' (two), ''' (three), '''' (four), ''''' (five), '''''' (six), '''''''
    (seven).
    You might want to cut-and-paste these into a text file to convince yourself there are the right number of characters.
    Here are two smart right double quotes,
    separated by a non-breaking space,
    for visual comparison: <rq /><nbsp /><rq />.
    Or 30 apostrophes on a line of their own (longer) followed by 15 smart right double quotes
    (shorter).
  </p>
  <p>
    ''''''''''''''''''''''''''''''.
  </p>
  <p>
    <rq /><rq /><rq /><rq /><rq /><rq /><rq /><rq /><rq /><rq /><rq /><rq /><rq /><rq /><rq />.
  </p>
  <p>
    Runs of backticks
    (accent grave)
    should not become smart left double quotes when the output is processed by <latex />: ` (one), `` (two), ``` (three), ```` (four), ````` (five), `````` (six), ```````
    (seven).
    Furthermore,
    in a context where Markdown syntax is recognized as well (<eg /> a Jupyter notebook),
    paired backticks should <em>not</em>
    produce `inline verbatim text`.
  </p>
  <p>
    The next paragraph has a long run of words separated/joined by the keyboard forward-slash character.
    With this input, <latex /> will not line-break at the slash,
    nor will it hypenate anywhere.
    <pretext /> automatically provides an improved slash,
    which will line-break, as you should see below in <latex /> output.
    There is a bad right margin, but that is due to the absurdity of this test.
    This sort of problem should be no better or worse for the use of this character.
    Further refinements (zero-width space) and packages can be used to get hyphenation.
    <init>HTML</init> will line-break rationally with no extra help.
    Remember the <tage>solidus</tage> character for super-simple text fractions like 7<solidus />32
    (which will <em>not</em> line-break),
    and math elements or SI unit markup for technical work.
  </p>
  <p>
    A/test/of/some/short/words/that/go/off/the/end/of/a/line/A/test/of/some/short/words/that/go/off/the/end/of/a/line/A/test/of/some/short/words/that/go/off/the/end/of/a/line/A/test/of/some/short/words/that/go/off/the/end/of/a/line/A/test/of/some/short/words/that/go/off/the/end/of/a/line.
  </p>
</subsection>
This section is just for testing, and the more you know about , the more we would encourage you to not to read this. Look to the Author’s Guide for the right way to author your source.
The ten reserved characters, directly in the source: # $ % ^ & _ { } ~ \. And again: X#X$X%X^X&X_X{X}X~X\X, but smashed up tight to intermediate characters.
In a verbatim presentation: # $ % ^ & _ { } ~ \.
And X#X$X%X^X&X_X{X}X~X\X. (These verbatim versions are authored in different paragraphs to work around the Jupyter notebook bug described above.)
We also disrupt certain constructions from . Attempting to sneak-in any traditional macro for the purposes of -only output, such as, say a \newpage, will fail since the leading backslash will be caught and converted to \textbackslash. (See? It just happened twice.) For technical reasons we want to particularly test \textbackslash, \textbraceleft, and \textbraceright.
Four “ ligatures”, --, ---, ``, and '', authored in running text, --, ---, ``, ’’. It may be hard to tell that the two consecutive apostrophes have not coalesced into a curly left smart quote, but see below, the spacing is subtly different.
We want the double quote mark from your keyboard, ", to not morph into some other character: " .
More testing: runs of hyphens. Such as: - (one), -- (two), --- (three), ---- (four), ----- (five), ------ (six), ------- (seven). Use the empty elements <ndash/> and <mdash/> for the longer dashes/hyphens.
Runs of apostrophes should not become smart right double quotes: ’ (one), ’’ (two), ’’’ (three), ’’’’ (four), ’’’’’ (five), ’’’’’’ (six), ’’’’’’’ (seven). You might want to cut-and-paste these into a text file to convince yourself there are the right number of characters. Here are two smart right double quotes, separated by a non-breaking space, for visual comparison: ” ”. Or 30 apostrophes on a line of their own (longer) followed by 15 smart right double quotes (shorter).
’’’’’’’’’’’’’’’’’’’’’’’’’’’’’’.
”””””””””””””””.
Runs of backticks (accent grave) should not become smart left double quotes when the output is processed by : ` (one), `` (two), ``` (three), ```` (four), ````` (five), `````` (six), ``````` (seven). Furthermore, in a context where Markdown syntax is recognized as well (e.g. a Jupyter notebook), paired backticks should not produce `inline verbatim text`.
The next paragraph has a long run of words separated/joined by the keyboard forward-slash character. With this input, will not line-break at the slash, nor will it hypenate anywhere. PreTeXt automatically provides an improved slash, which will line-break, as you should see below in output. There is a bad right margin, but that is due to the absurdity of this test. This sort of problem should be no better or worse for the use of this character. Further refinements (zero-width space) and packages can be used to get hyphenation. HTML will line-break rationally with no extra help. Remember the <solidus/> character for super-simple text fractions like 7⁄32 (which will not line-break), and math elements or SI unit markup for technical work.
A/test/of/some/short/words/that/go/off/the/end/of/a/line/A/test/of/some/short/words/that/go/off/the/end/of/a/line/A/test/of/some/short/words/that/go/off/the/end/of/a/line/A/test/of/some/short/words/that/go/off/the/end/of/a/line/A/test/of/some/short/words/that/go/off/the/end/of/a/line.

Subsection 8.14 HTML and accidental mathematics

View Source for subsection
<subsection>
  <title><init>HTML</init> and accidental mathematics</title>
  <p>
    We render mathematics in web pages with the fantastic MathJax Javascript library.
    Simplifying just a bit, it recognizes <latex /> syntax within a page,
    takes control of that text, and replaces it wth nice fonts and formatting.
    Now, if you write about <latex /> you might well have some mathematics in your examples.
    Best practice would be to use verbatim text for that,
    and we mark off such text as being off-limits to MathJax.
  </p>
  <p>
    But if you are writing running text,
    then you can (accidentally) author some text which MathJax recognizes and converts to something
    (unintended).
    And if you are doing this intentionally,
    then you have ignored <pretext /> markup for mathematics,
    and are missing out on some features.
  </p>
  <p>
    A few tests that we can prevent any accidents.
  </p>
  <p>
    Inline mathematics: \(x^2\).
  </p>
  <p>
    Display mathematics: \begin{align}x^2+y^2=z^2\end{align}
  </p>
  <p>
    Double backticks is a common <latex /> construction,
    which in <latex />/PDF output <em>should not</em>
    become an opening quote-mark.
    Also, a single backtick in HTML is a signal for MathJax to interpret ASCIIMath,
    and then a double backtick causes
    <q>random</q>
    pieces of mathematics on a page to not render at all.
    So we have a quotation authored <latex />-style: ``We have nothing to fear,
    but fear itself.''
  </p>
</subsection>
We render mathematics in web pages with the fantastic MathJax Javascript library. Simplifying just a bit, it recognizes syntax within a page, takes control of that text, and replaces it wth nice fonts and formatting. Now, if you write about you might well have some mathematics in your examples. Best practice would be to use verbatim text for that, and we mark off such text as being off-limits to MathJax.
But if you are writing running text, then you can (accidentally) author some text which MathJax recognizes and converts to something (unintended). And if you are doing this intentionally, then you have ignored PreTeXt markup for mathematics, and are missing out on some features.
A few tests that we can prevent any accidents.
Inline mathematics: \(x^2\).
Display mathematics: \begin{align}x^2+y^2=z^2\end{align}
Double backticks is a common construction, which in /PDF output should not become an opening quote-mark. Also, a single backtick in HTML is a signal for MathJax to interpret ASCIIMath, and then a double backtick causes “random” pieces of mathematics on a page to not render at all. So we have a quotation authored -style: ``We have nothing to fear, but fear itself.’’