Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Felix Hilsky
masterthesis
Commits
babc08fb
Commit
babc08fb
authored
Jan 13, 2022
by
Felix Hilsky
Browse files
include file name in md pdf output
parent
49286f4b
Changes
2
Hide whitespace changes
Inline
Side-by-side
scripts/md-preamble.tex
View file @
babc08fb
...
...
@@ -2,4 +2,5 @@
\pagestyle
{
fancy
}
\fancyhead
{}
\fancyhead
[L]
{
CURRENTCOMMIT
}
\fancyfoot
[L]
{
FILENAME
}
\AtBeginDocument
{
\renewcommand
{
\setminus
}{
\mathbin
{
\backslash
}}}
scripts/pandoc-call.sh
View file @
babc08fb
#! /usr/bin/env bash
set
-e
infile
=
"
$1
"
baseinfile
=
$(
basename
"
${
infile
}
"
)
outfile
=
"
${
2
:-
$HOME
/Desktop/pandoc.pdf
}
"
headertext
=
"
$(
git log
-1
--format
=
%aI
\
%h
)
"
echo
infile:
$infile
...
...
@@ -8,5 +10,6 @@ echo headertext: $headertext
mkdir
-p
.maindir/out
cp
.maindir/scripts/md-preamble.tex .maindir/out/md-preamble-orig.tex
sed
-i
's#CURRENTCOMMIT#'
"
${
headertext
}
"
'#'
.maindir/scripts/md-preamble.tex
sed
-i
's#FILENAME#'
"
${
baseinfile
}
"
'#'
.maindir/scripts/md-preamble.tex
pandoc
--pdf-engine
lualatex
--lua-filter
.maindir/scripts/pandoc-gitlab-math.lua
--include-in-header
=
.maindir/scripts/md-preamble.tex
"
${
infile
}
"
--output
=
"
${
outfile
}
"
cp
.maindir/out/md-preamble-orig.tex .maindir/scripts/md-preamble.tex
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment