[l2h] Tabbing and <BR>
Ross Moore
ross at ics.mq.edu.au
Fri Aug 22 10:29:21 CEST 2003
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 \n/gm;
s/\\\>//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