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
|
||||
|
||||
% input the appendix files here like this:
|
||||
\input{appendix/01_example.tex}
|
||||
\newpage
|
||||
% \input{appendix/01_example.tex}
|
||||
% \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
99
build.sh
99
build.sh
|
@ -1,25 +1,94 @@
|
|||
#!/bin/bash
|
||||
|
||||
# cleanup
|
||||
latexmk -C
|
||||
if [ -f chapter/out.tex ]
|
||||
then
|
||||
rm chapter/out.md
|
||||
rm chapter/out.tex
|
||||
fi
|
||||
function run_clean {
|
||||
latexmk -C
|
||||
|
||||
# run pandoc
|
||||
if [ $1 == "pandoc" ]
|
||||
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.tex
|
||||
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
|
||||
|
||||
cat chapter/*.md > chapter/out.md
|
||||
pandoc --lua-filter templates/germanquotes.lua --citeproc --filter pandoc-crossref \
|
||||
-M cref=true --top-level-division=chapter \
|
||||
--bibliography library/library.bib --biblatex \
|
||||
-o chapter/out.tex chapter/out.md
|
||||
fi
|
||||
}
|
||||
|
||||
# run latex build
|
||||
if [ $1 != "clean" ]
|
||||
then
|
||||
function run_latexmk {
|
||||
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{titletoc}
|
||||
\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
|
||||
\addtocontents{toc}{\string\setcounter{tocdepth}{0}}
|
||||
\renewcommand{\thechapter}{\MakeUppercase{\Alph{chapter}}}%
|
||||
|
@ -37,7 +41,7 @@
|
|||
\newpage
|
||||
}{
|
||||
|
||||
%\stopcontents
|
||||
\stopcontents
|
||||
\renewcommand{\thechapter}{\arabic{chapter}}%
|
||||
\setcounter{chapter}{1}
|
||||
}
|
||||
|
@ -69,6 +73,12 @@
|
|||
% Tabellenzellen über mehrere Reihen oder Spalten
|
||||
\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
|
||||
\usepackage{makecell}
|
||||
|
||||
|
@ -76,10 +86,23 @@
|
|||
\usepackage{rotating}
|
||||
|
||||
% mehr Zeilenabstand in Tabellen
|
||||
\renewcommand{\arraystretch}{1.15}
|
||||
\renewcommand{\arraystretch}{1.4}
|
||||
|
||||
% Für die Befehle \toprule, \midrule und \bottomrule, z.B. in Tabellen
|
||||
\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
|
||||
\usepackage{color}
|
||||
|
@ -99,6 +122,9 @@
|
|||
% Listen ohne Abstände \begin{compactlist}...\end{compactlist}
|
||||
\usepackage{paralist}
|
||||
|
||||
% bessere Konfiguration + Referenzen auf enums und items
|
||||
\usepackage{enumitem}
|
||||
|
||||
% Ausgabe der aktuellen Uhrzeit für die Draft-Versionen
|
||||
\usepackage{datetime}
|
||||
|
||||
|
@ -143,7 +169,7 @@
|
|||
ibidpage=true,
|
||||
citetracker=true
|
||||
]{biblatex}
|
||||
\bibliography{library/library}
|
||||
\addbibresource{library/library.bib}
|
||||
\DeclareLabeldate{
|
||||
\field{year}
|
||||
\field{date}
|
||||
|
@ -229,3 +255,24 @@
|
|||
% Pandoc Integration
|
||||
\providecommand{\tightlist}{%
|
||||
\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