Two ePub issues
Are you missing a feature? Request its implementation here.
-
- Posts: 34
- Joined: Fri Dec 02, 2016 9:55 pm
Two ePub issues
Post by IsleofGough »
I have a document in docbook XML format. When I make an ePub target, there is no option for a cover page, so I need to add it in Sigil or some other program. Is there a way of specifying this in Oxygen directly?
When I add an inline image with code like:
<para><inlinemediaobject>
<imageobject>
<imagedata fileref="figures/TestImage.jpg" width="50%"/>
</imageobject>
</inlinemediaobject></para>
It creates a good looking ePub but generates errors in epubchecker due to the width designation. Is there another way of specifying a percentage width for ePubs? For what it is worth, the ePub, despite having errors, works well in Apple Books, Kindle, etc.
When I add an inline image with code like:
<para><inlinemediaobject>
<imageobject>
<imagedata fileref="figures/TestImage.jpg" width="50%"/>
</imageobject>
</inlinemediaobject></para>
It creates a good looking ePub but generates errors in epubchecker due to the width designation. Is there another way of specifying a percentage width for ePubs? For what it is worth, the ePub, despite having errors, works well in Apple Books, Kindle, etc.
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Two ePub issues
Hi,
So you are using DocBook with Oxygen and producing EPUB, we have two predefined transformation scenarios for this, one named "DocBook EPUB" and one "DocBook EPUB3". Which one are you using? I could try to look more into this to see if I can find a configuration parameter for the cover page.
About the validation complaints caused by HTML content like this:
We use the DocBook stylesheets we use and which come from the DocBook project:
https://cdn.docbook.org/
The stylesheets produce an HTML output which from what I remember adheres to the XHTML transitional specification which predates the HTML5 specification.
In HTML5 attributes like "width" were replaced by specifying the @style attribute on the element with equivalent CSS properties like:
so there are a couple of variations between the older HTML version that DocBook uses for publishing and the HTML5 specification which is used by the EPUB checker to check the EPub HTML. As most EPUB readers are based on web browser engines they probably consume the HTMLs without any problem.
Regards,
Radu
So you are using DocBook with Oxygen and producing EPUB, we have two predefined transformation scenarios for this, one named "DocBook EPUB" and one "DocBook EPUB3". Which one are you using? I could try to look more into this to see if I can find a configuration parameter for the cover page.
About the validation complaints caused by HTML content like this:
Code: Select all
<table width="490" frame="border" rules="all"><col width="80%"/>
https://cdn.docbook.org/
The stylesheets produce an HTML output which from what I remember adheres to the XHTML transitional specification which predates the HTML5 specification.
In HTML5 attributes like "width" were replaced by specifying the @style attribute on the element with equivalent CSS properties like:
Code: Select all
<col style="width:80%"/>
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 34
- Joined: Fri Dec 02, 2016 9:55 pm
Re: Two ePub issues
Post by IsleofGough »
Thank you for the reply. I am using the doc book to ePub3 converter. Should I try changing the width parameter to match the older html designation?
-
- Posts: 9434
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Two ePub issues
Hi,
About the cover image, from what I looked in the conversion stylesheets it seems that if you add an image reference inside a mediaobject with a certain @role attribute it should be taken into account by the publishing system, similar to this older discussion thread:
https://lists.oasis-open.org/archives/d ... 00091.html
About your remark:
There is a DocBook Apps users list on which maybe you can try to ask questions about this:
https://docbook.org/help
as there is a larger community and they might know things that I do not.
Also as another possible approach to conveting DocBook to EPUB, there is a free tool named Pandoc which can generate lots of possible outputs from lots of possible formats, among which DocBook. So maybe you can explore Pandoc as well:
https://pandoc.org/
Regards,
Radu
About the cover image, from what I looked in the conversion stylesheets it seems that if you add an image reference inside a mediaobject with a certain @role attribute it should be taken into account by the publishing system, similar to this older discussion thread:
https://lists.oasis-open.org/archives/d ... 00091.html
About your remark:
I'm not sure what you mean, in the DocBook standard it's clear how the widths are specified on the table element. These DocBook table elements are converted to HTML tables and the conversion process, based on XSLT stylesheets is the one which would need to be probably modified to produce 100% valid HTML5 content.Should I try changing the width parameter to match the older html designation?
There is a DocBook Apps users list on which maybe you can try to ask questions about this:
https://docbook.org/help
as there is a larger community and they might know things that I do not.
Also as another possible approach to conveting DocBook to EPUB, there is a free tool named Pandoc which can generate lots of possible outputs from lots of possible formats, among which DocBook. So maybe you can explore Pandoc as well:
https://pandoc.org/
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 34
- Joined: Fri Dec 02, 2016 9:55 pm
Re: Two ePub issues
Post by IsleofGough »
The solution to add this within the info tag worked great:
<cover>
<mediaobject role="cover">
<imageobject>
<imagedata fileref="../pathtocovers/epub_cover.jpg" contentdepth="700" contentwidth="500" />
</imageobject>
</mediaobject>
</cover>
Problem solved. Thank you so much!!
<cover>
<mediaobject role="cover">
<imageobject>
<imagedata fileref="../pathtocovers/epub_cover.jpg" contentdepth="700" contentwidth="500" />
</imageobject>
</mediaobject>
</cover>
Problem solved. Thank you so much!!
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service