Debian Codegraph @

docs/publish.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
4 <section id="sec-pub-output">
5 <title>Publishing Outputs</title>
6
7 <section>
8 <title>Publishing a single document</title>
9
10 <para>The default publishing document units are: <sgmltag>article</sgmltag>
11 and <sgmltag>book</sgmltag>. The output file name is optionnaly specified by
12 the <option>-o</option> option.</para>
13
14 <para>You can also publish an article or book subset, i.e. you can run dblatex
15 on an XML input whose root element is a <sgmltag>chapter</sgmltag>, a
16 <sgmltag>section</sgmltag>, or anything else. In this case, dblatex wraps the
17 root element in an <sgmltag>article</sgmltag> or in a <sgmltag>book</sgmltag>
18 and print out a warning. The output subset does not contain any front matter
19 data found in an article or in a book (cover page, revision history, etc.),
20 but it can contain some back matter materials like an index.</para>
21
22 <programlisting>$ dblatex subset.xml
23 Build the book set list...
24 Build the listings...
25 XSLT stylesheets DocBook - LaTeX 2e (0.2.11)
26 ===================================================
27 Warning: the root element is not an article nor a book
28 Warning: element section(sec-subset) wrapped with article
29 Build subset.pdf
30 ...
31 </programlisting>
32 </section>
33
34 <section id="sec-book-set">
35 <title>Publishing a Set of Books</title>
36
37 <para>When the document root element is a <sgmltag>set</sgmltag>, and when
38 <parameter>set.book.num</parameter> is set to '<literal>all</literal>',
39 dblatex ouputs a file per book contained in the set (and in the nested sets).
40 In this case the <option>-o</option> option is ignored, and only the
41 <option>-O</option> option is taken into account to specify the output
42 directory that will contain the generated files.</para>
43
44 <para>Instead of building all the books, the user can publish a single book
45 from the set, by setting the <parameter>set.book.num</parameter> parameter to
46 the absolute position of the book in the set(s). By default
47 <parameter>set.book.num</parameter> is set to 1 to publish only the first
48 book.</para>
49
50 <para>The output file names are the book identifiers when
51 <parameter>use.id.as.filename</parameter> is non zero, and when an identifier
52 exists. If one of the two conditions are not met, the filename pattern is
53 "<filename>book<replaceable>&lt;position in set&gt;</replaceable></filename>".
54 </para>
55
56 <para>Example: given the following set:</para>
57
58 <para><programlisting language="XML">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
59
60 &lt;!-- setfile.xml. An example of set. All the books have an @id except one --&gt;
61
62 &lt;!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
63 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"&gt;
64 &lt;set lang="en" id="a_set" xmlns:xi="http://www.w3.org/2001/XInclude"&gt;
65 &lt;title&gt;Set Title&lt;/title&gt;
66 &lt;set&gt;
67 &lt;xi:include href="book1.xml"/&gt; &lt;!-- book #1 --&gt;
68 &lt;xi:include href="book2.xml"/&gt; &lt;!-- book #2 --&gt;
69 &lt;xi:include href="book3.xml"/&gt; &lt;!-- book #3 --&gt;
70 &lt;/set&gt;
71 &lt;set&gt;
72 &lt;set&gt;
73 &lt;xi:include href="bookA.xml"/&gt; &lt;!-- book #4 --&gt;
74 &lt;xi:include href="bookB.xml"/&gt; &lt;!-- book #5 --&gt;
75 &lt;/set&gt;
76 &lt;set&gt;
77 &lt;xi:include href="bookC.xml"/&gt; &lt;!-- book #6 --&gt;
78 &lt;/set&gt;
79 &lt;/set&gt;
80 &lt;set&gt;
81 &lt;xi:include href="book4.xml"/&gt; &lt;!-- book #7 --&gt;
82 &lt;!-- The following book, at 8th position in the sets, has no @id --&gt;
83 &lt;xi:include href="book5.xml"/&gt; &lt;!-- book #8 --&gt;
84 &lt;xi:include href="book6.xml"/&gt; &lt;!-- book #9 --&gt;
85 &lt;/set&gt;
86 &lt;/set&gt;</programlisting>Publishing this set produces 9 books in the
87 <filename>pdfdir</filename> directory:</para>
88
89 <programlisting>$ dblatex -O./pdfdir -Pset.book.num=all -Puse.id.as.filename=1 setfile.xml
90 Build the book set list...
91 Build the listings...
92 XSLT stylesheets DocBook - LaTeX 2e (0.2.11)
93 ===================================================
94 Output all the books from the set
95 Writing sec1-mybook.rtex for book(sec1-mybook)
96 Writing sec2-mybook.rtex for book(sec2-mybook)
97 Writing sec3-mybook.rtex for book(sec3-mybook)
98 Writing secA-mybook.rtex for book(secA-mybook)
99 Writing book8.rtex for book
100 Writing secC-mybook.rtex for book(secC-mybook)
101 Writing sec4-mybook.rtex for book(sec4-mybook)
102 Writing sec5-mybook.rtex for book(sec5-mybook)
103 Writing sec6-mybook.rtex for book(sec6-mybook)
104 ...
105 Files successfully built in '/path/to/set/pdfdir':
106 sec1-mybook.pdf
107 sec2-mybook.pdf
108 sec3-mybook.pdf
109 sec4-mybook.pdf
110 book8.pdf
111 sec6-mybook.pdf
112 secA-mybook.pdf
113 secB-mybook.pdf
114 secC-mybook.pdf</programlisting>
115
116 <para></para>
117 </section>
118 </section>