~ubuntu-branches/ubuntu/wily/dblatex/wily

« back to all changes in this revision

Viewing changes to docs/custom/style.xml

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Hoenen
  • Date: 2008-08-11 20:28:56 UTC
  • mfrom: (4.1.7 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080811202856-d2qjg24ut53mgufx
Tags: 0.2.9-3
* Improve CJK (Chinese/Japanese/Korean) support:
  + Let XSL configuration parameter cjk.font default to gkai (instead of the
    cyberbit font not included in Debian).
  + Add Suggests dependency on latex-cjk-all for the gkai fonts.
  + Fix the db2latex style not to collide with the CJKutf8.sty file.
  Thanks to W. Martin Borgert for reporting and hints.
  Closes: #482857, #492350
* Fix a name clash with TeXLive for spanish documents in native style.
  Thanks to W. Martin Borgert for reporting.  Closes: #492304
* Support underscore characters in xreflabel attributes.  Thanks to
  Sébastien Villemot for reporting.  Closes: #492959

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?xml version="1.0" encoding="iso-8859-1"?>
2
 
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
 
2
<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3
3
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
4
 
<sect1 id="sec-style"><title>Output Formatting Style</title>
 
4
<section id="sec-style"><title>Output Formatting Style</title>
5
5
<para>The output rendering done by <command>dblatex</command> can be widely
6
6
customized like explained in <xref linkend="sec-custom"/>. By default several
7
7
rendering styles are provided, that one can choose by using the option
32
32
dblatex -T db2latex file.xml
33
33
]]></programlisting>
34
34
</example>
35
 
<sect2><title>How it works</title>
 
35
<section><title>How it works</title>
36
36
<para>The rendering style stuff is under the <filename>latex/</filename>
37
37
directory. You can see the XSL stylesheets under <filename>xsl/</filename> as the
38
38
way to produce latex with as little as possible docbook specific things (even if a
91
91
</listitem>
92
92
</varlistentry>
93
93
</variablelist>
94
 
</sect2>
95
 
<sect2><title>Adding a New Formatting Style</title>
 
94
</section>
 
95
<section><title>Adding a New Formatting Style</title>
96
96
<para>To add a new formatting style, do the following steps:</para>
97
97
<procedure>
 
98
<step><para>Let's create the style directores that will contain all the specific
 
99
data. We choose to put them under the default <command>dblatex</command>
 
100
user configuration directory.</para>
 
101
<programlisting><![CDATA[
 
102
$ mkdir -p $HOME/.dblatex/mystyle/latex
 
103
$ mkdir -p $HOME/.dblatex/mystyle/xsl
 
104
]]></programlisting>
 
105
<para>Note that you could choose another configuration directory (see <xref
 
106
linkend="sec-conf-path"/> for more details).</para>
 
107
</step>
98
108
<step><para>Create the latex stylesheets you need. It must define the expected DocBook
99
109
interface and include some core definitions from the default latex
100
 
stylesheets (cf. <xref linkend="sec-custom-latex"/>).</para></step>
101
 
<step><para>Put the latex stylesheets under a directory located under
102
 
<filename>contrib/</filename>.</para>
 
110
stylesheets (cf. <xref linkend="sec-custom-latex"/>). Create also your XSL
 
111
stylesheet if necessary.</para></step>
 
112
<step><para>Put these files under the appropriate directories:</para>
103
113
<programlisting><![CDATA[
104
 
$ mkdir latex/contrib/mystyle
105
 
$ mv mytexstyle.sty latex/contrib/mystyle
 
114
$ mv mytexstyle.sty $HOME/.dblatex/mystyle/latex/.
 
115
$ mv param.xsl $HOME/.dblatex/mystyle/xsl/.
106
116
]]></programlisting>
107
117
</step>
108
 
<step><para>If needed, create an XSL parameter file (e.g.
109
 
<filename>param.xsl</filename>) that tunes the XSL production, and
110
 
put it under <filename>mystyle/</filename>.
111
 
</para></step>
112
 
<step><para>Create a specification file under the directory
113
 
<filename>specs/</filename>. The specification file must point to the new latex
114
 
stylesheet, and give the specific parameters. Example:</para>
 
118
<step><para>Create a configuration file under the directory
 
119
<filename>$HOME/.dblatex</filename>. The specification file must point to the new
 
120
latex stylesheet, and give the specific parameters. Example:</para>
115
121
<programlisting><![CDATA[
116
 
$ cat latex/specs/mystyle.specs
117
 
#
118
 
# Dblatex spec file for my new style
119
 
#
120
 
TexInputs: ../contrib/mystyle//
 
122
$ cat $HOME/.dblatex/mystyle.conf
 
123
#
 
124
# Dblatex config file for my new style.
 
125
# Note that the directories are relative to mystyle.conf
 
126
#
 
127
TexInputs: mystyle/latex//
121
128
TexStyle:  mytexstyle
122
 
XslParam: ../contrib/mystyle/param.xsl
123
 
Options:   -b pdftex
 
129
XslParam:  mystyle/param.xsl
 
130
Options:   -f fig
124
131
]]></programlisting>
125
132
</step>
126
133
<step><para>That's it. Try to compile your document with your style, and check the
131
138
</step>
132
139
</procedure>
133
140
 
134
 
 
135
 
</sect2>
136
 
</sect1>
 
141
</section>
 
142
</section>
137
143