Hi all, I have a latex document which I need to publish as both pdf and html. I'm using pdflatex to generate the pdf and latex2html to generate the html.
In the pdf version, I'd really like to use the listings package to make
my blocks of code look less butt ugly. In the html version, they need to
fall back to being rendered inside <pre> sections (the default behaviour
for verbatim sections in latex2html).
I thought that doing something like this:
\ifx\pdfoutput\undefined
\newenvironment{code}{\begin{verbatim}}{\end{verbatim}}
\else
\newenvironment{code}{\begin{lstlisting}}{\end{lstlisting}}
\fi
and using \begin{code} and \end{code} would solve my problem, but it
doesn't seem to. For now I'm just trying to get the pdf version working
and I'm getting really unhelpful errors like this:
Overfull \vbox (15.96884pt too high) has occurred while \output is active
[88])
Runaway argument?
^^MErrorDocument 404 http://www.yourdomain.com.au/notfound.html^^M\en\ETC.
! File ended while scanning use of [EMAIL PROTECTED]
<inserted text>
\par
<*> client-support.tex
?
If I redefine code -> verbatim, and errors like this:
Overfull \hbox (21.93794pt too wide) in paragraph at lines 2469--2470
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]
<use anchor_logo.pdf>
Overfull \vbox (15.96884pt too high) detected at line 2470
[94])
*
If I redefine code -> lstlisting.
Is there a way to do what I want to do? I'd even settle for an
explanation of where that error is coming from.
If I replace \begin{code} and \end{code} with \begin{verbatim} and \end
{verbatim}, everything works (but I'm left with the ugly problem).
Thanks all,
James.
--
James Gregory <[EMAIL PROTECTED]>
signature.asc
Description: This is a digitally signed message part
-- SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/ Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
