Skip to main content

The PreTeXt Guide

Section N.2 Transferring files

In your original project, you probably have one folder containing your PreTeXt source, and you may have other folders containing external files, such as images, or code for interactive elements. If you use additional XSL, such as a LaTeX style sheet, you may have a folder for those files as well.
You want to copy your files as follows:
  1. Copy all of your PreTeXt source files into PROJECT-CLI/source.
    If you already have a file called main.ptx, it is fine to let this file overwrite the one created by the pretext init command. If you do not have such a file, you can either delete main.ptx, or rename your top-level file to main.ptx.
    Note: if you do not end up with a file called main.ptx, or if your file with this name is not your top-level file, see Section N.3 for details on how to edit the project.ptx file accordingly.
  2. Copy each folder containing external assets such as images into the assets folder. Note that you want to copy the folders and not the contents of those folders. This should result in folders such as PROJECT-CLI/assets/images.
  3. If applicable, copy over your xsl folder, and any other relevant folders. But do not copy over your output or publication folders.