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] Column problems


Title: [docbook-apps] Column problems
Hi Ron,
For the first problem, you will need to divide the article output into multiple page-sequences.  That requires customizing the template that matches on article from fo/component.xsl.  With the snapshot version, this is easier because it has a template named "page.sequence" intended for such purposes.  You can specify one parameter for the master name and another for the content of the page sequence.  The following example shows how it can be used for the different parts of your article.
 
For literallayout wrapping, you want to add a wrap-option="wrap" property to the verbatim.properties attribute set, as shown in the following example.
 
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:fo="http://www.w3.org/1999/XSL/Format"
                version="1.0">
 
<xsl:import href="../docbook-xsl-snapshot/fo/docbook.xsl"/>
 
<xsl:param name="column.count.titlepage" select="1" />
<xsl:param name="column.count.lot" select="1" />
<xsl:param name="column.count.body" select="2" />
<xsl:param name="column.count.back" select="1" />
<xsl:param name="double.sided">0</xsl:param>
 
<xsl:attribute-set name="verbatim.properties">
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
</xsl:attribute-set>
 
<xsl:template name="initial.page.number">auto</xsl:template>
 
<xsl:template match="article">
  <xsl:variable name="id">
    <xsl:call-template name="object.id"/>
  </xsl:variable>
 
  <xsl:call-template name="page.sequence">
    <xsl:with-param name="master-reference">titlepage</xsl:with-param>
    <xsl:with-param name="content">
      <fo:block id="{$id}"
                xsl:use-attribute-sets="component.titlepage.properties">
        <xsl:call-template name="article.titlepage"/>
      </fo:block>
 
      <xsl:variable name="toc.params">
        <xsl:call-template name="find.path.params">
          <xsl:with-param name="table" select="normalize-space($generate.toc)"/>
        </xsl:call-template>
      </xsl:variable>
 
      <xsl:if test="contains($toc.params, 'toc')">
        <xsl:call-template name="component.toc">
          <xsl:with-param name="toc.title.p"
                          select="contains($toc.params, 'title')"/>
        </xsl:call-template>
        <xsl:call-template name="component.toc.separator"/>
      </xsl:if>
    </xsl:with-param>
  </xsl:call-template>
 
  <xsl:call-template name="page.sequence">
    <xsl:with-param name="master-reference">body</xsl:with-param>
    <xsl:with-param name="content">
      <xsl:apply-templates select="*[not(self::bibliography)]"/>
    </xsl:with-param>
  </xsl:call-template>
 
  <xsl:if test="bibliography">
    <xsl:call-template name="page.sequence">
      <xsl:with-param name="master-reference">back</xsl:with-param>
      <xsl:with-param name="content">
        <xsl:apply-templates select="bibliography"/>
      </xsl:with-param>
    </xsl:call-template>
  </xsl:if>
 
</xsl:template>
 
</xsl:stylesheet>
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
 
 
----- Original Message -----
Sent: Thursday, July 12, 2007 6:24 AM
Subject: [docbook-apps] Column problems

1st. problem
----------------
I have an a very simple document (a single article) structured as:
<article>
   <section>
      <para>
         etc
      </para>
      etc - more paras
   </section>
   <section>
      <para>
         etc
      </para>
      etc - more paras
   </section>
   <section>
      <para>
         etc
      </para>
      etc - more paras
   </section>
   <bibliography id="LL_bib" lang="EN" ><title>Bibliography</title>
       <biblioentry id="QWERTY">
          etc
        </biblioentry>
        etc - more biblioentrys
    </bibliography>
</article>

In my customization layer I have:
<xsl:param name="column.count.titlepage" select="1" />
<xsl:param name="column.count.lot" select="1" />
<xsl:param name="column.count.body" select="2" />
<xsl:param name="column.count.back" select="1" />

I was hoping to have a title page and a bibliography in 1 column and the sections in 2 columns.  FO output:  XEP 4.9, DTD 4.5, XSL 1.71.1 (change log 2005-09-09), Saxon 6.5.5, Oxygen 8.2, MacOSX 10.3.9

However the page class "body" includes "article" and everything comes out in 2 columns.

How can I get a 1 column title page (page class "titlepage") and bibliography (page class "back") together with 2 column sections (page class "body") in what I persist in regarding as the body of the article.

2nd. problem
-----------------
In the section I have structures like:
<section>
   <para>
        <blockquote>
              <literallayout><emphasis>
a short line
a long line a long line a long line a long line a long line a long line
a short line
              </emphasis></literallayout>
        </blockquote>
   </para>
</section>

Some of the lines in the literallayout are too long and overlap into the second column.  I realize that literallayout is doing exactly what I asked it to do, but is there any way for literallayout to automatically line-wrap at the column width?

I'd very much appreciate any help.

Ron




--
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, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
-- 
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, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


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