Projekt

Allgemein

Profil

Document Structure » Historie » Revision 10

Revision 9 (Patrick Schulz, 19.12.2024 14:33) → Revision 10/11 (Patrick Schulz, 19.03.2025 16:05)

h1. Document Structure 

 

 h2. Minimal TeX Document 

 A minimal tex document that uses the CoCoTeX Framework has the following structure:  

 <pre><code class="text"> 
 \documentclass[<options>]{cocotex}                             (1) 
 \usepackage[<options>]{<publisher style>}                      (2) 
 ...                                                            (3) 
 \begin{document}                                               (4) 
 …                                                              (5) 
 \end{document}                                                 (6) 
 </code></pre> 

 # Document class 
 ** Document class name is *always* @cocotex@.  
 ** 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. 
 # Include the customer-specific style with the respective options 
 # 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 
 # @\begin{document}@ marks the start of the document 
 # Content 
 # anything after @\end{document}@ is ignored. 


 h2. Class options 

 h3. Publication Type 

 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: 
 * @mono@ for monographs (i.e., books that are in its entirety written by the same Author(s))  
 * @collection@ for books with contributions/chapters from various authors 
 * @article@ for journal articles 
 * @journal@ for entire journals, i.e., collection of articles 

 h3. Languages 

 The document's main language is set with the @main=<name>@ option.  

 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. 

 Langauges that use their own script systems need to be listed in @usescript={…}@, e.g.,    @usescript={hebrew,greek,chinese,syriac}@ 

 (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.) 

 

 h3. Endnote and Footnote switches 

 If *endnotes* should be used instead of footnotes, use the @endnotes@ Option. 

 If the name of the endnote section should *not* appear in the ToC, use @ennotoc@ 

 If the chapter (or section) titles should be repeated as sections (subsections) inside the endnote chapter (section), use @endnoteswithchapters@ 

 If footnote and/or endnote counters should be reset with each chapter, set @resetnotesperchapter@ 

 

 h3. PDF Standard and Versions 

 The PDF Standard and PDF Version are set with the @pdf-standard=Z@ option, where @Z@ can be one of: 
 * @A-1B@, @ A-1A@, @ A-2B@, @ A-2A@, @ A-2U@, @ A-3B@, @ A-3A@, @ A-3U@, @ A-4@, 
 * @X-3@, @ X-4@, @ X-4P@, @ X-5G@, @ X-5N@, @ X-5PG@, @ X-6@, @ X-6N@, @ X-6P@,  
 * @UA-1@, or @UA-2@. 

 Those values are case insensitive, so @A-2a@ is the same as @a-2A@, @A-2A@, or @a-2a@. 

 The following table lists the PDF Version that is generated from each of the values 

 |_.PDF standard|_.PDF version| 
 |UA-1        | 1.7| 
 |UA-2        | 2.0| 
 |A-1.*       | 1.4| 
 |A-[23].*    | 1.7| 
 |A-4.*       | 2.0| 
 |X-[123].* | 1.4| 
 |X-[45].*    | 1.6| 
 |X-6.*       | 2.0| 


 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, but they do nothing. 

 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. 

 h3. Class Options per Makefile 

 Class options can also be set directly via the Makefile's LaTeX call: 
 <pre><code class="make">runtex: 
         $(TEX_BINARY) "\def\ccClassOptions{<options>}\input <filename>"</code></pre> 
 mit 
 * `<options>` is a comma separated `key=value` list (exactly like in the optional argument of `\documentclass[<opions>]{cocotex}`) 
 * `<filename>` is the name of the TeX file (with `.tex` suffix!) 

 Options given this way via the command line override those in the .tex-file if they share the same key.  

 *Warning:* value-less flags in the options list cannot be overridden this way! 



 

 h2. Compiling 

 The minimal order of the TeX files is shown below: 
 <pre><code class="ruby"> 
 lualatex latex <main>.tex         ## first run: collect 
 lualatex latex <main>.tex         ## second run: read and apply aux, toc, lof, lot 
 lualatex latex <main>.tex         ## third run: update page numbers after including toc, lof, etc. 
 ./index.sh <main>        ## script to generate the index  
 lualatex latex <main>.tex         ## fourth run: print index, update .aux, .toc, etc. 
 lualatex latex <main>.tex         ## fifth run: print updated toc  
 </code></pre>