Skip to main content

Section 35.3 PG Macros from the PreTeXt Source

The project's WeBWorK exercises may rely on PG macros that are written into the project's source. For example, the exercises might have TikZ images that rely on <docinfo/latex-image-preamble> with @syntax set to PGtikz.

For this, a PG macro library file must be built and placed in the host course's templates/macros/ folder before attempting to process the WeBWorK exercises. To build this macro library, run:

        pretext -c pg-macros aota.ptx
      

aota.ptx in the example is the root file for your PreTeXt project. You could also specify a location to place the resulting macro library file:

        pretext -c pg-macros -d some/file/path aota.ptx
      

Once you have the macro library file, upload it to the host WeBWorK course's templates/macros folder. If your project relies on the AIM WeBWorK server and you need to supply a macro library file to a host course on that server, post to pretex-support@googlegroups.com and we can help with that.