mathgen icon indicating copy to clipboard operation
mathgen copied to clipboard

Make Latex Build in Code optional

Open AitzazImtiaz opened this issue 3 years ago • 2 comments

To avoid user to download extra, un-necessary Latex packages, is it possible that MathGen just generates the Latex files with Perl and end the job? That'd be nice.

AitzazImtiaz avatar Sep 27 '22 22:09 AitzazImtiaz

You can run mathgen with the --dir=/foo/bar option, which will leave the source files in the /foo/bar directory (or --dir=. for the current directory). It will then attempt to run pdflatex on them, which will fail if you don't have it installed or are missing packages, but you could just ignore the error; the source files will still be there.

The option --mode=raw --output=file.tex will write the LaTeX source to file.tex and not attempt to run pdflatex at all, but it doesn't output the .bib file.

If you want to add such an option properly, it would just be a matter of having the program exit right after: https://github.com/neldredge/mathgen/blob/12f5e6056fd60fcfff530da8ffda846ee15f9549/mathgen.pl#L355

neldredge avatar Sep 28 '22 15:09 neldredge

Ty 😃 it helps

AitzazImtiaz avatar Oct 05 '22 07:10 AitzazImtiaz