You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2006/12/21 13:32:26 UTC

svn commit: r489338 - /incubator/uima/uimaj/trunk/uima-docbooks/src/styles/pdf/custom.xsl

Author: schor
Date: Thu Dec 21 04:32:25 2006
New Revision: 489338

URL: http://svn.apache.org/viewvc?view=rev&rev=489338
Log:
UIMA-121 For PDF output, format Notes/Tips to not have a
paragraph break between the callout and the 1st (and usually
only) paragraph.

Modified:
    incubator/uima/uimaj/trunk/uima-docbooks/src/styles/pdf/custom.xsl

Modified: incubator/uima/uimaj/trunk/uima-docbooks/src/styles/pdf/custom.xsl
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uima-docbooks/src/styles/pdf/custom.xsl?view=diff&rev=489338&r1=489337&r2=489338
==============================================================================
--- incubator/uima/uimaj/trunk/uima-docbooks/src/styles/pdf/custom.xsl (original)
+++ incubator/uima/uimaj/trunk/uima-docbooks/src/styles/pdf/custom.xsl Thu Dec 21 04:32:25 2006
@@ -346,12 +346,39 @@
     </fo:inline>
   </xsl:template>
 
+  <!-- bold-italic formatting -->
   <xsl:template match="emphasis[@role='bold-italic']">
    <fo:inline font-weight="bold" font-style="italic">
      <xsl:apply-templates/>
    </fo:inline>
  </xsl:template>
   
-  <!-- bold-italic formatting -->
+  <!-- Make notes display inline for 1st para --> 
+  <xsl:template name="nongraphical.admonition">
+    <xsl:variable name="id">
+      <xsl:call-template name="object.id"/>
+    </xsl:variable>
+
+    <xsl:choose>
+      <xsl:when test="child::*[1]/self::para">
+        <fo:block id="{$id}"
+               xsl:use-attribute-sets="nongraphical.admonition.properties">
+          <fo:block>
+            <fo:inline keep-with-next.within-line='always'
+                 xsl:use-attribute-sets="admonition.title.properties">
+              <xsl:apply-templates select="." mode="object.title.markup"/>
+              <xsl:text>: </xsl:text>
+            </fo:inline>
+            <xsl:apply-templates select="para[1]/node()"/>
+          </fo:block>
+          <xsl:apply-templates select="*[not(self::para[1])]"/>
+        </fo:block>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:apply-imports/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template> 
+
   
 </xsl:stylesheet>