bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: plan and questions for change in attributes for stricter HTML


From: Gavin Smith
Subject: Re: plan and questions for change in attributes for stricter HTML
Date: Mon, 20 Dec 2021 22:06:26 +0000

It would help to know which Texinfo commands were generating the
non-standard HTML, and then it would be easier to understand if it was
really needed.

I haven't done research into any of the output for this mail.

On Mon, Dec 20, 2021 at 8:38 PM Patrice Dumas <pertusus@free.fr> wrote:
>
> Hello,
>
> I think that it would make sense to do stricter HTML4 that is also
> relevant for HTML5, and should also improve validity as XHTML 1.*.
>
> For attributes that are deprecated and were not readded in HTML5, here
> is what I propose.  I know very little about CSS, so do not hesitate to
> criticize.  There are also cases which I don't know how to solve, for
> the more knowledgable in CSS.
>
>
> For div, p and h* there is no align attribute anymore, my plan is to
> replace by CSS, using class names such as center-align, left-align
> and CSS style like:
>  text-align:center;

I doubt there would be much use for align. If this is for @centerchap
it is not worth worrying about and the align attribute can just be
removed.

> I propose to replace <hr size="6"> with <hr style="height: 6px;">.

Or use a class to represent the purpose of the <hr> and give the CSS
elsewhere. Or just do <hr> if that is acceptable.

> I did not find what to do for CSS with <dl compact="compact">, unless
> you have ideas, I would suggest simply dropping compact="compact".

I'm happy with that. We should double check that the output looks good
without it and use CSS if not.

> Another attribute that seems to have disappeared is width for th and td.
> We need this one, to use it in multitable like
>   <tbody><tr><td width="40%">multitable item</td><td width="60%">multitable 
> tab</td></tr>
>
> Does anybody have an idea on what should be the replacement?

The width specifications seem to be the most appropriate for printed
output. Often when specifying a @multitable the user wouldn't care
about the column widths. Maybe the browser can do a good job at the
layout without them. However, it could matter in some cases. I would
say there is no rush to replace this. We should check the effects on
various Texinfo documents before making any change.

If the column width specifications are not optional in the Texinfo
language (I didn't check, but I suspect they aren't), then making them
optional would be a first step. Then we could see how often users
actually wanted to specify the widths.

You'll see in the attached file, which I hand-edited to remove the
width attributes, that the output can look better without them.

8.5.2 Multitable Rows

After the @multitable command defining the column widths (see the previous section), you begin each row in the body of a multitable with @item, and separate the column entries with @tab. Line breaks are not special within the table body, and you may break input lines in your source file as necessary.

You can also use @headitem instead of @item to produce a heading row. The TeX output for such a row is in bold, and the HTML and DocBook output uses the <thead> tag. In Info, the heading row is followed by a separator line made of dashes (‘-’ characters).

The command @headitemfont can be used in templates when the entries in a @headitem row need to be used in a template. It is a synonym for @b, but using @headitemfont avoids any dependency on that particular font style, in case we provide a way to change it in the future.

Here is a complete example of a multi-column table (the text is from The GNU Emacs Manual, see Splitting Windows in The GNU Emacs Manual):

@multitable @columnfractions .15 .45 .4
@headitem Key @tab Command @tab Description
@item C-x 2
@tab @code{split-window-vertically}
@tab Split the selected window into two windows,
with one above the other.
@item C-x 3
@tab @code{split-window-horizontally}
@tab Split the selected window into two windows
positioned side by side.
@item C-Mouse-2
@tab
@tab In the mode line or scroll bar of a window,
split that window.
@end multitable

produces:

KeyCommandDescription
C-x 2split-window-verticallySplit the selected window into two windows, with one above the other.
C-x 3split-window-horizontallySplit the selected window into two windows positioned side by side.
C-Mouse-2In the mode line or scroll bar of a window, split that window.
KeyCommandDescription
C-x 2split-window-verticallySplit the selected window into two windows, with one above the other.
C-x 3split-window-horizontallySplit the selected window into two windows positioned side by side.
C-Mouse-2In the mode line or scroll bar of a window, split that window.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]