This repository is the interim source code for the PreTeXt Basics Reference, which is a example-heavy reference for the basic features of PreTeXt.
The official HTML and PDF output are available was part of The PreTeXt Guide on the PreTeXt website.
This repository is primarily being used at this time to expedite the indexing process.
If you'd like to contribute to the PreTeXt Basics Reference, please
fork and clone this repository, setting your clone as origin
and
this repository as upstream
. After pushing your edits to a branch on
your repository, create a pull request here. We suggest you consult
David Farmer's git
checklists
for how to do this. The ones for forking and contributing a correction
should suffice.
This project comes with a primitive Makefile
to function as its
build script. Start by following the instructions in
Makefile.paths.original
on how to configure the necessary paths for
your computer. Because the project uses WeBWorK problems, you must
first run make pbr-extraction
. Then you can use make html
to
create the HTML output and make pdf
to create PDF output via LaTeX.
While editing on your fork, you can just run make html
and make pdf
unless you add, remove, or modify a WeBWorK exercise. If you make
an edit that impacts WeBWorK, run make pbr-extraction
and then make html
and/or make pdf
.
xml:id
usagexml:id
s to all divisions and listings (at a minimum).xml:id
s begin with "basics".ch
for chapter, s
for section, ss
for subsection, l
for listing, and fig
for figure when constructing xml:id
s.xref
to another portion of the Basics Reference can be done via something like <xref ref="basics-ch-exercises"/>
.The <pubtitle>Author's Guide</pubtitle> (<xref ref="topic-cross-referencing"/>) goes into greater detail
is the preferred style of making an xref
out of the Basics Reference.p
, you are expected to put your code snippet in a separate file with extension .ptx
.xi:include
twice, once with @parse="text"
(always within a listing) and once without setting @parse
. This allows the reader to see how the code is rendered by the PreTeXt converters.idx
tags to existing portions of the Basics Reference while this bullet remains in the README.md
file.listing
are required to have at least two index entries. One should have main heading <pretext/> code for
and subheading that identifies what it is the PreTeXt code for. The second must have the appropriate main heading to identify what the sampmle code for and subheading <pretext/> code for
.see
and seealso
liberally in your indexing. Try to think of any other (nontechnical) terms someone might use to look up an idea and put the appropriate see
entry in the index. For instance, we have "problem" as an index heading with with "as homework" as the subheading. This points the reader to see exercise.<tag>
or <attr>
as appropriate. Also ensure that you use @sortby
in these cases, as otherwise the index isn't sorted correctly. For instance, you might use something like <idx sortby="example"><tag>example</tag></idx>
to create a top-level index entry for the PreTeXt example tag.<see>
or <seealso>
to point to a "-like" category, use only the portion that does not list the tags (e.g., <see>example-like elements</see>
. For the top-level <pretext/> code for
index entry, the subheading for a "-like" element should be comprehensive: <idx><h sortby="pretext code for"><pretext/> code for</h><h>example-like elements (<tag>example</tag>, <tag>problem</tag>, <tag>question</tag>)</h></idx>
. This allows a user of the index to scan and realize that if they want to create a <question>
element, then they can copy the listing given for the example-like elements and change example
to question
.