Conversion of existing files#

If you have a book that is already written in LaTeX or Microsoft Word format, there are options available to convert these to markdown.

LaTeX to Jupyter Book#

A python script has been developed to convert your LaTeX file to JB. It can be accessed here.

Steps to use the script#

Before converting your LaTeX files, it must be ensured that all chapters are in separate folders. Each chapter folder must contain a .tex file, which consists of the contents of the chapter. The folder can contain sub-folders to indicate sub-chapters which must follow a similar structure.

Once the repository has been cloned onto your local system, where your LaTeX book exists, the script can now be used for the conversion.

Note that each chapter must be individually converted using the script.

In ‘latextomarkdown.py’, edit the basepath in the main function to point to the folder of the chapter to be converted.

Then, run the script in the command line and provide the .tex filename as the argument.

python3 latextomarkdown.py myfirstchapter

Note that you only need to provide the file name without the .tex extension as shown above.

The markdown file (.md) will be generated and stored in the same folder alongside the .tex file.

PDF generation

Jupyter Book is able to generate a PDF. However, if you have a LaTeX file it is beter to construct your PDF from there.

Word to Jupyter Book#

For the conversion of Microsoft Word files to Jupyter Book, please contact us.