aboutsummaryrefslogtreecommitdiff
path: root/share/xsl/freebsd-fo.xsl
blob: be0987069b2201c996976beccff8d0d00f12ded2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<?xml version='1.0'?>

<!-- $FreeBSD$ -->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		xmlns:fo="http://www.w3.org/1999/XSL/Format"
		xmlns="http://www.w3.org/TR/xhtml1/transitional"
                version='1.0'
                exclude-result-prefixes="#default">

  <!-- Pull in the base stylesheets -->
  <xsl:import href="/usr/local/share/xsl/docbook/fo/docbook.xsl"/>

  <!-- Include the common customizations -->
  <xsl:include href="freebsd-common.xsl"/>

  <!-- Redefine variables, and replace templates as necessary here -->

  <xsl:param name="freebsd.output.print"
             select="'0'"/>
  <xsl:param name="freebsd.output.print.pdf"
             select="'0'"/>
  <xsl:param name="freebsd.output.print.justify"
             select="'0'"/>
  <xsl:param name="freebsd.output.print.twoside"
             select="'0'"/>

  <!-- FO specific customisation goes here -->

  <xsl:param name="use.extensions" select="1"/>
  <xsl:param name="fop1.extensions" select="1"/>

<!--
  <xsl:param name="hyphenate.verbatim" select="1"/>
-->
  <xsl:param name="header.column.widths">1 5 1</xsl:param>


<xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode"/>

<xsl:attribute-set name="abstract.title.properties">
  <xsl:attribute name="font-size">
    <xsl:value-of select="$body.font.master * 2.0736"></xsl:value-of>
    <xsl:text>pt</xsl:text>
  </xsl:attribute>
  <xsl:attribute name="text-align">left</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="abstract.properties">
  <xsl:attribute name="margin-left">0</xsl:attribute>
  <xsl:attribute name="margin-right">0</xsl:attribute>
  <xsl:attribute name="padding-left">0</xsl:attribute>
  <xsl:attribute name="padding-right">0</xsl:attribute>
</xsl:attribute-set>

<xsl:attribute-set name="toc.margin.properties">
  <xsl:attribute name="margin-left">
    <xsl:value-of select="'0'"/>
  </xsl:attribute>
  <xsl:attribute name="margin-right">
    <xsl:value-of select="'0'"/>
  </xsl:attribute>
  <xsl:attribute name="padding-left">
    <xsl:value-of select="'0'"/>
  </xsl:attribute>
  <xsl:attribute name="padding-right">
    <xsl:value-of select="'0'"/>
  </xsl:attribute>
</xsl:attribute-set>

<!--
<xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode">
  <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="start" font-family="{$body.fontset}">
    <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  </fo:block>
</xsl:template>
-->

<xsl:template match="abstract" mode="article.titlepage.recto.auto.mode">
<fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
</fo:block>
</xsl:template>

</xsl:stylesheet>