Mercurial > hgbook
diff en/99defs.tex @ 4:33a2e7b9978d
Make it possible to include example input and output from real programs.
Instead of having to cut and paste example text, the task is automated.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Sun, 25 Jun 2006 22:04:50 -0700 |
parents | 906d9021f9e5 |
children | 339e75288632 |
line wrap: on
line diff
--- a/en/99defs.tex Sat Jun 24 17:42:40 2006 -0700 +++ b/en/99defs.tex Sun Jun 25 22:04:50 2006 -0700 @@ -1,10 +1,11 @@ -\newcommand{\tildefile}[1]{\texttt{\~/#1}} +\newcommand{\tildefile}[1]{\texttt{\~{}/#1}} \newcommand{\filename}[1]{\texttt{#1}} \newcommand{\hgext}[1]{\texttt{#1}} \newcommand{\hgcmd}[1]{``\texttt{hg #1}''} \newcommand{\hgcmdargs}[2]{``\texttt{hg #1 #2}''} -\DefineVerbatimEnvironment{codesample}{Verbatim}{frame=single,gobble=2,numbers=left} +\DefineVerbatimEnvironment{codesample4}{Verbatim}{frame=single,gobble=4,numbers=left,commandchars=\\\{\}} +\newcommand{\interaction}[1]{\VerbatimInput[frame=single,numbers=left,commandchars=\\\{\}]{examples/#1.out}} %%% Local Variables: %%% mode: latex