Section C.5 Pretext tags
Subsection C.5.1 Character Tags
Punctuation Tags.
<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.
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/> |
& | & |
< | < |
Icons.
The <icon>
uses the @name
to select from a number of available 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: TeX
Type <latex/>
get this: LaTeX
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.
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.
<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
<abbr>
<answer>
<appendix>
<aside>
<backmatter>
<book>
<c>
<caption>
<cell>
<chapter>
<col/>
<conclusion>
<creator>
<em>
<etc/>
<example>
<exercise>
<exercises>
<figure>
<fn>
<foreign>
<hint>
<icon/>
<ie/>
<image>
<input>
<instructions>
<interactive>
<introduction>
<investigation>
<latex/>
<latex-image>
<li>
<license>
<line>
<list>
<lq/>
<m>
<mag>
<md>
<mdash/>
<mdn>
<me>
<men>
<mrow>
<note>
<objectives>
<ol>
<output>
<p>
<paragraphs>
<per/>
<pre>
<pretext/>
<pretext>
<pubtitle>
<qty/>
<qty>
<quantity>
<question>
<remix>
<row>
<rq/>
<sage>
<section>
<sidebyside>
<slate>
<solution>
<source/>
<stack>
<statement>
<subsection>
<subsubsection>
<table>
<tabular>
<tag>
<tag/>
<task>
<term>
<title>
<ul>
<unit/>
<url/>
<url>
<video/>
<warning>
<xref>