[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
HTML bugs revisited
From: |
Werner LEMBERG |
Subject: |
HTML bugs revisited |
Date: |
Mon, 28 Jan 2002 19:57:22 +0100 (CET) |
[This is texinfo 4.0f.]
The following code snippet (from groff.texinfo):
@Defesc {\\n, , i, }
@Defescx {\\n, @lparen{}, id, }
@Defescx {\\n, @lbrack{}, ident, @rbrack}
Interpolate number register with name @var{ident} (one-character
name @var{i}, two-character name @var{id}). This means that the
value of the register is expanded in-place while @code{gtroff} is
parsing the input line. Nested assignments (also called indirect
assignments) are possible.
@endDefesc
with
@macro Defesc{name, delimI, arg, delimII}
@deffn Escape @address@hidden@t{\delimII\}
@esindex \name\
@end macro
@macro Defescx{name, delimI, arg, delimII}
@deffnx Escape @address@hidden@t{\delimII\}
@esindex \name\
@end macro
@macro endDefesc
@end deffn
@end macro
and
@ifnottex
@macro lparen
(
@end macro
@macro rparen
)
@end macro
@macro lbrack
[
@end macro
@macro rbrack
]
@end macro
@end ifnottex
produces this in HTML:
\ni Escape
\n(id Escape
\n[ident] Escape
Interpolate number register with name ident (one-character
name_i, two-character name id). This means that the value of
the register is expanded in-place while gtroff is parsing the
input line. Nested assignments (also called indirect
assignments) are possible.
Reason for the incorrect indentation of the second and third line is
apparently this code in defun.c:
/* This is needed because I have to know if the next line is
normal text or another @def..x. If text follows, create a new
table to get the indentation for the following text.
This construction would fail if someone uses:
@deffn
@sp 2
@deffnx
.
@end deffn
But we don't care. */
if (!looking_at ("@def"))
{
add_word ("</table>\n");
add_html_elt ("<table width=\"95%\" align=\"center\">");
add_word ("\n<tr><td>\n");
}
The looking at address@hidden' fails. It seems to me that macros aren't
expanded
before this operation.
Additionally the string `\n[ident]' is represented as
<b><tt>\n[</tt></b><i><var>ident</var><tt>]</tt>
</i>
(embedded in a <td>...</td> construction). This is not correct. It
should rather be
<b><tt>\n[</tt></b><i><var>ident</var><b><tt>]</tt></b>
To use TeX parlance, the category code of the closing bracket in the
@rbrack macro isn't `active', and the HTML parsing routine should take
care of this. I suggest to use some pseudo character codes to
represent `non-active' brackets.
BTW, ordinary `[' and `]' in a @defmac are printed upright in a DVI
file, while they are slanted in the HTML output (which is incorrect).
Werner
- HTML bugs revisited,
Werner LEMBERG <=