Skip to content

Commit

Permalink
Merge pull request #225 from pi8027/widelisting
Browse files Browse the repository at this point in the history
Fix issues related to listings
  • Loading branch information
fmarotta authored Oct 26, 2024
2 parents 9fc54b8 + 2037b9e commit 2e1c7aa
Show file tree
Hide file tree
Showing 3 changed files with 159 additions and 160 deletions.
9 changes: 2 additions & 7 deletions examples/documentation/chapters/textnotes.tex
Original file line number Diff line number Diff line change
Expand Up @@ -138,26 +138,21 @@ \section{Marginlisting}
limited, especially for the captions, but you can try the following
code:

\begin{marginlisting}[-1.35cm]
\begin{marginlisting}
\caption{An example of a margin listing.}
\vspace{0.6cm}
\begin{lstlisting}[language=Python,style=kaolstplain]
print("Hello World!")
\end{lstlisting}
\end{marginlisting}

\begin{verbatim}
\begin{marginlisting}[-0.5cm]
\begin{marginlisting}
\caption{My caption}
\vspace{0.2cm}
\begin{lstlisting}[language=Python,style=kaolstplain]
... code ...
\end{lstlisting}
\end{marginlisting}
\end{verbatim}

Unfortunately, the space between the caption and the listing must be
adjusted manually; if you find a better way, please let me know.

Not only textual stuff can be displayed in the margin, but also figures.
Those will be the focus of the next chapter.
Binary file modified examples/documentation/main.pdf
Binary file not shown.
Loading

0 comments on commit 2e1c7aa

Please sign in to comment.