Write Once, Read Anywhere

Conversion from LaTeX

As part of the UTMOST project, we offer a service to help convert existing textbooks from LaTeX to PreTeXt. The service is free if you are planning to release your book with an open license. The conversion will only be 95 percent correct, but that means it will take you 20 times less effort than converting it yourself.
Before converting your book, familiarize yourself with PreTeXt to the point of being able to compile the sample article and sample book into HTML and PDF. Check that you can edit the source files and the resulting output files behave as expected. That way, you will be on familiar ground when you finish the last 5 percent of the conversion.
The actual conversion will be done by David Farmer from the American Institute of Mathematics. The first hurdle is to get your LaTeX files to David. The preferred method is:
  1. Put your entire LaTeX source into a GitHub repository. Do not edit or restructure in any way, nor provide just a subset for “testing,” since this only complicates the process. You do not need to include the image files.
  2. If the repository is private, make David a collaborator so he can access it. (GitHub username: davidfarmer.)
  3. Email with your request for conversion, including the URL of your repository and a brief description of your project.
  4. When the first draft of the conversion is ready, you will receive a pull request from David via GitHub. Go ahead and accept it, and now your repository will have new files that are the PreTeXt source.
  5. Spend some time to review the files carefully, looking for consistent mis-interpretations of your intent. Convert to HTML and PDF and see how they look. There may be some back-and-forth with you explaining what your LaTeX was trying to do, and David improving the conversion to PreTeXt.
  6. At some point it will be up to you to take ownership of the PreTeXt source and finish the conversion.
This service is for authors who wish to consider having PreTeXt as the “official” source of their textbook. It is not feasible to maintain LaTeX source and expect to have all of the features of PreTeXt.

Conversion from Pandoc Formats

Oscar Levin has written a custom writer in Lua for Pandoc. This means that any format Pandoc is able to read may then be written out as PreTeXt. Pandoc will read Word, Markdown, LaTeX, DocBook, JATS, TEI Simple, and more.
Clone Oscar’s pandoc-pretext repository to get started. Note that not every construct of every format will have an analogue in PreTeXt, so this tool should be viewed as an aid for initiating a permanent conversion from a legacy format.

Conversion from Jupyter Notebooks

Virgil Pierce has written a Jupyter notebook with routines that will convert other Jupyter notebooks into PreTeXt. Find it in the virgilpierce/jpconvert GitHub repository.
Virgil welcomes contributors who would like to improve this tool.