Merge branch '38-pandoc-workflow' into 'master'

Resolve "Pandoc Workflow"

Closes #38

See merge request fastexitlane/latex-boilerplate!19
This commit is contained in:
Dominik Becker 2020-05-19 19:57:54 +00:00
commit 2da0fe0654
5 changed files with 56 additions and 3 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@ temp/
## main build output ## main build output
main.pdf main.pdf
chapter/out.tex
## IDE and Editor files ## IDE and Editor files
.idea/** .idea/**

View File

@ -3,7 +3,7 @@ stages:
- build - build
latexmk: latexmk:
image: bnord01/docker-latex-pygments:latest image: fastexitlane/pandoc-latex:latest
stage: build stage: build
artifacts: artifacts:
paths: paths:
@ -14,6 +14,18 @@ latexmk:
- ci_commit_sha_short=`git rev-parse --short $CI_COMMIT_SHA` - ci_commit_sha_short=`git rev-parse --short $CI_COMMIT_SHA`
- mv main.pdf main@$ci_commit_sha_short.pdf - mv main.pdf main@$ci_commit_sha_short.pdf
# pandoc_latexmk:
# image: fastexitlane/pandoc-latex:latest
# stage: build
# artifacts:
# paths:
# - main*.pdf
# expire_in: 2d
# script:
# - pandoc --filter pandoc-crossref --filter pandoc-citeproc -M cref=true --top-level-division=chapter --bibliography library/library.bib --biblatex -o chapter/out.tex chapter/*.md
# - latexmk main.tex
# - ci_commit_sha_short=`git rev-parse --short $CI_COMMIT_SHA`
# - mv main.pdf main@$ci_commit_sha_short.pdf
hunspell_chapters: hunspell_chapters:
image: tmaier/hunspell:latest image: tmaier/hunspell:latest

25
.vscode/markdown.code-snippets vendored Normal file
View File

@ -0,0 +1,25 @@
{
"online im Internet": {
"scope": "markdown",
"prefix": "oii",
"body": "online im Internet"
},
"autocite": {
"scope": "markdown",
"prefix": "ac",
"body": "[vgl. @${1:bibentry}, ${2:page}]"
},
"label": {
"scope": "markdown",
"prefix": "lbl",
"body": "{#${1:type}:${2:id}}"
},
"reference": {
"scope": "markdown",
"prefix": "ref",
"body": "[@$1]"
}
}

15
.vscode/tasks.json vendored
View File

@ -11,12 +11,23 @@
"kind": "build", "kind": "build",
"isDefault": true "isDefault": true
}, },
"dependsOn": "clean" "dependsOrder": "sequence",
"dependsOn": ["clean"]
}, },
{ {
"label": "clean", "label": "clean",
"type": "shell", "type": "shell",
"command": "latexmk -C" "command": "latexmk -C; if [ -f chapter/out.tex ]; then rm chapter/out.tex; fi"
},
{
"label": "pandoc",
"type": "shell",
"command": [
"pandoc --filter pandoc-crossref --filter pandoc-citeproc ",
"-M cref=true --top-level-division=chapter ",
"--bibliography library/library.bib --biblatex ",
"-o chapter/out.tex chapter/*.md"
]
} }
] ]
} }

View File

@ -63,6 +63,10 @@
% \input{chapter/myfile} % \input{chapter/myfile}
% \newpage % \newpage
% when using pandoc workflow instead, uncomment the following
% \input{chapter/out.tex}
% \newpage
%%%%%%%%%%%%% %%%%%%%%%%%%%
%% closing %% %% closing %%
%%%%%%%%%%%%% %%%%%%%%%%%%%