You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Maria2009 <ma...@shinoto.de> on 2009/03/15 08:36:46 UTC

Numbering according to attribute

Hello, 

in my texts, footnotes are identified by an attribute value 'flow="fn"', so
I can integrate several element names if needed. The counting works
basically fine with this template: 

**********

    <xsl:template match="m/itm[@flow='fn'] | note/itm[@flow='fn']">
        <fo:footnote><fo:inline xsl:use-attribute-sets="font.superscript">
            <xsl:text>&#x202F;</xsl:text>
            <xsl:number level="any" count="itm[@flow='fn']"
format="1"></xsl:number>
        </fo:inline>
            <fo:footnote-body>
                <fo:list-block>
                    <fo:list-item>
                        <fo:list-item-label text-indent="0pt"
end-indent="label-end()" font-size="7pt" font-style="normal">
                            <fo:block><xsl:number level="any"
count="itm[@flow='fn']" format="1"></xsl:number>
                            </fo:block>
                        </fo:list-item-label>
                        
                        <fo:list-item-body font-size="9pt"
text-align="justify"
                            start-indent="body-start()" line-height="13pt"
font-family="ipamp">
                            <fo:block>
                                <xsl:apply-templates/>
                            </fo:block>
                        </fo:list-item-body>
                    </fo:list-item>
                </fo:list-block>
            </fo:footnote-body>
        </fo:footnote>
    </xsl:template>

************

All footnotes are counted 1, 2, 3... parallel in text and footnotes,
regardless the element name; that is what I expect. 

BUT: In the text I get different design of the footnote numbers: 

- Those from the m-elements are numbered "#n" without the nonbreaking space
(Achtelgeviert).
- Those from the note-elements are numbered "n" with the nonbreaking space
(Achtelgeviert) included as I expected. 

What is going wrong? 

****Addendum: Before, I had the m-elements counted separately a, b, c ...,
basically with the same template as the one above, and this worked as
expected as well, no # and all small nonbreaking spaces included. 

Thanks for any hint!

Maria 
-- 
View this message in context: http://www.nabble.com/Numbering-according-to-attribute-tp22520689p22520689.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Numbering according to attribute

Posted by Andreas Delmelle <an...@telenet.be>.
On 15 Mar 2009, at 10:49, Maria2009 wrote:

Hi Maria

> Thanks, for the quick and helpful response. That was the case -- the  
> two
> elements hold text in different scripts, and the small space  
> obviously does
> not exist the Japanese font.

OK. If I remember correctly, for other types of spaces, we normally  
generate generic <space> elements in the area tree, precisely to avoid  
this kind of weirdness. Some fonts have 'glyphs' corresponding to all  
varieties of Unicode spaces, while others do not.
I'm going to check if I can find it in the code, and maybe add U+202F  
to the list.

For now, the workaround would obviously be to specify a different font- 
family (only on the fo:inline should suffice).


Regards

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Numbering according to attribute

Posted by Maria2009 <ma...@shinoto.de>.
Andreas, 

Thanks, for the quick and helpful response. That was the case -- the two
elements hold text in different scripts, and the small space obviously does
not exist the Japanese font. 

Best, 
Maria




Andreas Delmelle-2 wrote:
> 
> On 15 Mar 2009, at 08:36, Maria2009 wrote:
> 
> Hi
> 
>> <snip />
>> BUT: In the text I get different design of the footnote numbers:
>>
>> - Those from the m-elements are numbered "#n" without the  
>> nonbreaking space
>> (Achtelgeviert).
>> - Those from the note-elements are numbered "n" with the nonbreaking  
>> space
>> (Achtelgeviert) included as I expected.
>>
>> What is going wrong?
> 
> It's difficult to tell without seeing the FO result, but I'm wondering  
> whether it may not be a case of a different font-family being used in  
> both cases. If you end up with a literal '#', this points to a glyph  
> not being found in the font. Can you check if both are rendered with a  
> different font-family? The footnote's font-family is inherited from  
> the block the citation appears in. Unless it is also overridden in the  
> attribute set 'font.superscript', it could mean that those citations  
> appearing in the 'm' nodes will get a different font than the ones  
> appearing in the 'itm' nodes.
> 
> 
> HTH!
> 
> Andreas
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Numbering-according-to-attribute-tp22520689p22521424.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Numbering according to attribute

Posted by Andreas Delmelle <an...@telenet.be>.
On 15 Mar 2009, at 10:34, Andreas Delmelle wrote:

> ..., it could mean that those citations appearing in the 'm' nodes  
> will get a different font than the ones appearing in the 'itm' nodes.

Of course, I mean the 'note' nodes here.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Numbering according to attribute

Posted by Andreas Delmelle <an...@telenet.be>.
On 15 Mar 2009, at 08:36, Maria2009 wrote:

Hi

> <snip />
> BUT: In the text I get different design of the footnote numbers:
>
> - Those from the m-elements are numbered "#n" without the  
> nonbreaking space
> (Achtelgeviert).
> - Those from the note-elements are numbered "n" with the nonbreaking  
> space
> (Achtelgeviert) included as I expected.
>
> What is going wrong?

It's difficult to tell without seeing the FO result, but I'm wondering  
whether it may not be a case of a different font-family being used in  
both cases. If you end up with a literal '#', this points to a glyph  
not being found in the font. Can you check if both are rendered with a  
different font-family? The footnote's font-family is inherited from  
the block the citation appears in. Unless it is also overridden in the  
attribute set 'font.superscript', it could mean that those citations  
appearing in the 'm' nodes will get a different font than the ones  
appearing in the 'itm' nodes.


HTH!

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org