mirror of
https://github.com/Wandmalfarbe/pandoc-latex-template.git
synced 2025-03-25 05:25:34 +00:00
feat: create single file templates (latex and beamer)
This commit is contained in:
parent
071d062e76
commit
bd28515797
2
.github/workflows/build-examples.yml
vendored
2
.github/workflows/build-examples.yml
vendored
@ -53,6 +53,8 @@ jobs:
|
||||
tlmgr install awesomebox fontawesome5
|
||||
# packages only needed for some examples (example boxes-with-pandoc-latex-environment-and-tcolorbox)
|
||||
tlmgr install tcolorbox pgf etoolbox environ trimspaces
|
||||
- name: Generate a temporary release with single file template versions
|
||||
run: bash ./tools/release.sh 0.0.0
|
||||
- name: Build examples
|
||||
run: cd examples && bash build-examples.sh && cd ..
|
||||
- name: Add generated example files
|
||||
|
@ -1 +1 @@
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex" --listings
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex" --listings
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --to beamer --template "../../template/eisvogel.beamer" --listings
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --to beamer --template "../../dist/eisvogel.beamer" --listings
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex" --listings --top-level-division="chapter"
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex" --listings --top-level-division="chapter"
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex" --filter pandoc-latex-environment --listings
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex" --filter pandoc-latex-environment --listings
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex" --filter pandoc-latex-environment --listings
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex" --filter pandoc-latex-environment --listings
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex" --listings
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex" --listings
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex" --highlight-style kate
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex" --highlight-style kate
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex" --listings
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex" --listings
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex" --listings
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex" --listings
|
||||
|
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
# No lang option (-V lang=zh) here because Chinese is unsupported in polyglossia and babel.
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex" --listings --pdf-engine "xelatex" -V CJKmainfont="HiraginoSans-W4"
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex" --listings --pdf-engine "xelatex" -V CJKmainfont="HiraginoSans-W4"
|
||||
|
@ -1 +1 @@
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex" --listings
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex" --listings
|
||||
|
Binary file not shown.
@ -1,2 +1,2 @@
|
||||
# No lang option (-V lang=jp) here because Japanese unsupported in polyglossia.
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex" --listings --pdf-engine "xelatex" -V CJKmainfont="HiraginoSans-W4"
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex" --listings --pdf-engine "xelatex" -V CJKmainfont="HiraginoSans-W4"
|
||||
|
@ -1 +1 @@
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex" --listings
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex" --listings
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex"
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex"
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex" --listings
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex" --listings
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex" --listings
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex" --listings
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex" --listings
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex" --listings
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex" --listings
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex" --listings
|
||||
|
Binary file not shown.
@ -1 +1 @@
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../template/eisvogel.latex" --listings
|
||||
pandoc "document.md" -o "document.pdf" --from markdown --template "../../dist/eisvogel.latex" --listings
|
||||
|
Binary file not shown.
@ -118,7 +118,7 @@ $eisvogel-added.latex()$
|
||||
|
||||
\begin{document}
|
||||
|
||||
$eisvogel-titlepage.latex()$
|
||||
$eisvogel-title-page.latex()$
|
||||
|
||||
$if(has-frontmatter)$
|
||||
\frontmatter
|
@ -1,16 +1,53 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf "dist"
|
||||
mkdir "dist"
|
||||
distFolderName="dist"
|
||||
archiveFolderName="Eisvogel-${1}"
|
||||
archiveFolder="${distFolderName}/${archiveFolderName}"
|
||||
|
||||
cp "eisvogel.tex" "eisvogel.latex"
|
||||
rm -rf "${distFolderName}"
|
||||
mkdir "${distFolderName}"
|
||||
mkdir "${distFolderName}/${archiveFolderName}"
|
||||
|
||||
# create .zip files
|
||||
zip -r -X --exclude="*.DS_Store*" "dist/Eisvogel-${1}.zip" "examples" "eisvogel.latex" "icon.png" "LICENSE" "README.md" "CHANGELOG.md"
|
||||
cp "dist/Eisvogel-${1}.zip" "dist/Eisvogel.zip"
|
||||
# create single template file for latex
|
||||
cp "template-multi-file/eisvogel.latex" "${distFolderName}/eisvogel.latex"
|
||||
|
||||
# create .tar.gz files
|
||||
tar --exclude="*.DS_Store*" --include="examples" --include="eisvogel.latex" --include="icon.png" --include="LICENSE" --include="README.md" --include="CHANGELOG.md" -zcvf "dist/Eisvogel-${1}.tar.gz" *
|
||||
cp "dist/Eisvogel-${1}.tar.gz" "dist/Eisvogel.tar.gz"
|
||||
# replace partials (latex)
|
||||
sed -e '/\$fonts\.latex()\$/ {' -e 'r template-multi-file/fonts.latex' -e 'd' -e '}' -i '' "${distFolderName}/eisvogel.latex"
|
||||
sed -e '/\$common\.latex()\$/ {' -e 'r template-multi-file/common.latex' -e 'd' -e '}' -i '' "${distFolderName}/eisvogel.latex"
|
||||
sed -e '/\$eisvogel-added\.latex()\$/ {' -e 'r template-multi-file/eisvogel-added.latex' -e 'd' -e '}' -i '' "${distFolderName}/eisvogel.latex"
|
||||
sed -e '/\$eisvogel-title-page\.latex()\$/ {' -e 'r template-multi-file/eisvogel-title-page.latex' -e 'd' -e '}' -i '' "${distFolderName}/eisvogel.latex"
|
||||
sed -e '/\$after-header-includes\.latex()\$/ {' -e 'r template-multi-file/after-header-includes.latex' -e 'd' -e '}' -i '' "${distFolderName}/eisvogel.latex"
|
||||
sed -e '/\$hypersetup\.latex()\$/ {' -e 'r template-multi-file/hypersetup.latex' -e 'd' -e '}' -i '' "${distFolderName}/eisvogel.latex"
|
||||
sed -e '/\$passoptions\.latex()\$/ {' -e 'r template-multi-file/passoptions.latex' -e 'd' -e '}' -i '' "${distFolderName}/eisvogel.latex"
|
||||
|
||||
rm "eisvogel.latex"
|
||||
# create single template file for beamer
|
||||
cp "template-multi-file/eisvogel.beamer" "${distFolderName}/eisvogel.beamer"
|
||||
|
||||
# replace partials (beamer)
|
||||
sed -e '/\$fonts\.latex()\$/ {' -e 'r template-multi-file/fonts.latex' -e 'd' -e '}' -i '' "${distFolderName}/eisvogel.beamer"
|
||||
sed -e '/\$common\.latex()\$/ {' -e 'r template-multi-file/common.latex' -e 'd' -e '}' -i '' "${distFolderName}/eisvogel.beamer"
|
||||
# The beamer template has no eisvogel block $eisvogel-added.latex()$
|
||||
# The beamer template has no eisvogel titlepage $eisvogel-titlepage.latex()$
|
||||
sed -e '/\$after-header-includes\.latex()\$/ {' -e 'r template-multi-file/after-header-includes.latex' -e 'd' -e '}' -i '' "${distFolderName}/eisvogel.beamer"
|
||||
sed -e '/\$hypersetup\.latex()\$/ {' -e 'r template-multi-file/hypersetup.latex' -e 'd' -e '}' -i '' "${distFolderName}/eisvogel.beamer"
|
||||
sed -e '/\$passoptions\.latex()\$/ {' -e 'r template-multi-file/passoptions.latex' -e 'd' -e '}' -i '' "${distFolderName}/eisvogel.beamer"
|
||||
|
||||
|
||||
# create folder for the release eisvogel (ZIP and tar.gz)
|
||||
cp -r "examples" "${archiveFolder}/examples"
|
||||
cp -r "template-multi-file" "${archiveFolder}/template-multi-file"
|
||||
cp "dist/eisvogel.latex" "${archiveFolder}/eisvogel.latex"
|
||||
cp "dist/eisvogel.beamer" "${archiveFolder}/eisvogel.beamer"
|
||||
cp "icon.png" "${archiveFolder}/icon.png"
|
||||
cp "LICENSE" "${archiveFolder}/LICENSE"
|
||||
cp "README.md" "${archiveFolder}/README.md"
|
||||
cp "CHANGELOG.md" "${archiveFolder}/CHANGELOG.md"
|
||||
|
||||
|
||||
cd dist
|
||||
|
||||
# create .zip file
|
||||
zip -r -X --exclude="*.DS_Store*" "Eisvogel-${1}.zip" "${archiveFolderName}"
|
||||
|
||||
# create .tar.gz file
|
||||
tar --exclude="*.DS_Store*" -zcvf "Eisvogel-${1}.tar.gz" "Eisvogel-${1}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user