Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ITT LaTeX-Vorlage
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkan Raed Ahmed Al-Asadi
ITT LaTeX-Vorlage
Commits
c0b784a0
Commit
c0b784a0
authored
2 years ago
by
Vasco Wild
Browse files
Options
Downloads
Patches
Plain Diff
Change print flag to -print
parent
9e31cd14
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+2
-2
2 additions, 2 deletions
Makefile
cookbook.tex
+5
-4
5 additions, 4 deletions
cookbook.tex
with
7 additions
and
6 deletions
Makefile
+
2
−
2
View file @
c0b784a0
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
cookbook.tex
+
5
−
4
View file @
c0b784a0
...
...
@@ -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 variabl
e is set to print, the print variable is set true and the print version is made.
% If
\jobnam
e 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
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment