Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!sri-spam!mordor!lll-tis!ptsfa!ihnp4!kaiser!tla From: tla@kaiser.UUCP (T Anderson) Newsgroups: comp.text Subject: Re: ewenvironment in LaTeX Message-ID: <633@kaiser.UUCP> Date: Wed, 5-Aug-87 18:01:27 EDT Article-I.D.: kaiser.633 Posted: Wed Aug 5 18:01:27 1987 Date-Received: Sat, 8-Aug-87 06:11:21 EDT References: <311@crin.UUCP> <453@cgcha.UUCP> Distribution: world Organization: AT&T Bell Laboratories, Liberty Corner Lines: 31 A related (but not the same) problem I had with verbatim was to include a file inside a verbatim environment. I wanted to have a file of sample LaTeX code that could be LaTeXed alone correctly and then include that file verbatim as an appendix in another document. Of course, I could have copied the file in with my editor, but I wanted changes in the sample file to be automatically changed in the version in the appendix. The problem of course is that \begin{verbatim} \input examplefile \end{verbatim} only prints `\input examplefile'. One can place the verbatim commands in the examplefile, but then one can not use the example file directly to generate the example. A solution: \def\bv{\begin{verbatim}}% necessary to use expandafter \def\infil{\input examplefile} \expandafter\bv\infil \end{verbatim} There may be a similar solution with more expandafters that avoids the def's but at least this worked. -- Terry L Anderson AT&T Bell Laboratories -- Liberty Corners UUCP: ...!ihnp4!kaiser!tla TeleMail: Terry.Anderson (201) 580-4428