Write Once, Read Anywhere


A lightweight XML application for authors of research articles, textbooks and monographs.

The best of DocBook, LaTeX, and HTML.

Outputs: print, PDF, web, and soon, EPUB, Jupyter Notebooks, …

(Before June 2017, PreTeXt was called “MathBook XML”, so many of those references remain.)


Authors, readers, and developers congregate on Google Groups (in addition to GitHub issues). The support forum is the easiest, quickest, most accurate way to get help from experienced authors, even if you are just starting out, and have only read the Author's Guide once.

The inactive mathbook-xml-support group can be searched for old questions and their answers.


Fork the repository at GitHub (GPL license).

OR, install git on your system, then at a command line: git clone
cd mathbook
git checkout dev
And then it is easy to update, and you should do this regularly (daily): git pull

You can download a zip file of the dev branch for initial experiments, but it will very quickly become out-of-date, so this is not recommended. Take the time to setup and become comfortable with “pulling” as described above.


The Gallery contains links to a variety of projects authored in PreTeXt. You can get a sense of the possibilities, and where authors have public source, you can look to see how certain constructions are authored.


Sage-Enabled Textbooks, Robert Beezer. Sage Days 88: Opening Workshop for a Year of Coding Sprints, Institute for Mathematics and Its Applications, University of Minnesota, August 2017.

Authoring Online Open Textbooks with MathBook XML, Robert Beezer, David Farmer. Second International Conference on Mathematics Textbook Research and Development, Rio de Janiero, Brazil, May 2017.

Open Software and Open Textbooks for Mathematics, Robert Beezer. Korean Mathematical Society Invited Lecture, Annual Spring Meeting of the Korean Mathematical Society, Chosun University, Gwangju, Korea, April 2017.

Textbooks for the Web from MathBook XML, Robert Beezer. Presentation from the 2017 US Joint Mathematics Meetings as the WEBSIGMAA Guest Lecture. A good introduction to open textbooks and PreTeXt. Includes more technical details than usual, with a good example of source XML converted to LaTeX and HTML. To mimic the demonstration portion of the talk, explore the online version of Tom Judson's Abstract Algebra: Theory and Applications.

WeBWorK-MathBook XML Bridge, Robert Beezer, Alex Jordan. A project from Summer 2015 to incorporate WeBWork problems into PreTeXt documents, supported by and the University of Puget Sound. Report of the project's work in a streaming webinar, along with plenty of technical hiccups, especially a gap from about 34 minutes to 43 minutes. December 2015.

Mathematics Department Colloquium, Robert Beezer. University of Manitoba, Manitoba, Canada. May 2015.

Overview talk at Sage Edu Days 6: Part 1  Part 2, Robert Beezer. June 2014.

History talk at University of Puget Sound Math/CS Department Seminar: Modern Textbooks for Modern Times, Robert Beezer. September 2014.


National Science Foundation
A two-year $700,000 grant has been awarded to the UTMOST Project through the NSF Improving Undergraduate STEM Education program. (Award No. 1626455) The project will perform an educational research study into the design and use of online textbooks with embedded computational examples. (September 2016–August 2018)

University of Puget Sound
Arts, Humanities, Social Sciences Summer Research for Undergraduates Summer 2016. Jahrme Risner is a Mellon Humanities Research Scholar and his project is to add support to PreTeXt for various features that will be useful for arts and humanitites scholars. Examples include: poetry, bibliographies, musical scores, historical timelines, font support, and translations.

American Institute of Mathematics
Author workshop, April 25-29, 2016.

University of Puget Sound
Course Release Unit Grant, Spring 2016, for PreTeXt development.

OpenOregon and University of Puget Sound
“Enabling Successful, Accessible OER in Mathematics with a WeBWorK-MathBook XML Bridge”, with Alex Jordan, Michael Gage, Goeff Goehle, Summer 2015. Funding from Oregon Community College Distance Learning Association with a matching grant from the University of Puget Sound. [Web Version] [PDF]

Michael Doob and the The University of Manitoba
“Faculty of Science Online and Blended Learning Development Grant,” Summer 2015.

University of Puget Sound
Course Release Unit Grant, Spring 2014, for textbook writing, which aided design decisions.

Shuttleworth Flash Grant
Initial support, Summer and Fall 2013.

Undergraduate Teaching of Mathematics and Open Software and Textbooks, National Science Foundation (Grant No. DUE-1022574), Summer 2013.