Document Compilation¶
Once a configuration file has been created describing the document to be built and how to build it, the document can be compiled using the pygacity build command. This command reads the configuration file, generates the necessary LaTeX code, and compiles the document. During this process, if any python code is included in the document using pythontex, it will be executed and the results will be incorporated into the final document.
For a configuration file my_config.yaml, the command to build the document is:
pygacity build my_config.yaml
This will produce the final document in PDF format (or other specified formats) in the output directory specified in the configuration file.
By default, if an output directory is not specified, the document will be generated in a subdictory named build/ in the current working directory. By default, pygacity generates several outputs in the build directory. For example, if job-name is set to Assignment, the following files will be generated:
build/
├── Assignment.pdf # Final document
├── Assignment_soln.pdf # Final document with solutions
├── buildfiles.zip # Files created by the build process
├── .cache/ # Cache directory (may be empty)
│ └── ... # Cached files (if any)
├── solnbuildfiles.zip # Files created by the solution build process
└── tex_artifacts.zip # Any LaTeX code files generated by pygacity
When building multiple versions of a document (i.e., when copies is greater than 1), each version will be generated with a unique serial number appended to the job name. For example, if job-name is set to ExamI and copies is set to 3 (and seed is set to 12345) , the following files will be generated:
build
├── answerset_buildfiles.zip
├── answerset.pdf
├── buildfiles.zip
├── .cache
│ ├── answers-11364882.pkl
│ ├── answers-50082762.pkl
│ └── answers-65917772.pkl
├── ExamI-11364882.pdf
├── ExamI-50082762.pdf
├── ExamI-65917772.pdf
├── ExamI_soln-11364882.pdf
├── ExamI_soln-50082762.pdf
├── ExamI_soln-65917772.pdf
├── solnbuildfiles.zip
└── tex_artifacts.zip
Note the three unique exam versions and their accompanying solution documents, each with a unique serial number. Note also the file answerset.pdf, which contains all of the answers for all versions of the exam in one document for easy reference. Finally, note the cached answer files in the .cache/ directory, which store the generated answers for each version of the exam in case one needs to generate a new answer set.