[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 elements. 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 http://markmail.org/search/?q=class.attribute&q=list%3Aorg.oasis-open.lists.docbook-apps#query:class.attribute%20list%3Aorg.oasis-open.lists.docbook-apps%20from%3A%22Bob%20Stayton%22+page:1+mid:7jfjygrqiz5pc7bs+state:results where css.decoration is mentioned as well as custom class values http://www.sagehill.net/docbookxsl/HtmlCustomEx.html#CustomClassValues 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 http://www.robertnagle.info
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]