Re: [xep-support] <emphasis> in footnote ignored

From: Ron Catterall <ron@catterall.net>
Date: Fri Jan 26 2007 - 19:30:46 PST

Further info:

This is the literallayout Ihave in my customization layer. Could
any of this be causing the problem?

(this might be more at home in the Docbook list)

<!-- adjust font size in a literallayout
usage:
<literallayout size="Less|Small|Smaller">
line 1
a longer line 2
</literallayout>
-->
<xsl:attribute-set name="verbatim.properties">
  <xsl:attribute name="font-size">
    <xsl:choose>
      <xsl:when test="@size = 'Less'">85%</xsl:when>
      <xsl:when test="@size = 'Small'">76%</xsl:when>
      <xsl:when test="@size = 'Smaller'">65%</xsl:when>
      <xsl:otherwise>100%</xsl:otherwise>
    </xsl:choose>
  </xsl:attribute>
</xsl:attribute-set>

<!-- center lines of text in a literallayout
usage:
<literallayout role="Centre">
line 1
a longer line 2
</literallayout>
-->

<xsl:attribute-set name="verbatim.properties">
  <xsl:attribute name="text-align">
    <xsl:choose>
      <xsl:when test="@role = 'Centre'">center</xsl:when>
      <xsl:otherwise>start</xsl:otherwise>
    </xsl:choose>
  </xsl:attribute>
</xsl:attribute-set>

<!--
That should have been sufficient, but it didn't work when I tried it.
Further investigation showed that the template that matches
literallayout adds its own text-align="start" property to the
fo:block, which overrides the attribute-set.
So you have to also customize the template with match="literallayout"
from fo/verbatim.xsl to remove its text-align property so the
attribute-set can work.
Bob Stayton has corrected this and it should be available in the next
release and the modification to the template match="literallayout
should not be needed in future.
  -->
<xsl:template match="literallayout">
   <xsl:param name="suppress-numbers" select="'0'"/>

   <xsl:variable name="id"><xsl:call-template name="object.id"/></xsl:variable>

   <xsl:variable name="content">
     <xsl:choose>
       <xsl:when test="$suppress-numbers = '0'
                       and @linenumbering = 'numbered'
                       and $use.extensions != '0'
                       and $linenumbering.extension != '0'">
         <xsl:call-template name="number.rtf.lines">
           <xsl:with-param name="rtf">
             <xsl:apply-templates/>
           </xsl:with-param>
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
         <xsl:apply-templates/>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:variable>

   <xsl:choose>
     <xsl:when test="@class='monospaced'">
       <xsl:choose>
         <xsl:when test="$shade.verbatim != 0">
           <fo:block id="{$id}"
                     white-space-collapse='false'
                     white-space-treatment='preserve'
                     linefeed-treatment="preserve"
 
xsl:use-attribute-sets="monospace.verbatim.properties
shade.verbatim.style">

             <xsl:copy-of select="$content"/>
           </fo:block>
         </xsl:when>
         <xsl:otherwise>
           <fo:block id="{$id}"
                     white-space-collapse='false'
                     white-space-treatment='preserve'
                     linefeed-treatment="preserve"
                     xsl:use-attribute-sets="monospace.verbatim.properties">
             <xsl:copy-of select="$content"/>
           </fo:block>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:when>
     <xsl:otherwise>
       <xsl:choose>
         <xsl:when test="$shade.verbatim != 0">
           <fo:block id="{$id}"
                     wrap-option='no-wrap'
                     white-space-collapse='false'
                     white-space-treatment='preserve'
                     linefeed-treatment="preserve"
                     xsl:use-attribute-sets="verbatim.properties
shade.verbatim.style">
             <xsl:copy-of select="$content"/>
           </fo:block>
         </xsl:when>
<!--
   <xsl:otherwise>
          <fo:block id="{$id}"
                    wrap-option='no-wrap'
                    white-space-collapse='false'
                    white-space-treatment='preserve'
remove this => text-align='start'
                    linefeed-treatment="preserve"
                    xsl:use-attribute-sets="verbatim.properties">
            <xsl:copy-of select="$content"/>
          </fo:block>
        </xsl:otherwise>
-->
         <xsl:otherwise>
           <fo:block id="{$id}"
                     wrap-option='no-wrap'
                     white-space-collapse='false'
                     white-space-treatment='preserve'
                     linefeed-treatment="preserve"
                     xsl:use-attribute-sets="verbatim.properties">
             <xsl:copy-of select="$content"/>
           </fo:block>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:otherwise>
   </xsl:choose>
</xsl:template>

Yes. Docbook 4.4 and 4.5 with Oxygen 8.1 defaults, but it doesn't
come out in italics for me.

>That content looks like DocBook. I can confirm that emphasis in
>footnote comes out in italic when processed with the DocBook XSL
>stylesheets and XEP 4.9.
>
>Bob Stayton
>Sagehill Enterprises
>DocBook Consulting
>bobs@sagehill.net
>
>
>----- Original Message ----- From: "Dan Ochs" <dan.ochs@gmail.com>
>To: <xep-support@renderx.com>
>Sent: Friday, January 26, 2007 2:24 PM
>Subject: Re: [xep-support] <emphasis> in footnote ignored
>
>>XEP is only used to convert XSL-FO to PDF, and it looks like you are
>>using another format for you XML content, then probably convert it to
>>XSL-FO. It is that conversion step that is not creating the correct
>>XSL-FO for XEP to make a PDF.
>>
>>dan
>>
>>
>>
>>
>>On 1/26/07, Ron Catterall <ron@catterall.net> wrote:
>>>With XEP 4.9 to produce PDF, I find that using <emphasis> in a
>>>footnote has no effect.
>>>
>>><para>This text <emphasis>should be in italics, and is</emphasis>, but
>>><footnote><para>Some text here <emphasis>this should be in italics,
>>>but is not</emphasis>.</para></footnote> more text</para>
>>>
>>>Is this the correct behavior?
>>>--
>>>Ron Catterall, Phd, DSc email:
>>>ron@catterall.net
>>>Prolongacion de Hidalgo 140 http://catterall.net/
>>>San Felipe del Agua tel: +52
>>>951 520 1821
>>>Oaxaca 68020 Mexico fax: +1 530 348 8309
>>>-------------------
>>>(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>>>in the body of the message to majordomo@renderx.com from the address
>>>you are subscribed from.
>>>(*) By using the Service, you expressly agree to these Terms of
>>>Service http://www.renderx.com/terms-of-service.html
>>>
>>-------------------
>>(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>>in the body of the message to majordomo@renderx.com from the address
>>you are subscribed from.
>>(*) By using the Service, you expressly agree to these Terms of
>>Service http://www.renderx.com/terms-of-service.html
>>
>
>
>-------------------
>(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
>in the body of the message to majordomo@renderx.com from the address
>you are subscribed from.
>(*) By using the Service, you expressly agree to these Terms of
>Service http://www.renderx.com/terms-of-service.html

-- 
Ron Catterall, Phd, DSc			       	email: ron@catterall.net
Prolongacion de Hidalgo 140				http://catterall.net/
San Felipe del Agua					tel: +52 951 520 1821
Oaxaca      68020	Mexico				fax: +1 530 348 8309
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Fri Jan 26 19:38:33 2007

This archive was generated by hypermail 2.1.8 : Fri Jan 26 2007 - 19:38:34 PST