Skip to main content

The PreTeXt Guide

Subsection 5.2.2 Starting a New Project: pretext new

To generate a new book or article, from the folder in which you want to project located, type:
$ pretext new book
This creates a new book in the folder “new-pretext-project” (which you can safely rename). For a new article, use pretext new article.
Inside the “new-pretext-project” folder, you will find the following folders and files:
assets
A folder to place static (external) assets, such as images or data files, that you will include in your project, for example, with <image source="frog.jpg"/>.
generate-assets
A folder that will hold assets (such as images) generated from source, using the pretext generate command. You should not manually edit any contents of this folder.
publication
A folder to hold your publication files. One publication file is included, but you can have as many as you want. See Chapter 44.
source
A folder to hold all your PreTeXt source files. These are the main files you will edit to control the content of your project.
.gitignore
A file containing a list of folders and files that should not be tracked by git if you use it for version control.
project.ptx
An XML file called the project manifest. This specifies options for converting your source into different target outputs. We will describe the contents of this file in Subsection 5.2.7.
README.md
A file that you can use to describe your project.
requirements.txt
A simple text file that contains the version of the CLI that is initially used to build the project. If you upgrade the CLI, you will be warned to also update the version in this file once you know that things build as expected.
Once you build your project, you will get a folder called “output”. Do not edit the contents of this folder manually.