sTeX: An Infrastructure for Semantic Preloading of LaTeX Documents
This repository contains the sTeX package collection, a version of TeX/LaTeX that allows to markup TeX/LaTeX documents semantically without leaving the document format.
pdflatex over sTeX-annotated documents formats them into normal-looking PDF. But sTeX also comes with a conversion pipeline into semantically annotated HTML5, which can host semantic added-value services that make the documents active (i.e. interactive and user-adaptive) and essentially turning LaTeX into a document format for (mathematical) knowledge management (MKM).
Copyright & License
Copyright (c) 2022 Michael Kohlhase The package is distributed under the terms of the LaTeX Project Public License (LPPL)
sTeX Corpus & Best Practices
sTeX comes with a large corpus of pre-annotated materials that act as evaluation grounds and regression tests for the sTeX functionality and best practices that are publicly available.
- HelloWorld a collection of simple hello world examples the show off the best practices of sTeX annotation.
- SMGLoM, the Semantic, Multilingual Glossary of Mathematics (and similar disciplines). SMGloM provides a large set of definitions and well-designed semantic macros for core mathematical (and computation) concepts and objects. This resource greatly facilitates "getting off the ground" in semantic annotation.
- MiKoMH a set of semantically annotated courses in computer science and (symbolic) AI (ca. 5000 pages of slides and notes). Ca. 3000 problem/solutions exist are only available upon request.
- sTeX3 Labs a set of experimental re-formalizations of (mostly) SMGLoM material to fully take advantage of the sTeX3 functionality and the rusTeX/MMT pipeline and knowledge managemen facilities.
All of these are hosted on MathHub, an experimental portal for the management of active mathematical documents and flexiformal mathematics. The organization of the material into "mathematical archives" (GIT repositories with a particular standardized structure on a GitLab repository management server greatly enhances modularization and the provision of added value services.
The GIT version can just be cloned in a directory
<sTeXDIR> of your choosing.
cd <sTeXDIR> git clone https://github.com/slatex/sTeX.git
Then update your
TEXINPUTS environment variable, e.g. by placing the following line in your
Similarly, set your
MATHHUB environment variable to where you intend to keep your sTeX archives. For details, see the documentation linked above. For a LaTeX IDE, update the directory path where
pdflatex looks for paths.
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).
param_size = 20000 % simultaneous macro parameters, also applies to MP nest_size = 1000 % simultaneous semantic levels (e.g., groups) stack_size = 10000 % simultaneous input sources main_memory = 12000000
Note that you will probably need
sudo to do this. After that, you have to run the command
sudo fmtutil-sys --all
The sTeX distribution contains the following directories (conformant with the CTAN organization
source: The Documented LaTeX sources (dtx files)
tex: packages and classes of the sTeX distribution
lib: bibTeX bibliography
doc: the sTeX manual and further documentation
Download the contents of this package in one zip archive (8.3M).
sTeX – An infrastructure for semantic preloading of LaTeX documents
The sTeX package collection is a version of TeX/LaTeX that allows to markup TeX/LaTeX documents semantically without leaving the document format, essentially turning it into a document format for mathematical knowledge management (MKM).
|The LaTeX Project Public License
|2009–2022 Michael Kohlhase
|TeX Live as stex
MiKTeX as stex