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: how to add a style attribute inside a P element? (Kindle insanity!)

I'm outputting a lot of epub and frequently I need to massage the
output so that the epub can be converted into the Kindle format.

One inherent problem with kindlegen is that it strips out most CSS
code and instead adds some formatting attributes inside individual

One example. You cannot turn off indenting in Kindle unless you
hardcode something like <p style="text-indent:0">

So I do post-processing, I would have to do a global search and replace:

    Change <p class="no-indent"> to <p style="text-indent:0"> in all instances.
    Change <div class="caption"><p> to <div.caption><p
style="text-indent:0"> in all instances.
    Change <p class="pullquote"> to <p style="text-indent:0"> in all instances.

I wouldn't even know how to get started to do this in customization layer.

I've seen this discussion
where css.decoration is mentioned as well as custom class values

I think the section on "custom class values" seems relevant, but I
can't follow the example.

YOu would need to add a custom attribute to these elements (style) as
well as values (text-indent:0).

Do you have an idea about how to attack this problem? Thanks.

Robert Nagle
6121 Winsome Ln #56C, Houston TX 77057-5581
(H) 713 893 3424/ (W) 832-251-7522 Carbon Neutral Since Jan 2010

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