PreTeXt
Write Once, Read Anywhere

Examples

In the examples directory of the PreTeXt distribution there are several examples. We include output for six of them here. To see examples of actual books (and other projects), see the Gallery at the main page of this site.

Showcase Article

The Showcase Article demonstrates the features of PreTeXt. It is not comprehensive, nor instructive. But you can browse it as part of evaluating PreTeXt, or as a source of ideas for your project. The source is also meant to be a demonstration and contains some comments that will help with implementation.

As of 2019-04-02 this is under construction. Knowledgeable PreTeXt authors are encouraged to add examples of their favorite features.

Sample Book

The sample-book is an example of how a book-length document can be authored and organized. It may have a run of chapters, or be structured into parts. The parts can be “structural”, where numbering of chapters restarts in each part, or “decorative”, where chapters are numbered consecutively throughout the book without regard for the parts.

The first version below has only chapters, and no parts. We have used it as an example of how to generate a Solution Manual as a PDF that could be distributed to instructors.

Chapters Only:

Structural Parts:

Decorative Parts:

Source:

Sample Article

The sample-article is both a developer's sandbox and the kitchen sink of the documentation. It is a sandbox because we frequently test new features here and sometimes also debug problems. So sometimes it contains some preliminary, or immature, examples. It is the kitchen sink because we try to add one of everything. This is both for testing, and so that you can look at output and then examine the source to see how to do something you like or need. There is even a special version of the online output that has copious "View Source" knowls that will show you the PreTeXt source for each division and many blocks

But it is cutting-edge and contains new features before they make it into the Author's Guide. As a testing platform, we bring the least powerful version of LaTeX to bear for creating the PDF, so this is always built using the pdflatex engine (in contrast to the font example below).

WeBWorK Sample Chapter

The WeBWorK sample-chapter contains examples of various ways to incorporate WeBWorK automated homework problems into your text. This work was initiated with a grant from OpenOregon with a matching grant from University of Puget Sound.

Humanities in Action

Humanities in Action showcases Jahrme Risner's summer project in 2016, funded by the Arts, Humanities, Social Sciences Summer Research for Undergraduates program at the University of Puget Sound.

Characters, Fonts, and Languages

Different languages and different scripts can get complicated fast. This is another sample document that is used both as a demonstration and for testing. Unicode characters generally work easily in HTML, so check the online version first to see what is possible. Since the various fonts can be quite demanding, we always create the PDF here from LaTeX by using the xelatex engine (in contrast to the sample article above).