Kapitel 5

Tabellen mit LaTeX

5.1

Umgebung lstlisting in \multicolumn

\documentclass{article}
\usepackage{listings,array,varwidth}
\lstset{basicstyle=\ttfamily}
\begin{document}
\begin{tabular}{ |l|l| } \hline
\multicolumn{2}{|}{}%% empty arguments
  \varwidth{\linewidth}
  \begin{lstlisting}
    1st line
    2nd line
  \end{lstlisting}
  \endvarwidth\hfill\vline
 \\ \hline
some text & some text \\ \hline
\end{tabular}
\end{document}

Zurück zur Hauptseite/Back to main page
Copyright $Id: chapter05.html 5 2022-12-28 17:04:44Z voss $