Skip to main content

Section C.5 Pretext tags

Subsection C.5.1 Character Tags

Punctuation Tags.

info

<q> Use this tag to “quote something”

<sq> I you need ‘Single Quotes’ but don't use these for emphasis.

<lq/> Left quote all by itself “

<rq/> A right quote by itself: ” You can get these from the keyboard. ’‘”“

<lsq/> Left Single Quote: ‘

<rsq/> Right Single Quote: ’

<mdash/> An em dash: — Long dash See Usage rules

<ndash/> This is an en dash –, use it for ranges 2010–2020. Usage rules

<minus/> This is a minus: − in it

- this is the hyphen - straight from the keyboard, used for compound-words. Usage rulesUsage rules

<nbsp/> This is a paragraph with a   in it. It's invisible.

'

Nontrivial Characters.

This table from PreTeXt Guide.

Table C.5.1. Nontrivial Characters
To get this: Type this: To get this: Type this
<ellipsis/> <fillin/>
<icon name="gear"/> <icon name="wrench"/>
PrtScn <kbd>PrtScn</kbd> <kbd name="shift"/>
<ndash/> <mdash/>
® <registered/> © <copyright/>
<permille/> <pilcrow/>
§ <section-mark/> · <midpoint/>
<trademark/> <swungdash/>
× <times/> ± <plusminus/>
<solidus/> ÷ <obelus/>
& &amp; < &lt;
Icons.

The <icon> uses the @name to select from a number of available icons.

Table C.5.2. Icons
Name Icon Name Icon Name Icon
file-save arrow-left media-rewind
arrow-up arrow-right media-fast-forward
menu arrow-down media-skip-to-start
wrench media-stop media-pause
gear media-play media-skip-to-end
power
Keyboard Keys.

If you are writing a software manual, or writing about how to use a calculator as part of a science textbook, then you might want to make it very clear which keys to press on a keyboard. The <kbd> element can hold content like Z or Caps Lock and your output will have a very nice looking keyboard key with the desired label. For example, Z and Caps Lock. For keys labeled with graphics, like the arrow keys, instead of content, provide the @name attribute with a value from the following table. Request additions to this table if you are using this feature (2019-11-22).

Interestingly these work, though the <kbd> is not in the schema!

Type this: To get this: Type this: To get this:
<kbd name="left"/> <kbd name="right"/>
<kbd name="up"/> <kbd name="down"/>
<kbd name="enter"/> <kbd name="shift"/>
<kbd name="plus"/> + <kbd name="minus"/> -
<kbd name="times"/> × <kbd name="obelus"/> ÷
<kbd name="left-paren"/> ( <kbd name="right-paren"/> )
<kbd name="solidus"/> / <kbd name="inverse"/> x^-1
<kbd name="squared"/> x^2 <kbd>text</kbd> text

Subsection C.5.2 Inline Tags

Paired delimiters.

https://pretextbook.org/doc/guide/html/topic-paragraphs.html#topic-exceptional-characters

Subsection C.5.3 Expansions

Type <ad/> get this: AD

Type <am/> get this: AM

Type <bc/> get this: BC

Type <ca/> get this: ca.

Type <eg/> get this: e.g.

Type <etal/> get this: et al.

Type <etc/> get this: etc.

Type <fillin/> get this:

Type <ie/> get this: i.e.

Type <nb/> get this: NB

Type <pm/> get this: PM

Type <ps/> get this: PS

Type <viz/> get this: viz.

Type <vs/> get this: vs.

Type <today/> get this: September 3, 2020

Type <timeofday/> get this: 16:46:24 (-04:00)

Type <tex/> get this:

Type <latex/> get this:

Type <pretext/> get this: PreTeXt

Subsection C.5.4 Short Text Tags

<abbr>is for abbreviations, like stbd

<acro> is for acronyms like loran

<alert> is to alert you lorum ipsum

<angles> puts angle brackets around 〈things〉

<articletitle> for for article titles “Dewey Defeats Truman”

<attr> is for showing tag attributes @href

<c> is for code snippets y=1

<dblbrackets> yeah, like these: ⟦lorum ipsum⟧

<delete> marks deleted text lorum ipsum

<em> for emphasis lorum ipsum

<foreign> for foreign phrases bête noire

<init> is for initialisms, like FBD

<insert> for inserted text lorum ipsum

<pubtitle> for for publication titles My Little Pony

<q> for double quotes “lorum ipsum”

<sq> for single quotes ‘lorum ipsum’

<stale> for outdated text lorum ipsum

<tag> when you are talking about pretext tags, for <example>.

<tage> same for self closed tags <latex/>

<term> for setting of terms, like moment

<url>for hyperlinks lorum ipsum, needs link in a @href attribute.

Subsection C.5.5 Music Tags

There is good support for musical notation with these tags and attributes:

<sharp/> This is a paragraph with a ♯ in it.

<flat/> This is a paragraph with a ♭ in it.

<natural/> This is a paragraph with a ♮ in it.

<doubleflat/> This is a paragraph with a 𝄫 in it.

<doublesharp/> This is a paragraph with a 𝄪 in it.

This is a time signature. \(\begin{smallmatrix}4\\3\end{smallmatrix}\)

The <n> element is for notes \({}^♯1\)

there is a <scaledeg>: no idea what it is for \(\hat{1}\)

This is a <chord> which has many attributes and looks flexible.

There is a <score> tag, which is slated to be replaced with a general purpose interactive.

Subsection C.5.6 Labeled Paragraphs

Remark C.5.3.

remark surrounded by p .

Definition C.5.4. This is the title.

Statement

Warning C.5.5.

this is a warning, with a P in it

Computation C.5.6.
\begin{align*} \Sigma F_x \amp = 0\\ \amp A_x + B_x + C_x = 0\\ \amp - \frac{20}{36.1} A + \frac{30}{46.9} B + 0\, C = 0\\ A \amp= 1.15\, B \amp (1)\\\\ \Sigma F_z \amp= 0\\ \amp A_z + B_z + C_z = 0\\ \amp 0\, A + \frac{20}{46.9}B -\frac{20}{36.1} C = 0\\ C \amp= 0.769 \,B \amp (2)\\\\ \Sigma F_y \amp= 0\\ \amp A_y + B_y + C_z + D = 0\\ \amp -\frac{20}{36.1} A -\frac{30}{46.9} B - \frac{30}{36.1} C + 900 = 0\\ \amp 0.555\, A + 0.640\, B + 0.831\, C = \lb{900} \amp (3) \end{align*}

Subsection C.5.7 Special Purpose Tags

<taxon> for taxonomies can contain <genus> and <species> or plain text

Genus Species or lorum ipsum

Subsection C.5.8 Preformatted and Code

<pre> Preformatted text

L          TE
  A       A
    C    V
     R A
     DOU
     LOU
    REUSE
    QUE TU
    PORTES
  ET QUI T'
  ORNE O CI
   VILISÉ
  OTE-  TU VEUX
   LA    BIEN
  SI      RESPI
          RER       - Apollinaire

<listing> contining a <program> There is a @language but it doesn't seem to do syntax highlighting.

const video = document.getElementById('webcam');
const liveView = document.getElementById('liveView');
const demosSection = document.getElementById('demos');
Listing C.5.7. a listing containing a program

<cd> Code Display

The <cd> is an analog to <md>, which displays a line of code embedded in a <p> paragraph. For example, this paragraph contains a line of a program

const demosSection = document.getElementById('demos');

and then some more text.

Subsection C.5.9 List of tags

  1. <abbr>
  2. <answer>
  3. <appendix>
  4. <aside>
  5. <backmatter>
  6. <book>
  7. <c>
  8. <caption>
  9. <cell>
  10. <chapter>
  11. <col/>
  12. <conclusion>
  13. <creator>
  14. <em>
  15. <etc/>
  16. <example>
  17. <exercise>
  18. <exercises>
  19. <figure>
  20. <fn>
  21. <foreign>
  22. <hint>
  23. <icon/>
  24. <ie/>
  25. <image>
  26. <input>
  27. <instructions>
  28. <interactive>
  29. <introduction>
  30. <investigation>
  31. <latex/>
  32. <latex-image>
  33. <li>
  34. <license>
  35. <line>
  36. <list>
  37. <lq/>
  38. <m>
  39. <mag>
  40. <md>
  41. <mdash/>
  42. <mdn>
  43. <me>
  44. <men>
  45. <mrow>
  46. <note>
  47. <objectives>
  48. <ol>
  49. <output>
  50. <p>
  51. <paragraphs>
  52. <per/>
  53. <pre>
  54. <pretext/>
  55. <pretext>
  56. <pubtitle>
  57. <qty/>
  58. <qty>
  59. <quantity>
  60. <question>
  61. <remix>
  62. <row>
  63. <rq/>
  64. <sage>
  65. <section>
  66. <sidebyside>
  67. <slate>
  68. <solution>
  69. <source/>
  70. <stack>
  71. <statement>
  72. <subsection>
  73. <subsubsection>
  74. <table>
  75. <tabular>
  76. <tag>
  77. <tag/>
  78. <task>
  79. <term>
  80. <title>
  81. <ul>
  82. <unit/>
  83. <url/>
  84. <url>
  85. <video/>
  86. <warning>
  87. <xref>