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: [docbook-apps] No indent on the first paragraph of a page


Hi Peter,

I suspect that this is going to be very difficult, if not impossible, because pagination happens in the FO processor, and the stylesheets don’t know where the FO processor will do page breaks. Therefore, the stylesheets can’t identify which paragraphs will appear at the top of a page.

I don’t keep up with the latest in FO processing, so there may be a way that I’m unaware of to code this as an option with one of the commercial processors (XEP or Antenna House), but I doubt there’s a way to do this with FOP.

Also, are you sure you want to do this in this way? The more common variable style that I’ve seen is where you indent the second and subsequent paragraphs in a chapter or after a heading, but you don’t indent the first paragraph. That is much easier to implement, because all the information you need is available to the stylesheets. In fact, a few years ago, Jirka Kosek provided some code to do just that. Here is a link to the mailing list entry about this, but be aware that this is nearly 14 years old, so I wouldn’t just drop it into the current code without doing some testing:-).

https://cygwin.com/ml/docbook-apps/2004-q2/msg00105.html

Best regards,
Dick Hamilton
-------
XML Press
XML for Technical Communicators
http://xmlpress.net
hamilton@xmlpress.net



> On Dec 4, 2017, at 02:44, Peter Fleck <peterfleck@gmail.com> wrote:
> 
> Hi,
> 
> I have the following code that indents the first line of paragraphs:
> 
> <xsl:template match="d:*/d:para[preceding-sibling::d:para]|d:para[contains(@role,'indent')]">
>   <fo:block text-indent="5mm">
>     <xsl:apply-imports/>
>   </fo:block>
> </xsl:template>
> 
> Is there a way to not indent the paragraph if it is the first paragraph of a page?
> 
> Using:
> 
> Apache FOP 2.2
> Docbook 5.1
> Stylesheets 1.79.2
> 
> Thanks,
> 
> Peter



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