Merge branch '52-better-design-for-quotations' into 'master'
Resolve "Better design for quotations" Closes #52 See merge request fastexitlane/latex-boilerplate!32
This commit is contained in:
commit
cf6cb99174
|
@ -1,4 +0,0 @@
|
||||||
%!TEX root = ../main.tex
|
|
||||||
|
|
||||||
\section{Example}
|
|
||||||
\label{app:example}
|
|
|
@ -1,5 +1,7 @@
|
||||||
%!TEX root = ../main.tex
|
%!TEX root = ../main.tex
|
||||||
|
|
||||||
% input the appendix files here like this:
|
% input the appendix files here like this:
|
||||||
\input{appendix/01_example.tex}
|
% \input{appendix/01_example.tex}
|
||||||
\newpage
|
% \newpage
|
||||||
|
% when using markdown based appendices, they'll be generated to appendix/generated/${filename}.tex
|
||||||
|
% appendices need to be \sections!
|
||||||
|
|
0
appendix/generated/.gitkeep
Normal file
0
appendix/generated/.gitkeep
Normal file
95
build.sh
95
build.sh
|
@ -1,25 +1,94 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# cleanup
|
function run_clean {
|
||||||
latexmk -C
|
latexmk -C
|
||||||
if [ -f chapter/out.tex ]
|
|
||||||
then
|
if [ -f main.bbl ]
|
||||||
|
then
|
||||||
|
rm main.bbl
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f main.lol ]
|
||||||
|
then
|
||||||
|
rm main.lol
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f main.ptc ]
|
||||||
|
then
|
||||||
|
rm main.ptc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f main.run.xml ]
|
||||||
|
then
|
||||||
|
rm main.run.xml
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f chapter/out.tex ]
|
||||||
|
then
|
||||||
rm chapter/out.md
|
rm chapter/out.md
|
||||||
rm chapter/out.tex
|
rm chapter/out.tex
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
shopt -s nullglob
|
||||||
|
for f in appendix/generated/*.tex
|
||||||
|
do
|
||||||
|
rm $f
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
function run_pandoc {
|
||||||
|
if [ -f chapter/out.tex ]
|
||||||
|
then
|
||||||
|
rm chapter/out.md
|
||||||
|
rm chapter/out.tex
|
||||||
|
fi
|
||||||
|
|
||||||
# run pandoc
|
|
||||||
if [ $1 == "pandoc" ]
|
|
||||||
then
|
|
||||||
cat chapter/*.md > chapter/out.md
|
cat chapter/*.md > chapter/out.md
|
||||||
pandoc --lua-filter templates/germanquotes.lua --citeproc --filter pandoc-crossref \
|
pandoc --lua-filter templates/germanquotes.lua --citeproc --filter pandoc-crossref \
|
||||||
-M cref=true --top-level-division=chapter \
|
-M cref=true --top-level-division=chapter \
|
||||||
--bibliography library/library.bib --biblatex \
|
--bibliography library/library.bib --biblatex \
|
||||||
-o chapter/out.tex chapter/out.md
|
-o chapter/out.tex chapter/out.md
|
||||||
fi
|
}
|
||||||
|
|
||||||
# run latex build
|
function run_latexmk {
|
||||||
if [ $1 != "clean" ]
|
|
||||||
then
|
|
||||||
latexmk -latexoption="-shell-escape" main.tex
|
latexmk -latexoption="-shell-escape" main.tex
|
||||||
fi
|
}
|
||||||
|
|
||||||
|
function run_pandoc_appendix {
|
||||||
|
shopt -s nullglob
|
||||||
|
|
||||||
|
for f in appendix/generated/*.tex
|
||||||
|
do
|
||||||
|
rm $f
|
||||||
|
done
|
||||||
|
|
||||||
|
for f in appendix/*.md
|
||||||
|
do
|
||||||
|
filename=$(basename -- "$f")
|
||||||
|
filename="${filename%.*}"
|
||||||
|
pandoc --lua-filter templates/germanquotes.lua --citeproc --filter pandoc-crossref \
|
||||||
|
-M cref=true --top-level-division=chapter \
|
||||||
|
--bibliography library/library.bib --biblatex \
|
||||||
|
-o appendix/generated/$filename.tex appendix/$filename.md
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
"clean")
|
||||||
|
run_clean
|
||||||
|
;;
|
||||||
|
"pandoc")
|
||||||
|
run_pandoc
|
||||||
|
run_pandoc_appendix
|
||||||
|
run_latexmk
|
||||||
|
;;
|
||||||
|
"latex")
|
||||||
|
run_latexmk
|
||||||
|
;;
|
||||||
|
"appendix")
|
||||||
|
run_pandoc_appendix
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo $"Usage: $0 {clean|pandoc|latex}"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
53
config.tex
53
config.tex
|
@ -25,6 +25,10 @@
|
||||||
\usepackage{tocvsec2}
|
\usepackage{tocvsec2}
|
||||||
\usepackage{titletoc}
|
\usepackage{titletoc}
|
||||||
\newenvironment{custom_appendix}{%
|
\newenvironment{custom_appendix}{%
|
||||||
|
% normale Zeilenabstände
|
||||||
|
\singlespacing
|
||||||
|
% keine Einträge mehr im Abbildungs-/Tabellenverzeichnis
|
||||||
|
\captionsetup{list=no}
|
||||||
% ab hier keine Einträge mehr im Inhaltsverzeichnis - dafür haben wir das Anhangverzeichnis
|
% ab hier keine Einträge mehr im Inhaltsverzeichnis - dafür haben wir das Anhangverzeichnis
|
||||||
\addtocontents{toc}{\string\setcounter{tocdepth}{0}}
|
\addtocontents{toc}{\string\setcounter{tocdepth}{0}}
|
||||||
\renewcommand{\thechapter}{\MakeUppercase{\Alph{chapter}}}%
|
\renewcommand{\thechapter}{\MakeUppercase{\Alph{chapter}}}%
|
||||||
|
@ -37,7 +41,7 @@
|
||||||
\newpage
|
\newpage
|
||||||
}{
|
}{
|
||||||
|
|
||||||
%\stopcontents
|
\stopcontents
|
||||||
\renewcommand{\thechapter}{\arabic{chapter}}%
|
\renewcommand{\thechapter}{\arabic{chapter}}%
|
||||||
\setcounter{chapter}{1}
|
\setcounter{chapter}{1}
|
||||||
}
|
}
|
||||||
|
@ -69,6 +73,12 @@
|
||||||
% Tabellenzellen über mehrere Reihen oder Spalten
|
% Tabellenzellen über mehrere Reihen oder Spalten
|
||||||
\usepackage{multirow}
|
\usepackage{multirow}
|
||||||
|
|
||||||
|
% \multicolumn vernünftig in tabularx nutzen - siehe https://tex.stackexchange.com/questions/236155/tabularx-and-multicolumn
|
||||||
|
\newcommand{\tabularxmulticolumn}[3]
|
||||||
|
{\multicolumn{#1}
|
||||||
|
{>{\hsize=\dimexpr#1\hsize+#1\tabcolsep+\arrayrulewidth\relax}#2}
|
||||||
|
{#3}}
|
||||||
|
|
||||||
% Möglichkeit für Zeilenumbrüche in Tabellen
|
% Möglichkeit für Zeilenumbrüche in Tabellen
|
||||||
\usepackage{makecell}
|
\usepackage{makecell}
|
||||||
|
|
||||||
|
@ -76,10 +86,23 @@
|
||||||
\usepackage{rotating}
|
\usepackage{rotating}
|
||||||
|
|
||||||
% mehr Zeilenabstand in Tabellen
|
% mehr Zeilenabstand in Tabellen
|
||||||
\renewcommand{\arraystretch}{1.15}
|
\renewcommand{\arraystretch}{1.4}
|
||||||
|
|
||||||
% Für die Befehle \toprule, \midrule und \bottomrule, z.B. in Tabellen
|
% Für die Befehle \toprule, \midrule und \bottomrule, z.B. in Tabellen
|
||||||
\usepackage{booktabs}
|
\usepackage{booktabs}
|
||||||
|
% vertikale Abstände entfernen - siehe https://tex.stackexchange.com/questions/381718/how-to-remove-the-space-after-midrule-in-a-table
|
||||||
|
\aboverulesep = 0mm
|
||||||
|
\belowrulesep = 0mm
|
||||||
|
|
||||||
|
% mehrseitige Tabellen
|
||||||
|
\usepackage{longtable}
|
||||||
|
|
||||||
|
% Farben in Tabellenzeilen
|
||||||
|
\usepackage[table]{xcolor}
|
||||||
|
\definecolor{tableshadow}{RGB}{240,240,240}
|
||||||
|
|
||||||
|
% Tabellen aus CSV
|
||||||
|
\usepackage{csvsimple}
|
||||||
|
|
||||||
% Erlaubt die Benutzung von Farben
|
% Erlaubt die Benutzung von Farben
|
||||||
\usepackage{color}
|
\usepackage{color}
|
||||||
|
@ -99,6 +122,9 @@
|
||||||
% Listen ohne Abstände \begin{compactlist}...\end{compactlist}
|
% Listen ohne Abstände \begin{compactlist}...\end{compactlist}
|
||||||
\usepackage{paralist}
|
\usepackage{paralist}
|
||||||
|
|
||||||
|
% bessere Konfiguration + Referenzen auf enums und items
|
||||||
|
\usepackage{enumitem}
|
||||||
|
|
||||||
% Ausgabe der aktuellen Uhrzeit für die Draft-Versionen
|
% Ausgabe der aktuellen Uhrzeit für die Draft-Versionen
|
||||||
\usepackage{datetime}
|
\usepackage{datetime}
|
||||||
|
|
||||||
|
@ -143,7 +169,7 @@
|
||||||
ibidpage=true,
|
ibidpage=true,
|
||||||
citetracker=true
|
citetracker=true
|
||||||
]{biblatex}
|
]{biblatex}
|
||||||
\bibliography{library/library}
|
\addbibresource{library/library.bib}
|
||||||
\DeclareLabeldate{
|
\DeclareLabeldate{
|
||||||
\field{year}
|
\field{year}
|
||||||
\field{date}
|
\field{date}
|
||||||
|
@ -229,3 +255,24 @@
|
||||||
% Pandoc Integration
|
% Pandoc Integration
|
||||||
\providecommand{\tightlist}{%
|
\providecommand{\tightlist}{%
|
||||||
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
|
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
|
||||||
|
|
||||||
|
% PDF Input
|
||||||
|
\usepackage{pdfpages}
|
||||||
|
|
||||||
|
% Seiten im Querformat - wir wollen nicht pdflscape benutzen, da es komplette Seiten im PDF ins Querformat legt, was zu Problemen beim Druck führt (siehe https://texblog.org/2007/11/10/landscape-in-latex/)
|
||||||
|
\usepackage{lscape}
|
||||||
|
|
||||||
|
% schickere \quotes
|
||||||
|
\usepackage{framed}
|
||||||
|
\renewenvironment{quote}{
|
||||||
|
\FrameSep3pt
|
||||||
|
\def\FrameCommand{%
|
||||||
|
\hspace{12pt} % defaults to font size
|
||||||
|
{\color{black}\vrule width \heavyrulewidth}%
|
||||||
|
{\color{tableshadow}\vrule width 3pt}%
|
||||||
|
\colorbox{tableshadow}%
|
||||||
|
}
|
||||||
|
\vspace{-.25\topsep}
|
||||||
|
\MakeFramed{\advance\hsize-\width\FrameRestore}
|
||||||
|
}
|
||||||
|
{\endMakeFramed \vspace{-.75\topsep}}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user