diff options
author | Karl Berry <karl@freefriends.org> | 2022-02-27 16:47:55 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-02-27 16:47:55 +0000 |
commit | 4b2d4c25ef033d6f3bd19e2f728691743a450685 (patch) | |
tree | c80d911cec744e2aa13b3fc24e4c3f9dcf6e7d70 /Master/texmf-dist/doc | |
parent | eceb75dcb8e604edf3fbf7542164c8974618a32c (diff) |
stex (26feb22)
git-svn-id: svn://tug.org/texlive/trunk@62230 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
95 files changed, 1674 insertions, 911 deletions
diff --git a/Master/texmf-dist/doc/latex/stex/Makefile b/Master/texmf-dist/doc/latex/stex/Makefile new file mode 100644 index 00000000000..b727f2f94dd --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/Makefile @@ -0,0 +1,26 @@ +STY = stex extensions +SPATH = $(STY:%=../source/%) +DTX = $(shell ls $(SPATH:%=%/*.dtx)) +INS = $(shell ls $(SPATH:%=%/*.ins)) +DOC = stex-doc.pdf stex-manual.pdf +TEXDIR = ../tex +TEXINPUTS = $(TEXDIR)//: + +PDFLATEX = pdflatex -interaction=batchmode + +all: pack doc + +doc: $(DOC) + +package: + +pack: $(DTX) $(INS) + @for i in $(SPATH); do cd $$i; make package; done + +$(DOC): %.pdf: %.tex pack + $(PDFLATEX) $< + biber -q $(basename $<) + $(PDFLATEX) $< + +echo: + @echo $(SPATH) diff --git a/Master/texmf-dist/doc/latex/stex/Makefile.top b/Master/texmf-dist/doc/latex/stex/Makefile.top new file mode 100644 index 00000000000..ff0fca84513 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/Makefile.top @@ -0,0 +1,5 @@ +# recurse into the directories. +MAKEDIRS = source doc + +all package doc: + @for d in $(MAKEDIRS); do (cd $$d && $(MAKE) -$(MAKEFLAGS) $@) || exit $$?; done diff --git a/Master/texmf-dist/doc/latex/stex/README.md b/Master/texmf-dist/doc/latex/stex/README.md new file mode 100644 index 00000000000..13caa1f7342 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/README.md @@ -0,0 +1,54 @@ +sTeX: An Infrastructure for Semantic Preloading of LaTeX Documents +==== +![CI Status](https://github.com/slatex/sTeX/workflows/CI/badge.svg) + +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, +essentially turning it 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) + +## Maintainers +Michael Kohlhase, Dennis Müller, FAU Erlangen-Nürnberg. + +## Documentation +See the +[documentation of the sTeX package](https://github.com/slatex/sTeX/blob/main/doc/stex-doc.pdf) +for details. + +## Setup + +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 `.bashrc`: +``` +export TEXINPUTS="$(TEXINPUTS):<sTeXDIR>//: +``` + +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 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 +``` + +## Manifest +The sTeX distribution contains the following directories (conformant with the CTAN organization +* `source`: The [Documented LaTeX sources (dtx files)](https://texfaq.org/FAQ-dtx) +* `tex`: packages and classes of the sTeX distribution +* `lib`: bibTeX bibliography +* `doc`: the sTeX manual and further documentation diff --git a/Master/texmf-dist/doc/latex/stex/cmath/README b/Master/texmf-dist/doc/latex/stex/cmath/README deleted file mode 100644 index 79e7d919e5b..00000000000 --- a/Master/texmf-dist/doc/latex/stex/cmath/README +++ /dev/null @@ -1,10 +0,0 @@ -cmath.sty: An Infrastructure for Building Inline Content Math in sTeX - -This package supplies an infrastructure that allows to specify to build inline content math -structures as strict content MathML or OpenMath objects. - -Copyright (c) 2011 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ - diff --git a/Master/texmf-dist/doc/latex/stex/cmath/cmath.pdf b/Master/texmf-dist/doc/latex/stex/cmath/cmath.pdf Binary files differdeleted file mode 100644 index d5ceb08c58a..00000000000 --- a/Master/texmf-dist/doc/latex/stex/cmath/cmath.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/dcm/README b/Master/texmf-dist/doc/latex/stex/dcm/README deleted file mode 100644 index 34ce1bcdb96..00000000000 --- a/Master/texmf-dist/doc/latex/stex/dcm/README +++ /dev/null @@ -1,9 +0,0 @@ -dcm.sty: An Infrastructure for marking up Dublin Core Metadata in LaTeX documents - -The dcm packge allows mark up Dublin Core Metadata in LaTeX documents that can be -harvested by automated tools or exported to PDF. - -Copyright (c) 2008 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ diff --git a/Master/texmf-dist/doc/latex/stex/dcm/dcm.pdf b/Master/texmf-dist/doc/latex/stex/dcm/dcm.pdf Binary files differdeleted file mode 100644 index 4b9b3f737cb..00000000000 --- a/Master/texmf-dist/doc/latex/stex/dcm/dcm.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/example/Makefile b/Master/texmf-dist/doc/latex/stex/example/Makefile deleted file mode 100644 index 47c61882663..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -STEXDIR = .. -MAKEDIRS = background paper -CLEANDIRS = $(MAKEDIRS) -include $(STEXDIR)/lib/make/Makefile.subdirs diff --git a/Master/texmf-dist/doc/latex/stex/example/README b/Master/texmf-dist/doc/latex/stex/example/README deleted file mode 100644 index fdba0ac819c..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/README +++ /dev/null @@ -1,16 +0,0 @@ -This directory contains a typical (if minimal) example of a sTeX -collection, and a Makefile-based conversion workflow. It is intended -to test the sTeX distribution and serve as an example for sTeX users -to set up their system. It contains - -README: this file -Makefile: this contains rules to automate the PDF formatting and - XML conversion process. -background: a directory with background modules, this is assumed to - exist before starting work on the paper, in real life this - would probably be a subversion external. -paper: a directory with a paper based on two modules and the - background modules. - -For an explanation of the design of the example see paper/example.pdf or -https://trac.kwarc.info/sTeX/wiki/sTeXCollections diff --git a/Master/texmf-dist/doc/latex/stex/example/background/Makefile b/Master/texmf-dist/doc/latex/stex/example/background/Makefile deleted file mode 100644 index 67b4dc3d185..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/background/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -STEXDIR = ../.. -TARGET = all.tex -BUTFILES = pre.tex post.tex -MODSLIBDIR = . -BIBINPUTS = $(PREFIX)/lib/bib: - -include $(STEXDIR)/lib/make/Makefile.vars -all: pdf mpdf -include $(STEXDIR)/lib/make/Makefile.in diff --git a/Master/texmf-dist/doc/latex/stex/example/background/all.pdf b/Master/texmf-dist/doc/latex/stex/example/background/all.pdf Binary files differdeleted file mode 100644 index debf1356632..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/background/all.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/example/background/all.tex b/Master/texmf-dist/doc/latex/stex/example/background/all.tex deleted file mode 100644 index 27df61d1e61..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/background/all.tex +++ /dev/null @@ -1,12 +0,0 @@ -\documentclass{omdoc} -\usepackage{stex} -\usepackage{hyperref,amssymb} -\defpath{backmods}{../background} -\begin{document} -\input{functions} -\input{reals} -\end{document} -%%% Local Variables: -%%% mode: LaTeX -%%% TeX-master: t -%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/example/background/functions.omdoc b/Master/texmf-dist/doc/latex/stex/example/background/functions.omdoc deleted file mode 100644 index 72adb2e3b2a..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/background/functions.omdoc +++ /dev/null @@ -1,187 +0,0 @@ -<?xml version="1.0"?> -<!--This OMDoc document is generated from an sTeX-encoded one via LaTeXML, you - may want to reconsider editing it.--> -<omdoc xmlns:omdoc="http://omdoc.org/ns" xmlns="http://omdoc.org/ns" xmlns:stex="http://kwarc.info/ns/sTeX" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:om="http://www.openmath.org/OpenMath" xmlns:m="http://www.w3.org/1998/Math/MathML" xml:id="omdoc1" about="#omdoc1" stex:srcref="Literal String \documentc#textrange(from=1;0,to=0;0)"> - <omdoc:omgroup layout="sectioning" xml:id="sec.functions" about="#sec.functions" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=1;0,to=18;13)"> - <omdoc:metadata xml:id="sec.functions.metadata1" about="#sec.functions.metadata1" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=1;0,to=18;13)"> - <dc:title xml:id="sec.functions.metadata1.title1" about="#sec.functions.metadata1.title1" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=1;0,to=18;13)">Functions</dc:title> - </omdoc:metadata> - <omdoc:theory xml:id="functions" about="#functions" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=2;0,to=17;12)"> - <omdoc:symbol name="cart" xml:id="functions.symbol1" about="#functions.symbol1" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=3;0,to=3;55)"/> - <omdoc:notation cd="functions" name="cart" stex:macro_name="cart" stex:nargs="1" xml:id="functions.notation2" about="#functions.notation2" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=3;0,to=3;55)"> - <omdoc:prototype> - <om:OMA> - <om:OMS cd="functions" cr="fun" name="cart"/> - <omdoc:exprlist name="args"> - <omdoc:expr name="arg"/> - </omdoc:exprlist> - </om:OMA> - </omdoc:prototype> - <omdoc:rendering precedence="500"> - <omdoc:iterate name="args"> - <omdoc:separator> - <m:mo cr="fun">×</m:mo> - </omdoc:separator> - <omdoc:render name="arg"/> - </omdoc:iterate> - </omdoc:rendering> - </omdoc:notation> - <omdoc:symbol name="fun" xml:id="functions.symbol3" about="#functions.symbol3" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=4;0,to=4;71)"/> - <omdoc:notation cd="functions" name="fun" stex:macro_name="fun" stex:nargs="3" xml:id="functions.notation4" about="#functions.notation4" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=4;0,to=4;71)"> - <omdoc:prototype> - <om:OMA> - <om:OMS cd="functions" cr="fun" name="fun"/> - <omdoc:expr name="arg1"/> - <omdoc:expr name="arg2"/> - <omdoc:expr name="arg3"/> - </om:OMA> - </omdoc:prototype> - <omdoc:rendering precedence="200"> - <omdoc:render name="arg1" precedence="200"/> - <m:mo cr="fun">:</m:mo> - <omdoc:render name="arg2" precedence="200"/> - <m:mo cr="fun">→</m:mo> - <omdoc:render name="arg3" precedence="200"/> - </omdoc:rendering> - </omdoc:notation> - <omdoc:symbol name="inset" xml:id="functions.symbol5" about="#functions.symbol5" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=5;0,to=5;45)"/> - <omdoc:notation cd="functions" name="inset" stex:macro_name="inset" stex:nargs="2" xml:id="functions.notation6" about="#functions.notation6" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=5;0,to=5;45)"> - <omdoc:prototype> - <om:OMA> - <om:OMS cd="functions" cr="fun" name="inset"/> - <omdoc:expr name="arg1"/> - <omdoc:expr name="arg2"/> - </om:OMA> - </omdoc:prototype> - <omdoc:rendering precedence="650"> - <omdoc:render name="arg1" precedence="650"/> - <m:mo cr="fun">∈</m:mo> - <omdoc:render name="arg2" precedence="650"/> - </omdoc:rendering> - </omdoc:notation> - <omdoc:symbol name="sseteq" xml:id="functions.symbol7" about="#functions.symbol7" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=6;0,to=6;41)"/> - <omdoc:notation cd="functions" name="sseteq" stex:macro_name="sseteqOp" stex:nargs="0" xml:id="functions.notation8" about="#functions.notation8" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=6;0,to=6;41)"> - <omdoc:prototype> - <om:OMS cd="functions" name="sseteq"/> - </omdoc:prototype> - <omdoc:rendering> - <m:mo>⊆</m:mo> - </omdoc:rendering> - </omdoc:notation> - <omdoc:symbol name="sseteq" xml:id="functions.symbol9" about="#functions.symbol9" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=7;0,to=7;50)"/> - <omdoc:notation cd="functions" name="sseteq" stex:macro_name="sseteq" stex:nargs="2" xml:id="functions.notation10" about="#functions.notation10" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=7;0,to=7;50)"> - <omdoc:prototype> - <om:OMA> - <om:OMS cd="functions" cr="fun" name="sseteq"/> - <omdoc:expr name="arg1"/> - <omdoc:expr name="arg2"/> - </om:OMA> - </omdoc:prototype> - <omdoc:rendering precedence="300"> - <omdoc:render name="arg1" precedence="300"/> - <m:mo cr="fun">⊆</m:mo> - <omdoc:render name="arg2" precedence="300"/> - </omdoc:rendering> - </omdoc:notation> - <omdoc:symbol name="tup" xml:id="functions.symbol11" about="#functions.symbol11" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=8;0,to=8;33)"/> - <omdoc:notation cd="functions" name="tup" stex:macro_name="tup" stex:nargs="1" xml:id="functions.notation12" about="#functions.notation12" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=8;0,to=8;33)"> - <omdoc:prototype> - <om:OMA> - <om:OMS cd="functions" cr="fun" name="tup"/> - <omdoc:expr name="arg1"/> - </om:OMA> - </omdoc:prototype> - <omdoc:rendering> - <m:mrow> - <m:mo stretchy="false">⟨</m:mo> - <omdoc:render name="arg1"/> - <m:mo stretchy="false">⟩</m:mo> - </m:mrow> - </omdoc:rendering> - </omdoc:notation> - <omdoc:notation cd="functions" name="cart" stex:macro_name="cart" stex:nargs="1" xml:id="functions.notation13" about="#functions.notation13" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=9;0,to=9;34)"> - <omdoc:prototype> - <om:OMA> - <om:OMS cd="functions" cr="fun" name="cart"/> - <omdoc:expr name="arg1"/> - </om:OMA> - </omdoc:prototype> - <omdoc:rendering> - <omdoc:iterate name="args"> - <omdoc:separator> - <m:mo cr="fun">×</m:mo> - </omdoc:separator> - <omdoc:render name="arg"/> - </omdoc:iterate> - </omdoc:rendering> - </omdoc:notation> - <omdoc:symbol name="setdiff" xml:id="functions.symbol14" about="#functions.symbol14" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=10;0,to=10;44)"/> - <omdoc:notation cd="functions" name="setdiff" stex:macro_name="setdiffOp" stex:nargs="0" xml:id="functions.notation15" about="#functions.notation15" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=10;0,to=10;44)"> - <omdoc:prototype> - <om:OMS cd="functions" name="setdiff"/> - </omdoc:prototype> - <omdoc:rendering> - <m:mo>\</m:mo> - </omdoc:rendering> - </omdoc:notation> - <omdoc:symbol name="setdiff" xml:id="functions.symbol16" about="#functions.symbol16" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=11;0,to=11;59)"/> - <omdoc:notation cd="functions" name="setdiff" stex:macro_name="setdiff" stex:nargs="2" xml:id="functions.notation17" about="#functions.notation17" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=11;0,to=11;59)"> - <omdoc:prototype> - <om:OMA> - <om:OMS cd="functions" cr="fun" name="setdiff"/> - <omdoc:expr name="arg1"/> - <omdoc:expr name="arg2"/> - </om:OMA> - </omdoc:prototype> - <omdoc:rendering precedence="600"> - <omdoc:render name="arg1" precedence="600"/> - <m:mo cr="fun">\</m:mo> - <omdoc:render name="arg2" precedence="600"/> - </omdoc:rendering> - </omdoc:notation> - <omdoc:symbol name="set" xml:id="functions.symbol18" about="#functions.symbol18" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=12;0,to=12;62)"/> - <omdoc:notation cd="functions" name="set" stex:macro_name="set" stex:nargs="1" xml:id="functions.notation19" about="#functions.notation19" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=12;0,to=12;62)"> - <omdoc:prototype> - <om:OMA> - <om:OMS cd="functions" cr="fun" name="set"/> - <omdoc:exprlist name="args"> - <omdoc:expr name="arg"/> - </omdoc:exprlist> - </om:OMA> - </omdoc:prototype> - <omdoc:rendering> - <m:mo cr="fun">{</m:mo> - <omdoc:iterate name="args" precedence="neginfty"> - <omdoc:separator> - <m:mo cr="fun">,</m:mo> - </omdoc:separator> - <omdoc:render name="arg" precedence="neginfty"/> - </omdoc:iterate> - <m:mo cr="fun">}</m:mo> - </omdoc:rendering> - </omdoc:notation> - <omdoc:symbol name="setst" xml:id="functions.symbol20" about="#functions.symbol20" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=13;0,to=13;66)"/> - <omdoc:notation cd="functions" name="setst" stex:macro_name="setst" stex:nargs="2" xml:id="functions.notation21" about="#functions.notation21" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=13;0,to=13;66)"> - <omdoc:prototype> - <om:OMA> - <om:OMS cd="functions" cr="fun" name="setst"/> - <omdoc:expr name="arg1"/> - <omdoc:expr name="arg2"/> - </om:OMA> - </omdoc:prototype> - <omdoc:rendering> - <m:mo cr="fun">{</m:mo> - <omdoc:render name="arg1" precedence="neginfty"/> - <m:mo cr="fun">∣</m:mo> - <omdoc:render name="arg2" precedence="neginfty"/> - <m:mo cr="fun">}</m:mo> - </omdoc:rendering> - </omdoc:notation> - <omdoc:symbol name="function" xml:id="function.def.sym" about="#function.def.sym" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=14;0,to=16;16)"/> - <omdoc:definition for="function" xml:id="functions.def" about="#functions.def" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=14;0,to=16;16)"> - <omdoc:CMP xml:id="functions.def.CMP1" about="#functions.def.CMP1" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=14;0,to=14;36)"> -<p xmlns="http://www.w3.org/1999/xhtml" id="functions.def.CMP1.p1" class="ltx_p" about="#functions.def.CMP1.p1" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=14;0,to=14;36)">A <omdoc:term cd="functions" name="function" role="definiendum" xml:id="functions.def.CMP1.p1.term1" about="#functions.def.CMP1.p1.term1" stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=14;67,to=15;20)">function</omdoc:term> <om:OMOBJ stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=14;61,to=15;32)"><om:OMA><om:OMS cd="functions" name="fun"/><om:OMV name="𝑓"/><om:OMV name="𝐴"/><om:OMV name="𝐵"/></om:OMA></om:OMOBJ> is a left-total, right-unique relation in <om:OMOBJ stex:srcref="/Users/kohlhase/localmh/ext/sTeX/example/background/functions.tex#textrange(from=14;6,to=15;87)"><om:OMA><om:OMS cd="functions" name="cart"/><om:OMV name="𝐴"/><om:OMV name="𝐵"/></om:OMA></om:OMOBJ></p></omdoc:CMP> - </omdoc:definition> - </omdoc:theory> - </omdoc:omgroup> -</omdoc> diff --git a/Master/texmf-dist/doc/latex/stex/example/background/functions.pdf b/Master/texmf-dist/doc/latex/stex/example/background/functions.pdf Binary files differdeleted file mode 100644 index 50567084b3c..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/background/functions.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/example/background/functions.tex b/Master/texmf-dist/doc/latex/stex/example/background/functions.tex deleted file mode 100644 index d4ac497685f..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/background/functions.tex +++ /dev/null @@ -1,22 +0,0 @@ -\begin{omgroup}[id=sec.functions,creators=miko]{Functions} -\begin{module}[id=functions] -\symdef[assocarg=1]{cart}[1]{\assoc[p=500]{\times}{#1}} -\symdef{fun}[3]{\mixfixiii[p=200]{}{#1}{\colon}{#2}{\rightarrow}{#3}{}} -\symdef{inset}[2]{\infix[p=650]{\in}{#1}{#2}} -\symdef[name=sseteq]{sseteqOp}{\subseteq} -\symdef{sseteq}[2]{\infix[p=300]\sseteqOp{#1}{#2}} -\symdef{tup}[1]{\langle#1\rangle} -\symdef{cart}[1]{\assoc\times{#1}} -\symdef[name=setdiff]{setdiffOp}{\backslash} -\symdef{setdiff}[2]{\mixfixii[p=600]{}{#1}\setdiffOp{#2}{}} -\symdef[assocarg=1]{set}[1]{\mixfixa[nobrackets]{\{}{#1}{\}},} -\symdef{setst}[2]{\mixfixii[nobrackets]{\{}{#1}{\,\mid\,}{#2}{\}}} -\begin{definition}[id=functions.def] - A {\defi{function}} $\fun{f}AB$ is a left-total, right-unique relation in $\cart{A,B}$ -\end{definition} -\end{module} -\end{omgroup} -%%% Local Variables: -%%% mode: LaTeX -%%% TeX-master: "all" -%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/example/background/post.tex b/Master/texmf-dist/doc/latex/stex/example/background/post.tex deleted file mode 100644 index 6b47932f52b..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/background/post.tex +++ /dev/null @@ -1 +0,0 @@ -\end{document} diff --git a/Master/texmf-dist/doc/latex/stex/example/background/pre.tex b/Master/texmf-dist/doc/latex/stex/example/background/pre.tex deleted file mode 100644 index 59f9473ea44..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/background/pre.tex +++ /dev/null @@ -1,8 +0,0 @@ -\documentclass{omdoc} -\usepackage{stex,amssymb,lststex} -\usepackage{hyperref} -\def\omdoc{OMDoc} -\def\latexml{LaTeXML} -\defpath{backmods}{../background} -% \baseURI[\backmods{}]{http://linkeddata.tntbase.org/stex} -% \coolurion diff --git a/Master/texmf-dist/doc/latex/stex/example/background/reals.pdf b/Master/texmf-dist/doc/latex/stex/example/background/reals.pdf Binary files differdeleted file mode 100644 index 4201a59ce14..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/background/reals.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/example/background/reals.tex b/Master/texmf-dist/doc/latex/stex/example/background/reals.tex deleted file mode 100644 index 9bcba08ab82..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/background/reals.tex +++ /dev/null @@ -1,20 +0,0 @@ -\begin{omgroup}[id=sec.reals]{Real Numbers} -\begin{module}[id=reals] -\symdef{RealNumbers}{\mathbb{R}} -\symdef{absval}[1]{\mixfixi[p=2000]|{#1}|} -\symdef{rfrac}[2]{\frac{#1}{#2}} - -\begin{definition}[id=reals.def] - We denote the set of {\defii{real}{numbers}} we all know and love with - $\RealNumbers$. -\end{definition} - -\begin{definition}[id=absval.def] - The absolute value $\absval{r}$ of a real number $r$. -\end{definition} -\end{module} -\end{omgroup} -%%% Local Variables: -%%% mode: LaTeX -%%% TeX-master: "all" -%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/Makefile b/Master/texmf-dist/doc/latex/stex/example/paper/Makefile deleted file mode 100644 index de8ce0872d8..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/paper/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -STEXDIR = ../.. -TARGET = paper.tex -MODSLIBDIR = ../background -BIBINPUTS = $(PREFIX)/lib/bib: - -include $(STEXDIR)/lib/make/Makefile.vars -all: pdf mpdf -include $(STEXDIR)/lib/make/Makefile.in diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/continuous.pdf b/Master/texmf-dist/doc/latex/stex/example/paper/continuous.pdf Binary files differdeleted file mode 100644 index 7d97a99a0ba..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/paper/continuous.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/continuous.tex b/Master/texmf-dist/doc/latex/stex/example/paper/continuous.tex deleted file mode 100644 index dc90911f54b..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/paper/continuous.tex +++ /dev/null @@ -1,20 +0,0 @@ -\begin{omgroup}[id=sec.contfuncs]{Continuous Functions} -\begin{module}[id=continuous] -\importmodule[load=\backmods{functions}]{functions} -\importmodule[load=\backmods{reals}]{reals} -\symdef{continuousfunctions}[2]{\mathcal{C}^0(#1,#2)} -\abbrdef{ContRR}[2]{\continuousfunctions\RealNumbers\RealNumbers} -\begin{definition}[for=continuousfunctions] - A function $\fun{f}\RealNumbers\RealNumbers$ is called {\defi{continuous}} at - $\inset{x}\RealNumbers$, iff for all $\epsilon>0$ there is a $\delta>0$, such that - $\absval{f(x)-f(y)}<\epsilon$ for all $\absval{x-y}<\delta$. It is called - {\defii{continuous}{on}} a set $\sseteq{S}\RealNumbers$, iff is is continous at all - $\inset{x}S$, the set of all such functions is denoted with $\continuousfunctions{S}T$, - if $\sseteq{f(S)}T$. -\end{definition} -\end{module} -\end{omgroup} -%%% Local Variables: -%%% mode: LaTeX -%%% TeX-master: "paper" -%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.pdf b/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.pdf Binary files differdeleted file mode 100644 index 06c3f5b9459..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.tex b/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.tex deleted file mode 100644 index da999f014db..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.tex +++ /dev/null @@ -1,16 +0,0 @@ -\begin{omgroup}[id=sec.differentiable]{Differentiable Functions} -\begin{module}[id=differentiable] -\importmodule[load=continuous]{continuous} -\symdef{difffunctions}[2]{\mathcal{C}^1(#1,#2)} -\abbrdef{DiffRR}[2]{\difffunctions\RealNumbers\RealNumbers} -\begin{definition} - A function $\fun{f}\RealNumbers\RealNumbers$ is called {\defi{differentiable}} at - $\inset{x}\RealNumbers$, iff for all $\epsilon>0$ there is a $\delta>0$, such that - $\rfrac{\absval{f(x)-f(y)}}{\absval{x-y}}<\epsilon$ for all $\absval{x-y}<\delta$. -\end{definition} -\end{module} -\end{omgroup} -%%% Local Variables: -%%% mode: LaTeX -%%% TeX-master: "paper" -%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/intro.pdf b/Master/texmf-dist/doc/latex/stex/example/paper/intro.pdf Binary files differdeleted file mode 100644 index d3a5eaba7cb..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/paper/intro.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/intro.tex b/Master/texmf-dist/doc/latex/stex/example/paper/intro.tex deleted file mode 100644 index 8faed56d132..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/paper/intro.tex +++ /dev/null @@ -1,96 +0,0 @@ -\begin{omgroup}[id=intro]{Introduction} - We will show how to semantically mark up mathematics in the {\sTeX} - format~\cite{Kohlhase:ulsmf08} and how to convert it into - {\omdoc}~\cite{Kohlhase:OMDoc1.3}. - - We have some mathematical material in {\sref{sec.math}} which will serve as example - content. In the rest of this section we will explain the setup of the example and - present an approach to automation of the {\omdoc} conversion via Unix Makefiles. - \begin{omgroup}{The Setup} - \begin{module}[id=setup] - \begin{definition}[display=flow] - The source of this note is contained in the file {\texttt{paper.tex}}. We call it - the {\defi{target}}, since formatting it with {\LaTeX} will generate the main - document. The content in {\sref{sec.contfuncs}} and {\sref{sec.differentiable}} - comes from included files {\texttt{continuous.tex}} and - {\texttt{differentiable.tex}}, we will call them {\defi{module}s}, since they may - be used (i.e. included) by other target documents as well. - \end{definition} - - \begin{omtext} - As the modules are built for inclusion into other documents, they are not - self-contained: - \begin{enumerate} - \item they do not contain a {\LaTeX} preamble and - \verb|\begin|/\verb|\end{document}|, and - \item they may depend on other modules, whose semantic macros they need to include, - \item to facilitate this a module file {\texttt{modf.tex}} comes with a ``semantic - macro short form'' {\texttt{modf.sms}} that can be included without generating - output in the PDF. - \end{enumerate} - \end{omtext} - - \begin{omtext} - This will have consequences for the automation. Concretely, the module on - differentiable functions in {\sref{sec.differentiable}} depends on that for continuous - functions in {\sref{sec.contfuncs}}. Both of them depend on modules for real numbers, - sets and functions that we do not want to cover in this note. \inlinedef{We assume - that they have already been marked up with the same methods as we describe here and - are accessible to us and call them {\defii{background}{module}s}}. In our setup we - keep them in the subdirectory {\texttt{background}}. - \end{omtext} -\end{module} -\end{omgroup} - -\begin{omgroup}{Formatting and {\omdoc} conversion} - To format an {\sTeX} document --- i.e. to produce a PDF file from the {\sTeX} marked-up - sources --- we only need to run the {\texttt{pdflatex}} program over the target document - --- assuming that all modules (regular or background) have semantic macro short forms. - - To convert an {\sTeX} document to {\omdoc}, we need to run {\texttt{latexml}} over it, - post-process the result by {\texttt{latexmlpost}}, and finally massage away all remaining - {\latexml} islands with a stylesheet, see ~\cite{Kohlhase:ssmtl*} for details. -\end{omgroup} - -\begin{omgroup}{Makefile-based Automation} - As the conversion to {\omdoc} is rather complex (the programs in the three steps take a - variety of options), we support an automation by Unix Makefiles. There are three main - {\texttt{make}} targets. - - \begin{description} - \item[{\texttt{make omdoc}}] will trigger the {\omdoc} transformation of the target - document. - \item[{\texttt{make mods}}] will trigger the {\omdoc} transformation of the modules. - \item[{\texttt{make pdf}}] will trigger the {\LaTeX} formatting the target - \item[{\texttt{make mpdf}}] will trigger the {\LaTeX} formatting the modules - \item[{\texttt{make sms}}] will trigger the re-generation of all semantic macro short - forms of modules (this is implicitly called in all the other {\texttt{make}} targets) - \end{description} - To use this, we need to set up a {\texttt{{Makefile}}} of the following form: - -\lstset{columns=flexible,frame=lines,numbers=left,stepnumber=2,numberstyle=\tiny,basicstyle=\small} -\lstinputlisting[language=make]{Makefile} - - The variable {\lstinline{STEXDIR}} has to be set to the main directory of the {\sTeX} - distribution. The variable {\lstinline{TARGET}} specifies the target document (all other - {\texttt{*.tex}} files that are not excluded in the {\lstinline{BUTFILES}} variables are - considered as modules). Here, the {\texttt{background}} directory for convenience. The - {\lstinline{MODSLIBDIR}} specifies the location of the prefix and postfix files - {\texttt{pre.tex}} and {\texttt{post.tex}} that will be prepended and appended to the - modules to make them into complete files {\TeX} files that can be converted. The last - three lines just include the Makefiles from the {\sTeX} distribution and configure the - default make target (\texttt{make all}) to be produce the pdf version - - Note that in the directory {\texttt{background}} we have a very similar Makefile as - above. The only differences are that the variable {\lstinline{STEXDIR}} is adapted and - that the {\lstinline{BUTFILE}} variable is set to {\texttt{pre.tex}} and - {\texttt{post.tex}}, so that they are not converted. In the directory - {\texttt{background}} we have followed good practice by establishing a phony -\end{omgroup} - -\end{omgroup} - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: "paper" -%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/paper.tex b/Master/texmf-dist/doc/latex/stex/example/paper/paper.tex deleted file mode 100644 index 61d4aa7f17c..00000000000 --- a/Master/texmf-dist/doc/latex/stex/example/paper/paper.tex +++ /dev/null @@ -1,148 +0,0 @@ -\documentclass{omdoc} -\usepackage{amssymb} -\usepackage{alltt} -\usepackage{hyperref} -\usepackage{listings} -\def\omdoc{OMDoc} -\def\latexml{LaTeXML} -\defpath{backmods}{../background} -%% defining the author metadata -\WAperson[id=miko, - affiliation=JUB, - url=http://kwarc.info/kohlhase] - {Michael Kohlhase} -\WAinstitution[id=JUB, - url=http://jacobs-university.de, - streetaddress={Campus Ring 1}, - townzip={28759 Bremen}, - countryshort=D, - country=Germany, - type=University, - acronym=JACU, - shortname=Jacobs Univ.] - {Jacobs University Bremen} - -\begin{document} - -% metadata and title page -% \begin{DCmetadata}[maketitle] -% \DCMcreators{miko} -% \DCMrights{Copyright (c) 2009 Michael Kohlhase} -% \DCMtitle{An example of semantic Markup in {\sTeX}} -% \DCMabstract{In this note we give an example of semantic markup in {\sTeX}: -% Continuous and differentiable functions are introduced using real numbers, sets and -% functions as an assumed background.} -% \end{DCmetadata} - -\inputref{intro} - -\begin{omgroup}[id=sec.math]{Mathematical Content} - \begin{omgroup}{Calculus} - We present some standard mathematical definitions, here from calculus. - \inputref{continuous} - \inputref{differentiable} -\end{omgroup} - -\begin{omgroup}[id=sec.math]{A Theory Graph for Elementary Algebra} - Here we show an example for more advanced theory graph manipulations, in particular - imports via morphisms. - -\begin{module}[id=magma] - \importmodule[load=\backmods{functions}]{functions} - \symdef{magbase}{G} - \symdef[name=magmaop]{magmaopOp}{\circ} - \symdef{magmaop}[2]{\infix\magmaopOp{#1}{#2}} - \begin{definition}[id=magma.def] - A \defi{magma} is a structure $\tup{\magbase,\magmaopOp}$, such that $\magbase$ is - closed under the operation $\fun\magmaopOp{\cart{\magbase,\magbase}}\magbase$. - \end{definition} -\end{module} - -\begin{module}[id=semigroup] - \importmodule{magma} - \begin{definition}[id=semigroup.def] - A \trefi[magma]{magma} $\tup{\magbase,\magmaopOp}$, is called a \defi{semigroup}, iff - $\magmaopOp$ is associative. - \end{definition} -\end{module} - -\begin{module}[id=monoid] - \importmodule{semigroup} - \symdef{monneut}{e} - \symdef{noneut}[1]{#1^*} - \begin{definition}[id=monoid.def] - A \defi{monoid} is a structure $\tup{\magbase,\magmaopOp,\monneut}$, such that - $\tup{\magbase,\magmaopOp}$ is a \trefi[semigroup]{semigroup} and $\monneut$ is a - \defii{neutral}{element}, i.e. that $\magmaop{x}\monneut=x$ for all $\inset{x}\magbase$. - \end{definition} - - \begin{definition}[id=noneut.def] - In a monoid $\tup{\magbase,\magmaopOp,\monneut}$, we use denote the set - $\setst{\inset{x}S}{x\ne\monneut}$ with $\noneut{S}$. - \end{definition} -\end{module} - -\begin{module}[id=group] - \importmodule{monoid} - \symdef{ginvOp}{i} - \symdef{ginv}[1]{\prefix\ginvOp{#1}} - \begin{definition}[id=group.def] - A \defi{group} is a structure $\tup{\magbase,\magmaopOp,\monneut,\ginvOp}$, such that - $\tup{\magbase,\magmaopOp,\monneut}$ is a \trefi[monoid]{monoid} and $\ginvOp$ acts as - a \defi{inverse}, i.e. that $\magmaop{x}{\ginv{x}}=\monneut$ for all - $\inset{x}\magbase$. - \end{definition} -\end{module} - -\begin{module}[id=cgroup] -\importmodule{group} -\begin{definition}[id=cgroup.def] - We call a \trefi[group]{group} $\tup{\magbase,\magmaopOp,\monneut,\ginvOp}$ a - \defii{commutative}{group}, iff $\magmaopOp$ is commutative. -\end{definition} -\end{module} - -\begin{module}[id=ring] -\symdef{rbase}{R} -\symdef[name=rtimes]{rtimesOp}{\cdot} -\symdef{rtimes}[2]{\infix\rtimesOp{#1}{#2}} -\symdef{rone}{1} -\begin{importmodulevia}{monoid} - \vassign{rbase}\magbase - \vassign{rtimesOp}\magmaopOp - \vassign{rone}\monneut -\end{importmodulevia} -\symdef[name=rplus]{rplusOp}{+} -\symdef{rplus}[2]{\infix\rplusOp{#1}{#2}} -\symdef{rzero}{0} -\symdef[name=rminus]{rminusOp}{-} -\symdef{rminus}[1]{\prefix\rminusOp{#1}} -\begin{importmodulevia}{cgroup} - \vassign{rplus}\magmaopOp - \vassign{rzero}\monneut - \vassign{rminusOp}\ginvOp -\end{importmodulevia} -\begin{definition} - A \defi{ring} is a structure $\tup{\rbase,\rplusOp,\rzero,\rtimesOp,\rone,\rminusOp}$, - such that $\tup{\noneut\rbase,\rtimesOp,\rone}$ is a monoid and - $\tup{\rbase,\rplusOp,\rzero,\rminusOp}$ is a commutative group. -\end{definition} -\end{module} -\end{omgroup} -\end{omgroup} - -\begin{omgroup}[id=concl]{Conclusion} - In this note we have given an example of standard mathematical markup and shown how a a - {\sTeX} collection can be set up for automation. -\end{omgroup} -\bibliographystyle{alpha} -\bibliography{kwarc} -\end{document} - -%%% Local Variables: -%%% mode: LaTeX -%%% TeX-master: t -%%% End: - -% LocalWords: miko Makefiles tex contfuncs modf sms pdflatex latexml Makefile -% LocalWords: latexmlpost omdoc STEXDIR BUTFILES DIRS diff --git a/Master/texmf-dist/doc/latex/stex/hwexam/README b/Master/texmf-dist/doc/latex/stex/hwexam/README deleted file mode 100644 index 25db46f14a0..00000000000 --- a/Master/texmf-dist/doc/latex/stex/hwexam/README +++ /dev/null @@ -1,10 +0,0 @@ -hwexam.sty: An Infrastructure for marking up Homework Assignment Sheets and Exams - -The hwexam packge allows individual course assignment sheets and compond -assignment documents using problem files marked up with the problem package. - -Copyright (c) 2010 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ - diff --git a/Master/texmf-dist/doc/latex/stex/hwexam/hwexam.pdf b/Master/texmf-dist/doc/latex/stex/hwexam/hwexam.pdf Binary files differdeleted file mode 100644 index 22148735ae6..00000000000 --- a/Master/texmf-dist/doc/latex/stex/hwexam/hwexam.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/metakeys/README b/Master/texmf-dist/doc/latex/stex/metakeys/README deleted file mode 100644 index a10e46f6cc8..00000000000 --- a/Master/texmf-dist/doc/latex/stex/metakeys/README +++ /dev/null @@ -1,9 +0,0 @@ -omd.sty: A generic framework for extensible Metadata in LaTeX - -The omd packge supplies the infrastructure for extending sTeX macros with ontology-based -metadata. This is a package primarily aimed at authors of sTeX extensions. - -Copyright (c) 2009 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ diff --git a/Master/texmf-dist/doc/latex/stex/metakeys/metakeys.pdf b/Master/texmf-dist/doc/latex/stex/metakeys/metakeys.pdf Binary files differdeleted file mode 100644 index ddf654d9393..00000000000 --- a/Master/texmf-dist/doc/latex/stex/metakeys/metakeys.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/mikoslides/README b/Master/texmf-dist/doc/latex/stex/mikoslides/README deleted file mode 100644 index 444da1dbc1e..00000000000 --- a/Master/texmf-dist/doc/latex/stex/mikoslides/README +++ /dev/null @@ -1,9 +0,0 @@ -mikoslides.cls: A Document class for Semantic Slides - -The mikoslides class provides a practical basis for marking up slides semantically in sTeX. - -Copyright (c) 2008 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ - diff --git a/Master/texmf-dist/doc/latex/stex/mikoslides/mikoslides.pdf b/Master/texmf-dist/doc/latex/stex/mikoslides/mikoslides.pdf Binary files differdeleted file mode 100644 index 79660957ba2..00000000000 --- a/Master/texmf-dist/doc/latex/stex/mikoslides/mikoslides.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/modules/README b/Master/texmf-dist/doc/latex/stex/modules/README deleted file mode 100644 index 1ca4729991b..00000000000 --- a/Master/texmf-dist/doc/latex/stex/modules/README +++ /dev/null @@ -1,19 +0,0 @@ -modules.sty: An Infrastructure for Semantic Macros and Module Scoping - -The modules package supplies an infrastructure that allows mark up semantic macros -and to reuse them efficiently in multiple environments. - -This packge is a central part of the sTeX collection, 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). - -This package supplies a definition mechanism for semantic macros and a non-standard -scoping construct for them, which is oriented at the semantic depency relation rather -than the document structure. This structure can be used by MKM systems for -added-value services, either directly from the sTeX sources, or after translation. - -Copyright (c) 2008 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ diff --git a/Master/texmf-dist/doc/latex/stex/modules/modules.pdf b/Master/texmf-dist/doc/latex/stex/modules/modules.pdf Binary files differdeleted file mode 100644 index d30504f08ec..00000000000 --- a/Master/texmf-dist/doc/latex/stex/modules/modules.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/omdoc/README b/Master/texmf-dist/doc/latex/stex/omdoc/README deleted file mode 100644 index ff6a71db6b1..00000000000 --- a/Master/texmf-dist/doc/latex/stex/omdoc/README +++ /dev/null @@ -1,11 +0,0 @@ -omdoc.cls: A LaTeX Class for OMDoc Documents -omdoc.sty: A LaTeX Package for OMDoc Document structures - -This package and class supplies a the infrastructure for writing OMDoc documents -(see http://www.omdoc.org) in LaTeX. - -Copyright (c) 2008 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ - diff --git a/Master/texmf-dist/doc/latex/stex/omdoc/omdoc.pdf b/Master/texmf-dist/doc/latex/stex/omdoc/omdoc.pdf Binary files differdeleted file mode 100644 index d36cc256ba4..00000000000 --- a/Master/texmf-dist/doc/latex/stex/omdoc/omdoc.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/omtext/README b/Master/texmf-dist/doc/latex/stex/omtext/README deleted file mode 100644 index 4493a03f386..00000000000 --- a/Master/texmf-dist/doc/latex/stex/omtext/README +++ /dev/null @@ -1,10 +0,0 @@ -omtext.sty: A LaTeX Package for OMDoc Text environments - -This package supplies a the infrastructure for writing OMDoc text fragments. -(see http://www.omdoc.org) in LaTeX. - -Copyright (c) 2010 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ - diff --git a/Master/texmf-dist/doc/latex/stex/omtext/omtext.pdf b/Master/texmf-dist/doc/latex/stex/omtext/omtext.pdf Binary files differdeleted file mode 100644 index 8b7bf843cc0..00000000000 --- a/Master/texmf-dist/doc/latex/stex/omtext/omtext.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/packages/stex-basics.tex b/Master/texmf-dist/doc/latex/stex/packages/stex-basics.tex new file mode 100644 index 00000000000..daa6d6418d2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/packages/stex-basics.tex @@ -0,0 +1,16 @@ +Both the \pkg{stex} package and document class offer the following +options: + +\begin{description} + \item[\texttt{lang}] (\meta{language}$\ast$) Languages + to load with the \pkg{babel} package. + \item[\texttt{mathhub}] (\meta{directory}) MathHub folder + to search for repositories. + \item[\texttt{sms}] (\meta{boolean}) use \emph{persisted} + mode (not yet implemented). + \item[\texttt{image}] (\meta{boolean}) passed on to + \pkg{tikzinput}. + \item[\texttt{debug}] (\meta{log-prefix}$\ast$) Logs debugging + information with the given prefixes to the terminal, + or all if |all| is given. +\end{description}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/stex/packages/stex-document-structure.tex b/Master/texmf-dist/doc/latex/stex/packages/stex-document-structure.tex new file mode 100644 index 00000000000..1c8fe97dac2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/packages/stex-document-structure.tex @@ -0,0 +1 @@ +\textcolor{red}{TODO: document-structure documentation}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/stex/packages/stex-features.tex b/Master/texmf-dist/doc/latex/stex/packages/stex-features.tex new file mode 100644 index 00000000000..e70bbaa0e84 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/packages/stex-features.tex @@ -0,0 +1,67 @@ +Given modules: + +\stexexample{ + \begin{smodule}{magma} + \symdef{universe}{\comp{\mathcal U}} + \symdef{operation}[args=2,op=\circ]{#1 \comp\circ #2} + \end{smodule} + \begin{smodule}{monoid} + \importmodule{magma} + \symdef{unit}{\comp e} + \end{smodule} + \begin{smodule}{group} + \importmodule{monoid} + \symdef{inverse}[args=1]{{#1}^{\comp{-1}}} + \end{smodule} +} + +We can form a module for \emph{rings} by ``cloning'' +an instance of |group| (for addition) and |monoid| (for multiplication), +respectively, and ``glueing them together'' to ensure they share the +same universe: + +\stexexample{ + \begin{smodule}{ring} + \begin{copymodule}{group}{addition} + \renamedecl[name=universe]{universe}{runiverse} + \renamedecl[name=plus]{operation}{rplus} + \renamedecl[name=zero]{unit}{rzero} + \renamedecl[name=uminus]{inverse}{ruminus} + \end{copymodule} + \notation*{rplus}[plus,op=+,prec=60]{#1 \comp+ #2} + %\setnotation{rplus}{plus} + \notation*{rzero}[zero]{\comp0} + %\setnotation{rzero}{zero} + \notation*{ruminus}[uminus,op=-]{\comp- #1} + %\setnotation{ruminus}{uminus} + \begin{copymodule}{monoid}{multiplication} + \assign{universe}{\runiverse} + \renamedecl[name=times]{operation}{rtimes} + \renamedecl[name=one]{unit}{rone} + \end{copymodule} + \notation*{rtimes}[cdot,op=\cdot,prec=50]{#1 \comp\cdot #2} + %\setnotation{rtimes}{cdot} + \notation*{rone}[one]{\comp1} + %\setnotation{rone}{one} + Test: $\rtimes a{\rplus c{\rtimes de}}$ + \end{smodule} +} + +\textcolor{red}{TODO: explain donotclone} + + +\stexexample{ + \begin{smodule}{int} + \symdef{Integers}{\comp{\mathbb Z}} + \symdef{plus}[args=2,op=+]{#1 \comp+ #2} + \symdef{zero}{\comp0} + \symdef{uminus}[args=1,op=-]{\comp-#1} + + \begin{interpretmodule}{group}{intisgroup} + \assign{universe}{\Integers} + \assign{operation}{\plus!} + \assign{unit}{\zero} + \assign{inverse}{\uminus!} + \end{interpretmodule} + \end{smodule} +}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/stex/packages/stex-hwexam.tex b/Master/texmf-dist/doc/latex/stex/packages/stex-hwexam.tex new file mode 100644 index 00000000000..5f1758b0150 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/packages/stex-hwexam.tex @@ -0,0 +1 @@ +\textcolor{red}{TODO: hwexam documentation}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/stex/packages/stex-inheritance.tex b/Master/texmf-dist/doc/latex/stex/packages/stex-inheritance.tex new file mode 100644 index 00000000000..41631f94d27 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/packages/stex-inheritance.tex @@ -0,0 +1 @@ +\textcolor{red}{TODO: inheritance documentation}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/stex/packages/stex-mathhub.tex b/Master/texmf-dist/doc/latex/stex/packages/stex-mathhub.tex new file mode 100644 index 00000000000..4b05134e70d --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/packages/stex-mathhub.tex @@ -0,0 +1,89 @@ +\begin{sfragment}{The Local MathHub-Directory} + |\usemodule|, |\importmodule|, |\inputref| etc. allow for + including content modularly without having to specify absolute + paths, which would differ between users and machines. Instead, + \sTeX uses \emph{archives} that determine the global + namespaces for symbols and statements and make it possible + for \sTeX to find content referenced via such URIs. + + All \sTeX archives need to exist in the local |MathHub|-directory. + \sTeX knows where this folder is via one of three means: + + \begin{enumerate} + \item If the \sTeX package is loaded with the option + |mathhub=/path/to/mathhub|, then \sTeX will consider + |/path/to/mathhub| as the local |MathHub|-directory. + \item If the |mathhub| package option is \emph{not} + set, but the macro |\mathhub| exists when the + \sTeX-package is loaded, then this macro is + assumed to point to the local |MathHub|-directory; i.e. + |\def\mathhub{/path/to/mathhub}\usepackage{stex}| + will set the |MathHub|-directory as |path/to/mathhub|. + \item Otherwise, \sTeX will attempt to retrieve the + system variable |MATHHUB|, assuming it will + point to the local |MathHub|-directory. Since this + variant needs setting up only \emph{once} and is + machine-specific (rather than defined in tex code), + it is compatible with collaborating and sharing tex + content, and hence recommended. + \end{enumerate} +\end{sfragment} + +\begin{sfragment}{The Structure of \sTeX Archives} + An \sTeX archive |group/name| needs to be stored in the + directory |/path/to/mathhub/group/name|; e.g. assuming your + local |MathHub|-directory is set as |/user/foo/MathHub|, then + in order for the |smglom/calculus|-archive to be found by the + \sTeX system, it needs to be in |/user/foo/MathHub/smglom/calculus|. + + Each such archive needs two subdirectories: + \begin{itemize} + \item |/source| -- this is where all your tex files go. + \item |/META-INF| -- a directory containing a single file + |MANIFEST.MF|, the content of which we will consider shortly + \end{itemize} + An additional |lib|-directory is optional, and is where \sTeX will + look for files included via |\libinput|. + + Additionally a \emph{group} of archives |group/name| may have + an additional archive |group/meta-inf|. If this |meta-inf|-archive + has a |/lib|-subdirectory, it too will be searched by |\libinput| + from all tex files in any archive in the |group/*|-group. +\end{sfragment} + +\begin{sfragment}{MANIFEST.MF-Files} + The |MANIFEST.MF| in the |META-INF|-directory consists of + key-value-pairs, instructing \sTeX (and associated software) + of various properties of an archive. For example, + the |MANIFEST.MF| of the |smglom/calculus|-archive looks like this: + + \begin{framed} + \begin{verbatim} + id: smglom/calculus + source-base: http://mathhub.info/smglom/calculus + narration-base: http://mathhub.info/smglom/calculus + dependencies: smglom/arithmetics,smglom/sets,smglom/topology, + smglom/mv,smglom/linear-algebra,smglom/algebra + responsible: Michael.Kohlhase@FAU.de + title: Elementary Calculus + teaser: Terminology for the mathematical study of change. + description: desc.html + \end{verbatim} + \end{framed} + + Many of these are in fact ignored by \sTeX, but some are important: + \begin{itemize} + \item[|id|:] The name of the archive, including its group (e.g. |smglom/calculus|), + \item[|source-base|] or + \item[|ns|:] The namespace from which all symbol and module URIs + in this repository are formed, see (\textcolor{red}{TODO}), + \item[|narration-base:|] The namespace from which all document + URIs in this repository are formed, see (\textcolor{red}{TODO}), + \item[|url-base|:] The URL that is formed as a basis for \emph{external references}, + see (\textcolor{red}{TODO}), + \item[|dependencies|:] All archives that this archive depends on. \sTeX ignores + this field, but \mmt can pick up on them to resolve dependencies, + e.g. for |lmh install|. + \end{itemize} + +\end{sfragment}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/stex/packages/stex-metatheory.tex b/Master/texmf-dist/doc/latex/stex/packages/stex-metatheory.tex new file mode 100644 index 00000000000..1585ba504c8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/packages/stex-metatheory.tex @@ -0,0 +1 @@ +\textcolor{red}{TODO: metatheory documentation}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/stex/packages/stex-modules.tex b/Master/texmf-dist/doc/latex/stex/packages/stex-modules.tex new file mode 100644 index 00000000000..c067f28a1c3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/packages/stex-modules.tex @@ -0,0 +1 @@ +\textcolor{red}{TODO: modules documentation}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/stex/packages/stex-problem.tex b/Master/texmf-dist/doc/latex/stex/packages/stex-problem.tex new file mode 100644 index 00000000000..1ce5aaa3a23 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/packages/stex-problem.tex @@ -0,0 +1 @@ +\textcolor{red}{TODO: problem documentation}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/stex/packages/stex-proofs.tex b/Master/texmf-dist/doc/latex/stex/packages/stex-proofs.tex new file mode 100644 index 00000000000..0523c65948d --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/packages/stex-proofs.tex @@ -0,0 +1 @@ +\textcolor{red}{TODO: sproofs documentation}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/stex/packages/stex-references.tex b/Master/texmf-dist/doc/latex/stex/packages/stex-references.tex new file mode 100644 index 00000000000..bf8a8ed66c0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/packages/stex-references.tex @@ -0,0 +1 @@ +\textcolor{red}{TODO: references documentation}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/stex/packages/stex-slides.tex b/Master/texmf-dist/doc/latex/stex/packages/stex-slides.tex new file mode 100644 index 00000000000..1f9d0c989d6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/packages/stex-slides.tex @@ -0,0 +1 @@ +\textcolor{red}{TODO: notesslides documentation}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/stex/packages/stex-statements.tex b/Master/texmf-dist/doc/latex/stex/packages/stex-statements.tex new file mode 100644 index 00000000000..aa9f5f76abf --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/packages/stex-statements.tex @@ -0,0 +1 @@ +\textcolor{red}{TODO: statements documentation}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/stex/packages/stex-symbols.tex b/Master/texmf-dist/doc/latex/stex/packages/stex-symbols.tex new file mode 100644 index 00000000000..50b450a248f --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/packages/stex-symbols.tex @@ -0,0 +1 @@ +\textcolor{red}{TODO: symbols documentation}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/stex/packages/stex-terms.tex b/Master/texmf-dist/doc/latex/stex/packages/stex-terms.tex new file mode 100644 index 00000000000..cc67ce0c7fc --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/packages/stex-terms.tex @@ -0,0 +1 @@ +\textcolor{red}{TODO: terms documentation}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/stex/packages/stex-tikzinput.tex b/Master/texmf-dist/doc/latex/stex/packages/stex-tikzinput.tex new file mode 100644 index 00000000000..fb7d0c1e5b2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/packages/stex-tikzinput.tex @@ -0,0 +1 @@ +\textcolor{red}{TODO: tikzinput documentation}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/stex/presentation/README b/Master/texmf-dist/doc/latex/stex/presentation/README deleted file mode 100644 index a5afc3a06c7..00000000000 --- a/Master/texmf-dist/doc/latex/stex/presentation/README +++ /dev/null @@ -1,14 +0,0 @@ -presentation.sty: An Infrastructure for Presenting Semantic Macros - -This package supplies an infrastructure that allows to specify the presentation of -semantic macros, including preference-based bracket elision. This allows to markup the -functional structure of mathematical formulae without having to lose high-quality -human-oriented presentation in {\LaTeX}. Moreover, the notation definitions can be used by -MKM systems for added-value services, either directly from the {\sTeX} sources, or after -translation. - -Copyright (c) 2008 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ - diff --git a/Master/texmf-dist/doc/latex/stex/presentation/presentation.pdf b/Master/texmf-dist/doc/latex/stex/presentation/presentation.pdf Binary files differdeleted file mode 100644 index e74eefda898..00000000000 --- a/Master/texmf-dist/doc/latex/stex/presentation/presentation.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/problem/README b/Master/texmf-dist/doc/latex/stex/problem/README deleted file mode 100644 index 15cf1883fb5..00000000000 --- a/Master/texmf-dist/doc/latex/stex/problem/README +++ /dev/null @@ -1,9 +0,0 @@ -problem.sty: An Infrastructure for marking up Problems - -The problem package supplies an infrastructure that allows mark up problems and to reuse -them efficiently in multiple environments. - -Copyright (c) 2008 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ diff --git a/Master/texmf-dist/doc/latex/stex/problem/problem.pdf b/Master/texmf-dist/doc/latex/stex/problem/problem.pdf Binary files differdeleted file mode 100644 index 0a01800f163..00000000000 --- a/Master/texmf-dist/doc/latex/stex/problem/problem.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/rfdmeta/README b/Master/texmf-dist/doc/latex/stex/rfdmeta/README deleted file mode 100644 index 3f3b9edf4d7..00000000000 --- a/Master/texmf-dist/doc/latex/stex/rfdmeta/README +++ /dev/null @@ -1,9 +0,0 @@ -rdfmeta.sty: An Infrastructure for RDFa metadata in arbitrary {\LaTeX} documents - -The rdfmeta packge allows mark up Ontology-based Metadata in LaTeX documents that can be -harvested by automated tools or exported to PDF. - -Copyright (c) 2010 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ diff --git a/Master/texmf-dist/doc/latex/stex/rfdmeta/certification.pdf b/Master/texmf-dist/doc/latex/stex/rfdmeta/certification.pdf Binary files differdeleted file mode 100644 index 429ce535e4f..00000000000 --- a/Master/texmf-dist/doc/latex/stex/rfdmeta/certification.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/rfdmeta/certification.tex b/Master/texmf-dist/doc/latex/stex/rfdmeta/certification.tex deleted file mode 100644 index 85fa8b7f382..00000000000 --- a/Master/texmf-dist/doc/latex/stex/rfdmeta/certification.tex +++ /dev/null @@ -1,30 +0,0 @@ -\documentclass{omdoc} -\usepackage{stex,rdfmeta,amstext} -\begin{document} -\begin{module}[id=certification] -% \metalanguage[../owl2onto/owl2]{OWL2} - \keydef{omtext}{hasState} - \keydef{omgroup}{hasState} - \symdef{hasState}{\text{hasState}} - \symdef{statedocrd}[1]{rd. #1} - \symdef{tuev}{\text{T\"UV}} - \begin{omgroup}[id=foo,hasState=test]{Definitions} - \begin{definition}[for=hasState] - A document \defii{has}{state} $x$, iff the project manager decrees it so. - \end{definition} - \begin{definition}[for=statedocrd,hasState=$\statedocrd\tuev$] - A document has state \defi[name=statedocrd]{rd. $x$}, iff it has been submitted to $x$ for - certification. - \end{definition} - \begin{definition}[for=tuev,hasState=$\statedocrd\tuev$] - The $\tuev$ (Technischer \"Uberwachungs Verein) is a national - certification agency in Germany. - \end{definition} -\end{omgroup} -\end{module} -\end{document} - -%%% Local Variables: -%%% mode: latex -%%% TeX-master: t -%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/rfdmeta/rdfmeta.pdf b/Master/texmf-dist/doc/latex/stex/rfdmeta/rdfmeta.pdf Binary files differdeleted file mode 100644 index 7f5c0907f65..00000000000 --- a/Master/texmf-dist/doc/latex/stex/rfdmeta/rdfmeta.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/smglom/README b/Master/texmf-dist/doc/latex/stex/smglom/README deleted file mode 100644 index ff6a71db6b1..00000000000 --- a/Master/texmf-dist/doc/latex/stex/smglom/README +++ /dev/null @@ -1,11 +0,0 @@ -omdoc.cls: A LaTeX Class for OMDoc Documents -omdoc.sty: A LaTeX Package for OMDoc Document structures - -This package and class supplies a the infrastructure for writing OMDoc documents -(see http://www.omdoc.org) in LaTeX. - -Copyright (c) 2008 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ - diff --git a/Master/texmf-dist/doc/latex/stex/smglom/smglom.pdf b/Master/texmf-dist/doc/latex/stex/smglom/smglom.pdf Binary files differdeleted file mode 100644 index 948f4df7111..00000000000 --- a/Master/texmf-dist/doc/latex/stex/smglom/smglom.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/smultiling/README b/Master/texmf-dist/doc/latex/stex/smultiling/README deleted file mode 100644 index ff6a71db6b1..00000000000 --- a/Master/texmf-dist/doc/latex/stex/smultiling/README +++ /dev/null @@ -1,11 +0,0 @@ -omdoc.cls: A LaTeX Class for OMDoc Documents -omdoc.sty: A LaTeX Package for OMDoc Document structures - -This package and class supplies a the infrastructure for writing OMDoc documents -(see http://www.omdoc.org) in LaTeX. - -Copyright (c) 2008 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ - diff --git a/Master/texmf-dist/doc/latex/stex/smultiling/smultiling.pdf b/Master/texmf-dist/doc/latex/stex/smultiling/smultiling.pdf Binary files differdeleted file mode 100644 index ea30faadc37..00000000000 --- a/Master/texmf-dist/doc/latex/stex/smultiling/smultiling.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/sproof/README b/Master/texmf-dist/doc/latex/stex/sproof/README deleted file mode 100644 index 66426856383..00000000000 --- a/Master/texmf-dist/doc/latex/stex/sproof/README +++ /dev/null @@ -1,10 +0,0 @@ -sproof.sty: An Infrastructure for Structural Markup for Proofs - -This package supplies macros and environment that allow to annotate the structure of -mathematical proofs. This structure can be used by MKM systems for added-value services, -either directly from the sTeX sources, or after translation via the LaTeXML system. - -Copyright (c) 2008 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ diff --git a/Master/texmf-dist/doc/latex/stex/sproof/sproof.pdf b/Master/texmf-dist/doc/latex/stex/sproof/sproof.pdf Binary files differdeleted file mode 100644 index 9478c6f254f..00000000000 --- a/Master/texmf-dist/doc/latex/stex/sproof/sproof.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/sref/README b/Master/texmf-dist/doc/latex/stex/sref/README deleted file mode 100644 index 3b4269614ac..00000000000 --- a/Master/texmf-dist/doc/latex/stex/sref/README +++ /dev/null @@ -1,9 +0,0 @@ -sref.sty: A LaTeX Package for semantic crossreferences - -This package and class supplies a the infrastructure for crossreferencing across multiple files - -Copyright (c) 2009 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ - diff --git a/Master/texmf-dist/doc/latex/stex/sref/book.pdf b/Master/texmf-dist/doc/latex/stex/sref/book.pdf Binary files differdeleted file mode 100644 index 3c65f6e9f08..00000000000 --- a/Master/texmf-dist/doc/latex/stex/sref/book.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/sref/book.tex b/Master/texmf-dist/doc/latex/stex/sref/book.tex deleted file mode 100644 index b603fdc0795..00000000000 --- a/Master/texmf-dist/doc/latex/stex/sref/book.tex +++ /dev/null @@ -1,18 +0,0 @@ -\documentclass{report} -\usepackage{omtext,omdoc} -\title{Advanced Crossreferencing in {\LaTeX}} -\author{Elder Researcher (ed.)} -\usepackage{hyperref} -\begin{document} -\maketitle -\tableofcontents -\newpage -\chapter{Semantic Crossreferencing (Jane Doe, ...)} -\input{idcmain}\newpage -\chapter{Inter-Document Crossreferencing (John Bull, ...)} -\input{scrmain} -\end{document} -%%% Local Variables: -%%% mode: LaTeX -%%% TeX-master: t -%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/sref/idc.pdf b/Master/texmf-dist/doc/latex/stex/sref/idc.pdf Binary files differdeleted file mode 100644 index 3759d8c92f5..00000000000 --- a/Master/texmf-dist/doc/latex/stex/sref/idc.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/sref/idc.tex b/Master/texmf-dist/doc/latex/stex/sref/idc.tex deleted file mode 100644 index f85a3413758..00000000000 --- a/Master/texmf-dist/doc/latex/stex/sref/idc.tex +++ /dev/null @@ -1,21 +0,0 @@ -\documentclass[extrefs]{omdoc} -\usepackage{omtext} -\makeextrefs{idc} -\inputrefs{scr}{scr} -\extrefstyle{scr}{\cite[\protect{\theextref}]{scrcit}} -\title{Inter-Document Crossreferencing} -\author{John Bull} -\usepackage{hyperref} -\begin{document} -\maketitle\newpage -\input{idcmain}\newpage -\begin{thebibliography}{SCR} -\bibitem[SCR]{scrcit} -Jane Doe\newblock \href{scr.pdf}{Semantic Crossreferencing}\newblock Personal communication. -\end{thebibliography} -\end{document} - -%%% Local Variables: -%%% mode: LaTeX -%%% TeX-master: t -%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/sref/idcmain.tex b/Master/texmf-dist/doc/latex/stex/sref/idcmain.tex deleted file mode 100644 index 3664d95debc..00000000000 --- a/Master/texmf-dist/doc/latex/stex/sref/idcmain.tex +++ /dev/null @@ -1,22 +0,0 @@ -\begin{omgroup}[id=mcr]{Making Crossreferences} -\begin{omtext} - in the omgroup -\end{omtext} -\end{omgroup} -\newpage -\begin{omgroup}[id=rad]{Referencing across Documents} -Now, we test the referencing mechanism -\begin{omtext}[title=Internal Referencing] - First single refrences: \sref{mcr} (\spageref{mcr}) and \sref{rad} (\spageref{rad}), - and then compound ones: \srefs{mcr}{rad} -\end{omtext} - -\begin{omtext}[title=External Referencing] - First single references: \extref{scr}{setup} (\extpageref{scr}{setup}) and - \extref{scr}{testing} (\extpageref{scr}{testing}) -\end{omtext} -\end{omgroup} -%%% Local Variables: -%%% mode: LaTeX -%%% TeX-master: "idc" -%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/sref/scr.pdf b/Master/texmf-dist/doc/latex/stex/sref/scr.pdf Binary files differdeleted file mode 100644 index 5deae5865ba..00000000000 --- a/Master/texmf-dist/doc/latex/stex/sref/scr.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/sref/scr.tex b/Master/texmf-dist/doc/latex/stex/sref/scr.tex deleted file mode 100644 index 16b35003027..00000000000 --- a/Master/texmf-dist/doc/latex/stex/sref/scr.tex +++ /dev/null @@ -1,20 +0,0 @@ -\documentclass[extrefs]{omdoc} -\usepackage{omtext} -\makeextrefs{scr} -\inputrefs{idc}{idc} -\extrefstyle{idc}{\cite[\protect{\theextref}]{idccit}} -\title{Semantic Crossreferencing} -\author{Jane Doe} -\usepackage{hyperref} -\begin{document} -\maketitle -\input{scrmain} -\begin{thebibliography}{IDC} -\bibitem[IDC]{idccit} -John Bull\newblock \href{scr.pdf}{Inter-Document Crossreferencing}\newblock Personal communication -\end{thebibliography} -\end{document} -%%% Local Variables: -%%% mode: LaTeX -%%% TeX-master: t -%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/sref/scrmain.tex b/Master/texmf-dist/doc/latex/stex/sref/scrmain.tex deleted file mode 100644 index 044810a103b..00000000000 --- a/Master/texmf-dist/doc/latex/stex/sref/scrmain.tex +++ /dev/null @@ -1,23 +0,0 @@ -\begin{omgroup}[id=setup]{Setting up Semantic References} -\begin{omtext}[title=In a nutshell] - How to set up semantic references? Easy, just use the \texttt{omgroup} environment from - the \texttt{omdoc} package. -\end{omtext} -\end{omgroup} -\newpage -\begin{omgroup}[id=testing]{Testing the References} -Now, we test the referencing mechanism -\begin{omtext}[title=Internal Referencing] - First single refrences: \sref{setup} and \sref{testing}, and then compound ones: - \srefs{setup}{testing} -\end{omtext} - -\begin{omtext}[title=External Referencing] - First single references: \extref{idc}{mcr} and \extref{idc}{rad} -% external referencing two: \extrefs{tast}{foo}{bar} -\end{omtext} -\end{omgroup} -%%% Local Variables: -%%% mode: LaTeX -%%% TeX-master: "scr" -%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/sref/sref.pdf b/Master/texmf-dist/doc/latex/stex/sref/sref.pdf Binary files differdeleted file mode 100644 index d78872018e3..00000000000 --- a/Master/texmf-dist/doc/latex/stex/sref/sref.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/statements/README b/Master/texmf-dist/doc/latex/stex/statements/README deleted file mode 100644 index 2f214e6806f..00000000000 --- a/Master/texmf-dist/doc/latex/stex/statements/README +++ /dev/null @@ -1,9 +0,0 @@ -statements.sty: A LaTeX Package for mathematical Statements - -This package and class supplies a the infrastructure for writing OMDoc statements -(see http://www.omdoc.org) in LaTeX. - -Copyright (c) 2008 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ diff --git a/Master/texmf-dist/doc/latex/stex/statements/statements.pdf b/Master/texmf-dist/doc/latex/stex/statements/statements.pdf Binary files differdeleted file mode 100644 index bdc3fb98518..00000000000 --- a/Master/texmf-dist/doc/latex/stex/statements/statements.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/stex-abstract.tex b/Master/texmf-dist/doc/latex/stex/stex-abstract.tex new file mode 100644 index 00000000000..445bbf064aa --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/stex-abstract.tex @@ -0,0 +1,10 @@ +\begin{abstract} + \sTeX is a collection of {\LaTeX} package that allow to markup documents semantically without leaving the document format, essentially turning {\LaTeX} into a document format for mathematical knowledge management (MKM). + + \sTeX augments {\LaTeX} with + \begin{itemize} + \item \emph{Semantic macros} that denote and distinguish between mathematical concepts, operators, etc. independent of their notational presentation, + \item A powerful \emph{module system} that allows for authoring and importing individual fragments containing document text and/or semantic macros, independent of -- and without hard coding -- directory paths relative to the current document, + \item A mechanism for exporting \sTeX documents to (modular) XHTML, preserving all the semantic information for semantically informed knowledge management services. + \end{itemize} +\end{abstract} diff --git a/Master/texmf-dist/doc/latex/stex/stex-doc.pdf b/Master/texmf-dist/doc/latex/stex/stex-doc.pdf Binary files differnew file mode 100644 index 00000000000..7499111fa86 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/stex-doc.pdf diff --git a/Master/texmf-dist/doc/latex/stex/stex-doc.tex b/Master/texmf-dist/doc/latex/stex/stex-doc.tex new file mode 100644 index 00000000000..d2e82390837 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/stex-doc.tex @@ -0,0 +1,210 @@ +\def\bibfolder{../lib/bib} +\input{stex-docheader} +\infulldoctrue + +\ExplSyntaxOn +\def\OmitDocInput#1{ +\clist_gput_right:Nn \g_docinput_clist + { #1 } +} +\bool_set_true:N \stex_dtx_tests_bool +\ExplSyntaxOff + +\expandafter\newif\csname if@infulldoc\expandafter\endcsname\csname @infulldoctrue\endcsname + +\begin{document} + \title{ + The {\stex{3}} Package + \thanks{Version {\fileversion} (last revised {\filedate})} + } + \author{Michael Kohlhase, Dennis Müller\\ + FAU Erlangen-Nürnberg\\ + \url{http://kwarc.info/} + } + \pagenumbering{roman} + \maketitle + + \input{stex-abstract}\bigskip + + This is the full documentation of \sTeX. It + consists of four parts: + \begin{itemize} + \item \autoref{part:manual} is a general manual + for the \sTeX package and associated software. + It is primarily directed at end-users who + want to use \sTeX to author semantically + enriched documents. + \item \autoref{part:documentation} + documents the macros provided + by the \sTeX package. It is primarily directed + at package authors who want to build on + \sTeX, but can also serve as a reference manual + for end-users. + \item \autoref{part:extensions} documents additional + packages that build on \sTeX, primarily its + module system. These are not part of the + \sTeX package itself, but useful additions + enabled by \sTeX package functionality. + \item \autoref{part:implementation} is the + detailled documentation of the \sTeX package + implementation. + \end{itemize} + + \makeatletter + \renewcommand\part{% + \clearpage + \thispagestyle{plain}% + \@tempswafalse + \null\vfil + \secdef\@part\@spart% + } + \newcounter{chapter} + \numberwithin{section}{chapter} + \renewcommand\thechapter{\@arabic\c@chapter} + \renewcommand\thesection{\thechapter.\@arabic\c@section} + \newcommand*\chaptermark[1]{} + \setcounter{secnumdepth}{2} + \newcommand\@chapapp{\chaptername} + %\newcommand\chaptername{Chapter} + \def\ps@headings{% + \let\@oddfoot\@empty + \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\chaptermark##1{% + \markright{\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \@chapapp\ \thechapter. \ % + \fi + ##1}}% + }% + } + \newcommand\chapter{\clearpage + \thispagestyle{plain}% + \global\@topnum\z@ + \@afterindentfalse + \secdef\@chapter\@schapter% + } + \def\@chapter[#1]#2{\refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}#1}% + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \@makechapterhead{#2}% + \@afterheading% + } + \def\@makechapterhead#1{% + \vspace*{50\p@}% + {\parindent \z@ \raggedright \normalfont + \huge\bfseries \@chapapp\space \thechapter + \par\nobreak + \vskip 20\p@ + \interlinepenalty\@M + \Huge \bfseries #1\par\nobreak + \vskip 40\p@ + }% + } +\newcommand*\l@chapter[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \vskip 1.0em \@plus\p@ + \setlength\@tempdima{1.5em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak\hfil + \nobreak\hb@xt@\@pnumwidth{\hss #2% + \kern-\p@\kern\p@}\par + \penalty\@highpenalty + \endgroup + \fi} +\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.8em}} +\renewcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}} +\renewcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}} +\def\partname{Part} +\def\toclevel@part{-1} +\def\maketitle{\chapter{\@title}} +\let\thanks\@gobble +\let\DelayPrintIndex\PrintIndex +\let\PrintIndex\@empty +\providecommand*{\hexnum}[1]{\text{\texttt{\char`\"}#1}} +\makeatother + +\ExplSyntaxOn +\int_set:Nn \l_document_structure_section_level_int {1} +\ExplSyntaxOff + +\clearpage + +{% + \def\\{:}% fix "newlines" in the ToC + \tableofcontents +} + +\clearpage +\pagenumbering{arabic} + +\part{Manual}\label{part:manual} + +%\let\oldsubsubsection\subsubsection +%\let\subsubsection\section +%\let\subsection\section +%\let\section\chapter + +\input{stex-manual} + +%\let\section\subsection +%\let\subsection\subsubsection +%\let\subsubsection\oldsubsubsection + +\part{Documentation}\label{part:documentation} + +\ExplSyntaxOn +\int_set:Nn \l_document_structure_section_level_int {2} +\ExplSyntaxOff + + +%\errmessage{\expandafter\meaning\csname comment \endcsname} +\DisableImplementation + + +\DocInput{../source/stex/stex-basics.dtx} +\DocInput{../source/stex/stex-mathhub.dtx} +\DocInput{../source/stex/stex-references.dtx} +\DocInput{../source/stex/stex-modules.dtx} +\DocInput{../source/stex/stex-inheritance.dtx} +\DocInput{../source/stex/stex-symbols.dtx} +\DocInput{../source/stex/stex-terms.dtx} +\DocInput{../source/stex/stex-features.dtx} +\DocInput{../source/stex/stex-statements.dtx} +\DocInput{../source/stex/stex-proofs.dtx} + +\OmitDocInput{../source/stex/stex-others.dtx} +\DocInput{../source/stex/stex-metatheory.dtx} + +\part{Extensions}\label{part:extensions} + +\DocInput{../source/extensions/tikzinput.dtx} +\DocInput{../source/extensions/document-structure.dtx} +\DocInput{../source/extensions/notesslides.dtx} +\DocInput{../source/extensions/problem.dtx} +\DocInput{../source/extensions/hwexam.dtx} + + +\part{Implementation}\label{part:implementation} + +\def\maketitle{} +\let\subsubsection\section +\let\subsection\section +\let\section\chapter + +\EnableImplementation +\DisableDocumentation + +\DocInputAgain + +\end{document} diff --git a/Master/texmf-dist/doc/latex/stex/stex-docheader.tex b/Master/texmf-dist/doc/latex/stex/stex-docheader.tex new file mode 100644 index 00000000000..d0f13e90b33 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/stex-docheader.tex @@ -0,0 +1,355 @@ +\RequirePackage{paralist} +\documentclass[full,kernel]{l3doc} +\usepackage[dvipsnames]{xcolor} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\RequirePackage{morewrites} +\RequirePackage{tikzinput} +\usetikzlibrary{fit} + +\usepackage[debug=all,lang=en, mathhub=./tests]{stex} +\usepackage{url,array,float,textcomp} +\usepackage[show]{ed} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\addbibresource{\bibfolder/kwarcpubs.bib} +\addbibresource{\bibfolder/extpubs.bib} +\addbibresource{\bibfolder/kwarccrossrefs.bib} +\addbibresource{\bibfolder/extcrossrefs.bib} +\usepackage{amssymb} +\usepackage{amsfonts} +\usepackage{xspace} +\usepackage{hyperref} + +\makeindex +\floatstyle{boxed} +\newfloat{exfig}{thp}{lop} +\floatname{exfig}{Example} + +\usepackage{listings} + +\ExplSyntaxOn + +\keys_define:nn { stex-tests } { + do .bool_set:N = \stex_dtx_tests_bool +} + +\ProcessKeysOptions { stex-tests } + +\prg_new_conditional:Nnn \stex_indtx: { T } { + \bool_if:NTF \stex_dtx_tests_bool + \prg_return_true: \prg_return_false: +} + +\ExplSyntaxOff + +\lstdefinestyle{mylatex}{ + keywordstyle=\color{BurntOrange} +} +\lstdefinelanguage{mylatex}{ + emphstyle=\underbar, + alsodigit={:}, + %alsoletter={_}, + alsoletter={\\} + sensitive=true, + classoffset=0,keywordstyle=\bfseries, + morekeywords={\\begin,\\end,\\ExplSyntaxOn,\\ExplSyntaxOff}, + classoffset=1,keywordstyle=\color{blue}, + morekeywords={ + \\symdecl, + \\symdef, + \\notation, + \\abbrdef, + \\importmodule, + \\usemodule, + \\STEXwithbrackets, + \\symref + }, + classoffset=2,keywordstyle=\color{Purple}, + morekeywords={ + \\stex_path_from_string:Nn, + \\stex_path_to_string:NN, + \\stex_path_to_string:N, + \\stex_require_repository:n, + \\stex_modules_current_namespace:, + \\stex_debug:n, + \\stex_set_current_repository:n, + \\stex_file_in_smsmode:nn, + \\stex_get_symbol:n, + }, + classoffset=3,keywordstyle=\color{SkyBlue}, + morekeywords={ + \\l_stex_modules_ns_str, + \\g_stex_currentfile_seq, + \\l_stex_current_module_prop, + \\l_stex_get_symbol_uri_str, + } + classoffset=0, +%^^A morecomment=[l][\color{Gray}]{//}, +%^^A morecomment=[s][\color{Gray}]{/*}{*/}, + morecomment=[s][\color{Green}]{$}{$},, + morecomment=[s][\color{OliveGreen}]{\\[}{\\]}, +%^^A morestring=[b][\color{Purple}]\$, +} +\lstnewenvironment{latexcode}[1][language=mylatex]{\lstset{language=mylatex,basicstyle=\tiny,inputencoding=utf8,#1,alsoletter={\\,*},alsoother={\$}}}{} + + + +\usepackage{mdframed,realboxes} +\usepackage[most]{tcolorbox} +\usepackage{caption} + +\newenvironment{framed}{\begin{mdframed}\begin{center}}{\end{center}\end{mdframed}} +\newcommand{\scaled}[2][0.9\hsize]{\begin{center}\resizebox{#1}{!}{\begin{minipage}{\textwidth} #2 \end{minipage}}\end{center}} + +\newenvironment{stextest@output} +{ + \begin{mdframed}[linewidth=1pt,backgroundcolor=white]\tiny +} +{\end{mdframed}} + +\newenvironment{stextest@input} +{ + \begin{mdframed}[linewidth=1pt,backgroundcolor=lightgray]\tiny +} +{\end{mdframed}} + +\makeatletter + +\newcount\test@counter\test@counter=0 +\newcount\example@counter\example@counter=0 + +\newenvironment{stextest@border} +{ + \global\advance\test@counter by 1 + \newtcolorbox{stextestborderbox}{ + empty, + title={Test \the\test@counter}, + attach boxed title to top left, + minipage boxed title, + boxed title style={empty,size=minimal,toprule=0pt,top=4pt,left=3mm,overlay={}}, + coltitle=red,fonttitle=\bfseries, + before=\par\medskip\noindent,parbox=false,boxsep=0pt,left=3mm,right=0mm,top=2pt,breakable,pad at break=0mm, + before upper=\csname @totalleftmargin\endcsname0pt, + overlay unbroken={\draw[red,line width=2pt] ([xshift=-0pt]title.north west) -- ([xshift=-0pt]frame.south west); }, + overlay first={\draw[red,line width=2pt] ([xshift=-0pt]title.north west) -- ([xshift=-0pt]frame.south west); }, + overlay middle={\draw[red,line width=2pt] ([xshift=-0pt]frame.north west) -- ([xshift=-0pt]frame.south west); }, + overlay last={\draw[red,line width=2pt] ([xshift=-0pt]frame.north west) -- ([xshift=-0pt]frame.south west); }, + } +%^^A\refstepcounter{remark} +\begin{stextestborderbox}\small +} +{\end{stextestborderbox}} + +\newenvironment{example@border} +{ + \global\advance\example@counter by 1 + \newtcolorbox{exampleborderbox}{ + empty, + title={Example \the\example@counter}, + attach boxed title to top left, + minipage boxed title, + boxed title style={empty,size=minimal,toprule=0pt,top=1pt,left=3mm,overlay={}}, + coltitle=blue,fonttitle=\bfseries, + parbox=false,boxsep=0pt,left=3mm,right=0mm,top=2pt,breakable,pad at break=0mm, + before upper=\csname @totalleftmargin\endcsname0pt, + overlay unbroken={\draw[blue,line width=2pt] ([xshift=-0pt]title.north west) -- ([xshift=-0pt]frame.south west); }, + overlay first={\draw[blue,line width=2pt] ([xshift=-0pt]title.north west) -- ([xshift=-0pt]frame.south west); }, + overlay middle={\draw[blue,line width=2pt] ([xshift=-0pt]frame.north west) -- ([xshift=-0pt]frame.south west); }, + overlay last={\draw[blue,line width=2pt] ([xshift=-0pt]frame.north west) -- ([xshift=-0pt]frame.south west); }, + } +%^^A\refstepcounter{remark} +\begin{exampleborderbox}\small +} +{\end{exampleborderbox}} + + \makeatother + +\def\present#1{\texttt{>>\meaning#1<<}} +\def\printltx#1{\texttt{\detokenize{#1}}} + +\newwrite\testoutfile +\def\testfile{0} + +\ExplSyntaxOn + +\AddToHook{begindocument}{ + \stex_indtx:T { + \newwrite\alltestsoutfile + \immediate\openout\alltestsoutfile=alltests.tst + } +} + + \def\stextest{ + \begingroup + \catcode`\\=12\relax + \catcode`\#=12\relax + \catcode`\&=12\relax + \catcode`\$=12\relax + \catcode`\^=12\relax + \catcode`\_=12\relax + \catcode`^^J=12\relax + \endlinechar=`^^J + \newlinechar=-1 +%^^A \everyeof{\noexpand} + \test_a:n + } + \long\def \test_a:n #1 { + \endgroup + \stex_indtx:T { + \immediate\write\alltestsoutfile{% + ^^J\c_backslash_str stextest{\detokenize{^^J^^J#1^^J}}^^J + } + } + \begin{stextest@border} + \immediate\openout\testoutfile=stextest.tst + \immediate\write\testoutfile{ + \c_backslash_str begin{latexcode} + \detokenize{^^J^^J#1^^J} + \c_backslash_str end{latexcode} + } + \immediate\closeout\testoutfile + \begin{stextest@input} + \catcode`\#=12\relax + \input{stextest.tst} + \end{stextest@input} + \immediate\openout\testoutfile=stextest.tst + \immediate\write\testoutfile{\detokenize{#1}} + \immediate\closeout\testoutfile + \stex_indtx:T { + \begin{stextest@output} + \input{stextest.tst} + \end{stextest@output} + } + \end{stextest@border} + } + + \def\stexexample{ + \begingroup + \catcode`\\=12\relax + \catcode`\#=12\relax + \catcode`\&=12\relax + \catcode`\$=12\relax + \catcode`\^=12\relax + \catcode`\_=12\relax + \catcode`^^J=12\relax + \endlinechar=`^^J + \newlinechar=-1 +%^^A \everyeof{\noexpand} + \example_a:n + } + \long\def \example_a:n #1 { + \endgroup + \begin{example@border} + \immediate\openout\testoutfile=stextest.tst + \immediate\write\testoutfile{ + \c_backslash_str begin{latexcode} + \detokenize{^^J}#1 + \c_backslash_str end{latexcode} + } + \immediate\closeout\testoutfile + \begin{stextest@input} + \catcode`\#=12\relax + \input{stextest.tst} + \end{stextest@input} + \immediate\openout\testoutfile=stextest.tst + \immediate\write\testoutfile{#1} + \immediate\closeout\testoutfile + \begin{stextest@output} + \input{stextest.tst} + \end{stextest@output} + \end{example@border} + } + + \long\def\test#1{} + +\ExplSyntaxOff + + +\MakeShortVerb{\|} + +\def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}\xspace} +\def\mmt{\textsc{Mmt}\xspace} +\def\xml{\scsys{Xml}} +\def\mathml{\scsys{MathML}} +\def\omdoc{\scsys{OMDoc}} +\def\openmath{\scsys{OpenMath}} +\def\latexml{\scsys{LaTeXML}} +\def\perl{\scsys{Perl}} +\def\cmathml{Content-{\sc MathML}\index{Content {\sc MathML}}\index{MathML@{\sc MathML}!content}} +\def\activemath{\scsys{ActiveMath}} +\def\twin#1#2{\index{#1!#2}\index{#2!#1}} +\def\twintoo#1#2{{#1 #2}\twin{#1}{#2}} +\def\atwin#1#2#3{\index{#1!#2!#3}\index{#3!#2 (#1)}} +\def\atwintoo#1#2#3{{#1 #2 #3}\atwin{#1}{#2}{#3}} +\def\cT{\mathcal{T}}\def\cD{\mathcal{D}} + +\def\fileversion{3.0} +\def\filedate{\today} + +\RequirePackage{pdfcomment} + +\ExplSyntaxOn\makeatletter +\cs_set_protected:Npn \@comp #1 #2 { + \pdftooltip { + \textcolor{blue}{#1} + } { #2 } +} + +\cs_set_protected:Npn \@defemph #1 #2 { + \pdftooltip { + \textbf{\textcolor{magenta}{#1}} + } { #2 } +} + +\def\__omtext_lec#1{#1} +\cs_new_protected:Npn \lec #1 { + \strut\hfil\strut\null\hfill\__omtext_lec{#1} +} +\makeatother\ExplSyntaxOff + +\makeatletter +\let\@stex@oldcomment\comment +\let\@stex@oldendcomment\endcomment + +%\RequirePackage{comment} +\RequirePackage{document-structure} +\RequirePackage[hints,solutions,notes]{problem} +\RequirePackage{hwexam} + +\let\comment\@stex@oldcomment +\let\endcomment\@stex@oldendcomment + +\newif\ifinfulldoc\infulldocfalse +\makeatother + +\def\basedocurl{https://github.com/slatex/sTeX/blob/latex3/doc} +\newcounter{module} + +\NewDocumentEnvironment {module}{}{ + \stepcounter{module} + \textbf{Module \themodule: \smoduletitle} +}{ + +} +\stexpatchmodule{\begin{module}}{\end{module}} + +\def\compemph#1{\textcolor{blue}{#1}} +\def\symrefemph#1{\textcolor{green}{#1}} + +\RequirePackage{pdfcomment} +\makeatletter +\protected\def\compemph@uri#1#2{% + \pdftooltip{% + \srefsymuri{#2}{\compemph{#1}}% + }{% + URI: \detokenize{#2}% + }% +} +\protected\def\symrefemph@uri#1#2{% + \pdftooltip{% + \srefsymuri{#2}{\symrefemph{#1}}% + }{% + URI: \detokenize{#2}% + }% +} +\makeatother
\ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/stex/stex-manual.pdf b/Master/texmf-dist/doc/latex/stex/stex-manual.pdf Binary files differnew file mode 100644 index 00000000000..80b4154b9af --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/stex-manual.pdf diff --git a/Master/texmf-dist/doc/latex/stex/stex-manual.tex b/Master/texmf-dist/doc/latex/stex/stex-manual.tex new file mode 100644 index 00000000000..92834af1c5e --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/stex-manual.tex @@ -0,0 +1,829 @@ +\makeatletter +\ifcsname if@infulldoc\endcsname\else + \expandafter\newif\csname if@infulldoc\endcsname\@infulldocfalse +\fi +\makeatother + +\csname if@infulldoc\endcsname\else + +\def\bibfolder{../lib/bib} + +\input{stex-docheader} + +\infulldoctrue + +\csname bool_set_true:N\expandafter\endcsname\csname stex_dtx_tests_bool\endcsname + +\begin{document} + \csname if@infulldoc\endcsname\else + \title{ + The {\stex{3}} Manual + \thanks{Version {\fileversion} (last revised {\filedate})} + } + \author{Michael Kohlhase, Dennis Müller\\ + FAU Erlangen-Nürnberg\\ + \url{http://kwarc.info/} + } + \pagenumbering{roman} + \maketitle + + \input{stex-abstract}\bigskip + + This is the user manual for the \sTeX package and + associated software. It is primarily directed at end-users + who want to use \sTeX to author semantically + enriched documents. For the full documentation, see + \href{\basedocurl/stex.pdf}{the \sTeX documentation} + + \makeatletter + \renewcommand\part{% + \clearpage + \thispagestyle{plain}% + \@tempswafalse + \null\vfil + \secdef\@part\@spart% + } + \newcounter{chapter} + \numberwithin{section}{chapter} + \renewcommand\thechapter{\@arabic\c@chapter} + \renewcommand\thesection{\thechapter.\@arabic\c@section} + \newcommand*\chaptermark[1]{} + \setcounter{secnumdepth}{2} + \newcommand\@chapapp{\chaptername} + %\newcommand\chaptername{Chapter} + \def\ps@headings{% + \let\@oddfoot\@empty + \def\@oddhead{{\slshape\rightmark}\hfil\thepage}% + \let\@mkboth\markboth + \def\chaptermark##1{% + \markright{\MakeUppercase{% + \ifnum \c@secnumdepth >\m@ne + \@chapapp\ \thechapter. \ % + \fi + ##1}}% + }% + } + \newcommand\chapter{\clearpage + \thispagestyle{plain}% + \global\@topnum\z@ + \@afterindentfalse + \secdef\@chapter\@schapter% + } + \def\@chapter[#1]#2{\refstepcounter{chapter}% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}% + {\protect\numberline{\thechapter}#1}% + \chaptermark{#1}% + \addtocontents{lof}{\protect\addvspace{10\p@}}% + \addtocontents{lot}{\protect\addvspace{10\p@}}% + \@makechapterhead{#2}% + \@afterheading% + } + \def\@makechapterhead#1{% + \vspace*{50\p@}% + {\parindent \z@ \raggedright \normalfont + \huge\bfseries \@chapapp\space \thechapter + \par\nobreak + \vskip 20\p@ + \interlinepenalty\@M + \Huge \bfseries #1\par\nobreak + \vskip 40\p@ + }% + } +\newcommand*\l@chapter[2]{% + \ifnum \c@tocdepth >\m@ne + \addpenalty{-\@highpenalty}% + \vskip 1.0em \@plus\p@ + \setlength\@tempdima{1.5em}% + \begingroup + \parindent \z@ \rightskip \@pnumwidth + \parfillskip -\@pnumwidth + \leavevmode \bfseries + \advance\leftskip\@tempdima + \hskip -\leftskip + #1\nobreak\hfil + \nobreak\hb@xt@\@pnumwidth{\hss #2% + \kern-\p@\kern\p@}\par + \penalty\@highpenalty + \endgroup + \fi} +\renewcommand*\l@section{\@dottedtocline{1}{1.5em}{2.8em}} +\renewcommand*\l@subsection{\@dottedtocline{2}{3.8em}{3.2em}} +\renewcommand*\l@subsubsection{\@dottedtocline{3}{7.0em}{4.1em}} +\def\partname{Part} +\def\toclevel@part{-1} +\def\maketitle{\chapter{\@title}} +\let\thanks\@gobble +\let\DelayPrintIndex\PrintIndex +\let\PrintIndex\@empty +\providecommand*{\hexnum}[1]{\text{\texttt{\char`\"}#1}} +\makeatother + +\ExplSyntaxOn +\int_set:Nn \l_document_structure_section_level_int {1} +\ExplSyntaxOff + +\clearpage + +{% + \def\\{:}% fix "newlines" in the ToC + \tableofcontents +} + +\clearpage +\pagenumbering{arabic} + +\fi + +\long\def\ignore#1{} + +\begin{sfragment}{What is \sTeX?} + +Formal systems for mathematics (such as interactive theorem provers) +have the potential to significantly increase both the accessibility +of published knowledge, as well as the confidence in its veracity, +by rendering the precise semantics of statements machine actionable. +This allows for a plurality of added-value services, from semantic +search up to verification and automated theorem proving. +Unfortunately, their usefulness is hidden behind severe barriers +to accessibility; primarily related to their surface languages +reminiscent of programming languages and very unlike informal +standards of presentation. + +\sTeX minimizes this gap between informal and formal +mathematics by integrating formal methods into established +and widespread authoring workflows, primarily \LaTeX, via +non-intrusive semantic +annotations of arbitrary informal document fragments. That way +formal knowledge management services become available for informal +documents, accessible via an IDE for authors and via generated +\emph{active} documents for readers, while remaining fully compatible +with existing authoring workflows and publishing systems. + +Additionally, an extensible library of reusable +document fragments is being developed, that serve as reference targets +for global disambiguation, intermediaries for content exchange +between systems and other services. + +Every component of the system is designed modularly and extensibly, +and thus lay the groundwork for a potential full integration of +interactive theorem proving systems into established informal document +authoring workflows. + +\paragraph{} The general \sTeX workflow combines functionalities +provided by several pieces of software: +\begin{itemize} + \item The \sTeX package to use semantic annotations in + {\LaTeX} documents, + \item \RusTeX to convert |tex| sources to (semantically enriched) + |xhtml|, + \item The \mmt software, that extracts semantic information + from the thus generated |xhtml| and provides semantically informed + added value services. +\end{itemize} + + +% ---------------------------- + +\ignore{The objectives of this project will be achieved by developing a +language and system +that uses non-intrusive annotations +to augment informal documents with semantic information +(ranging from \textbf{fully formal} to \textbf{purely informal}) + without +impacting linguistic presentation or document layout. +That way, the system +remains compatible with established publishing +pipelines and practices, while additionally providing flexiformal +information that +enables formal knowledge management services, and hence produces +\emph{rich active documents}, satisfying \textbf{R3}, \textbf{R4} and +\textbf{R5}. +In particular, it will avoid commitment to a fixed logical foundation. +Instead, it will be designed as a modular pipeline of consecutive +and compositional +annotations, semantics extraction and translation steps, extensible +via new structuring mechanisms (\textbf{R1}), library content +(\textbf{R2}), +NLP techniques, foundations, translation methods and +end-user services. + +Naturally, the benefits of formal knowledge management services scale +with the amount of mathematics involved. Consequently I will primarily +focus on those +STEM fields in which mathematical methods are most prominently +used (e.g. mathematics, physics, computer science). Since in those fields +\LaTeX~is the most commonly used scientific writing tool, I will also +primarily focus on \LaTeX~as a development and evaluation target, but +the system will be designed such that all components apart from +the surface language will be integrable with other writing tools +(e.g. WYSIWYG word processors). + +\paragraph{} The basic architecture of the proposed system is sketched in +\autoref{fig:architecture}. +\begin{figure}\centering + \resizebox{0.95\textwidth}{!}{\tikzinput[]{diagram}} + {\small (Note, that the syntax used + in the box on the top right is prototypical and subject to change during the project. + Details and open questions regarding the syntax are discussed here: + \url{https://github.com/KWARC/FoMID/issues/1})} + \caption{Basic Architecture of the Proposed System}\label{fig:architecture} +\end{figure} +A user can write their content using standard \LaTeX\ in an IDE; +ideally using semantic annotations provided by \sTeX +%and the library developed in \OBJref{smglom} +(as in the upper right of +\autoref{fig:architecture}), but not necessarily so. + +The document is converted to xhtml with \omdoc annotations +using \LaTeX ML in the background, +thus becoming actionable by the \mmt system. Both the source document +as well as the generated xhtml/\omdoc are accessible to a natural language +processing pripeline that can supply additional inferred semantic +information or suggest annotations to the user, in the latter case +augmenting the source document directly. This pipeline can use both +classical NLP techniques using the GLIF system, as well as machine +learning models such as \cite{own:fifom}. + +A semiformal fragment is converted +into an appropriate syntax tree (possibly containing opaque +informal nodes), +thus becoming amenable +to flexiformal knowledge management services. In a consecutive step +-- if sufficiently annotated --, these are +additionally translated +to a fully formal foundation, e.g. using the techniques from +\cite{DMueller:phd:19,own:translations}, allowing +more powerful services and conversion to established formal +systems. All three representations +are thus available from within the \mmt system for various +knowledge management services, interfaces for which can be +implemented in the IDE. + +Importantly, every non-trivial arrow in the figure is +composable and extensible -- +translations to a foundation can be provided +by supplying an appropriate formalization and alignment-based +translations (or entirely new methods), +services can be implemented generically using the \mmt API, +NLP techniques can be implemented both inside and alongside of +GLIF, and the concrete syntax within \sTeX can be extended +by convenience macros in \LaTeX\ (enabling new +structuring mechanisms as in \textbf{R1} via +\mmt extensions, see +\cite{MueRabRot:rslffml20}) as well as via additions to +the library, which will be extensible both from within the IDE +as well as on MathHub, +remaining backwards compatible with existing content in a surface +language. Additionally, sufficiently disambiguated +statements can be translated to the syntax of +external systems (such as interactive theorem prover systems +or computer algebra systems), +which can thus be integrated as additional services into the system. +} + +\end{sfragment} + +\begin{sfragment}{Quickstart} + + \begin{sfragment}{Setup} + \begin{sfragment}{The \sTeX IDE} + TODO: VSCode Plugin + \end{sfragment} + \begin{sfragment}{Manual Setup} + Foregoing on the \sTeX IDE, we will need several + pieces of software; namely: + \begin{itemize} + \item \textbf{The \sTeX-Package} available + \href{https://github.com/slatex/sTeX/blob/latex3/doc/stex.pdf}{here}% + \ednote{For now, we require the \texttt{latex3}-branch}. + Note, that the CTAN repository for \LaTeX{} packages + may contain outdated versions of the \sTeX package, so + make sure, that your |TEXMF| system variable is configured such + that the packages available in the linked repository are prioritized + over potential default packages that come with your \TeX{} distribution. + + %If you are only interested in using semantic macros in (ultimately) + %|pdf|s generated by |pdflatex|, this is all you need. + + \item \textbf{The \mmt System} available + \href{https://github.com/uniformal/MMT/tree/sTeX}{here}% + \ednote{For now, we require the \texttt{sTeX}-branch, requiring manually + compiling the MMT sources}. We recommend following + the setup routine documented + \href{https://uniformal.github.io//doc/setup/}{here}. + + Following the setup routine (Step 3) will entail designating + a |MathHub|-directory on your local file system, where + the \mmt system will look for \sTeX/\mmt content archives. + + \item To make sure that \sTeX too knows where to find its + archives, we need to set a global system variable |MATHHUB|, + that points to your local |MathHub|-directory + (see \sref{sec.stexarchives}). + \item \textbf{\sTeX Archives} If we only care about {\LaTeX} and generating |pdf|s, we do not + technically need \mmt at all; however, we still need the |MATHHUB| + system variable to be set. Furthermore, \mmt can make downloading + content archives we might want to use significantly easier, since + it makes sure that all dependencies of (often highly interrelated) + \sTeX archives are cloned as well. + + Once set up, we can run |mmt| in a shell and download an archive along with + all of its dependencies like this: |lmh install <name-of-repository>|, + or a whole \emph{group} of archives; for example, + |lmh install smglom| will download all smglom archives. + \item \textbf{\RusTeX} The \mmt system will also set up \RusTeX for you, + which is used to generate (semantically annotated) + |xhtml| from tex sources. In lieu of using \mmt, you + can also download and use \RusTeX directly + \href{https://github.com/slatex/RusTeX}{here}. + + \end{itemize} + \end{sfragment} + \end{sfragment} + \begin{sfragment}{A First \sTeX Document} + Having set everything up, we can write a first + \sTeX document. As an example, we will use the + |smglom/calculus| and |smglom/arithmetics| archives, + which should be present in the designated |MathHub|-folder. + + The document we will consider is the following: + \begin{framed}\begin{latexcode} +\documentclass{article} +\usepackage{stex} +\usepackage{xcolor} +\def\compemph#1{\textcolor{blue}{#1}} + +\begin{document} + \usemodule[smglom/calculus]{series} + \usemodule[smglom/arithmetics]{realarith} + + The \symref{series}{series} $\infinitesum{n}{1}{ + \realdivide[frac]{1}{ + \realpower{2}{n} + } + }$ \symref{converges}{converges} towards $1$. + +\end{document} + \end{latexcode}\end{framed} + + Compiling this document with |pdflatex| should yield + the output + + \begin{framed} + The \textbf{series} + $\textcolor{blue}{\sum}_{n=1}^{\textcolor{blue}\infty} \frac{1}{2^n}$ + \textbf{converges} towards $1$. + \end{framed} + + Note that the $\sum$ and $\infty$-symbols are highlighted in blue, + and the words ``series'' and ``converges'' in bold. + This signifies that these words and symbols + reference \sTeX \emph{symbols} + formally declared somewhere; associating their + \emph{presentation} in the document with their (formal) + definition - i.e. their semantics. The precise way + in which they are highlighted (if at all) can of course + be customized (see \ednote{somewhere later}). + + \begin{function}{\usemodule} + The command |\usemodule[some/archive]{modulename}| + finds some module in the appropriate archive -- in the first + case (|\usemodule[smglom/calculus]{series}|), \sTeX + looks for the archive |smglom/calculus| in our local + MathHub-directory (see \sref{sec.stexarchives}), and + in its source-folder for a file |series.tex|. Since no such + file exists, and by default the document is assumed to be + in \emph{english}, it picks the file |series.en.tex|, and + indeed, in here we find a statement |\begin{smodule}{series}|. + \iffalse\end{smodule}\fi + + \sTeX now reads this file and makes all semantic macros therein + available to use, along with all its dependencies. + This enables the usage of |\infinitesum| later on. + + Analogously, |\usemodule[smglom/arithmetics]{realarith}| + opens the file |realarith.en.tex| in the |.../smglom/arithmetics/source|-folder + and makes its contents available, e.g. |\realdivide| and |\realpower|. + \end{function} + + \begin{function}{\symref,\symname} + The command |\symref{symbolname}{text}| marks the |text| + in the second argument as representing the |symbolname| + in the first argument -- which is why the word ``series'' + is set in boldface. In the pdf, this is all that happens. + In the |xhtml| (which we will investigate shortly) however, + we will note that the word ``series'' is now annotated with the + full URI of the symbol denoting the \emph{mathematical concept of + a series}. In other words, the word is associated with an unambiguous + semantics. + + Notably, in both cases above (\emph{series} and \emph{converges}) + the text that \emph{references} the symbol and the name of the symbol + are identical. Since this occurs quite often, the shorthand + |\symname{converges}| would have worked as well, where + |\symname{foo-bar}| behaves exactly like |\symref{foo-bar}{foo bar}| + - i.e. the text is simply the name of the symbol with ``|-|'' replaced by + a space. + \end{function} + + \begin{function}{\importmodule} + If you investigated the contents of the imported modules + (|realarith| and |series|) more closely, you'll note that + none of them contain a symbol ``|converges|''. Yet, we + can use |\symref| to refer to ``converges''. That is because + the symbol |converges| is found in + |smglom/calculus/source/sequenceConvergence.en.tex|, and + |series.en.tex| contains the line + |\importmodule{sequenceConvergence}|. The |\importmodule|-statement + makes the module referenced available to all documents + that include the current module. As such, a ``current module'' + has to exist for |\importmodule| to work, which is why the command + is only allowed within a |module|-environment. + \end{function} + + \textcolor{red}{TODO} explain |xhtml| conversion, MMT compilation + (requires an archive...?). + + \end{sfragment} +\end{sfragment} + +\begin{sfragment}{Using \sTeX} + \input{packages/stex-basics} + + \input{packages/stex-terms} + + \input{packages/stex-references} +\end{sfragment} + +\begin{sfragment}[id=sec.stexarchives]{\sTeX Archives} + \input{packages/stex-mathhub} +\end{sfragment} + +\begin{sfragment}{Creating New Modules and Symbols} + \textcolor{red}{TODO} + + \stexexample{ + \begin{smodule}{assoctest} + \symdef{foo}[args=iia]{\comp{a:}#1\comp{;b:}#2\comp{;c:}#3}{\comp[#1\comp{;}##1\comp+##2\comp;#2\comp]} + $\foo {w_1}{w_2}{x,y,z}$ + \end{smodule} + } + + \input{packages/stex-modules} + + \input{packages/stex-symbols} + + \input{packages/stex-inheritance} + + \begin{sfragment}{Advanced Structuring Mechanisms} + \input{packages/stex-features} + \end{sfragment} + \begin{sfragment}{Primitive Symbols (The \sTeX Metatheory)} + \input{packages/stex-metatheory} + \end{sfragment} +\end{sfragment} + +\begin{sfragment}{\sTeX Statements (Definitions, Theorems, Examples, ...)} + \input{packages/stex-statements} + + \input{packages/stex-proofs} +\end{sfragment} + +\begin{sfragment}{Additional Packages} + \input{packages/stex-tikzinput} + \begin{sfragment}{Modular Document Structuring} + \input{packages/stex-document-structure} + \end{sfragment} + \begin{sfragment}{Slides and Course Notes} + \input{packages/stex-slides} + \end{sfragment} + \begin{sfragment}{Homework, Problems and Exams} + \input{packages/stex-problem} + + \input{packages/stex-hwexam} + \end{sfragment} + +\end{sfragment} + +\chapter{Stuff} + +\section{Modules} + + +\begin{function}{\sTeX , \stex} + Both print this \stex logo. +\end{function} + + \subsection{Semantic Macros and Notations} + + Semantic macros invoke a formally declared symbol. + + To declare a symbol (in a module), we use \cs{symdecl}, + which takes as argument the name of the corresponding + semantic macro, e.g. |\symdecl{foo}| introduces the macro + \cs{foo}. Additionally, \cs{symdecl} takes several options, + the most important one being its arity. |foo| as declared above + yields a \emph{constant} symbol. To introduce an \emph{operator} + which takes arguments, we have to specify which arguments it takes. + + \begin{smodule}{SemanticMacrosExample} + For example, to introduce binary multiplication, + we can do |\symdecl{mult}[args=2]|. We can then supply + the semantic macro with arbitrarily many notations, such as + |\notation{mult}{#1 #2}|. + + \stexexample{ + \symdecl{mult}[args=2] + \notation{mult}{#1 #2} + $\mult{a}{b}$ +} + + Since usually, a freshly introduced symbol also comes with a + notation from the start, the \cs{symdef} command combines + \cs{symdecl} and \cs{notation}. So instead of the above, + we could have also written + \begin{center} |\symdef{mult}[args=2]{#1 #2}| \end{center} + + \symdecl{mult}[args=2] + \notation{mult}{#1 #2} + + \notation{mult}[cdot]{#1 \comp{\cdot} #2} + \notation{mult}[times]{#1 \comp{\times} #2} + Adding more notations like + |\notation{mult}[cdot]{#1 \comp{\cdot} #2}| or + |\notation{mult}[times]{#1 \comp{\times} #2}| + allows us to write |$\mult[cdot]{a}{b}$| and + |$\mult[times]{a}{b}$|: + \stexexample{ + \notation{mult}[cdot]{#1 \comp{\cdot} #2} + \notation{mult}[times]{#1 \comp{\times} #2} + $\mult[cdot]{a}{b}$ and $\mult[times]{a}{b}$ +} + \notation{mult}[cdot]{#1 \comp{\cdot} #2} + \notation{mult}[times]{#1 \comp{\times} #2} + + Not using an explicit option with a semantic macro yields + the first declared notation, unless changed\ednote{TODO}. + + Outside of math mode, or by using the starred variant + |\foo*|, allows to provide a custom notation, where + notational (or textual) components can be given + explicitly in square brackets. + \stexexample{ + $\mult*{\arg{a}\comp{\ast}\arg{b}}$ is the + \mult{\comp{product of} \arg{$a$} \comp{and} \arg{$b$}} +} + + In custom mode, prefixing an argument with a star will not + print that argument, but still export it to \omdoc: + \stexexample{ + \mult{\comp{Multiplying} \arg*{$\mult{a}{b}$} again by \arg{$b$}} yields... +} + The syntax |*[|\meta{int}|]| allows switching + the order of arguments. For example, given a 2-ary semantic + macro |\forevery| with exemplary notation + |\forall #1. #2|, we can write + \stexexample{ + \symdecl{forevery}[args=2] + \forevery{\arg[2]{The proposition $P$} \comp{holds for every} \arg[1]{$x\in A$}} +} + + When using |*[|$n$|]|, after reading the provided ($n$th) argument, + the ``argument counter'' automatically + continues where we left off, so the |*[1]| in the above example + can be omitted. + + For a macro with arity $>0$, we can refer to the operator + \emph{itself} semantically by suffixing the semantic macro + with an exclamation point |!| in either text or math mode. + For that reason \cs{notation} (and thus \cs{symdef}) take an + additional optional argument |op=|, which allows to assign + a notation for the operator itself. e.g. + \stexexample{ + \symdef{add}[args=2,op={+}]{#1 \comp+ #2} + The operator $\add!$ adds two elements, as in $\add ab$. + } + + |*| is composable with |!| for custom notations, as in: + + \stexexample{ + \mult!{\comp{Multiplication}} (denoted by $\mult!*{\comp\cdot}$) is defined by... +} + + The macro \cs{comp} as used everywhere above is responsible + for highlighting, linking, and tooltips, and should be wrapped + around the notation (or text) components that should be treated + accordingly. While it is attractive to just wrap a whole notation, + this would also wrap around e.g. the arguments themselves, so + instead, the user is tasked with marking the notation components + themself. + + The precise behaviour of \cs{comp} is governed by + the macro \cs{@comp}, which takes two arguments: The tex code + of the text + (unexpanded) to highlight, and the URI of the current symbol. + \cs{@comp} can be safely redefined to customize the behaviour. + + + The starred variant |\symdecl*{foo}| does not introduce a semantic + macro, but still declares a corresponding symbol. |foo| (like + any other symbol, for that matter) can + then be accessed via \cs{STEXsymbol}|{foo}| or (if |foo| was declared + in a module |Foo|) via \cs{STEXModule}|{Foo}?{foo}|. + + both \cs{STEXsymbol} and \cs{STEXModule} take any + arbitrary ending segment of a full URI to determine + which symbol or module is meant. e.g. + \cs{STEXsymbol}|{Foo?foo}| is also valid, as are e.g. + \cs{STEXModule}|{path?Foo}?{foo}| or + \cs{STEXsymbol}|{path?Foo?foo}| + + There's also a convient shortcut \cs{symref}|{?foo}{some text}| for + \cs{STEXsymbol}|{?foo}![some text]|. + + \end{smodule} + + \subsubsection{Other Argument Types} + + So far, we have stated the arity of a semantic macro directly. + This works if we only have ``normal'' (or more precisely: |i|-type) arguments. + To make use of other argument types, instead of providing the arity + numerically, we can provide it as a sequence of characters representing + the argument types -- e.g. instead of writing |args=2|, we + can equivalently write |args=ii|, indicating that the macro + takes two |i|-type arguments. + + Besides |i|-type arguments, \sTeX has two other types, which we will + discuss now. + + The first are \emph{binding} (|b|-type) arguments, representing + variables that are \emph{bound} by the operator. This is the + case for example in the above \cs{forevery}-macro: + The first argument is not actually an argument that the + |forevery| ``function'' is ``applied'' to; rather, the first argument + is a new variable (e.g. $x$) that is \emph{bound} in the subsequent + argument. More accurately, the macro should therefore have been + implemented thusly: + \begin{center}|\symdef{forevery}[args=bi]{\forall #1.\; #2}|\end{center} + + \begin{smodule}{OtherArgs} + |b|-type arguments are indistinguishable from |i|-type arguments + within \sTeX, but are treated very differently in \omdoc and by \mmt. + More interesting \emph{within} \sTeX are |a|-type arguments, + which represent (associative) arguments of flexible arity, which are + provided as comma-separated lists. + This allows e.g. better representing the \cs{mult}-macro above: + + \stexexample{ + \symdef{mult}[args=a]{#1}{##1 \comp\cdot ##2} + $\mult{a,b,c,{d^e},f}$ +} + As the example above shows, notations get a little more complicated + for associative arguments. For every |a|-type argument, the + \cs{notation}-macro takes an additional argument that declares + how individual entries in an |a|-type argument list are aggregated. + The first notation argument then describes how the aggregated + expression is combined into the full representation. + + For a more interesting example, consider a flexary operator + for ordered sequences in ordered set, that taking + arguments |{a,b,c}| and |\mathbb{R}| prints + $a \leq b \leq c\in \mathbb R$. This operator takes + two arguments (an |a|-type argument and an |i|-type argument), + aggregates the individuals of the associative argument using |\leq|, + and combines the result with |\in| and the second argument thusly: + + \stexexample{ + \symdef{numseq}[args=ai]{#1 \comp\in #2}{##1 \comp\leq ##2} + $\numseq{a,b,c}{\mathbb R}$ +} + + Finally, |B|-type arguments combine the functionalities of |a| + and |b|, i.e. they represent flexary binding operator arguments. + +\ednote{what about e.g. \detokenize{\int_x\int_y\int_z f dx dy dz}?} +\ednote{``decompose'' a-type arguments into fixed-arity operators?} + + \end{smodule} + + \subsubsection{Precedences} + + Every notation has an (upwards) \emph{operator precedence} and + for each argument a (downwards) \emph{argument precedence} + used for automated bracketing. For example, a notation + for a binary operator \cs{foo} could be declared like this: + \begin{center} |\notation{foo}[prec=200;500x600]{#1 \comp{+} #2}| \end{center} + assigning an operator precedence of 200, an argument precedence + of 500 for the first argument, and an argument precedence of 600 + for the second argument. + + \sTeX insert brackets thusly: Upon encountering a semantic + macro (such as \cs{foo}), its operator precedence (e.g. 200) + is compared to the current downwards precedence (initially + \cs{neginfprec}). If the operator precedence is \emph{larger} + than the current downwards precedence, parentheses are inserted + around the semantic macro. + + Notations for symbols of arity 0 have a default precedence of \cs{infprec}, + i.e. by default, parentheses are never inserted around constants. + Notations for symbols with arity $>0$ have a default operator + precedence of $0$. + If no argument precedences are explicitly provided, then by + default they are equal to the operator precedence. + + Consequently, if some operator $A$ should bind stronger than + some operator $B$, then $A$s operator precedence should be + smaller than $B$s argument precedences. + + For example: + \begin{smodule}{NotationsEx} + \symdecl{plus}[args=2] + \symdecl{times}[args=2] + \stexexample{ +\notation{plus}[prec=100]{#1 \comp{+} #2} +\notation{times}[prec=50]{#1 \comp{\cdot} #2} +$\plus{a}{\times{b}{c}}$ and $\times{a}{\plus{b}{c}}$ +} + + + \end{smodule} + + \subsection{Archives and Imports} + + \subsubsection{Namespaces} + Ideally, \sTeX would use arbitrary URIs for modules, with no + forced relationships between the \emph{logical} namespace + of a module and the \emph{physical} location of the file + declaring the module -- like \mmt does things. + + Unfortunately, \TeX\ only provides very restricted access to + the file system, so we are forced to generate namespaces + systematically in such a way that they reflect the physical + location of the associated files, so that \sTeX can resolve + them accordingly. Largely, users need not concern themselves + with namespaces at all, but for completenesses sake, we describe + how they are constructed: + + \begin{itemize} + \item If \cs{begin}|{module}{Foo}| occurs in a file + |/path/to/file/Foo[.|\meta{lang}|].tex| which does not belong + to an archive, the namespace is |file://path/to/file|. + \item If the same statement occurs in a file + |/path/to/file/bar[.|\meta{lang}|].tex|, the namespace is + |file://path/to/file/bar|. + \end{itemize} + + In other words: outside of archives, the namespace corresponds to + the file URI with the filename dropped iff it is equal to the + module name, and ignoring the (optional) language suffix^^A + \footnote{which is internally attached to the module name instead, + but a user need not worry about that.}. + + If the current file is in an archive, the procedure is the same + except that the initial segment of the file path up to the archive's + |source|-folder is replaced by the archive's namespace URI. + + \subsubsection{Paths in Import-Statements} + + Conversely, here is how namespaces/URIs and file paths are computed + in import statements, examplary \cs{importmodule}: + + \begin{itemize} + \item \cs{importmodule}|{Foo}| outside of an archive refers + to module |Foo| in the current namespace. Consequently, |Foo| + must have been declared earlier in the same document or, if not, + in a file |Foo[.|\meta{lang}|].tex| in the same directory. + \item The same statement \emph{within} an archive refers to either + the module |Foo| declared earlier in the same document, or + otherwise to the module |Foo| in the archive's top-level namespace. + In the latter case, is has to be declared in a file |Foo[.|\meta{lang}|].tex| + directly in the archive's |source|-folder. + \item Similarly, in \cs{importmodule}|{some/path?Foo}| the path + |some/path| refers to either the sub-directory and relative + namespace path of the current directory and namespace outside of an archive, + or relative to the current archive's top-level namespace and |source|-folder, + respectively. + + The module |Foo| must either be declared in the file + \meta{top-directory}|/some/path/Foo[.|\meta{lang}|].tex|, or in + \meta{top-directory}|/some/path[.|\meta{lang}|].tex| (which are + checked in that order). + \item Similarly, \cs{importmodule}|[Some/Archive]{some/path?Foo}| + is resolved like the previous cases, but relative to the archive + |Some/Archive| in the mathhub-directory. + \item Finally, \cs{importmodule}|{full://uri?Foo}| naturally refers to the + module |Foo| in the namespace |full://uri|. Since the file this module + is declared in can not be determined directly from the URI, the module + must be in memory already, e.g. by being referenced earlier in the + same document. + + Since this is less compatible with a modular development, using full + URIs directly is discouraged. + + \end{itemize} + + + + +\csname if@infulldoc\endcsname\else\end{document}\fi diff --git a/Master/texmf-dist/doc/latex/stex/stex/README b/Master/texmf-dist/doc/latex/stex/stex/README deleted file mode 100644 index d07ccbb7c66..00000000000 --- a/Master/texmf-dist/doc/latex/stex/stex/README +++ /dev/null @@ -1,6 +0,0 @@ -stex.sty: Semantic TeX (the packages all at once) - -Copyright (c) 2008 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ diff --git a/Master/texmf-dist/doc/latex/stex/stex/stex.pdf b/Master/texmf-dist/doc/latex/stex/stex/stex.pdf Binary files differdeleted file mode 100644 index 5dc9e725865..00000000000 --- a/Master/texmf-dist/doc/latex/stex/stex/stex.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/structview/README b/Master/texmf-dist/doc/latex/stex/structview/README deleted file mode 100644 index 1ca4729991b..00000000000 --- a/Master/texmf-dist/doc/latex/stex/structview/README +++ /dev/null @@ -1,19 +0,0 @@ -modules.sty: An Infrastructure for Semantic Macros and Module Scoping - -The modules package supplies an infrastructure that allows mark up semantic macros -and to reuse them efficiently in multiple environments. - -This packge is a central part of the sTeX collection, 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). - -This package supplies a definition mechanism for semantic macros and a non-standard -scoping construct for them, which is oriented at the semantic depency relation rather -than the document structure. This structure can be used by MKM systems for -added-value services, either directly from the sTeX sources, or after translation. - -Copyright (c) 2008 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ diff --git a/Master/texmf-dist/doc/latex/stex/structview/structview.pdf b/Master/texmf-dist/doc/latex/stex/structview/structview.pdf Binary files differdeleted file mode 100644 index 59cf5cd8c95..00000000000 --- a/Master/texmf-dist/doc/latex/stex/structview/structview.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/tikzinput/README b/Master/texmf-dist/doc/latex/stex/tikzinput/README deleted file mode 100644 index a28883e681b..00000000000 --- a/Master/texmf-dist/doc/latex/stex/tikzinput/README +++ /dev/null @@ -1,7 +0,0 @@ -tikzinput.sty: A LaTeX Package for selective input of external TIKZ diagrams - -Copyright (c) 2010 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ - diff --git a/Master/texmf-dist/doc/latex/stex/tikzinput/tikzinput.pdf b/Master/texmf-dist/doc/latex/stex/tikzinput/tikzinput.pdf Binary files differdeleted file mode 100644 index 9fc656381db..00000000000 --- a/Master/texmf-dist/doc/latex/stex/tikzinput/tikzinput.pdf +++ /dev/null diff --git a/Master/texmf-dist/doc/latex/stex/workaddress/README b/Master/texmf-dist/doc/latex/stex/workaddress/README deleted file mode 100644 index f21270b169d..00000000000 --- a/Master/texmf-dist/doc/latex/stex/workaddress/README +++ /dev/null @@ -1,9 +0,0 @@ -workaddress.sty: An Infrastructure for marking up Affiliation Metadata in LaTeX documents - -The workaddress packge allows Affiliation and Address Metadata in LaTeX documents that can be -harvested by automated tools or exported to PDF. - -Copyright (c) 2011 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -Project home: https://github.com/KWARC/sTeX/ diff --git a/Master/texmf-dist/doc/latex/stex/workaddress/workaddress.pdf b/Master/texmf-dist/doc/latex/stex/workaddress/workaddress.pdf Binary files differdeleted file mode 100644 index 3a8d073de31..00000000000 --- a/Master/texmf-dist/doc/latex/stex/workaddress/workaddress.pdf +++ /dev/null |