OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: re: Subject: epub files fail to generate for some components


When I added an index and a glossary to my test epub project,
everything renders into a valid epub file  with db2epub.py.

I did not add or change anything to my XSL customization layer to make
them work. All I did was add an <index/> statement in the xml and
indexterms to the main content.

I don't know what you're doing, but  it's usually possible (though
sometimes not easy) to use css alone to handle the table and image
styling.

You can create custom html classes for various elements. For images, I
make an XSL statement to use a custom HTML  class for the  mediaobject
DIV.

DOCBOOK-XSL PLAIN
 <xsl:template match="mediaobject[@role = 'tall-figure']" mode="class.value">
        <xsl:value-of select="'tall-figure'"/>
    </xsl:template>

DOCBOOK-XSL NS
<xsl:template match="d:mediaobject[@role = 'tall-figure']" mode="class.value">
        <xsl:value-of select="'tall-figure'"/>
    </xsl:template>

Then this CSS usually handles it: (I get this from Liz Castro's book
on creating epubs).


div.wide-figure{
width: 80% !important;
 padding: 0em;
 margin: 0 0 0 .5em !important;
 line-height: 2em !important;
}

div.tall-figure{
    float: right;
display: inline-block;
width: 50% !important;
 padding: 0em;
 margin: 0 0 0 .5em !important;
 max-height: 50% !important;
}

img{
max-width: 100%;
max-height: 50%;
vertical-align: text-top;
 margin: 0 0 0 .5em !important;
}








Robert,
Thanks for your ideas, but my issue seems to be a stylesheet problem.
Firstly, I will keep using oXygen to create epub files. As a
potential ebook editor, I need the fine control to edit each HTML file
for style and layout - I have especially found that table columns need
to be resized so the text in each column is separated sufficiently. I
also need to edit image widths in HTML files. Yes, DocBook 5 only
creates the files for an epub and I then need to edit the mimetype
file and zip all files into an epub - but that is exactly the control
I need over the production process.
So, having established that I'll keep using oXygen 12, I have
transformed other individual chapters to epub with no problems - I get
all the files I need in their correct epub folders. I'm checking that
individual chapters transform first, before I use a master file with
includes for all components, etc to transform an entire book. These
XML files that have worked so far have been "chapter", "preface" and
"bibliography" components.
But when I follow the exact same process to create epub from
"glossary" and "index" components, I get a messy (incorrect content)
HTML file that is not copied into the OEBPS folder as it should.

This suggests something in the stylesheets that I need to set or
modify. I'll have a closer look at comparing the code for glossary in
the hope I spot something that needs to be modified, but I'm getting
out of my depth with that sort of debugging. Hoping for a more solid
answer on this.

Thanks,
Dave Gardiner


-- 
Robert Nagle
12777 Ashford Point Dr #1417
Houston, Texas 77082
713 893 3424
http://www.robertnagle.info


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]