Skip to content
Snippets Groups Projects

Full rebase of Marco's changes

Open Simon Schuster requested to merge marcos-full-changes-rebased into master
2 files
+ 2
3
Compare changes
  • Side-by-side
  • Inline
Files
2
+ 96
43
@@ -182,13 +182,19 @@
breaklinks=true]{hyperref}
% Captions
% automatically loads hypcap
% manually loading hypcap breaks hyperref targets for listings
\RequirePackage[font=small, labelfont=bf, labelsep=endash, margin=1cm, hypcap]{caption}
% Subfigures
\RequirePackage[margin=1cm,hypcap]{subcaption}
% Citations
\RequirePackage[backend=biber,style=alphabetic]{biblatex}
\RequirePackage[backend=biber,% Use biber instead of old BibTeX
style=alphabetic,
sorting=nyt,
maxbibnames=99% Display all authors in bibliography (instead of \enquote{et al.)
]{biblatex}
\setcounter{biburlnumpenalty}{7000}% allow linebreaks after numbers (needed for URLs containing git hashes)
\defbibheading{bibliography}[\refname]{\chapter*{#1}\chaptermark{#1}}
@@ -285,8 +291,16 @@
% All the simple stuff goes here
% -----------------------------------------------------------------------------
% The Acronym package
\RequirePackage[printonlyused]{acronym}
% The glossaries-extra package, used for acronyms
\RequirePackage[acronym, nomain, toc=false]{glossaries-extra}
% Uncomment to typeset long form of acronym on first use as emphasized
%\renewcommand{\glsfirstlongdefaultfont}[1]{\emph{#1}}
% Write acronyms in bold when printing the list
\renewcommand{\glsnamefont}[1]{\textbf{#1}}
\setabbreviationstyle[acronym]{long-short}
% Make automatically inserted "blank pages" really blank
\RequirePackage{emptypage}
@@ -529,9 +543,83 @@
% -----------------------------------------------------------------------------
% Listings
% -----------------------------------------------------------------------------
\RequirePackage{listing} % For \listoflistings
\RequirePackage[savemem]{listings}
\ifthenelse{\boolean{earlydraft}}{
\RequirePackage[chapter, draft=true, newfloat]{minted}
}{
\RequirePackage[chapter, newfloat]{minted}
}
% Allow linebreaks in inline listings: https://github.com/gpoore/minted/issues/31
\renewcommand{\minted@inputpyg}{%
\expandafter\let\expandafter\minted@PYGstyle%
\csname PYG\minted@get@opt{style}{default}\endcsname
\VerbatimPygments{\PYG}{\minted@PYGstyle}%
\ifthenelse{\boolean{minted@isinline}}%
{\ifthenelse{\equal{\minted@get@opt{breaklines}{false}}{true}}%
{\let\FV@BeginVBox\relax
\let\FV@EndVBox\relax
\def\FV@BProcessLine##1{%
\FancyVerbFormatLine{%
\FV@BreakByTokenAnywhereHook
\FancyVerbFormatText{\FancyVerbBreakStart##1\FancyVerbBreakStop}}}%
\minted@inputpyg@inline}%
{\minted@inputpyg@inline}}%
{\minted@inputpyg@block}%
}
% Somehow fix padding below last line, found through trial-and-error without really knowing at all what the hell I am doing.
% Now, single-line listings don't look like that ugly with frame=lines
\renewcommand{\FV@EndListFrame@Lines}{%
\begingroup
\kern\FV@FrameSep\relax
\kern-0.35\baselineskip\relax
\baselineskip\z@skip
\FV@SingleFrameLine{\@ne}%
\endgroup}
\captionsetup[listing]{aboveskip=0pt}
\setminted{
breaklines = true,
breakautoindent = true,
fontsize = \footnotesize,
breakafter = \,,
fontseries = bf,
fontfamily = tt,
linenos = true,
numbersep = 5pt,
xleftmargin=15pt,
tabsize = 4,
frame = lines,
}
\setmintedinline{
fontsize = auto,
fontseries = auto,
style=bw,
}
% Provides \cinline[options]/code/ and \cinline[options]{code}
\newmintinline[cinline]{C}{}
% Provides \asminline[options]/code/ and \asminline[options]{code}
% for GNU Assembler in AT&T syntax
\newmintinline[asminline]{gas}{}
% I4 Cover Page (uses csquotes, should be loaded after minted, which loads lineno, which wants to be loaded after csquotes)
\RequirePackage{i4coverpage}
% Provides \bashinline[options]/code/ and \asminline[options]{code}
\newmintinline[bashinline]{bash}{}
\newmintinline[breakableinlinebash]{bash}{
breaklines = true,
breakafter=/,
breakaftersymbolpre=,
}
\ifthenelse{\boolean{germanthesis}}{
\newcommand{\listoflistingscaption}{Quellcodeverzeichnis}
@@ -546,43 +634,7 @@
% chapters so it is consistent with list of tables and figures
\let\Chapter\chapter
\def\chapter{\addtocontents{lol}{\protect\addvspace{10pt}}\Chapter}
\captionsetup[listing]{aboveskip=0pt}
\lstset{
language=C,
frame=lines,
framesep=5pt,
captionpos=b,
abovecaptionskip=1em,
numbers=left,
xleftmargin=15pt,
framexleftmargin=15pt,
numberstyle=\tiny,
numbersep=5pt,
stepnumber=1,
fontadjust,
tabsize=2,
showtabs=false,
showspaces=false,
showstringspaces=false,
breaklines=true,
breakatwhitespace=true,
keywordstyle=\color{black},
identifierstyle=\bfseries\color{blue},
commentstyle=\color{red},
prebreak=\raisebox{0ex}[0ex][0ex]{\color{gray}\ensuremath{\searrow}},
stringstyle=\bfseries\color{blue},
basicstyle=\ttfamily\bfseries\color{black}\footnotesize
}
\lstdefinestyle{txt}{
float,
language=C
}
\lstdefinestyle{xml}{
float,
language=XML
}
% -----------------------------------------------------------------------------
% I4 Cover Page (uses csquotes, should be loaded after minted, which loads lineno, which wants to be loaded after csquotes)
\RequirePackage{i4coverpage}
@@ -610,7 +662,8 @@
% Include list-of-Xs in table of contents
\ifthenelse{\boolean{earlydraft}}{
\RequirePackage[]{tocbibind}
\renewcommand{\lstlistoflistings}{\begingroup\tocfile{\lstlistlistingname}{lol}\endgroup}
%\renewcommand{\listoflistings}{\begingroup\tocfile{\listoflistingscaption}{lol}\endgroup}
\newcommand{\mymakeglossarytocentry}{\addcontentsline{toc}{chapter}{\glossarytitlename}}
\newcommand{\mymaketodotocentry}{\todototoc}
}{
\RequirePackage[nottoc,notlot,notlof]{tocbibind}
Loading