Commit d883242f authored by Stefan Tauner's avatar Stefan Tauner
Browse files

user manual: refine listings

 - add captions and change references
 - refine formatting
parent 3facaa95
......@@ -8,14 +8,15 @@
/*.glg
/*.glo
/*.gls
/*.glsdefs
/*.idx
/*.ilg
/*.ind
/*.ist
/*.lof
/*.log
/*.lol
/*.lot
/*.out
/*.toc
/*.glsdefs
/*.synctex.gz
/*.toc
......@@ -104,9 +104,9 @@ operation.
When choosing \texttt{manual} as mode, \textit{\ac{FIJI} Download} prompts
the user for fault configurations before they are downloaded as shown
in Snippet~\ref{lst:manualprompt}.
in \Cref{lst:manualprompt}.
\begin{lstlisting}[frame=single]
\begin{lstlisting}[caption=Interactive configuration session,label=lst:manualprompt,style=plain]
Enter configuration for FIU #0 in t2 (default: 0x7): 0
Enter configuration for FIU #0 after t2 (default: 0x7): 1
Enter configuration for FIU #1 in t2 (default: 0x7): 2
......@@ -119,7 +119,6 @@ Enable trigger (default: 0)? 1
Use external/not internal trigger (default: 0)? 0
Enable reset (default: 0)? 0
\end{lstlisting}
\label{lst:manualprompt}
\begin{table}[ht]
\caption{Mapping between fault indices and models}
......
......@@ -3,7 +3,7 @@
The estimated resource values for LUTs and registers displayed in the
\textit{FIJI Setup} tool (see Section~\ref{sec:setup}) are relative to
the resources needed by the initial default configuration shown in the
listing below. Table~\ref{tab:resources} provides absolute resource
\Cref{lst:fiji_def_cfg}. Table~\ref{tab:resources} provides absolute resource
usage values of this default configuration for different FPGA families.
\begin{table}[H]
......@@ -28,8 +28,7 @@ usage values of this default configuration for different FPGA families.
\end{tabular}
\end{table}
\begin{minipage}{\linewidth}
\begin{lstlisting}[frame=single]
\begin{lstlisting}[caption=Initial FIJI configuration,label=lst:fiji_def_cfg,style=ini]
[CONSTS]
BAUDRATE=115200
CFGS_PER_MSG=2
......@@ -78,4 +77,3 @@ FAULT_MODEL=RUNTIME
LFSR_MASK=0x0
NET_NAME=i2c_master_top|G_18_i_a3_8
\end{lstlisting}
\end{minipage}
......@@ -72,8 +72,6 @@
\usepackage{caption}
\captionsetup[table]{singlelinecheck=false}
% Use cleveref to reference sections, chapters, etc. (\cref{} & \Cref{}) %
\usepackage{cleveref}
% Can be used to append pages of an existing PDF document %
%\usepackage{pdfpages}
......@@ -85,15 +83,44 @@
% % % % % Listings % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% Use listings for listings %
\usepackage{listings}
% Define the listings caption (=> "Listing #No - Title")
\DeclareCaptionFormat{listing}{\par\vskip1pt#1#2- #3}
\captionsetup[lstlisting]{format=listing,singlelinecheck=false,margin=0pt,font={sf},labelsep=space,labelfont=bf}
\captionsetup[lstlisting]{singlelinecheck=false}
\renewcommand{\lstlistingname}{Listing}
% Use cleveref to reference sections, chapters, etc. (\cref{} & \Cref{}) %
\usepackage{cleveref}
\lstdefinestyle{plain}{
language={},
identifierstyle=\color{black},
}
\lstset{%
upquote=true,
stepnumber=1,
% numbers=left,
% numberstyle=\footnotesize\ttfamily,
% numbersep=10pt,
showlines=true,
captionpos=b,
frame=single,
aboveskip=5pt,
belowskip=5pt,
showtabs=true,
tabsize=4,
basicstyle = \footnotesize\ttfamily,
emphstyle=\color{red!40!black},
commentstyle = \itshape\color{green!40!black},
keywordstyle = \color{blue!100!black!80}\bfseries,
stringstyle = \color{purple!40!black},
identifierstyle = \color{blue!100!black!80}\bfseries,
breaklines = true,
columns = fixed,
style=plain,
}
% % % VHDL % % %
\lstdefinestyle{VHDL}{
language = VHDL,
%numbers=left,
%numberstyle=\tiny,
% More Keywords taken from Patricks Example %
morekeywords = {
library,use,all,entity,is,port,in,out,end,architecture,of,
......@@ -101,92 +128,21 @@
nand,nor,xnor, if, elsif, else, then, downto
},
morecomment = [l]--,
tabsize = 4,
showstringspaces = false,
basicstyle = \footnotesize\ttfamily,
keywordstyle = \color{blue!100!black!80}\bfseries,
commentstyle = \itshape\color{green!40!black},
stringstyle = \color{purple!40!black},
}
% % % XML % % %
\lstdefinestyle{XML}{
language = XML,
%numbers=left,
%numberstyle=\tiny,
columns = fullflexible,
tabsize = 4,
showstringspaces = false,
morestring=[b]",
morecomment=[s]{<?}{?>},
morecomment=[s][\color{green!40!black}]{<!--}{-->},
morekeywords={version,type}, % list your attributes here
emph={},
emphstyle=\color{red!40!black},
basicstyle = \footnotesize\ttfamily,
commentstyle = \itshape\color{green!40!black},
keywordstyle = \color{blue!100!black!80}\bfseries,
stringstyle = \color{purple!40!black},
tagstyle = \color{blue!100!black!80}\bfseries,
}
% % % C % % %
\lstdefinestyle{C}{
language = C,
%numbers=left,
%numberstyle=\tiny,
belowcaptionskip = 1\baselineskip,
breaklines = true,
xleftmargin = \parindent,
tabsize = 4,
showstringspaces = false,
basicstyle = \footnotesize\ttfamily,
keywordstyle = \color{blue!100!black!80}\bfseries,
commentstyle = \itshape\color{green!40!black},
stringstyle = \color{purple!40!black},
}
% % % PERL % % %
\lstdefinestyle{Perl}{
language = Perl,
%numbers=left,
%numberstyle=\tiny,
tabsize=4,
columns=fixed,
showstringspaces=false,
showtabs=false,
keepspaces,
basicstyle = \footnotesize\ttfamily,
keywordstyle = \color{blue!100!black!80}\bfseries,
commentstyle = \itshape\color{green!40!black},
stringstyle = \color{purple!40!black},
}
% % % INI % % %
\lstdefinestyle{Ini}{
%numbers=left,
%numberstyle=\tiny,
morecomment = [l][\color{purple!40!black}]{//},
morecomment = [s][\color{blue!100!black!80}]{[}{]},
morecomment = [s][\color{blue!100!black!80}\bfseries]{[}{]},
morecomment = [l][\textrm]{[...]},
columns = fixed, %fullflexible
morestring = [b]"
showstringspaces = false,
basicstyle = \footnotesize\ttfamily,
}
% % % MATHLAB % % %
\lstdefinestyle{Mathlab}{
language = Matlab,
%numbers = left,
%numberstyle = \tiny,
breaklines = true,
showstringspaces = false,
basicstyle = \footnotesize\ttfamily,
keywordstyle = \color{blue!100!black!80}\bfseries,
commentstyle = \itshape\color{green!40!black},
stringstyle = \color{purple!40!black},
identifierstyle = \color{blue!100!black!80}\bfseries,
% % % Shell with less color % % %
\lstdefinestyle{shell}{
language = sh,
identifierstyle=\color{black},
keywordstyle=\color{black},
}
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
......@@ -271,6 +227,10 @@
\listoftables
\addcontentsline{toc}{section}{\nonumberline List of Tables}
\renewcommand*{\lstlistlistingname}{List of Listings}
\lstlistoflistings
\addcontentsline{toc}{section}{\nonumberline List of Listings}
% List of Abbreviations %
\printglossary[style=myAcroStyle,type=acronym,title=List of Abbreviations,toctitle=List of Abbreviations]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment