# More on PreTeXt

A few more notes here before I forget (I’ve been forgetting to do a lot of things nowadays…).

1. I spent hours figuring out why my svg files were not cropping properly via the pdfcrop utility. First I installed Perl because the logs for pdfcrop were telling me it couldn’t find the script engine…but even after installing Perl it still didn’t work. When I tried calling pdfcrop on the command line it worked though and cropped my TikZ image properly. It took this post for me to try reinstalling pdfcrop on MiKTeX and rearranging my PATH variables—specifically putting the ghostscript location at the end.

2. It also took a while to get the pretext script itself working (the script goes through the XML files and generates tex, then pdf, then svg files of all TikZ images). Some of the confusion was due to the existence of the script pretext.py and pretextbook.py on PyPI, which I thought I had to install. Plus the old Author’s Guide referred to this mbx script which I couldn’t find in the cloned repository.

I eventually realized I had to run the pretext script inside the pretext folder, and uninstalled the extra scripts I had downloaded. Git Bash wouldn’t let me execute python at first and I had to fix some of my PATH variables here before I could finally run the pretext script.

Finally I got everything working. This was yesterday.

I spent most of today on file management—creating supplementary xml files that could be included within the main file using XInclude.

Today a colleague pointed me to the CLP textbooks when suggesting texts for F/W Calculus, and I couldn’t be happier that I actually invested the time to learn this. Now it doesn’t seem so farfetched to adapt these texts to our use case in the Fall! (Hooray for OER!)

Note: I also just realized that I’ll for sure need a PDF version of any texts, for offline use. Duh! EPUB would be nice too as I mentioned in my previous post, but less relevant (I guess?).