| 1 |
sTeX: An Infrastructure for Semantic Preloading of LaTeX Documents |
| 2 |
==== |
| 3 |
 |
| 4 |
|
| 5 |
This repository contains the sTeX package collection, a version of TeX/LaTeX that allows |
| 6 |
to markup TeX/LaTeX documents semantically without leaving the document format. |
| 7 |
|
| 8 |
Running `pdflatex` over sTeX-annotated documents formats them into normal-looking PDF. But |
| 9 |
sTeX also comes with a [conversion pipeline](https://github.com/slatex/RusTeX) into |
| 10 |
semantically annotated HTML5, which can host semantic added-value services that make the |
| 11 |
documents active (i.e. interactive and user-adaptive) and essentially turning LaTeX into a |
| 12 |
document format for (mathematical) knowledge management (MKM). |
| 13 |
|
| 14 |
## Copyright & License |
| 15 |
|
| 16 |
Copyright (c) 2022 Michael Kohlhase |
| 17 |
The package is distributed under the terms of the LaTeX Project Public License (LPPL) |
| 18 |
|
| 19 |
## Maintainers |
| 20 |
[Michael Kohlhase](https://kwarc.info/kohlhase), [Dennis Müller](https://kwarc.info/people/dmueller), FAU Erlangen-Nürnberg. |
| 21 |
|
| 22 |
## Documentation |
| 23 |
The [sTeX manual ](https://github.com/slatex/sTeX/blob/main/doc/stex-manual.pdf) gives a |
| 24 |
general introduction and motivation. The |
| 25 |
[sTeX package documentation](https://github.com/slatex/sTeX/blob/main/doc/stex-doc.pdf) |
| 26 |
gives the details of the implementation. A complete list of sTeX-related publications can |
| 27 |
be found [here](https://kwarc.github.io/bibs/sTeX/). |
| 28 |
|
| 29 |
## sTeX Corpus & Best Practices |
| 30 |
|
| 31 |
sTeX comes with a large corpus of pre-annotated materials that act as evaluation grounds |
| 32 |
and regression tests for the sTeX functionality and best practices that are publicly |
| 33 |
available. |
| 34 |
* [HelloWorld](https://gl.mathhub.info/HelloWorld) a collection of simple hello world |
| 35 |
examples the show off the best practices of sTeX annotation. |
| 36 |
* [SMGLoM](https://gl.mathhub.info/smglom), the Semantic, Multilingual Glossary of |
| 37 |
Mathematics (and similar disciplines). SMGloM provides a large set of definitions and |
| 38 |
well-designed semantic macros for core mathematical (and computation) concepts and |
| 39 |
objects. This resource greatly facilitates "getting off the ground" in semantic |
| 40 |
annotation. |
| 41 |
* [MiKoMH](https://gl.mathhub.info/MiKoMH) a set of semantically annotated courses in |
| 42 |
computer science and (symbolic) AI (ca. 5000 pages of slides and notes). Ca. 3000 |
| 43 |
problem/solutions exist are only available upon request. |
| 44 |
* [sTeX3 Labs](https://gl.mathhub.info/sTeX) a set of experimental re-formalizations of |
| 45 |
(mostly) [SMGLoM](https://gl.mathhub.info/smglom) material to fully take advantage of |
| 46 |
the sTeX3 functionality and the |
| 47 |
[rusTeX](https://github.com/slatex/RusTeX)/[MMT](https://uniformal.github.io) pipeline |
| 48 |
and knowledge managemen facilities. |
| 49 |
|
| 50 |
All of these are hosted on [MathHub](https://mathhub.info), an experimental portal for the |
| 51 |
management of active mathematical documents and flexiformal mathematics. The organization |
| 52 |
of the material into "mathematical archives" (GIT repositories with a particular |
| 53 |
standardized structure on [a GitLab repository management server](https://gl.mathhub.info) |
| 54 |
greatly enhances modularization and the provision of added value services. |
| 55 |
|
| 56 |
## Setup |
| 57 |
|
| 58 |
The GIT version can just be cloned in a directory `<sTeXDIR>` of your choosing. |
| 59 |
``` |
| 60 |
cd <sTeXDIR> |
| 61 |
git clone https://github.com/slatex/sTeX.git |
| 62 |
``` |
| 63 |
Then update your `TEXINPUTS` environment variable, e.g. by placing the following line in your `.bashrc`: |
| 64 |
``` |
| 65 |
export TEXINPUTS="$(TEXINPUTS):<sTeXDIR>//:" |
| 66 |
``` |
| 67 |
|
| 68 |
Similarly, set your `MATHHUB` environment variable to where you intend to keep your sTeX |
| 69 |
archives. For details, see the documentation linked above. For a LaTeX IDE, update the directory path where `pdflatex` looks for paths. |
| 70 |
|
| 71 |
For larger documents it may (rarely) be necessary to enlarge the internal memory allocation of the TEX/LATEX executables. This can be done by adding the following configurations in `texmf.cnf` (or changing them, if they already exist). |
| 72 |
``` |
| 73 |
param_size = 20000 % simultaneous macro parameters, also applies to MP |
| 74 |
nest_size = 1000 % simultaneous semantic levels (e.g., groups) |
| 75 |
stack_size = 10000 % simultaneous input sources |
| 76 |
main_memory = 12000000 |
| 77 |
``` |
| 78 |
Note that you will probably need `sudo` to do this. After that, you have to run the command |
| 79 |
``` |
| 80 |
sudo fmtutil-sys --all |
| 81 |
``` |
| 82 |
|
| 83 |
## Manifest |
| 84 |
The sTeX distribution contains the following directories (conformant with the CTAN organization |
| 85 |
* `source`: The [Documented LaTeX sources (dtx files)](https://texfaq.org/FAQ-dtx) |
| 86 |
* `tex`: packages and classes of the sTeX distribution |
| 87 |
* `lib`: bibTeX bibliography |
| 88 |
* `doc`: the sTeX manual and further documentation |