Comprehensive TeX Archive Network

Direc­tory tex-archive/macros/latex/contrib/cprotect

cprotect --- verbatim in macro arguments
E-mail: blflatex@gmail.com
Released under the LaTeX Project Public License v1.3c or later
See http://www.latex-project.org/lppl.txt

A user of the cprotect.sty package can include verbatim text (\verb,
verbatim environment, ...) in the argument of any command,
including moving arguments. Including verbatim text in footnotes,
section titles (and other titles), etc. is as simple as typing
`\cprotect\footnote` instead of `\footnote`, etc.

A similar approach is taken for environments. Nesting of the
various environments is taken into account.

This is work in progress, all comments/bug reports are welcome!

The whole package can be built from the file `cprotect.dtx' by running

pdflatex cprotect.dtx
makeindex -s gglo.ist -o cprotect.gls cprotect.glo
makeindex -s gind.ist -o cprotect.ind cprotect.idx
pdflatex cprotect.dtx
pdflatex cprotect.dtx

The first run of pdflatex produces `cprotect.ins', `cprotect.sty',
`cprotect.pdf', and this file. The other commands are necessary for
the pdf to contain its index and glossary.


Name Size Date Notes
README 1224 2011-01-27 19:36
cpro­tect.dtx 37617 2011-01-27 19:35
cpro­tect.pdf 623268 2011-01-27 19:36

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

cpro­tect – Al­low ver­ba­tim, etc., in macro ar­gu­ments

The pack­age de­fines the macro \cpro­tect that makes a fol­low­ing macro proof against ver­ba­tim in its ar­gu­ment; as, for ex­am­ple, \cpro­tect\sec­tion{\verb"foo"}

A sim­i­lar macro \cpro­tEnv (ap­plied to the \be­gin of an en­vi­ron­ment) sani­tises the be­hav­ior of frag­ile en­vi­ron­ments.

Mov­ing ar­gu­ments, and cor­re­spond­ing “ta­bles of …” work hap­pily.

Pack­age De­tailscpro­tect
Li­censeThe LaTeX Project Public Li­cense 1.3
Copy­right2010–2011 Bruno Le Floch
Main­tainerBruno Le Floch
Con­tained inTeX Live as cpro­tect
MiKTeX as cpro­tect
Topics ver­ba­tim type­set­ting, etc.
Guest Book Sitemap Contact