]> granicus.if.org Git - docbook-dsssl/commitdiff
Adds support for side floats in FO output.
authorBob Stayton <bobs@sagehill.net>
Sat, 22 Jan 2005 06:24:25 +0000 (06:24 +0000)
committerBob Stayton <bobs@sagehill.net>
Sat, 22 Jan 2005 06:24:25 +0000 (06:24 +0000)
xsl/params/body.end.indent.xml [new file with mode: 0644]
xsl/params/body.start.indent.xml [new file with mode: 0644]
xsl/params/margin.note.float.type.xml [new file with mode: 0644]
xsl/params/margin.note.properties.xml [new file with mode: 0644]
xsl/params/margin.note.title.properties.xml [new file with mode: 0644]
xsl/params/margin.note.width.xml [new file with mode: 0644]
xsl/params/sidebar.float.type.xml
xsl/params/sidebar.float.width.xml [new file with mode: 0644]
xsl/params/sidebar.title.properties.xml [new file with mode: 0644]

diff --git a/xsl/params/body.end.indent.xml b/xsl/params/body.end.indent.xml
new file mode 100644 (file)
index 0000000..86617cf
--- /dev/null
@@ -0,0 +1,32 @@
+<refentry id="body.end.indent">
+<refmeta>
+<refentrytitle>body.end.indent</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>body.end.indent</refname>
+<refpurpose>The end-indent for the body text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='body.end.indent.frag'>
+<xsl:param name="body.end.indent" select="'0pt'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This end-indent property is added to the fo:flow
+for certain page sequences.  Which page-sequences it is 
+applied to is determined by the template named
+<literal>set.flow.properties</literal>.
+By default, that template adds it to the flow
+for page-sequences using the <quote>body</quote>
+master-reference, as well as appendixes and prefaces.
+</para>
+
+<para>See also <parameter>body.start.indent</parameter>.
+</para>
+
+</refsect1>
+</refentry>
diff --git a/xsl/params/body.start.indent.xml b/xsl/params/body.start.indent.xml
new file mode 100644 (file)
index 0000000..53242df
--- /dev/null
@@ -0,0 +1,32 @@
+<refentry id="body.start.indent">
+<refmeta>
+<refentrytitle>body.start.indent</refentrytitle>
+
+</refmeta>
+<refnamediv>
+<refname>body.start.indent</refname>
+<refpurpose>The start-indent for the body text</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='body.start.indent.frag'>
+<xsl:param name="body.start.indent" select="'4pc'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>This start-indent property is added to the fo:flow
+for certain page sequences.  Which page-sequences it is 
+applied to is determined by the template named
+<literal>set.flow.properties</literal>.
+By default, that template adds it to the flow
+for page-sequences using the <quote>body</quote>
+master-reference, as well as appendixes and prefaces.
+</para>
+
+<para>See also <parameter>body.end.indent</parameter>.
+</para>
+
+</refsect1>
+</refentry>
diff --git a/xsl/params/margin.note.float.type.xml b/xsl/params/margin.note.float.type.xml
new file mode 100644 (file)
index 0000000..a735dbb
--- /dev/null
@@ -0,0 +1,64 @@
+<refentry id="margin.note.float.type">
+<refmeta>
+<refentrytitle>margin.note.float.type</refentrytitle>
+<refmiscinfo role="type">list</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>margin.note.float.type</refname>
+<refpurpose>Select type of float for margin note customizations</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='margin.note.float.type.frag'>
+<xsl:param name="margin.note.float.type" select="'none'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Selects the type of float for margin notes.
+DocBook does not define a margin note element, so this
+feature must be implemented as a customization of the stylesheet.
+See <parameter>margin.note.properties</parameter> for
+an example.
+</para>
+<itemizedlist>
+<listitem>
+<para>If <parameter>margin.note.float.type</parameter> is
+<quote><literal>none</literal></quote>, then 
+no float is used.
+</para>
+</listitem>
+<listitem>
+<para>If <parameter>margin.note.float.type</parameter> is
+<quote><literal>before</literal></quote>, then 
+the float appears at the top of the page.  On some processors,
+that may be the next page rather than the current page.
+</para>
+</listitem>
+<listitem>
+<para>If <parameter>margin.note.float.type</parameter> is
+<quote><literal>left</literal></quote> or
+<quote><literal>start</literal></quote>, then 
+a left side float is used.
+</para>
+</listitem>
+<listitem>
+<para>If <parameter>margin.note.float.type</parameter> is
+<quote><literal>right</literal></quote> or
+<quote><literal>end</literal></quote>, then 
+a right side float is used.
+</para>
+</listitem>
+<listitem>
+<para>If your XSL-FO processor supports floats positioned on the
+<quote><literal>inside</literal></quote> or
+<quote><literal>outside</literal></quote>
+of double-sided pages, then you have those two 
+options for side floats as well.
+</para>
+</listitem>
+</itemizedlist>
+
+</refsect1>
+</refentry>
diff --git a/xsl/params/margin.note.properties.xml b/xsl/params/margin.note.properties.xml
new file mode 100644 (file)
index 0000000..b6b5518
--- /dev/null
@@ -0,0 +1,49 @@
+<refentry id="margin.note.properties">
+<refmeta>
+<refentrytitle>margin.note.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>margin.note.properties</refname>
+<refpurpose>Attribute set for margin.note properties</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='margin.note.properties.frag'>
+<xsl:attribute-set name="margin.note.properties">
+  <xsl:attribute name="font-size">90%</xsl:attribute>
+  <xsl:attribute name="text-align">start</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The styling for margin notes.
+By default, margin notes are not implemented for any
+element. A stylesheet customization is needed to make
+use of this attribute-set.</para>
+
+<para>You can use a template named <quote>floater</quote>
+to create the customization.
+That template can create side floats by specifying the
+content and characteristics as template parameters.
+</para>
+
+<para>For example:</para>
+<programlisting><![CDATA[<xsl:template match="para[@role='marginnote']">
+  <xsl:call-template name="floater">
+    <xsl:with-param name="position">
+      <xsl:value-of select="$margin.note.float.type"/>
+    </xsl:with-param>
+    <xsl:with-param name="width">
+      <xsl:value-of select="$margin.note.width"/>
+    </xsl:with-param>
+    <xsl:with-param name="content">
+      <xsl:apply-imports/>
+    </xsl:with-param>
+  </xsl:call-template>
+</xsl:template>]]></programlisting>
+
+</refsect1>
+</refentry>
diff --git a/xsl/params/margin.note.title.properties.xml b/xsl/params/margin.note.title.properties.xml
new file mode 100644 (file)
index 0000000..67ac3ad
--- /dev/null
@@ -0,0 +1,27 @@
+<refentry id="margin.note.title.Properties">
+<refmeta>
+<refentrytitle>margin.note.title.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>margin.note.title.properties</refname>
+<refpurpose>Attribute set for margin note titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='margin.note.title.properties.frag'>
+<xsl:attribute-set name="margin.note.title.properties">
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+  <xsl:attribute name="hyphenate">false</xsl:attribute>
+  <xsl:attribute name="text-align">start</xsl:attribute>
+  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The styling for margin note titles.</para>
+
+</refsect1>
+</refentry>
diff --git a/xsl/params/margin.note.width.xml b/xsl/params/margin.note.width.xml
new file mode 100644 (file)
index 0000000..342d315
--- /dev/null
@@ -0,0 +1,29 @@
+<refentry id="margin.note.width">
+<refmeta>
+<refentrytitle>margin.note.width</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>margin.note.width</refname>
+<refpurpose>Set the default width for margin notes</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='margin.note.width.frag'>
+<xsl:param name="margin.note.width" select="'1in'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the default width for margin notes when used as a side float.
+The width determines the degree to which the margin note block intrudes into
+the text area.
+</para>
+<para>If <parameter>margin.note.float.type</parameter> is
+<quote><literal>before</literal></quote> or 
+<quote><literal>none</literal></quote>, then 
+this parameter is ignored.
+</para>
+
+</refsect1>
+</refentry>
index a248256ffb61c422fe1e24dff50809bd2e11b3d7..12f39df8028d22887ea422c62e9d45d9877c5410 100644 (file)
@@ -43,7 +43,7 @@ a left side float is used.
 <para>If <parameter>sidebar.float.type</parameter> is
 <quote><literal>right</literal></quote> or
 <quote><literal>end</literal></quote>, then 
-a left side float is used.
+a right side float is used.
 </para>
 </listitem>
 <listitem>
diff --git a/xsl/params/sidebar.float.width.xml b/xsl/params/sidebar.float.width.xml
new file mode 100644 (file)
index 0000000..ee5e3fe
--- /dev/null
@@ -0,0 +1,29 @@
+<refentry id="sidebar.float.width">
+<refmeta>
+<refentrytitle>sidebar.float.width</refentrytitle>
+</refmeta>
+<refnamediv>
+<refname>sidebar.float.width</refname>
+<refpurpose>Set the default width for sidebars</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='sidebar.float.width.frag'>
+<xsl:param name="sidebar.float.width" select="'1in'"/>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>Sets the default width for sidebars when used as a side float.
+The width determines the degree to which the sidebar block intrudes into
+the text area.
+</para>
+<para>If <parameter>sidebar.float.type</parameter> is
+<quote><literal>before</literal></quote> or 
+<quote><literal>none</literal></quote>, then 
+this parameter is ignored.
+</para>
+
+</refsect1>
+</refentry>
diff --git a/xsl/params/sidebar.title.properties.xml b/xsl/params/sidebar.title.properties.xml
new file mode 100644 (file)
index 0000000..e959466
--- /dev/null
@@ -0,0 +1,27 @@
+<refentry id="sidebar.title.Properties">
+<refmeta>
+<refentrytitle>sidebar.title.properties</refentrytitle>
+<refmiscinfo role="type">attribute set</refmiscinfo>
+</refmeta>
+<refnamediv>
+<refname>sidebar.title.properties</refname>
+<refpurpose>Attribute set for sidebar titles</refpurpose>
+</refnamediv>
+
+<refsynopsisdiv>
+<src:fragment id='sidebar.title.properties.frag'>
+<xsl:attribute-set name="sidebar.title.properties">
+  <xsl:attribute name="font-weight">bold</xsl:attribute>
+  <xsl:attribute name="hyphenate">false</xsl:attribute>
+  <xsl:attribute name="text-align">start</xsl:attribute>
+  <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
+</xsl:attribute-set>
+</src:fragment>
+</refsynopsisdiv>
+
+<refsect1><title>Description</title>
+
+<para>The styling for sidebars titles.</para>
+
+</refsect1>
+</refentry>