Comprehensive TeX Archive Network

Direc­tory macros/latex/contrib/examplep

Verbatim phrases and listings in LaTeX
README by pts@fazekas.hu at Sun Jan 16 15:33:24 CET 2005

This directory contains the examplep LaTeX package, which provides
sophisticated features for typesetting verbatim source code listings,
including the display of the source code and its compiled LaTeX or METAPOST
output side-by-side, with automatic width detection and enabled page breaks
(in the source), without the need for specifying the source twice. Special
care is taken so section, page and footnote numbers do not interfere with the
main document. For typesetting short verbatim phrases, a replacement for the
\verb command is also provided in the package, which can be used inside
tables and moving arguments such as footnotes and section titles. The
listings package is used for syntax highlighting.

The article (eurotex_2005_examplep.pdf) reviews the design decisions made
during the package development and also presents some interesting
implementation internals. examplep is compared to standard LaTeX packages
such as listings, ltxdoc, sverb and moreverb. The new codep package and its
accomanying Perl script, which provide a convenient interface to the examplep
package for authors of manuals, is also presented. With codep it is possible
to generate the source code, the LaTeX or METAPOST output and the compilable
example file onto the CD from a single source embedded into the appropriate
place of the .tex document file.

The software is free software, covered by the GNU GPL v2.0 or later.

Down­load the con­tents of this pack­age in one zip archive (434.2k).

ex­am­plep – Ver­ba­tim phrases and list­ings in

Ex­am­plep pro­vides so­phis­ti­cated fea­tures for type­set­ting ver­ba­tim source code list­ings, in­clud­ing the dis­play of the source code and its com­piled or out­put side-by-side, with au­to­matic width de­tec­tion and en­abled page breaks (in the source), with­out the need for spec­i­fy­ing the source twice. Spe­cial care is taken that sec­tion, page and foot­note num­bers do not in­ter­fere with the main doc­u­ment. For type­set­ting short ver­ba­tim phrases, a re­place­ment for the \verb com­mand is also pro­vided in the pack­age, which can be used in­side ta­bles and mov­ing ar­gu­ments such as foot­notes and sec­tion ti­tles. The list­ings pack­age is used for syn­tax high­light­ing.

The ac­com­pa­ny­ing codep pack­age and the wr­files.pl Perl script pro­vide a con­ve­nient in­ter­face to the ex­am­plep pack­age for au­thors of man­u­als. With codep it is pos­si­ble to gen­er­ate the source code, the or out­put and the com­pi­l­able ex­am­ple file from a sin­gle source em­bed­ded into the ap­pro­pri­ate place of the .tex doc­u­ment file.

Li­censeGNU Gen­eral Public Li­cense
Main­tainerPéter Sz­abó
Con­tained inTeX Live as ex­am­plep
MiKTeX as ex­am­plep
Topics com­puter code list­ing
Guest Book Sitemap Contact Contact Author