bug-texinfo
[Top][All Lists]
Advanced

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

Re: texi to epub


From: Kurt Hornik
Subject: Re: texi to epub
Date: Mon, 20 Dec 2021 14:38:06 +0100

>>>>> Patrice Dumas writes:

Great, thanks.

I just tried the current development version on my test case
(R-intro.texi in R).  This now gives

$ python3 validator-runner.py R-intro-7.html
error: line 148: there is no attribute "align"
error: line 4363: there is no attribute "compact"
error: line 4891: there is no attribute "width"
error: line 4897: there is no attribute "width"

which are, respectively, from

<h1 class="settitle" align="center">An Introduction to R</h1>

<dl compact="compact">

<thead><tr><th width="25%">Family name</th><th width="55%">Link 
functions</th></tr></thead>

These should/could all be done via style, right?

epubcheck complains about more, but the errors are for

 attribute "compact" not allowed here; expected attribute "class", "dir", "id", 
"lang", "style", "title" or "xml
 attribute "width" not allowed here; expected attribute "abbr", "align", 
"axis", "char", "charoff", "class", "colspan", "dir", "headers", "id", "lang", 
"rowspan", "scope", "style", "title", "valign" or "xml

(hmm, not the align?  strange ...)

Best
-k

> On Wed, Dec 15, 2021 at 07:06:37PM +0100, Kurt Hornik wrote:
>> Friends,
>> 
>> In the discussions in the bug report for R, someone wrote
>> 
>> calibre does not guarantee that an EPUB produced by it is valid. The
>> only guarantee it makes is that if you feed it valid XHTML 1.1 + CSS
>> 2.1 it will output a valid EPUB.
>> 
>> and of course makeinfo gives HTML 4.01 Transitional: I also tried the
>> effect of going through HTML tidy to turn that into XHTML, but that did
>> not make epubcheck happy.
>> 
>> Any ideas/suggestions/... how to best move forward?

> This issue should be solveable now.  With a conversion with something
> like
>  -c DOCTYPE='<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC 
> "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>' 
> -c 'USE_XML_SYNTAX 1' -c 'NO_CUSTOM_HTML_ATTRIBUTE 1' -c 
> 'HTML_ROOT_ELEMENT_ATTRIBUTES xmlns="http://www.w3.org/1999/xhtml";'
> the output is not bad in term of validity.  It is not perfect, but my
> feeling is that it is good enough.

> Now there are all the other files to generate.

> My superficial readings on the web make me think that it is similar with
> chm, and the implementation could be something similar with
> tp/init/chm.pm.

> If there is somewhere some clear explanation of what to generate, and
> maybe even better some examples, I could have a look.

> -- 
> Pat



reply via email to

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