diff --git a/.github/workflows/build-manual.yaml b/.github/workflows/build-manual.yaml index 9ae6fba6..cda62608 100644 --- a/.github/workflows/build-manual.yaml +++ b/.github/workflows/build-manual.yaml @@ -79,17 +79,9 @@ jobs: retention-days: 3 path: ${{ github.workspace }}/alpine/freeze/pandoc-3.1.13.project.freeze - #- name: Test extra image - # if: ${{ matrix.stack != 'static' }} - # run: make test-extra - - #- name: Publish test output - # uses: actions/upload-artifact@ef09cdac3e2d3e60d8ccadda691f4f1cec5035cb #v4.3.1 + 3 commits - # with: - # if-no-files-found: error - # name: tests - # retention-days: 3 - # path: ${{ github.workspace }}/alpine/freeze/pandoc-3.1.13.project.freeze + - name: Test extra image + if: ${{ matrix.stack != 'static' }} + run: make test-extra - name: Log into ghcr.io if: > diff --git a/.prettierignore b/.prettierignore deleted file mode 100644 index 33dab010..00000000 --- a/.prettierignore +++ /dev/null @@ -1,2 +0,0 @@ -designdoc.1.md -designdoc.2.md diff --git a/alpine/Dockerfile b/alpine/Dockerfile index d657dd43..5196fa80 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -192,17 +192,12 @@ RUN sed -e 's/ *#.*$//' -e '/^ *$/d' /root/extra_packages.txt | xargs tlmgr inst RUN python3 -m pip install --break-system-packages --no-cache-dir \ pandoc-latex-environment - #python-dotenv \ - #Office365-REST-Python-Client ARG TEMPLATES_DIR=/.pandoc/templates -ARG TOOLS_DIR=/.pandoc/tools RUN mkdir -p ${TEMPLATES_DIR} && \ ln -s /.pandoc /root/.pandoc COPY templates/ ${TEMPLATES_DIR}/ -COPY --chmod=555 tools/convert.sh ${TOOLS_DIR}/ - CMD [ "node" ] diff --git a/templates/designdoc-cover.png b/templates/designdoc-cover.png deleted file mode 100644 index 4d070ea4..00000000 Binary files a/templates/designdoc-cover.png and /dev/null differ diff --git a/templates/designdoc-logo.png b/templates/designdoc-logo.png deleted file mode 100644 index 54e9aae5..00000000 Binary files a/templates/designdoc-logo.png and /dev/null differ diff --git a/templates/designdoc-metadata.json b/templates/designdoc-metadata.json deleted file mode 100644 index 3f1e1457..00000000 --- a/templates/designdoc-metadata.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "author": [], - "block-headings": true, - "colorlinks": true, - "date": "April 08, 2024", - "disable-header-and-footer": false, - "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", - "page-numbers": true, - "geometry": "a4paper,left=2.54cm,right=2.54cm,top=1.91cm,bottom=2.54cm", - "links-as-notes": true, - "listings-disable-line-numbers": false, - "listings-no-page-break": false, - "lof": false, - "logo": "/.pandoc/templates/designdoc-logo.png", - "lot": false, - "mainfont": "Carlito", - "pandoc-latex-environment": { - "warningblock": ["warning"], - "importantblock": ["important"], - "noteblock": ["note"], - "cautionblock": ["caution"], - "tipblock": ["tip"] - }, - "project": "", - "subtitle": "", - "table-use-row-colors": false, - "tables": true, - "tables-left-aligned": true, - "title": "", - "titlepage": true, - "titlepage-color": "FFFFFF", - "titlepage-text-color": "5F5F5F", - "titlepage-top-cover-image": "/.pandoc/templates/designdoc-cover.png", - "toc": true, - "toc-own-page": true, - "toc-title": "Table of Contents", - "version-history": [] -} diff --git a/templates/designdoc.tex b/templates/designdoc.tex deleted file mode 100644 index cf086b2c..00000000 --- a/templates/designdoc.tex +++ /dev/null @@ -1,1313 +0,0 @@ -%% -% 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 a modified version of the Eisvogel pandoc LaTeX template v2.4.2: -% https://github.com/Wandmalfarbe/pandoc-latex-template/blob/13fa67d7db669ca8f84826fc5e58ca0ed15a14be/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[margin=2.5cm,includehead=true,includefoot=true,centering,$for(geometry)$$geometry$$sep$,$endfor$]{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} -$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$ -$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 -% 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} -\makeatletter - % allow citations to break across lines - \let\@cite@ofmt\@firstofone - % avoid brackets around text for \cite: - \def\@biblabel#1{} - \def\@cite#1#2{{#1\if@tempswa , #2\fi}} -\makeatother -\newlength{\cslhangindent} -\setlength{\cslhangindent}{1.5em} -\newlength{\csllabelwidth} -\setlength{\csllabelwidth}{3em} -\newenvironment{CSLReferences}[2] % #1 hanging-indent, #2 entry-spacing - {\begin{list}{}{% - \setlength{\itemindent}{0pt} - \setlength{\leftmargin}{0pt} - \setlength{\parsep}{0pt} - % turn on hanging indent if param 1 is 1 - \ifodd #1 - \setlength{\leftmargin}{\cslhangindent} - \setlength{\itemindent}{-1\cslhangindent} - \fi - % set entry spacing - \setlength{\itemsep}{#2\baselineskip}}} - {\end{list}} -\usepackage{calc} -\newcommand{\CSLBlock}[1]{\hfill\break\parbox[t]{\linewidth}{\strut\ignorespaces#1\strut}} -\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{\strut#1\strut}} -\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{\strut#1\strut}} -\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$ -$if(geometry)$ -$else$ -\usepackage[margin=2.5cm,includehead=true,includefoot=true,centering]{geometry} -$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$ - -% -% 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$ -\usepackage{titling} -\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 -$if(tables-left-aligned)$ -\setlength{\LTleft}{0pt} % left align tables -$endif$ -\renewcommand{\arraystretch}{1.3} % spacing (padding) - -$if(table-use-row-colors)$ -% 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 -\usepackage{etoolbox} -\AtBeginEnvironment{longtable}{\rowcolors{2}{}{table-row-color!100}} -\preto{\toprule}{\hiderowcolors}{}{} -\appto{\endhead}{\showrowcolors}{}{} -\appto{\endfirsthead}{\showrowcolors}{}{} -$endif$ -$endif$ - -% -% remove paragraph indentation -% -\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$ -\usepackage{fancyhdr} -\usepackage{lastpage} -\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(page-numbers)$ - \fancyhf[CF]{\fontsize{8pt}{10pt}\selectfont Page (\thepage) of \pageref{LastPage}} - $endif$ - $if(footer-right)$ - \fancyhf[RF]{\fontsize{8pt}{10pt}\selectfont $footer-right$} - $endif$ - \renewcommand{\headrulewidth}{0pt} - \renewcommand{\footrulewidth}{0pt} -} -\pagestyle{eisvogel-header-footer} - -$if(book)$ -\deftripstyle{ChapterStyle}{}{}{}{}{\pagemark}{} -\renewcommand*{\chapterpagestyle}{ChapterStyle} -$endif$ - -$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 -%% -\usepackage{awesomebox} - -\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 14em - \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 -\pagenumbering{arabic} -$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$ - -%% -%% begin version history -%% -$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$ - -%% -%% end versionhistory -%% - -$for(include-before)$ -$include-before$ - -$endfor$ -$if(toc)$ -$if(toc-own-page)$ -\newpage -$endif$ -$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$ -{ -$if(colorlinks)$ -\hypersetup{linkcolor=$if(toccolor)$$toccolor$$else$$endif$} -$endif$ -\setcounter{tocdepth}{$toc-depth$} -\tableofcontents -$if(toc-own-page)$ -\newpage -$endif$ -} -$endif$ -$endif$ -$if(lof)$ -\listoffigures -$endif$ -$if(lot)$ -\listoftables -$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/test/Makefile b/test/Makefile index b7638f96..84fd5048 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,14 +1,15 @@ -# Two primary targets are defined by this Makefile: +# Three primary targets are defined by this Makefile: # # 1. test-minimal: test a minimal base image # 2. test-latex: test a latex image +# 3. test-extra: test an extra image # # The IMAGE variable is required to be defined in order to `docker run` the # various tests. The parent Makefile test targets define this, or alternatively # -# 1. IMAGE=ghcr.io/innofactororg/image:tag make test-minimal -# 2. IMAGE=ghcr.io/innofactororg/image:tag make test-latex -# 3. IMAGE=ghcr.io/innofactororg/image:tag make test-extra +# 1. IMAGE=pandoc/image:tag make test-minimal +# 2. IMAGE=pandoc/image:tag make test-latex +# 3. IMAGE=pandoc/image:tag make test-extra ifndef IMAGE $(error IMAGE variable must be set to docker image to test) endif @@ -82,8 +83,7 @@ test-crossref-filter: $(test_files_path)/crossref-test.md \ LATEX_CMD = docker run --rm \ -v $(test_files_path):/data \ --entrypoint /usr/local/bin/pandoc \ - $(IMAGE) \ - --fail-if-warnings + $(IMAGE) # Generate list of targets to test all highlighting options available in pandoc. # See: https://pandoc.org/MANUAL.html#option--highlight-style @@ -112,17 +112,18 @@ test-latex: output/testsuite.pdf output/french.pdf output/german.pdf \ output/testsuite.pdf: testsuite.native $(LATEX_CMD) $< \ --output=$@ \ - --pdf-engine=xelatex + --pdf-engine=latexmk output/french.pdf: french.md $(LATEX_CMD) $< \ --output=$@ \ + --variable=csquotes \ --pdf-engine=xelatex output/german.pdf: german.md $(LATEX_CMD) $< \ --output=$@ \ - --pdf-engine=xelatex + --pdf-engine=lualatex output/lorem-geometry.pdf: lorem.md geometry.yaml $(LATEX_CMD) $< \ @@ -185,18 +186,12 @@ $(code_targets): output/code-highlight-%.pdf: code-highlight.md # EXTRA_CMD = docker run --rm \ -v $(test_files_path):/data \ - --entrypoint /.pandoc/tools/convert.sh \ - $(IMAGE) \ - --fail-if-warnings - -CONVERT_CMD = docker run --rm \ - -v $(test_files_path):/data \ - --entrypoint /.pandoc/tools/convert.sh \ + --entrypoint /usr/local/bin/pandoc \ $(IMAGE) \ --fail-if-warnings .PHONY: test-extra -test-extra: output/eisvogel.pdf output/designdoc.pdf #output/beamertheme-metropolis.pdf +test-extra: output/eisvogel.pdf output/eisvogel_with_environment.pdf output/beamertheme-metropolis.pdf output/eisvogel.pdf: eisvogel.md $(EXTRA_CMD) $< \ @@ -204,34 +199,19 @@ output/eisvogel.pdf: eisvogel.md --template=eisvogel \ --pdf-engine=xelatex -output/designdoc.pdf: designdoc.md - $(CONVERT_CMD) $< \ - --author="Innofactor" \ - --columns="72" \ - --description="Initial draft" \ - --dpi=300 \ - --filter pandoc-latex-environment \ - --from="markdown+backtick_code_blocks+escaped_line_breaks+footnotes-implicit_figures+implicit_header_references+inline_notes+line_blocks+link_attributes+space_in_atx_header+table_captions+multiline_tables+pipe_tables+task_lists+yaml_metadata_block" \ - --git-log-limit="15" \ - --history-file="designdoc-history.txt" \ - --input-files="designdoc.order" \ - --listings \ - --output=$@ \ - --pdf-engine="xelatex" \ - --project="1234567" \ - --replace-file="designdoc-replace.json" \ - --skip-git-history="true" \ - --standalone \ - --subtitle="Test document for pandoc-dockerfiles" \ - --template="designdoc" \ - --title="Designdoc template" - -#output/beamertheme-metropolis.pdf: beamertheme-metropolis.md -# $(EXTRA_CMD) $< \ -# --output=$@ \ -# --to=beamer \ -# --variable=theme:metropolis \ -# --variable=themeoptions:numbering=none +output/eisvogel_with_environment.pdf: eisvogel.md + $(EXTRA_CMD) $< \ + --output=$@ \ + --template=eisvogel \ + --pdf-engine=xelatex \ + --filter=pandoc-latex-environment + +output/beamertheme-metropolis.pdf: beamertheme-metropolis.md + $(EXTRA_CMD) $< \ + --output=$@ \ + --to=beamer \ + --variable=theme:metropolis \ + --variable=themeoptions:numbering=none # ____ _ # / ___| | ___ __ _ _ __ @@ -241,4 +221,4 @@ output/designdoc.pdf: designdoc.md # .PHONY: clean clean: - rm -rf output/eisvogel.pdf + rm -rf output/* \ No newline at end of file diff --git a/test/designdoc-history.txt b/test/designdoc-history.txt deleted file mode 100644 index 334089c4..00000000 --- a/test/designdoc-history.txt +++ /dev/null @@ -1,2 +0,0 @@ -1|Oct 26, 2023|Jane Doe|Initial draft -2|Oct 28, 2023|John Doe|Added detailed design \ No newline at end of file diff --git a/test/designdoc-replace.json b/test/designdoc-replace.json deleted file mode 100644 index 5aeac5ff..00000000 --- a/test/designdoc-replace.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "{contact name}": "Jane Doe", - "{organization name}": "Contoso" -} diff --git a/test/designdoc.1.md b/test/designdoc.1.md deleted file mode 100644 index 0653cd94..00000000 --- a/test/designdoc.1.md +++ /dev/null @@ -1,383 +0,0 @@ -# Markdown tips - -Created for {organization name} by {contact name}. - -## Blocks - -### Admonition blocks - -The markdown can include admonition blocks for text that need special attention. - -The following blocks are supported: **warning**, **important**, **note**, **caution**, **tip**. - -For example: - -```markdown -# A title - -This is some regular text. - -::: tip -This text is in a tip admonition block. -::: -``` - -### Code blocks - -Code blocks begin with a row of three or more backticks (`) and end with a row of backticks that must be at least as long as the starting row. - -Everything between these lines is treated as code. No indentation is necessary: - -````markdown -``` -if (a > 3) { - moveShip(5 * gravity, DOWN); -} -``` -```` - -Code blocks must be separated from surrounding text by blank lines. - -If the code itself contains a row of backticks, use a longer row of tildes or backticks at the start and end: - -`````markdown -```` -``` -code including tildes -``` -```` -````` - -A shortcut form can be used for specifying the language of the code block: - -````markdown -```json -{ - "author": [], - "block-headings": true, - "colorlinks": true, - "date": "April 08, 2024", - "disable-header-and-footer": false, - "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", - "page-numbers": true, - "geometry": "a4paper,left=2.54cm,right=2.54cm,top=1.91cm,bottom=2.54cm", - "links-as-notes": true, - "listings-disable-line-numbers": false, - "listings-no-page-break": false, - "lof": false, - "logo": "/.pandoc/templates/designdoc-logo.png", - "lot": false, - "mainfont": "Carlito", - "pandoc-latex-environment": { - "warningblock": ["warning"], - "importantblock": ["important"], - "noteblock": ["note"], - "cautionblock": ["caution"], - "tipblock": ["tip"] - }, - "project": "", - "subtitle": "", - "table-use-row-colors": false, - "tables": true, - "title": "", - "titlepage": true, - "titlepage-color": "FFFFFF", - "titlepage-text-color": "5F5F5F", - "titlepage-top-cover-image": "/.pandoc/templates/designdoc-cover.png", - "toc": true, - "toc-own-page": true, - "toc-title": "Table of Contents", - "version-history": [] -} -``` -```` - -The following languages are supported: - -- abc -- actionscript -- ada -- agda -- apache -- asn1 -- asp -- ats -- awk -- bash -- bibtex -- boo -- c -- changelog -- clojure -- cmake -- coffee -- coldfusion -- comments -- commonlisp -- cpp -- cs -- css -- curry -- d -- dart -- debiancontrol -- default -- diff -- djangotemplate -- dockerfile -- dosbat -- dot -- doxygen -- doxygenlua -- dtd -- eiffel -- elixir -- elm -- email -- erlang -- fasm -- fortranfixed -- fortranfree -- fsharp -- gap -- gcc -- glsl -- gnuassembler -- go -- gpr -- graphql -- groovy -- hamlet -- haskell -- haxe -- html -- idris -- ini -- isocpp -- j -- java -- javadoc -- javascript -- javascriptreact -- json -- jsp -- julia -- kotlin -- latex -- lex -- lilypond -- literatecurry -- literatehaskell -- llvm -- lua -- m4 -- makefile -- mandoc -- markdown -- mathematica -- matlab -- maxima -- mediawiki -- metafont -- mips -- modelines -- modula2 -- modula3 -- monobasic -- mustache -- nasm -- nim -- nix -- noweb -- objectivec -- objectivecpp -- ocaml -- octave -- opencl -- orgmode -- pascal -- perl -- php -- pike -- postscript -- povray -- powershell -- prolog -- protobuf -- pure -- purebasic -- purescript -- python -- qml -- r -- raku -- relaxng -- relaxngcompact -- rest -- rhtml -- roff -- ruby -- rust -- sass -- scala -- scheme -- sci -- scss -- sed -- sgml -- sml -- spdxcomments -- sql -- sqlmysql -- sqlpostgresql -- stan -- stata -- swift -- systemverilog -- tcl -- tcsh -- texinfo -- toml -- typescript -- verilog -- vhdl -- xml -- xorg -- xslt -- xul -- yacc -- yaml -- zsh - -### Line blocks - -A line block is a sequence of lines beginning with a vertical bar (|) followed by a space. The division into lines will be preserved in the output, as will any leading spaces; otherwise, the lines will be formatted as Markdown. This is useful for verse and addresses: - -```markdown -| The limerick packs laughs anatomical -| In space that is quite economical. -| But the good ones I've seen -| So seldom are clean -| And the clean ones so seldom are comical -``` - -## Footnotes - -Footnotes use the following syntax: - -```markdown -Here is a footnote reference,[^1] and another.[^longnote] - -[^1]: Here is the footnote. -[^longnote]: Here's one with multiple blocks. - - Subsequent paragraphs are indented to show that they - belong to the previous footnote. - -This paragraph won't be part of the note, because it -isn't indented. -``` - -The identifiers in footnote references may not contain spaces, tabs, newlines, or the characters ^, [, or ]. These identifiers are used only to correlate the footnote reference with the note itself; in the output, footnotes will be numbered sequentially. - -The footnotes themselves need not be placed at the end of the document. They may appear anywhere except inside other block elements (lists, block quotes, tables, etc.). Each footnote should be separated from surrounding content (including other footnotes) by blank lines. - -Inline footnotes, unlike regular notes, cannot contain multiple paragraphs. The syntax is as follows: - -```markdown -Here is an inline note.^[Inline notes are easier to write, since -you don't have to pick an identifier and move down to type the -note.] -``` - -## Heading identifiers - -To link to a heading `# Heading identifiers in HTML` you can simply write `[Heading identifiers in HTML]`. - -## Lists - -### Task lists - -Task lists can be used with the syntax of GitHub-Flavored Markdown: - -```markdown -- [ ] an unchecked task list item -- [x] checked item -``` - -## Paragraphs - -A backslash followed by a newline is a hard line break. - -Note: in multiline table cells, this is the only way to create a hard line break, since trailing spaces in the cells are ignored. - -## Tables - -A caption may optionally be provided with tables. A caption is a paragraph beginning with the string Table: (or table: or just :), which will be stripped off. It may appear either before or after the table. - -### Multiline tables - -Multiline tables allow header and table rows to span multiple lines of text (but cells that span multiple columns or rows of the table are not supported). Here is an example: - -```markdown ------------------------------------------------------------------------------------------------------------------------------------ - Centered Default Right Left - Header Aligned Aligned Aligned ------------ ------- --------------- ----------------------------------------------------------------------------------------------- - First row 12.0 Example of a row that spans multiple lines and is really wide you know. Lets see how this goes. - This is the second line. Hooray. - - Second row 5.0 Here's another one. Note - the blank line between - rows. ------------------------------------------------------------------------------------------------------------------------------------ - -Table: Here's the caption. It, too, may span -multiple lines. -``` - -The header and table rows must each fit on one line. Column alignments are determined by the position of the header text relative to the dashed line below it: - -- The table must begin with a row of dashes, before the header text (unless the header row is omitted). -- The table must end with a row of dashes, then a blank line. -- The rows must be separated by blank lines. -- If the dashed line is flush with the header text on the right side but extends beyond it on the left, the column is right-aligned. -- If the dashed line is flush with the header text on the left side but extends beyond it on the right, the column is left-aligned. -- If the dashed line extends beyond the header text on both sides, the column is centered. -- If the dashed line is flush with the header text on both sides, the default alignment is used (in most cases, this will be left). - -In multiline tables, the table parser pays attention to the widths of the columns, and the writers try to reproduce these relative widths in the output. So, if you find that one of the columns is too narrow in the output, try widening it in the Markdown source. - -The column header row may be omitted, provided a dashed line is used to end the table. For example: - -```markdown -------- ------ ---------- ------- - 12 12 12 12 - 123 123 123 123 - 1 1 1 1 -------- ------ ---------- ------- - -: Here's a multiline table without a header. -``` - -When the header row is omitted, column alignments are determined on the basis of the first line of the table body. So, in the tables above, the columns would be right, left, center, and right aligned, respectively. - -It is possible for a multiline table to have just one row, but the row should be followed by a blank line (and then the row of dashes that ends the table). - -### Pipe tables - -Pipe tables look like this: - -```markdown -| Right | Left | Default | Center | -| ----: | :--- | -------------------------------------------------------------------------------------------------------------------------- | :----: | -| 12 | 12 | Lots of text in this cell. It will wrap but if all cells have lots of text we could be better off using a multiline table. | 12 | -| 123 | 123 | 123 | 123 | -| 1 | 1 | 1 | 1 | -``` - -The beginning and ending pipe characters are optional, but pipes are required between all columns. The colons indicate column alignment as shown. The header cannot be omitted. To simulate a headerless table, include a header with blank cells. - -Since the pipes indicate column boundaries, columns need not be vertically aligned, as they are in the above example. - -The cells of pipe tables cannot contain block elements like paragraphs and lists, and cannot span multiple lines. If any line of the Markdown source is longer than 100 characters, then the table will take up the full text width and the cell contents will wrap, with the relative cell widths determined by the number of dashes in the line separating the table header from the table body. (For example ---|- would make the first column 3/4 and the second column 1/4 of the full text width.) On the other hand, if no lines are wider than column width, then cell contents will not be wrapped, and the cells will be sized to their contents. diff --git a/test/designdoc.2.md b/test/designdoc.2.md deleted file mode 100644 index b98c95f1..00000000 --- a/test/designdoc.2.md +++ /dev/null @@ -1,218 +0,0 @@ -# Markdown tips - -## Blocks - -### Admonition blocks - -The markdown can include admonition blocks for text that need special attention. - -The following blocks are supported: **warning**, **important**, **note**, **caution**, **tip**. - -For example: - -::: warning -This text is in a warning admonition block. -::: - -::: important -This text is in a important admonition block. -::: - -::: note -This text is in a note admonition block. -::: - -::: caution -This text is in a caution admonition block. -::: - -::: tip -This text is in a tip admonition block. -::: - -### Code blocks - -Code blocks begin with a row of three or more backticks (`) and end with a row of backticks that must be at least as long as the starting row. - -Everything between these lines is treated as code. No indentation is necessary: - -``` -if (a > 3) { - moveShip(5 * gravity, DOWN); -} -``` - -Code blocks must be separated from surrounding text by blank lines. - -If the code itself contains a row of backticks, use a longer row of tildes or backticks at the start and end: - -```` -``` -code including tildes -``` -```` - -A shortcut form can be used for specifying the language of the code block: - -```json -{ - "author": [], - "block-headings": true, - "colorlinks": true, - "date": "April 08, 2024", - "disable-header-and-footer": false, - "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", - "page-numbers": true, - "geometry": "a4paper,left=2.54cm,right=2.54cm,top=1.91cm,bottom=2.54cm", - "links-as-notes": true, - "listings-disable-line-numbers": false, - "listings-no-page-break": false, - "lof": false, - "logo": "/.pandoc/templates/designdoc-logo.png", - "lot": false, - "mainfont": "Carlito", - "pandoc-latex-environment": { - "warningblock": ["warning"], - "importantblock": ["important"], - "noteblock": ["note"], - "cautionblock": ["caution"], - "tipblock": ["tip"] - }, - "project": "", - "subtitle": "", - "table-use-row-colors": false, - "tables": true, - "title": "", - "titlepage": true, - "titlepage-color": "FFFFFF", - "titlepage-text-color": "5F5F5F", - "titlepage-top-cover-image": "/.pandoc/templates/designdoc-cover.png", - "toc": true, - "toc-own-page": true, - "toc-title": "Table of Contents", - "version-history": [] -} -``` - -### Line blocks - -A line block is a sequence of lines beginning with a vertical bar (|) followed by a space. The division into lines will be preserved in the output, as will any leading spaces; otherwise, the lines will be formatted as Markdown. This is useful for verse and addresses: - -| The limerick packs laughs anatomical -| In space that is quite economical. -| But the good ones I've seen -| So seldom are clean -| And the clean ones so seldom are comical - -## Footnotes - -Footnotes use the following syntax: - -Here is a footnote reference,[^1] and another.[^longnote] - -[^1]: Here is the footnote. -[^longnote]: Here's one with multiple blocks. - - Subsequent paragraphs are indented to show that they - belong to the previous footnote. - -This paragraph won't be part of the note, because it -isn't indented. - -The identifiers in footnote references may not contain spaces, tabs, newlines, or the characters ^, [, or ]. These identifiers are used only to correlate the footnote reference with the note itself; in the output, footnotes will be numbered sequentially. - -The footnotes themselves need not be placed at the end of the document. They may appear anywhere except inside other block elements (lists, block quotes, tables, etc.). Each footnote should be separated from surrounding content (including other footnotes) by blank lines. - -Inline footnotes, unlike regular notes, cannot contain multiple paragraphs. The syntax is as follows: - -Here is an inline note.^[Inline notes are easier to write, since -you don't have to pick an identifier and move down to type the -note.] - -## Heading identifiers - -To link to a heading `# Footnotes` you can simply write [Footnotes]. - -## Images - -![Image text](/.pandoc/templates/designdoc-logo.png){ width=50% } - -## Lists - -### Task lists - -Task lists can be used with the syntax of GitHub-Flavored Markdown: - -- [ ] an unchecked task list item -- [x] checked item - -## Paragraphs - -A backslash followed by a newline is a hard line break. - -Note: in multiline table cells, this is the only way to create a hard line break, since trailing spaces in the cells are ignored. - -## Tables - -A caption may optionally be provided with tables. A caption is a paragraph beginning with the string Table: (or table: or just :), which will be stripped off. It may appear either before or after the table. - -### Multiline tables - -Multiline tables allow header and table rows to span multiple lines of text (but cells that span multiple columns or rows of the table are not supported). Here is an example: - ------------------------------------------------------------------------------------------------------------------------------------ - Centered Default Right Left - Header Aligned Aligned Aligned ------------ ------- --------------- ----------------------------------------------------------------------------------------------- - First row 12.0 Example of a row that spans multiple lines and is really wide you know. Lets see how this goes. - This is the second line. Hooray. - - Second row 5.0 Here's another one. Note - the blank line between - rows. ------------------------------------------------------------------------------------------------------------------------------------ - -Table: Here's the caption. It, too, may span -multiple lines. - -The header and table rows must each fit on one line. Column alignments are determined by the position of the header text relative to the dashed line below it: - -- The table must begin with a row of dashes, before the header text (unless the header row is omitted). -- The table must end with a row of dashes, then a blank line. -- The rows must be separated by blank lines. -- If the dashed line is flush with the header text on the right side but extends beyond it on the left, the column is right-aligned. -- If the dashed line is flush with the header text on the left side but extends beyond it on the right, the column is left-aligned. -- If the dashed line extends beyond the header text on both sides, the column is centered. -- If the dashed line is flush with the header text on both sides, the default alignment is used (in most cases, this will be left). - -In multiline tables, the table parser pays attention to the widths of the columns, and the writers try to reproduce these relative widths in the output. So, if you find that one of the columns is too narrow in the output, try widening it in the Markdown source. - -The column header row may be omitted, provided a dashed line is used to end the table. For example: - -------- ------ ---------- ------- - 12 12 12 12 - 123 123 123 123 - 1 1 1 1 -------- ------ ---------- ------- - -: Here's a multiline table without a header. - -When the header row is omitted, column alignments are determined on the basis of the first line of the table body. So, in the tables above, the columns would be right, left, center, and right aligned, respectively. - -It is possible for a multiline table to have just one row, but the row should be followed by a blank line (and then the row of dashes that ends the table). - -### Pipe tables - -Pipe tables look like this: - -| Right | Left | Default | Center | -| ----: | :--- | -------------------------------------------------------------------------------------------------------------------------- | :----: | -| 12 | 12 | Lots of text in this cell. It will wrap but if all cells have lots of text we could be better off using a multiline table. | 12 | -| 123 | 123 | 123 | 123 | -| 1 | 1 | 1 | 1 | - -The beginning and ending pipe characters are optional, but pipes are required between all columns. The colons indicate column alignment as shown. The header cannot be omitted. To simulate a headerless table, include a header with blank cells. - -Since the pipes indicate column boundaries, columns need not be vertically aligned, as they are in the above example. - -The cells of pipe tables cannot contain block elements like paragraphs and lists, and cannot span multiple lines. If any line of the Markdown source is longer than 100 characters, then the table will take up the full text width and the cell contents will wrap, with the relative cell widths determined by the number of dashes in the line separating the table header from the table body. (For example ---|- would make the first column 3/4 and the second column 1/4 of the full text width.) On the other hand, if no lines are wider than column width, then cell contents will not be wrapped, and the cells will be sized to their contents. diff --git a/test/designdoc.order b/test/designdoc.order deleted file mode 100644 index c97b95ad..00000000 --- a/test/designdoc.order +++ /dev/null @@ -1,5 +0,0 @@ -# demo file 1 -designdoc.1.md - -# demo file 2 -designdoc.2.md diff --git a/tools/convert.sh b/tools/convert.sh deleted file mode 100644 index a110bf28..00000000 --- a/tools/convert.sh +++ /dev/null @@ -1,477 +0,0 @@ -#!/usr/bin/env sh -# shellcheck disable=SC3043 -set -e -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 test -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 -} -get_param_shifts() { - if [ "${1%%=*}" = "$1" ]; then - printf 2 - else - printf 1 - fi -} -set_param_value() { - ARG="${1%%=*}" - if [ "${ARG}" = "$1" ]; then - shift - if [ -z "$1" ]; then - >&2 echo "You must specify a value for property ${ARG}" - return 1 - fi - VALUE="$1" - else - VALUE="${1#*=}" - fi - shift -} -set_InputContent() { - local FILE NAME FOLDER CONTENT ITEMS="$#" - while [ "$#" -gt 0 ]; do - case "${1}" in - *) - FILE="${1}" - shift - if [ "$(printf '%s' "${FILE}" | tail -c 3)" = '.md' ]; then - FOLDER=$(dirname "$FILE") - NAME=$(basename "$FILE") - # Get content from file and replace relative links with full links - CONTENT=$( - printf '%s' "$(sed \ - -e "s|\(\[.*\](\)\(\../\)\(.*)\)|\1${FOLDER}/\2\3|g" \ - -e "s|\(\[.*\](\)\(\./\)\(.*)\)|\1${FOLDER}/\3|g" \ - -e "s|\(\[.*\](\)\(asset\)\(.*)\)|\1${FOLDER}/\2\3|g" \ - -e "s|\(\[.*\](\)\(attach\)\(.*)\)|\1${FOLDER}/\2\3|g" \ - -e "s|\(\[.*\](\)\(image\)\(.*)\)|\1${FOLDER}/\2\3|g" \ - -e "s|\(\[.*\](\)\(\.\)\(.*)\)|\1${FOLDER}/\2\3|g" \ - "${FILE}")" - ) - if test -n "${CONTENT}"; then - if [ "${ITEMS}" -gt 1 ]; then - info "${NAME} has ${#CONTENT} characters" - fi - if test -z "${InputContent}"; then - InputContent=$(printf '%s\n' "${CONTENT}") - else - InputContent=$(printf '%s\n\n%s\n' "${InputContent}" "${CONTENT}") - fi - fi - fi - ;; - esac - done -} -set_InputList() { - local FILE - while [ "$#" -gt 0 ]; do - case "${1}" in - *) - FILE="${1}" - shift - if ! test -f "${FILE}"; then - error '' "Unable to find ${FILE}" 1 - fi - if [ "$(printf '%s' "${FILE}" | tail -c 6)" = '.order' ]; then - OrderList="${OrderList}$(printf '%s\n' "$(sed \ - -e '/^#/d' \ - -e '/^[[:space:]]*$/d' \ - "${FILE}")" | tr '\n' ' ' | tr -d '\r') " - else - case "${InputList}" in - *${FILE}*) ;; # skip file if already in list - *) InputList="${InputList}$(readlink -f "${FILE}") " ;; - esac - fi - # If InputPath is not set - if test -z "${InputPath}"; then - # Set InputPath to the path of first file - InputPath=$(dirname "$(readlink -f "${FILE}")") - fi - ;; - esac - done -} -set_metadataChangeHistory() { - local historyFilePath lineCount historyJson mergeLogs tmp - local author authors date description line version versionHistory - # If metadata file has version-history key - if [ "$(jq 'has("version-history")' "${MetadataFile}")" = 'true' ]; then - info 'Get version history' - # If a history file is specified - if test -n "${HistoryFile}"; then - # Get full path to history file - historyFilePath=$(readlink -f "${HistoryFile}") - if ! test -f "${historyFilePath}"; then - error '' "Unable to find history file ${HistoryFile}" 1 - fi - # Get mergeLogs from history file - mergeLogs=$(cat "${historyFilePath}") - elif [ "${SkipGitHistory}" != 'true' ]; then - # If GitLogLimit is not specified - if [ "${GitLogLimit}" = '' ]; then - # Default to 15 entries - GitLogLimit=15 - fi - # Get mergeLogs from git log - mergeLogs=$( - git --no-pager log "-${GitLogLimit}" --date-order --date=format:'%b %e, %Y' \ - --no-merges --oneline --pretty=format:'%D|%ad|%an|%s' "${InputPath}" - ) - fi - # If mergeLogs is not empty - if test -n "${mergeLogs}"; then - # Count the log lines - lineCount=$(echo "${mergeLogs}" | wc -l) - historyJson='[]' - tmp=$(mktemp) - # Read log lines - printf '%s\n' "${mergeLogs}" | while read -r line; do - # Reduse line count by 1 - lineCount=$((lineCount-1)) - # Get version from log line - version=$(echo "${line}" | cut -d'|' -f1 | rev | cut -d'/' -f1 | rev) - # If version is empty or not a version - if test -z "${version}" || ! echo "${version}" | grep -Eq '^[0-9].*'; then - # Use version 1.0. + line count - version="1.0.${lineCount}" - fi - # Get date from log line - date=$(echo "${line}" | cut -d'|' -f2) - # Get author from log line - author=$(echo "${line}" | cut -d'|' -f3) - # Get description from log line - description=$(echo "${line}" | cut -d'|' -f4) - # If temp file has content - if test -s "${tmp}"; then - # Put that content into variable - historyJson=$(jq '.' "${tmp}") - fi - # Add data from log line to temp file - printf '%s\n' "${historyJson}" | jq \ - --arg version "${version}" \ - --arg date "${date}" \ - --arg author "${author}" \ - --arg description "${description}" \ - '. +=[{ version: $version, date: $date, author: $author, description: $description }]' > "${tmp}" - done - elif test -n "${MainAuthor}" && test -n "${FirstChangeDescription}"; then - # Add default values to temp file - printf '%s\n' '[]' | jq \ - --arg version '1.0.0' \ - --arg date "$(date "+%B %d, %Y")" \ - --arg author "${MainAuthor}" \ - --arg description "${FirstChangeDescription}" \ - '. +=[{ version: $version, date: $date, author: $author, description: $description }]' > "${tmp}" - fi - # If temp file has content - if test -s "${tmp}"; then - versionHistory=$(jq -c '.' "${tmp}") - set_metadataField version-history "${versionHistory}" - if [ "$(jq 'has("author")' "${MetadataFile}")" = 'true' ]; then - authors="[$(echo "${versionHistory}" | jq '.[].author' | uniq | sed ':a; N; $!ba; s/\n/,/g')]" - set_metadataField author "${authors}" - fi - fi - rm -f "${tmp}" - fi -} -set_metadataField() { - local tmp - # If metadata file has key - if [ "$(jq --arg k "${1}" 'has($k)' "${MetadataFile}")" = 'true' ]; then - # Create a tmp file - tmp=$(mktemp) - # Set the key value and write to tmp file - if [ "$(echo "${2}" | cut -c1)" = '[' ]; then - jq --arg k "${1}" --argjson v "${2}" '.[$k] = $v' "${MetadataFile}" > "${tmp}" - else - jq --arg k "${1}" --arg v "${2}" '.[$k] = $v' "${MetadataFile}" > "${tmp}" - fi - # Replace metadata file with tmp file - mv -f "${tmp}" "${MetadataFile}" - fi -} -set_metadataImage() { - local newPath tmp - if test -n "${InputPath}" && test -f "${InputPath}/${Template}-${1}.png"; then - # Image file exist in input files folder and is prefixed with template name - newPath="${InputPath}/${Template}-${1}.png" - elif test -n "${InputPath}" && test -f "${InputPath}/${1}.png"; then - # Image file exist in input files folder - newPath="${InputPath}/${1}.png" - elif test -f "${TemplatePath}/${Template}-${1}.png"; then - # Image file exist in template folder and is prefixed with template name - newPath="${TemplatePath}/${Template}-${1}.png" - elif test -f "${TemplatePath}/${1}.png"; then - # Image file exist in template folder - newPath="${TemplatePath}/${1}.png" - fi - if test -n "${newPath}" && [ "${newPath}" != "/.pandoc/templates/designdoc-${1}.png" ]; then - # Create a tmp file - tmp=$(mktemp) - # Set the image key value - jq --arg k "${2}" --arg l "${newPath}" '.[$k] = $l' "${MetadataFile}" > "${tmp}" - # Replace metadata file with tmp file - mv -f "${tmp}" "${MetadataFile}" - fi -} -process_params() { - local VALUE ARG POSITIONAL_SHIFTS=0 - while [ "$#" -gt "$POSITIONAL_SHIFTS" ]; do - case "${1%%=*}" in - --author) - set_param_value "$@" - shift "$(get_param_shifts "$@")" - MainAuthor="$VALUE" - ;; - --description) - set_param_value "$@" - shift "$(get_param_shifts "$@")" - FirstChangeDescription="$VALUE" - ;; - --git-log-limit) - set_param_value "$@" - shift "$(get_param_shifts "$@")" - GitLogLimit="$VALUE" - ;; - --history-file) - set_param_value "$@" - shift "$(get_param_shifts "$@")" - HistoryFile="$VALUE" - ;; - --input-files) - set_param_value "$@" - shift "$(get_param_shifts "$@")" - InputFiles="$VALUE" - ;; - -o|--output) - set_param_value "$@" - shift "$(get_param_shifts "$@")" - OutputFile="$VALUE" - ;; - --project) - set_param_value "$@" - shift "$(get_param_shifts "$@")" - Project="$VALUE" - ;; - --replace-file) - set_param_value "$@" - shift "$(get_param_shifts "$@")" - ReplaceFile="$VALUE" - ;; - --skip-git-history) - shift - SkipGitHistory='true' - ;; - --subtitle) - set_param_value "$@" - shift "$(get_param_shifts "$@")" - Subtitle="$VALUE" - ;; - --template) - set_param_value "$@" - shift "$(get_param_shifts "$@")" - Template="$VALUE" - ;; - --title) - set_param_value "$@" - shift "$(get_param_shifts "$@")" - Title="$VALUE" - ;; - --ascii|--bash-completion|--biblatex|-C|--citeproc|--dump-args| \ - --embed-resources|--epub-title-page|--fail-if-warnings|--file-scope| \ - --gladtex|-h|--help|--html-q-tags|-i|--ignore-args|--incremental| \ - --katex|--list-extensions|--list-highlight-languages| \ - --list-highlight-styles|--list-input-formats|--list-output-formats| \ - --list-tables|--listings|--mathml|-N|--natbib|--no-check-certificate| \ - --no-highlight|--number-sections|-p|--preserve-tabs|--reference-links| \ - -s|--sandbox|--section-divs--self-contained|--standalone| \ - --strip-comments|--table-of-contents|--toc|--trace|-v|--verbose| \ - --version|--webtex|--quiet) - ARG="${1}" - shift - PandocOptions="${PandocOptions}${ARG} " - ;; - -*) - set_param_value "$@" - shift "$(get_param_shifts "$@")" - PandocOptions="${PandocOptions}${ARG}=${VALUE} " - ;; - *) - VALUE="$1" - shift - set -- "$@" "$VALUE" - POSITIONAL_SHIFTS="$((POSITIONAL_SHIFTS+1))" - PositionalInput="${PositionalInput}${VALUE} " - ;; - esac - done -} -# Process script arguments and options -process_params "$@" -PandocOptions=$(echo "${PandocOptions}" | xargs) -# If InputFiles was not set with option --input-files -if test -z "${InputFiles}"; then - # Get InputFiles from positional script arguments - InputFiles=$(echo "${PositionalInput}" | xargs) -fi -if test -z "${InputFiles}"; then - error '' 'Missing input files. Value not set for option --input-files' 1 -fi -# Process input files (can be more than one and be in .order file) -# Disable SC2086 because word splitting is intended -# shellcheck disable=SC2086 -set_InputList $InputFiles -# If using .order file(s) -if test -n "${OrderList}"; then - # Process input files in the .order files - # Note: if mixing both .order files and other files, the other files - # will be added to the final input before the files in the .order files - # Disable SC2086 because word splitting is intended - # shellcheck disable=SC2086 - set_InputList $OrderList -fi -if test -z "${InputList}"; then - error '' "Unable to find input: ${InputFiles}" 1 -fi -# Merge markdown files into one InputContent variable -# Disable SC2086 because word splitting is intended -# shellcheck disable=SC2086 -set_InputContent $InputList -# If the output file is a markdown file -if [ "$(printf '%s' "${OutputFile}" | tail -c 3)" = '.md' ]; then - # Set input file the same as output file - PandocInput="${OutputFile}" -elif test -n "${InputContent}"; then - # Ensure PandocInput ends with .md and strip away existing file extension - PandocInput="$(echo "$OutputFile" | sed 's|\(.*\)\..*|\1|')_input.md" - # Write markdown content to file - printf '%s\n' "${InputContent}" > "${PandocInput}" -else - # Use the input list as it is - PandocInput=$InputList -fi -# If the input is markdown content -if test -n "${InputContent}"; then - # If a replace file is specified - if test -n "${ReplaceFile}"; then - ReplaceFilePath=$(readlink -f "${ReplaceFile}") - if ! test -f "${ReplaceFilePath}"; then - error '' "Unable to find replace file ${ReplaceFile}" 1 - fi - # Read content of replace json file into tab separated key value list - tab_values=$(jq -r 'to_entries[] | [.key, .value] | @tsv' "${ReplaceFilePath}") - # Read each line in the tab separated key value list into key and value variable - printf '%s\n' "${tab_values}" | while IFS="$(printf '\t')" read -r key value; do - # If pandoc input contains key - if [ "${InputContent#*"${key}"}" != "${InputContent}" ]; then - info "input: replace '${key}' with '${value}'" - # Replace key with value in InputContent (inline) - sed -i -e "s/${key}/${value}/g" "${PandocInput}" - fi - done - # Update InputContent from file - InputContent=$(cat "${PandocInput}") - fi - if ! test -s "${PandocInput}"; then - error '' "No content found in ${PandocInput}!" 1 - fi - info "Found ${#InputContent} characters in pandoc input" -fi -# If template is specified -if test -n "${Template}"; then - # Get template path - case "${Template}" in - designdoc) - TemplateFile='/.pandoc/templates/designdoc.tex' - TemplatePath='/.pandoc/templates' - ;; - eisvogel) - TemplateFile='/.pandoc/templates/eisvogel.latex' - TemplatePath='/.pandoc/templates' - ;; - *) - TemplateFile=$(readlink -f "${Template}") - TemplatePath=$(dirname "${TemplateFile}") - ;; - esac - # If template is not found - if ! test -f "${TemplateFile}"; then - error '' "Unable to find template ${Template}" 1 - fi -fi -# Get metadata file path -if test -n "${InputPath}" && test -f "${InputPath}/${Template}-metadata.json"; then - # Metadata file exist in input files folder and is prefixed with template name - MetadataFile="${InputPath}/${Template}-metadata.json" -elif test -n "${InputPath}" && test -f "${InputPath}/metadata.json"; then - # Metadata file exist in input files folder - MetadataFile="${InputPath}/metadata.json" -elif test -f "${TemplatePath}/${Template}-metadata.json"; then - # Metadata file exist in template folder and is prefixed with template name - MetadataFile="${TemplatePath}/${Template}-metadata.json" -elif test -f "${TemplatePath}/metadata.json"; then - # Metadata file exist in template folder - MetadataFile="${TemplatePath}/metadata.json" -elif [ "${Template}" = 'designdoc' ]; then - # Use default metadata file for designdoc template - MetadataFile='/.pandoc/templates/designdoc-metadata.json' -fi -# If a metadata file is specified -if test -n "${MetadataFile}"; then - # Update metadata file - set_metadataField date "$(date "+%B %d, %Y")" - set_metadataField project "${Project}" - set_metadataField subtitle "${Subtitle}" - set_metadataField title "${Title}" - # If using default metadata file for designdoc template - if [ "${MetadataFile}" = '/.pandoc/templates/designdoc-metadata.json' ]; then - # Update path to images - set_metadataImage logo logo - set_metadataImage cover titlepage-top-cover-image - fi - # Update change history - set_metadataChangeHistory - PandocOptions="${PandocOptions} --metadata-file=${MetadataFile}" -fi -PandocOptions="${PandocOptions} --template=${TemplateFile}" -PandocOptions="${PandocOptions} --output=${OutputFile}" -info "Running: pandoc ${PandocOptions} ${PandocInput}" -# Disable SC2086 because word splitting is intended -# shellcheck disable=SC2086 -/usr/local/bin/pandoc ${PandocOptions} ${PandocInput} -if ! test -f "${OutputFile}"; then - error '' "Failed to create ${OutputFile}" 1 -else - # Calculate output file size - size=$(($(stat -c '%s' "${OutputFile}") / 1000)) - info "Created ${OutputFile} (${size} KB)" -fi