Sample Subsection Structure: sub-demo.
This is rendered subsection content with inline math \(E=mc^2\) and a cross-reference to ChapterΒ 6.
ποΈ Linked Notes: SectionΒ 6.3
202606012315 | pretext xml authoring syntax
pretext contains docinfo and book (or article), which hierarchically nests part, chapter, section, subsection, and division blocks like introduction, paragraphs, and conclusion.
<pretext>
<docinfo> ... </docinfo>
<book xml:id="my-book">
<title>Book Title</title>
<chapter xml:id="ch-demo">
<title>Chapter Title</title>
<section xml:id="sec-demo">
<title>Section Title</title>
<introduction>
<p>
<tag>202606012315</tag> |
<tag>topic</tag>
</p>
</introduction>
<subsection xml:id="sub-demo">
<title>Subsection</title>
<p>Content with <m>E=mc^2</m> and <xref ref="ch-demo"/>.</p>
</subsection>
<conclusion>
<p>ποΈ <alert>Linked Notes:</alert> <xref ref="other-note"/></p>
</conclusion>
</section>
</chapter>
</book>
</pretext>
p) to style text, emphasize notation, or attach metadata.
| Element | Usage | Example Output |
|---|---|---|
m |
Inline Math (LaTeX) | \(E = mc^2\) |
tag |
Semantic Tags (Metadata Pill) | quantum mechanics |
c |
Inline Code / Verbatim | git status |
em |
Emphasis (Cooler Blue / Italic) | Nuance |
term |
Defined Term (Orange Gradient) | Bivector |
strong |
Strong Emphasis (Prominent Cyan) | Key Term |
alert |
Metadata labels (Glassmorphic Pill) | Warning! |
em class="alert" |
Critical Emphasis (Blue Gradient) | Important! |
xref |
Cross-reference | See SectionΒ 6.3 |
url |
Hyperlink | PreTeXt Official Site |
topology and geometry.
<p>
In this passage we define a <term>topological manifold</term>
with dimension <m>n</m>, noting that <strong>boundary conditions</strong>
require careful analysis (see <alert>Key Principle</alert>).
Metadata includes <tag>topology</tag> and <tag>geometry</tag>.
</p>
m>...</m for inline LaTeX formulas such as \(\psi(x) = \langle x | \psi \rangle\) or \(e^{i\pi} + 1 = 0\text{.}\)
md with mrow for single-line display equations (the standalone me and men tags are deprecated in recent PreTeXt releases). Add number="yes" on md or an xml:id on mrow to enable numbering.
<md number="yes">
<mrow xml:id="eq-schrodinger">i\hbar\frac{\partial}{\partial t}\Psi(\mathbf{r}, t) = \hat{H}\Psi(\mathbf{r}, t)</mrow>
</md>
md with multiple mrow lines and alignment tabs \amp (or & in raw XML):
<md>
<mrow>\nabla \cdot \mathbf{E} \amp = \frac{\rho}{\epsilon_0}</mrow>
<mrow>\nabla \times \mathbf{E} \amp = -\frac{\partial \mathbf{B}}{\partial t}</mrow>
<mrow>\nabla \cdot \mathbf{B} \amp = 0</mrow>
<mrow>\nabla \times \mathbf{B} \amp = \mu_0 \mathbf{J} + \mu_0 \epsilon_0 \frac{\partial \mathbf{E}}{\partial t}</mrow>
</md>
| Category | Elements | Description |
|---|---|---|
| Structure & Divisions |
pretext, book, part, chapter, section, subsection, appendix
|
High-level hierarchical document organization and divisions. |
| Divisional Blocks |
introduction, conclusion, paragraphs
|
Opening context, summaries, and unnumbered paragraphs groupings. |
| Semantic Blocks |
theorem, lemma, definition, example, axiom, remark, project
|
Formal mathematical environments defined in Chapter 15 (see dedicated Blocks subsection). |
| Technical & Figures |
program, image, table, tabular, figure, sidebyside
|
Code listings, data tables, images, PreFigure widgets, and side-by-side layouts. |
| Lists |
ul, ol, dl
|
Unordered bulleted, ordered numbered, and description/definition lists. |
| Backmatter & Indexing |
idx, references, biblio, glossary, colophon
|
Alphabetical index terms, citations, glossary items, and document metadata. |
introduction, blockquote, or paragraphs.
202606012315|quantum mechanics,linear algebra| Interactive:π Graph Node
<!-- Introduction Metadata Block -->
<introduction>
<p>
<tag>202606012315</tag> |
<tag>quantum mechanics</tag> <tag>linear algebra</tag>
</p>
</introduction>
<!-- Or using a Blockquote (always visible) -->
<blockquote>
<p>
<tag>202606012315</tag> |
<tag>quantum mechanics</tag>
</p>
</blockquote>
YYYYMMDDHHMM or YYYYMMDDNNNN timestamps. The first tag in an introduction or blockquote is automatically styled as a glowing purple glassmorphic Note ID badge. Subsequent tags render as cyan topic pills.
alert tags for metadata labels (e.g. Linked Notes, References), which render as glassmorphic pills and populate the D3.js knowledge graph.
ποΈ Linked Notes: SectionΒ 6.3π References: ChapterΒ 6
<conclusion>
<p>
ποΈ <alert>Linked Notes:</alert> <xref ref="sec-pretext" />
</p>
<p>
π <alert>References:</alert> <xref ref="ch-cheat-sheets" />
</p>
</conclusion>
li><title>...</title></li) are styled in prominent cyan heading typography. Use assemblage blocks for standalone concept takeaways and key formulas.