+2006-06-02 [wwp] 2.2.0cvs72
+
+ * manual/xml2pdf
+ * manual/dist/pdf/Makefile.am
+ * manual/dtd/manual.xsl
+ * manual/fr/dist/pdf/Makefile.am
+ * manual/pl/dist/pdf/Makefile.am
+ we changed the procedure to generate the .pdf version of the manual.
+ The procedure is more modern and the .pdf we get now has a valid index.
+ Here are the new pre-requisites:
+
+ - JRE 1.x (1.4 here): there must be one from your distro
+ - Saxon 6.5.5: http://prdownloads.sourceforge.net/saxon/saxon6-5-5.zip
+ - FOP 0.92: http://apache.crihan.fr/dist/xmlgraphics/fop/fop-0.92beta-bin-jdk1.4.tar.gz
+ - DocBook XSL 1.70.x: http://prdownloads.sourceforge.net/docbook/docbook-xsl-1.70.1.tar.bz2?download
+
+ See my posts for further info about the installation of this toolchain:
+
+ Date: Fri, 19 May 2006 19:40:06 +0200
+ From: wwp <subscript@free.fr>
+ To: sylpheed-claws-devel@lists.sourceforge.net
+ Subject: [Sylpheed-claws-devel] Generating the manual .pdf
+
+ and
+
+ Date: Wed, 24 May 2006 12:58:49 +0200
+ From: wwp <subscript@free.fr>
+ To: sylpheed-claws-devel@lists.sourceforge.net
+ Subject: Re: [Sylpheed-claws-devel] Generating the manual .pdf
+
2006-06-01 [colin] 2.2.0cvs71
* src/compose.c
( cvs diff -u -r 1.9.2.13 -r 1.9.2.14 src/common/ssl.c; ) > 2.2.0cvs69.patchset
( cvs diff -u -r 1.94.2.84 -r 1.94.2.85 src/messageview.c; ) > 2.2.0cvs70.patchset
( cvs diff -u -r 1.382.2.274 -r 1.382.2.275 src/compose.c; cvs diff -u -r 1.115.2.87 -r 1.115.2.88 src/main.c; cvs diff -u -r 1.204.2.86 -r 1.204.2.87 src/prefs_common.c; cvs diff -u -r 1.103.2.49 -r 1.103.2.50 src/prefs_common.h; cvs diff -u -r 1.4.2.9 -r 1.4.2.10 src/common/ssl_certificate.c; cvs diff -u -r 1.1.4.38 -r 1.1.4.39 src/etpan/imap-thread.c; cvs diff -u -r 1.1.4.9 -r 1.1.4.10 src/etpan/imap-thread.h; cvs diff -u -r 1.9.2.11 -r 1.9.2.12 src/gtk/sslcertwindow.c; cvs diff -u -r 1.1.2.18 -r 1.1.2.19 manual/advanced.xml; cvs diff -u -r 1.1.2.9 -r 1.1.2.10 manual/fr/advanced.xml; ) > 2.2.0cvs71.patchset
+( diff -u /dev/null manual/xml2pdf; cvs diff -u -r 1.1.2.3 -r 1.1.2.4 manual/dist/pdf/Makefile.am; diff -u /dev/null manual/dtd/manual.xsl; cvs diff -u -r 1.1.2.1 -r 1.1.2.2 manual/fr/dist/pdf/Makefile.am; cvs diff -u -r 1.1.2.1 -r 1.1.2.2 manual/pl/dist/pdf/Makefile.am; ) > 2.2.0cvs72.patchset
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=71
+EXTRA_VERSION=72
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
../../plugins.xml \
../../starting.xml \
../../sylpheed-claws-manual.xml
- -docbook2pdf -d ../../dtd/manual.dsl -o . ../../sylpheed-claws-manual.xml
+ -sh ../../xml2pdf ../../dtd/manual.xsl ../../sylpheed-claws-manual.xml
clean:
- -rm sylpheed-claws-manual.pdf
+ -rm sylpheed-claws-manual.pdf sylpheed-claws-manual.fo sylpheed-claws-manual.xsl
--- /dev/null
+<?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="@DOCBOOK_XSL_PATH@/fo/docbook.xsl"/>
+
+<xsl:param name="fop1.extensions" select="1"/>
+<xsl:param name="title.margin.left" select="'0pt'"/>
+<xsl:param name="body.start.indent" select="'0pt'"/>
+<xsl:param name="variablelist.as.blocks" select="1"/>
+<xsl:param name="paper.type" select="'A4'"/>
+
+<xsl:template match="appendix[@id='ap_glossary']/variablelist"
+ mode="fop1.outline">
+
+ <xsl:variable name="id">
+ <xsl:call-template name="object.id"/>
+ </xsl:variable>
+
+ <xsl:variable name="bookmark-label">
+ <xsl:apply-templates select="." mode="object.title.markup"/>
+ </xsl:variable>
+
+ <!-- Put the root element bookmark at the same level as its children -->
+ <!-- If the object is a set or book, generate a bookmark for the toc -->
+
+ <xsl:choose>
+ <xsl:when test="parent::*">
+ <fo:bookmark internal-destination="{$id}">
+ <fo:bookmark-title>
+ <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/>
+ </fo:bookmark-title>
+ <xsl:apply-templates select="*" mode="fop1.outline"/>
+ </fo:bookmark>
+ </xsl:when>
+ <xsl:otherwise>
+ <fo:bookmark internal-destination="{$id}">
+ <fo:bookmark-title>
+ <xsl:value-of select="normalize-space(translate($bookmark-label, $a-dia, $a-asc))"/>
+ </fo:bookmark-title>
+ </fo:bookmark>
+
+ <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')
+ and (book|part|reference|preface|chapter|appendix|article
+ |glossary|bibliography|index|setindex
+ |refentry
+ |sect1|sect2|sect3|sect4|sect5|section)">
+ <fo:bookmark internal-destination="toc...{$id}">
+ <fo:bookmark-title>
+ <xsl:call-template name="gentext">
+ <xsl:with-param name="key" select="'TableofContents'"/>
+ </xsl:call-template>
+ </fo:bookmark-title>
+ </fo:bookmark>
+ </xsl:if>
+ <xsl:apply-templates select="*" mode="fop1.outline"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
+</xsl:stylesheet>
../../plugins.xml \
../../starting.xml \
../../sylpheed-claws-manual.xml
- -docbook2pdf -d ../../../dtd/manual.dsl -o . ../../sylpheed-claws-manual.xml
+ -sh ../../../xml2pdf ../../../dtd/manual.xsl ../../sylpheed-claws-manual.xml
clean:
- -rm sylpheed-claws-manual.pdf
+ -rm sylpheed-claws-manual.pdf sylpheed-claws-manual.fo sylpheed-claws-manual.xsl
../../plugins.xml \
../../starting.xml \
../../sylpheed-claws-manual.xml
- -docbook2pdf -d ../../../dtd/manual.dsl -o . ../../sylpheed-claws-manual.xml
+ -sh ../../../xml2pdf ../../../dtd/manual.xsl ../../sylpheed-claws-manual.xml
clean:
- -rm sylpheed-claws-manual.pdf
+ -rm sylpheed-claws-manual.pdf sylpheed-claws-manual.fo sylpheed-claws-manual.xsl
--- /dev/null
+#!/bin/sh
+
+# pdf generation from xml and xsl
+# $1: .xsl file
+# $2: .xml file
+
+if [ $# -ne 2 ]
+then
+ echo "usage: ${0##*/} <file.xsl> <file.xml>"
+fi
+
+test -n "$XML_CATALOG_FILES" && \
+ CATALOG_FILES=$XML_CATALOG_FILES || \
+ CATALOG_FILES="/usr/local/etc/xml/catalog /etc/xml/catalog $HOME/xml/catalog"
+KEY="http://docbook.sourceforge.net/release/xsl/current"
+
+for CATALOG in $CATALOG_FILES
+do
+ if [ -s "$CATALOG" ]
+ then
+ DOCBOOKXSLPATH=$(xmlcatalog "$CATALOG" "$KEY/")
+ # second chance
+ test $? -ne 0 -o -z "$DOCBOOKXSLPATH" && \
+ DOCBOOKXSLPATH=$(xmlcatalog "$CATALOG" "$KEY")
+
+ test "${DOCBOOKXSLPATH:0:7}" == "file://" && \
+ DOCBOOKXSLPATH=${DOCBOOKXSLPATH:7}
+ if [ -n "$DOCBOOKXSLPATH" ]
+ then
+ echo "docbook-xsl path found: $DOCBOOKXSLPATH"
+ sed "s|@DOCBOOK_XSL_PATH@|$DOCBOOKXSLPATH|g" "$1" > sylpheed-claws-manual.xsl && \
+ saxon -o sylpheed-claws-manual.fo "$2" sylpheed-claws-manual.xsl && \
+ fop -fo sylpheed-claws-manual.fo -pdf sylpheed-claws-manual.pdf
+ exit $?
+ fi
+ fi
+done
+echo "couldn't find docbook-xsl path from any of the following catalog files:"
+echo "$CATALOG_FILES"
+exit 1