Document Structure » Historie » Version 4
Patrick Schulz, 19.09.2024 11:47
1 | 1 | Martin Kraetke | h1. Document Structure |
---|---|---|---|
2 | |||
3 | h2. Minimal TeX Document |
||
4 | |||
5 | A minimal tex document that uses the transpect-tex Framework has the following structure: |
||
6 | |||
7 | <pre><code class="text"> |
||
8 | 4 | Patrick Schulz | \documentclass[<options>]{cocotex} (1) |
9 | \usepackage[<options>]{<verlagsstyle>} (2) |
||
10 | 3 | Patrick Schulz | ... (3) |
11 | \begin{document} (4) |
||
12 | … (5) |
||
13 | \end{document} (6) |
||
14 | 1 | Martin Kraetke | </code></pre> |
15 | |||
16 | # Document class |
||
17 | 3 | Patrick Schulz | ** Document class name is *always* @cocotex@. |
18 | ** Optional argument (stuff between @[@ and @]@, komma-separated) can be used to pass LaTeX-options such as @a4paper@, @openright@, @twoside@, etc. |
||
19 | ** the document type is given with the @pubtype@ Option and one of the following values: |
||
20 | *** @mono@ for monographs (i.e., books that are in its entirety written by the same Author(s)) |
||
21 | *** @collection@ for books with contributions/chapters from various authors |
||
22 | *** @article@ for journal articles |
||
23 | *** @journal@ for entire journals, i.e., collection of articles |
||
24 | ** Languages: |
||
25 | *** @main=<name>@ is the main language of the document, this controlls the language of the document-wide meta data, the imprint, headings of fixed document parts (ToC, Index), etc. |
||
26 | *** other languages that are used throughout the document need to be listed as simple komma-separated entries, e.g., @ngerman@ (German with new spelling rules), @french@, etc. |
||
27 | *** Langauges that use their own script systems need to be listed in @usescript={…}@, e.g., @usescript={hebrew,greek,chinese,syriac}@ |
||
28 | ** If endnotes should be used instead of footnotes, use @endnotes@ |
||
29 | *** if the endnotes Chapters (or sections) should *not* appear in the ToC, use @ennotoc@ |
||
30 | *** If the endnotes should repeat the chapter headings, use @endnoteswithchapters@ |
||
31 | *** If footnote and/or endnote counters should be reset with each chapter, set @resetnotesperchapter@ |
||
32 | ** Accessibility Features: |
||
33 | *** If PDFs should conform to the PDF/1.7 and PDF/UA-1 standards, set @a11y@ (that is: @a-eleven-y@) |
||
34 | *** if the pdf should conform to PDF 2.0 and PDF/UA-2, then use @a11y20@. |
||
35 | *** also set the language code for the main document in ISO-639 with the @lang-id@ key (@lang-id=deu@ für German, @lang-id=eng@ for English, etc.) |
||
36 | 1 | Martin Kraetke | # Include the customer-specific style with the respective options |
37 | 3 | Patrick Schulz | # the area between @\documentclass[…]{…}@ and @\begin{document}@ is the TeX preamble. Additional meta information (e.g. color definitions, parameters for the front cover, the @tpMeta@-Environment, ...) may inserted here |
38 | 1 | Martin Kraetke | # @\begin{document}@ marks the start of the document |
39 | # Content |
||
40 | 3 | Patrick Schulz | # anything after @\end{document}@ is ignored. |
41 | 1 | Martin Kraetke | |
42 | h2. Compiling |
||
43 | |||
44 | The minimal order of the TeX files is shown below: |
||
45 | <pre><code class="ruby"> |
||
46 | latex <main>.tex ## first run: collect |
||
47 | latex <main>.tex ## second run: read and apply aux, toc, lof, lot |
||
48 | latex <main>.tex ## third run: update page numbers after including toc, lof, etc. |
||
49 | ./index.sh <main> ## script to generate the index |
||
50 | latex <main>.tex ## fourth run: Index-Ausgabe, ggf. Aktualisierung toc für Index-ÜS |
||
51 | latex <main>.tex ## fifth run: update toc |
||
52 | </code></pre> |