diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..a1bff60 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,25 @@ +{ + "name": "markdown2pdf", + "image": "pandoc/extra:edge-alpine", + "onCreateCommand": ".devcontainer/setup.sh", + "postStartCommand": ".devcontainer/startup.sh", + "overrideCommand": true, + "customizations": { + "vscode": { + "settings": { + "security.workspace.trust.untrustedFiles": "open", + "terminal.integrated.defaultProfile.linux": "zsh" + }, + "extensions": [ + "bierner.markdown-preview-github-styles", + "catppuccin.catppuccin-vsc", + "catppuccin.catppuccin-vsc-icons", + "dbaeumer.vscode-eslint", + "DavidAnson.vscode-markdownlint", + "GitHub.vscode-pull-request-github", + "streetsidesoftware.code-spell-checker", + "yzhang.markdown-all-in-one" + ] + } + } +} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100755 index 0000000..e49d226 --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env sh +if [ -d "/var/run/docker.sock" ]; then + # Grant access to the docker socket + sudo chmod 666 /var/run/docker.sock +fi + +if ! [ -d ~/.ssh ]; then + if [ -d /tmp/.ssh-localhost ]; then + command mkdir -p -- ~/.ssh + sudo cp -R /tmp/.ssh-localhost/* ~/.ssh + sudo chown -R $(whoami):$(whoami) ~ || true ?>/dev/null + sudo chmod 400 ~/.ssh/* + fi +fi + +apk add --no-cache git jq librsvg font-noto-cjk zsh bash starship +apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community font-carlito font-fira-code-nerd shellcheck + +pip install pre-commit + +tlmgr option -- autobackup -1 +tlmgr install lastpage + +pre-commit install +pre-commit autoupdate + +if [ -f ~/.gitconfig ]; then + rm ~/.gitconfig +fi + +if ! [ -d ~/.config ]; then + command mkdir -p -- ~/.config +fi +/bin/cp -f .devcontainer/starship.toml ~/.config/starship.toml +if [ ! -f ~/.zshrc ]; then + echo 'eval "$(starship init zsh)"' >>~/.zshrc +fi diff --git a/.devcontainer/starship.toml b/.devcontainer/starship.toml new file mode 100644 index 0000000..46566ab --- /dev/null +++ b/.devcontainer/starship.toml @@ -0,0 +1,35 @@ +command_timeout = 500 +format = "$directory$git_branch$time$cmd_duration$character" + +[character] +success_symbol = "[➜](bold green)" +error_symbol = "[✖](bold red)" + +[cmd_duration] +min_time = 500 +format = "took [$duration](bold yellow)" + +[directory] +read_only = " " +truncation_length = 3 +truncation_symbol = "~/" + +[git_branch] +symbol = "  " +style = "bold #e8ec00 inverted" +format = "on [$symbol$branch ]($style) " + +[git_commit] +disabled = true + +[git_state] +disabled = true + +[git_status] +disabled = true + +[line_break] +disabled = true + +[package] +disabled = true diff --git a/.devcontainer/startup.sh b/.devcontainer/startup.sh new file mode 100755 index 0000000..29cea78 --- /dev/null +++ b/.devcontainer/startup.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env sh +if [ "${CODESPACES}" = "true" ]; then + # Remove the default credential helper + sudo sed -i -E 's/helper =.*//' /etc/gitconfig + + # Add one that just uses secrets available in the Codespace + git config --global credential.helper '!f() { sleep 1; echo "username=${GITHUB_USER}"; echo "password=${GH_TOKEN}"; }; f' +fi + +if [ ! $(git config --global --get safe.directory | grep "*" 2>&1) ]; then + git config --global --add safe.directory "*" +fi +if [ "$(git config pull.rebase)" != "false" ]; then + git config --global pull.rebase false +fi +if [ "$(git config user.name)" = "" ]; then + echo "Warning: git user.name is not configured" +fi +if [ "$(git config user.email)" = "" ]; then + echo "Warning: git user.email is not configured" +fi diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index adbbdfe..0000000 --- a/.dockerignore +++ /dev/null @@ -1,4 +0,0 @@ -.git -.github -.vscode -README.md diff --git a/.github/workflows/build-container.yml b/.github/workflows/build-container.yml deleted file mode 100644 index 57a322c..0000000 --- a/.github/workflows/build-container.yml +++ /dev/null @@ -1,30 +0,0 @@ ---- -name: 🎍 Build Container - -on: - workflow_dispatch: - push: - tags: - - '*' -jobs: - build_container: - name: Build Container - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Log in to innofactoriac.azurecr.io - uses: azure/docker-login@v1 - with: - login-server: innofactoriac.azurecr.io - username: e849ad7a-bdb8-4814-91cf-3b269440cb65 - password: ${{ secrets.AZURE_DEPLOY_ACR_BUILD_CLIENT_SECRET }} - - name: Build and push image - run: | - if [ "${{ github.ref_name }}" != "main" ] - then - docker build . --tag innofactoriac.azurecr.io/mdconvert:${{ github.ref_name }} --tag innofactoriac.azurecr.io/mdconvert:latest - else - docker build . --tag innofactoriac.azurecr.io/mdconvert:${{ github.run_number }} --tag innofactoriac.azurecr.io/mdconvert:latest - fi - docker push --all-tags innofactoriac.azurecr.io/mdconvert diff --git a/.github/workflows/convert-markdown.yml b/.github/workflows/convert-markdown.yml index 2f66d09..dfccd56 100644 --- a/.github/workflows/convert-markdown.yml +++ b/.github/workflows/convert-markdown.yml @@ -15,7 +15,7 @@ on: Project: required: false type: string - default: '' + default: "" Folder: required: false type: string @@ -28,6 +28,14 @@ on: required: false type: string default: document.order + HistoryFile: + required: false + type: string + default: "" + ReplaceFile: + required: false + type: string + default: "" OutFile: required: false type: string @@ -40,6 +48,10 @@ on: required: false type: string default: Initial draft + LimitVersionHistory: + required: false + type: number + default: 15 ForceDefault: required: false type: boolean @@ -54,34 +66,26 @@ jobs: name: Convert Markdown runs-on: ubuntu-latest container: - image: innofactoriac.azurecr.io/mdconvert:latest - credentials: - username: fb505ffb-02a5-428c-9030-9d0809ba322d - password: ${{ secrets.INNOFACTORIAC_MDCONVERT_ACRPULL_CLIENT_SECRET }} + image: pandoc/extra:edge-alpine + options: --entrypoint=sh steps: - - name: Clone repository for building - uses: actions/checkout@v3 + - name: Clone repository + uses: actions/checkout@v4 with: fetch-depth: 0 - # - name: Setup upterm session - # uses: lhotari/action-upterm@v1 - # with: - # ## limits ssh access and adds the ssh public key for the user which triggered the workflow - # limit-access-to-actor: false - - # - name: Setup tmate session - # uses: mxschmitt/action-tmate@v3 - # with: - # limit-access-to-actor: true + - name: Install requirements + shell: sh + run: | + apk add --no-cache git jq librsvg font-noto-cjk + apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community font-carlito + tlmgr install lastpage - name: Build PDF - shell: pwsh + shell: sh run: | - $Global:ProgressPreference = 'SilentlyContinue'; - $forceDefault = '${{ inputs.ForceDefault }}' -eq 'true'; - & git config --global safe.directory '*'; - & /usr/local/mdconvert/mdconvert.ps1 -Title '${{ inputs.Title }}' -Subtitle '${{ inputs.Subtitle }}' -Project '${{ inputs.Project }}' -Folder '${{ inputs.Folder }}' -Template '${{ inputs.Template }}' -OrderFile '${{ inputs.OrderFile }}' -OutFile '${{ inputs.OutFile }}' -DefaultAuthor '${{ inputs.DefaultAuthor }}' -DefaultDescription '${{ inputs.DefaultDescription }}' -ForceDefault:$forceDefault + git config --global --add safe.directory '*' + tools/mdconvert.sh -a '${{ inputs.DefaultAuthor }}' -d '${{ inputs.DefaultDescription }}' -f '${{ inputs.Folder }}' -force '${{ inputs.ForceDefault }}' -h '${{ inputs.HistoryFile }}' -l ${{ inputs.LimitVersionHistory }} -o '${{ inputs.OrderFile }}' -out '${{ inputs.OutFile }}' -p '${{ inputs.Project }}' -r '${{ inputs.ReplaceFile }}' -s '${{ inputs.Subtitle }}' -t '${{ inputs.Title }}' --template '${{ inputs.Template }}' - name: Publish PDF uses: actions/upload-artifact@v3 diff --git a/.github/workflows/pull-labels-changeset_size.yml b/.github/workflows/pull-labels-changeset_size.yml index f3017c1..c34e72c 100644 --- a/.github/workflows/pull-labels-changeset_size.yml +++ b/.github/workflows/pull-labels-changeset_size.yml @@ -1,25 +1,26 @@ ---- -name: "📁 Changeset Size" +name: "📁 Changeset size" -on: # yamllint disable-line rule:truthy +on: pull_request: branches: - main jobs: labeler: - name: Pull Changeset Size + name: "Changeset size" runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write steps: - - - name: Labeler + - name: "Labeler" uses: actions/labeler@v4 with: configuration-path: .github/labeler.yml repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Label Size - uses: pascalgn/size-label-action@v0.4.3 + - name: "Label size" + uses: pascalgn/size-label-action@v0.5.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/.gitignore b/.gitignore index ae2e9b6..eb7d660 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,365 @@ -# https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -!.vscode/*.code-snippets +# Created by https://www.toptal.com/developers/gitignore/api/latex,linux,macos,windows,microsoftoffice,visualstudiocode +# Edit at https://www.toptal.com/developers/gitignore?templates=latex,linux,macos,windows,microsoftoffice,visualstudiocode -# Local History for Visual Studio Code -.history/ +### LaTeX ### +## Core latex/pdflatex auxiliary files: +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc +*.fmt +*.fot +*.cb +*.cb2 +.*.lb -# Built Visual Studio Code Extensions -*.vsix +## Intermediate documents: +*.dvi +*.xdv +*-converted-to.* +# these rules might exclude image files for figures etc. +# *.ps +# *.eps +# *.pdf + +## Generated if empty string is given at "Please type another file name for output:" +.pdf + +## Bibliography auxiliary files (bibtex/biblatex/biber): +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.run.xml + +## Build tool auxiliary files: +*.fdb_latexmk +*.synctex +*.synctex(busy) +*.synctex.gz +*.synctex.gz(busy) +*.pdfsync + +## Build tool directories for auxiliary files +# latexrun +latex.out/ + +## Auxiliary and intermediate files from other packages: +# algorithms +*.alg +*.loa + +# achemso +acs-*.bib + +# amsthm +*.thm + +# beamer +*.nav +*.pre +*.snm +*.vrb + +# changes +*.soc + +# comment +*.cut + +# cprotect +*.cpt + +# elsarticle (documentclass of Elsevier journals) +*.spl + +# endnotes +*.ent + +# fixme +*.lox + +# feynmf/feynmp +*.mf +*.mp +*.t[1-9] +*.t[1-9][0-9] +*.tfm + +#(r)(e)ledmac/(r)(e)ledpar +*.end +*.?end +*.[1-9] +*.[1-9][0-9] +*.[1-9][0-9][0-9] +*.[1-9]R +*.[1-9][0-9]R +*.[1-9][0-9][0-9]R +*.eledsec[1-9] +*.eledsec[1-9]R +*.eledsec[1-9][0-9] +*.eledsec[1-9][0-9]R +*.eledsec[1-9][0-9][0-9] +*.eledsec[1-9][0-9][0-9]R + +# glossaries +*.acn +*.acr +*.glg +*.glo +*.gls +*.glsdefs +*.lzo +*.lzs +*.slg +*.slo +*.sls + +# uncomment this for glossaries-extra (will ignore makeindex's style files!) +# *.ist + +# gnuplot +*.gnuplot +*.table + +# gnuplottex +*-gnuplottex-* + +# gregoriotex +*.gaux +*.glog +*.gtex + +# htlatex +*.4ct +*.4tc +*.idv +*.lg +*.trc +*.xref + +# hyperref +*.brf + +# knitr +*-concordance.tex +# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files +# *.tikz +*-tikzDictionary + +# listings +*.lol + +# luatexja-ruby +*.ltjruby + +# makeidx +*.idx +*.ilg +*.ind + +# minitoc +*.maf +*.mlf +*.mlt +*.mtc[0-9]* +*.slf[0-9]* +*.slt[0-9]* +*.stc[0-9]* + +# minted +_minted* +*.pyg + +# morewrites +*.mw + +# newpax +*.newpax + +# nomencl +*.nlg +*.nlo +*.nls + +# pax +*.pax + +# pdfpcnotes +*.pdfpc -# https://github.com/github/gitignore/blob/main/Global/MicrosoftOffice.gitignore +# sagetex +*.sagetex.sage +*.sagetex.py +*.sagetex.scmd + +# scrwfile +*.wrt + +# svg +svg-inkscape/ + +# sympy +*.sout +*.sympy +sympy-plots-for-*.tex/ + +# pdfcomment +*.upa +*.upb + +# pythontex +*.pytxcode +pythontex-files-*/ + +# tcolorbox +*.listing + +# thmtools +*.loe + +# TikZ & PGF +*.dpth +*.md5 +*.auxlock + +# titletoc +*.ptc + +# todonotes +*.tdo + +# vhistory +*.hst +*.ver + +# easy-todo +*.lod + +# xcolor +*.xcp + +# xmpincl +*.xmpi + +# xindy +*.xdy + +# xypic precompiled matrices and outlines +*.xyc +*.xyd + +# endfloat +*.ttt +*.fff + +# Latexian +TSWLatexianTemp* + +## Editors: +# WinEdt +*.bak +*.sav + +# Texpad +.texpadtmp + +# LyX +*.lyx~ + +# Kile +*.backup + +# gummi +.*.swp + +# KBibTeX +*~[0-9]* + +# TeXnicCenter +*.tps + +# auto folder when using emacs and auctex +./auto/* +*.el + +# expex forward references with \gathertags +*-tags.tex + +# standalone packages +*.sta + +# Makeindex log files +*.lpz + +# xwatermark package +*.xwm + +# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib +# option is specified. Footnotes are the stored in a file with suffix Notes.bib. +# Uncomment the next line to have this generated file ignored. +#*Notes.bib + +### LaTeX Patch ### +# LIPIcs / OASIcs +*.vtc + +# glossaries +*.glstex + +### Linux ### +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +### MicrosoftOffice ### *.tmp # Word temporary @@ -33,7 +380,26 @@ Backup of *.doc* # Visio autosave temporary files *.~vsd* -# https://github.com/github/gitignore/blob/main/Global/Windows.gitignore +### VisualStudioCode ### +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +!.vscode/*.code-snippets + +# Local History for Visual Studio Code +.history/ + +# Built Visual Studio Code Extensions +*.vsix + +### VisualStudioCode Patch ### +# Ignore all local history of files +.history +.ionide + +### Windows ### # Windows thumbnail cache files Thumbs.db Thumbs.db:encryptable @@ -59,45 +425,4 @@ $RECYCLE.BIN/ # Windows shortcuts *.lnk -# https://github.com/github/gitignore/blob/main/Global/macOS.gitignore -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - -# https://github.com/github/gitignore/blob/main/Global/Linux.gitignore -*~ - -# temporary files which can be created if a process still has a handle open of a deleted file -.fuse_hidden* - -# KDE directory preferences -.directory - -# Linux trash folder which might appear on any partition or disk -.Trash-* - -# .nfs files are created when an open file is removed but is still being accessed -.nfs* +# End of https://www.toptal.com/developers/gitignore/api/latex,linux,macos,windows,microsoftoffice,visualstudiocode diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..3743add --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,12 @@ +# See http://pre-commit.com for more information +# See http://pre-commit.com/hooks.html for more hooks +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 + hooks: + - id: check-case-conflict + - id: check-json + - id: check-yaml + - id: check-merge-conflict + args: ["--assume-in-merge"] + - id: detect-private-key diff --git a/.vscode/settings.json b/.vscode/settings.json index 55e1cd2..f45421b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,26 +1,42 @@ { + "debug.internalConsoleOptions": "neverOpen", "editor.accessibilitySupport": "off", "editor.bracketPairColorization.enabled": true, - "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.detectIndentation": false, - "editor.fontSize": 14, - "editor.formatOnPaste": true, "editor.formatOnSave": true, + "editor.guides.bracketPairs": "active", "editor.tabCompletion": "on", "editor.tabSize": 2, + "files.trimTrailingWhitespace": true, + "files.insertFinalNewline": true, + "files.encoding": "utf8", "git.pruneOnFetch": true, "git.enableSmartCommit": true, + "hediet.vscode-drawio.resizeImages": null, "markdown.extension.orderedList.autoRenumber": false, - "workbench.editor.decorations.badges": true, + "markdown.extension.toc.updateOnSave": false, + "markdownlint.config": { + "MD025": { + "front_matter_title": "" + }, + "MD028": false, + "MD041": false + }, + "workbench.editorAssociations": { + "*.drawio.png": "hediet.vscode-drawio" + }, "workbench.editor.decorations.colors": true, - "workbench.startupEditor": "none", + "workbench.editor.decorations.badges": true, "workbench.editor.wrapTabs": true, + "workbench.startupEditor": "none", + "[json]": { + "editor.defaultFormatter": "vscode.json-language-features" + }, + "[jsonc]": { + "editor.defaultFormatter": "vscode.json-language-features" + }, "[markdown]": { "editor.defaultFormatter": "yzhang.markdown-all-in-one", - "editor.tabSize": 2, - "editor.wordWrap": "off", - "files.encoding": "utf8", - "files.insertFinalNewline": true, - "files.trimTrailingWhitespace": true + "editor.wordWrap": "off" } } diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index f084eba..0000000 --- a/Dockerfile +++ /dev/null @@ -1,149 +0,0 @@ -FROM mcr.microsoft.com/powershell - -# Install requirements -ARG DEBIAN_FRONTEND=noninteractive -RUN apt-get update \ - && apt-get install -y --no-install-recommends \ - wget \ - curl \ - perl-tk \ - git \ - fonts-noto-cjk \ - fonts-crosextra-carlito \ - librsvg2-bin \ - python3 \ - python3-pip \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# Copy files from repo to docker image -COPY texlive-profile.txt /rootbase/install-tl/ -COPY templates/designdoc* /usr/local/mdconvert/ -COPY scripts/mdconvert.ps1 /usr/local/mdconvert/ - -# Give the ps1 script execute permission -RUN chmod +x /usr/local/mdconvert/mdconvert.ps1 - -# Set a workdir for installation of TeX Live -WORKDIR /rootbase/install-tl - -# Download the latest TeX Live installer -RUN curl -L -O http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz \ - && tar xzf install-tl-unx.tar.gz --strip-components 1 -C "/rootbase/install-tl" - -# Install TeX Live -RUN /rootbase/install-tl/install-tl --profile=/rootbase/install-tl/texlive-profile.txt -ENV PATH="${PATH}:/usr/local/texlive/bin/x86_64-linux:/usr/local/bin" - -# Install TeX Live packages -RUN tlmgr install \ - adjustbox \ -## amsfonts \ -## amsmath \ - anysize \ - awesomebox \ -## babel \ - background \ - beamer \ - biblatex \ - bidi \ -## bookmark \ - booktabs \ - breqn \ - caption \ - catchfile \ - cite \ - collectbox \ - crop \ - csquotes \ - ctable \ - enumitem \ - environ \ - eso-pic \ - everypage \ - etoolbox \ - extsizes \ - fancybox \ -## fancyhdr \ - fancyref \ - fancyvrb \ - fontawesome5 \ - footmisc \ - footnotebackref \ - footnotehyper \ - fvextra \ -## geometry \ - hardwrap \ -## hyperref \ -## iftex \ - index \ - jknapltx \ - koma-script \ - l3experimental \ - lastpage \ - latexbug \ - lineno \ - listings \ -## lm \ - lwarp \ - luatexja \ - ly1 \ - mathspec \ - mathtools \ - mdframed \ - mdwtools \ - metalogo \ - microtype \ - multirow \ - mweights \ -## natbib \ - needspace \ - ntgclass \ - pagecolor \ - parskip \ - pdfpages \ - pgf \ - powerdot \ - psfrag \ - rcs \ - sansmath \ - section \ - sectsty \ - selnolig \ - seminar \ - sepnum \ - setspace \ - sourcecodepro \ - sourcesanspro \ - tcolorbox \ - textcase \ - thumbpdf \ - titling \ -## tools \ - trimspaces \ - typehtml \ - ucharcat \ - ulem \ - underscore \ - unicode-math \ - upquote \ - xecjk \ - xcolor \ - xltxtra \ - xurl \ - zref - -# Install pandoc -RUN wget -qO- "https://github.com/jgm/pandoc/releases/download/2.19.2/pandoc-2.19.2-linux-amd64.tar.gz" | tar xzf - --strip-components 1 -C "/usr/local/" - -# Install pandoc filters -RUN pip install pandoc-latex-environment - -# Install yq -#RUN wget -q https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq \ -# && chmod +x /usr/bin/yq - -# Clean up -WORKDIR / -RUN rm -rf /rootbase \ - && apt-get purge -y --auto-remove wget curl diff --git a/README.md b/README.md index 9707f13..8d968c8 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,47 @@ -# Markdown to PDF complier +# Markdown to PDF converter -This reusable workflow can be used to publish PDF from Markdown. +This reusable workflow can be used to publish PDF from Markdown using a predefined latex template. -## Example Workflow +It use the following logic: + +1. Get version history: + 1. If a **HistoryFile** exist; use the content of that file. + 1. Or, if **ForceDefault** is set to `true`; use the value of **DefaultAuthor** and **DefaultDescription**. + 1. Or, use git commit history. Limit the number of items to the value of **LimitVersionHistory**. +1. Merge the markdown files listed in the OrderFile to one markdown file. +1. If a **ReplaceFile** exist; replace in the markdown each string that match the key from **ReplaceFile**, with the matching value. +1. Build and display metadata for the pandoc converter. +1. Convert the markdown using pandoc and save it as an artifact to the job. + +The markdown can include admonition blocks for text that need special attention. + +The following blocks are supported: warning, important, note, caution, tip + +Example: + +```markdown +# A title + +This is some regular text. + +::: tip +This text is in a tip admonition block. +::: +``` + +## Issues + +The following are known issues: + +- Markdown table columns can overlap in the PDF if the table is to wide, making text unreadable. To work around this: + - limit the text in the table. Typically it should be less than 80 characters wide. + - split the table up. + - use an ordered or unordered list. +- The template is designed for a standing A4 layout. It has no option to flip page orientation for one or several pages in a document. +- Titles are not automatically numbered. Titles can be manually numbered and maintained in the markdown document. To avoid having to manually update all titles, it is best to not use numbered titles if possible. +- Because the template is based on latex, backslash has a special meaning and can therefore cause an error from pandoc. + +## Usage ```yaml name: 🧳 Convert Markdown @@ -18,7 +57,7 @@ on: jobs: pdf: name: Build PDF - uses: innofactororg/markdown2pdf/.github/workflows/convert-markdown.yml@v1 + uses: innofactororg/markdown2pdf/.github/workflows/convert-markdown.yml@v2 secrets: inherit with: # The document title @@ -42,21 +81,55 @@ jobs: Template: designdoc # The name of the .order file that specify what order the markdown files must be in the converted PDF + # This is a text file with the name of each markdown file, one for each line, in the correct order + # + # Example content for a document.order file: + # summary.md + # details.md + # faq.md + # # Default: document.order OrderFile: document.order + # The name of the change file that specify the version history content + # The file must contain the following structure: + # Version|Date|Author|Description + # + # Example content for a history.txt file: + # 1|Oct 26, 2023|Jane Doe|Initial draft + # 2|Oct 28, 2023|John Doe|Added detailed design + # + # Default: + HistoryFile: history.txt + + # The name of the replace file that has a JSON structure with a object of + # key and value strings that will be replaced in the markdown file before conversion + # + # Example content for a replace.json file: + # { + # "{data center name}": "WE1", + # "{organization name}": "contoso" + # } + # + # Default: + ReplaceFile: replace.json + # The name of the output file that will be uploaded to the job artifacts # Default: document.pdf OutFile: Design.pdf - # The default value to use for author of the PDF content. When specified, this value will be used if autors can't be retreived from the git commits + # The default value to use for author of the PDF content. When specified, this value will be used if authors can't be retrieved from the git commits # Default: Innofactor DefaultAuthor: Innofactor - # The description of the first line of document change history. When specified, this value will be used when no git comment can be retreived from the git commits + # The description of the first line of document change history. When specified, this value will be used when no git comment can be retrieved from the git commits # Default: Initial draft DefaultDescription: Initial draft + # Limit the version history table to this number of entries + # Default: 15 + LimitVersionHistory: 15 + # Force to use the DefaultAuthor and DefaultDescription instead of using information for git commits # Default: false ForceDefault: false diff --git a/scripts/mdconvert.ps1 b/scripts/mdconvert.ps1 deleted file mode 100644 index a04780e..0000000 --- a/scripts/mdconvert.ps1 +++ /dev/null @@ -1,226 +0,0 @@ -<# -.SYNOPSIS - Build PDF document from markdown files based on order file. -.NOTES - To use this script on windows, install the following (to update with winget replace install with upgrade): - - winget install --id JohnMacFarlane.Pandoc - - winget install --id MiKTeX.MiKTeX - - Select Always for the option Install missing packages on the fly - - After install, open MiKTeX Console and Check for updates. - If MiKTeX was installed for all users you must - start MiKTeX Console with run as administrator - - winget install --id Python.Python.3.11 - - python -m pip install --upgrade pip - - pip install pandoc-latex-environment - - Using modified latex template from https://github.com/Wandmalfarbe/pandoc-latex-template -.EXAMPLE - ./mdconvert.ps1 -Title 'Azure Network Review' -Subtitle 'Assessment Report' -Folder 'docs/networkreport' -#> -[CmdletBinding()] -param ( - [Parameter(Mandatory = $true)] - [string] - $Title, - [Parameter(Mandatory = $true)] - [AllowEmptyString()] - [string] - $Subtitle, - [Parameter(Mandatory = $false)] - [AllowEmptyString()] - [string] - $Project = '', - [Parameter(Mandatory = $false)] - [ValidateNotNullOrEmpty()] - [string] - $Folder = 'docs', - [Parameter(Mandatory = $false)] - [string] - $Template = 'designdoc', - [Parameter(Mandatory = $false)] - [ValidateNotNullOrEmpty()] - [string] - $OrderFile = 'document.order', - [Parameter(Mandatory = $false)] - [ValidateNotNullOrEmpty()] - [string] - $OutFile = 'document.pdf', - [Parameter(Mandatory = $false)] - [AllowEmptyString()] - [string] - $DefaultAuthor = 'Innofactor', - [Parameter(Mandatory = $false)] - [AllowEmptyString()] - [string] - $DefaultDescription = 'Initial draft', - [Parameter(Mandatory = $false)] - [switch] - $ForceDefault -) -try { - $culture = New-Object System.Globalization.CultureInfo('en-US'); - $currentDate = (Get-Date).ToString('MMMM d, yyyy', $culture); - $currentPath = Get-Item -Path .; - $docsPath = Join-Path -Path $currentPath.FullName -ChildPath $Folder; - $orderFilePath = $( - if (-not(Test-Path -Path $OrderFile -PathType Leaf)) { - Get-Item -Path $(Join-Path -Path $docsPath -ChildPath $OrderFile) -ErrorAction Stop - } else { - Get-Item -Path $OrderFile -ErrorAction Stop - } - ); - # Tex templates should be in the same folder as this script - $templateFilePath = Get-Item -Path $(Join-Path -Path $PSScriptRoot -ChildPath "$($Template).tex") -ErrorAction Stop; - $templateCoverFilePath = Get-Item -Path $(Join-Path -Path $PSScriptRoot -ChildPath "$($Template)-cover.png") -ErrorAction Stop; - $templateLogoFilePath = Get-Item -Path $(Join-Path -Path $PSScriptRoot -ChildPath "$($Template)-logo.png") -ErrorAction Stop; - # We need to get information from git log and we need to run this from root folder - $mergeLogs = @( - if ($ForceDefault) { - "$DefaultAuthor|$currentDate|tag: rel/repo/1.0.0|$DefaultDescription" - } else { - & git --no-pager log --date-order --date=format:'%b %e, %Y' --no-merges --oneline --pretty=format:'%an|%ad|%D|%s' -- $orderFilePath.DirectoryName | Select-Object -Unique - } - ); - $authors = @( - if ($ForceDefault) { - $DefaultAuthor - } else { - & git --no-pager log --no-merges --oneline --pretty=format:"%an" -- $orderFilePath.DirectoryName | Select-Object -Unique - } - ); - # Get the markdown files in OrderFile - $files = @( - Get-Content -Path $orderFilePath.FullName | ForEach-Object { - Get-Item -Path (Join-Path -Path $orderFilePath.DirectoryName -ChildPath $_) -ErrorAction Stop - } - ); - # Merge content of all markdown files - $i = 0; - $markdowncontent = $( - foreach ($file in $files) { - $content = Get-Content -Path $file.FullName -Raw -Encoding utf8; - # Ensure file ends with a line feed - if ($content -notmatch '\n$') { - $content += "`r`n" - }; - if ($i -eq 0) { - $i = 1; - $content - } else { - if ($content -notmatch '\r\n$') { - "`r`n$content" - } else { - "`n$content" - } - } - } - ); - # Build version history - if ($mergeLogs.Count -eq 0 -and $authors.Count -ge 1) { - $mergeLogs = @("$($authors[0])|$currentDate|tag: rel/repo/1.0.0|$DefaultDescription") - } elseif ($mergeLogs.Count -eq 0) { - $mergeLogs = @("$DefaultAuthor|$currentDate|tag: rel/repo/1.0.0|$DefaultDescription") - }; - $i = $mergeLogs.Count; - $versionHistory = @( - foreach ($mergeLog in $mergeLogs) { - $items = @($mergeLog.Split('|')); - if ($items.Count -ge 4) { - $i--; - $refNamesTag = @($items[2] -split 'tag:'); - $version = $( - if ($refNamesTag.Count -eq 2 -and $refNamesTag[1] -match 'rel/') { - @(@($refNamesTag[1] -split ',')[0] -split '/')[-1] - } else { - "1.0.$i" - } - ); - @{ - "version" = $version; - "date" = $items[1].Replace(' ', ' '); - "author" = $items[0]; - "description" = $items[3] - }; - } - } - ); - $font = $( - if ($IsLinux) { - 'Carlito' - } else { - 'Calibri' - } - ); - # Build metadata content - $metadataContent = @{ - title = $Title; - subtitle = $Subtitle; - project = $Project; - geometry = 'a4paper,left=2.54cm,right=2.54cm,top=1.91cm,bottom=2.54cm'; - titlepage = $true; - 'titlepage-color' = 'FFFFFF'; - 'titlepage-text-color' = '5F5F5F'; - 'titlepage-top-cover-image' = $templateCoverFilePath.FullName; - logo = $templateLogoFilePath.FullName; - colorlinks = $true; - 'block-headings' = $true; - 'links-as-notes' = $true; - lot = $false; - lof = $false; - toc = $true; - 'toc-own-page' = $true; - 'toc-title' = 'Table of Contents'; - tables = $true; - 'table-use-row-colors' = $false; - 'listings-disable-line-numbers' = $false; - 'listings-no-page-break' = $false; - 'disable-header-and-footer' = $false; - 'footer-center' = 'Page (\thepage ) of \pageref{LastPage}'; - disclaimer = "This document contains business and trade secrets (essential information about Innofactor's business) and is therefore totally confidential. Confidentiality does not apply to pricing information"; - 'pandoc-latex-environment' = @{ - noteblock = @('note'); - tipblock = @('tip'); - warningblock = @('warning'); - cautionblock = @('caution'); - importantblock = @('important'); - }; - date = $currentDate; - author = $authors; - 'version-history' = $versionHistory; - mainfont = $font - } | ConvertTo-Json; - $metadataFile = Join-Path -Path $docsPath -ChildPath 'metadata.json'; - Set-Content -Path $metadataFile -Value $metadataContent -Force -Encoding utf8; - # Ensure outfile has full path - if (-not($OutFile -match '^.?:\\.*' -or $OutFile -match '^/')) { - $OutFile = Join-Path -Path $currentPath.FullName -ChildPath $OutFile - }; - Write-Host -Object "Creating $OutFile"; - # We only want to use pandoc if the output file is not a markdown file - if ($OutFile -notmatch '\.md$') { - # We need to be in the path of the order file so image paths can be relative - Push-Location; - Set-Location -Path $orderFilePath.DirectoryName; - $markdowncontent | & pandoc ` - --standalone ` - --listings ` - --pdf-engine=xelatex ` - --metadata-file="$metadataFile" ` - -f markdown+backtick_code_blocks+pipe_tables+auto_identifiers+yaml_metadata_block+table_captions+footnotes+smart+escaped_line_breaks ` - --template="$($templateFilePath.FullName)" ` - --filter pandoc-latex-environment ` - --output="$OutFile"; - Pop-Location; - if (-not(Test-Path -Path $OutFile -PathType Leaf)) { - Write-Warning -Message "Unable to create $OutFile" - } else { - $file = Get-Item -Path $OutFile; - Write-Host -Object "Done creating $($file.FullName) at $($file.CreationTime), size is $([math]::Ceiling($file.Length / 1kb)) kb using metadata:"; - Write-Host -Object $metadataContent - }; - } else { - Set-Content -Path $OutFile -Value $markdowncontent -Force -NoNewline -Encoding utf8 - } -} catch { - throw -} diff --git a/templates/designdoc.tex b/templates/designdoc.tex deleted file mode 100644 index cdd9e5b..0000000 --- a/templates/designdoc.tex +++ /dev/null @@ -1,1166 +0,0 @@ -%% -% Copyright (c) 2017 - 2021, Pascal Wagler; -% Copyright (c) 2014 - 2021, John MacFarlane -% -% All rights reserved. -% -% Redistribution and use in source and binary forms, with or without -% modification, are permitted provided that the following conditions -% are met: -% -% - Redistributions of source code must retain the above copyright -% notice, this list of conditions and the following disclaimer. -% -% - Redistributions in binary form must reproduce the above copyright -% notice, this list of conditions and the following disclaimer in the -% documentation and/or other materials provided with the distribution. -% -% - Neither the name of John MacFarlane nor the names of other -% contributors may be used to endorse or promote products derived -% from this software without specific prior written permission. -% -% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -% "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -% LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -% FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -% COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -% INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -% BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -% LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -% LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -% ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -% POSSIBILITY OF SUCH DAMAGE. -%% - -%% -% This is the Eisvogel pandoc LaTeX template. -% -% For usage information and examples visit the official GitHub page: -% https://github.com/Wandmalfarbe/pandoc-latex-template -%% - -% Options for packages loaded elsewhere -\PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref} -\PassOptionsToPackage{hyphens}{url} -\PassOptionsToPackage{dvipsnames,svgnames,x11names,table}{xcolor} -$if(dir)$ -$if(latex-dir-rtl)$ -\PassOptionsToPackage{RTLdocument}{bidi} -$endif$ -$endif$ -$if(CJKmainfont)$ -\PassOptionsToPackage{space}{xeCJK} -$endif$ -% -\documentclass[ -$if(fontsize)$ - $fontsize$, -$endif$ -$if(lang)$ - $babel-lang$, -$endif$ -$if(papersize)$ - $papersize$paper, -$else$ - paper=a4, -$endif$ -$if(beamer)$ - ignorenonframetext, -$if(handout)$ - handout, -$endif$ -$if(aspectratio)$ - aspectratio=$aspectratio$, -$endif$ -$endif$ -$for(classoption)$ - $classoption$$sep$, -$endfor$ - ,captions=tableheading -]{$if(beamer)$$documentclass$$else$$if(book)$scrbook$else$scrartcl$endif$$endif$} -$if(beamer)$ -$if(background-image)$ -\usebackgroundtemplate{% - \includegraphics[width=\paperwidth]{$background-image$}% -} -$endif$ -\usepackage{pgfpages} -\setbeamertemplate{caption}[numbered] -\setbeamertemplate{caption label separator}{: } -\setbeamercolor{caption name}{fg=normal text.fg} -\beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$ -$for(beameroption)$ -\setbeameroption{$beameroption$} -$endfor$ -% Prevent slide breaks in the middle of a paragraph -\widowpenalties 1 10000 -\raggedbottom -$if(section-titles)$ -\setbeamertemplate{part page}{ - \centering - \begin{beamercolorbox}[sep=16pt,center]{part title} - \usebeamerfont{part title}\insertpart\par - \end{beamercolorbox} -} -\setbeamertemplate{section page}{ - \centering - \begin{beamercolorbox}[sep=12pt,center]{part title} - \usebeamerfont{section title}\insertsection\par - \end{beamercolorbox} -} -\setbeamertemplate{subsection page}{ - \centering - \begin{beamercolorbox}[sep=8pt,center]{part title} - \usebeamerfont{subsection title}\insertsubsection\par - \end{beamercolorbox} -} -\AtBeginPart{ - \frame{\partpage} -} -\AtBeginSection{ - \ifbibliography - \else - \frame{\sectionpage} - \fi -} -\AtBeginSubsection{ - \frame{\subsectionpage} -} -$endif$ -$endif$ -$if(beamerarticle)$ -\usepackage{beamerarticle} % needs to be loaded first -$endif$ -\usepackage{amsmath,amssymb} -$if(fontfamily)$ -\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} -$else$ -\usepackage{lmodern} -$endif$ -$if(linestretch)$ -\usepackage{setspace} -$else$ -\usepackage{setspace} -\setstretch{1.2} -$endif$ -\usepackage{iftex} -\ifPDFTeX - \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} - \usepackage[utf8]{inputenc} - \usepackage{textcomp} % provide euro and other symbols -\else % if luatex or xetex -$if(mathspec)$ - \ifXeTeX - \usepackage{mathspec} - \else - \usepackage{unicode-math} - \fi -$else$ - \usepackage{unicode-math} -$endif$ - \defaultfontfeatures{Scale=MatchLowercase} - \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} -$if(mainfont)$ - \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} -$endif$ -$if(sansfont)$ - \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} -$endif$ -$if(monofont)$ - \setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$]{$monofont$} -$endif$ -$for(fontfamilies)$ - \newfontfamily{$fontfamilies.name$}[$for(fontfamilies.options)$$fontfamilies.options$$sep$,$endfor$]{$fontfamilies.font$} -$endfor$ -$if(mathfont)$ -$if(mathspec)$ - \ifXeTeX - \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} - \else - \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} - \fi -$else$ - \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} -$endif$ -$endif$ -$if(CJKmainfont)$ - \ifXeTeX - \usepackage{xeCJK} - \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} - \fi -$endif$ -$if(luatexjapresetoptions)$ - \ifLuaTeX - \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset} - \fi -$endif$ -$if(CJKmainfont)$ - \ifLuaTeX - \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec} - \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} - \fi -$endif$ -\fi -$if(zero-width-non-joiner)$ -%% Support for zero-width non-joiner characters. -\makeatletter -\def\zerowidthnonjoiner{% - % Prevent ligatures and adjust kerning, but still support hyphenating. - \texorpdfstring{% - \textormath{\nobreak\discretionary{-}{}{\kern.03em}% - \ifvmode\else\nobreak\hskip\z@skip\fi}{}% - }{}% -} -\makeatother -\ifPDFTeX - \DeclareUnicodeCharacter{200C}{\zerowidthnonjoiner} -\else - \catcode`^^^^200c=\active - \protected\def ^^^^200c{\zerowidthnonjoiner} -\fi -%% End of ZWNJ support -$endif$ -$if(beamer)$ -$if(theme)$ -\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$} -$endif$ -$if(colortheme)$ -\usecolortheme{$colortheme$} -$endif$ -$if(fonttheme)$ -\usefonttheme{$fonttheme$} -$endif$ -$if(mainfont)$ -\usefonttheme{serif} % use mainfont rather than sansfont for slide text -$endif$ -$if(innertheme)$ -\useinnertheme{$innertheme$} -$endif$ -$if(outertheme)$ -\useoutertheme{$outertheme$} -$endif$ -$endif$ -% Use upquote if available, for straight quotes in verbatim environments -\IfFileExists{upquote.sty}{\usepackage{upquote}}{} -\IfFileExists{microtype.sty}{% use microtype if available - \usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype} - \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts -}{} -$if(indent)$ -$else$ -\makeatletter -\@ifundefined{KOMAClassName}{% if non-KOMA class - \IfFileExists{parskip.sty}{% - \usepackage{parskip} - }{% else - \setlength{\parindent}{0pt} - \setlength{\parskip}{6pt plus 2pt minus 1pt}} -}{% if KOMA class - \KOMAoptions{parskip=half}} -\makeatother -$endif$ -$if(verbatim-in-note)$ -\usepackage{fancyvrb} -$endif$ -\usepackage{xcolor} -\definecolor{default-linkcolor}{HTML}{0563C1} -\definecolor{default-filecolor}{HTML}{0563C1} -\definecolor{default-citecolor}{HTML}{0563C1} -\definecolor{default-urlcolor}{HTML}{0563C1} -\definecolor{titlecolor}{HTML}{7030A0} -\definecolor{subtitlecolor}{HTML}{1F4E79} -\definecolor{authorcolor}{HTML}{5B9BD5} -\definecolor{disclaimercolor}{HTML}{949494} -\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available -$if(footnotes-pretty)$ -% load footmisc in order to customize footnotes (footmisc has to be loaded before hyperref, cf. https://tex.stackexchange.com/a/169124/144087) -\usepackage[hang,flushmargin,bottom,multiple]{footmisc} -\setlength{\footnotemargin}{0.8em} % set space between footnote nr and text -\setlength{\footnotesep}{\baselineskip} % set space between multiple footnotes -\setlength{\skip\footins}{0.3cm} % set space between page content and footnote -\setlength{\footskip}{0.9cm} % set space between footnote and page bottom -$endif$ -\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}} -\hypersetup{ -$if(title-meta)$ - pdftitle={$title-meta$}, -$endif$ -$if(author-meta)$ - pdfauthor={$author-meta$}, -$endif$ -$if(lang)$ - pdflang={$lang$}, -$endif$ -$if(subject)$ - pdfsubject={$subject$}, -$endif$ -$if(keywords)$ - pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$}, -$endif$ -$if(colorlinks)$ - colorlinks=true, - linkcolor={$if(linkcolor)$$linkcolor$$else$default-linkcolor$endif$}, - filecolor={$if(filecolor)$$filecolor$$else$default-filecolor$endif$}, - citecolor={$if(citecolor)$$citecolor$$else$default-citecolor$endif$}, - urlcolor={$if(urlcolor)$$urlcolor$$else$default-urlcolor$endif$}, -$else$ - hidelinks, -$endif$ - breaklinks=true, - pdfcreator={LaTeX via pandoc with the Eisvogel template}} -\urlstyle{same} % disable monospaced font for URLs -$if(verbatim-in-note)$ -\VerbatimFootnotes % allow verbatim text in footnotes -$endif$ -$if(geometry)$ -$if(beamer)$ -\geometry{$for(geometry)$$geometry$$sep$,$endfor$} -$else$ -\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} -$endif$ -$else$ -$if(beamer)$ -$else$ -\usepackage[a4paper,left=2.54cm,right=2.54cm,top=1.91cm,bottom=2.54cm]{geometry} -$endif$ -$endif$ -$if(logo)$ -\usepackage[export]{adjustbox} -\usepackage{graphicx} -$elseif(titlepage-top-cover-image)$ -\usepackage[export]{adjustbox} -\usepackage{graphicx} -$endif$ -$if(beamer)$ -\newif\ifbibliography -$endif$ -$if(listings)$ -\usepackage{listings} -\newcommand{\passthrough}[1]{#1} -\lstset{defaultdialect=[5.3]Lua} -\lstset{defaultdialect=[x86masm]Assembler} -$endif$ -$if(listings-no-page-break)$ -\usepackage{etoolbox} -\BeforeBeginEnvironment{lstlisting}{\par\noindent\begin{minipage}{\linewidth}} -\AfterEndEnvironment{lstlisting}{\end{minipage}\par\addvspace{\topskip}} -$endif$ -$if(lhs)$ -\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} -$endif$ -$if(highlighting-macros)$ -$highlighting-macros$ - -% Workaround/bugfix from jannick0. -% See https://github.com/jgm/pandoc/issues/4302#issuecomment-360669013) -% or https://github.com/Wandmalfarbe/pandoc-latex-template/issues/2 -% -% Redefine the verbatim environment 'Highlighting' to break long lines (with -% the help of fvextra). Redefinition is necessary because it is unlikely that -% pandoc includes fvextra in the default template. -\usepackage{fvextra} -\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,fontsize=$if(code-block-font-size)$$code-block-font-size$$else$\small$endif$,commandchars=\\\{\}} - -$endif$ -$if(tables)$ -\usepackage{longtable,booktabs,array} -\setlength\LTleft\parindent -\setlength\LTright\fill -$if(multirow)$ -\usepackage{multirow} -$endif$ -\usepackage{calc} % for calculating minipage widths -$if(beamer)$ -\usepackage{caption} -% Make caption package work with longtable -\makeatletter -\def\fnum@table{\tablename~\thetable} -\makeatother -$else$ -% Correct order of tables after \paragraph or \subparagraph -\usepackage{etoolbox} -\makeatletter -\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{} -\makeatother -% Allow footnotes in longtable head/foot -\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}} -\makesavenoteenv{longtable} -$endif$ -$endif$ -% add backlinks to footnote references, cf. https://tex.stackexchange.com/questions/302266/make-footnote-clickable-both-ways -$if(footnotes-disable-backlinks)$ -$else$ -\usepackage{footnotebackref} -$endif$ -\usepackage{titling} -\usepackage{fancyhdr} -\usepackage{lastpage} -\usepackage{enumitem} -\usepackage{amsfonts} -\usepackage{sectsty} -\sectionfont{\clearpage} -$if(graphics)$ -\usepackage{graphicx} -\makeatletter -\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} -\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} -\makeatother -% Scale images if necessary, so that they will not overflow the page -% margins by default, and it is still possible to overwrite the defaults -% using explicit options in \includegraphics[width, height, ...]{} -\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} -% Set default figure placement to htbp -\makeatletter -\def\fps@figure{htbp} -\makeatother -$endif$ -$if(links-as-notes)$ -% Make links footnotes instead of hotlinks: -\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}} -$endif$ -$if(strikeout)$ -$-- also used for underline -\usepackage[normalem]{ulem} -% Avoid problems with \sout in headers with hyperref -\pdfstringdefDisableCommands{\renewcommand{\sout}{}} -$endif$ -\setlength{\emergencystretch}{3em} % prevent overfull lines -\providecommand{\tightlist}{% - \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} -$if(numbersections)$ -\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} -$else$ -\setcounter{secnumdepth}{-\maxdimen} % remove section numbering -$endif$ -$if(beamer)$ -$else$ -$if(block-headings)$ -% Make \paragraph and \subparagraph free-standing -\ifx\paragraph\undefined\else - \let\oldparagraph\paragraph - \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} -\fi -\ifx\subparagraph\undefined\else - \let\oldsubparagraph\subparagraph - \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} -\fi -$endif$ -$endif$ -$if(pagestyle)$ -\pagestyle{$pagestyle$} -$endif$ -$if(csl-refs)$ -\newlength{\cslhangindent} -\setlength{\cslhangindent}{1.5em} -\newlength{\csllabelwidth} -\setlength{\csllabelwidth}{3em} -\newlength{\cslentryspacingunit} % times entry-spacing -\setlength{\cslentryspacingunit}{\parskip} -\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing - {% don't indent paragraphs - \setlength{\parindent}{0pt} - % turn on hanging indent if param 1 is 1 - \ifodd #1 - \let\oldpar\par - \def\par{\hangindent=\cslhangindent\oldpar} - \fi - % set entry spacing - \setlength{\parskip}{#2\cslentryspacingunit} - }% - {} -\usepackage{calc} -\newcommand{\CSLBlock}[1]{#1\hfill\break} -\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} -\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break} -\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} -$endif$ -$for(header-includes)$ -$header-includes$ -$endfor$ -$if(lang)$ -\usepackage[$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} -% get rid of language-specific shorthands (see #6817): -\let\LanguageShortHands\languageshorthands -\def\languageshorthands#1{} -$endif$ -\ifLuaTeX - \usepackage{selnolig} % disable illegal ligatures -\fi -$if(dir)$ -\ifXeTeX - % Load bidi as late as possible as it modifies e.g. graphicx - \usepackage{bidi} -\fi -\ifPDFTeX - \TeXXeTstate=1 - \newcommand{\RL}[1]{\beginR #1\endR} - \newcommand{\LR}[1]{\beginL #1\endL} - \newenvironment{RTL}{\beginR}{\endR} - \newenvironment{LTR}{\beginL}{\endL} -\fi -$endif$ -$if(natbib)$ -\usepackage[$natbiboptions$]{natbib} -\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} -$endif$ -$if(biblatex)$ -\usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} -$for(bibliography)$ -\addbibresource{$bibliography$} -$endfor$ -$endif$ -$if(nocite-ids)$ -\nocite{$for(nocite-ids)$$it$$sep$, $endfor$} -$endif$ -$if(csquotes)$ -\usepackage{csquotes} -$endif$ - -$if(title)$ -\title{$title$$if(thanks)$\thanks{$thanks$}$endif$} -$endif$ -$if(subtitle)$ -$if(beamer)$ -$else$ -\usepackage{etoolbox} -\makeatletter -\providecommand{\subtitle}[1]{% add subtitle to \maketitle - \apptocmd{\@title}{\par {\large #1 \par}}{}{} -} -\makeatother -$endif$ -\subtitle{$subtitle$} -$endif$ -\author{$for(author)$$author$$sep$ \and $endfor$} -\date{$date$} -$if(beamer)$ -$if(institute)$ -\institute{$for(institute)$$institute$$sep$ \and $endfor$} -$endif$ -$if(titlegraphic)$ -\titlegraphic{\includegraphics{$titlegraphic$}} -$endif$ -$if(logo)$ -\logo{\includegraphics{$logo$}} -$endif$ -$endif$ - - - -%% -%% added -%% - -$if(page-background)$ -\usepackage[pages=all]{background} -$endif$ - -% -% for the background color of the title page -% -$if(titlepage)$ -\usepackage{pagecolor} -\usepackage{afterpage} -$if(titlepage-background)$ -\usepackage{tikz} -$endif$ -$endif$ - -% -% break urls -% -\PassOptionsToPackage{hyphens}{url} - -% -% When using babel or polyglossia with biblatex, loading csquotes is recommended -% to ensure that quoted texts are typeset according to the rules of your main language. -% -\usepackage{csquotes} - -% -% captions -% -\definecolor{caption-color}{HTML}{7030A0} -$if(beamer)$ -$else$ -\usepackage[font={stretch=1.2}, textfont={color=caption-color}, position=top, skip=4mm, labelfont=bf, singlelinecheck=false, justification=$if(caption-justification)$$caption-justification$$else$raggedright$endif$]{caption} -\setcapindent{0em} -$endif$ - -\usepackage{awesomebox} -% -% blockquote -% -\definecolor{blockquote-border}{RGB}{221,221,221} -\definecolor{blockquote-text}{RGB}{119,119,119} -\usepackage{mdframed} -\newmdenv[rightline=false,bottomline=false,topline=false,linewidth=3pt,linecolor=blockquote-border,skipabove=\parskip]{customblockquote} -\renewenvironment{quote}{\begin{customblockquote}\list{}{\rightmargin=0em\leftmargin=0em}% -\item\relax\color{blockquote-text}\ignorespaces}{\unskip\unskip\endlist\end{customblockquote}} - -% -% Source Sans Pro as the de­fault font fam­ily -% Source Code Pro for monospace text -% -% 'default' option sets the default -% font family to Source Sans Pro, not \sfdefault. -% -\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex - $if(fontfamily)$ - $else$ - \usepackage[default]{sourcesanspro} - \usepackage{sourcecodepro} - $endif$ -\else % if not pdftex - $if(mainfont)$ - $else$ - \usepackage[default]{sourcesanspro} - \usepackage{sourcecodepro} - - % XeLaTeX specific adjustments for straight quotes: https://tex.stackexchange.com/a/354887 - % This issue is already fixed (see https://github.com/silkeh/latex-sourcecodepro/pull/5) but the - % fix is still unreleased. - % TODO: Remove this workaround when the new version of sourcecodepro is released on CTAN. - \ifxetex - \makeatletter - \defaultfontfeatures[\ttfamily] - { Numbers = \sourcecodepro@figurestyle, - Scale = \SourceCodePro@scale, - Extension = .otf } - \setmonofont - [ UprightFont = *-\sourcecodepro@regstyle, - ItalicFont = *-\sourcecodepro@regstyle It, - BoldFont = *-\sourcecodepro@boldstyle, - BoldItalicFont = *-\sourcecodepro@boldstyle It ] - {SourceCodePro} - \makeatother - \fi - $endif$ -\fi - -% -% heading color -% -\definecolor{heading-color}{HTML}{7030A0} -$if(beamer)$ -$else$ -\addtokomafont{section}{\color{heading-color} \fontsize{16pt}{19pt}\selectfont} -\addtokomafont{subsection}{\color{heading-color} \fontsize{14pt}{17pt}\selectfont} -\addtokomafont{subsubsection}{\color{heading-color} \fontsize{12pt}{14pt}\selectfont} -\addtokomafont{paragraph}{\color{heading-color} \fontsize{12pt}{14pt}\selectfont \itshape} -\addtokomafont{subparagraph}{\color{heading-color} \fontsize{12pt}{14pt}\selectfont \itshape} -$endif$ -% When using the classes report, scrreprt, book, -% scrbook or memoir, uncomment the following line. -%\addtokomafont{chapter}{\color{heading-color}} - -% -% variables for title, author and date -% -$if(beamer)$ -$else$ -\title{$title$} -\author{$for(author)$$author$$sep$, $endfor$} -\date{$date$} -$endif$ - -% -% tables -% -$if(tables)$ - -\definecolor{table-row-color}{HTML}{F5F5F5} -\definecolor{table-rule-color}{HTML}{999999} - -%\arrayrulecolor{black!40} -\arrayrulecolor{table-rule-color} % color of \toprule, \midrule, \bottomrule -\setlength\heavyrulewidth{0.3ex} % thickness of \toprule, \bottomrule -\renewcommand{\arraystretch}{1.3} % spacing (padding) - -$if(table-use-row-colors)$ -% TODO: This doesn't work anymore. I don't know why. -% Reset rownum counter so that each table -% starts with the same row colors. -% https://tex.stackexchange.com/questions/170637/restarting-rowcolors -% -% Unfortunately the colored cells extend beyond the edge of the -% table because pandoc uses @-expressions (@{}) like so: -% -% \begin{longtable}[]{@{}ll@{}} -% \end{longtable} -% -% https://en.wikibooks.org/wiki/LaTeX/Tables#.40-expressions -\let\oldlongtable\longtable -\let\endoldlongtable\endlongtable -\renewenvironment{longtable}{ -\rowcolors{3}{}{table-row-color!100} % row color -\oldlongtable} { -\endoldlongtable -\global\rownum=0\relax} -$endif$ -$endif$ - -% -% remove paragraph indention -% -\setlength{\parindent}{0pt} -\setlength{\parskip}{6pt plus 2pt minus 1pt} -\setlength{\emergencystretch}{3em} % prevent overfull lines - -% -% -% Listings -% -% - -$if(listings)$ - -% -% general listing colors -% -\definecolor{listing-background}{HTML}{F7F7F7} -\definecolor{listing-rule}{HTML}{B3B2B3} -\definecolor{listing-numbers}{HTML}{B3B2B3} -\definecolor{listing-text-color}{HTML}{000000} -\definecolor{listing-keyword}{HTML}{435489} -\definecolor{listing-keyword-2}{HTML}{1284CA} % additional keywords -\definecolor{listing-keyword-3}{HTML}{9137CB} % additional keywords -\definecolor{listing-identifier}{HTML}{435489} -\definecolor{listing-string}{HTML}{00999A} -\definecolor{listing-comment}{HTML}{8E8E8E} -\colorlet{punct}{red!60!black} -\definecolor{delim}{RGB}{20,105,176} -\colorlet{numb}{magenta!60!black} - -\lstdefinestyle{listing_style}{ -$if(listings-disable-line-numbers)$ - xleftmargin = 0.6em, - framexleftmargin = 0.4em, -$else$ - numbers = left, - xleftmargin = 2.7em, - framexleftmargin = 2.5em, -$endif$ - backgroundcolor = \color{listing-background}, - basicstyle = \color{listing-text-color}\linespread{1.2}$if(code-block-font-size)$$code-block-font-size$$else$\footnotesize$endif$\ttfamily{}, - breaklines = true, - breakatwhitespace = true, - breakautoindent = true, - linewidth = \textwidth, - frame = single, - framesep = 0.19em, - rulecolor = \color{listing-rule}, - frameround = ffff, - tabsize = 2, - numberstyle = \color{listing-numbers}, - numbersep = 5pt, - aboveskip = 1.0em, - belowskip = 0.1em, - abovecaptionskip = 0em, - belowcaptionskip = 1.0em, - keywordstyle = {\color{listing-keyword}\bfseries}, - keywordstyle = {[2]\color{listing-keyword-2}\bfseries}, - keywordstyle = {[3]\color{listing-keyword-3}\bfseries\itshape}, - sensitive = true, - showspaces = false, - showstringspaces = false, - showtabs = false, - captionpos = b, - identifierstyle = \color{listing-identifier}, - commentstyle = \color{listing-comment}, - stringstyle = \color{listing-string}, - showstringspaces = false, - escapeinside = {/*@}{@*/}, % Allow LaTeX inside these special comments - literate = - {á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1 - {Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1 - {à}{{\`a}}1 {è}{{\'e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1 - {À}{{\`A}}1 {È}{{\'E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1 - {ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1 - {Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1 - {â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1 - {Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1 - {œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1 - {ç}{{\c c}}1 {Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1 - {€}{{\EUR}}1 {£}{{\pounds}}1 {«}{{\guillemotleft}}1 - {»}{{\guillemotright}}1 {ñ}{{\~n}}1 {Ñ}{{\~N}}1 {¿}{{?`}}1 - {…}{{\ldots}}1 {≥}{{>=}}1 {≤}{{<=}}1 {„}{{\glqq}}1 {“}{{\grqq}}1 - {”}{{''}}1 -} -\lstset{style=listing_style} - -% -% Java (Java SE 12, 2019-06-22) -% -\lstdefinelanguage{Java}{ - morekeywords={ - % normal keywords (without data types) - abstract,assert,break,case,catch,class,continue,default, - do,else,enum,exports,extends,final,finally,for,if,implements, - import,instanceof,interface,module,native,new,package,private, - protected,public,requires,return,static,strictfp,super,switch, - synchronized,this,throw,throws,transient,try,volatile,while, - % var is an identifier - var - }, - morekeywords={[2] % data types - % primitive data types - boolean,byte,char,double,float,int,long,short, - % String - String, - % primitive wrapper types - Boolean,Byte,Character,Double,Float,Integer,Long,Short - % number types - Number,AtomicInteger,AtomicLong,BigDecimal,BigInteger,DoubleAccumulator,DoubleAdder,LongAccumulator,LongAdder,Short, - % other - Object,Void,void - }, - morekeywords={[3] % literals - % reserved words for literal values - null,true,false, - }, - sensitive, - morecomment = [l]//, - morecomment = [s]{/*}{*/}, - morecomment = [s]{/**}{*/}, - morestring = [b]", - morestring = [b]', -} - -\lstdefinelanguage{XML}{ - morestring = [b]", - moredelim = [s][\bfseries\color{listing-keyword}]{<}{\ }, - moredelim = [s][\bfseries\color{listing-keyword}]{}, - moredelim = [l][\bfseries\color{listing-keyword}]{/>}, - moredelim = [l][\bfseries\color{listing-keyword}]{>}, - morecomment = [s]{}, - morecomment = [s]{}, - commentstyle = \color{listing-comment}, - stringstyle = \color{listing-string}, - identifierstyle = \color{listing-identifier} -} - -\lstdefinelanguage{JSON}{ - literate= - *{0}{{{\color{numb}0}}}{1} - {1}{{{\color{numb}1}}}{1} - {2}{{{\color{numb}2}}}{1} - {3}{{{\color{numb}3}}}{1} - {4}{{{\color{numb}4}}}{1} - {5}{{{\color{numb}5}}}{1} - {6}{{{\color{numb}6}}}{1} - {7}{{{\color{numb}7}}}{1} - {8}{{{\color{numb}8}}}{1} - {9}{{{\color{numb}9}}}{1} - {:}{{{\color{punct}{:}}}}{1} - {,}{{{\color{punct}{,}}}}{1} - {\{}{{{\color{delim}{\{}}}}{1} - {\}}{{{\color{delim}{\}}}}}{1} - {[}{{{\color{delim}{[}}}}{1} - {]}{{{\color{delim}{]}}}}{1} -} - -\lstdefinelanguage{PowerShell}{ - morekeywords={ - Add-Content,Add-PSSnapin,Clear-Content,Clear-History,Clear-Host,Clear-Item,Clear-ItemProperty,Clear-Variable,Compare-Object,Connect-PSSession,ConvertFrom-String,Convert-Path,Copy-Item,Copy-ItemProperty,Disable-PSBreakpoint,Disconnect-PSSession,Enable-PSBreakpoint,Enter-PSSession,Exit-PSSession,Export-Alias,Export-Csv,Export-PSSession,ForEach-Object,Format-Custom,Format-Hex,Format-List,Format-Table,Format-Wide,Get-Alias,Get-ChildItem,Get-Clipboard,Get-Command,Get-ComputerInfo,Get-Content,Get-History,Get-Item,Get-ItemProperty,Get-ItemPropertyValue,Get-Job,Get-Location,Get-Member,Get-Module,Get-Process,Get-PSBreakpoint,Get-PSCallStack,Get-PSDrive,Get-PSSession,Get-PSSnapin,Get-Service,Get-TimeZone,Get-Unique,Get-Variable,Get-WmiObject,Group-Object,help,Import-Alias,Import-Csv,Import-Module,Import-PSSession,Invoke-Command,Invoke-Expression,Invoke-History,Invoke-Item,Invoke-RestMethod,Invoke-WebRequest,Invoke-WmiMethod,Measure-Object,mkdir,Move-Item,Move-ItemProperty,New-Alias,New-Item,New-Module,New-PSDrive,New-PSSession,New-PSSessionConfigurationFile,New-Variable,Out-GridView,Out-Host,Out-Printer,Pop-Location,powershell_ise.exe,Push-Location,Receive-Job,Receive-PSSession,Remove-Item,Remove-ItemProperty,Remove-Job,Remove-Module,Remove-PSBreakpoint,Remove-PSDrive,Remove-PSSession,Remove-PSSnapin,Remove-Variable,Remove-WmiObject,Rename-Item,Rename-ItemProperty,Resolve-Path,Resume-Job,Select-Object,Select-String,Set-Alias,Set-Clipboard,Set-Content,Set-Item,Set-ItemProperty,Set-Location,Set-PSBreakpoint,Set-TimeZone,Set-Variable,Set-WmiInstance,Show-Command,Sort-Object,Start-Job,Start-Process,Start-Service,Start-Sleep,Stop-Job,Stop-Process,Stop-Service,Suspend-Job,Tee-Object,Trace-Command,Wait-Job,Where-Object,Write-Output - }, - morekeywords={ - Add-AppxPackage,Add-AppxProvisionedPackage,Add-AppxVolume,Add-BitsFile,Add-CertificateEnrollmentPolicyServer,Add-Computer,Add-Content,Add-History,Add-JobTrigger,Add-KdsRootKey,Add-LocalGroupMember,Add-Member,Add-PSSnapin,Add-Type,Add-WindowsCapability,Add-WindowsDriver,Add-WindowsImage,Add-WindowsPackage,Checkpoint-Computer,Clear-Content,Clear-EventLog,Clear-History,Clear-Item,Clear-ItemProperty,Clear-KdsCache,Clear-RecycleBin,Clear-Tpm,Clear-Variable,Clear-WindowsCorruptMountPoint,Compare-Object,Complete-BitsTransfer,Complete-DtiagnosticTransaction,Complete-Transaction,Confirm-SecureBootUEFI,Connect-PSSession,Connect-WSMan,ConvertFrom-Csv,ConvertFrom-Json,ConvertFrom-SecureString,ConvertFrom-String,ConvertFrom-StringData,Convert-Path,Convert-String,ConvertTo-Csv,ConvertTo-Html,ConvertTo-Json,ConvertTo-ProcessMitigationPolicy,ConvertTo-SecureString,ConvertTo-TpmOwnerAuth,ConvertTo-Xml,Copy-Item,Copy-ItemProperty,Debug-Job,Debug-Process,Debug-Runspace,Disable-AppBackgroundTaskDiagnosticLog,Disable-ComputerRestore,Disable-JobTrigger,Disable-LocalUser,Disable-PSBreakpoint,Disable-PSRemoting,Disable-PSSessionConfiguration,Disable-RunspaceDebug,Disable-ScheduledJob,Disable-TlsCipherSuite,Disable-TlsEccCurve,Disable-TlsSessionTicketKey,Disable-TpmAutoProvisioning,Disable-WindowsErrorReporting,Disable-WindowsOptionalFeature,Disable-WSManCredSSP,Disconnect-PSSession,Disconnect-WSMan,Dismount-AppxVolume,Dismount-WindowsImage,Enable-AppBackgroundTaskDiagnosticLog,Enable-ComputerRestore,Enable-JobTrigger,Enable-LocalUser,Enable-PSBreakpoint,Enable-PSRemoting,Enable-PSSessionConfiguration,Enable-RunspaceDebug,Enable-ScheduledJob,Enable-TlsCipherSuite,Enable-TlsEccCurve,Enable-TlsSessionTicketKey,Enable-TpmAutoProvisioning,Enable-WindowsErrorReporting,Enable-WindowsOptionalFeature,Enable-WSManCredSSP,Enter-PSHostProcess,Enter-PSSession,Exit-PSHostProcess,Exit-PSSession,Expand-WindowsCustomDataImage,Expand-WindowsImage,Export-Alias,Export-BinaryMiLog,Export-Certificate,Export-Clixml,Export-Console,Export-Counter,Export-Csv,Export-FormatData,Export-ModuleMember,Export-PfxCertificate,Export-ProvisioningPackage,Export-PSSession,Export-StartLayout,Export-StartLayoutEdgeAssets,Export-TlsSessionTicketKey,Export-Trace,Export-WindowsCapabilitySource,Export-WindowsDriver,Export-WindowsImage,Find-Package,Find-PackageProvider,ForEach-Object,Format-Custom,Format-List,Format-SecureBootUEFI,Format-Table,Format-Wide,Get-Acl,Get-Alias,Get-AppxDefaultVolume,Get-AppxPackage,Get-AppxPackageManifest,Get-AppxProvisionedPackage,Get-AppxVolume,Get-AuthenticodeSignature,Get-BitsTransfer,Get-Certificate,Get-CertificateAutoEnrollmentPolicy,Get-CertificateEnrollmentPolicyServer,Get-CertificateNotificationTask,Get-ChildItem,Get-CimAssociatedInstance,Get-CimClass,Get-CimInstance,Get-CimSession,Get-Clipboard,Get-CmsMessage,Get-Command,Get-ComputerInfo,Get-ComputerRestorePoint,Get-Content,Get-ControlPanelItem,Get-Counter,Get-Credential,Get-Culture,Get-DAPolicyChange,Get-Date,Get-DeliveryOptimizationLog,Get-DeliveryOptimizationPerfSnap,Get-DeliveryOptimizationPerfSnapThisMonth,Get-DeliveryOptimizationStatus,Get-DODownloadMode,Get-DOPercentageMaxBackgroundBandwidth,Get-DOPercentageMaxForegroundBandwidth,Get-Event,Get-EventLog,Get-EventSubscriber,Get-ExecutionPolicy,Get-FormatData,Get-Help,Get-History,Get-Host,Get-HotFix,Get-Item,Get-ItemProperty,Get-ItemPropertyValue,Get-Job,Get-JobTrigger,Get-KdsConfiguration,Get-KdsRootKey,Get-LocalGroup,Get-LocalGroupMember,Get-LocalUser,Get-Location,Get-Member,Get-Module,Get-Package,Get-PackageProvider,Get-PackageSource,Get-PfxCertificate,Get-PfxData,Get-PmemDisk,Get-PmemPhysicalDevice,Get-PmemUnusedRegion,Get-Process,Get-ProcessMitigation,Get-ProvisioningPackage,Get-PSBreakpoint,Get-PSCallStack,Get-PSDrive,Get-PSHostProcessInfo,Get-PSProvider,Get-PSReadlineKeyHandler,Get-PSReadlineOption,Get-PSSession,Get-PSSessionCapability,Get-PSSessionConfiguration,Get-PSSnapin,Get-Random,Get-Runspace,Get-RunspaceDebug,Get-ScheduledJob,Get-ScheduledJobOption,Get-SecureBootPolicy,Get-SecureBootUEFI,Get-Service,Get-TimeZone,Get-TlsCipherSuite,Get-TlsEccCurve,Get-Tpm,Get-TpmEndorsementKeyInfo,Get-TpmSupportedFeature,Get-TraceSource,Get-Transaction,Get-TroubleshootingPack,Get-TrustedProvisioningCertificate,Get-TypeData,Get-UICulture,Get-Unique,Get-Variable,Get-WIMBootEntry,Get-WinAcceptLanguageFromLanguageListOptOut,Get-WinCultureFromLanguageListOptOut,Get-WinDefaultInputMethodOverride,Get-WindowsCapability,Get-WindowsDeveloperLicense,Get-WindowsDriver,Get-WindowsEdition,Get-WindowsErrorReporting,Get-WindowsImage,Get-WindowsImageContent,Get-WindowsOptionalFeature,Get-WindowsPackage,Get-WindowsSearchSetting,Get-WinEvent,Get-WinHomeLocation,Get-WinLanguageBarOption,Get-WinSystemLocale,Get-WinUILanguageOverride,Get-WinUserLanguageList,Get-WmiObject,Get-WSManCredSSP,Get-WSManInstance,Group-Object,Import-Alias,Import-BinaryMiLog,Import-Certificate,Import-Clixml,Import-Counter,Import-Csv,Import-LocalizedData,Import-Module,Import-PackageProvider,Import-PfxCertificate,Import-PSSession,Import-StartLayout,Import-TpmOwnerAuth,Initialize-PmemPhysicalDevice,Initialize-Tpm,Install-Package,Install-PackageProvider,Install-ProvisioningPackage,Install-TrustedProvisioningCertificate,Invoke-CimMethod,Invoke-Command,Invoke-CommandInDesktopPackage,Invoke-DscResource,Invoke-Expression,Invoke-History,Invoke-Item,Invoke-RestMethod,Invoke-TroubleshootingPack,Invoke-WebRequest,Invoke-WmiMethod,Invoke-WSManAction,Join-DtiagnosticResourceManager,Join-Path,Limit-EventLog,Measure-Command,Measure-Object,Mount-AppxVolume,Mount-WindowsImage,Move-AppxPackage,Move-Item,Move-ItemProperty,New-Alias,New-CertificateNotificationTask,New-CimInstance,New-CimSession,New-CimSessionOption,New-DtiagnosticTransaction,New-Event,New-EventLog,New-FileCatalog,New-Item,New-ItemProperty,New-JobTrigger,New-LocalGroup,New-LocalUser,New-Module,New-ModuleManifest,New-NetIPsecAuthProposal,New-NetIPsecMainModeCryptoProposal,New-NetIPsecQuickModeCryptoProposal,New-Object,New-PmemDisk,New-ProvisioningRepro,New-PSDrive,New-PSRoleCapabilityFile,New-PSSession,New-PSSessionConfigurationFile,New-PSSessionOption,New-PSTransportOption,New-PSWorkflowExecutionOption,New-ScheduledJobOption,New-SelfSignedCertificate,New-Service,New-TimeSpan,New-TlsSessionTicketKey,New-Variable,New-WebServiceProxy,New-WindowsCustomImage,New-WindowsImage,New-WinEvent,New-WinUserLanguageList,New-WSManInstance,New-WSManSessionOption,Optimize-AppxProvisionedPackages,Optimize-WindowsImage,Out-Default,Out-File,Out-GridView,Out-Host,Out-Null,Out-Printer,Out-String,Pop-Location,Protect-CmsMessage,Publish-DscConfiguration,Push-Location,Read-Host,Receive-DtiagnosticTransaction,Receive-Job,Receive-PSSession,Register-ArgumentCompleter,Register-CimIndicationEvent,Register-EngineEvent,Register-ObjectEvent,Register-PackageSource,Register-PSSessionConfiguration,Register-ScheduledJob,Register-WmiEvent,Remove-AppxPackage,Remove-AppxProvisionedPackage,Remove-AppxVolume,Remove-BitsTransfer,Remove-CertificateEnrollmentPolicyServer,Remove-CertificateNotificationTask,Remove-CimInstance,Remove-CimSession,Remove-Computer,Remove-Event,Remove-EventLog,Remove-Item,Remove-ItemProperty,Remove-Job,Remove-JobTrigger,Remove-LocalGroup,Remove-LocalGroupMember,Remove-LocalUser,Remove-Module,Remove-PmemDisk,Remove-PSBreakpoint,Remove-PSDrive,Remove-PSReadlineKeyHandler,Remove-PSSession,Remove-PSSnapin,Remove-TypeData,Remove-Variable,Remove-WindowsCapability,Remove-WindowsDriver,Remove-WindowsImage,Remove-WindowsPackage,Remove-WmiObject,Remove-WSManInstance,Rename-Computer,Rename-Item,Rename-ItemProperty,Rename-LocalGroup,Rename-LocalUser,Repair-WindowsImage,Reset-ComputerMachinePassword,Resolve-DnsName,Resolve-Path,Restart-Computer,Restart-Service,Restore-Computer,Resume-BitsTransfer,Resume-Job,Resume-ProvisioningSession,Resume-Service,Save-Help,Save-Package,Save-WindowsImage,Select-Object,Select-String,Select-Xml,Send-DtiagnosticTransaction,Send-MailMessage,Set-Acl,Set-Alias,Set-AppBackgroundTaskResourcePolicy,Set-AppxDefaultVolume,Set-AppXProvisionedDataFile,Set-AuthenticodeSignature,Set-BitsTransfer,Set-CertificateAutoEnrollmentPolicy,Set-CimInstance,Set-Clipboard,Set-Content,Set-Culture,Set-Date,Set-DODownloadMode,Set-DOPercentageMaxBackgroundBandwidth,Set-DOPercentageMaxForegroundBandwidth,Set-DscLocalConfigurationManager,Set-ExecutionPolicy,Set-Item,Set-ItemProperty,Set-JobTrigger,Set-KdsConfiguration,Set-LocalGroup,Set-LocalUser,Set-Location,Set-PackageSource,Set-ProcessMitigation,Set-PSBreakpoint,Set-PSDebug,Set-PSReadlineKeyHandler,Set-PSReadlineOption,Set-PSSessionConfiguration,Set-ScheduledJob,Set-ScheduledJobOption,Set-SecureBootUEFI,Set-Service,Set-StrictMode,Set-TimeZone,Set-TpmOwnerAuth,Set-TraceSource,Set-Variable,Set-WinAcceptLanguageFromLanguageListOptOut,Set-WinCultureFromLanguageListOptOut,Set-WinDefaultInputMethodOverride,Set-WindowsEdition,Set-WindowsProductKey,Set-WindowsSearchSetting,Set-WinHomeLocation,Set-WinLanguageBarOption,Set-WinSystemLocale,Set-WinUILanguageOverride,Set-WinUserLanguageList,Set-WmiInstance,Set-WSManInstance,Set-WSManQuickConfig,Show-Command,Show-ControlPanelItem,Show-EventLog,Show-WindowsDeveloperLicenseRegistration,Sort-Object,Split-Path,Split-WindowsImage,Start-BitsTransfer,Start-DscConfiguration,Start-DtiagnosticResourceManager,Start-Job,Start-Process,Start-Service,Start-Sleep,Start-Transaction,Start-Transcript,Stop-Computer,Stop-DtiagnosticResourceManager,Stop-Job,Stop-Process,Stop-Service,Stop-Transcript,Suspend-BitsTransfer,Suspend-Job,Suspend-Service,Switch-Certificate,Tee-Object,Test-Certificate,Test-ComputerSecureChannel,Test-Connection,Test-DscConfiguration,Test-FileCatalog,Test-KdsRootKey,Test-ModuleManifest,Test-Path,Test-PSSessionConfigurationFile,Test-WSMan,Trace-Command,Unblock-File,Unblock-Tpm,Undo-DtiagnosticTransaction,Undo-Transaction,Uninstall-Package,Uninstall-ProvisioningPackage,Uninstall-TrustedProvisioningCertificate,Unprotect-CmsMessage,Unregister-Event,Unregister-PackageSource,Unregister-PSSessionConfiguration,Unregister-ScheduledJob,Unregister-WindowsDeveloperLicense,Update-FormatData,Update-Help,Update-List,Update-TypeData,Update-WIMBootEntry,Use-Transaction,Use-WindowsUnattend,Wait-Debugger,Wait-Event,Wait-Job,Wait-Process,Where-Object,Write-Debug,Write-Error,Write-EventLog,Write-Host,Write-Information,Write-Output,Write-Progress,Write-Verbose,Write-Warning - }, - morekeywords={ - Add-BitLockerKeyProtector,Add-DnsClientNrptRule,Add-DtcClusterTMMapping,Add-EtwTraceProvider,Add-InitiatorIdToMaskingSet,Add-MpPreference,Add-NetEventNetworkAdapter,Add-NetEventPacketCaptureProvider,Add-NetEventProvider,Add-NetEventVFPProvider,Add-NetEventVmNetworkAdapter,Add-NetEventVmSwitch,Add-NetEventVmSwitchProvider,Add-NetEventWFPCaptureProvider,Add-NetIPHttpsCertBinding,Add-NetLbfoTeamMember,Add-NetLbfoTeamNic,Add-NetNatExternalAddress,Add-NetNatStaticMapping,Add-NetSwitchTeamMember,Add-Odbsn,Add-PartitionAccessPath,Add-PhysicalDisk,Add-Printer,Add-PrinterDriver,Add-PrinterPort,Add-StorageFaultDomain,Add-TargetPortToMaskingSet,Add-VirtualDiskToMaskingSet,Add-VpnConnection,Add-VpnConnectionRoute,Add-VpnConnectionTriggerApplication,Add-VpnConnectionTriggerDnsConfiguration,Add-VpnConnectionTriggerTrustedNetwork,AfterAll,AfterEach,Assert-MockCalled,Assert-VerifiableMocks,Backup-BitLockerKeyProtector,BackupToAAD-BitLockerKeyProtector,BeforeAll,BeforeEach,Block-FileShareAccess,Block-SmbShareAccess,Clear-BitLockerAutoUnlock,Clear-Disk,Clear-DnsClientCache,Clear-FileStorageTier,Clear-Host,Clear-PcsvDeviceLog,Clear-StorageDiagnosticInfo,Close-SmbOpenFile,Close-SmbSession,Compress-Archive,Configuration,Connect-IscsiTarget,Connect-VirtualDisk,Context,convert,ConvertFrom-SddlString,Copy-NetFirewallRule,Copy-NetIPsecMainModeCryptoSet,Copy-NetIPsecMainModeRule,Copy-NetIPsecPhase1AuthSet,Copy-NetIPsecPhase2AuthSet,Copy-NetIPsecQuickModeCryptoSet,Copy-NetIPsecRule,Debug-FileShare,Debug-MMAppPrelaunch,Debug-StorageSubSystem,Debug-Volume,Describe,Disable-BitLocker,Disable-BitLockerAutoUnlock,Disable-DAManualEntryPointSelection,Disable-Dsebug,Disable-MMAgent,Disable-NetAdapter,Disable-NetAdapterBinding,Disable-NetAdapterChecksumOffload,Disable-NetAdapterEncapsulatedPacketTaskOffload,Disable-NetAdapterIPsecOffload,Disable-NetAdapterLso,Disable-NetAdapterPacketDirect,Disable-NetAdapterPowerManagement,Disable-NetAdapterQos,Disable-NetAdapterRdma,Disable-NetAdapterRsc,Disable-NetAdapterRss,Disable-NetAdapterSriov,Disable-NetAdapterVmq,Disable-NetDnsTransitionConfiguration,Disable-NetFirewallRule,Disable-NetIPHttpsProfile,Disable-NetIPsecMainModeRule,Disable-NetIPsecRule,Disable-NetNatTransitionConfiguration,Disable-NetworkSwitchEthernetPort,Disable-NetworkSwitchFeature,Disable-NetworkSwitchVlan,Disable-OdbcPerfCounter,Disable-PhysicalDiskIdentification,Disable-PnpDevice,Disable-PSTrace,Disable-PSWSManCombinedTrace,Disable-ScheduledTask,Disable-SmbDelegation,Disable-StorageEnclosureIdentification,Disable-StorageEnclosurePower,Disable-StorageHighAvailability,Disable-StorageMaintenanceMode,Disable-WdacBidTrace,Disable-WSManTrace,Disconnect-IscsiTarget,Disconnect-VirtualDisk,Dismount-DiskImage,Enable-BitLocker,Enable-BitLockerAutoUnlock,Enable-DAManualEntryPointSelection,Enable-Dsebug,Enable-MMAgent,Enable-NetAdapter,Enable-NetAdapterBinding,Enable-NetAdapterChecksumOffload,Enable-NetAdapterEncapsulatedPacketTaskOffload,Enable-NetAdapterIPsecOffload,Enable-NetAdapterLso,Enable-NetAdapterPacketDirect,Enable-NetAdapterPowerManagement,Enable-NetAdapterQos,Enable-NetAdapterRdma,Enable-NetAdapterRsc,Enable-NetAdapterRss,Enable-NetAdapterSriov,Enable-NetAdapterVmq,Enable-NetDnsTransitionConfiguration,Enable-NetFirewallRule,Enable-NetIPHttpsProfile,Enable-NetIPsecMainModeRule,Enable-NetIPsecRule,Enable-NetNatTransitionConfiguration,Enable-NetworkSwitchEthernetPort,Enable-NetworkSwitchFeature,Enable-NetworkSwitchVlan,Enable-OdbcPerfCounter,Enable-PhysicalDiskIdentification,Enable-PnpDevice,Enable-PSTrace,Enable-PSWSManCombinedTrace,Enable-ScheduledTask,Enable-SmbDelegation,Enable-StorageEnclosureIdentification,Enable-StorageEnclosurePower,Enable-StorageHighAvailability,Enable-StorageMaintenanceMode,Enable-WdacBidTrace,Enable-WSManTrace,Expand-Archive,Export-ODataEndpointProxy,Export-ScheduledTask,Find-Command,Find-DscResource,Find-Module,Find-NetIPsecRule,Find-NetRoute,Find-RoleCapability,Find-Script,Flush-EtwTraceSession,Format-Hex,Format-Volume,Get-AppBackgroundTask,Get-AppxLastError,Get-AppxLog,Get-AutologgerConfig,Get-BitLockerVolume,Get-ClusteredScheduledTask,Get-DAClientExperienceConfiguration,Get-DAConnectionStatus,Get-DAEntryPointTableItem,Get-DedupProperties,Get-Disk,Get-DiskImage,Get-DiskStorageNodeView,Get-DnsClient,Get-DnsClientCache,Get-DnsClientGlobalSetting,Get-DnsClientNrptGlobal,Get-DnsClientNrptPolicy,Get-DnsClientNrptRule,Get-DnsClientServerAddress,Get-DscConfiguration,Get-DscConfigurationStatus,Get-DscLocalConfigurationManager,Get-DscResource,Get-Dtc,Get-DtcAdvancedHostSetting,Get-DtcAdvancedSetting,Get-DtcClusterDefault,Get-DtcClusterTMMapping,Get-Dtefault,Get-DtcLog,Get-DtcNetworkSetting,Get-DtcTransaction,Get-DtcTransactionsStatistics,Get-DtcTransactionsTraceSession,Get-DtcTransactionsTraceSetting,Get-EtwTraceProvider,Get-EtwTraceSession,Get-FileHash,Get-FileIntegrity,Get-FileShare,Get-FileShareAccessControlEntry,Get-FileStorageTier,Get-InitiatorId,Get-InitiatorPort,Get-InstalledModule,Get-InstalledScript,Get-IscsiConnection,Get-IscsiSession,Get-IscsiTarget,Get-IscsiTargetPortal,Get-IseSnippet,Get-LogProperties,Get-MaskingSet,Get-MMAgent,Get-MockDynamicParameters,Get-MpComputerStatus,Get-MpPreference,Get-MpThreat,Get-MpThreatCatalog,Get-MpThreatDetection,Get-NCSIPolicyConfiguration,Get-Net6to4Configuration,Get-NetAdapter,Get-NetAdapterAdvancedProperty,Get-NetAdapterBinding,Get-NetAdapterChecksumOffload,Get-NetAdapterEncapsulatedPacketTaskOffload,Get-NetAdapterHardwareInfo,Get-NetAdapterIPsecOffload,Get-NetAdapterLso,Get-NetAdapterPacketDirect,Get-NetAdapterPowerManagement,Get-NetAdapterQos,Get-NetAdapterRdma,Get-NetAdapterRsc,Get-NetAdapterRss,Get-NetAdapterSriov,Get-NetAdapterSriovVf,Get-NetAdapterStatistics,Get-NetAdapterVmq,Get-NetAdapterVMQQueue,Get-NetAdapterVPort,Get-NetCompartment,Get-NetConnectionProfile,Get-NetDnsTransitionConfiguration,Get-NetDnsTransitionMonitoring,Get-NetEventNetworkAdapter,Get-NetEventPacketCaptureProvider,Get-NetEventProvider,Get-NetEventSession,Get-NetEventVFPProvider,Get-NetEventVmNetworkAdapter,Get-NetEventVmSwitch,Get-NetEventVmSwitchProvider,Get-NetEventWFPCaptureProvider,Get-NetFirewallAddressFilter,Get-NetFirewallApplicationFilter,Get-NetFirewallInterfaceFilter,Get-NetFirewallInterfaceTypeFilter,Get-NetFirewallPortFilter,Get-NetFirewallProfile,Get-NetFirewallRule,Get-NetFirewallSecurityFilter,Get-NetFirewallServiceFilter,Get-NetFirewallSetting,Get-NetIPAddress,Get-NetIPConfiguration,Get-NetIPHttpsConfiguration,Get-NetIPHttpsState,Get-NetIPInterface,Get-NetIPseospSetting,Get-NetIPsecMainModeCryptoSet,Get-NetIPsecMainModeRule,Get-NetIPsecMainModeSA,Get-NetIPsecPhase1AuthSet,Get-NetIPsecPhase2AuthSet,Get-NetIPsecQuickModeCryptoSet,Get-NetIPsecQuickModeSA,Get-NetIPsecRule,Get-NetIPv4Protocol,Get-NetIPv6Protocol,Get-NetIsatapConfiguration,Get-NetLbfoTeam,Get-NetLbfoTeamMember,Get-NetLbfoTeamNic,Get-NetNat,Get-NetNatExternalAddress,Get-NetNatGlobal,Get-NetNatSession,Get-NetNatStaticMapping,Get-NetNatTransitionConfiguration,Get-NetNatTransitionMonitoring,Get-NetNeighbor,Get-NetOffloadGlobalSetting,Get-NetPrefixPolicy,Get-NetQosPolicy,Get-NetRoute,Get-NetSwitchTeam,Get-NetSwitchTeamMember,Get-NetTCPConnection,Get-NetTCPSetting,Get-NetTeredoConfiguration,Get-NetTeredoState,Get-NetTransportFilter,Get-NetUDPEndpoint,Get-NetUDPSetting,Get-NetworkSwitchEthernetPort,Get-NetworkSwitchFeature,Get-NetworkSwitchGlobalData,Get-NetworkSwitchVlan,Get-Odbriver,Get-Odbsn,Get-OdbcPerfCounter,Get-OffloadDataTransferSetting,Get-OperationValidation,Get-Partition,Get-PartitionSupportedSize,Get-PcsvDevice,Get-PcsvDeviceLog,Get-PhysicalDisk,Get-PhysicalDiskStorageNodeView,Get-PhysicalExtent,Get-PhysicalExtentAssociation,Get-PnpDevice,Get-PnpDeviceProperty,Get-PrintConfiguration,Get-Printer,Get-PrinterDriver,Get-PrinterPort,Get-PrinterProperty,Get-PrintJob,Get-PSRepository,Get-ResiliencySetting,Get-ScheduledTask,Get-ScheduledTaskInfo,Get-SmbBandWidthLimit,Get-SmbClientConfiguration,Get-SmbClientNetworkInterface,Get-SmbConnection,Get-SmbDelegation,Get-SmbGlobalMapping,Get-SmbMapping,Get-SmbMultichannelConnection,Get-SmbMultichannelConstraint,Get-SmbOpenFile,Get-SmbServerConfiguration,Get-SmbServerNetworkInterface,Get-SmbSession,Get-SmbShare,Get-SmbShareAccess,Get-SmbWitnessClient,Get-StartApps,Get-StorageAdvancedProperty,Get-StorageDiagnosticInfo,Get-StorageEnclosure,Get-StorageEnclosureStorageNodeView,Get-StorageEnclosureVendorData,Get-StorageExtendedStatus,Get-StorageFaultDomain,Get-StorageFileServer,Get-StorageFirmwareInformation,Get-StorageHealthAction,Get-StorageHealthReport,Get-StorageHealthSetting,Get-StorageJob,Get-StorageNode,Get-StoragePool,Get-StorageProvider,Get-StorageReliabilityCounter,Get-StorageSetting,Get-StorageSubSystem,Get-StorageTier,Get-StorageTierSupportedSize,Get-SupportedClusterSizes,Get-SupportedFileSystems,Get-TargetPort,Get-TargetPortal,Get-TestDriveItem,Get-Verb,Get-VirtualDisk,Get-VirtualDiskSupportedSize,Get-Volume,Get-VolumeCorruptionCount,Get-VolumeScrubPolicy,Get-VpnConnection,Get-VpnConnectionTrigger,Get-WdacBidTrace,Get-WindowsUpdateLog,Get-WUAVersion,Get-WUIsPendingReboot,Get-WULastInstallationDate,Get-WULastScanSuccessDate,Grant-FileShareAccess,Grant-SmbShareAccess,help,Hide-VirtualDisk,Import-IseSnippet,Import-PowerShellDataFile,ImportSystemModules,In,Initialize-Disk,InModuleScope,Install-Dtc,Install-Module,Install-Script,Install-WUUpdates,Invoke-AsWorkflow,Invoke-Mock,Invoke-OperationValidation,Invoke-Pester,It,Lock-BitLocker,mkdir,Mock,more,Mount-DiskImage,Move-SmbWitnessClient,New-AutologgerConfig,New-DAEntryPointTableItem,New-DscChecksum,New-EapConfiguration,New-EtwTraceSession,New-FileShare,New-Fixture,New-Guid,New-IscsiTargetPortal,New-IseSnippet,New-MaskingSet,New-NetAdapterAdvancedProperty,New-NetEventSession,New-NetFirewallRule,New-NetIPAddress,New-NetIPHttpsConfiguration,New-NetIPseospSetting,New-NetIPsecMainModeCryptoSet,New-NetIPsecMainModeRule,New-NetIPsecPhase1AuthSet,New-NetIPsecPhase2AuthSet,New-NetIPsecQuickModeCryptoSet,New-NetIPsecRule,New-NetLbfoTeam,New-NetNat,New-NetNatTransitionConfiguration,New-NetNeighbor,New-NetQosPolicy,New-NetRoute,New-NetSwitchTeam,New-NetTransportFilter,New-NetworkSwitchVlan,New-Partition,New-PesterOption,New-PSWorkflowSession,New-ScheduledTask,New-ScheduledTaskAction,New-ScheduledTaskPrincipal,New-ScheduledTaskSettingsSet,New-ScheduledTaskTrigger,New-ScriptFileInfo,New-SmbGlobalMapping,New-SmbMapping,New-SmbMultichannelConstraint,New-SmbShare,New-StorageFileServer,New-StoragePool,New-StorageSubsystemVirtualDisk,New-StorageTier,New-TemporaryFile,New-VirtualDisk,New-VirtualDiskClone,New-VirtualDiskSnapshot,New-Volume,New-VpnServerAddress,Open-NetGPO,Optimize-StoragePool,Optimize-Volume,oss,Pause,prompt,PSConsoleHostReadline,Publish-Module,Publish-Script,Read-PrinterNfcTag,Register-ClusteredScheduledTask,Register-DnsClient,Register-IscsiSession,Register-PSRepository,Register-ScheduledTask,Register-StorageSubsystem,Remove-AutologgerConfig,Remove-BitLockerKeyProtector,Remove-DAEntryPointTableItem,Remove-DnsClientNrptRule,Remove-DscConfigurationDocument,Remove-DtcClusterTMMapping,Remove-EtwTraceProvider,Remove-FileShare,Remove-InitiatorId,Remove-InitiatorIdFromMaskingSet,Remove-IscsiTargetPortal,Remove-MaskingSet,Remove-MpPreference,Remove-MpThreat,Remove-NetAdapterAdvancedProperty,Remove-NetEventNetworkAdapter,Remove-NetEventPacketCaptureProvider,Remove-NetEventProvider,Remove-NetEventSession,Remove-NetEventVFPProvider,Remove-NetEventVmNetworkAdapter,Remove-NetEventVmSwitch,Remove-NetEventVmSwitchProvider,Remove-NetEventWFPCaptureProvider,Remove-NetFirewallRule,Remove-NetIPAddress,Remove-NetIPHttpsCertBinding,Remove-NetIPHttpsConfiguration,Remove-NetIPseospSetting,Remove-NetIPsecMainModeCryptoSet,Remove-NetIPsecMainModeRule,Remove-NetIPsecMainModeSA,Remove-NetIPsecPhase1AuthSet,Remove-NetIPsecPhase2AuthSet,Remove-NetIPsecQuickModeCryptoSet,Remove-NetIPsecQuickModeSA,Remove-NetIPsecRule,Remove-NetLbfoTeam,Remove-NetLbfoTeamMember,Remove-NetLbfoTeamNic,Remove-NetNat,Remove-NetNatExternalAddress,Remove-NetNatStaticMapping,Remove-NetNatTransitionConfiguration,Remove-NetNeighbor,Remove-NetQosPolicy,Remove-NetRoute,Remove-NetSwitchTeam,Remove-NetSwitchTeamMember,Remove-NetTransportFilter,Remove-NetworkSwitchEthernetPortIPAddress,Remove-NetworkSwitchVlan,Remove-Odbsn,Remove-Partition,Remove-PartitionAccessPath,Remove-PhysicalDisk,Remove-Printer,Remove-PrinterDriver,Remove-PrinterPort,Remove-PrintJob,Remove-SmbBandwidthLimit,Remove-SmbGlobalMapping,Remove-SmbMapping,Remove-SmbMultichannelConstraint,Remove-SmbShare,Remove-StorageFaultDomain,Remove-StorageFileServer,Remove-StorageHealthIntent,Remove-StorageHealthSetting,Remove-StoragePool,Remove-StorageTier,Remove-TargetPortFromMaskingSet,Remove-VirtualDisk,Remove-VirtualDiskFromMaskingSet,Remove-VpnConnection,Remove-VpnConnectionRoute,Remove-VpnConnectionTriggerApplication,Remove-VpnConnectionTriggerDnsConfiguration,Remove-VpnConnectionTriggerTrustedNetwork,Rename-DAEntryPointTableItem,Rename-MaskingSet,Rename-NetAdapter,Rename-NetFirewallRule,Rename-NetIPHttpsConfiguration,Rename-NetIPsecMainModeCryptoSet,Rename-NetIPsecMainModeRule,Rename-NetIPsecPhase1AuthSet,Rename-NetIPsecPhase2AuthSet,Rename-NetIPsecQuickModeCryptoSet,Rename-NetIPsecRule,Rename-NetLbfoTeam,Rename-NetSwitchTeam,Rename-Printer,Repair-FileIntegrity,Repair-VirtualDisk,Repair-Volume,Reset-DAClientExperienceConfiguration,Reset-DAEntryPointTableItem,Reset-DtcLog,Reset-NCSIPolicyConfiguration,Reset-Net6to4Configuration,Reset-NetAdapterAdvancedProperty,Reset-NetDnsTransitionConfiguration,Reset-NetIPHttpsConfiguration,Reset-NetIsatapConfiguration,Reset-NetTeredoConfiguration,Reset-PhysicalDisk,Reset-StorageReliabilityCounter,Resize-Partition,Resize-StorageTier,Resize-VirtualDisk,Restart-NetAdapter,Restart-PcsvDevice,Restart-PrintJob,Restore-DscConfiguration,Restore-NetworkSwitchConfiguration,Resume-BitLocker,Resume-PrintJob,Revoke-FileShareAccess,Revoke-SmbShareAccess,SafeGetCommand,Save-EtwTraceSession,Save-Module,Save-NetGPO,Save-NetworkSwitchConfiguration,Save-Script,Send-EtwTraceSession,Set-AutologgerConfig,Set-ClusteredScheduledTask,Set-DAClientExperienceConfiguration,Set-DAEntryPointTableItem,Set-Disk,Set-DnsClient,Set-DnsClientGlobalSetting,Set-DnsClientNrptGlobal,Set-DnsClientNrptRule,Set-DnsClientServerAddress,Set-DtcAdvancedHostSetting,Set-DtcAdvancedSetting,Set-DtcClusterDefault,Set-DtcClusterTMMapping,Set-Dtefault,Set-DtcLog,Set-DtcNetworkSetting,Set-DtcTransaction,Set-DtcTransactionsTraceSession,Set-DtcTransactionsTraceSetting,Set-DynamicParameterVariables,Set-EtwTraceProvider,Set-FileIntegrity,Set-FileShare,Set-FileStorageTier,Set-InitiatorPort,Set-IscsiChapSecret,Set-LogProperties,Set-MMAgent,Set-MpPreference,Set-NCSIPolicyConfiguration,Set-Net6to4Configuration,Set-NetAdapter,Set-NetAdapterAdvancedProperty,Set-NetAdapterBinding,Set-NetAdapterChecksumOffload,Set-NetAdapterEncapsulatedPacketTaskOffload,Set-NetAdapterIPsecOffload,Set-NetAdapterLso,Set-NetAdapterPacketDirect,Set-NetAdapterPowerManagement,Set-NetAdapterQos,Set-NetAdapterRdma,Set-NetAdapterRsc,Set-NetAdapterRss,Set-NetAdapterSriov,Set-NetAdapterVmq,Set-NetConnectionProfile,Set-NetDnsTransitionConfiguration,Set-NetEventPacketCaptureProvider,Set-NetEventProvider,Set-NetEventSession,Set-NetEventVFPProvider,Set-NetEventVmSwitchProvider,Set-NetEventWFPCaptureProvider,Set-NetFirewallAddressFilter,Set-NetFirewallApplicationFilter,Set-NetFirewallInterfaceFilter,Set-NetFirewallInterfaceTypeFilter,Set-NetFirewallPortFilter,Set-NetFirewallProfile,Set-NetFirewallRule,Set-NetFirewallSecurityFilter,Set-NetFirewallServiceFilter,Set-NetFirewallSetting,Set-NetIPAddress,Set-NetIPHttpsConfiguration,Set-NetIPInterface,Set-NetIPseospSetting,Set-NetIPsecMainModeCryptoSet,Set-NetIPsecMainModeRule,Set-NetIPsecPhase1AuthSet,Set-NetIPsecPhase2AuthSet,Set-NetIPsecQuickModeCryptoSet,Set-NetIPsecRule,Set-NetIPv4Protocol,Set-NetIPv6Protocol,Set-NetIsatapConfiguration,Set-NetLbfoTeam,Set-NetLbfoTeamMember,Set-NetLbfoTeamNic,Set-NetNat,Set-NetNatGlobal,Set-NetNatTransitionConfiguration,Set-NetNeighbor,Set-NetOffloadGlobalSetting,Set-NetQosPolicy,Set-NetRoute,Set-NetTCPSetting,Set-NetTeredoConfiguration,Set-NetUDPSetting,Set-NetworkSwitchEthernetPortIPAddress,Set-NetworkSwitchPortMode,Set-NetworkSwitchPortProperty,Set-NetworkSwitchVlanProperty,Set-Odbriver,Set-Odbsn,Set-Partition,Set-PcsvDeviceBootConfiguration,Set-PcsvDeviceNetworkConfiguration,Set-PcsvDeviceUserPassword,Set-PhysicalDisk,Set-PrintConfiguration,Set-Printer,Set-PrinterProperty,Set-PSRepository,Set-ResiliencySetting,Set-ScheduledTask,Set-SmbBandwidthLimit,Set-SmbClientConfiguration,Set-SmbPathAcl,Set-SmbServerConfiguration,Set-SmbShare,Set-StorageFileServer,Set-StorageHealthSetting,Set-StoragePool,Set-StorageProvider,Set-StorageSetting,Set-StorageSubSystem,Set-StorageTier,Set-TestInconclusive,Setup,Set-VirtualDisk,Set-Volume,Set-VolumeScrubPolicy,Set-VpnConnection,Set-VpnConnectionIPsecConfiguration,Set-VpnConnectionProxy,Set-VpnConnectionTriggerDnsConfiguration,Set-VpnConnectionTriggerTrustedNetwork,Should,Show-NetFirewallRule,Show-NetIPsecRule,Show-VirtualDisk,Start-AppBackgroundTask,Start-AutologgerConfig,Start-Dtc,Start-DtcTransactionsTraceSession,Start-EtwTraceSession,Start-MpScan,Start-MpWDOScan,Start-NetEventSession,Start-PcsvDevice,Start-ScheduledTask,Start-StorageDiagnosticLog,Start-Trace,Start-WUScan,Stop-DscConfiguration,Stop-Dtc,Stop-DtcTransactionsTraceSession,Stop-EtwTraceSession,Stop-NetEventSession,Stop-PcsvDevice,Stop-ScheduledTask,Stop-StorageDiagnosticLog,Stop-StorageJob,Stop-Trace,Suspend-BitLocker,Suspend-PrintJob,Sync-NetIPsecRule,TabExpansion2,Test-Dtc,Test-NetConnection,Test-ScriptFileInfo,Unblock-FileShareAccess,Unblock-SmbShareAccess,Uninstall-Dtc,Uninstall-Module,Uninstall-Script,Unlock-BitLocker,Unregister-AppBackgroundTask,Unregister-ClusteredScheduledTask,Unregister-IscsiSession,Unregister-PSRepository,Unregister-ScheduledTask,Unregister-StorageSubsystem,Update-Disk,Update-DscConfiguration,Update-EtwTraceSession,Update-HostStorageCache,Update-IscsiTarget,Update-IscsiTargetPortal,Update-Module,Update-ModuleManifest,Update-MpSignature,Update-NetIPsecRule,Update-Script,Update-ScriptFileInfo,Update-SmbMultichannelConnection,Update-StorageFirmware,Update-StoragePool,Update-StorageProviderCache,Write-DtcTransactionsTraceSession,Write-PrinterNfcTag,Write-VolumeCache - }, - morekeywords={Do,Else,For,ForEach,Function,If,In,Until,While}, - alsodigit={-}, - sensitive=false, - morecomment=[l]{\#}, - morecomment=[n]{<\#}{\#>}, - morestring=[b]{"}, - morestring=[b]{'}, - morestring=[s]{@'}{'@}, - morestring=[s]{@"}{"@} -} -$endif$ - -% -% header and footer -% -$if(beamer)$ -$else$ -$if(disable-header-and-footer)$ -$else$ -\setlength{\headheight}{36pt} -\setlength{\footskip}{20pt} -\fancypagestyle{eisvogel-header-footer}{ - \fancyhf{} - $if(logo)$ - \fancyhf[LH]{\raisebox{0.5cm}{\includegraphics[width=3cm]{$logo$}}} - $endif$ - $if(date)$ - \fancyhf[RH]{\fontsize{8pt}{10pt}\selectfont $date$\\ } - $endif$ - \fancyhf[CH]{\fontsize{8pt}{10pt}\selectfont $if(project)$Project $project$$endif$$if(author)$\\$for(author)$$author$$sep$, $endfor$$endif$} - $if(footer-left)$ - \fancyhf[LF]{\fontsize{8pt}{10pt}\selectfont $footer-left$} - $endif$ - $if(footer-center)$ - \fancyhf[CF]{\fontsize{8pt}{10pt}\selectfont $footer-center$} - $endif$ - $if(footer-right)$ - \fancyhf[RF]{\fontsize{8pt}{10pt}\selectfont $footer-right$} - $endif$ - \renewcommand{\headrulewidth}{0pt} - \renewcommand{\footrulewidth}{0pt} -} -\pagestyle{eisvogel-header-footer} -$if(page-background)$ -\backgroundsetup{ -scale=1, -color=black, -opacity=$if(page-background-opacity)$$page-background-opacity$$else$0.2$endif$, -angle=0, -contents={% - \includegraphics[width=\paperwidth,height=\paperheight]{$page-background$} - }% -} -$endif$ -$endif$ -$endif$ - -%% -%% end header and footer -%% - -%% -%% begin set bullet style -%% -\setlistdepth{9} -\setlist[itemize,1]{label=$$\bullet$$,font=\fontsize{10pt}{12pt}\selectfont} -\setlist[itemize,2]{label=$$\circ$$,font=\fontsize{14pt}{17pt}\selectfont} -\setlist[itemize,3]{label=$$\blacksquare$$,font=\fontsize{4pt}{6pt}\selectfont} -\setlist[itemize,4]{label=$$\star$$} -\setlist[itemize,5]{label=$$\diamond$$} -\setlist[itemize,6]{label=$$\ast$$} -\setlist[itemize,7]{label=$$\star$$} -\setlist[itemize,8]{label=$$\ast$$} -\setlist[itemize,9]{label=$$\star$$} -\renewlist{itemize}{itemize}{9} -%% -%% end set bullet style -%% - -\begin{document} - -%% -%% begin titlepage -%% -$if(beamer)$ -$else$ -$if(titlepage)$ -\begin{titlepage} -$if(titlepage-background)$ -\newgeometry{top=2cm, right=4cm, bottom=3cm, left=4cm} -$else$ -\newgeometry{left=3cm, right=2cm, bottom=1.5cm} -$endif$ -$if(titlepage-color)$ -\definecolor{titlepage-color}{HTML}{$titlepage-color$} -\newpagecolor{titlepage-color}\afterpage{\restorepagecolor} -$endif$ -$if(titlepage-background)$ -\tikz[remember picture,overlay] \node[inner sep=0pt] at (current page.center){\includegraphics[width=\paperwidth,height=\paperheight]{$titlepage-background$}}; -$endif$ -\newcommand{\colorRule}[3][black]{\textcolor[HTML]{#1}{\rule{#2}{#3}}} -\begin{flushleft} -\noindent -\\[-1em] -\color[HTML]{$if(titlepage-text-color)$$titlepage-text-color$$else$5F5F5F$endif$} -\par -\noindent - -$if(titlepage-top-cover-image)$ -\noindent -\vskip -3em -\includegraphics{$titlepage-top-cover-image$} -$endif$ - -$if(titlepage-background)$ -% The titlepage with a background image has other text spacing and text size -{ - \setstretch{2} - \vfill - \vskip -8em - \textcolor{titlecolor}{\noindent {\fontsize{36pt}{42pt}\selectfont $title$}} - $if(subtitle)$ - \vskip 2em - \textcolor{subtitlecolor}{{\fontsize{14pt}{17pt}\selectfont $subtitle$}} - $endif$ - \vskip 0em - \textcolor{authorcolor}{\noindent {\fontsize{12pt}{14pt}\selectfont $for(author)$$author$$sep$, $endfor$ \vskip 0.6em $date$}} - \vfill -} -$else$ -{ - \setstretch{1.4} - \vfill - \vskip 18em - \textcolor{titlecolor}{\noindent {\fontsize{36pt}{42pt}\selectfont $title$}} - $if(subtitle)$ - \vskip 2em - \textcolor{subtitlecolor}{{\fontsize{14pt}{17pt}\selectfont $subtitle$}} - $endif$ - \vskip -1em - \textcolor{authorcolor}{\noindent {\fontsize{12pt}{14pt}\selectfont $for(author)$$author$$sep$, $endfor$}} - \vfill -} -$endif$ - -$if(disclaimer)$ -\vskip 21em -\setstretch{1.0} -\textcolor{disclaimercolor}{\noindent {\fontsize{8pt}{10pt}\selectfont $disclaimer$}} -$endif$ - -\end{flushleft} -\end{titlepage} -\restoregeometry -$endif$ -$endif$ - -%% -%% end titlepage -%% - -$if(has-frontmatter)$ -\frontmatter -$endif$ -$if(title)$ -$if(beamer)$ -\frame{\titlepage} -$endif$ -$if(abstract)$ -\begin{abstract} -$abstract$ -\end{abstract} -$endif$ -$endif$ - -$if(first-chapter)$ -\setcounter{chapter}{$first-chapter$} -\addtocounter{chapter}{-1} -$endif$ - -$if(version-history)$ -\hypertarget{version-history}{% -\section{Version history}\label{version-history}} - -\begin{longtable}[]{@{} - >{\raggedright\arraybackslash}p{(\columnwidth - 8\tabcolsep) * \real{0.1200}} - >{\raggedright\arraybackslash}p{(\columnwidth - 8\tabcolsep) * \real{0.2000}} - >{\raggedright\arraybackslash}p{(\columnwidth - 8\tabcolsep) * \real{0.2500}} - >{\raggedright\arraybackslash}p{(\columnwidth - 8\tabcolsep) * \real{0.4300}}@{}} -\toprule() -\begin{minipage}[b]{\linewidth}\raggedright -\textbf{Version} -\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright -\textbf{Date} -\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright -\textbf{Author} -\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright -\textbf{Description} -\end{minipage} \\ -\midrule() -\endhead -$for(version-history)$ -$if(version-history.version)$ -$version-history.version$ & $if(version-history.date)$$version-history.date$$endif$ & $if(version-history.author)$$version-history.author$$endif$ & $if(version-history.description)$$version-history.description$$endif$ \\ -$else$ -1.0.0 & $date$ & $for(author)$$author$$sep$ \and $endfor$ & Initial draft \\ -$endif$ -$endfor$ -\bottomrule() -\end{longtable} -$endif$ - -$for(include-before)$ -$include-before$ - -$endfor$ -$if(toc)$ -$if(toc-title)$ -\renewcommand*\contentsname{$toc-title$} -$endif$ -$if(beamer)$ -\begin{frame}[allowframebreaks] -$if(toc-title)$ - \frametitle{$toc-title$} -$endif$ - \tableofcontents[hideallsubsections] -\end{frame} -$if(toc-own-page)$ -\newpage -$endif$ -$else$ -{ -\setcounter{tocdepth}{$toc-depth$} -\tableofcontents -$if(toc-own-page)$ -\newpage -$endif$ -} -$endif$ -$endif$ -$if(lot)$ -\listoftables -$endif$ -$if(lof)$ -\listoffigures -$endif$ -$if(linestretch)$ -\setstretch{$linestretch$} -$endif$ -$if(has-frontmatter)$ -\mainmatter -$endif$ -$body$ - -$if(has-frontmatter)$ -\backmatter -$endif$ -$if(natbib)$ -$if(bibliography)$ -$if(biblio-title)$ -$if(has-chapters)$ -\renewcommand\bibname{$biblio-title$} -$else$ -\renewcommand\refname{$biblio-title$} -$endif$ -$endif$ -$if(beamer)$ -\begin{frame}[allowframebreaks]{$biblio-title$} - \bibliographytrue -$endif$ - \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} -$if(beamer)$ -\end{frame} -$endif$ - -$endif$ -$endif$ -$if(biblatex)$ -$if(beamer)$ -\begin{frame}[allowframebreaks]{$biblio-title$} - \bibliographytrue - \printbibliography[heading=none] -\end{frame} -$else$ -\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ -$endif$ - -$endif$ -$for(include-after)$ -$include-after$ - -$endfor$ -\end{document} \ No newline at end of file diff --git a/texlive-profile.txt b/texlive-profile.txt deleted file mode 100644 index 88de45b..0000000 --- a/texlive-profile.txt +++ /dev/null @@ -1,49 +0,0 @@ -selected_scheme scheme-basic -TEXDIR /usr/local/texlive -TEXMFCONFIG ~/.texlive/texmf-config -TEXMFHOME ~/texmf -TEXMFLOCAL /usr/local/texlive/texmf-local -TEXMFSYSCONFIG /usr/local/texlive/texmf-config -TEXMFSYSVAR /usr/local/texlive/texmf-var -TEXMFVAR ~/.texlive/texmf-var -binary_x86_64-linux 1 -collection-basic 1 -collection-bibtexextra 0 -collection-binextra 0 -collection-context 0 -collection-fontsextra 0 -collection-fontsrecommended 1 -collection-fontutils 0 -collection-formatsextra 0 -collection-games 0 -collection-humanities 0 -collection-langenglish 0 -collection-langeuropean 0 -collection-langother 0 -collection-latex 1 -collection-latexextra 0 -collection-latexrecommended 0 -collection-luatex 0 -collection-mathscience 0 -collection-metapost 0 -collection-music 0 -collection-pictures 0 -collection-plaingeneric 0 -collection-pstricks 0 -collection-publishers 0 -collection-texworks 0 -collection-xetex 0 -instopt_adjustpath 0 -instopt_adjustrepo 1 -instopt_letter 0 -instopt_portable 0 -instopt_write18_restricted 1 -tlpdbopt_autobackup 0 -tlpdbopt_create_formats 1 -tlpdbopt_desktop_integration 0 -tlpdbopt_file_assocs 0 -tlpdbopt_generate_updmap 0 -tlpdbopt_install_docfiles 0 -tlpdbopt_install_srcfiles 0 -tlpdbopt_post_code 1 -tlpdbopt_sys_bin /usr/local/bin diff --git a/templates/designdoc-cover.png b/tools/designdoc-cover.png similarity index 100% rename from templates/designdoc-cover.png rename to tools/designdoc-cover.png diff --git a/templates/designdoc-logo.png b/tools/designdoc-logo.png similarity index 100% rename from templates/designdoc-logo.png rename to tools/designdoc-logo.png diff --git a/tools/designdoc.tex b/tools/designdoc.tex new file mode 100644 index 0000000..cdcd3f4 --- /dev/null +++ b/tools/designdoc.tex @@ -0,0 +1,1291 @@ +%% +% Copyright (c) 2017 - 2023, Pascal Wagler; +% Copyright (c) 2014 - 2023, John MacFarlane +% +% All rights reserved. +% +% Redistribution and use in source and binary forms, with or without +% modification, are permitted provided that the following conditions +% are met: +% +% - Redistributions of source code must retain the above copyright +% notice, this list of conditions and the following disclaimer. +% +% - Redistributions in binary form must reproduce the above copyright +% notice, this list of conditions and the following disclaimer in the +% documentation and/or other materials provided with the distribution. +% +% - Neither the name of John MacFarlane nor the names of other +% contributors may be used to endorse or promote products derived +% from this software without specific prior written permission. +% +% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +% "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +% LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +% FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +% COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +% INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +% BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +% LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +% CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +% LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +% ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +% POSSIBILITY OF SUCH DAMAGE. +%% + +%% +% This is the Eisvogel pandoc LaTeX template v2.4.1: +% https://github.com/Wandmalfarbe/pandoc-latex-template/blob/54434193bd32d634b1cf067b0d1e182cee97dede/eisvogel.tex +% +% For usage information and examples visit the official GitHub page: +% https://github.com/Wandmalfarbe/pandoc-latex-template +%% + +% Options for packages loaded elsewhere +\PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref} +\PassOptionsToPackage{hyphens}{url} +\PassOptionsToPackage{dvipsnames,svgnames,x11names,table}{xcolor} +$if(CJKmainfont)$ +\PassOptionsToPackage{space}{xeCJK} +$endif$ +% +\documentclass[ +$if(fontsize)$ + $fontsize$, +$endif$ +$if(papersize)$ + $papersize$paper, +$else$ + paper=a4, +$endif$ +$if(beamer)$ + ignorenonframetext, +$if(handout)$ + handout, +$endif$ +$if(aspectratio)$ + aspectratio=$aspectratio$, +$endif$ +$endif$ +$for(classoption)$ + $classoption$$sep$, +$endfor$ + ,captions=tableheading +]{$if(beamer)$$documentclass$$else$$if(book)$scrbook$else$scrartcl$endif$$endif$} +$if(beamer)$ +$if(background-image)$ +\usebackgroundtemplate{% + \includegraphics[width=\paperwidth]{$background-image$}% +} +% In beamer background-image does not work well when other images are used, so this is the workaround +\pgfdeclareimage[width=\paperwidth,height=\paperheight]{background}{$background-image$} +\usebackgroundtemplate{\pgfuseimage{background}} +$endif$ +\usepackage{pgfpages} +\setbeamertemplate{caption}[numbered] +\setbeamertemplate{caption label separator}{: } +\setbeamercolor{caption name}{fg=normal text.fg} +\beamertemplatenavigationsymbols$if(navigation)$$navigation$$else$empty$endif$ +$for(beameroption)$ +\setbeameroption{$beameroption$} +$endfor$ +% Prevent slide breaks in the middle of a paragraph +\widowpenalties 1 10000 +\raggedbottom +$if(section-titles)$ +\setbeamertemplate{part page}{ + \centering + \begin{beamercolorbox}[sep=16pt,center]{part title} + \usebeamerfont{part title}\insertpart\par + \end{beamercolorbox} +} +\setbeamertemplate{section page}{ + \centering + \begin{beamercolorbox}[sep=12pt,center]{part title} + \usebeamerfont{section title}\insertsection\par + \end{beamercolorbox} +} +\setbeamertemplate{subsection page}{ + \centering + \begin{beamercolorbox}[sep=8pt,center]{part title} + \usebeamerfont{subsection title}\insertsubsection\par + \end{beamercolorbox} +} +\AtBeginPart{ + \frame{\partpage} +} +\AtBeginSection{ + \ifbibliography + \else + \frame{\sectionpage} + \fi +} +\AtBeginSubsection{ + \frame{\subsectionpage} +} +$endif$ +$endif$ +$if(beamerarticle)$ +\usepackage{beamerarticle} % needs to be loaded first +$endif$ +\usepackage{amsmath,amssymb} +$if(linestretch)$ +\usepackage{setspace} +$else$ +% Use setspace anyway because we change the default line spacing. +% The spacing is changed early to affect the titlepage and the TOC. +\usepackage{setspace} +\setstretch{1.2} +$endif$ +\usepackage{iftex} +\ifPDFTeX + \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} + \usepackage[utf8]{inputenc} + \usepackage{textcomp} % provide euro and other symbols +\else % if luatex or xetex +$if(mathspec)$ + \ifXeTeX + \usepackage{mathspec} % this also loads fontspec + \else + \usepackage{unicode-math} % this also loads fontspec + \fi +$else$ + \usepackage{unicode-math} % this also loads fontspec +$endif$ + \defaultfontfeatures{Scale=MatchLowercase}$-- must come before Beamer theme + \defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} +\fi +$if(fontfamily)$ +$else$ +$-- Set default font before Beamer theme so the theme can override it +\usepackage{lmodern} +$endif$ +$-- Set Beamer theme before user font settings so they can override theme +$if(beamer)$ +$if(theme)$ +\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$} +$endif$ +$if(colortheme)$ +\usecolortheme{$colortheme$} +$endif$ +$if(fonttheme)$ +\usefonttheme{$fonttheme$} +$endif$ +$if(mainfont)$ +\usefonttheme{serif} % use mainfont rather than sansfont for slide text +$endif$ +$if(innertheme)$ +\useinnertheme{$innertheme$} +$endif$ +$if(outertheme)$ +\useoutertheme{$outertheme$} +$endif$ +$endif$ +$-- User font settings (must come after default font and Beamer theme) +$if(fontfamily)$ +\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$} +$endif$ +\ifPDFTeX\else + % xetex/luatex font selection +$if(mainfont)$ + \setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} +$endif$ +$if(sansfont)$ + \setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$} +$endif$ +$if(monofont)$ + \setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$]{$monofont$} +$endif$ +$for(fontfamilies)$ + \newfontfamily{$fontfamilies.name$}[$for(fontfamilies.options)$$fontfamilies.options$$sep$,$endfor$]{$fontfamilies.font$} +$endfor$ +$if(mathfont)$ +$if(mathspec)$ + \ifXeTeX + \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} + \else + \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} + \fi +$else$ + \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} +$endif$ +$endif$ +$if(CJKmainfont)$ + \ifXeTeX + \usepackage{xeCJK} + \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} + $if(CJKsansfont)$ + \setCJKsansfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKsansfont$} + $endif$ + $if(CJKmonofont)$ + \setCJKmonofont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmonofont$} + $endif$ + \fi +$endif$ +$if(luatexjapresetoptions)$ + \ifLuaTeX + \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset} + \fi +$endif$ +$if(CJKmainfont)$ + \ifLuaTeX + \usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec} + \setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} + \fi +$endif$ +\fi +$if(zero-width-non-joiner)$ +%% Support for zero-width non-joiner characters. +\makeatletter +\def\zerowidthnonjoiner{% + % Prevent ligatures and adjust kerning, but still support hyphenating. + \texorpdfstring{% + \TextOrMath{\nobreak\discretionary{-}{}{\kern.03em}% + \ifvmode\else\nobreak\hskip\z@skip\fi}{}% + }{}% +} +\makeatother +\ifPDFTeX + \DeclareUnicodeCharacter{200C}{\zerowidthnonjoiner} +\else + \catcode`^^^^200c=\active + \protected\def ^^^^200c{\zerowidthnonjoiner} +\fi +%% End of ZWNJ support +$endif$ +% Use upquote if available, for straight quotes in verbatim environments +\IfFileExists{upquote.sty}{\usepackage{upquote}}{} +\IfFileExists{microtype.sty}{% use microtype if available + \usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype} + \UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts +}{} +$if(indent)$ +$else$ +\makeatletter +\@ifundefined{KOMAClassName}{% if non-KOMA class + \IfFileExists{parskip.sty}{% + \usepackage{parskip} + }{% else + \setlength{\parindent}{0pt} + \setlength{\parskip}{6pt plus 2pt minus 1pt}} +}{% if KOMA class + \KOMAoptions{parskip=half}} +\makeatother +$endif$ +$if(verbatim-in-note)$ +\usepackage{fancyvrb} +$endif$ +\usepackage{xcolor} +\definecolor{default-linkcolor}{HTML}{0563C1} +\definecolor{default-filecolor}{HTML}{0563C1} +\definecolor{default-citecolor}{HTML}{0563C1} +\definecolor{default-urlcolor}{HTML}{0563C1} +\definecolor{titlecolor}{HTML}{7030A0} +\definecolor{subtitlecolor}{HTML}{1F4E79} +\definecolor{authorcolor}{HTML}{5B9BD5} +\definecolor{disclaimercolor}{HTML}{949494} +$if(footnotes-pretty)$ +% load footmisc in order to customize footnotes (footmisc has to be loaded before hyperref, cf. https://tex.stackexchange.com/a/169124/144087) +\usepackage[hang,flushmargin,bottom,multiple]{footmisc} +\setlength{\footnotemargin}{0.8em} % set space between footnote nr and text +\setlength{\footnotesep}{\baselineskip} % set space between multiple footnotes +\setlength{\skip\footins}{0.3cm} % set space between page content and footnote +\setlength{\footskip}{0.9cm} % set space between footnote and page bottom +$endif$ +$if(geometry)$ +$if(beamer)$ +\geometry{$for(geometry)$$geometry$$sep$,$endfor$} +$else$ +\usepackage[$for(geometry)$$geometry$$sep$,$endfor$]{geometry} +$endif$ +$else$ +$if(beamer)$ +$else$ +\usepackage[a4paper,left=2.54cm,right=2.54cm,top=1.91cm,bottom=2.54cm]{geometry} +$endif$ +$endif$ +$if(logo)$ +\usepackage[export]{adjustbox} +\usepackage{graphicx} +$elseif(titlepage-top-cover-image)$ +\usepackage[export]{adjustbox} +\usepackage{graphicx} +$endif$ +$if(beamer)$ +\newif\ifbibliography +$endif$ +$if(listings)$ +\usepackage{listings} +\newcommand{\passthrough}[1]{#1} +\lstset{defaultdialect=[5.3]Lua} +\lstset{defaultdialect=[x86masm]Assembler} +$endif$ +$if(listings-no-page-break)$ +\usepackage{etoolbox} +\BeforeBeginEnvironment{lstlisting}{\par\noindent\begin{minipage}{\linewidth}} +\AfterEndEnvironment{lstlisting}{\end{minipage}\par\addvspace{\topskip}} +$endif$ +$if(lhs)$ +\lstnewenvironment{code}{\lstset{language=Haskell,basicstyle=\small\ttfamily}}{} +$endif$ +$if(highlighting-macros)$ +$highlighting-macros$ + +% Workaround/bugfix from jannick0. +% See https://github.com/jgm/pandoc/issues/4302#issuecomment-360669013) +% or https://github.com/Wandmalfarbe/pandoc-latex-template/issues/2 +% +% Redefine the verbatim environment 'Highlighting' to break long lines (with +% the help of fvextra). Redefinition is necessary because it is unlikely that +% pandoc includes fvextra in the default template. +\usepackage{fvextra} +\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,fontsize=$if(code-block-font-size)$$code-block-font-size$$else$\small$endif$,commandchars=\\\{\}} + +$endif$ +$if(tables)$ +\usepackage{longtable,booktabs,array} +\setlength\LTleft\parindent +\setlength\LTright\fill +$if(multirow)$ +\usepackage{multirow} +$endif$ +\usepackage{calc} % for calculating minipage widths +$if(beamer)$ +\usepackage{caption} +% Make caption package work with longtable +\makeatletter +\def\fnum@table{\tablename~\thetable} +\makeatother +$else$ +% Correct order of tables after \paragraph or \subparagraph +\usepackage{etoolbox} +\makeatletter +\patchcmd\longtable{\par}{\if@noskipsec\mbox{}\fi\par}{}{} +\makeatother +% Allow footnotes in longtable head/foot +\IfFileExists{footnotehyper.sty}{\usepackage{footnotehyper}}{\usepackage{footnote}} +\makesavenoteenv{longtable} +$endif$ +$endif$ +% add backlinks to footnote references, cf. https://tex.stackexchange.com/questions/302266/make-footnote-clickable-both-ways +$if(footnotes-disable-backlinks)$ +$else$ +\usepackage{footnotebackref} +$endif$ +\usepackage{titling} +\usepackage{fancyhdr} +\usepackage{lastpage} +\usepackage{amsfonts} +\usepackage{sectsty} +\sectionfont{\clearpage} +$if(graphics)$ +\usepackage{graphicx} +\makeatletter +\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi} +\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi} +\makeatother +% Scale images if necessary, so that they will not overflow the page +% margins by default, and it is still possible to overwrite the defaults +% using explicit options in \includegraphics[width, height, ...]{} +\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio} +% Set default figure placement to htbp +% Make use of float-package and set default placement for figures to H. +% The option H means 'PUT IT HERE' (as opposed to the standard h option which means 'You may put it here if you like'). +\usepackage{float} +\floatplacement{figure}{$if(float-placement-figure)$$float-placement-figure$$else$H$endif$} +\makeatother +$endif$ +$if(svg)$ +\usepackage{svg} +$endif$ +$if(strikeout)$ +$-- also used for underline +\ifLuaTeX + \usepackage{luacolor} + \usepackage[soul]{lua-ul} +\else +\usepackage{soul} +$if(CJKmainfont)$ + \ifXeTeX + % soul's \st doesn't work for CJK: + \usepackage{xeCJKfntef} + \renewcommand{\st}[1]{\sout{#1}} + \fi +$endif$ +\fi +$endif$ +\setlength{\emergencystretch}{3em} % prevent overfull lines +\providecommand{\tightlist}{% + \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} +$if(numbersections)$ +\setcounter{secnumdepth}{$if(secnumdepth)$$secnumdepth$$else$5$endif$} +$else$ +\setcounter{secnumdepth}{-\maxdimen} % remove section numbering +$endif$ +$if(subfigure)$ +\usepackage{subcaption} +$endif$ +$if(beamer)$ +$else$ +$if(block-headings)$ +% Make \paragraph and \subparagraph free-standing +\ifx\paragraph\undefined\else + \let\oldparagraph\paragraph + \renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}} +\fi +\ifx\subparagraph\undefined\else + \let\oldsubparagraph\subparagraph + \renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}} +\fi +$endif$ +$endif$ +$if(pagestyle)$ +\pagestyle{$pagestyle$} +$endif$ +$if(csl-refs)$ +% definitions for citeproc citations +\NewDocumentCommand\citeproctext{}{} +\NewDocumentCommand\citeproc{mm}{% + \begingroup\def\citeproctext{#2}\cite{#1}\endgroup} +% avoid brackets around text for \cite: +\makeatletter + \def\@biblabel#1{} + \def\@cite#1#2{{#1\if@tempswa , #2\fi}} +\makeatother +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newlength{\csllabelwidth} +\setlength{\csllabelwidth}{3em} +\newlength{\cslentryspacing} +\setlength{\cslentryspacing}{0em} +\usepackage{enumitem} +\newlist{CSLReferences}{itemize}{1} +\setlist[CSLReferences]{label={}, + leftmargin=\cslhangindent, + itemindent=-1\cslhangindent, + parsep=\parskip, + itemsep=\cslentryspacing} +\usepackage{calc} +\newcommand{\CSLBlock}[1]{#1\hfill\break} +\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} +\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break} +\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} +$endif$ +$if(lang)$ +\ifLuaTeX +\usepackage[bidi=basic]{babel} +\else +\usepackage[bidi=default]{babel} +\fi +$if(babel-lang)$ +\babelprovide[main,import]{$babel-lang$} +$if(mainfont)$ +\ifPDFTeX +\else +\babelfont{rm}[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$} +\fi +$endif$ +$endif$ +$for(babel-otherlangs)$ +\babelprovide[import]{$babel-otherlangs$} +$endfor$ +$for(babelfonts/pairs)$ +\babelfont[$babelfonts.key$]{rm}{$babelfonts.value$} +$endfor$ +% get rid of language-specific shorthands (see #6817): +\let\LanguageShortHands\languageshorthands +\def\languageshorthands#1{} +$endif$ +$for(header-includes)$ +$header-includes$ +$endfor$ +\ifLuaTeX + \usepackage{selnolig} % disable illegal ligatures +\fi +$if(dir)$ +\ifPDFTeX + \TeXXeTstate=1 + \newcommand{\RL}[1]{\beginR #1\endR} + \newcommand{\LR}[1]{\beginL #1\endL} + \newenvironment{RTL}{\beginR}{\endR} + \newenvironment{LTR}{\beginL}{\endL} +\fi +$endif$ +$if(natbib)$ +\usepackage[$natbiboptions$]{natbib} +\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$} +$endif$ +$if(biblatex)$ +\usepackage[$if(biblio-style)$style=$biblio-style$,$endif$$for(biblatexoptions)$$biblatexoptions$$sep$,$endfor$]{biblatex} +$for(bibliography)$ +\addbibresource{$bibliography$} +$endfor$ +$endif$ +$if(nocite-ids)$ +\nocite{$for(nocite-ids)$$it$$sep$, $endfor$} +$endif$ +$if(csquotes)$ +\usepackage{csquotes} +$endif$ +\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}} +\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available +\urlstyle{$if(urlstyle)$$urlstyle$$else$same$endif$} +$if(links-as-notes)$ +% Make links footnotes instead of hotlinks: +\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}} +$endif$ +$if(verbatim-in-note)$ +\VerbatimFootnotes % allow verbatim text in footnotes +$endif$ +\hypersetup{ +$if(title-meta)$ + pdftitle={$title-meta$}, +$endif$ +$if(author-meta)$ + pdfauthor={$author-meta$}, +$endif$ +$if(lang)$ + pdflang={$lang$}, +$endif$ +$if(subject)$ + pdfsubject={$subject$}, +$endif$ +$if(keywords)$ + pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$}, +$endif$ +$if(colorlinks)$ + colorlinks=true, + linkcolor={$if(linkcolor)$$linkcolor$$else$default-linkcolor$endif$}, + filecolor={$if(filecolor)$$filecolor$$else$default-filecolor$endif$}, + citecolor={$if(citecolor)$$citecolor$$else$default-citecolor$endif$}, + urlcolor={$if(urlcolor)$$urlcolor$$else$default-urlcolor$endif$}, +$else$ + hidelinks, +$endif$ + breaklinks=true, + pdfcreator={LaTeX via pandoc with the Eisvogel template}} +$if(title)$ +\title{$title$$if(thanks)$\thanks{$thanks$}$endif$} +$endif$ +$if(subtitle)$ +$if(beamer)$ +$else$ +\usepackage{etoolbox} +\makeatletter +\providecommand{\subtitle}[1]{% add subtitle to \maketitle + \apptocmd{\@title}{\par {\large #1 \par}}{}{} +} +\makeatother +$endif$ +\subtitle{$subtitle$} +$endif$ +\author{$for(author)$$author$$sep$ \and $endfor$} +\date{$date$} +$if(beamer)$ +$if(institute)$ +\institute{$for(institute)$$institute$$sep$ \and $endfor$} +$endif$ +$if(titlegraphic)$ +\titlegraphic{\includegraphics{$titlegraphic$}} +$endif$ +$if(logo)$ +\logo{\includegraphics{$logo$}} +$endif$ +$endif$ + + + +%% +%% added +%% + +$if(page-background)$ +\usepackage[pages=all]{background} +$endif$ + +% +% for the background color of the title page +% +$if(titlepage)$ +\usepackage{pagecolor} +\usepackage{afterpage} +$if(titlepage-background)$ +\usepackage{tikz} +$endif$ +$endif$ + +% +% break urls +% +\PassOptionsToPackage{hyphens}{url} + +% +% When using babel or polyglossia with biblatex, loading csquotes is recommended +% to ensure that quoted texts are typeset according to the rules of your main language. +% +\usepackage{csquotes} + +% +% captions +% +\definecolor{caption-color}{HTML}{7030A0} +$if(beamer)$ +$else$ +\usepackage[font={stretch=1.2}, textfont={color=caption-color}, position=top, skip=4mm, labelfont=bf, singlelinecheck=false, justification=$if(caption-justification)$$caption-justification$$else$raggedright$endif$]{caption} +\setcapindent{0em} +$endif$ + +\usepackage{awesomebox} +% +% blockquote +% +\definecolor{blockquote-border}{RGB}{221,221,221} +\definecolor{blockquote-text}{RGB}{119,119,119} +\usepackage{mdframed} +\newmdenv[rightline=false,bottomline=false,topline=false,linewidth=3pt,linecolor=blockquote-border,skipabove=\parskip]{customblockquote} +\renewenvironment{quote}{\begin{customblockquote}\list{}{\rightmargin=0em\leftmargin=0em}% +\item\relax\color{blockquote-text}\ignorespaces}{\unskip\unskip\endlist\end{customblockquote}} + +% +% Source Sans Pro as the default font family +% Source Code Pro for monospace text +% +% 'default' option sets the default +% font family to Source Sans Pro, not \sfdefault. +% +\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex + $if(fontfamily)$ + $else$ + \usepackage[default]{sourcesanspro} + \usepackage{sourcecodepro} + $endif$ +\else % if not pdftex + $if(mainfont)$ + $else$ + \usepackage[default]{sourcesanspro} + \usepackage{sourcecodepro} + + % XeLaTeX specific adjustments for straight quotes: https://tex.stackexchange.com/a/354887 + % This issue is already fixed (see https://github.com/silkeh/latex-sourcecodepro/pull/5) but the + % fix is still unreleased. + % TODO: Remove this workaround when the new version of sourcecodepro is released on CTAN. + \ifxetex + \makeatletter + \defaultfontfeatures[\ttfamily] + { Numbers = \sourcecodepro@figurestyle, + Scale = \SourceCodePro@scale, + Extension = .otf } + \setmonofont + [ UprightFont = *-\sourcecodepro@regstyle, + ItalicFont = *-\sourcecodepro@regstyle It, + BoldFont = *-\sourcecodepro@boldstyle, + BoldItalicFont = *-\sourcecodepro@boldstyle It ] + {SourceCodePro} + \makeatother + \fi + $endif$ +\fi + +% +% heading color +% +\definecolor{heading-color}{HTML}{7030A0} +$if(beamer)$ +$else$ +\addtokomafont{section}{\color{heading-color} \fontsize{16pt}{19pt}\selectfont} +\addtokomafont{subsection}{\color{heading-color} \fontsize{14pt}{17pt}\selectfont} +\addtokomafont{subsubsection}{\color{heading-color} \fontsize{12pt}{14pt}\selectfont} +\addtokomafont{paragraph}{\color{heading-color} \fontsize{12pt}{14pt}\selectfont \itshape} +\addtokomafont{subparagraph}{\color{heading-color} \fontsize{12pt}{14pt}\selectfont \itshape} +$endif$ +% When using the classes report, scrreprt, book, +% scrbook or memoir, uncomment the following line. +%\addtokomafont{chapter}{\color{heading-color}} + +% +% variables for title, author and date +% +$if(beamer)$ +$else$ +\title{$title$} +\author{$for(author)$$author$$sep$, $endfor$} +\date{$date$} +$endif$ + +% +% tables +% +$if(tables)$ + +\definecolor{table-row-color}{HTML}{F5F5F5} +\definecolor{table-rule-color}{HTML}{999999} + +%\arrayrulecolor{black!40} +\arrayrulecolor{table-rule-color} % color of \toprule, \midrule, \bottomrule +\setlength\heavyrulewidth{0.3ex} % thickness of \toprule, \bottomrule +\renewcommand{\arraystretch}{1.3} % spacing (padding) + +$if(table-use-row-colors)$ +% TODO: This doesn't work anymore. I don't know why. +% Reset rownum counter so that each table +% starts with the same row colors. +% https://tex.stackexchange.com/questions/170637/restarting-rowcolors +% +% Unfortunately the colored cells extend beyond the edge of the +% table because pandoc uses @-expressions (@{}) like so: +% +% \begin{longtable}[]{@{}ll@{}} +% \end{longtable} +% +% https://en.wikibooks.org/wiki/LaTeX/Tables#.40-expressions +\let\oldlongtable\longtable +\let\endoldlongtable\endlongtable +\renewenvironment{longtable}{ +\rowcolors{3}{}{table-row-color!100} % row color +\oldlongtable} { +\endoldlongtable +\global\rownum=0\relax} +$endif$ +$endif$ + +% +% remove paragraph indention +% +\setlength{\parindent}{0pt} +\setlength{\parskip}{6pt plus 2pt minus 1pt} +\setlength{\emergencystretch}{3em} % prevent overfull lines + +% +% +% Listings +% +% + +$if(listings)$ + +% +% general listing colors +% +\definecolor{listing-background}{HTML}{F7F7F7} +\definecolor{listing-rule}{HTML}{B3B2B3} +\definecolor{listing-numbers}{HTML}{B3B2B3} +\definecolor{listing-text-color}{HTML}{000000} +\definecolor{listing-keyword}{HTML}{435489} +\definecolor{listing-keyword-2}{HTML}{1284CA} % additional keywords +\definecolor{listing-keyword-3}{HTML}{9137CB} % additional keywords +\definecolor{listing-identifier}{HTML}{435489} +\definecolor{listing-string}{HTML}{00999A} +\definecolor{listing-comment}{HTML}{8E8E8E} +\colorlet{punct}{red!60!black} +\definecolor{delim}{RGB}{20,105,176} +\colorlet{numb}{magenta!60!black} + +\lstdefinestyle{eisvogel_listing_style}{ +$if(listings-disable-line-numbers)$ + xleftmargin = 0.6em, + framexleftmargin = 0.4em, +$else$ + numbers = left, + xleftmargin = 2.7em, + framexleftmargin = 2.5em, +$endif$ + backgroundcolor = \color{listing-background}, + basicstyle = \color{listing-text-color}\linespread{1.2}$if(code-block-font-size)$$code-block-font-size$$else$\footnotesize$endif$\ttfamily{}, + breaklines = true, + breakatwhitespace = true, + breakautoindent = true, + linewidth = \textwidth, + frame = single, + framesep = 0.19em, + rulecolor = \color{listing-rule}, + frameround = ffff, + tabsize = 2, + numberstyle = \color{listing-numbers}, + numbersep = 5pt, + aboveskip = 1.0em, + belowskip = 0.1em, + abovecaptionskip = 0em, + belowcaptionskip = 1.0em, + keywordstyle = {\color{listing-keyword}\bfseries}, + keywordstyle = {[2]\color{listing-keyword-2}\bfseries}, + keywordstyle = {[3]\color{listing-keyword-3}\bfseries\itshape}, + sensitive = true, + showspaces = false, + showstringspaces = false, + showtabs = false, + captionpos = b, + identifierstyle = \color{listing-identifier}, + commentstyle = \color{listing-comment}, + stringstyle = \color{listing-string}, + showstringspaces = false, + escapeinside = {/*@}{@*/}, % Allow LaTeX inside these special comments + literate = + {á}{{\'a}}1 {é}{{\'e}}1 {í}{{\'i}}1 {ó}{{\'o}}1 {ú}{{\'u}}1 + {Á}{{\'A}}1 {É}{{\'E}}1 {Í}{{\'I}}1 {Ó}{{\'O}}1 {Ú}{{\'U}}1 + {à}{{\`a}}1 {è}{{\`e}}1 {ì}{{\`i}}1 {ò}{{\`o}}1 {ù}{{\`u}}1 + {À}{{\`A}}1 {È}{{\`E}}1 {Ì}{{\`I}}1 {Ò}{{\`O}}1 {Ù}{{\`U}}1 + {ä}{{\"a}}1 {ë}{{\"e}}1 {ï}{{\"i}}1 {ö}{{\"o}}1 {ü}{{\"u}}1 + {Ä}{{\"A}}1 {Ë}{{\"E}}1 {Ï}{{\"I}}1 {Ö}{{\"O}}1 {Ü}{{\"U}}1 + {â}{{\^a}}1 {ê}{{\^e}}1 {î}{{\^i}}1 {ô}{{\^o}}1 {û}{{\^u}}1 + {Â}{{\^A}}1 {Ê}{{\^E}}1 {Î}{{\^I}}1 {Ô}{{\^O}}1 {Û}{{\^U}}1 + {œ}{{\oe}}1 {Œ}{{\OE}}1 {æ}{{\ae}}1 {Æ}{{\AE}}1 {ß}{{\ss}}1 + {ç}{{\c c}}1 {Ç}{{\c C}}1 {ø}{{\o}}1 {å}{{\r a}}1 {Å}{{\r A}}1 + {€}{{\EUR}}1 {£}{{\pounds}}1 {«}{{\guillemotleft}}1 + {»}{{\guillemotright}}1 {ñ}{{\~n}}1 {Ñ}{{\~N}}1 {¿}{{?`}}1 + {…}{{\ldots}}1 {≥}{{>=}}1 {≤}{{<=}}1 {„}{{\glqq}}1 {“}{{\grqq}}1 + {”}{{''}}1 +} +\lstset{style=eisvogel_listing_style} + +% +% Java (Java SE 12, 2019-06-22) +% +\lstdefinelanguage{Java}{ + morekeywords={ + % normal keywords (without data types) + abstract,assert,break,case,catch,class,continue,default, + do,else,enum,exports,extends,final,finally,for,if,implements, + import,instanceof,interface,module,native,new,package,private, + protected,public,requires,return,static,strictfp,super,switch, + synchronized,this,throw,throws,transient,try,volatile,while, + % var is an identifier + var + }, + morekeywords={[2] % data types + % primitive data types + boolean,byte,char,double,float,int,long,short, + % String + String, + % primitive wrapper types + Boolean,Byte,Character,Double,Float,Integer,Long,Short + % number types + Number,AtomicInteger,AtomicLong,BigDecimal,BigInteger,DoubleAccumulator,DoubleAdder,LongAccumulator,LongAdder,Short, + % other + Object,Void,void + }, + morekeywords={[3] % literals + % reserved words for literal values + null,true,false, + }, + sensitive, + morecomment = [l]//, + morecomment = [s]{/*}{*/}, + morecomment = [s]{/**}{*/}, + morestring = [b]", + morestring = [b]', +} + +\lstdefinelanguage{XML}{ + morestring = [b]", + moredelim = [s][\bfseries\color{listing-keyword}]{<}{\ }, + moredelim = [s][\bfseries\color{listing-keyword}]{}, + moredelim = [l][\bfseries\color{listing-keyword}]{/>}, + moredelim = [l][\bfseries\color{listing-keyword}]{>}, + morecomment = [s]{}, + morecomment = [s]{}, + commentstyle = \color{listing-comment}, + stringstyle = \color{listing-string}, + identifierstyle = \color{listing-identifier} +} + +\lstdefinelanguage{JSON}{ + basicstyle=\footnotesize\sffamily, + numberstyle=\scriptsize, + showstringspaces=false, + breaklines=true, + frame=single, + literate= + *{0}{{{\color{numb}0}}}{1} + {1}{{{\color{numb}1}}}{1} + {2}{{{\color{numb}2}}}{1} + {3}{{{\color{numb}3}}}{1} + {4}{{{\color{numb}4}}}{1} + {5}{{{\color{numb}5}}}{1} + {6}{{{\color{numb}6}}}{1} + {7}{{{\color{numb}7}}}{1} + {8}{{{\color{numb}8}}}{1} + {9}{{{\color{numb}9}}}{1} + {:}{{{\color{punct}{:}}}}{1} + {,}{{{\color{punct}{,}}}}{1} + {\{}{{{\color{delim}{\{}}}}{1} + {\}}{{{\color{delim}{\}}}}}{1} + {[}{{{\color{delim}{[}}}}{1} + {]}{{{\color{delim}{]}}}}{1} +} + +\lstdefinelanguage{HCL}{ + keywords={true, false, return, OUTPUT}, + keywordstyle=\color{ForestGreen}\bfseries, + ndkeywords={none, var, txt, num, bool, tuple, list, func, value}, + ndkeywordstyle=\color{BurntOrange}\bfseries, + emph={map, where, reduce, print, add, where, do, equals, then, else, thenElse, +, -, /, *, not, addNumbers, is, modifyNumber, modifyFunction, times2, isAwesome, onEach, forEach, mapFunction, SetLEDPower, delay, LedSetup}, %add all included functions here + emphstyle={\color{RoyalBlue}}, + identifierstyle=\color{Aquamarine}, + sensitive=true, + commentstyle=\color{Gray}\ttfamily, + comment=[l]{\#}, + stringstyle=\color{black}\ttfamily, + morestring=[b]" +} + +\lstdefinelanguage{CSharp}{ + sensitive=true, + morekeywords=[1]{abstract,as,base,break,case,catch,checked,% + class,const,continue,default,delegate,do,else,enum,event,% + explicit,extern,false,finally,fixed,for,foreach,goto,if,% + implicit,in,interface,internal,is,lock,namespace,new,null,% + operator,out,override,params,private,protected,public,% + readonly,ref,return,sealed,sizeof,stackalloc,static,% + struct,switch,this,throw,true,try,typeof,unchecked,unsafe,% + using,virtual,volatile,while,bool,byte,char,decimal,% + double,float,int,lock,object,sbyte,short,string,uint,% + ulong,ushort,void% + }, + morekeywords=[2]{}, + morekeywords=[3]{dictionary,Dictionary,StopWordTool,Math,math,% + List,list,KeyValuePair% + }, + morekeywords=[4]{}, + morecomment=[l]{//}, + morecomment=[s]{/*}{*/}, + morecomment=[l][keywordstyle4]{\#}, + morestring=[b]", + morestring=[b]' +} + +\lstdefinelanguage{powershell}{ + morekeywords={Add-Content,Add-PSSnapin,Clear-Content,% + Clear-History,Clear-Host,Clear-Item,% + Clear-ItemProperty,Clear-Variable,% + Compare-Object,Connect-PSSession,ConvertFrom-String,% + Convert-Path,Copy-Item,Copy-ItemProperty,% + Disable-PSBreakpoint,Disconnect-PSSession,% + Enable-PSBreakpoint,Enter-PSSession,Exit-PSSession,% + Export-Alias,Export-Csv,Export-PSSession,ForEach-Object,% + Format-Custom,Format-Hex,Format-List,Format-Table,% + Format-Wide,Get-Alias,Get-ChildItem,Get-Clipboard,% + Get-Command,Get-ComputerInfo,Get-Content,Get-History,% + Get-Item,Get-ItemProperty,Get-ItemPropertyValue,Get-Job,% + Get-Location,Get-Member,Get-Module,Get-Process,% + Get-PSBreakpoint,Get-PSCallStack,Get-PSDrive,Get-PSSession,% + Get-PSSnapin,Get-Service,Get-TimeZone,Get-Unique,Get-Variable,% + Get-WmiObject,Group-Object,help,Import-Alias,Import-Csv,% + Import-Module,Import-PSSession,Invoke-Command,Invoke-Expression,% + Invoke-History,Invoke-Item,Invoke-RestMethod,Invoke-WebRequest,% + Invoke-WmiMethod,Measure-Object,mkdir,Move-Item,Move-ItemProperty,% + New-object,New-Alias,New-Item,New-Module,New-PSDrive,New-PSSession,% + New-PSSessionConfigurationFile,New-Variable,Out-GridView,% + Out-Host,Out-Printer,Pop-Location,powershell_ise.exe,% + Push-Location,Receive-Job,Receive-PSSession,Remove-Item,% + Remove-ItemProperty,Remove-Job,Remove-Module,Remove-PSBreakpoint,% + Remove-PSDrive,Remove-PSSession,Remove-PSSnapin,Remove-Variable,% + Remove-WmiObject,Rename-Item,Rename-ItemProperty,Resolve-Path,% + Resume-Job,Select-Object,Select-String,Set-Alias,Set-Clipboard,% + Set-Content,Set-Item,Set-ItemProperty,Set-Location,% + Set-PSBreakpoint,Set-TimeZone,Set-Variable,Set-WmiInstance,% + Show-Command,Sort-Object,Start-Job,Start-Process,Start-Service,% + Start-Sleep,Stop-Job,Stop-Process,Stop-Service,Suspend-Job,% + Tee-Object,Trace-Command,Wait-Job,Where-Object,Write-Output% + }, + morekeywords={do,else,elseif,for,foreach,function,if,in,until,while,% + ForEach-Object,Install-Module,Find-Module,Connect-AzAccount,% + Get-AzAdServicePrincipal,Get-AzAccessToken,Read-Host,% + ShouldProcess,throw,replace,ConvertTo-Json,ConvertFrom-Json,% + pscustomobject,bool,string,Write-Host,Write-Warning,New-Guid% + }, + alsodigit={-}, + sensitive=false, + morecomment=[l]{\#}, + morecomment=[n]{<\#}{\#>}, + morestring=[b]{"}, + morestring=[b]{'}, + morestring=[s]{@'}{'@}, + morestring=[s]{@"}{"@} +} +$endif$ + +% +% header and footer +% +$if(beamer)$ +$else$ +$if(disable-header-and-footer)$ +$else$ +\setlength{\headheight}{36pt} +\setlength{\footskip}{20pt} +\fancypagestyle{eisvogel-header-footer}{ + \fancyhf{} + $if(logo)$ + \fancyhf[LH]{\raisebox{0.5cm}{\includegraphics[width=3cm]{$logo$}}} + $endif$ + $if(date)$ + \fancyhf[RH]{\fontsize{8pt}{10pt}\selectfont $date$\\ } + $endif$ + \fancyhf[CH]{\fontsize{8pt}{10pt}\selectfont $if(project)$Project $project$$endif$$if(author)$\\$for(author)$$author$$sep$, $endfor$$endif$} + $if(footer-left)$ + \fancyhf[LF]{\fontsize{8pt}{10pt}\selectfont $footer-left$} + $endif$ + $if(footer-center)$ + \fancyhf[CF]{\fontsize{8pt}{10pt}\selectfont $footer-center$} + $endif$ + $if(footer-right)$ + \fancyhf[RF]{\fontsize{8pt}{10pt}\selectfont $footer-right$} + $endif$ + \renewcommand{\headrulewidth}{0pt} + \renewcommand{\footrulewidth}{0pt} +} +\pagestyle{eisvogel-header-footer} +$if(page-background)$ +\backgroundsetup{ +scale=1, +color=black, +opacity=$if(page-background-opacity)$$page-background-opacity$$else$0.2$endif$, +angle=0, +contents={% + \includegraphics[width=\paperwidth,height=\paperheight]{$page-background$} + }% +} +$endif$ +$endif$ +$endif$ + +%% +%% end header and footer +%% + +%% +%% begin set bullet style +%% +\usepackage{enumitem} +\setlistdepth{9} +\setlist[itemize,1]{label=$$\bullet$$,font=\fontsize{10pt}{12pt}\selectfont} +\setlist[itemize,2]{label=$$\circ$$,font=\fontsize{14pt}{17pt}\selectfont} +\setlist[itemize,3]{label=$$\blacksquare$$,font=\fontsize{4pt}{6pt}\selectfont} +\setlist[itemize,4]{label=$$\star$$} +\setlist[itemize,5]{label=$$\diamond$$} +\setlist[itemize,6]{label=$$\ast$$} +\setlist[itemize,7]{label=$$\star$$} +\setlist[itemize,8]{label=$$\ast$$} +\setlist[itemize,9]{label=$$\star$$} +\renewlist{itemize}{itemize}{9} +%% +%% end set bullet style +%% + +\begin{document} + +%% +%% begin titlepage +%% +$if(beamer)$ +$else$ +$if(titlepage)$ +\begin{titlepage} +$if(titlepage-background)$ +\newgeometry{top=2cm, right=4cm, bottom=3cm, left=4cm} +$else$ +\newgeometry{left=3cm, right=2cm, bottom=1.5cm} +$endif$ +$if(titlepage-color)$ +\definecolor{titlepage-color}{HTML}{$titlepage-color$} +\newpagecolor{titlepage-color}\afterpage{\restorepagecolor} +$endif$ +$if(titlepage-background)$ +\tikz[remember picture,overlay] \node[inner sep=0pt] at (current page.center){\includegraphics[width=\paperwidth,height=\paperheight]{$titlepage-background$}}; +$endif$ +\newcommand{\colorRule}[3][black]{\textcolor[HTML]{#1}{\rule{#2}{#3}}} +\begin{flushleft} +\noindent +\\[-1em] +\color[HTML]{$if(titlepage-text-color)$$titlepage-text-color$$else$5F5F5F$endif$} +\par +\noindent + +$if(titlepage-top-cover-image)$ +\noindent +\vskip -3em +\includegraphics{$titlepage-top-cover-image$} +$endif$ + +$if(titlepage-background)$ +% The titlepage with a background image has other text spacing and text size +{ + \setstretch{2} + \vfill + \vskip -8em + \textcolor{titlecolor}{\noindent {\fontsize{36pt}{42pt}\selectfont $title$}} + $if(subtitle)$ + \vskip 2em + \textcolor{subtitlecolor}{{\fontsize{14pt}{17pt}\selectfont $subtitle$}} + $endif$ + \vskip 0em + \textcolor{authorcolor}{\noindent {\fontsize{12pt}{14pt}\selectfont $for(author)$$author$$sep$, $endfor$ \vskip 0.6em $date$}} + \vfill +} +$else$ +{ + \setstretch{1.4} + \vfill + \vskip 18em + \textcolor{titlecolor}{\noindent {\fontsize{36pt}{42pt}\selectfont $title$}} + $if(subtitle)$ + \vskip 2em + \textcolor{subtitlecolor}{{\fontsize{14pt}{17pt}\selectfont $subtitle$}} + $endif$ + \vskip -1em + \textcolor{authorcolor}{\noindent {\fontsize{12pt}{14pt}\selectfont $for(author)$$author$$sep$, $endfor$}} + \vfill +} +$endif$ + +$if(disclaimer)$ +\vskip 21em +\setstretch{1.0} +\textcolor{disclaimercolor}{\noindent {\fontsize{8pt}{10pt}\selectfont $disclaimer$}} +$endif$ + +\end{flushleft} +\end{titlepage} +\restoregeometry +$endif$ +$endif$ + +%% +%% end titlepage +%% + +$if(has-frontmatter)$ +\frontmatter +$endif$ +$if(title)$ +$if(beamer)$ +\frame{\titlepage} +% don't generate the default title +% $else$ +% \maketitle +$endif$ +$if(abstract)$ +\begin{abstract} +$abstract$ +\end{abstract} +$endif$ +$endif$ + +$if(first-chapter)$ +\setcounter{chapter}{$first-chapter$} +\addtocounter{chapter}{-1} +$endif$ + +$if(version-history)$ +\hypertarget{version-history}{% +\section{Version history}\label{version-history}} + +\begin{longtable}[]{@{} + >{\raggedright\arraybackslash}p{(\columnwidth - 8\tabcolsep) * \real{0.1200}} + >{\raggedright\arraybackslash}p{(\columnwidth - 8\tabcolsep) * \real{0.2000}} + >{\raggedright\arraybackslash}p{(\columnwidth - 8\tabcolsep) * \real{0.2500}} + >{\raggedright\arraybackslash}p{(\columnwidth - 8\tabcolsep) * \real{0.4300}}@{}} +\toprule() +\begin{minipage}[b]{\linewidth}\raggedright +\textbf{Version} +\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright +\textbf{Date} +\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright +\textbf{Author} +\end{minipage} & \begin{minipage}[b]{\linewidth}\raggedright +\textbf{Description} +\end{minipage} \\ +\midrule() +\endhead +$for(version-history)$ +$if(version-history.version)$ +$version-history.version$ & $if(version-history.date)$$version-history.date$$endif$ & $if(version-history.author)$$version-history.author$$endif$ & $if(version-history.description)$$version-history.description$$endif$ \\ +$else$ +1.0.0 & $date$ & $for(author)$$author$$sep$ \and $endfor$ & Initial draft \\ +$endif$ +$endfor$ +\bottomrule() +\end{longtable} +$endif$ + +$for(include-before)$ +$include-before$ + +$endfor$ +$if(toc)$ +$if(toc-title)$ +\renewcommand*\contentsname{$toc-title$} +$endif$ +$if(beamer)$ +\begin{frame}[allowframebreaks] +$if(toc-title)$ + \frametitle{$toc-title$} +$endif$ + \tableofcontents[hideallsubsections] +\end{frame} +$if(toc-own-page)$ +\newpage +$endif$ +$else$ +{ +\setcounter{tocdepth}{$toc-depth$} +\tableofcontents +$if(toc-own-page)$ +\newpage +$endif$ +} +$endif$ +$endif$ +$if(lot)$ +\listoftables +$endif$ +$if(lof)$ +\listoffigures +$endif$ +$if(linestretch)$ +\setstretch{$linestretch$} +$endif$ +$if(has-frontmatter)$ +\mainmatter +$endif$ +$body$ + +$if(has-frontmatter)$ +\backmatter +$endif$ +$if(natbib)$ +$if(bibliography)$ +$if(biblio-title)$ +$if(has-chapters)$ +\renewcommand\bibname{$biblio-title$} +$else$ +\renewcommand\refname{$biblio-title$} +$endif$ +$endif$ +$if(beamer)$ +\begin{frame}[allowframebreaks]{$biblio-title$} + \bibliographytrue +$endif$ + \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} +$if(beamer)$ +\end{frame} +$endif$ + +$endif$ +$endif$ +$if(biblatex)$ +$if(beamer)$ +\begin{frame}[allowframebreaks]{$biblio-title$} + \bibliographytrue + \printbibliography[heading=none] +\end{frame} +$else$ +\printbibliography$if(biblio-title)$[title=$biblio-title$]$endif$ +$endif$ + +$endif$ +$for(include-after)$ +$include-after$ + +$endfor$ +\end{document} diff --git a/tools/mdconvert.sh b/tools/mdconvert.sh new file mode 100755 index 0000000..9fb52e5 --- /dev/null +++ b/tools/mdconvert.sh @@ -0,0 +1,297 @@ +#!/usr/bin/env sh +set -Eeuo pipefail +trap 'error_handler $LINENO "$SCRIPT_COMMAND" $?' ERR 1 2 3 6 +trap cleanup EXIT +error_handler() { + error $1 "${2}" $3 +} +cleanup() { + if [ -f "$DocsPath/metadata.json" ]; then + rm -f -- "$DocsPath/metadata.json" + fi +} +error() { + local line="$1" + local message="$2" + if [ $# -gt 2 ]; then + local code=$3 + else + local code=-1 + fi + local line_message="" + if [ "$line" != "" ]; then + line_message=" on or near line ${line}" + fi + if [[ -n "$message" ]]; then + message="${message} (exit code ${code})" + else + message="Unspecified (exit code ${code})" + fi + command printf '\033[1;31mError%s\033[0m: %s\n' "${line_message}" "${message}" 1>&2 + exit ${code} +} +warning() { + command printf '\033[1;33mWarning\033[0m: %s\n' "$1" 1>&2 +} +info() { + currentTime=$(date "+%Y-%m-%d %T") + if [ $# -gt 1 ]; then + command printf '\033[36m%14s\033[0m %s\n' "${currentTime} ${1}" "${2}" 1>&2 + else + command printf '\033[36m%s\033[0m\n' "${currentTime} ${1}" 1>&2 + fi +} +test_arg() { + if [ $# -lt 4 ] || [ -z "${4}" ] || echo "${4}" | grep -Eq '^-.*'; then + if [ "${1}" = 'true' ]; then + echo "${2}" + else + error '' "Value not set for argument ${3}" 1 + fi + else + echo "${4}" + fi +} +test_true_false() { + if [ $# -gt 1 ]; then + local default="${2}" + else + local default='false' + fi + local value=$(echo ${1} | awk '{ print tolower($0) }') + if [ -z "${value}" ]; then + echo "${default}" + elif [ "${value}" = 'true' ] || [ "${value}" = 'yes' ] || [ "${value}" == '1' ]; then + echo 'true' + elif [ "${value}" = 'false' ] || [ "${value}" = 'no' ] || [ "${value}" == '0' ]; then + echo 'false' + else + echo "${default}" + fi +} +get_file_path() { + if [ -z "${1}" ]; then + echo '' + elif [ -e ${1} ]; then + echo $(realpath "${1}") + elif [ -e ${2}/${1} ]; then + echo $(realpath ${2}/${1}) + else + echo '' + fi +} +get_version_history() { + if [ -n "${historyFilePath}" ]; then + mergeLogs=$(cat -- ${historyFilePath}) + elif [ "${ForceDefault}" = 'true' ]; then + mergeLogs=$(echo "tag: rel/repo/1.0.0|$currentDate|$DefaultAuthor|$DefaultDescription") + else + mergeLogs=$(git --no-pager log -$LimitVersionHistory --date-order --date=format:'%b %e, %Y' --no-merges --oneline --pretty=format:'%D|%ad|%an|%s' -- $DocsPath) + fi + if [ -z "$mergeLogs" ]; then + mergeLogs=$(echo "tag: rel/repo/1.0.0|$currentDate|$DefaultAuthor|$DefaultDescription") + fi + lineCount=$(echo "$mergeLogs" | wc -l) + historyJson='[]' + while IFS= read -r line; do + lineCount=$((lineCount-1)) + version="$(echo "$line" | cut -d'|' -f1 | rev | cut -d'/' -f1 | rev)" + if [ -z "$version" ] || ! echo $version | grep -Eq '^[0-9].*'; then + version="1.0.$lineCount" + fi + date="$(echo "$line" | cut -d'|' -f2)" + author="$(echo "$line" | cut -d'|' -f3)" + description="$(echo "$line" | cut -d'|' -f4)" + historyJson=$(echo "$historyJson" | jq --arg version "$version" \ + --arg date "$date" \ + --arg author "$author" \ + --arg description "$description" \ + '. +=[{ version: $version, date: $date, author: $author, description: $description }]') + done < <(echo "$mergeLogs") + echo "$historyJson" +} +process_params() { + while [ $# -gt 0 ] + do + local arg="$1" + case "$arg" in + -a|--author) + DefaultAuthor=$(test_arg true 'Innofactor' "$@") + shift 2 + ;; + -d|--description) + DefaultDescription=$(test_arg true 'Initial draft' "$@") + shift 2 + ;; + -f|--folder) + DocsPath=$(test_arg false '' "$@") + shift 2 + ;; + -force|--force-default) + shift + if [ $# -eq 0 ] || echo "${1}" | grep -Eq '^-.*'; then + ForceDefault='true' + else + ForceDefault=$(test_true_false "${1}") + shift + fi + ;; + -h|--historyfile) + HistoryFile=$(test_arg true '' "$@") + shift 2 + ;; + -l|--limitversionhistory) + LimitVersionHistory=$(test_arg true 15 "$@") + shift 2 + ;; + -o|--orderfile) + OrderFile=$(test_arg false "$@") + shift 2 + ;; + -out|--outfile) + OutFile=$(test_arg true 'document.order' "$@") + shift 2 + ;; + -p|--project) + Project=$(test_arg true '' "$@") + shift 2 + ;; + -r|--replacefile) + ReplaceFile=$(test_arg true '' "$@") + shift 2 + ;; + -s|--subtitle) + Subtitle=$(test_arg true '' "$@") + shift 2 + ;; + -t|--title) + Title=$(test_arg false '' "$@") + shift 2 + ;; + --template) + Template=$(test_arg true 'designdoc' "$@") + shift 2 + ;; + *) + warning "Unknown parameter: $1" + exit 1 + ;; + esac + done +} +DefaultAuthor='Innofactor' +DefaultDescription='Initial draft' +DocsPath='docs' +ForceDefault='false' +HistoryFile='' +LimitVersionHistory=15 +OrderFile='document.order' +OutFile='document.pdf' +Project='' +ReplaceFile='' +Subtitle='' +Template='designdoc' +Title='' +SCRIPT_COMMAND="$@" +process_params "$@" +if [ -z "${Title}" ]; then + error '' 'Missing Title: Value not set for argument --title' 1 +fi +currentDate=$(date "+%B %d, %Y") +currentPath=$(pwd) +# Ensure OutFile has full path +if ! echo "$OutFile" | grep -Eq '^[a-zA-Z]:\\.*' && ! echo "$OutFile" | grep -Eq '^/.*'; then + OutFile="${currentPath}/${OutFile}" +fi +if ! echo "$DocsPath" | grep -Eq '^[a-zA-Z]:\\.*' && ! echo "$DocsPath" | grep -Eq '^/.*'; then + DocsPath="${currentPath}/${DocsPath}" +fi +scriptPath=$(dirname -- $(realpath "$0")) +# Get path to docs files in the same folder as the docs +historyFilePath=$(get_file_path "$HistoryFile" $DocsPath) +orderFilePath=$(get_file_path "$OrderFile" $DocsPath) +replaceFilePath=$(get_file_path "$ReplaceFile" $DocsPath) +# Get path to template files in the same folder as the script +templateFilePath=$(get_file_path "${Template}.tex" $scriptPath) +templateCoverFilePath=$(get_file_path "${Template}-cover.png" $scriptPath) +templateLogoFilePath=$(get_file_path "${Template}-logo.png" $scriptPath) +info 'Get version history' +versionHistory=$(get_version_history) +info 'Merge markdown files' +files=$(cat -- ${orderFilePath} | while read line; do echo "${DocsPath}/${line}"; done) +markdownContent=$(awk 'FNR==1 && NR > 1{print ""}1' $files) +if [ -n "${ReplaceFile}" ]; then + info 'Perform replace in markdown' + while IFS=$'\t' read -r key value; do + markdownContent=$(echo "$markdownContent" | sed -e "s/${key}/${value}/g") + done < <(jq -r 'to_entries[] | [.key, .value] | @tsv' $replaceFilePath) +fi +authors=$(echo "$versionHistory" | jq '.[].author' | uniq | sed ':a; N; $!ba; s/\n/,/g') +IFS= read -r -d '' metadataContent < $DocsPath/metadata.json +# Should this markdown be an artifact after completion along with metadata.json? +# echo "${markdownContent}" > $OutFile.md +info "Create ${OutFile} using metadata:" +echo "${metadataContent}" | jq '.' +if ! echo "$OutFile" | grep -Eq '\.md$'; then + # We need to be in the docs path so image paths can be relative + cd $DocsPath + echo "${markdownContent}" | pandoc \ + --standalone \ + --listings \ + --pdf-engine=xelatex \ + --metadata-file="${DocsPath}/metadata.json" \ + -f markdown+backtick_code_blocks+pipe_tables+auto_identifiers+yaml_metadata_block+table_captions+footnotes+smart+escaped_line_breaks \ + --template="${templateFilePath}" \ + --filter pandoc-latex-environment \ + --output="${OutFile}" + cd $currentPath +else + echo "${markdownContent}" > $OutFile +fi +if [ ! -f $OutFile ]; then + warning "Unable to create ${OutFile}" +else + size=$(expr $(stat -c '%s' $OutFile) / 1000) + info "Created ${OutFile} using ${size} KB" +fi