[l2h] alltt bug?

Ross Moore ross at maths.mq.edu.au
Sat Nov 13 06:47:31 CET 2004


Hi Igor,

On 13/11/2004, at 3:58 PM, Igor Pechtchanski wrote:

> Hi,
>
> Using the TeX trick of having a command interpret the next character 
> as an
> argument doesn't work correctly within the alltt environment.  Below is
> the minimal example.  To reproduce, "latex2html bug.tex".  The <pre> 
> tag
> will contain "BR>Hello".  I intentionally didn't give any argument to
> \out, since I wanted to model LaTeX's \@gobblecr.  My system 
> information

This is not a bug in LaTeX2HTML.
You are trying to use non-obvious markup based upon a TeX-ism,
that just happens to work for you within a LaTeX document.

You cannot expect LaTeX2HTML to model LaTeX's internals.
It is not designed that way, and it is not based upon the model 
established
by having TeX as the internal engine.

LaTeX2HTML is designed to give a good, clean translation into HTML of
the words and commonly-used markup structures of what is described in
elementary books on LaTeX, and how to *use* it for making 
well-structured
documents.

If you want to use TeX-trickiness, then it's all bets off!
(Try using TeX4ht  instead, and work out how to configure its output
to give HTML as clean as you'll get with LaTeX2HTML.)


> is in my previous bug report.  Thanks.

Sorry, there'll be no action taken on this.

Either use:

  \out{}
Hello

if you don't want the `H' treated specially, or use

\out{H}ello

if you *do* want something special to be done.
No other markup allows an obvious interpretation
of the intention of this part of your manuscript.


Of course the other approach is to devise the Perl coding
that does what you want, via a subroutine block

    sub  do_env_myspecialenvironment {
     ....
     ....
    }

for processing the content of markup such as

  \begin{myspecialenvironment}
  Hello
  world!

  \end{myspecialenvironment}

or perhaps taking parameters to provide indicators of special
effects that may be desired:

  \begin{myspecialenvironment}[Hello]
  world!

  \end{myspecialenvironment}

or

  \begin{myspecialenvironment}[H]
  Hello
  world!

  \end{myspecialenvironment}

as appropriate.



Hope this helps,

	Ross Moore


> 	Igor
>
> -------------------- BEGIN bug.tex --------------------
> \documentclass{article}
> \usepackage{alltt}
> \newcommand{\out}[1]{}
> \begin{document}
> \begin{alltt}
> {\out
> Hello
> }
> \end{alltt}
> \end{document}
> --------------------- END bug.tex ---------------------
>
> -- 
> 				http://cs.nyu.edu/~pechtcha/
>       |\      _,,,---,,_		pechtcha at cs.nyu.edu
> ZZZzz /,`.-'`'    -.  ;-;;,_		igor at watson.ibm.com
>      |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
>     '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!
>
> "The Sun will pass between the Earth and the Moon tonight for a total
> Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT
>
> _______________________________________________
> latex2html mailing list
> latex2html at tug.org
> http://tug.org/mailman/listinfo/latex2html



More information about the latex2html mailing list