Blame docs/publish.xml

Packit 0f19cf
Packit 0f19cf
Packit 0f19cf
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
Packit 0f19cf
<section id="sec-pub-output">
Packit 0f19cf
<title>Publishing Outputs</title>
Packit 0f19cf
Packit 0f19cf
<section>
Packit 0f19cf
<title>Publishing a single document</title>
Packit 0f19cf
Packit 0f19cf
<para>The default publishing document units are: <sgmltag>article</sgmltag>
Packit 0f19cf
and <sgmltag>book</sgmltag>. The output file name is optionnaly specified by
Packit 0f19cf
the <option>-o</option> option.</para>
Packit 0f19cf
Packit 0f19cf
<para>You can also publish an article or book subset, i.e. you can run dblatex
Packit 0f19cf
on an XML input whose root element is a <sgmltag>chapter</sgmltag>, a
Packit 0f19cf
<sgmltag>section</sgmltag>, or anything else. In this case, dblatex wraps the
Packit 0f19cf
root element in an <sgmltag>article</sgmltag> or in a <sgmltag>book</sgmltag>
Packit 0f19cf
and print out a warning. The output subset does not contain any front matter
Packit 0f19cf
data found in an article or in a book (cover page, revision history, etc.),
Packit 0f19cf
but it can contain some back matter materials like an index.</para>
Packit 0f19cf
Packit 0f19cf
<programlisting>$ dblatex subset.xml 
Packit 0f19cf
Build the book set list...
Packit 0f19cf
Build the listings...
Packit 0f19cf
XSLT stylesheets DocBook - LaTeX 2e (0.2.11)
Packit 0f19cf
===================================================
Packit 0f19cf
Warning: the root element is not an article nor a book
Packit 0f19cf
Warning: element section(sec-subset) wrapped with article
Packit 0f19cf
Build subset.pdf
Packit 0f19cf
...
Packit 0f19cf
   </programlisting>
Packit 0f19cf
</section>
Packit 0f19cf
Packit 0f19cf
<section id="sec-book-set">
Packit 0f19cf
<title>Publishing a Set of Books</title>
Packit 0f19cf
Packit 0f19cf
<para>When the document root element is a <sgmltag>set</sgmltag>, and when
Packit 0f19cf
<parameter>set.book.num</parameter> is set to '<literal>all</literal>',
Packit 0f19cf
dblatex ouputs a file per book contained in the set (and in the nested sets).
Packit 0f19cf
In this case the <option>-o</option> option is ignored, and only the
Packit 0f19cf
<option>-O</option> option is taken into account to specify the output
Packit 0f19cf
directory that will contain the generated files.</para>
Packit 0f19cf
Packit 0f19cf
<para>Instead of building all the books, the user can publish a single book
Packit 0f19cf
from the set, by setting the <parameter>set.book.num</parameter> parameter to
Packit 0f19cf
the absolute position of the book in the set(s). By default
Packit 0f19cf
<parameter>set.book.num</parameter> is set to 1 to publish only the first
Packit 0f19cf
book.</para>
Packit 0f19cf
Packit 0f19cf
<para>The output file names are the book identifiers when
Packit 0f19cf
<parameter>use.id.as.filename</parameter> is non zero, and when an identifier
Packit 0f19cf
exists. If one of the two conditions are not met, the filename pattern is
Packit 0f19cf
"<filename>book<replaceable><position in set></replaceable></filename>".
Packit 0f19cf
</para>
Packit 0f19cf
Packit 0f19cf
<para>Example: given the following set:</para>
Packit 0f19cf
Packit 0f19cf
<para><programlisting language="XML"><?xml version="1.0" encoding="UTF-8"?>
Packit 0f19cf
Packit 0f19cf
<!-- setfile.xml. An example of set. All the books have an @id except one -->
Packit 0f19cf
Packit 0f19cf
<!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
Packit 0f19cf
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
Packit 0f19cf
<set lang="en" id="a_set" xmlns:xi="http://www.w3.org/2001/XInclude">
Packit 0f19cf
<title>Set Title</title>
Packit 0f19cf
  <set>
Packit 0f19cf
    <xi:include href="book1.xml"/>   <!-- book #1 -->
Packit 0f19cf
    <xi:include href="book2.xml"/>   <!-- book #2 -->
Packit 0f19cf
    <xi:include href="book3.xml"/>   <!-- book #3 -->
Packit 0f19cf
  </set>
Packit 0f19cf
  <set>
Packit 0f19cf
    <set>
Packit 0f19cf
      <xi:include href="bookA.xml"/> <!-- book #4 -->
Packit 0f19cf
      <xi:include href="bookB.xml"/> <!-- book #5 -->
Packit 0f19cf
    </set>
Packit 0f19cf
    <set>
Packit 0f19cf
      <xi:include href="bookC.xml"/> <!-- book #6 -->
Packit 0f19cf
    </set>
Packit 0f19cf
  </set>
Packit 0f19cf
  <set>
Packit 0f19cf
    <xi:include href="book4.xml"/>   <!-- book #7 -->
Packit 0f19cf
    <!-- The following book, at 8th position in the sets, has no @id -->
Packit 0f19cf
    <xi:include href="book5.xml"/>   <!-- book #8 -->
Packit 0f19cf
    <xi:include href="book6.xml"/>   <!-- book #9 -->
Packit 0f19cf
  </set>
Packit 0f19cf
</set></programlisting>Publishing this set produces 9 books in the
Packit 0f19cf
<filename>pdfdir</filename> directory:</para>
Packit 0f19cf
Packit 0f19cf
<programlisting>$ dblatex -O./pdfdir -Pset.book.num=all -Puse.id.as.filename=1 setfile.xml
Packit 0f19cf
Build the book set list...
Packit 0f19cf
Build the listings...
Packit 0f19cf
XSLT stylesheets DocBook - LaTeX 2e (0.2.11)
Packit 0f19cf
===================================================
Packit 0f19cf
Output all the books from the set
Packit 0f19cf
Writing sec1-mybook.rtex for book(sec1-mybook)
Packit 0f19cf
Writing sec2-mybook.rtex for book(sec2-mybook)
Packit 0f19cf
Writing sec3-mybook.rtex for book(sec3-mybook)
Packit 0f19cf
Writing secA-mybook.rtex for book(secA-mybook)
Packit 0f19cf
Writing book8.rtex for book
Packit 0f19cf
Writing secC-mybook.rtex for book(secC-mybook)
Packit 0f19cf
Writing sec4-mybook.rtex for book(sec4-mybook)
Packit 0f19cf
Writing sec5-mybook.rtex for book(sec5-mybook)
Packit 0f19cf
Writing sec6-mybook.rtex for book(sec6-mybook)
Packit 0f19cf
...
Packit 0f19cf
Files successfully built in '/path/to/set/pdfdir':
Packit 0f19cf
sec1-mybook.pdf
Packit 0f19cf
sec2-mybook.pdf
Packit 0f19cf
sec3-mybook.pdf
Packit 0f19cf
sec4-mybook.pdf
Packit 0f19cf
book8.pdf
Packit 0f19cf
sec6-mybook.pdf
Packit 0f19cf
secA-mybook.pdf
Packit 0f19cf
secB-mybook.pdf
Packit 0f19cf
secC-mybook.pdf</programlisting>
Packit 0f19cf
Packit 0f19cf
<para></para>
Packit 0f19cf
</section>
Packit 0f19cf
</section>