PreTeXtBook / pretext-cli

Command line interface for quickly creating, authoring, and building PreTeXt documents.
https://pretextbook.org
GNU General Public License v3.0
17 stars 18 forks source link

"method" argument to specify LaTeX engines #194

Closed rbeezer closed 2 years ago

rbeezer commented 2 years ago

I need latex-source -> DVI via latex only for an experimental "internal" process.

So the crude pretext/pretext interface is only recognizing pdflatex and xelatex as "methods".

I've tried to organize the changes so you only need to adjust two signatures to allow a method argument. Wasn't so easy to separate, but should be clear here:

https://github.com/rbeezer/mathbook/commit/99f07bb5bee71e09d57ddac9a68bd35a343f120c

If I did it right, you don't need to think about the deprecation, its all internal and transparent.

StevenClontz commented 2 years ago

Implemented hardcoded to "xelatex" at https://github.com/PreTeXtBook/pretext-cli/commit/3f6c2c7ad7e5d2cd03035fcf08446ee3c0c163c7 then allowing configuration at https://github.com/PreTeXtBook/pretext-cli/commit/6751c1a92c6fc50e9f00b926ea60a61ec7e3f345

At the end of they day, I created a @pdf-method attribute which contains whatever you expect as for the method argument of pdf and latex_image_conversion. Note that @pdf-method was chosen to be more semantic to authors while not straying too far from the "method" name used in core: it's the method of creating PDFs from LaTeX course. I'm not rushing out an RC in case @rbeezer or @oscarlevin wish to suggest something else. (I still need to figure out how to get Asymptote diagrams building without warnings, or remove support for it from the CLI.)