Re: Mal wieder LaTeX

André Kelpe <[email protected]>
Newsgroups gmane.linux.redhat.general.german
Message-ID <1099938031.32041.7.camel@localhost>
Am Mo, den 08.11.2004 schrieb Jörg Linnenkohl um 17:50:
> Hi,

Hallo Jörg!

> ich benutzte LaTeX auch ganz gerne zum Erstellen von Manuals,
> doch nun habe ich ein Problem mit dem Paket "listing".
> Ich wollte dieses Paket nutzen, um Konfigurationsdateien
> im Original in mein LaTeX-Dokument einzubinden:
> 
> \begin{listing}
> VAR1="-lpr -onb -dlj"
> VAR2="-lpr -ohpgl -dlj2"
> ...
> \end{listing}

Ich benutze auch häufiger das Listings-Paket, und ich benutze dazu immer
den Befehl \lstlisting und nicht nur \listing. Das ganze sieht dann in
etwa so aus:

In meiner Präambel setzte ich einige Optionen:

\lstset{basicstyle=\ttfamily\scriptsize}
\lstset{showspaces=false}
\lstset{showtabs=false}
\lstset{showstringspaces=false}
\lstset{keywordstyle=\bfseries}
\lstset{tabsize=4}
\lstset{frameround=ffff}
\lstset{extendedchars=true}
\lstset{stringstyle=\ttfamily}
\lstset{commentstyle=\ttfamily}
\lstset{backgroundcolor=\color[rgb]{0.92,0.92,0.92}}
\lstset{numbers=left, numberstyle=\tiny, stepnumber=1, numbersep=5pt}
\lstset{captionpos=b}
\lstset{frame=single}


und ein Listing füge ich dan so ein:
\begin{figure}[!h]
	\begin{lstlisting}[language=XML, frame=single, label={lst:xml},
		caption={das Foo Format} ]
<?xml version="1.0" encoding="ISO-8859-1"?>
<foo>
    <bar>Quux</bar>
</foo>
	\end{lstlisting}
\end{figure}

Ich hoffe das hilft Dir weiter. Falls nein, frag mal im LaTeX-Forum auf
mrunix.de oder im Usenet in de.comp.text.tex, da wird man dir sicherlich
weiter helfen können, sollte das nicht klappen.

Grüße André

_______________________________________________
redhat-list-de mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/redhat-list-de
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQBBj7jvYursa8IlEZMRAoJRAJsEPMM+v58zCckPQKc7cgQn8dX1OwCfVoeV
BxKO364VHQwSU185/Ra9seU=
=rwP8
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.