mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-19 11:38:05 +02:00
Replace minted by listings
This commit is contained in:
parent
555bea2dfa
commit
1fbce3b456
4 changed files with 34 additions and 9 deletions
|
@ -116,7 +116,7 @@ als der Puffer erlaubt, so wird in nach\-folgende Speicher\-bereiche
|
|||
geschrieben. Dies kann an folgendem, aus~\cite{Arora2013} entnommenem und
|
||||
leicht modifiziertem Beispiel beobachtet werden:
|
||||
|
||||
\inputminted[linenos, numbersep=5pt, tabsize=4, frame=lines, label=simple.c]{c}{simple.c}
|
||||
\lstinputlisting[language=C,title=simple.c]{simple.c}
|
||||
|
||||
Kompiliert man dieses Programm mit
|
||||
\texttt{gcc -O0 -fno-stack-protector -g simple.c -o simple}, so kann mit der
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
DOKUMENT = booka4
|
||||
|
||||
make:
|
||||
pdflatex -shell-escape $(DOKUMENT).tex -output-format=pdf # Referenzen erstellen
|
||||
pdflatex $(DOKUMENT).tex -output-format=pdf # Referenzen erstellen
|
||||
bibtex $(DOKUMENT)
|
||||
pdflatex -shell-escape $(DOKUMENT).tex -output-format=pdf # Referenzen einbinden
|
||||
pdflatex -shell-escape $(DOKUMENT).tex -output-format=pdf # Referenzen einbinden
|
||||
pdflatex $(DOKUMENT).tex -output-format=pdf # Referenzen einbinden
|
||||
pdflatex $(DOKUMENT).tex -output-format=pdf # Referenzen einbinden
|
||||
make clean
|
||||
|
||||
ebook:
|
||||
|
|
Binary file not shown.
|
@ -4,15 +4,40 @@
|
|||
\usepackage[utf8]{inputenc} % this is needed for umlauts
|
||||
\usepackage[ngerman]{babel} % this is needed for umlauts
|
||||
\usepackage[T1]{fontenc} % this is needed for correct output of umlauts in pdf
|
||||
\usepackage{graphicx} % Standardpaket zur Grafikeinbindung
|
||||
\usepackage{amsmath,amssymb} % Erweiterung des Mathematik-Modus
|
||||
\usepackage[colorinlistoftodos, german]{todonotes} % Option 'disable' entfernt alle ToDos
|
||||
\usepackage{graphicx}
|
||||
\usepackage{amsmath,amssymb}
|
||||
\usepackage[absolute,overlay]{textpos}
|
||||
\usepackage{vmargin} % Adjust margins in a simple way
|
||||
\usepackage{vmargin} % Adjust margins in a simple way
|
||||
\usepackage{tikz}
|
||||
\usepackage{csquotes}
|
||||
\usepackage[binary-units=true]{siunitx}
|
||||
\usepackage{minted} % needed for the inclusion of source code
|
||||
\usepackage{listings} % needed for the inclusion of source code
|
||||
\usepackage{caption}
|
||||
\DeclareCaptionFont{white}{\color{white}}
|
||||
\DeclareCaptionFormat{listing}{\colorbox{gray}{\parbox{\linewidth}{#3}}}
|
||||
\captionsetup[lstlisting]{format=listing,labelfont=white,textfont=white}
|
||||
|
||||
\lstset{
|
||||
aboveskip={1.3\baselineskip},
|
||||
basicstyle=\small\ttfamily\linespread{4},
|
||||
breaklines=false,
|
||||
columns=flexible,
|
||||
commentstyle=\color[rgb]{0.127,0.427,0.514}\ttfamily\itshape,
|
||||
escapechar=@,
|
||||
extendedchars=true,
|
||||
frame=none,
|
||||
identifierstyle=\color{black},
|
||||
inputencoding=latin1,
|
||||
keywordstyle=\color[HTML]{228B22}\bfseries,
|
||||
language=C,
|
||||
ndkeywordstyle=\color[HTML]{228B22}\bfseries,
|
||||
numbers=left,
|
||||
numberstyle=\scriptsize,
|
||||
prebreak = \raisebox{0ex}[0ex][0ex]{\ensuremath{\hookleftarrow}},
|
||||
stringstyle=\color[rgb]{0.639,0.082,0.082}\ttfamily,
|
||||
showstringspaces=false,
|
||||
xleftmargin=5.0ex
|
||||
}
|
||||
|
||||
\usepackage{url}
|
||||
\usepackage{breakurl}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue