bug-texinfo
[Top][All Lists]
Advanced

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

Re: @image inside @example works with --docbook but not --html


From: Per Bothner
Subject: Re: @image inside @example works with --docbook but not --html
Date: Sun, 27 Nov 2016 10:04:59 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0



On 11/27/2016 09:25 AM, Patrice Dumas wrote:
On Sun, Nov 27, 2016 at 09:41:22AM +0000, Gavin Smith wrote:

This looks like it would be easy to change. The code is in
_convert_image_command in tp/Texinfo/Convert/HTML.pm. It looks like
the current behaviour was deliberate, but I don't know why it was done
the way it was.

I do not remember either.  One possibility could be that the resulting
HTML is not valid, like no <img> in <pre>, but I do not have checked if
it is so.

<img> is valid in <pre> in HTML5, by my reading:

https://www.w3.org/TR/html5/grouping-content.html#the-pre-element
https://www.w3.org/TR/html5/dom.html#phrasing-content-1

It is not valid in HTML4.

https://www.w3.org/TR/html4/struct/text.html#edef-PRE

The fix: makeinfo should stop emitting:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>

Instead we should follow the HTML5 recommendation and emit:
<!DOCTYPE html>

This only effects validation, I believe.
Older browser should have no problems, except the shortened DOCTYPE
should be present to disable quirks mode.
--
        --Per Bothner
address@hidden   http://per.bothner.com/



reply via email to

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