Is there a way to add a tag to a LaTeX document? Something that allows one to omit it from mass compilation?
Say I have three .tex files, formulas, math-notes, and artwork.
Would there be a way to tag them as follows, for example,
formulas.tex -> math, graphics
math-notes.tex -> math
artwork.tex -> graphics
such that I could ask LaTeX (pdfLatex specifically) to compile only the documents with a certain tag? e.g. pdflatex --tag math .* would compile only the formulas and math-notes in that directory into one pdf.
I know you can do this manually by simply \includeing certain files in a new .tex file, but is there a way to automate this in a way that the command line LaTeX understands, so one could compile many files at once?
\jobnameto make it controllable from the command line. – Marcel Krüger Jul 01 '21 at 19:01for i in *notes*.tex; do pdflatex "$i"; donewould latex them all – David Carlisle Jul 01 '21 at 19:10latexmk -pdf *notes*.tex– daleif Jul 01 '21 at 19:17