Skip to content

Commit

Permalink
Update to pandoc 2.16.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Nützi, Gabriel committed Jan 4, 2022
1 parent 9d3c9b5 commit 11d6a26
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 2,082 deletions.
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Add here your loading of the virtual environement
# See more details: https://github.com/direnv/dire

# layout activate /path/to/your/python/env
. .venv/bin/activate
Binary file added Content.pdf
Binary file not shown.
4 changes: 2 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ cd tools

### Pandoc

Install [pandoc](https://pandoc.org/installing.html) (>= 2.9.2.1, tested with 2.11.0.4)
Install [pandoc](https://pandoc.org/installing.html) (>= 2.9.2.1, tested with 2.16.2)

For **Linux** and **macOs**:

Expand Down Expand Up @@ -201,7 +201,7 @@ meaning that also the python library `panflute` needs to be supporting this:

### Transclude: Relative file paths [done]

So far *relative* paths are not yet supported in `pandoc-indluce-files.lua` filter.
So far *relative* paths are not yet supported in `pandoc-include-files.lua` filter.

- [Issue](https://github.com/pandoc/lua-filters/issues/102) : ![Status](https://img.shields.io/badge/dynamic/json?color=%23FF0000&label=Status&query=%24.state&url=https%3A%2F%2Fapi.github.com%2Frepos%2Fpandoc%2Flua-filters%2Fissues%2F102)

Expand Down
70 changes: 34 additions & 36 deletions build/output-tex/input.tex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
%
\documentclass[
12pt,
british,
paper=a4,
twoside,
titlepage=true,
Expand All @@ -17,17 +16,6 @@
headings=optiontohead,
svgnames,
dvipsnames]{scrreprt}
\title{Technical Documents}
\usepackage{etoolbox}
\makeatletter
\providecommand{\subtitle}[1]{% add subtitle to \maketitle
\apptocmd{\@title}{\par {\large #1 \par}}{}{}
}
\makeatother
\subtitle{Demonstrating the Power of Markdown with Pandoc}
\author{Gabriel Nützi \and The Community}
\date{2. December 2020}

\usepackage{amsmath,amssymb}
\usepackage{lmodern}
\usepackage{iftex}
Expand Down Expand Up @@ -149,6 +137,15 @@
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}}
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
\ifLuaTeX
\usepackage[bidi=basic]{babel}
\else
\usepackage[bidi=default]{babel}
\fi
\babelprovide[main,import]{british}
% get rid of language-specific shorthands (see #6817):
\let\LanguageShortHands\languageshorthands
\def\languageshorthands#1{}
% Set include paths
\makeatletter
\providecommand*{\input@path}{}
Expand Down Expand Up @@ -410,20 +407,20 @@
% General Settings
\KOMAoptions{cleardoublepage=empty}
\raggedbottom
\ifXeTeX
% Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic)
\usepackage{polyglossia}
\setmainlanguage[variant=british]{english}
\else
\usepackage[main=british]{babel}
% get rid of language-specific shorthands (see #6817):
\let\LanguageShortHands\languageshorthands
\def\languageshorthands#1{}
\fi
\ifLuaTeX
\usepackage{selnolig} % disable illegal ligatures
\fi

\title{Technical Documents}
\usepackage{etoolbox}
\makeatletter
\providecommand{\subtitle}[1]{% add subtitle to \maketitle
\apptocmd{\@title}{\par {\large #1 \par}}{}{}
}
\makeatother
\subtitle{Demonstrating the Power of Markdown with Pandoc}
\author{Gabriel Nützi \and The Community}
\date{2. December 2020}
\begin{document}
\begin{titlepage}
\makeatletter
Expand Down Expand Up @@ -834,10 +831,10 @@ \subsection{HTML Table}\label{html-table}}
\end{itemize}

\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.15}}
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.20}}
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.35}}
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.30}}@{}}
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1500}}
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.2000}}
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3500}}
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3000}}@{}}
\caption{Table by included \texttt{.html} file.}\tabularnewline
\toprule
\begin{minipage}[b]{\linewidth}\raggedright
Expand Down Expand Up @@ -1009,10 +1006,10 @@ \subsection{Markdown Table}\label{sec:multi-line-table}}
\end{itemize}

\begin{longtable}[]{@{}
>{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.15}}
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.10}}
>{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.28}}
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.32}}@{}}
>{\centering\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1500}}
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.1000}}
>{\raggedleft\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.2750}}
>{\raggedright\arraybackslash}p{(\columnwidth - 6\tabcolsep) * \real{0.3250}}@{}}
\caption{Here’s a multiline table without a header.}\tabularnewline
\toprule
\endhead
Expand All @@ -1022,9 +1019,9 @@ \subsection{Markdown Table}\label{sec:multi-line-table}}
\end{longtable}

\begin{longtable}[]{@{}
>{\raggedright\arraybackslash}p{(\columnwidth - 4\tabcolsep) * \real{0.20}}
>{\raggedright\arraybackslash}p{(\columnwidth - 4\tabcolsep) * \real{0.10}}
>{\raggedright\arraybackslash}p{(\columnwidth - 4\tabcolsep) * \real{0.26}}@{}}
>{\raggedright\arraybackslash}p{(\columnwidth - 4\tabcolsep) * \real{0.2000}}
>{\raggedright\arraybackslash}p{(\columnwidth - 4\tabcolsep) * \real{0.1000}}
>{\raggedright\arraybackslash}p{(\columnwidth - 4\tabcolsep) * \real{0.2625}}@{}}
\caption{Sample grid table.}\tabularnewline
\toprule
\begin{minipage}[b]{\linewidth}\raggedright
Expand Down Expand Up @@ -1077,9 +1074,10 @@ \chapter*{References}\label{references}}
\begin{CSLReferences}{0}{0}
\leavevmode\vadjust pre{\hypertarget{ref-nuetzig_thesis_2016}{}}%
\CSLLeftMargin{{[}1{]} }
\CSLRightInline{G. Nützi, {‘Non-smooth granular rigid body dynamics with
applications to chute flows’}, PhD thesis, ETH Zurich; ETH Zürich,
Zürich, 2016. }
\CSLRightInline{G. Nützi,
{‘\href{https://doi.org/10.3929/ethz-a-010662262}{Non-smooth granular
rigid body dynamics with applications to chute flows}’}, PhD thesis, ETH
Zurich; ETH Zürich, Zürich, 2016. }

\leavevmode\vadjust pre{\hypertarget{ref-rockafellar_convex_2015}{}}%
\CSLLeftMargin{{[}2{]} }
Expand Down
96 changes: 40 additions & 56 deletions convert/pandoc/includes/Template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
$if(colorlinks)$
\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor}
$endif$
$if(dir)$
$if(latex-dir-rtl)$
\PassOptionsToPackage{RTLdocument}{bidi}
$endif$
$endif$
$if(CJKmainfont)$
\PassOptionsToPackage{space}{xeCJK}
$endif$
Expand All @@ -17,9 +12,6 @@
$if(fontsize)$
$fontsize$,
$endif$
$if(lang)$
$babel-lang$,
$endif$
$if(papersize)$
$papersize$paper,
$endif$
Expand All @@ -36,35 +28,6 @@
$classoption$$sep$,
$endfor$
]{$documentclass$}
$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$

$-- $if(beamer)$
$-- $if(background-image)$
$-- \usebackgroundtemplate{%
Expand Down Expand Up @@ -344,6 +307,7 @@
\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}{}}
Expand Down Expand Up @@ -398,35 +362,27 @@
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
$endif$
$for(header-includes)$
$header-includes$
$endfor$
$if(lang)$
\ifXeTeX
% Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic)
\usepackage{polyglossia}
\setmainlanguage[$for(polyglossia-lang.options)$$polyglossia-lang.options$$sep$,$endfor$]{$polyglossia-lang.name$}
$for(polyglossia-otherlangs)$
\setotherlanguage[$for(polyglossia-otherlangs.options)$$polyglossia-otherlangs.options$$sep$,$endfor$]{$polyglossia-otherlangs.name$}
$endfor$
\ifLuaTeX
\usepackage[bidi=basic]{babel}
\else
\usepackage[$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
\usepackage[bidi=default]{babel}
\fi
\babelprovide[main,import]{$babel-lang$}
$for(babel-otherlangs)$
\babelprovide[import]{$babel-otherlangs$}
$endfor$
% get rid of language-specific shorthands (see #6817):
\let\LanguageShortHands\languageshorthands
\def\languageshorthands#1{}
$if(babel-newcommands)$
$babel-newcommands$
$endif$
\fi
$endif$
$for(header-includes)$
$header-includes$
$endfor$
\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}
Expand All @@ -452,6 +408,34 @@
\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$
\begin{document}
$if(has-frontmatter)$
\frontmatter
Expand Down
Loading

0 comments on commit 11d6a26

Please sign in to comment.