Bonjour,
Voici une feuille de style qui permet de personnaliser le pdf/ps généré.
<?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">
<xsl:import href="/usr/share/sgml/docbook/xsl-stylesheets/fo/docbook.xsl"/>
<!--
FOP essaie de recuperer cette image pour laquelle le fichier
param.xml par defaut fournit un URL reseau.
-->
<xsl:param name="draft.watermark.image"
select="'/usr/share/sgml/docbook/xsl-stylesheets/images/draft.png'"/>
<xsl:param name="paper.type" select="'A4'"/>
<xsl:param name="hyphenate" select="'false'"/>
<xsl:param name="section.autolabel" select="1"/>
<xsl:param name="passivetex.extensions" select="1"/>
<!--xsl:param name="toc.section.depth" select="2"/-->
<xsl:param name="toc.section.depth" select="5"/>
<xsl:param name="glossentry.show.acronym" select="'yes'"/>
<xsl:param name="local.l10n.xml" select="document('')"/>
<l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">
<l:l10n language="fr">
<l:context name="title-numbered">
<l:template name="sect5" text="%t"/>
</l:context>
<l:context name="section-xref-numbered">
<l:template name="sect5" text="la section nommée %t"/>
</l:context>
</l:l10n>
</l:i18n>
<!-- titre de note/caution/warning/tip en rouge -->
<xsl:template name="nongraphical.admonition">
<xsl:variable name="id">
<xsl:call-template name="object.id"/>
</xsl:variable>
<fo:block space-before.minimum="0.8em"
space-before.optimum="1em"
space-before.maximum="1.2em"
start-indent="0.25in"
end-indent="0.25in"
id="{$id}">
<xsl:choose>
<xsl:when test="ancestor-or-self::warning">
<fo:block keep-with-next='always'
xsl:use-attribute-sets="admonition.title.properties"
color="red">
<xsl:apply-templates select="." mode="object.title.markup"/>
</fo:block>
</xsl:when>
<xsl:otherwise>
<fo:block keep-with-next='always'
xsl:use-attribute-sets="admonition.title.properties"
color="black">
<xsl:apply-templates select="." mode="object.title.markup"/>
</fo:block>
</xsl:otherwise>
</xsl:choose>
<fo:block xsl:use-attribute-sets="admonition.properties">
<xsl:apply-templates/>
</fo:block>
</fo:block>
</xsl:template>
<xsl:attribute-set name="section.title.level1.properties">
<!--xsl:attribute name="break-before">page</xsl:attribute-->
<xsl:attribute name="font-size">16pt</xsl:attribute>
</xsl:attribute-set>
<xsl:template name="bibliography.titlepage.before.recto">
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format"
break-before="page" />
</xsl:template>
<xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode">
</xsl:template>
<xsl:template match="author" mode="article.titlepage.recto.auto.mode">
</xsl:template>
<xsl:template name="header.content">
</xsl:template>
<xsl:attribute-set name="footer.content.properties">
<xsl:attribute name="font-family">
<xsl:value-of select="body.font.family"></xsl:value-of>
</xsl:attribute>
<xsl:attribute name="margin-left">
<xsl:value-of select="title.margin.left"></xsl:value-of>
</xsl:attribute>
</xsl:attribute-set>
<xsl:template name="footer.content">
<xsl:param name="pageclass" select="''"/>
<xsl:param name="sequence" select="''"/>
<xsl:param name="position" select="''"/>
<xsl:param name="gentext-key" select="''"/>
<fo:block>
<xsl:choose>
<xsl:when test="$double.sided != 0 and $position='left'">
<fo:page-number/>
</xsl:when>
<xsl:when test="$double.sided != 0 and $position='right'">
<xsl:value-of select="//article/articleinfo/date"/> © MA
SOCIETE
</xsl:when>
<xsl:when test="$double.sided = 0 and $position='right'">
<fo:page-number/>
</xsl:when>
<xsl:when test="$double.sided = 0 and $position='left'">
<xsl:value-of select="//article/articleinfo/date"/> © MA
SOCIETE
</xsl:when>
<xsl:otherwise>
</xsl:otherwise>
</xsl:choose>
</fo:block>
</xsl:template>
<xsl:template match="beginpage">
<fo:block break-before='page'/>
</xsl:template>
<xsl:template name="format.footnote.mark">
<xsl:param name="mark" select="'?'"/>
<fo:inline baseline-shift="super" font-size=".65em">
<xsl:copy-of select="$mark"/>
</fo:inline>
</xsl:template>
</xsl:stylesheet>
Cédric Joly a écrit :
> bonjour,
> exite-t-il des feuilles de style FO compatbile docbook prêt à l'emploi?
> après plusieurs recherches sur le site de la docbook et le téléchargment
> du package, je n'ai rien trouvé.
>
> merci
--
Sandrine Soudant <soudant@cogenit.fr>
Cogenit Tél : +33 (0) 1 40 20 08 43
53 rue Sainte Anne Fax : +33 (0) 1 40 20 08 45
75002 Paris <URL:http://www.cogenit.fr>
--
Devenez redacteur <XML>fr et contribuez au developpement du
xml francophone (http://xmlfr.org/infos/redacteurs/) !
Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
Cette liste est a votre disposition pour discuter en francais de
tout sujet technique lie a XML.
Pour resilier votre abonnement, envoyez un message contenant
la commande "unsubscribe" a xml-tech-request@xmlfr.org
(mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
Received on Fri Dec 2 11:08:52 2005