1
0

tex: proper listing alignment

This commit is contained in:
leo 2023-05-26 02:24:00 +02:00
parent 90add11286
commit bec207e7f2
Signed by: wanderer
SSH Key Fingerprint: SHA256:Dp8+iwKHSlrMEHzE3bJnPng70I7LEsa3IJXRH/U+idQ

@ -683,6 +683,7 @@ label=gitverif, basicstyle=\linespread{0.9}\footnotesize\ttfamily]
% # alternatively:
% git verify-commit <commit>
\end{lstlisting}
\vspace*{-\baselineskip}
There is one caveat to this though, git first needs some additional
configuration for the code in Listing~\ref{gitverif} to work as one would
@ -707,6 +708,7 @@ label=gitsshprep, basicstyle=\linespread{0.9}\footnotesize\ttfamily]
% # set the allowed signers file path for the local repository.
% git config --local gpg.ssh.allowedsignersfile=./tmp/.allowed_signers
\end{lstlisting}
\vspace*{-\baselineskip}
After the code in Listing~\ref{gitsshprep} is run, everything from the
Listing~\ref{gitverif} should remain applicable for the lifetime of the
@ -1051,6 +1053,7 @@ let Schema =
}
}
\end{lstlisting}
\vspace*{-\baselineskip}
The main configuration is comprised of both raw attributes and child records,
which allow for grouping of related functionality. For instance, configuration
@ -1369,6 +1372,7 @@ label=breachDataGoSchema]
Data any
}
\end{lstlisting}
\vspace*{-\baselineskip}
The Go representation shown in Listing~\ref{breachDataGoSchema} will in
actuality be written and supplied by the user of the program as a YAML
@ -1380,7 +1384,7 @@ machine readability. That should allow for documents similar to what can be
seen in Listing~\ref{breachDataYAMLSchema} to be ingested by the program,
read and written by humans and programs alike.
\vspace{\parskip}
\smallskip
\begin{lstlisting}[language=YAML, caption={Example Breach Data Schema supplied
to the program as a YAML file, optionally containing multiple documents},
label=breachDataYAMLSchema]
@ -1408,6 +1412,7 @@ label=breachDataYAMLSchema]
name: Horrible breach 2
...
\end{lstlisting}
\vspace*{-\baselineskip}
Notice how the emails list in Listing~\ref{breachDataYAMLSchema} misses one
record, perhaps because it was not supplied or mistakenly omitted. This is a
@ -1623,9 +1628,10 @@ declared here to give a sense of grouping. The error value returned from this
function is again checked and if everything goes well, the value of the
\texttt{usernameFound} boolean is checked next.
\smallskip
\smallskip
\begin{lstlisting}[language=Go, caption={Example integration test.},
label=integrationtest,basicstyle=\linespread{0.8}\footnotesize\ttfamily]
label=integrationtest,basicstyle=\linespread{0.9}\scriptsize\ttfamily]
// modules/user/user_test.go
package user