#38 basic pandoc workflow

This commit is contained in:
Dominik Becker 2020-05-18 23:24:13 +02:00
parent d21dabe099
commit baed3fcdf8
4 changed files with 29 additions and 1 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

@ -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: pandoc/latex
# 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

13
.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"
},
{
"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 %%
%%%%%%%%%%%%% %%%%%%%%%%%%%