bug-texinfo
[Top][All Lists]
Advanced

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

Re: texi2html output validity


From: Ivan Shmakov
Subject: Re: texi2html output validity
Date: Tue, 23 Dec 2014 17:21:01 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

>>>>> Patrice Dumas <address@hidden> writes:
>>>>> On Tue, Dec 23, 2014 at 09:29:07PM +0700, Yuri Khan wrote:

 >>> • the <code /> element is /always/ used instead of <tt />;

 >> Cursory reading of HTML.pm seems to indicate that <tt> is
 >> currently*** used for @key, @t, @verb, and some kinds of tables
 >> possibly related to @example, @smallexample, @lisp and @smalllisp.

 > Use of <tt> in @example, @smallexample, @lisp and @smalllisp is for
 > very special case, something like a @table nested in those formats.

        Could you please clarify this one?  Aren’t @example,
        etc. supposed to be used to format code examples?  If so, –
        the proper HTML element for their contents /is/ <code />.

[…]

 >> @key should be rendered as <kbd>, possibly with an additional class.
 >> Yes, even when inside @kbd — HTML allows and encourages nesting
 >> <kbd>.

 > I am not convinced.  @key is semantically very diferent from @kbd
 > which is the same as <kbd>.  Indeed <kbd> is not for a keyboard key
 > in HTML, but for typed keyboard input.

        The <kbd /> element is for both [1]:

    When the kbd element is nested inside another kbd element, it
    represents an actual key or other single unit of input as
    appropriate for the input mechanism.

    Here the kbd element is used to indicate keys to press:

<p>To make George eat an apple, press 
<kbd><kbd>Shift</kbd>+<kbd>F3</kbd></kbd></p>

[1] http://www.w3.org/TR/html5/text-level-semantics.html#the-kbd-element

[…]

 >> @verb is syntax sugar for escaping characters which have special
 >> meaning in Texinfo, and has a non-semantic side effect of
 >> fixed-width rendering.  It probably should become a
 >> <span class="verb">.

 > Once again this will only work if there is CSS support.  <tt> should
 > always work.  That being said, the best could be <tt class="verb">.

        I have no data on the actual usage of the @verb command, but if
        it’s used primarily for code fragments, <code class="verb" />
        would still be a better choice.

        Please note that in HTML, a “code fragment” is given a very
        broad definition [2]:

    The code element represents a fragment of computer code.  This could
    be an XML element name, a file name, a computer program, or any
    other string that a computer would recognize.

[2] http://www.w3.org/TR/html5/text-level-semantics.html#the-code-element

[…]

 > I may have missed something, but in the specification of 4.01
 > Transitional all the element you describe as needing to be dropped
 > are accepted?  I see them all in
 > http://www.w3.org/TR/html401/sgml/loosedtd.html

        The problem is that for a couple of months now, the most recent
        HTML version is HTML5, and it does /not/ specify these elements.

        Granted, there’re browsers which still support these, but I
        could easily imagine a new browser project being started that
        would just ignore all the cruft that was already scheduled to be
        removed back in the 20th century.

 > Also, I think that, at least in the past, I checked the validity of
 > texi2html/makinfo output with some program and the HTML was valid.

 > We in fact choose that DTD in order to have a good rendering both in
 > old and new browser,

        Is there a list of “old” browsers that Texinfo is bound to
        support and /why/?  Is it, say, still deemed worthwhile to
        support Arena and Mosaic?

 > with or without CSS.

        The nice thing about the (current) browsers with limited or no
        support for CSS is that they tend to lack support for fonts, and
        sometimes even for alignment, image borders (or images
        altogether), and such.  So, I expect there to be no actual loss
        in presentation after moving the formatting from HTML to CSS.

        Feel free to suggest counter-examples, though, – I by no means
        am a Web browser expert.

[…]

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A



reply via email to

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