%xsldoc.ent; ]> $Id: book-article.mod.xsl,v 1.41 2004/01/31 11:05:54 j-devenish Exp $ &ramon; &james; 2000200120022003 Ramon Casellas &rev_2003_05; Books and Articles <filename>book-article.mod.xsl</filename> Most &DocBook; documents are either articles or books, so this XSL template file is a classical entry point when processing &DocBook; documents. Process a &DocBook; book document Entry point for books. &test_book; &test_defguide; &mapping; \title{ } \author{ } \setcounter{tocdepth}{} \setcounter{secnumdepth}{} \InputIfFileExists{ }{\typeout{WARNING: Using cover page }} Process title elements Typesets a bold title. \bfseries Process subtitle elements Typesets a bold subtitle, spaced 12pt from the preceding title. \\[12pt]\normalsize Process title elements Typesets a bold title. \bfseries Process subtitle elements Typesets a bold subtitle, spaced 12pt from the preceding title. \\[12pt]\normalsize Process bookinfo elements Processes a book's bookinfo (will be invoked after the title page has been typeset). Only the revhistory, abstract, keywordset, copyright and legalnotice are processed. Users may override this in their customisation layer. Process bookinfo's copyright elements Formats a block-style copyright. &no_var; Calls . \begin{center} \end{center} Process a book's article elements Entry point for a book's articles. For double-sided books, each article will commence on a right-hand page. This template will call upon the following variables or templates in this order: generate.latex.pagestyle, title (or articleinfo or artheader), $latex.book.article.title.style, date (from articleinfo or artheader), authorgroup or author (or articleinfo or artheader), $latex.book.article.header.style, articleinfo or artheader in the XSLT article.within.book mode, content-templates. \makeatletter\if@openright\cleardoublepage\else\clearpage\fi \makeatother \begin{center}{ { }}\par { }\par { { }}\par \end{center} Process a &DocBook; article document Entry point for articles. This template will call upon the following variables or templates in this order: generate.latex.article.preamble, $toc.section.depth, $section.depth, title (or articleinfo or artheader), $latex.article.title.style, date (from articleinfo or artheader), authorgroup or author (or articleinfo or artheader), map.begin, $latex.maketitle, articleinfo or artheader, content-templates, map.end. &test_article; &test_minimal; &mapping;: this template will use the article mappings. \setcounter{tocdepth}{} \setcounter{secnumdepth}{} \title{ { }} \date{ } \author{ } Process date in articleinfo elements Applies templates. &no_var; Process articleinfo in article elements Applies templates for legalnotice and abstract. &no_var; Process articleinfo in article elements Applies templates for abstract and legalnotice. &no_var; Process legalnotice elements Typesets legal notices. &no_var; This should be done via the mapping system! For two-column documents, the title is formatted in italics and followed immediately by the notice's content. For single-column documents, the title is formatted in bold, centred on a line of its own, and the body of the legal notice is formatted as an indented small-font quotation. The blockinfo is not processed (only the title is used). &test_book; &test_entities; &mapping; {\if@twocolumn \noindent\small\textit{ }\/\bfseries---$\!$% \else \noindent\begin{center}\small\bfseries \end{center}\begin{quote}\small \fi \vspace{0.6em}\par\if@twocolumn\else\end{quote}\fi} Choose a title for legalnotices Typesets a title. &no_var; Will look for blockinfo/title, legalnotice/title or a gentext title (the first of the three will be used). See &mapping; legalnotice Generate and typeset a toc Produce a chapter-level table of contents in &LaTeX;. &no_var; This template ignores its contents and instead invokes the &LaTeX; tableofcontents command. You will need to run your typesetter at least twice, and possibly three times, to have the table of contents generated normally. The headers, footers, and chapter title will be generated by &LaTeX;. &test_book; &test_lot; \makeatletter \def\dbtolatex@contentsid{ } \let\dbtolatex@@contentsname\contentsname \newif\ifdocbooktolatexcontentsname\docbooktolatexcontentsnametrue \def\dbtolatex@contentslabel{% \label{\dbtolatex@contentsid}\hypertarget{\dbtolatex@contentsid}{\dbtolatex@@contentsname}% \global\docbooktolatexcontentsnamefalse} \def\contentsname{\ifdocbooktolatexcontentsname\dbtolatex@contentslabel\else\dbtolatex@@contentsname\fi} \tableofcontents \let\contentsname\dbtolatex@@contentsname \Hy@writebookmark{}{\dbtolatex@@contentsname}{\dbtolatex@contentsid}{0}{toc}% \makeatother \tableofcontents Generate and typeset a toc Produce a chapter-level table of contents in &LaTeX;. &no_var; prefer &LaTeX; can provide listoffigures and listoftables by default. This parameter allows you to select which should be used. Recognised values are figures and tables. If the value is empty or not recognised, both lists will be output. By default, the value of the current node's non-empty condition, role or label attribute will be used. This template ignores its contents and instead invokes the &LaTeX; listoffigures or listoftables commands. You will need to run your typesetter at least twice, and possibly three times, to have the table of contents generated normally. The headers, footers, and chapter title will be generated by &LaTeX;. &test_lot1; &test_lot2; &test_lot3; \listoffigures \listoftables \listoffigures \listoftables Choose the preferred page style for document body If no page style is preferred by the user, the defaults will be empty for articles, plain for books, or fancy (if the &LaTeX; fancyhdr package is permitted). The &LaTeX; pagestyle command is used to effect the page style. \pagestyle{ fancy plain empty }