Skip to content
Snippets Groups Projects
Commit c0b784a0 authored by Vasco Wild's avatar Vasco Wild
Browse files

Change print flag to -print

parent 9e31cd14
No related branches found
No related tags found
No related merge requests found
......@@ -135,8 +135,8 @@ print: $(tex_print_pdfs) # Builds a print Version from all *.tex files.
# In the cookbook.tex is defined that when jobname contains print
# the print version is made
%print.pdf: %.tex # Get the print version of the tex file
@$(LATEXMK) $(LATEXMK_FLAGS) --jobname='%Aprint' $<
%-print.pdf: %.tex # Get the print version of the tex file
@$(LATEXMK) $(LATEXMK_FLAGS) --jobname='%A-print' $<
PANDOC_TEMPLATE = $(strip $(shell grep "^template:" pandoc/defaults.yaml | cut --delimiter=":" --field=2)).latex
PANDOC_TEMPLATE_DIR = ~/.pandoc/templates
......
......@@ -17,17 +17,18 @@
% The variable \jobname is used, because it is the only one which can be passed
% to a latex job.
% https://tex.stackexchange.com/questions/5228/can-one-tex-file-output-to-multiple-pdf-files
% If this variable is set to print, the print variable is set true and the print version is made.
% If \jobname is set to -print, the local print variable is set true and the print version is made.
% If it isn't set or something else, the print variable is set false and the normal version is made.
% The command to receive the print version: latexmk -jobname=print
% We thereby use -print as "key" to avoid printing the printversion for files named "fingerprint.pdf"
% or contain why the hell else print in there name.
% The command to receive the print version: latexmk --jobname=-print
% The command to receive the normal version: latexmk
% lualatex -jobname=print --shell-escape cookbook.tex
\IfSubStr{\jobname%
}{%
% LaTeX is a fucking nightmare: `\jobname` doesn't contain normal category code for its
% letters, so a hack is required, as usual:
\detokenize{print}% https://tex.stackexchange.com/a/197384/120853
\detokenize{-print}% https://tex.stackexchange.com/a/197384/120853
}{%
%True statement
\def\print{true}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment