From f3b3c20da1382e59de60c12fe0c016aa80e6053d Mon Sep 17 00:00:00 2001 From: Robin Alexander Date: Mon, 7 Aug 2023 12:54:23 +0200 Subject: Get rid of phantom spaces in lstlistings It is now possible to copy/paste from the generated pdf document --- mmbtools.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mmbtools.tex') diff --git a/mmbtools.tex b/mmbtools.tex index 6ff8924..bf5f116 100644 --- a/mmbtools.tex +++ b/mmbtools.tex @@ -110,7 +110,7 @@ Open-Source Software-Defined \dabplus Tools} \begin{document} \lstset{ language=C, % Code langugage -basicstyle=\ttfamily, % Code font, Examples: \footnotesize, \ttfamily +basicstyle=\ttfamily,columns=flexible, % Code font, Examples: \footnotesize, \ttfamily keywordstyle=\color{OliveGreen}, % Keywords font ('*' = uppercase) commentstyle=\color{gray}, % Comments font numbers=left, % Line nums position -- cgit v1.2.3 From 348863443a74e6d9c9d1fdf691a3a318238fc38c Mon Sep 17 00:00:00 2001 From: Robin Alexander Date: Tue, 8 Aug 2023 09:05:16 +0200 Subject: Remove listings numbering on the left This allows multi-lines copy/paste --- mmbtools.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mmbtools.tex') diff --git a/mmbtools.tex b/mmbtools.tex index bf5f116..c04efb3 100644 --- a/mmbtools.tex +++ b/mmbtools.tex @@ -113,7 +113,7 @@ language=C, % Code langugage basicstyle=\ttfamily,columns=flexible, % Code font, Examples: \footnotesize, \ttfamily keywordstyle=\color{OliveGreen}, % Keywords font ('*' = uppercase) commentstyle=\color{gray}, % Comments font -numbers=left, % Line nums position +numbers=none, % Line nums position numberstyle=\tiny, % Line-numbers fonts stepnumber=1, % Step between two line-numbers numbersep=5pt, % How far are line-numbers from code -- cgit v1.2.3 From da00689c89226aa932028dbba0d0eec63b66fd09 Mon Sep 17 00:00:00 2001 From: Robin Alexander Date: Tue, 8 Aug 2023 09:38:42 +0200 Subject: Set language=C when needed and not as default --- appendix.tex | 10 +++++----- mmbtools.tex | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'mmbtools.tex') diff --git a/appendix.tex b/appendix.tex index 02da04e..e7f6dcf 100644 --- a/appendix.tex +++ b/appendix.tex @@ -9,7 +9,7 @@ The three formats are called \emph{framed}, \emph{streamed} and \emph{raw}. The \emph{framed} format is used for saving a finite ETI stream into a file. Each frame does not contain any padding, and the format can be described as follows: -\begin{lstlisting} +\begin{lstlisting}[language=C] uint32_t nbFrames // for each frame uint16_t frameSize @@ -18,7 +18,7 @@ uint32_t nbFrames When streaming data, in which case the number of frames is not known in advance, the \emph{streamed} format can be used. This format is identical to the first one except for the missing \texttt{nbFrames}. -\begin{lstlisting} +\begin{lstlisting}[language=C] // for each frame uint16_t frameSize uint8_t data[frameSize] @@ -26,7 +26,7 @@ This format is identical to the first one except for the missing \texttt{nbFrame The \emph{raw} format corresponds to ETI(NI), where each frame has a constant size of 6144 Bytes. The padding in this case is necessary. -\begin{lstlisting} +\begin{lstlisting}[language=C] // for each frame uint8_t data[6144] \end{lstlisting} @@ -40,7 +40,7 @@ In order to select the format, the following syntax for the \texttt{-O} option i ODR defined and uses two additional EDI TAGs, whose content is described here. ODR-AudioEnc inserts audio level metadata into the ``ODRa'' TAG. The TAG item is in the following format: -\begin{lstlisting} +\begin{lstlisting}[language=C] TAG Name="ODRa" [4 bytes] Length=4 [4 bytes] Left Audio Level [signed 16-bit integer] @@ -49,7 +49,7 @@ ODR-AudioEnc inserts audio level metadata into the ``ODRa'' TAG. The TAG item is The second EDI TAG ``ODRv'' contains version and uptime information for the EDI source. -\begin{lstlisting} +\begin{lstlisting}[language=C] TAG Name="ODRv" [4 bytes] Length=N+4 [4 bytes] Version [String of N bytes, UTF-8 encoded, not zero terminated] diff --git a/mmbtools.tex b/mmbtools.tex index c04efb3..0fe6b1d 100644 --- a/mmbtools.tex +++ b/mmbtools.tex @@ -109,7 +109,6 @@ Open-Source Software-Defined \dabplus Tools} \begin{document} \lstset{ -language=C, % Code langugage basicstyle=\ttfamily,columns=flexible, % Code font, Examples: \footnotesize, \ttfamily keywordstyle=\color{OliveGreen}, % Keywords font ('*' = uppercase) commentstyle=\color{gray}, % Comments font -- cgit v1.2.3