diff --git a/.gitignore b/.gitignore index a4ad97d..7b8b3d8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ temp/ ## main build output main.pdf +chapter/out.tex ## IDE and Editor files .idea/** diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index df7d0b7..09616cb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ stages: - build latexmk: - image: bnord01/docker-latex-pygments:latest + image: fastexitlane/pandoc-latex:latest stage: build artifacts: paths: @@ -14,6 +14,18 @@ latexmk: - ci_commit_sha_short=`git rev-parse --short $CI_COMMIT_SHA` - 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: image: tmaier/hunspell:latest diff --git a/.vscode/markdown.code-snippets b/.vscode/markdown.code-snippets new file mode 100644 index 0000000..2255b7d --- /dev/null +++ b/.vscode/markdown.code-snippets @@ -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]" + } +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 09f8121..d6c252c 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -11,12 +11,23 @@ "kind": "build", "isDefault": true }, - "dependsOn": "clean" + "dependsOrder": "sequence", + "dependsOn": ["clean"] }, { "label": "clean", "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" + ] } ] } \ No newline at end of file diff --git a/main.tex b/main.tex index 28543b7..bdb090c 100644 --- a/main.tex +++ b/main.tex @@ -63,6 +63,10 @@ % \input{chapter/myfile} % \newpage + % when using pandoc workflow instead, uncomment the following + % \input{chapter/out.tex} + % \newpage + %%%%%%%%%%%%% %% closing %% %%%%%%%%%%%%%