WCM Forum

WCM Forum (http://www.wcm.at/forum/index.php)
-   Programmierung (http://www.wcm.at/forum/forumdisplay.php?f=17)
-   -   source code mit LaTeX darstellen (http://www.wcm.at/forum/showthread.php?t=76031)

paux 05.11.2002 12:57

source code mit LaTeX darstellen
 
hi,

ich hab mal ein latex-dokument gesehen, welches beispiele irgendeiner programmiersprache erläutert hat. diese code-beispiele waren aber nicht einfach in typewriter schrift dargestellt, sondern mit auszeichnung der kommandos in fetter schrift usw., also eine art syntax-highlighting ohne farben.

gibt es ein makro-package, das das automatisch macht?

paux 05.11.2002 13:23

ok hab nun doch was gefunden. src2tex macht leider nur typewriter-layout, aber das hier hört sich vielversprechend an:

DESCRIPTION
LGrind formats program sources in a nice style using LaTeX(1). Com-
ments are placed in roman, keywords in bold face, variables in italics,
and strings in typewriter font. Source file line numbers appear in the
right margin (every 10 lines).

LGrind processes its input file(s) and writes the result to standard
output. This output can be saved for later editting, inclusion in a
larger document, etc.

kingchaos01 08.11.2002 17:39

\usepackage{listings}

Bei LaTeX-Fragen besser unter
news://de.compt.text.tex
fragen.


Alle Zeitangaben in WEZ +2. Es ist jetzt 07:08 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© 2009 FSL Verlag