PreTeXtBook / pretext

PreTeXt: an authoring and publishing system for scholarly documents
https://pretextbook.org
Other
254 stars 202 forks source link

Ensure Asymptote generation runs in background using local method #2149

Closed sean-fitzpatrick closed 1 month ago

sean-fitzpatrick commented 1 month ago

In some environments (in particular, Windows), Asymptote defaults to the -V option when generating images. The assumption is that the user will want to see their output when it is created.

This isn't ideal when you are building a textbook with 300 Asymptote diagrams. Every single image will open in your web browser, so you can forget about using it until Asymptote generation is done. I suspect this is also not ideal on systems with limited memory.

This adds the -noV option to the Asymptote command to ensure that every format, on every OS, is generated silently.

I've tested it on Windows against APEX and it ran as expected. However, someone should check to see if I have chosen the best spot to place the -noV option.

rbeezer commented 1 month ago

Thanks!

sean-fitzpatrick commented 1 month ago

Thanks! I'll test on Windows when I get a chance. Without the -noV option it's mildly annoying to build on Windows: 300 figures means 30 minutes or so of having an image open in your web browser every few seconds!