home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / useful / dist / text / tex / pastex / macros / latex / verbatim / verbatim.doc < prev    next >
Text File  |  1992-01-20  |  58KB  |  1,493 lines

  1. \def\fileversion{v1.4i}
  2. \def\filedate{92/01/20}
  3. \def\docdate{91/12/18}
  4.  
  5. %% \CheckSum{446}
  6. %% \CharacterTable
  7. %%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
  8. %%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
  9. %%   Digits        \0\1\2\3\4\5\6\7\8\9
  10. %%   Exclamation   \!     Double quote  \"     Hash (number) \#
  11. %%   Dollar        \$     Percent       \%     Ampersand     \&
  12. %%   Acute accent  \'     Left paren    \(     Right paren   \)
  13. %%   Asterisk      \*     Plus          \+     Comma         \,
  14. %%   Minus         \-     Point         \.     Solidus       \/
  15. %%   Colon         \:     Semicolon     \;     Less than     \<
  16. %%   Equals        \=     Greater than  \>     Question mark \?
  17. %%   Commercial at \@     Left bracket  \[     Backslash     \\
  18. %%   Right bracket \]     Circumflex    \^     Underscore    \_
  19. %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
  20. %%   Right brace   \}     Tilde         \~}
  21. %%
  22. %
  23. %\iffalse   % this is a METACOMMENT !
  24. %
  25. %
  26. %% Style-option `verbatim' to use with LaTeX v2.09
  27. %% Copyright (C) 1989, 1990, 1991 by Rainer Sch\"opf, all rights reserved.
  28. %
  29. % Copying of this file is authorized only if either
  30. % (1) you make absolutely no changes to your copy, including name, or
  31. % (2) if you do make changes, you name it something other than
  32. %     verbatim.doc.
  33. % This restriction helps ensure that all styles developed here
  34. % remain identical.
  35. %
  36. %
  37. % Error reports please to: R. Sch\"opf
  38. %                          Konrad-Zuse-Zentrum
  39. %                          f\"ur Informationstechnik Berlin
  40. %                          Heilbronner Str.\ 10
  41. %                          D-1000 Berlin 31
  42. %                          Federal Republic of Germany
  43. %                  Email:  <SCHOEPF@SC.ZIB-Berlin.DE>
  44. %
  45. %
  46. %\fi
  47. %
  48. % \changes{v1.4g}{91/11/21}{Several improvements in the documentation.}
  49. % \changes{v1.4f}{91/08/05}{Corrected bug in documentation.
  50. %                           Found by Bernd Raichle.}
  51. % \changes{v1.4e}{91/07/24}{Avoid reading this file twice.}
  52. % \changes{v1.4d}{91/04/24}{`penalty`interlinepenalty added to
  53. %                           definition of `par in `@verbatim.
  54. %                           Necessary to avoid page breaks in
  55. %                           the scope of a `samepage declaration.}
  56. % \changes{v1.4c}{90/10/18}{Added `leavevmode to definition of
  57. %       backquote macro.}
  58. % \changes{v1.4b}{90/07/14}{Converted nearly all `verb's to \|...\|.}
  59. % \changes{v1.4a}{90/04/04}{Added a number of percent characters
  60. %       to suppress blank space at the end of some code lines.}
  61. % \changes{v1.4}{90/03/07}{`verb rewritten.}
  62. %
  63. % \changes{v1.3a}{90/02/04}{Removed {\tt verbatimwrite} environment
  64. %       from the code. Now only shown as an example.}
  65. %
  66. % \changes{v1.2g}{90/02/01}{Revised documentation.}
  67. % \changes{v1.2e}{90/01/15}{Added `every@verbatim hook.}
  68. % \changes{v1.2d}{89/11/29}{Use token register `@temptokena instead
  69. %                           of macro `@tempb.}
  70. % \changes{v1.2d}{89/11/29}{Use token register `verbatim@line instead
  71. %                           of macro `@tempd.}
  72. % \changes{v1.2b}{89/10/25}{`verbatimfile renamed to `verbatiminput.
  73. %                           Suggested by Reinhard Wonneberger.}
  74. %
  75. % \changes{v1.1}{89/10/09}{Made the code more modular (as suggested by
  76. %                          Chris Rowley):  introduced
  77. %                          `verbatim@addtoline, etc.  Added
  78. %                          `verbatimwrite environment.}
  79. %
  80. % \changes{v1.0e}{89/07/17}{Fixed bug in `verbatimfile (*-form
  81. %         handling, discovered by Dirk Kreimer).}
  82. % \changes{v1.0d}{89/05/16}{Revised documentation, fixed silly bug
  83. %         in `verbatim@@@.}
  84. % \changes{v1.0c}{89/05/12}{Added redefinition of `@sverb, change
  85. %         in end-of-line handling.}
  86. % \changes{v1.0b}{89/05/09}{Change in `verbatim@rescan.}
  87. % \changes{v1.0a}{89/05/07}{Change in `verbatim@@testend.}
  88. %
  89. %
  90. % \DoNotIndex{\ ,\!,\C,\[,\\,\],\^,\`,\{,\},\~}
  91. % \DoNotIndex{\@M,\@empty,\@flushglue,\@gobble,\@ifstar,\@ifundefined}
  92. % \DoNotIndex{\@namedef,\@spaces,\@tempa,\@tempb,\@tempc,\@tempd}
  93. % \DoNotIndex{\@temptokena,\@totalleftmargin,\@warning,\active}
  94. % \DoNotIndex{\aftergroup,\begingroup,\catcode,\char,\csname,\def,\do}
  95. % \DoNotIndex{\docdate,\dospecials,\edef,\else,\endcsname,\endgroup}
  96. % \DoNotIndex{\endtrivlist,\expandafter,\fi,\filedate,\fileversion}
  97. % \DoNotIndex{\frenchspacing,\futurelet,\gdef,\if,\ifcat}
  98. % \DoNotIndex{\ifx,\immediate,\item,\kern,\lccode,\leftskip,\let}
  99. % \DoNotIndex{\lowercase,\next,\noexpand,\parfillskip,\parindent}
  100. % \DoNotIndex{\parskip,\penalty,\relax,\rightskip,\space,\string,\the}
  101. % \DoNotIndex{\toks@,\trivlist,\tt,\typeout,\vskip,\write,\z@}
  102. %
  103. %
  104. % \title{A New Implementation of \LaTeX{}'s \\ {\tt verbatim}
  105. %        and {\tt verbatim*} Environments\thanks{%
  106. %        This file has version number \fileversion{} dated \filedate.
  107. %        The documentation was last revised on \docdate.
  108. %       }}
  109. %
  110. % \author{Rainer Sch\"opf$\,$\thanks{ Many thanks to Chris Rowley
  111. %           from The Open University, UK, for looking this over,
  112. %           making a lot of useful suggestions, and discovering bugs.
  113. %           And many thanks to all the beta testers who tried this
  114. %           style file out.}\\
  115. %         Konrad-Zuse-Zentrum\\
  116. %         f\"ur Informationstechnik Berlin\\
  117. %         Heilbronner Str.\ 10\\
  118. %         W-1000 Berlin 31\\
  119. %         Federal Republic of Germany\\
  120. %         Internet: {\tt SCHOEPF@SC.ZIB-Berlin.DE}}
  121. %
  122. %
  123. % \date{August 5, 1991}
  124. %
  125. % \markboth{Verbatim style option, version \fileversion, as of \filedate}
  126. %          {Verbatim style option, version \fileversion, as of \filedate}
  127. %
  128. % \maketitle
  129. %
  130. % \begin{abstract}
  131. %   This style option reimplements the \LaTeX{} {\tt verbatim} and
  132. %   {\tt verbatim*} environments.
  133. %   In addition it provides a {\tt comment} environment
  134. %   that skips any commands or text between
  135. %   |\begin{comment}|
  136. %   and the next |\end{comment}|.
  137. %   It also contains a redefinition of \LaTeX's |\verb| command
  138. %   to better detect the omission of the closing delimiter.
  139. % \end{abstract}
  140. %
  141. % \section{Usage notes}
  142. %
  143. % \let\docDescribeMacro\DescribeMacro
  144. % \let\docDescribeEnv\DescribeEnv
  145. % \def\DescribeMacro#1{}
  146. % \def\DescribeEnv#1{}
  147. % \LaTeX's {\tt verbatim} and {\tt verbatim*} environments
  148. % have a few features that may give rise to problems. These are:
  149. % \begin{itemize}
  150. %   \item
  151. %     Since \TeX{} has to read all the text between the
  152. %     |\begin{verbatim}| and the |\end{verbatim}| before it can output
  153. %     anything, long verbatim listings may overflow \TeX's memory.
  154. %   \item
  155. %     Due to the method used to detect the closing |\end{verbatim}|
  156. %     (i.e.\ macro parameter delimiting) you cannot leave spaces
  157. %     between the |\end| token and |{verbatim}|.
  158. % \end{itemize}
  159. % Whereas the last of these points can be considered
  160. % only a minor nuisance the other one is a real limitation.
  161. %
  162. %
  163. % \DescribeEnv{verbatim}
  164. % \DescribeEnv{verbatim*}
  165. % This style file contains a reimplementation of the {\tt verbatim}
  166. % and {\tt verbatim*} environments which overcomes these restrictions.
  167. % There is, however, one incompatibility between the old and the
  168. % new implementations of these environments: the old version
  169. % would treat text on the same line as the |\end{verbatim}|
  170. % command as if it were on a line by itself.
  171. % {\bf This new version will simply ignore it.}\footnote{This is
  172. %   the price one has to pay for the removal of the old
  173. %   {\tt verbatim} environment's size limitations.}
  174. % It will, however, issue a warning message of the form
  175. % \begin{verbatim}
  176. %LaTeX warning: Characters dropped
  177. %               after \end{verbatim*}!
  178. %\end{verbatim}
  179. % This is not a real problem since this text can easily be put
  180. % on the next line without affecting the output.
  181. %
  182. % This new implementation also solves the second problem mentioned
  183. % above: it is possible to leave spaces (but {\em not\/} end of line)
  184. % between the |\end| and the |{verbatim}| or |{verbatim*}|:
  185. % \begin{verbatim}
  186. %\begin {verbatim*}
  187. %   test
  188. %   test
  189. %\end {verbatim*}
  190. %\end{verbatim}
  191. %
  192. % \DescribeEnv{comment}
  193. % Additionally we introduce a {\tt comment} environment, with the
  194. % effect that the text between