Document Structure » Historie » Version 7
Patrick Schulz, 19.12.2024 14:31
| 1 | 1 | Martin Kraetke | h1. Document Structure |
|---|---|---|---|
| 2 | |||
| 3 | h2. Minimal TeX Document |
||
| 4 | |||
| 5 | 5 | Patrick Schulz | A minimal tex document that uses the CoCoTeX Framework has the following structure: |
| 6 | 1 | Martin Kraetke | |
| 7 | <pre><code class="text"> |
||
| 8 | 4 | Patrick Schulz | \documentclass[<options>]{cocotex} (1) |
| 9 | 5 | Patrick Schulz | \usepackage[<options>]{<publisher style>} (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 | 6 | Patrick Schulz | ** Optional argument (stuff between @[@ and @]@, komma-separated) can be used to pass LaTeX-options such as @a4paper@, @openright@, @twoside@, etc. The available class options are exlained below. |
| 19 | 1 | Martin Kraetke | # Include the customer-specific style with the respective options |
| 20 | # 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 |
||
| 21 | # @\begin{document}@ marks the start of the document |
||
| 22 | # Content |
||
| 23 | # anything after @\end{document}@ is ignored. |
||
| 24 | |||
| 25 | 6 | Patrick Schulz | |
| 26 | h2. Class options |
||
| 27 | |||
| 28 | h3. Publication Type |
||
| 29 | |||
| 30 | The "publication type" is what the document class is in Standard LaTeX. It is set with the @pubtype@ option and allows one of the following values: |
||
| 31 | * @mono@ for monographs (i.e., books that are in its entirety written by the same Author(s)) |
||
| 32 | * @collection@ for books with contributions/chapters from various authors |
||
| 33 | * @article@ for journal articles |
||
| 34 | * @journal@ for entire journals, i.e., collection of articles |
||
| 35 | |||
| 36 | h3. Languages |
||
| 37 | |||
| 38 | The document's main language is set with the @main=<name>@ option. |
||
| 39 | |||
| 40 | 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. |
||
| 41 | |||
| 42 | Langauges that use their own script systems need to be listed in @usescript={…}@, e.g., @usescript={hebrew,greek,chinese,syriac}@ |
||
| 43 | |||
| 44 | (Note: in previous versions, there was an additional @lang-id=@ option which set the document language for accessibility purposes. This is now determined automatically from the @main@ option.) |
||
| 45 | |||
| 46 | h3. Endnote and Footnote switches |
||
| 47 | |||
| 48 | If *endnotes* should be used instead of footnotes, use the @endnotes@ Option. |
||
| 49 | |||
| 50 | 7 | Patrick Schulz | If the name of the endnote section should *not* appear in the ToC, use @ennotoc@ |
| 51 | 6 | Patrick Schulz | |
| 52 | 7 | Patrick Schulz | If the chapter (or section) titles should be repeated as sections (subsections) inside the endnote chapter (section), use @endnoteswithchapters@ |
| 53 | 6 | Patrick Schulz | |
| 54 | If footnote and/or endnote counters should be reset with each chapter, set @resetnotesperchapter@ |
||
| 55 | |||
| 56 | h3. PDF Standard and Versions |
||
| 57 | |||
| 58 | The PDF Standard and PDF Version are set with the @pdf-standard=Z@ option, where @Z@ can be one of: |
||
| 59 | * @A-1B@, @ A-1A@, @ A-2B@, @ A-2A@, @ A-2U@, @ A-3B@, @ A-3A@, @ A-3U@, @ A-4@, |
||
| 60 | * @X-3@, @ X-4@, @ X-4P@, @ X-5G@, @ X-5N@, @ X-5PG@, @ X-6@, @ X-6N@, @ X-6P@, |
||
| 61 | * @UA-1@, or @UA-2@. |
||
| 62 | |||
| 63 | Those values are case insensitive, so @A-2a@ is the same as @a-2A@, @A-2A@, or @a-2a@. |
||
| 64 | |||
| 65 | The following table lists the PDF Version that is generated from each of the values |
||
| 66 | |||
| 67 | 1 | Martin Kraetke | |_.PDF standard|_.PDF version| |
| 68 | |UA-1 | 1.7| |
||
| 69 | |UA-2 | 2.0| |
||
| 70 | 5 | Patrick Schulz | |A-1.* | 1.4| |
| 71 | |A-[23].* | 1.7| |
||
| 72 | |A-4.* | 2.0| |
||
| 73 | |X-[123].* | 1.4| |
||
| 74 | |X-[45].* | 1.6| |
||
| 75 | |X-6.* | 2.0| |
||
| 76 | |||
| 77 | 6 | Patrick Schulz | |
| 78 | The values @UA-1@ and @UA-2@ enable the accessibility features. All other standards disable accessibility macros functionally, i.e. they can be used in the tex file, bt they do nothing. |
||
| 79 | |||
| 80 | The @X@-Standards cause @hyperref@ macros (@\href@, @\url@, @\hyperlink@, etc.) to be functionally disabled, i.e., they can be used in the tex file but they cause no hyperlinks in the resulting PDF file. |
||
| 81 | 1 | Martin Kraetke | |
| 82 | h2. Compiling |
||
| 83 | |||
| 84 | The minimal order of the TeX files is shown below: |
||
| 85 | <pre><code class="ruby"> |
||
| 86 | latex <main>.tex ## first run: collect |
||
| 87 | latex <main>.tex ## second run: read and apply aux, toc, lof, lot |
||
| 88 | latex <main>.tex ## third run: update page numbers after including toc, lof, etc. |
||
| 89 | ./index.sh <main> ## script to generate the index |
||
| 90 | latex <main>.tex ## fourth run: Index-Ausgabe, ggf. Aktualisierung toc für Index-ÜS |
||
| 91 | latex <main>.tex ## fifth run: update toc |
||
| 92 | </code></pre> |