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


To add to my remarks:

one common Kindle formatting example is to output

to <p width=75"> or  <p width=-20">

so it would be nice if we could have a general way to add an attribute
like "width" in some cases.

(I don't know if it would validate as XHTML though).

rj

On Wed, Aug 3, 2011 at 6:36 AM, Robert Nagle <idiotprogrammer@gmail.com> wrote:
> 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
>



-- 
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]