Re: Head of chapters (problem solved, two solutions)
Le dimanche 29 novembre 2009 à 15:07, J.Pietschmann a écrit: Anyway, why don't you use a separate page sequence for every chapter? I'm a newbie, and I didn't even know it was possible to call a fo:page-sequence from deeper in the xsl:template hierarchy than on the first level of fo:root. After your answer, I've found an example from Jordan Naftolin on the web, and, with a few adaptations, it works. So the problem is solved for me. Le dimanche 29 novembre 2009 à 22:18, J.Pietschmann a écrit: No, I meant using markers. There are several ways to get what you probably want. The following might work (beware, untested!): fo:static-content ... fo:retrieve-marker retrieve-class-name=chapter-title retrieve-position=first-starting-within-page retrieve-boundary=document/ ... fo:block !-- first an empty marker -- fo:marker marker-class-name=chapter-title/ !-- now with the title text for subsequent page headers -- fo:marker marker-class-name=chapter-titleThe Chapter Title/fo:marker !-- now the title text for the flow -- The Chapter Title /fo:block I've tried this too. It works, with a few adaptations: - I doesn't to work (by me) with an empty element: fo:marker marker-class-name=chapter-title/, but it works with an empty content: fo:marker marker-class-name=chapitre xsl:text /xsl:text /fo:marker - I had to put the fo:marker's on a lower level than 'chapter'. The first paragraph gives an marker with an empty content, all others the marker I want on the top of the page: xsl:template match=para fo:block xsl:if test=count(preceding-sibling::para) = 0 fo:marker marker-class-name=chapitre xsl:text /xsl:text /fo:marker /xsl:if xsl:if test=count(preceding-sibling::para) 0 fo:marker marker-class-name=chapitre xsl:textChapitre /xsl:text xsl:number select=.. format=1/ /fo:marker /xsl:if xsl:apply-templates/ /fo:block /xsl:template In the fo:page-sequence, the page head is so defined: fo:static-content flow-name=titre_courant fo:block/ fo:block text-align=center space-before=1.5cm fo:retrieve-marker retrieve-class-name=chapitre retrieve-position=first-starting-within-page retrieve-boundary=page/ /fo:block /fo:static-content There are perhaps some other ways to obtain the same result. Anyway, very gratefully thanks. I've learned a lot yesterday and this morning. Philippe - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Head of chapters
Hello, In a book, I wish to have the title of the current chapter printed on the top of each page. But I don't want it on the first page of each chapter. I can't find the condition with which I could do this in a fo:repeatable-page-master-alternatives. «page-position=first» works only for the very first page of the book, i. e. the title page. There is for sure something I don't really understand. Could someone give me a little help? Thanks in advance, Philippe - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Head of chapters
On 29.11.2009 12:46, Faehndrich Philippe wrote: In a book, I wish to have the title of the current chapter printed on the top of each page. But I don't want it on the first page of each chapter. I can't find the condition with which I could do this in a fo:repeatable-page-master-alternatives. «page-position=first» works only for the very first page of the book, i. e. the title page. A neat trick is to print the chapter title on every page, and print something on top of it in order to obscure it on the first page of the chapter, usually a white SVG graphic in a block-container. Anyway, why don't you use a separate page sequence for every chapter? J.Pietschmann - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Head of chapters
Le dimanche 29 novembre 2009 à 15:07, J.Pietschmann a écrit: A neat trick is to print the chapter title on every page, and print something on top of it in order to obscure it on the first page of the chapter, usually a white SVG graphic in a block-container. Isn't it, the opposite way, the same problem? Don't I must call a different page-master for the first page of each chapter? Anyway, why don't you use a separate page sequence for every chapter? I must then find a solution for page numbering... Thanks anyway. Philippe - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org
Re: Head of chapters
On 29.11.2009 15:32, Faehndrich Philippe wrote: Isn't it, the opposite way, the same problem? Don't I must call a different page-master for the first page of each chapter? No, I meant using markers. There are several ways to get what you probably want. The following might work (beware, untested!): fo:static-content ... fo:retrieve-marker retrieve-class-name=chapter-title retrieve-position=first-starting-within-page retrieve-boundary=document/ ... fo:block !-- first an empty marker -- fo:marker marker-class-name=chapter-title/ !-- now with the title text for subsequent page headers -- fo:marker marker-class-name=chapter-titleThe Chapter Title/fo:marker !-- now the title text for the flow -- The Chapter Title /fo:block Anyway, why don't you use a separate page sequence for every chapter? I must then find a solution for page numbering... I don't understand why this poses a problem. Did you try initial-page-number=auto? J.Pietschmann - To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org