[xep-support] Marginalia as a DocBook customisation
Bob Stayton
bobs at sagehill.net
Wed May 5 13:27:47 PDT 2004
I used something that was a little closer to XEP's example, which included a
block-container:
<fo:float float="start"
start-indent="{$title.margin.left}"
clear="both">
<fo:block-container width="-{$title.margin.left}">
<fo:block
font-weight="normal"
font-size="7pt"
line-height="8pt"
start-indent="0pt"
end-indent="1pc">
<xsl:apply-templates/>
</fo:block>
</fo:block-container>
</fo:float>
It tested this in both XEP and Antenna House, and it works for both. I was
thinking that it might become a feature of the DocBook stylesheets, which is
why I wanted it to work with all processors (although FOP does not support
side floats yet).
I had tried something like Jirka's example, but in Antenna House the content
did not wrap, it just stayed on one line and intruded into the body area. I
think the difference is that XEP supports width on fo:block, even though
that property is not in the spec for fo:block. Is that an XEP extension?
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs at sagehill.net
----- Original Message -----
From: "Jirka Kosek" <jirka at kosek.cz>
To: <xep-support at renderx.com>
Sent: Wednesday, May 05, 2004 12:43 AM
Subject: Re: [xep-support] Marginalia as a DocBook customisation
Paul A. Hoadley wrote:
> Has anyone written (or seen) a DocBook customisation to produce
> marginalia using side floats?
>
> http://xep.xattic.com/xep/testsuite/usecasestest.html#marginalia
>
> I'm thinking of something like <note role="margin">...</note>. I'll
> have a look at it if no one has done it.
I was prototyping this some time ago, see attachement. I'm not sure if
it still works with the latests stylesheets, but you can give it a try.
Content of <remark> elements are formatted as marginalia, but you can
change this very easily.
Jirka
--
------------------------------------------------------------------
Jirka Kosek e-mail: jirka at kosek.cz http://www.kosek.cz
------------------------------------------------------------------
Profesionální školení a poradenství v oblasti technologií XML.
Úvod do XML 3.5. DocBook 18.-19.5.
XSLT 24.-26.5. XML pro vývojáře 7.-8.6.
------------------------------------------------------------------
----------------------------------------------------------------------------
----
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
version="1.0">
<!-- Element remark se zobrazuje jako marginĂĄlie -->
<xsl:import
href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl"/>
<!-- Ăpravy parametrĹŻ -->
<!-- Velikost papĂru -->
<xsl:param name="paper.type" select="'A4'"/>
<!-- XSLT procesor mĹŻĹže pouĹžĂvat rozĹĄĂĹenĂ pro callouts apod. -->
<xsl:param name="use.extensions" select="1"/>
<!-- RozĹĄĂĹenĂ specifickĂĄ pro danĂ˝ FO procesor -->
<!-- <xsl:param name="passivetex.extensions" select="1"/> -->
<xsl:param name="xep.extensions" select="1"/>
<!-- Velikost pĂsma textu -->
<xsl:param name="body.font.master">11</xsl:param>
<!-- Velikost okrajĹŻ -->
<xsl:param name="page.margin.inner" select="'8pc'"/>
<xsl:param name="page.margin.outer" select="'8pc'"/>
<!-- ÄĂslovĂĄnĂ sekcĂ a kapitol -->
<xsl:param name="section.autolabel" select="1"/>
<xsl:param name="section.label.includes.component.label" select="1"/>
<xsl:param name="chapter.autolabel" select="1"/>
<xsl:param name="appendix.autolabel" select="1"/>
<xsl:param name="part.autolabel" select="1"/>
<xsl:param name="preface.autolabel" select="0"/>
<!-- Nechceme obrĂĄzek -->
<xsl:param name="draft.watermark.image" select="''"/>
<!-- Nadpisy jsou zarovnĂĄny s textem, jak je zvykem v evropskĂŠ
typografii -->
<xsl:param name="title.margin.left" select="'-5pc'"/>
<xsl:param name="show.comments.as.marginalias" select="1"/>
<xsl:template match="comment|remark">
<xsl:if test="$show.comments != 0">
<xsl:choose>
<xsl:when test="$show.comments.as.marginalias = 1">
<fo:float float="start">
<fo:block width="4pc" text-align="end" font-family="Helvetica"
font-size="8pt" font-weight="bold" margin-left="{$title.margin.left}">
<xsl:call-template name="inline.charseq"/>
</fo:block>
</fo:float>
</xsl:when>
<xsl:otherwise>
<fo:block font-style="italic">
<xsl:call-template name="inline.charseq"/>
</fo:block>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at 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/tos.html
More information about the Xep-support
mailing list