[l2h] Tabbing and <BR>

fabien fabien at secureops.com
Fri Aug 22 14:22:12 CEST 2003


Thanks for your helpfull response Ross.

It's working, but I need to verify it more closely to understand and verify if there's no bad effects...

In the same time, I saw that the expression \\[Xmm] is not well interpreted into tabbing sections. I will check if I can do something, like add a <BR> this time !!! ;-)

Ex. :
-----
\begin{tabbing}
\hspace{10mm} \= \hspace{35mm} \= \hspace{35mm} \= hspace{35mm} \kill
prompt\\
\\[3mm]
image=/boot/vmlinuz\\
\end{tabbing}

==> HTML output

prompt
[3mm]
image=/boot/vmlinuz



On Fri, 22 Aug 2003 09:29:21 +1000 (EST)
Ross Moore <ross at ics.mq.edu.au> wrote:

> 
> Hello Fabien,
> 
> On Thu, 21 Aug 2003, fabien wrote:
> 
> > Hi everybody...
> >
> > I have a question about the latex2html tabbing processing.
> > Between each line of a tabbing section, a blanked line is inserted in the HTML file - an <BR> tag.
> >
> > Why ??? I don't want a such space text !!!
> 
> Check the subroutine   tabbing_helper .
> 
> e.g. mine is as follows:
> 
> sub tabbing_helper {
>     local($_) = @_;
>     s/\\=\s*//go;  # cannot alter the tab-stops
>     s/\t/ /g;      # convert any tabs to spaces
>     # MRO: replaced $* with /m
>     s/(^|\n)[^\n]*\\kill *\n/\n/gm;
>     s/( )? *\n/$1/gm; # retain at most 1 space for a \n
>     # replace \\ by \n ... , ignoring any trailing space
> #    s/\\\\ */\n/gm;
>     # ...but make sure successive \\ do not generate a <P> tag
> #    s/\n( *)?\n/\n&nbsp;\n/gm;
>     s/\\\&gt;//go;
>     s/(^| *([^\\]))\\[>]/$2\t\t/go;
>     s/([^\\])\\>/$1\t\t/go;
>     s/\n$//; s/^\n//;           # strip off leading/trailing \n
>     local($inside_tabbing) = 1;
>     $_ = &translate_commands(&translate_environments($_));
>     "<PRE><TT>\n$_\n</TT></PRE>";
> }
> 
> 
> Note that 2 reg-exp replacements are commented-out (initial #).
> That may be a mistake, as there seems to be nothing else
> that replaces the \\ at the end of lines, so those will later
> be replaced by <BR> as you observe.
> 
> Try uncommenting the 1st reg-exp, and perhaps both reg-exps.
> This should fix the immediate problem but may introduce new problems.
> 
> Certainly there is some doubt about exactly where those lines should
> be executed within the tabbing-helper subroutine.
> 
> 
> To test changed code, you do *not* need to edit the latex2html
> script itself. Put an exact copy of the subroutine code into
> the  .latex2html-init  file for your job, and make the edits
> there. Since this file is read *after* the main script, the
> changed definition will override the standard one.
> 
> 
> Report what you find please.
> 
> 
> Hope this helps,
> 
> 	Ross Moore
> 
> >


More information about the latex2html mailing list