https://github.com/transpect/cocotex
luaLaTeX render backend for xerif
https://github.com/transpect/cocotex
latex-package typesetting
Last synced: 11 months ago
JSON representation
luaLaTeX render backend for xerif
- Host: GitHub
- URL: https://github.com/transpect/cocotex
- Owner: transpect
- License: bsd-2-clause
- Created: 2022-05-12T11:07:28.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2025-07-15T10:11:43.000Z (12 months ago)
- Last Synced: 2025-07-15T19:33:40.303Z (12 months ago)
- Topics: latex-package, typesetting
- Language: TeX
- Homepage: https://www.le-tex.de/en/xerif.html
- Size: 27.3 MB
- Stars: 7
- Watchers: 6
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
  
> [!WARNING]
> The end-user documentation (`doc/manual.pdf`) is incomplete and to
> be considered a Work in Progress!
>
> If you feel valiant, read the source code documentation, instead
> (`doc/cocotex.pdf`). We try to keep this one as up-to-date as
> possible.
>
> In the `doc` folder, you also find a
> [Dante2024.pdf](https://github.com/transpect/CoCoTeX/blob/main/doc/Dante2024.pdf),
> which is the slides to a talk the main developer gave at the 2024
> Dante Frühjahrestagung in Weimar in April 2024 (German only).
>
> Please note that the main development currently happens in the ally branch. If you need up-to-date source code (that might lack up-to-date documentation though), please look there.
# CoCoTeX Kernel #
This repository contains the source files (including code
documentation) and the user manual for the CoCoTeX framework.
## What is CoCoTeX? ##
CoCoTeX is a programming framework for (Lua)LaTeX While it is intended
to be used with and has been developed parallel to le-tex's
[xerif](https://github.com/transpect/xerif), it can be used
stand-alone as a LaTeX package.
CoCoTeX is developed to "simplify" common requirements by various
publishers like complex headings, floats with more than one caption,
foreign language support, titlepages, etc. It adopts some principles
from object-oriented programming like inheritance, mixins, and
overloading of functionalities.
## Installation ##
## Installation of Release Versions ##
Simply copy the `cocotex.dtx` and `cocotex.ins` from the
`releases/current` folder to your local project directory and run
latex cocotex.ins
this will unpack the necessary files.
### Co-Dependencies ###
You need the following **additional** items to run certain CoCoTeX modules:
* `coco-scripts.sty` requires
[xerif-fonts](https://subversion.le-tex.de/common/xerif-fonts/). Copy
or sym-link the whole folder as `fonts` inside your project
directory
* `coco-accessibility.sty` requires the lua files from the `ltpdfa`
package (pre-alpha version inside the `externals/ltpdfa/`
folder). Copy or sym-link the contents of the folder to your project
directory, which should now contain both a `suppl` and `ltpdfa`
folder and a `env.sh` file. Source the `env.sh` to tell LuaLaTeX
where the `.lua` files are located.
* **Recommended:** Copy or symlink the `htmltabs.sty` (working
pre-alpha version inside the `externals/htmltabs` folder) to your
project directory, if you want to use tables with a html-like
syntax.
If you use all externals, your project directory should look something
like this:
```
├─ .tex
├─ cocotex.cls
├─ coco-kernel.sty
├─ coco-common.sty
├─ ... (further CoCoTeX modules)
├─ env.sh
├─ htmltabs.sty
├─ fonts
├─ Noto
└─ Junicode
├─ ltpdfa
├─ ltpdfa.sty
├─ ltpdfa.lua
└─ ...
└─ suppl
├─ cmyk.icc
└─ ...
```
## Installation from Sources ##
If you want to use the included `build.sh` bash script (recommended),
you need Ruby, at least version 3.1!
Clone the git Repository:
git clone https://github.com/transpect/CoCoTeX.git
copy the `source.sh.example` as `source.sh` and adjust the environment
variables to your liking. Then, run
./build.sh
This script creates a temporary folder `temp`, merges the `.dtx` files
in the `src` directory into a single `temp/cocotex.dtx`, and runs the
installation script. The resulting .sty, .cls, and lua files are
stored inside the `build` folder.
Run
./build.sh doc
to create the User Manual and the source code documentation, or
./build.sh doc man
./build.sh doc source
to create either separately.
## Usage ##
Once the cls, sty and lua files have been unpacked and stored in a
location usable by LaTeX, the framework's modules can be used with
\usepackage{coco-}
If you want to utilize all (non-experimental) modules, you can use the included document class:
\documentclass[pubtype=]{cocotex}
to set the underlying document class. Valid values `` for are:
* `article` for single articles (this uses LaTeX's standard `article` class).
* `mono` for books where all parts are written by the same author(s),
* `collection`, for books where parts are written by different authors, or
* `journal`, for a collection of articles.
The latter three types use LaTeX's standard `book` document class.
For further information, read the [End-User
manual](https://github.com/transpect/CoCoTeX/blob/main/doc/manual.pdf)
or look into the manual's source files (inside the
[lib/manual/](https://github.com/transpect/CoCoTeX/tree/main/lib/manual)
folder) and its main style file
([cocotex-doc.sty](https://github.com/transpect/CoCoTeX/blob/main/lib/manual/cocotex-doc.sty)).
# LICENSE #
BSD 2-Clause License
Copyright (c) 2022–2024, le-tex.de
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.