| 1 |
\IfFileExists{enverb.sty}{\RequirePackage{enverb}}{} |
| 2 |
|
| 3 |
\PassOptionsToPackage{full}{textcomp} |
| 4 |
\documentclass{l3doc} |
| 5 |
|
| 6 |
\usepackage[oldstylenums,nott]{kpfonts} |
| 7 |
\usepackage{randtext,xcolor,array} |
| 8 |
\usepackage{xistercian} |
| 9 |
\usepackage{accsupp} |
| 10 |
\usepackage{csquotes} |
| 11 |
\usepackage{multicol} |
| 12 |
%\usepackage{microtype} |
| 13 |
|
| 14 |
\input{preamble-logo} |
| 15 |
\input{preamble-examples} |
| 16 |
|
| 17 |
\newcommand\keydefault[1]{\hfill\textcolor{enverbgrey}{default: #1}} |
| 18 |
|
| 19 |
\let\metaORIG\meta |
| 20 |
\protected\def\meta #1{\texttt{\metaORIG{#1}}} |
| 21 |
\renewcommand*\thefootnote{\cistercian{footnote}} |
| 22 |
\hypersetup{linkcolor=red!80!black,urlcolor=purple!80!black} |
| 23 |
\makeatletter |
| 24 |
\@ifdefinable\gobbledocstriptag{\def\gobbledocstriptag#1>{}} |
| 25 |
\protected\def\savefootnotestuff |
| 26 |
{% |
| 27 |
\let\mysavethefootnote\thefootnote |
| 28 |
\let\mysave@makefnmark\@makefnmark |
| 29 |
\let\mysave@makefntext\@makefntext |
| 30 |
} |
| 31 |
\def\restorefootnotestuff{\texorpdfstring\restorefootnotestuff@{}} |
| 32 |
\def\restorefootnotestuff@ |
| 33 |
{% |
| 34 |
\global\let\thefootnote\mysavethefootnote |
| 35 |
\global\let\@makefnmark\mysave@makefnmark |
| 36 |
\global\let\@makefntext\mysave@makefntext |
| 37 |
} |
| 38 |
\makeatother |
| 39 |
|
| 40 |
\begin{document} |
| 41 |
\savefootnotestuff |
| 42 |
\title |
| 43 |
{% |
| 44 |
\restorefootnotestuff |
| 45 |
The \envlogo\ package\\[\medskipamount] |
| 46 |
\Large read an environment verbatim% |
| 47 |
} |
| 48 |
\GetFileInfo{enverb.sty} |
| 49 |
\date{\filedate\space\fileversion} |
| 50 |
\author{Jonathan P. Spratte\thanks{\protect\randomize{[email protected]}}} |
| 51 |
|
| 52 |
\maketitle |
| 53 |
|
| 54 |
\begin{abstract} |
| 55 |
\noindent\parfillskip=0pt |
| 56 |
The \envlogo\ package provides a simple yet effective way to collect the |
| 57 |
verbatim contents of an environment into a macro, which the user can then pick |
| 58 |
up to implement additional functionality, for instance a simple output routine |
| 59 |
or rescanning the contents into code listings or for typesetting alike. |
| 60 |
Arbitrary contents can be placed on either end of each line allowing flexible |
| 61 |
line-oriented processing. |
| 62 |
\end{abstract} |
| 63 |
|
| 64 |
\tableofcontents |
| 65 |
|
| 66 |
\begin{documentation} |
| 67 |
\section{Documentation} |
| 68 |
Originally I was unsatisfied by the degree of freedom and customisation present |
| 69 |
in the available verbatim-environment providing packages like \pkg{listings}, |
| 70 |
\pkg{minted}, \emph{etc.}, when one wants to document \TeX\ code and show the |
| 71 |
results next to it (or I didn't bother to dig through their manuals). Also I |
| 72 |
didn't like them producing temporary files so long as that's not necessary. As a |
| 73 |
result I implemented what was basically the first version of \envlogo\ for one |
| 74 |
of my other packages. |
| 75 |
|
| 76 |
\input{doc-enverb} |
| 77 |
\input{doc-using-contents} |
| 78 |
\input{doc-keys} |
| 79 |
\input{doc-examples} |
| 80 |
\end{documentation} |
| 81 |
|
| 82 |
\clearpage |
| 83 |
\begin{implementation} |
| 84 |
\section{Implementation} |
| 85 |
\DocInput{enverb.dtx} |
| 86 |
\end{implementation} |
| 87 |
\end{document} |