> I have a cshell script that I want to include in a Latex document.
> Because of how the document is created it is most conveninent to
> use the \input command.  The cshell script is first reformatted to
> look like this:
> 
> \begin{verbatim}
> ..contents of script goes here...
> \end{verbatim}
> 
> and is renamed whatever.tex and placed in directory scripts
> 
> The main Latex file thus has \input{scripts/whatever}

Is the scripts/ directory a sub-directory of where the LaTeX
source resides ? If so, it should work, as the  texexpand  script
is supposed to be able to find things there.
I recall that there was a small problem with  texexpand  in the v98.1
version of LaTeX2HTML; it may have affected this.



In any case, a better strategy is to load the verbatim  package:
        \usepackage{verbatim}
and use the \verbatiminput  command.
e.g.
        \verbatiminput{myscript.csh}

The input file should *not* contain any (La)TeX code,
unless that is what you want to show.
Note that this has advantages both conceptually for the structure
of your LaTeX source, and for updating the contents of the csh script.


LaTeX2HTML supports the verbatim package.

 
> With latex2html this fails in that verbatim seems to be ignored
> and it then chokes on $-signs in the script.  latex itself has no problems.
 
LaTeX2HTML processes the source quite differently to LaTeX.
Even in LaTeX there are big problems with verbatim-like environments,
so it is no surprise that in all but the simplest situations
there can be different results.


> If I instead place the script file in the same directory as the main latex
> file and use \input{whatever} it  works fine.
> 
> Have I violated some rule as to where input files can reside?

I don't think so, so I'll check a similar construction using the
latest development version of LaTeX2HTML.


Thanks for the report,

        Ross Moore

Reply via email to