Objectives
At the end of this chapter, you’ll
- Become aware of the eleven PreTeXt Principles.
- Be able to identify several features of PreTeXt.
- Have a working GitHub Codespaces environment to suitable for authoring and editing in PreTeXt.
https://github.com/PreTeXtBook/pretext-codespace
to get started. Let this run for a few minutes in the background while you review the rest of this section.pretextbook.org/doc/guide/html/philosophy.html
pretext
element nests many other elements inside of it. This is accomplished by surrounding everything with a starting <pretext>
tag and an ending </pretext>
tag. (Folks with HTML experience will find this pattern familiar, akin to the “HTML” root element.)<?xml version="1.0" encoding="UTF-8"?>
<pretext>
<article>
<title>Hello world!</title>
<p>Welcome to PreTeXt!</p>
<!-- TODO: find something more to say... -->
</article>
</pretext>
<article>
s and <slideshow>
s. This tutorial will focus on <book>
s.<book>
typically includes <frontmatter>
, and <backmatter>
.<frontmatter>
, and <backmatter>
are either several <chapter>
s or <part>
s. If used, <part>
s are subdivided into <chapter>
s. Then <chapter>
s subdivide into <section>
s, and <section>
s can have <subsection>
s.<title>
, and may have an <introduction>
or <conclusion>
.<?xml version="1.0" encoding="UTF-8"?>
<pretext xml:lang="en-US">
<!-- (author configurations go in docinfo) -->
<docinfo>
<macros>
\newcommand{\R}{\mathbb R}
</macros>
</docinfo>
<book xml:id="my-great-book">
<title>My Great Book</title>
<subtitle>An example to get you started</subtitle>
<frontmatter xml:id="frontmatter">
<titlepage>
<author>
<personname>You</personname>
<department>Your department</department>
<institution>Your institution</institution>
</author>
<date>
<today />
</date>
</titlepage>
</frontmatter>
<chapter xml:id="chapter-welcome">
<title>Welcome!</title>
<introduction>
<p>This chapter is about the real numbers <m>\R</m></p>
</introduction>
<section xml:id="section-getting-started">
<title>Let's get started</title>
<p>Can you solve <m>ax^2+bx+c=0</m>?</p>
</section>
<section xml:id="section-learning-more">
<title>But wait, there's more!</title>
<p>Did you know that <me>x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}</me>?</p>
</section>
</chapter>
<backmatter xml:id="backmatter">
<title>Backmatter</title>
<colophon>
<p> This book was authored in <pretext />. </p>
</colophon>
</backmatter>
</book>
</pretext>
<p>
for short. If you’ve ever written HTML, this tag may be familiar to you, but be warned: while PreTeXt is XML (Section 2.3), PreTeXt is not HTML! There is some overlap: you can emphasize words or phrases with <em>
for instance. However, while HTML uses the full word “code” for its tag, PreTeXt uses the shortened <c>
tag.<term>
, we just defined, while we merely emphasized “meaning” with <em>
. The presentation of these concepts may vary by output format, likely using some combination of boldface, italics, or underlining.<m>ax^2+bx+c=0</m>
, while display mathematics like<me>x=\frac{-b\pm\sqrt{b^2-4ac}}{2a}</me>
. (Users from LaTeX will also appreciate that quotes are surrounded with <q>
in PreTeXt to handle the different way quotation marks are handled in LaTeX vs most other markup languages.)<ol>
and unordered <ul>
, nested as needed. Each list item is represented by <li>
.<definition>
s or <claim>
s.<statement>
, and Claim 2.5.2 additionally features a <proof>
.github.com/openmathbooks/comat/
github.com/openmathbooks/comat/blob/main/source/ch-intro.ptx
external/sheets/Fibonacci.xlsx
assets
folder, and is automatically put in external
when pretext build the file.assets
directory.<video>
element.camendesign.com/code/video_for_everybody/test.htm
True.
False.
https://stevenclontz.github.io/pretext-getting-started-2023/
, and the same document is available in a PDF format at https://stevenclontz.github.io/pretext-getting-started-2023/print/main.pdf
.