## backslashes and latex2html

### backslashes and latex2html

I would like to include in a manual I'm writing a line looking like this

alias myprg 'setenv TMPARG1 \:1 ; setenv TMPARG2 \!:2 ; source myprg'

I am using

\\~~~\unix{alias myprg 'setenv TMPARG1 $\backslash$!:1 ; setenv TMPARG2
$\backslash$!:2 ; source myprg'}

where \unix gives a particular formatting

\newcommand{\unix}[1]{ \textcolor{mycg}{{\tt #1} } }

pdflatex output is OK, but latex2html output is using two big IMAGES

Any easy idea to get also the HTML output looking normal (either than
munging it a posteriori) ?

I suppose one could define a conditional new command which can somehow
output different things in *** and html (at worst an HTML hex encoded
sequence for the backslash) but there should be easier solutions ...

--
----------------------------------------------------------------------
XXXX@XXXXX.COM is a newsreading account used by more persons to
avoid unwanted spam. Any mail returning to this address will be rejected.
Users can disclose their e-mail address in the article if they wish so.

### backslashes and latex2html

Use a verb command, verbatim environment or one of the specialized
packages like listings instead. Then you can get rid of things like
$\backslash$ altogether.

\begin{verbatim}
alias myprg 'setenv TMPARG1 \:1 ; setenv TMPARG2 \!:2 ; source myprg'
\end{verbatim}

--

### backslashes and latex2html

Hmm... I tend to forget about \verbatim because I use *** OR for
latex2html manuals, or for beamer presentations, and \verbatim is
fragile in beamer ...

The main point however is that according to my manual \verb and
\verbatim cannot be used in the argument of another command like

(I replaced the backslash with ???)

where \unix gives a particular colour and font
\newcommand{\unix}[1]{ \textcolor{mycg}{{\tt #1} } }

Also \verbatim gives extra space around my sentence (I wanted it to
start on a new line \\ not on a new paragraph)

--
----------------------------------------------------------------------
XXXX@XXXXX.COM is a newsreading account used by more persons to
avoid unwanted spam. Any mail returning to this address will be rejected.
Users can disclose their e-mail address in the article if they wish so.

### backslashes and latex2html

beamer has an option to allow fragile environments.

That is right, but here it is unnecessary. If you simple want to
overwrite the verbatim font or create a custom verbatim-like
environment, use the verbatim package. For endless syntax coloring
possibilities, use the listings package which lets you customize really
everything.

Im quite sure this is customizable, too.

--

### backslashes and latex2html

Another solution (which I won't prefer and only mention for
completeness's sake) could be provided by the \textbackslash command.

--

### backslashes and latex2html

Well, thanks ... THAT suits perfectly my needs !

I wonder why it is not mentioned in the docs of my SuSE-bundled latex
/usr/share/doc/packages/tetex/doc/latex/latex2e-html

--
----------------------------------------------------------------------
XXXX@XXXXX.COM is a newsreading account used by more persons to
avoid unwanted spam. Any mail returning to this address will be rejected.
Users can disclose their e-mail address in the article if they wish so.