diff options
author | Norbert Preining <norbert@preining.info> | 2022-02-26 03:00:34 +0000 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2022-02-26 03:00:34 +0000 |
commit | 740a11f29a3551babe3d7edbb57ac3baa2280a3f (patch) | |
tree | 5d6d449e762f5ab95042e3517d03c5ac3ddaf7c3 /macros/latex/contrib/stex/sty | |
parent | 157cc9e776520d0b7d488317a69a10d4ae4d493b (diff) |
CTAN sync 202202260300
Diffstat (limited to 'macros/latex/contrib/stex/sty')
96 files changed, 0 insertions, 14769 deletions
diff --git a/macros/latex/contrib/stex/sty/cmath/README b/macros/latex/contrib/stex/sty/cmath/README deleted file mode 100644 index 79e7d919e5..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/cmath/cmath.dtx b/macros/latex/contrib/stex/sty/cmath/cmath.dtx deleted file mode 100644 index 109d658e46..0000000000 --- a/macros/latex/contrib/stex/sty/cmath/cmath.dtx +++ /dev/null @@ -1,330 +0,0 @@ -% \iffalse meta-comment -% An Infrastructure for Presenting Semantic Macros in sTeX -% Copyright (C) 2004-2007 Michael Kohlhase, all rights reserved -% This file is released under the LaTeX Project Public License (LPPL) -% -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<package>\ProvidesPackage{cmath}[2019/03/20 v0.1 inline content math] -% -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage{url,array,float,amstext,alltt} -\usepackage{modules,cmath,stex-logo} -\usepackage[show]{ed} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{ctangit} -\usepackage{hyperref} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\def\githubissue#1{\cite{sTeX:github:on}, \hyperlink{https://github.com/KWARC/sTeX/issues/#1}{issue #1}} -\begin{document} -\RecordChanges -\DocInput{cmath.dtx} -\end{document} -%</driver> -% \fi -% -% \CheckSum{84} -% -% \changes{v0.2}{2016/02/12}{First Version with Documentation, extracted variables stuff -% from \texttt{presentation.dtx}} -% \changes{v0.2}{2016/02/12}{reinstating id macros from \texttt{latexml.sty}} -% \GetFileInfo{cmath.sty} -% -% \MakeShortVerb{\|} -%\def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} -% \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}} -% \title{{\texttt{cmath.sty}}: An Infrastructure for building Inline Content Math in -% {\stex}\thanks{Version {\fileversion} (last revised {\filedate})}} -% \author{Michael Kohlhase \\ -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}\and -% Deyan Ginev\\Authorea} -% \date{\today} -% \maketitle -% -% \begin{abstract} -% The |cmath| package 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 {\TeX/\LaTeX} into a document format -% for mathematical knowledge management (MKM). -% -% This package supplies an infrastructure that allows to build content math expressions -% (strict content MathML or OpenMath objects) in the text. This is needed whenever the -% head symbols of expressions are variables and can thus not be treated via the -% |\symdef| mechanism in \stex. -% \end{abstract} -% -% \newpage\setcounter{tocdepth}{2}\tableofcontents\newpage -% -%\section{Introduction}\label{sec:intro} -% -% \stex allows to build content math expressions via the |\symdef| -% mechanism~\cite{KohAmb:smmssl:ctan} if their heads are constants. For instance, if we -% have defined |\symdef{lt}[2]{#1<#2}| in the module |relation1|, then an invocation of -% |\lt3a| will be transformed to -% \begin{verbatim} -% <OMA> -% <OMS cd="relation1" name="lt"/> -% <OMI>3</OMI> -% <OMV name="a"/> -% </OMA> -% \end{verbatim} -% If the head of the expression (i.e. the function symbol in this case) is a variable, -% then we cannot resort to a |\symdef|, since that would define the functional equivalent -% of a logical constant. Sometimes, {\latexml} can figure out that when we write $f(a,b)$ -% that $f$ is a function (especially, if we declare them to be via the |functions=| key in -% the dominating statement environment~\cite{Kohlhase:smmtf:ctan}). But sometimes, we want -% to be explicit, especially for $n$-ary functions and in the presence of elided elements -% in argument sequences. A related problem is markup for complex variable names, such as -% $x_{\text{left}}$ or $ST^*$. -% -% The |cmath| package supplies the {\LaTeX} bindings that allow us to -% achieve this. -% -% \section{The User Interface}\label{sec:user} -% -% \subsection{Variable Names}\label{sec:inter:vname} -% -% In mathematics we often use complex variable names like $x'$, $g_n$, $f^1$, -% $\widetilde\phi_i^j$ or even $foo$; for presentation-oriented {\LaTeX}, this is not a -% problem, but if we want to generate content markup, we must show -% explicitly that those are complex identifiers (otherwise the -% variable name $foo$ might be mistaken for the product $f\cdot -% o\cdot o$). In careful mathematical typesetting, |$sin$| is distinguished from |$\sin$|, -% but we cannot rely on this effect for variable names. -% -% \DescribeMacro{\vname} |\vname| identifies a token sequence as a name, and allows the -% user to provide an ASCII ({\xml}-compatible) identifier for it. The optional argument is -% the identifier, and the second one the LaTeX representation. The identifier can also be -% used with \DescribeMacro{\vname} |\vnref| for referencing. So, if we have used -% |\vnname[xi]{x_i}|, then we can later use |\vnref{xi}| as a short name for -% |\vname{x_i}|. Note that in output formats that are capable of generating structure -% sharing, |\vnref{xi}| would be represented as a -% cross-reference.\ednote{DG: Do we know whether using the same name -% in two vname invocations, would refer to two instances of the same variable? Presumably so, since the names are the same? We should make this explicit in the -% text. A different variable would e.g. have a name ``xi2'', but the same body} -% -% Since indexed variable names make a significant special case of complex identifiers, we -% provides the macros \DescribeMacro{\livar}|\livar| that allows to mark up variables with -% lower indices. If |\livar| is given an optional first argument, this is taken as a -% name. Thus |\livar[foo]{x}1| is ``short'' for |\vname[foo]{x_1}|. The macros -% \DescribeMacro{\livar}|\livar|, serve the analogous purpose for variables with upper -% indices, and \DescribeMacro{\ulivar}|\ulivar| for upper and lower indices. Finally, -% \DescribeMacro{\primvar}|\primvar| and \DescribeMacro{\pprimvar}|\pprimvar| do the same -% for variables with primes and double primes (triple primes are bad style). -% -% \subsection{Applications}\label{sec:user:appl} -% -% To construct a content math application of the form $f(a_1,\ldots,a_n)$ with concrete -% arguments $a_i$ (i.e. without elisions), then we can use the -% \DescribeMacro{\nappa}|\nappa| macro. If we have elisions in the arguments, then we -% have to interpret the arguments as a sequence of argument constructors applied to the -% respective positional indexes. We can mark up this situation with the -% \DescribeMacro{\nappf}|\nappf| macro: -% |\nappf{|\meta{fun}|}{|\meta{const}|}{|\meta{first}|}{|\meta{last}|}| where \meta{const} -% is a macro for the constructor is presented as -% $\meta{fun}(\meta{const}\meta{first},\ldots,\meta{const}\meta{last})$; see -% Figure~\ref{fig:application} for a concrete example, and -% Figure~\ref{fig:application-result}.\ednote{MK@MK: we need a meta-cd |cmath| with the -% respective notation definition here. It is very frustrating that we cannot even really -% write down the axiomatization of flexary constants in OpenMath.} -% -% \begin{figure}\centering -% \begin{tabular}{|l|l|}\hline -% \verb|\nappa{f}{a_1,a_2,a_3}| & $\nappa{f}{a_1,a_2,a_3}$\\\hline -% \verb|\nappe{f}{a_1}{a_n}| & $\nappe{f}{a_1}{a_n}$\\\hline -% \verb|\symdef{eph}[1]{e_{#1}^{\varphi(#1)}}|& $\def\foo#1{e_{#1}^{\varphi(#1)}}\nappf{g}\foo14$\\ -% \verb|\nappf{g}\eph14| -% & \\\hline -% \verb|\nappli{f}a1n| & $\nappli{f}a1n$\\\hline -% \verb|\nappui{f}a1n| & $\nappui{f}a1n$\\\hline -% \end{tabular} -% \caption{Application Macros}\label{fig:application} -% \end{figure} -% -% For a simple elision in the arguments, we can use -% \DescribeMacro{\nappe}|\nappe{|\meta{fun}|}{|\meta{first}|}{|\meta{last}|}| will be -% formatted as $\meta{fun}(\meta{first},\ldots,\meta{last})$. Note that this is quite -% un-semantic (we have to guess the sequence), so the use of |\nappe| is discouraged. -% -% A solution to this situation is if we can think of the arguments as a finite sequence -% $a=:(a_i)_{l\leq i\leq h}$, then we can use \DescribeMacro -% {\nappli}|\nappli{|\meta{fun}|}{|\meta{seq}|}{|\meta{start}|}{|\meta{end}|}|, where -% \meta{seq} is the sequence, and the remaining arguments are the start and end index. The -% \DescribeMacro{\nappui} works like |\nappli|, but uses upper indices in the -% presentation. -% -% \begin{exfig}\centering -% \begin{verbatim} -% \symdef{eph}[1]{e_{#1}^{\phi(#1)}} -% \nappf{g}\eph14 -% \end{verbatim} -% currently generates -% \begin{verbatim} -% <OMA> -% <OMS cd="cmath" name="apply-from-to"/> -% <OMV name="g"/> -% <OMBIND> -% <OMS cd="fns1" name="lambda"/> -% <OMBVAR><OMV name="x"/></OMBVAR> -% <OMA><OMS cd="???" name="eph"/><OMV name="x"/></OMA> -% </OMBIND> -% <OMI>1</OMI> -% <OMI>4</OMI> -% </OMA> -% \end{verbatim} -% \caption{Application Macros}\label{fig:application-result} -% \end{exfig} -% -% \subsection{Binders}\label{sec:user:bind} -%\ednote{MK: document} -% -% \subsection{Sharing}\label{sec:user:sharing} -% We (currently) use the -% -% \section{Limitations}\label{sec:limitations} -% -% In this section we document known limitations. If you want to help alleviate them, -% please feel free to contact the package author. Some of them are currently discussed in -% the \sTeX GitHub repository~\cite{sTeX:github:on}. -% \begin{enumerate} -% \item none reported yet -% \end{enumerate} -% -% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography} -% -% \section{The Implementation}\label{sec:implementation} -% -% \subsection{Package Options}\label{sec:impl:options} -% -% The |cmath| package does not take options (at the moment), but we pass any we get to the -% |presentation| package. -% -% \begin{macrocode} -%<*package> -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{presentation}} -\ProcessOptions -% \end{macrocode} -% -% The next measure is to ensure that some {\sTeX} packages are loaded. For {\latexml}, we -% also initialize the package inclusions, there we do not need |ntheorem|, since the XML -% does not do the presentation. -% \begin{macrocode} -\RequirePackage{presentation} -% \end{macrocode} - -% \subsection{Variable Names}\label{sec:impl:vname} -% -% \begin{macro}{\vname} -% a name macro; the first optional argument is an identifier \meta{id}, this is standard -% for {\LaTeX}, but for {\latexml}, we want to generate attributes -% |xml:id="cvar.|\meta{id}|"| and |name="|\meta{id}|"|. However, if no id was given in -% we default them to |xml:id="cvar.|\meta{count}|"| and -% |name="name.cvar.|\meta{count}|"|. -% \begin{macrocode} -\newcommand\vname[2][]{#2% -\def\@opt{#1}% -\ifx\@opt\@empty\else\expandafter\gdef\csname MOD@name@#1\endcsname{#2}\fi} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\vnref} -% \begin{macrocode} -\def\vnref#1{\csname MOD@name@#1\endcsname} -% \end{macrocode} -% \end{macro} -% \ednote{the following macros are just ideas, they need to be implemented and documented} -% \begin{macro}{\uivar} -% constructors for variables. -% \begin{macrocode} -\newcommand\primvar[2][]{\vname[#1]{#2^\prime}} -\newcommand\pprimvar[2][]{\vname[#1]{#2^{\prime\prime}}} -\newcommand\uivar[3][]{\vname[#1]{{#2}^{#3}}} -\newcommand\livar[3][]{\vname[#1]{{#2}_{#3}}} -\newcommand\ulivar[4][]{\vname[#1]{{#2}^{#3}_{#4}}} -% \end{macrocode} -% \end{macro} -% -% \subsection{Applications}\label{sec:impl:appl} -% -% \begin{macro}{\napp*} -% \ednote{document keyval args above and implement them in LaTeXML} -% \begin{macrocode} -\newcommand\nappa[3][]{\prefix[#1]{#2}{#3}} -\newcommand\nappe[4][]{\nappa[#1]{#2}{#3,\ldots,#4}} -\newcommand\nappf[5][]{\nappe[#1]{#2}{#3{#4}}{#3{#5}}} -\newcommand\nappli[5][]{\nappe[#1]{#2}{#3_{#4}}{#3_{#5}}} -\newcommand\nappui[5][]{\nappe[#1]{#2}{#3^{#4}}{#3^{#5}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\anapp*} -% \ednote{document anapp* and implement in LaTeXML (i.e. get the presentation -% information into the OM/MathML).} -% \begin{macrocode} -\newcommand\anappa[3][]{\assoc[#1]{#2}{#3}} -\newcommand\anappe[4][]{\anappa[#1]{#2}{#3,\ldots,#4}} -\newcommand\anappf[5][]{\anappe[#1]{#2}{#3{#4}}{#3{#5}}} -\newcommand\anappli[5][]{\anappe[#1]{#2}{#3_{#4}}{#3_{#5}}} -\newcommand\anappui[5][]{\anappe[#1]{#2}{#3^{#4}}{#3^{#5}}} -% \end{macrocode} -% \end{macro} -% -% \subsection{Binders}\label{sec:impl:bind} -% -% \subsection{Sharing}\label{sec:user:sharing} -% These macros are lifted from Bruce Miller's |latexml.sty|, we do not want the rest. -% \begin{macro}{\LXMID} -% \begin{macrocode} -\def\LXMID#1#2{\expandafter\gdef\csname xmarg#1\endcsname{#2}\csname xmarg#1\endcsname} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\LXMRef} -% \begin{macrocode} -\def\LXMRef#1{\csname xmarg#1\endcsname} -%</package> -% \end{macrocode} -% \end{macro} -% \Finale -\endinput -% -% Local Variables: -% mode: doctex -% TeX-master: t -% End: -% -% LocalWords: iffalse NeedsTeXFormat cmath cmath.dtx texttt presentation.dtx scsys sc -% LocalWords: sc mathml omdoc latexml cmathml activemath twintoo atwin atwintoo stex lt -% LocalWords: fileversion filedate maketitle symdef newpage setcounter tocdepth newpage -% LocalWords: tableofcontents ary widetilde cdot vname vname vnref vnname ednote livar -% LocalWords: livar ulivar ulivar primvar primvar pprimvar pprimvar ldots nappa nappa -% LocalWords: nappf nappf hline nappe eph varphi nappli nappli firstarg lastarg exfig -% LocalWords: compactenum printbibliography textsf langle rangle textsf langle rangle -% LocalWords: ltxml cvar newcommand ifx expandafter gdef csname endcsname ltx uivar leq -% LocalWords: napp nappui sequencefromto endinput seq - diff --git a/macros/latex/contrib/stex/sty/cmath/cmath.ins b/macros/latex/contrib/stex/sty/cmath/cmath.ins deleted file mode 100644 index 417eb8500e..0000000000 --- a/macros/latex/contrib/stex/sty/cmath/cmath.ins +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% This file generates files required to use the ed package. -%% At your command prompt write -%% -%% latex cmath.ins -%% -%% Copyright(c) 2011 Michael Kohlhase -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{cmath.sty}{\from{cmath.dtx}{package}}} - -\Msg{*} -\Msg{* You probably need to move the generated style files into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} - -\nopreamble\nopostamble -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/cmath/cmath.pdf b/macros/latex/contrib/stex/sty/cmath/cmath.pdf Binary files differdeleted file mode 100644 index d5ceb08c58..0000000000 --- a/macros/latex/contrib/stex/sty/cmath/cmath.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/dcm/README b/macros/latex/contrib/stex/sty/dcm/README deleted file mode 100644 index 34ce1bcdb9..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/dcm/dcm.dtx b/macros/latex/contrib/stex/sty/dcm/dcm.dtx deleted file mode 100644 index 0d8e32cc20..0000000000 --- a/macros/latex/contrib/stex/sty/dcm/dcm.dtx +++ /dev/null @@ -1,505 +0,0 @@ -% \iffalse meta-comment -% An Infrastructure for marking up Dublin Core Metadata in LaTeX documents -% Copyright (c) 2007-2011 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<*package> -\NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{dcm}[2019/03/20 v0.3 Dublin Core Metadata] -%</package> -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage{dcm,modules,stex-logo,url,array,float} -\usepackage[show]{ed} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{ctangit} -\usepackage{hyperref} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\WAperson[id=jdoe,affiliation=dfki,department=skss, - url=http://dfki.de/jdoe] - {John Doe} -\WAperson[id=miko,affiliation=jacu,department=case, - url=http://kwarc.info/kohlhase] - {Michael Kohlhase} -\WAinstitution[id=case,acronym=CASE,shortname=Center for Adv. Sys. Engineering, - url=http://jacobs-university.de/ses/case,partof=jacu] - {Center for Advanced Systems Engineering} -\WAinstitution[id=jacu,url=http://jacobs-university.de] - {Jacobs University Bremen} -\WAinstitution[id=skss,url=http://dfki.de/sks,partof=dfki,shortname=Safe\&Secure Cognitive -Systems,acronym=SKS] - {Safe and Secure Cognitive Systems} -\WAinstitution[id=dfki,url=http://dfki.de,shortname=DFKI,acronym=DFKI] - {German Research Center for Artificial Intelligence} -\def\githubissue#1{\cite{sTeX:github:on}, \hyperlink{https://github.com/KWARC/sTeX/issues/#1}{issue #1}} -\begin{document} -\RecordChanges -\DocInput{dcm.dtx} -\end{document} -%</driver> -% \fi -% -%\CheckSum{291} -% -% \changes{v0.1}{2007/01/02}{First Hack for OMDoc spec} -% \changes{v0.2}{2008/06/17}{First Version with Documentation} -% \changes{v0.2}{2008/07/02}{Renamed to dcm} -% \changes{v0.3}{2009/09/21}{much more documentation of the user interface} -% \changes{v0.3}{2009/09/21}{Adding sref support and made generated headings configurable} -% \changes{v0.3}{2010/01/11}{Eliminating stub author index that never worked anyways} -% \changes{v0.4}{2011/11/05}{moving DCMperson and friends to the \texttt{workaddress} package} -% -% \GetFileInfo{dcm.sty} -% -% \MakeShortVerb{\|} -% \def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} -% \def\latexml{\scsys{LaTeXML}} -% -% \begin{DCmetadata}[maketitle] -% \DCMtitle{{\texttt{dcm.sty}}: An Infrastructure for marking up Dublin Core Metadata in {\LaTeX} -% documents\thanks{Version {\fileversion} (last revised {\filedate})}} -% \DCMcreators{miko,jdoe} -% \DCMabstract{The |dcm| package allows mark up Dublin -% Core Metadata in {\LaTeX} documents that can be harvested by automated tools or -% exported to PDF, while at the same time generating conventional title information.} -% \end{DCmetadata} -% -% \setcounter{tocdepth}{2}\tableofcontents\newpage -% -%\section[id=intro]{Introduction} -% -% The |dcm| package allows mark up Dublin Core Metadata~\cite{DCMI:dmt03} in {\LaTeX} -% documents so that it can be harvested by automated tools or exported to PDF\ednote{This -% still needs to be implemented, see \texttt{http://www.wlug.org.nz/PdfLatexNotes} for -% details}. This package allows to attribute authorship to arbitrary text -% fragments.\ednote{continue} -% -% \section[id=user]{The User Interface} -% -% \subsection[id=user.options]{Package Options} -% -% The |dcm| package takes a single option: \DescribeMacro{showmeta}|showmeta|. If this is -% set, then the metadata keys are shown (see~\cite{Kohlhase:metakeys:ctan} for details and -% customization options). -% -% \subsection[id=user.dcm.mdblock]{The DC Metadata Block} -% -% \DescribeEnv{DCmetadata} The |dcm| provides the environment |DCmetadata| for Dublin Core -% Metadata Blocks. |DCmetadata| defines local macros for the specifying the relevant -% Dublin Core metadata fields and takes an optional argument that specifies the -% presentation of the metadata block, see Figure~\ref{fig:dcmblock} for an example which -% would generate the title block for the |dcm| package. Let us now come to the macros themselves -% -% \DescribeMacro{\DCMcreators}\DescribeMacro{\DCMcontributors} The |\DCMcreators| and -% |\DCMcontributors| macros are used to specify the authors and contributors to a text -% fragments. These macros take one argument, the authorship of a document specified in -% terms of |id|s of persons specified via |\WAperson| before. They can occur multiply in -% a metadata block. -% -% \DescribeMacro{\DCMtitle} The |\DCMtitle| macro takes one argument, the -% -% \DescribeMacro{\DCMshorttitle} The |\DCMshorttitle| macro takes one argument, the -% -% \DescribeMacro{\DCMsubject} The |\DCMsubject| macro takes one argument, the -% -% \DescribeMacro{\DCMdescription} The |\DCMdescription| macro takes one argument, the -% -% \DescribeMacro{\DCMpublisher} The |\DCMpublisher| macro takes one argument, the -% -% \DescribeMacro{\DCMdate} The |\DCMdate| macro takes one argument, the -% -% \DescribeMacro{\DCMtype} The |\DCMtype| macro takes one argument, the -% -% \DescribeMacro{\DCMidentifier} The |\DCMidentifier| macro takes two arguments, the first one -% is the identification system, and the second one the identifier string itself. -% -% \DescribeMacro{\DCMsource} The |\DCMsource| macro takes one argument, the -% -% \DescribeMacro{\DCMlanguage} The |\DCMlanguage| macro takes one argument, the -% -% \DescribeMacro{\DCMrelation} The |\DCMrelation| macro takes one argument, the -% -% \DescribeMacro{\DCMrights} The |\DCMrights| macro takes one argument, the -% -% \DescribeMacro{\DCMlicense} The |\DCMlicense| macro takes one argument, the -% -% \DescribeMacro{\DCMabstract} The |\DCMabstract| macro takes one argument, the -% -% \DescribeMacro{\DCMlicensenotice} The |\DCMlicensenotice| macro takes one argument, the -% -% \DescribeMacro{\DCMcopyrightnotice} The |\DCMcopyrightnotice| macro takes one argument, the -% -% \DescribeMacro{\DCMcclicense} The |\DCMcclicense| macro -% -% \DescribeMacro{\attribution} -% -% \DescribeMacro{\noncommercial} -% -% \DescribeMacro{\sharealike} -% -% \DescribeMacro{\noderivativeworks} -% -% \begin{exfig}[ht] -% \begin{verbatim} -% \begin{DCmetadata}[maketitle] -% \DCMtitle{An Infrastructure for marking up Dublin Core Metadata in -% {\LaTeX} documents\thanks{Version {\fileversion} -% (last revised {\filedate})}} -% \DCMcreators{miko,jdoe} -% \DCMdate{\today} -% \DCMcopyrightnotice{2008}{Michael Kohlhase} -% \DCMlicensenotice{Copyright (c) 2008 Michael Kohlhase, all rights -% reserved. This file is released under the LaTeX Project Public -% License (LPPL)} -% \DCMabstract{The {\texttt{dcm}} packge allows mark up Dublin -% Core Metadata in {\LaTeX} documents that can be harvested by -% automated tools or exported to PDF, while at the same time -% generating conventional title information.} -% \end{DCmetadata} -% \end{verbatim} -% \caption{The DC Metadata block for the {\texttt{dcm}} package documentation} -% \label{fig:dcmblock} -% \end{exfig} -% -% \subsection[id=user.blockstyles]{DCM Metadata Block Styles} -% -% The |DCmetadata| environment takes an optional argument that specifies the style the -% metadata block is rendered in. The |dcm| package supplies two styles: -% \DescribeMacro{maketitle}|maketitle| and \DescribeMacro{titlepage}|titlepage|. The -% former uses the |\maketitle| macro from the calling class to assemble a title, whereas -% the latter builds a title page from scratch. The title block of this documentation has -% been created by the |maketitle| style. -% -% To add a further metadata block style \meta{sty}, we simply have to supply a -% \DescribeMacro{\dcm@*@block}|\dcm@|\meta{sty}|@block| macro that expands to the intended -% presentation. This macro does not take any arguments, but can use the internal token -% registers defined by the |DCmetadata| environment. Generally, for any of the metadata -% commands |\DCM|\meta{md} defined in {\sref{user.dcm.mdblock}} there is a token register -% |\dcm@|\meta{md} that contains the value specified in the key. -% -% \subsection[id=user.conig]{Configuration} -% -% The |dcm| package provides a set of macros that customize (e.g. for multiple languages) -% the generated -% content. -% \DescribeMacro{\dcm@abstract@heading} -% \DescribeMacro{\dcm@creators@heading} -% \DescribeMacro{\dcm@contributors@connector} -% \DescribeMacro{\dcm@chapter@heading} -% \DescribeMacro{\dcm@section@heading} -% \DescribeMacro{\dcm@subsection@heading} -% \DescribeMacro{\dcm@subsubsection@heading} -% \begin{center}\makeatletter -% \begin{tabular}{|l|l|}\hline -% Macro & Default\\\hline\hline -% |\dcm@abstract@heading| & \dcm@abstract@heading \\\hline -% |\dcm@creators@heading| & \dcm@creators@heading \\\hline -% |\dcm@contributors@connector| & \dcm@contributors@connector \\\hline\hline -% |\dcm@chapter@heading| & \dcm@chapter@heading \\\hline -% |\dcm@section@heading| & \dcm@section@heading \\\hline -% |\dcm@subsection@heading| & \dcm@subsection@heading \\\hline -% |\dcm@subsubsection@heading| & \dcm@subsubsection@heading \\\hline -% \end{tabular} -% \end{center} -% -% -% \section{Limitations}\label{sec:limitations} -% -% In this section we document known limitations. If you want to help alleviate them, -% please feel free to contact the package author. Some of them are currently discussed in -% the \sTeX GitHub repository~\cite{sTeX:github:on}. -% \begin{enumerate} -% \item none reported yet -% \end{enumerate} -% -% \StopEventually{\printbibliography} -% -% \section[id=impl]{The Implementation} -% -% \subsection[id=impl.options]{Package Options} -% The first step is to declare (a few) package options that handle whether certain -% information is printed or not. They all come with their own conditionals that are set by -% the options. -% -% \begin{macrocode} -%<*package> -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{rdfmeta} - \PassOptionsToPackage{\CurrentOption}{workaddress}} -\ProcessOptions -% \end{macrocode} -% -% The first measure is to ensure that the |KeyVal| package is loaded (in the right -% version). For {\latexml} we also initialize the package inclusions. -% \begin{macrocode} -\RequirePackage{workaddress} -\RequirePackage[sectioning]{rdfmeta} -% \end{macrocode} -% -% \subsection{The DC Metadata Block} -% -% Then we make an environment for defining the metadata. Note that since we have defined -% the |omdoc:metadata| element to auto-open and auto-close, we do not have to (and should -% not for that matter) supply it in the |DCmetadata| element. -% -% \begin{environment}{DCmetadata} -% \begin{macrocode} -\newenvironment{DCmetadata}[1][]% -{\def\@style{#1}}% to set the way things are presented. -{\@ifundefined{dcm@\@style @block}% -{\message{style {\@style} not defined}}% -{\csname dcm@\@style @block\endcsname}} -% \end{macrocode} -% \end{environment} -% -% Here come the constructors, most of them are relatively straightforward -% -% \begin{macro}{\DCMcreators} -% the |\DCMcreators| macro checks whether all ids are defined. -% \begin{macrocode} -\def\DCMcreators#1{\@for\@I:=#1\do{\wa@ref1{person}\@I{id}} -\gdef\dcm@creators{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMcontributors} -% the |\DCMcontributors| macro also checks whether all ids are defined. -% \begin{macrocode} -\def\DCMcontributors#1{\@for\@I:=#1\do{\wa@ref1{person}\@I{id}}% -\def\dcm@contributors{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMtitle} -% \begin{macrocode} -\def\DCMtitle#1{\def\dcm@title{#1}\providecommand{\dcm@shorttitle}{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMsubtitle} -% \begin{macrocode} -\def\dcm@subtitle{} -\def\DCMsubtitle#1{\def\dcm@subtitle{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMshorttitle} -% \begin{macrocode} -\def\dcm@shorttitle{} -\def\DCMshorttitle#1{\def\dcm@shorttitle{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMsubject} -% \begin{macrocode} -\def\DCMsubject#1{\def\dcm@subject{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMdescription} -% \begin{macrocode} -\long\def\DCMdescription#1{\long\def\dcm@description{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMpublisher} -% \begin{macrocode} -\def\DCMpublisher#1{\def\dcm@publisher{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMdate} -% the |\DCMdate| uses |\today| as a default\ednote{@DEYAN: do that in latexml} -% \begin{macrocode} -\def\dcm@date{\today} -\def\DCMdate#1{\def\dcm@date{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMtype} -% \begin{macrocode} -\def\DCMtype#1{\def\dcm@type{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMidentifier} -% \begin{macrocode} -\def\DCMidentifier#1#2{\def\dcm@scheme{#1}\def\dcm@identifier{#2}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMsource} -% \begin{macrocode} -\def\DCMsource#1{\def\dcm@source{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMlanguage} -% \begin{macrocode} -\def\DCMlanguage#1{\def\dcm@language{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMrelation} -% \begin{macrocode} -\def\DCMrelation#1{\def\dcm@relation{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMrights} -% \begin{macrocode} -\def\DCMrights#1{\long\def\dcm@rights{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMlicense} -% \begin{macrocode} -\def\DCMlicense#1{\def\dcm@license{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMlicensenotice} -% here we have a default -% \begin{macrocode} -\def\dcm@license{All rights reserved} -\def\DCMlicensenotice#1{\long\def\dcm@license{\\[1ex]License: #1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMcopyrightnotice} -% \begin{macrocode} -\def\DCMcopyrightnotice#1#2{\DCMrights{Copyright {\copyright} #1: #2}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\cclicense} -% \begin{macrocode} -\def\cclicense#1{\def\attribution{\def\dcm@by{yes}} - \def\noncommercial{\def\dcm@nc{yes}} - \def\sharealike{\defdcm@sharealike{yes}} - \def\noderivativeworks{\def\dcm@derivatives{no}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\DCMabstract} -% \begin{macrocode} -\long\def\DCMabstract#1{\long\def\dcm@abstract{#1}} -% \end{macrocode} -% \end{macro} -% -% \subsection[id=impl.blockstyles]{DCM Block Styles} -% -% We now define various commonly used styles. -% -% \begin{macro}{\dcm@titlepage@block} -% This style builds up a title page from scratch -% \begin{macrocode} -\def\dcm@titlepage@block{\begin{titlepage} - \null\vfil\vskip 60\p@ - \begin{center} - \ifx\dcm@title\@empty - \PackageWarning{dcm}{No title specified}{\LARGE Add title here\par} - \else\LARGE \dcm@title \par\fi - \ifx\dcm@subtitle\@empty - \vskip 3em\Large \dcm@subtitle \par\vskip 3em - \else\large\lineskip .75em\WAauthorblock\dcm@creators\vskip 1.5em\fi - \ifx\dcm@date\@empty - \PackageWarning{dcm}{No date specified}{\large\today\par} - \else{\large\dcm@date\par}\vskip 2em\fi - \end{center}\vskip2em - \ifx\dcm@abstract\@empty - \PackageWarning{dcm}{No Abstract specified}\else - \begin{quote}\textbf\dcm@abstract@heading:\dcm@abstract\end{quote}\fi - \vskip 2em\par\vfil\noindent - {\small\noindent\dcm@rights\dcm@license} - \end{titlepage}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\dcm@maketitle@block} -% This style makes use of the title facility of the document class. -% \begin{macrocode} -\def\dcm@maketitle@block{\def\@title{\dcm@title\ifx\dcm@subtitle\empty\else\newline\dcm@subtitle\fi}% -\def\@author{\WAauthorblock\dcm@creators}% -\def\@date{\dcm@date}\maketitle} -% \end{macrocode} -% \end{macro} -% -% \subsection{Dealing with ISO Dates} -% -% The first step is to build a macro for making ISO dates. -% -% \begin{macrocode} -\def\ISOtimestamp{\count1=\time\divide\count1 by 60 % hours -\count2=\count1\multiply\count2 by 60% minutes in \count1 hours -\count3=\time\advance\count3 by -\count2 % minutes -\the\year -\ifnum\month>9\else0\fi\the\month-\ifnum\day>9\else0\fi\the\day -T\ifnum\count1>9\else0\fi\the\count1:\ifnum\count3>9\else0\fi\the\count3:00Z} -% \end{macrocode} -% -%\subsection{Configuration} -% -% \begin{macrocode} -\def\dcm@abstract@heading{Abstract} -\def\dcm@creators@heading{Author(s)} -\def\dcm@contributors@connector{with contributions from} -\def\dcm@chapter@heading{Chapter} -\def\dcm@section@heading{Section} -\def\dcm@subsection@heading{Subsection} -\def\dcm@subsubsection@heading{Subsubsection} -\def\dcm@paragraph@heading{Paragraph} -%</package> -% \end{macrocode} -% -% \Finale -\endinput -% \iffalse -% LocalWords: GPL structuresharing STR LaTeX dcm dtx keyval sref CPERL url qw -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: -% \fi - -% LocalWords: RequirePackage birthdate personaltitle academictitle workaddress -% LocalWords: privaddress worktel privtel workfax privfax worktelfax noDelim -% LocalWords: privtelfax getKeyValue valuelist ToString getValue affill STDERR -% LocalWords: ExportMetadata AssignValue DCMperson DefConstructor afterDigest -% LocalWords: getArg setValue FishOutMetadata keyvals foreach idlist tabline -% LocalWords: LookupValue insertElement atabline bitabline shorttitle nc args -% LocalWords: sharealike noderivativeworks DefMacro authorblock subsubsection -% LocalWords: contribs OptionalKeyVals omgroup omdoc srcref xml RawTeX partof -% LocalWords: openElement iffalse kohlhase Thu scsys sc sc latexml DCmetadata -% LocalWords: maketitle DCMtitle texttt fileversion DCMcreators miko jdoe impl -% LocalWords: DCMabstract setcounter tocdepth tableofcontents newpage dmt03 -% LocalWords: DCMsection ednote DCMsubsection exfig hline dcmblock Patashnik -% LocalWords: DescribeEnv DCMcontributors DCMshorttitle DCMshorttitle DCMdate -% LocalWords: DCMsubject DCMsubject DCMdescription DCMdescription DCMpublisher -% LocalWords: DCMpublisher DCMdate DCMtype DCMtype DCMidentifier DCMidentifier -% LocalWords: DCMsource DCMsource DCMlanguage DCMlanguage DCMrelation ctancite -% LocalWords: DCMrelation DCMrights DCMrights DCMlicense DCMlicense titlepage -% LocalWords: DCMlicensenotice DCMlicensenotice DCMcopyrightnotice titlepage -% LocalWords: DCMcopyrightnotice DCMcclicense DCMcclicense user.blockstyles -% LocalWords: DCMchapter DCMchatper DCMsubsubsection DCMsubsubsection ltxml -% LocalWords: user.conig makeatletter printbibliography expandafter showmeta -% LocalWords: xdef csname endcsname newcommand ifx ifundefined affs showmeta -% LocalWords: Semiverbatim whatsit newenvironment mtabline providecommand vfil -% LocalWords: DCMsubtitle cclicense defdcm impl.blockstyles newcounter vskip -% LocalWords: stepcounter tabularnewline theauthors lineskip textbf noindent -% LocalWords: omd omd srefaddidkey thechapter autoclose thesection ifnum ifnum -% LocalWords: thesubsection thesubsubsection DCMparagraph ISOtimestamp doctex -% LocalWords: DCMinstitution DCMinstitution compactenum textsf langle textsf -% LocalWords: langle metakeys addmetakey metasetkeys countryshort townzip aff -% LocalWords: streetaddress depts diff --git a/macros/latex/contrib/stex/sty/dcm/dcm.ins b/macros/latex/contrib/stex/sty/dcm/dcm.ins deleted file mode 100644 index 1a65a657f6..0000000000 --- a/macros/latex/contrib/stex/sty/dcm/dcm.ins +++ /dev/null @@ -1,33 +0,0 @@ -%% -%% This file generates files required to use the ed package. -%% At your command prompt write -%% -%% latex dcm.ins -%% -%% Copyright(c) 2008 Michael Kohlhase -%% The development version of this file can be found at -%% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/dcm/dcm.ins $ -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{dcm.sty}{\from{dcm.dtx}{package}}} - -\Msg{*} -\Msg{* You probably need to move the file dcm.sty into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} - -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/dcm/dcm.pdf b/macros/latex/contrib/stex/sty/dcm/dcm.pdf Binary files differdeleted file mode 100644 index 4b9b3f737c..0000000000 --- a/macros/latex/contrib/stex/sty/dcm/dcm.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/hwexam/README b/macros/latex/contrib/stex/sty/hwexam/README deleted file mode 100644 index 25db46f14a..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/hwexam/hwexam.dtx b/macros/latex/contrib/stex/sty/hwexam/hwexam.dtx deleted file mode 100644 index e1ef472a24..0000000000 --- a/macros/latex/contrib/stex/sty/hwexam/hwexam.dtx +++ /dev/null @@ -1,592 +0,0 @@ -% \iffalse meta-comment -% An Infrastructure for marking up Assignments -% Copyright (c) 2007 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<package|cls>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<package>\ProvidesPackage{hwexam}[2019/03/20 v1.1 homework assignments and exams] -%<cls>\ProvidesClass{hwexam}[2019/03/20 v1.1 assignment and exam documents] -% -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage{url,float} -\usepackage{hwexam} -\usepackage[show]{ed} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{stex-logo} -\usepackage{ctangit} -\usepackage{hyperref} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\def\githubissue#1{\cite{sTeX:github:on}, \hyperlink{https://github.com/KWARC/sTeX/issues/#1}{issue #1}} -\begin{document} -\RecordChanges -\DocInput{hwexam.dtx} -\end{document} -%</driver> -% \fi -%\CheckSum{464} -% -% \changes{v0.9}{2006/09/18}{First Version with Documentation} -% \changes{v0.9a}{2010/06/25}{more semantic headers for exams} -% \changes{v0.9b}{2010/09/20}{adding \texttt{assignment.cls}} -% \changes{v0.9c}{2010/09/20}{renaming from \texttt{assignment} to \texttt{hwexam} to -% avoid name clashes with existing \texttt{assignment.cls} on CTAN.} -% \changes{v1.0}{2013/12/12}{adding MathHub support} -% \changes{v1.1}{2015/11/04}{moving MathHub support out to separate package} -% -% \GetFileInfo{hwexam.sty} -% -% \MakeShortVerb{\|} -% \def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} -% \def\latexml{\scsys{LaTeXML}} -% -% \title{\texttt{hwexam.sty/cls}: An Infrastructure for formatting Assignments -% and Exams\thanks{Version {\fileversion} (last revised {\filedate})}} -% \author{Michael Kohlhase\\ -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}} -% \maketitle -% -% \begin{abstract} -% The |hwexam| package and class allows individual course assignment sheets and -% compound assignment documents using problem files marked up with the |problem| package. -% \end{abstract} -% \setcounter{tocdepth}{2}\tableofcontents\newpage -% -%\section{Introduction}\label{sec:intro} -% -% The |hwexam| package and class supplies an infrastructure that allows to format -% nice-looking assignment sheets by simply including problems from problem files marked up -% with the |problem| package~\cite{Kohlhase:problem:ctan}. It is designed to be -% compatible with |problems.sty|, and inherits some of the functionality. -% -% \section{The User Interface} -% -% \subsection{Package and Class Options}\label{sec:user:options} -% -% The |hwexam| class takes the \DescribeMacro{mh}|mh| option that turns on MathHub -% support. -% -% The |hwexam| package and class take the options |solutions|, |notes|, |hints|, |pts|, -% |min|, and |boxed| that are just passed on to the |problems| package (cf. its -% documentation for a description of the intended behavior). -% -% If the \DescribeMacro{showmeta}|showmeta| option is set, then the metadata keys are -% shown (see~\cite{Kohlhase:metakeys:ctan} for details and customization options). -% -% The |hwexam| class additionally accepts the options |report|, |book|, |chapter|, |part|, -% and |showignores|, of the |omdoc| package~\cite{Kohlhase:smomdl:ctan} on which it is -% based and passes them on to that. For the |extrefs| option -% see~\cite{Kohlhase:sref:ctan}. -% -% \subsection{Assignments} -% -% This package supplies the \DescribeEnv{assignment}|assignment| environment that groups -% problems into assignment sheets. It takes an optional KeyVal argument with the keys -% \DescribeMacro{number}|number| (for the assignment number; if none is given, 1 is -% assumed as the default or --- in multi-assignment documents --- the ordinal of the -% |assignment| environment), \DescribeMacro{title}|title| (for the assignment title; this -% is referenced in the title of the assignment sheet), \DescribeMacro{type}|type| (for the -% assignment type; e.g. ``quiz'', or ``homework''), \DescribeMacro{given}|given| (for the -% date the assignment was given), and \DescribeMacro{due}|due| (for the date the -% assignment is due). -% -% \subsection{Typesetting Exams} -% -% Furthermore, the |hwexam| package takes the option -% \DescribeMacro{multiple}|multiple| that allows to combine multiple assignment sheets into -% a compound document (the assignment sheets are treated as section, there is a table of -% contents, etc.). -% -% Finally, there is the option \DescribeMacro{test}|test| that modifies the behavior to -% facilitate formatting tests. Only in |test| mode, the macros |\testspace|, -% |\testnewpage|, and |\testemptypage| have an effect: they generate space for the -% students to solve the given problems. Thus they can be left in the {\LaTeX} source. -% -% \DescribeMacro{\testspace}|\testspace| takes an argument that expands to a dimension, -% and leaves vertical space accordingly. \DescribeMacro{\testnewpage}|\testnewpage| makes -% a new page in |test| mode, and \DescribeMacro{\testemptypage}|\testemptypage| generates -% an empty page with the cautionary message that this page was intentionally left empty. -% -% Finally, the \DescribeEnv{testheading}|\testheading| takes an optional keyword argument -% where the keys \DescribeMacro{duration}|duration| specifies a string that specifies the -% duration of the test, \DescribeMacro{min}|min| specifies the equivalent in number of -% minutes, and \DescribeMacro{reqpts}|reqpts| the points that are required for a perfect -% grade. -% \begin{exfig}[ht] -% \makeatletter -% \@problem{1.1}{4}{10} -% \@problem{2.1}{4}{8} -% \@problem{2.2}{6}{10} -% \@problem{2.3}{6}{10} -% \@problem{3.1}{4}{8} -% \@problem{3.2}{4}{8} -% \@problem{3.3}{2}{4} -% \makeatother -% \begin{verbatim} -% \title{320101 General Computer Science (Fall 2010)} -% \begin{testheading}[duration=one hour,min=60,reqpts=27] -% Good luck to all students! -% \end{testheading} -% \end{verbatim} -% \vspace*{-3ex}\hrule\vspace*{.5ex} formats to\vspace*{1ex} -% \hrule\par\noindent\vspace*{2ex} -% \title{320101 General Computer Science (Fall 2010)} -% \begin{testheading}[duration=one hour,min=60,reqpts=27] -% good luck -% \end{testheading} -% \caption{A generated test heading.}\label{fig:testheading} -% \end{exfig} -% -% \subsection{Including Assignments} -% -% The \DescribeMacro{\includeassignment}|\includeassignment| macro can be used to include -% an assignment from another file. It takes an optional KeyVal argument and a second -% argument which is a path to the file containing the problem (the macro assumes that -% there is only one |assignment| environment in the included file). The keys -% \DescribeMacro{number}|number|, \DescribeMacro{title}|title|, -% \DescribeMacro{type}|type|, \DescribeMacro{given}|given|, and \DescribeMacro{due}|due| -% are just as for the |assignment| environment and (if given) overwrite the ones specified -% in the |assignment| environment in the included file. -% -% \section{Limitations}\label{sec:limitations} -% -% In this section we document known limitations. If you want to help alleviate them, -% please feel free to contact the package author. Some of them are currently discussed in -% the \sTeX GitHub repository~\cite{sTeX:github:on}. -% \begin{enumerate} -% \item none reported yet. -% \end{enumerate} -% -% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography}\newpage -% \newpage -% -% \section{Implementation: The hwexam Class}\label{sec:impl:cls} -% -% The functionality is spread over the |hwexam| class and package. The class provides -% the |document| environment and pre-loads some convenience packages, whereas the package -% provides the concrete functionality. -% -% \subsection{Class Options}\label{sec:impl:cls:options} -% -% To initialize the |hwexam| class, we declare and process the necessary options by -% passing them to the respective packages and classes they come from. -% -% \begin{macrocode} -%<*cls> -\DeclareOption*{ - \PassOptionsToClass{\CurrentOption}{omdoc} - \PassOptionsToPackage{\CurrentOption}{stex} - \PassOptionsToPackage{\CurrentOption}{hwexam} - \PassOptionsToPackage{\CurrentOption}{tikzinput} -} -\ProcessOptions -% \end{macrocode} -% -% We load |omdoc.cls|, and the desired packages. For the {\latexml} bindings, we make -% sure the right packages are loaded. -% -% \begin{macrocode} -\LoadClass{omdoc} -\RequirePackage{stex} -\RequirePackage{hwexam} -\RequirePackage{tikzinput} -\RequirePackage{graphicx} -\RequirePackage{a4wide} -\RequirePackage{amssymb} -\RequirePackage{amstext} -\RequirePackage{amsmath} -% \end{macrocode} -% Finally, we register another keyword for the |document| environment. We give a default -% assignment type to prevent errors -% \begin{macrocode} -\newcommand\assig@default@type{\hwexam@assignment@kw} -\addmetakey[\assig@default@type]{document}{hwexamtype} -\def\document@hwexamtype{\assig@default@type} -%</cls> -% \end{macrocode} -% -% \section{Implementation: The hwexam Package} -% -% \subsection{Package Options} -% -% The first step is to declare (a few) package options that handle whether certain -% information is printed or not. Some come with their own conditionals that are set by the -% options, the rest is just passed on to the |problems| package. -% -% \begin{macrocode} -%<*package> -\newif\if@hwexam@mh@\@hwexam@mh@false -\DeclareOption{mh}{\@hwexam@mh@true} -\newif\iftest\testfalse -\DeclareOption{test}{\testtrue} -\newif\ifmultiple\multiplefalse -\DeclareOption{multiple}{\multipletrue} -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{problem}} -\ProcessOptions -% \end{macrocode} -% Then we make sure that the necessary packages are loaded (in the right versions). -% \begin{macrocode} -\RequirePackage{keyval}[1997/11/10] -\if@hwexam@mh@\RequirePackage{hwexam-mh}\fi -\RequirePackage{problem} -% \end{macrocode} -% -% \begin{macro}{\hwexam@*@kw} -% For multilinguality, we define internal macros for keywords that can be specialized in -% |*.ldf| files. -% \begin{macrocode} -\AfterBabelLanguage{ngerman}{\input{hwexam-ngerman.ldf}} -\AfterBabelLanguage{arabic}{\input{hwexam-arabic.ldf}} -\newcommand\hwexam@assignment@kw{Assignment} -\newcommand\hwexam@given@kw{Given} -\newcommand\hwexam@due@kw{Due} -\newcommand\hwexam@testemptypage@kw{This page was intentionally left blank for extra - space}% -\newcommand\correction@probs@kw{prob.}% -\newcommand\correction@pts@kw{total}% -\newcommand\correction@reached@kw{reached}% -\newcommand\correction@sum@kw{Sum}% -\newcommand\correction@grade@kw{grade}% -\newcommand\correction@forgrading@kw{To be used for grading, do not write here} -% \end{macrocode} -% \end{macro} -% -% \subsection{Assignments} -% -% Then we set up a counter for problems and make the problem counter inherited from -% |problem.sty| depend on it. Furthermore, we specialize the |\prob@label| macro to take -% the assignment counter into account. -% \begin{macrocode} -\newcounter{assignment} -\numberproblemsin{assignment} -\renewcommand\prob@label[1]{\arabic{assignment}.#1} -% \end{macrocode} -% -% We will prepare the keyval support for the |assignment| environment. -% -% \begin{macrocode} -\srefaddidkey{assig} -\addmetakey{assig}{number} -\addmetakey*{assig}{title} -\addmetakey{assig}{type} -\addmetakey{assig}{given} -\addmetakey{assig}{due} -\addmetakey[false]{assig}{loadmodules}[true] -% \end{macrocode} -% -% The next three macros are intermediate functions that handle the case gracefully, where -% the respective token registers are undefined. -% -% The |\given@due| macro prints information about the given and due status of the -% assignment. Its arguments specify the brackets. -% -% \begin{macrocode} -\newcommand\given@due[2]{% -\ifx \inclassig@given\@empty - \ifx \assig@given\@empty - \ifx \inclassig@due\@empty - \ifx \assig@due\@empty% all empty do nothing - \else #1% - \fi - \else #1% - \fi - \else #1% - \fi -\else #1% -\fi -\ifx\inclassig@given\@empty - \ifx\assig@given\@empty% do nothing - \else \hwexam@given@kw\xspace \assig@given% - \fi -\else \hwexam@given@kw\xspace \inclassig@given% -\fi -\ifx \inclassig@due\@empty - \ifx \assig@due\@empty% do nothing - \else - \ifx \inclassig@given\@empty - \ifx \assig@given\@empty% do nothing - \else ,~% - \fi - \else ,~% - \fi - \fi -\else - \ifx \inclassig@given\@empty - \ifx \assig@given\@empty% do nothing - \else ,~% - \fi - \else ,~% - \fi -\fi -\ifx \inclassig@due\@empty - \ifx \assig@due\@empty% do nothing - \else \hwexam@due@kw\xspace \assig@due% - \fi -\else \hwexam@due@kw\xspace \inclassig@due% -\fi -\ifx \inclassig@given\@empty - \ifx \assig@given\@empty - \ifx \inclassig@due\@empty - \ifx \assig@due\@empty% all empty do nothing - \else #2% - \fi - \else #2% - \fi - \else #2% - \fi -\else #2% -\fi -} -% \end{macrocode} -% -% \begin{macro}{\assignment@title} -% This macro prints the title of an assignment, the local title is overwritten, if there -% is one from the |\includeassignment|. |\assignment@title| takes three arguments the -% first is the fallback when no title is given at all, the second and third go around -% the title, if one is given. -% \begin{macrocode} -\newcommand\assignment@title[3] -{\ifx\inclassig@title\@empty% if there is no outside title -\ifx\assig@title\@empty{#1}\else{#2\assig@title{#3}}\fi -\else{#2}\inclassig@title{#3}\fi}% else show the outside title -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\assignment@number} -% Like |\assignment@title| only for the number, and no around part. -% \begin{macrocode} -\newcommand\assignment@number% -{\ifx\inclassig@number\@empty% if there is no outside number -\ifx\assig@number\@empty\else\assig@number\fi -\else\inclassig@number\fi}% else show the outside number -% \end{macrocode} -% \end{macro} -% -% With them, we can define the central |assignment| environment. This has two forms -% (separated by |\ifmultiple|) in one we make a title block for an assignment sheet, and -% in the other we make a section heading and add it to the table of contents. We first -% define an assignment counter -% -% \begin{environment}{assignment} -% For the |assignment| environment we delegate the work to the |@assignment| environment -% that depends on whether |multiple| option is given. -% \begin{macrocode} -\newenvironment{assignment}[1][]{\metasetkeys{assig}{#1}\sref@target% -\edef\@@num{\assignment@number}% -\ifx\@@num\@empty\stepcounter{assignment}\else\setcounter{assignment}{\@@num}\fi% -\setcounter{problem}{0}% -\def\current@section@level{\document@hwexamtype}% -\sref@label@id{\document@hwexamtype \thesection}% -\begin{@assignment}} -{\end{@assignment}} -% \end{macrocode} -% In the multi-assignment case we just use the |omdoc| environment for suitable -% sectioning. -% \begin{macrocode} -\def\@@asstitle{\protect\document@hwexamtype~\arabic{assignment}% -\assignment@title{}{\;(}{)\;} -- \given@due{}{}} -\ifmultiple -\newenvironment{@assignment}% -{\ifx\assig@loadmodules\@true -\begin{omgroup}[loadmodules]{\@@asstitle} -\else -\begin{omgroup}{\@@asstitle} -\fi} -{\end{omgroup}} -% \end{macrocode} -% for the single-page case we make a title block from the same components. -% \begin{macrocode} -\else -\newenvironment{@assignment} -{\begin{center}\bf -\Large\@title\strut\\ -\document@hwexamtype~\arabic{assignment}\assignment@title{\;}{:\;}{\\}% -\large\given@due{--\;}{\;--} -\end{center}} -{} -\fi% multiple -% \end{macrocode} -% \end{environment} -% -% \subsection{Including Assignments} -% -% \begin{macro}{\in*assignment} -% This macro is essentially a glorified |\include| statement, it just sets some internal -% macros first that overwrite the local points Importantly, it resets the |inclassig| -% keys after the input. -% \begin{macrocode} -\addmetakey{inclassig}{number} -\addmetakey*{inclassig}{title} -\addmetakey{inclassig}{type} -\addmetakey{inclassig}{given} -\addmetakey{inclassig}{due} -\addmetakey{inclassig}{mhrepos} -\clear@inclassig@keys%initially -\newcommand\includeassignment[2][]{\metasetkeys{inclassig}{#1}% -\include{#2}\clear@inclassig@keys} -\newcommand\inputassignment[2][]{\metasetkeys{inclassig}{#1}% -\input{#2}\clear@inclassig@keys} -% \end{macrocode} -% \end{macro} -% -% \subsection{Typesetting Exams} -% -% \begin{macro}{\quizheading} -% \begin{macrocode} -\addmetakey{quizheading}{tas} -\newcommand\quizheading[1]{\def\@tas{#1}% -\large\noindent NAME: \hspace{8cm} MAILBOX:\\[2ex]% -\ifx\@tas\@empty\else% -\noindent TA: \@for\@I:=\@tas\do{{\Large$\Box$}\@I\hspace*{1em}}\\[2ex]\fi} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\testheading} -% \begin{macrocode} -\addmetakey{testheading}{min} -\addmetakey{testheading}{duration} -\addmetakey{testheading}{reqpts} -\newenvironment{testheading}[1][]{\metasetkeys{testheading}{#1} -{\noindent\large{}Name: \hfill Matriculation Number:\hspace*{2cm}\strut\\[1ex] -\begin{center}\Large\textbf{\@title}\\[1ex]\large\@date\\[3ex]\end{center} -{\textbf{You have -\ifx\testheading@duration\@empty\testheading@min minutes\else\testheading@duration\fi -(sharp) for the test}};\\ Write the solutions to the sheet.}\par\noindent - -\newcount\check@time\check@time=\testheading@min -\advance\check@time by -\theassignment@totalmin -The estimated time for solving this exam is {\theassignment@totalmin} minutes, -leaving you {\the\check@time} minutes for revising your exam. - -\newcount\bonus@pts\bonus@pts=\theassignment@totalpts -\advance\bonus@pts by -\testheading@reqpts -You can reach {\theassignment@totalpts} points if you solve all problems. You will only need -{\testheading@reqpts} points for a perfect score, i.e.\ {\the\bonus@pts} points are -bonus points. \vfill -\begin{center} - {\Large\em -% You have ample time, so take it slow and avoid rushing to mistakes!\\[2ex] - Different problems test different skills and knowledge, so do not get stuck on - one problem.}\vfill\par\correction@table \\[3ex] -\end{center}} -{\newpage} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\testspace} -% \begin{macrocode} -\newcommand\testspace[1]{\iftest\vspace*{#1}\fi} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\testnewpage} -% \begin{macrocode} -\newcommand\testnewpage{\iftest\newpage\fi} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\testemptypage} -% \begin{macrocode} -\newcommand\testemptypage[1][]{\iftest\begin{center}\hwexam@testemptypage@kw\end{center}\vfill\eject\else\fi} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\@problem} -% This macro acts on a problem's record in the |*.aux| file. Here we redefine it (it was -% defined to do nothing in |problem.sty|) to generate the correction table. -% \begin{macrocode} -\renewcommand\@problem[3]{\stepcounter{assignment@probs} -\def\@@pts{#2}\ifx\@@pts\@empty\else\addtocounter{assignment@totalpts}{#2}\fi -\def\@@min{#3}\ifx\@@min\@empty\else\addtocounter{assignment@totalmin}{#3}\fi -\xdef\correction@probs{\correction@probs & #1}% -\xdef\correction@pts{\correction@pts & #2} -\xdef\correction@reached{\correction@reached &}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\correction@table} -% This macro generates the correction table -% \begin{macrocode} -\newcounter{assignment@probs} -\newcounter{assignment@totalpts} -\newcounter{assignment@totalmin} -\def\correction@probs{\correction@probs@kw}% -\def\correction@pts{\correction@pts@kw}% -\def\correction@reached{\correction@reached@kw}% -\def\after@correction@table{}% -\stepcounter{assignment@probs} -\newcommand\correction@table{\begin{tabular}{|l|*{\theassignment@probs}{c|}|l|}\hline% -&\multicolumn{\theassignment@probs}{c||}%| -{\footnotesize\correction@forgrading@kw} &\\\hline -\correction@probs & \correction@sum@kw & \correction@grade@kw\\\hline -\correction@pts &\theassignment@totalpts & \\\hline -\correction@reached & & \\[.7cm]\hline -\end{tabular} -\ifx\after@correction@table\@empty\else\strut\par\noindent\after@correction@table\fi} -%</package> -% \end{macrocode} -% \end{macro} -% -% \subsection{Leftovers} -% -% at some point, we may want to reactivate the logos font, then we use -% \begin{verbatim} -% here we define the logos that characterize the assignment -% \font\bierfont=../assignments/bierglas -% \font\denkerfont=../assignments/denker -% \font\uhrfont=../assignments/uhr -% \font\warnschildfont=../assignments/achtung -% -% \newcommand\bierglas{{\bierfont\char65}} -% \newcommand\denker{{\denkerfont\char65}} -% \newcommand\uhr{{\uhrfont\char65}} -% \newcommand\warnschild{{\warnschildfont\char 65}} -% \newcommand\hardA{\warnschild} -% \newcommand\longA{\uhr} -% \newcommand\thinkA{\denker} -% \newcommand\discussA{\bierglas} -% \end{verbatim} -% \Finale -\endinput -% \iffalse -% LocalWords: GPL structuresharing STR iffalse cls NeedsTeXFormat hwexam hwexam.dtx sc -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: -% \fi -% LocalWords: texttt scsys sc latexml fileversion filedate maketitle setcounter newpage -% LocalWords: tocdepth tableofcontents pts showmeta showmeta showignores omdoc extrefs -% LocalWords: testspace testnewpage testemptypage testheading testheading reqpts reqpts -% LocalWords: exfig makeatletter makeatother vspace hrule vspace vspace noindent textsf -% LocalWords: includeassignment includeassignment HorIacJuc cscpnrr11 importmodule baz -% LocalWords: includemhassignment includemhassignment importmhmodule foobar ldots sref -% LocalWords: mhcurrentrepos mh-variants mh-variant compactenum printbibliography Cwd -% LocalWords: langle rangle langle rangle ltxml.cls ltxml.sty respetively metakeys qw -% LocalWords: cwd stex graphicx amssymb amstext amsmath newif iftest testfalse testtrue -% LocalWords: ifsolutions solutionsfalse ifmultiple multiplefalse multipletrue keyval -% LocalWords: ltxml assig srefaddidkey addmetakey ifx assignment@titleblock stepcounter -% LocalWords: document@hwexamtype importmodules metasetkeys inclassig@title inclassig -% LocalWords: inclassig@title inclassig@type inclassig@type inclassig@number xspace kv -% LocalWords: inclassig@number inclassig@due inclassig@due inclassig@given ignorespaces -% LocalWords: inclassig@given newenvironment currentsectionlevel OptionalKeyVals kvi -% LocalWords: omgroup vals hwexamtype ednote textbackslash newcommand inputassignment -% LocalWords: unlist quizheading tas hspace hfill textbf newcount vfill addtocounter -% LocalWords: theassignment@totalmin theassignment@totalpts assignment@probs xdef hline -% LocalWords: assignment@totalpts assignment@totalmin correction@probs correction@probs -% LocalWords: newcounter theassignment@probs footnotesize mh@currentrepos endinput -% LocalWords: inclassig@mhrepos inclassig@mhrepos doctex inputmhassignment diff --git a/macros/latex/contrib/stex/sty/hwexam/hwexam.ins b/macros/latex/contrib/stex/sty/hwexam/hwexam.ins deleted file mode 100644 index 07e07e9593..0000000000 --- a/macros/latex/contrib/stex/sty/hwexam/hwexam.ins +++ /dev/null @@ -1,35 +0,0 @@ -%% -%% This file generates files required to use the hwexam class. -%% At your command prompt write -%% -%% latex hwexam.ins -%% -%% Copyright(c) 2010 Michael Kohlhase -%% The development version of this file can be found at -%% $HeadURL: https://svn.kwarc.info/repos/stex-content/sty/hwexam/hwexam.ins $ -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{hwexam.sty}{\from{hwexam.dtx}{package}}} -% and the class -\generate{\file{hwexam.cls}{\from{hwexam.dtx}{cls}}} - -\Msg{*} -\Msg{* You probably need to move the files hwexam.{sty,cls} into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} - -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/hwexam/hwexam.pdf b/macros/latex/contrib/stex/sty/hwexam/hwexam.pdf Binary files differdeleted file mode 100644 index 22148735ae..0000000000 --- a/macros/latex/contrib/stex/sty/hwexam/hwexam.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/metakeys/README b/macros/latex/contrib/stex/sty/metakeys/README deleted file mode 100644 index a10e46f6cc..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/metakeys/metakeys.dtx b/macros/latex/contrib/stex/sty/metakeys/metakeys.dtx deleted file mode 100644 index 84ced73e5f..0000000000 --- a/macros/latex/contrib/stex/sty/metakeys/metakeys.dtx +++ /dev/null @@ -1,455 +0,0 @@ -% \iffalse meta-comment -% An Infrastructure for marking up Metadata in LaTeX documents -% Copyright (c) 2009 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<*package> -\NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{metakeys}[2019/03/20 v0.9 Framework for Metadata Keys] -%</package> -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage{stex-logo,url,array,float} -\usepackage[show]{ed} -\usepackage{ctangit} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{hyperref} -%\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\def\githubissue#1{\cite{sTeX:github:on}, \hyperlink{https://github.com/KWARC/sTeX/issues/#1}{issue #1}} -\usepackage[showmeta]{metakeys} -\begin{document} -\RecordChanges -\DocInput{metakeys.dtx} -\end{document} -%</driver> -% \fi -% -%\CheckSum{135} -% -% \changes{v0.1}{2009/12/14}{First version} -% \changes{v0.8}{2010/06/18}{This is almost done} -% \changes{v0.9}{2010/09/02}{make sure that showkeys is always initialized} -% -% \GetFileInfo{metakeys.sty} -% -% \MakeShortVerb{\|} -% \def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} -% \def\latexml{\scsys{LaTeXML}} -% \def\omdoc{OMDoc} -% \def\omdocv#1{\omdoc{#1}} -% -% \title{{\texttt{metakeys.sty}}: A generic framework for extensible Metadata in {\LaTeX}\thanks{Version {\fileversion} (last revised -% {\filedate})}} -% \author{Michael Kohlhase\\ -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}} -% \maketitle -% \begin{abstract} -% The |metakeys| package is 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 {\TeX/\LaTeX} into a document format for mathematical -% knowledge management (MKM). -% -% This package supplies the infrastructure for extending {\sTeX} macros with {\omdoc} -% metadata. This package is mainly intended for authors of {\sTeX} extension packages. -% \end{abstract} -% -% \setcounter{tocdepth}{2}\tableofcontents\newpage -% -% \section{The User Interface}\label{sec:user} -% -% Many of the {\stex} macros and environments take an optional first argument which uses -% key/value pairs to specify metadata relations of the marked up objects. The |metakeys| -% package supplies the infrastructure managing these key/value pairs. It also forms the -% basis for the |rdfmeta| package which allows to use these for flexible, user-extensible -% metadata relations (see~\ctancite{Kohlhase:rdfmeta} for details). -% -% \subsection{Package Options}\label{sec:user:options} -% -% The |metakeys| package takes a single option: \DescribeMacro{showmeta}|showmeta|. If -% this is set, then the metadata keys defined by the |\addmetakey| are shown -% (see~\ref{sec:user:showmeta}) -% -% \subsection{Adding Metadata Keys to Commands}\label{sec:user:keys} -% -% Key/value pairs in \stex are organized in \textbf{key groups}: every {\stex} macro and -% environment that takes a key/value argument has an associated key group, and only keys -% that are registered in this group can be utilized. The |metakeys| package supplies the -% \DescribeMacro{\addmetakey}|\addmetakey| macro to add a new key to a key group: If -% \meta{group} is the name of a key group \meta{key} is a metadata keyword name, then -% \begin{quote} -% |\addmetakey[|\meta{default}|]{|\meta{group}|}{|\meta{key}|}[|\meta{dval}|]| -% \end{quote} -% registers \meta{key} in the metadata group \meta{group}, with an optional values -% \meta{default} and \meta{dval} for \meta{key}. \meta{default} is the default value for -% \meta{key}, if it is not specified, and \meta{dval} is the value \meta{key} gets, if -% \meta{key} is given without specifying a value. These two defaults are often used as -% \begin{quote} -% |\addmetakey[false]{|\meta{group}|}{|\meta{key}|}[true]| -% \end{quote} -% Then, the value of \meta{key} is |false| if \meta{key} is not given and |true|, if -% \meta{key} is specified without value. This is often the best way if we want to use -% \meta{key} as an indicator to have a feature of name \meta{key} (we can test that with -% |\ifx\|\meta{group}|@|\meta{key}|\@true|, if we prepared the macro |\def\@true{true}| -% earlier). -% -% The keys registered for a metadata group can be used for defining macros with a -% key/value arguments via the \DescribeMacro{\metasetkeys}|\metasetkeys| macro, see for -% instance the the definition in Figure~\ref{fig:foo}. This macro is used exactly like the -% |\setkeys| macro from the |keyval| package~\cite{Carlisle:tkp99}, but integrates custom -% initialization and draft display functionality. This usage is mostly for package -% designers. There is another: If a macro or environment cannot be extended by an optional -% argument, e.g. because anther package already does so (e.g. the |document| environment -% is extended -- by redefining it -- by various packages, which causes problems), the -% |\metasetkeys| macro can be used directly. -% -% The \DescribeMacro{\addmetalistkey}|\addmetalistkey| macro is a variant of |\addmetakey| -% that adds a list-valued metadata key. The |\addmetalistkey{foo}{val}| in -% Figure~\ref{fig:foo} would allows to use multiple occurrences of the |val| keys in the -% metadata argument of |\foo|, the values of the |val| keys are collected as a -% comma-separated list in the token register |\foo@vals|. Note that the |val| key can also -% deal with comma-separated lists for convenience. -% -% With these definitions in a used package\footnote{\makeatletter Recall that the -% \texttt{@} character is only allowed in packages, where comma-separated lists can be -% iterated over e.g. by the \texttt{\textbackslash{@}for} macro.} an invocation of -% \begin{quote} -% |\foo[type=bar,id=f4711,val=4,val=7,val={1,1}]| -% \end{quote} -% is formatted to -% \begin{quote} -% \addmetakey{foo}{id}\addmetakey{foo}{type}\addmetalistkey{foo}{val}\makeatletter -% \newcommand\foo[1][]{\metasetkeys{foo}{#1} I have seen a \emph{foo} of type \texttt{\foo@type} -% with identifier \texttt{\foo@id} and values -% \let\@join=\relax\def\@thejoin{, and } -% \@for\@I:=\foo@vals\do{\@join\@I\let\@join=\@thejoin}!}\makeatother -% \foo[type=bar,id=f4711,val=4,val=7,val=1,val=1] -% \end{quote} -% -% \begin{exfig}[ht] -% \begin{verbatim} -% \addmetakey{foo}{id} -% \addmetakey{foo}{type} -% \addmetakey[yes]{foo}{visible} -% \addmetalistkey{foo}{val} -% \def\@yes{yes} -% \newcommand\foo[1][]{\metasetkeys{foo}{#1} -% \ifx\foo@visible\@yes % testing for visibility -% I have seen a \emph{foo} of type \texttt{\foo@type} with identifier -% \texttt\foo@id and values \texttt\foo@vals. -% \let\@join=\relax\def\@thejoin{, and } -% \@for\@I:=\foo@vals\do{\@join\@I\let\@join=\@thejoin}! -% \fi} -% \end{verbatim} -% \vspace*{-2em} -% \caption{Defining a macro with metadata} -% \label{fig:foo} -% \end{exfig} -% -% \subsection{Showing Metadata Keys/Values}\label{sec:user:showmeta} -% -% If the |showmeta| package option is set, the |metakeys| package sets an internal switch that -% shows the values of all keys specified with the |\addmetakey| macro. The default behavior -% is to write the key/value pairs into the margin as \meta{key}|:|\meta{value}. Package -% designers can customize this behavior by redefining the |\metakeys@show@key| and -% |\metakeys@show@keys| macro. -% -% \DescribeMacro{\metakeys@show@key}|\metakeys@show@key{|\meta{key}|}{|\meta{value}|}| shows the a -% single key value pair, and -% \DescribeMacro{\metakeys@show@keys}|\metakeys@show@keys{|\meta{group}|}{|\meta{keys}|}| shows the -% a list of keys metadata, by default we disregard the \meta{group} and show \meta{keys} -% in a marginpar. -% -% For keys that should not be shown in this manner, the |\addmetakey| macro has a variant -% \DescribeMacro{\addmetakey*}|\addmetakey*|. Its behavior is exactly the same, only that -% it keeps the key from being shown by the |showmeta| option. -% -% Note that setting the |showmeta| option will enable metadata presentation on the whole -% document. But sometimes we want to disable that, e.g. inside figures, where |\marginpar| -% is not allowed. Therefore the |metakeys| package provides the -% \DescribeMacro{\hidemetakeys}|\hidemetakeys| macro that reverses this. The -% \DescribeMacro{\showmetakeys}|\showmetakeys| macro re-enables metadata presentation. -% -% -% \section{Limitations}\label{sec:limitations} -% -% In this section we document known limitations. If you want to help alleviate them, -% please feel free to contact the package author. Some of them are currently discussed in -% the \sTeX GitHub repository~\cite{sTeX:github:on}. -% \begin{enumerate} -% \item none reported yet -% \end{enumerate} -% -% \StopEventually{\newpage\PrintChanges\printbibliography} -% -% \section{The Implementation}\label{sec:impl} -% -% \subsection{Package Options}\label{sec:impl:options} -% -% We declare some switches which will modify the behavior according to the package -% options. Generally, an option |xxx| will just set the appropriate switches to true -% (otherwise they stay false). First we have the general options -% \begin{macrocode} -%<*package> -\newif\ifmetakeys@showmeta\metakeys@showmetafalse -\DeclareOption{showmeta}{\metakeys@showmetatrue} -\DeclareOption*{} -\ProcessOptions -% \end{macrocode} -% -% We build on the |keyval| package which we first need to load. For {\latexml}, we also -% initialize the package inclusions. -% \begin{macrocode} -\RequirePackage{keyval}[1997/11/10] -\RequirePackage{etoolbox} -% \end{macrocode} -% -% \subsection{Adding Metadata Keys}\label{sec:impl:keys} -% -% \begin{macro}{\addmetakey} -% The |\addmetakey| macro looks at the next character and invokes helper macros accordingly. -% \begin{macrocode} -\newcommand\addmetakey{\@ifstar\addmetakey@star\addmetakey@nostar}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\addmetakey@star} -% |\addmetakey@star| takes care of the starred form of |\addmetakey|. An invocation of -% |\addmetakey@star{|\meta{default}|}{|\meta{group}|}{|\meta{key}|}| macro first extends the -% |\metakeys@clear@|\meta{group}|@keys| macro then defines the key \meta{key} with the -% |\define@key| macro from the |keyval| package. This stores the key value given in the -% local macro |\|\meta{group}|@|\meta{key}. -% \begin{macrocode} -\newcommand\addmetakey@star[3][]{% - \@ifnextchar[{% - \addmetakey@star@aux[#1]{#2}{#3}% - }{% - \addmetakey@star@aux[#1]{#2}{#3}[]% - }% -}% -\def\addmetakey@star@aux[#1]#2#3[#4]{% - \metakeys@ext@clear@keys{#2}{#3}{#1}% - \metakeys@initialize@showkeys{#2}% - \define@key{#2}{#3}[#4]{% - \csxdef{#2@#3}{##1}% - }% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\addmetakey@nostar} -% |\addmetakey@nostar| takes care of the no-starred form of |\addmetakey| by first extending the -% |\metakeys@|\meta{group}|@showkeys| macro which contains those keys that should be -% shown and then calling |\addmetakey@star|. -% \begin{macrocode} -\newcommand\addmetakey@nostar[3][]{% - \metakeys@ext@showkeys{#2}{#3}% - \addmetakey@star[#1]{#2}{#3}% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\metasetkeys} -% The |\metasetkeys{|\meta{group}|}| clears/presets the key of \meta{group} via -% |\clear@|\meta{group}|@keys|, (if the |showmeta| option is set) shows them, and -% then sets the keys via |keyval|s |\setkeys| command. -% \begin{macrocode} -\newcommand\metasetkeys[2]{% - \@nameuse{clear@#1@keys}% - \setkeys{#1}{#2}% - \ifmetakeys@showmeta% - \edef\@@keys{\@nameuse{#1@showkeys}}% - \metakeys@show@keys{#1}{% - \@for\@I:=\@@keys\do{% - \metakeys@show@keyval{#1}{\@I}% - }% - }% - \fi% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\metakeys@ext@clear@keys} -% |\metakeys@ext@clear@keys{|\meta{group}|}{|\meta{key}|}{|\meta{default}|}| extends (or -% sets up if this is the first |\addmetakey| for \meta{group}) the -% |\clear@|\meta{group}|@keys| macro to set the default value \meta{default} for -% \meta{key}. The |\clear@|\meta{group}|@keys| macro is used in the generic -% |\metasetkeys| macro below. The variant |\@metakeys@ext@clear@keys| is provided for -% use in the |sref| package. -% \begin{macrocode} -\newrobustcmd\metakeys@ext@clear@keys[3]{% - \@metakeys@ext@clear@keys{#1}{#1@#2}{#3}% -}% -\newrobustcmd\@metakeys@ext@clear@keys[3]{% - \@ifundefined{clear@#1@keys}{% - \csgdef{clear@#1@keys}{\csgdef{#2}{#3}}% - }% - {\expandafter\gappto\csname clear@#1@keys\endcsname{\csgdef{#2}{#3}}}% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\addmetalistkey} -% \begin{macrocode} -\newrobustcmd\addmetalistkey{% - \@ifstar\addmetalistkey@star\addmetalistkey@nostar% -}% -\newrobustcmd\addmetalistkey@star[3][]{% - \metakeys@ext@clear@keys{#2}{#3}{#1}% - \metakeys@initialize@showkeys{#2}% - \csgdef{#2@#3s}{}% - \define@key{#2}{#3}[#1]{% - \ifcsempty{#2@#3s}{% - \csgdef{#2@#3s}{##1}% - }{% - \csxdef{#2@#3s}{\csuse{#2@#3s},##1}% - }% - }% -}% -\newrobustcmd\addmetalistkey@nostar[3][]{% - \metakeys@ext@showkeys{#2}{#3}% - \addmetalistkey@star[#1]{#2}{#3}% -}% -% \end{macrocode} -% \end{macro} -% -% \subsection{Showing Metadata Keys/Values}\label{sec:impl:showmeta} -% -% \begin{macro}{\metakeys@initialize@showkeys} -% |\metakeys@initialize@showkeys{|\meta{group}|}| sets up the |\|\meta{group}|@showkeys| -% macro which is is used to store the keys to be shown of the metadata in in the generic -% |\setmetakeys| macro below. -% \begin{macrocode} -\newrobustcmd\metakeys@initialize@showkeys[1]{% - \@ifundefined{#1@showkeys}{% - \csdef{#1@showkeys}{}% - }{}% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\metakeys@ext@showkeys} -% |\metakeys@ext@showkeys{|\meta{group}|}{|\meta{key}|}| extends (or sets up) the -% |\|\meta{group}|@showkeys| macro which is is used to store the keys to be shown of the -% metadata in in the generic |\setmetakeys| macro below. -% \begin{macrocode} -\newrobustcmd\metakeys@ext@showkeys[2]{% - \@ifundefined{#1@showkeys}{% - \csdef{#1@showkeys}{#2}% - }{% - \csedef{#1@showkeys}{\csuse{#1@showkeys},#2}% - }% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\metakeys@show@key} -% |\metakeys@show@key{|\meta{key}|}{|\meta{value}|}| shows the a single key value pair, as a -% default we just write \meta{key}|:|\meta{value}. -% \begin{macrocode} -\newrobustcmd\@metakeys@show@key[2]{\metakeys@show@key{#2}{#1}}% -\newrobustcmd\metakeys@show@key[2]{% - \edef\@test{#2}% - \ifx\@test\@empty\else #1:#2\quad\fi% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\metakeys@show@keys} -% |\metakeys@show@keys{|\meta{group}|}{|\meta{keys}|}| shows the metadata, by default we -% disregard the \meta{group} and show \meta{keys} in a marginpar. -% \begin{macrocode} -\newrobustcmd\metakeys@show@keys[2]{\marginpar{{\scriptsize #2}}}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\metakeys@show@keyval} -% |\metakeys@show@keyval{|\meta{group}|}|{|\meta{key}|} shows the key/value pair of a given key \meta{key}. -% \begin{macrocode} -\newrobustcmd\metakeys@show@keyval[2]{% - \expandafter\@metakeys@show@key\csname #1@#2\endcsname{#2}% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\showmetakeys} -% \begin{macrocode} -\newrobustcmd\showmetakeys{\metakeys@showmetatrue}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\hidemetakeys} -% \begin{macrocode} -\newrobustcmd\hidemetakeys{\metakeys@showmetafalse}% -% \end{macrocode} -% \end{macro} -% -% \subsection{Using better defaults than empty} -% -% \begin{macro}{\addmetakeynew} -% |\addmetakeynew| is an experimental version of |\addmetakey| which gives -% |\omd@unspecified| as an optional argument, so that it is used as the default value -% here and then test for it in |\omfidus|. But unfortunately, this does not work yet. -% \begin{macrocode} -\newrobustcmd\addmetakeynew[3][]{% - \metakeys@ext@clear@keys{#2}{#3}{#1}% - \define@key{#2}{#3}{% - \csgdef{#2@#3}{##1}% - }% -}% -% \end{macrocode} -% \end{macro} -% -% -% \begin{macro}{\metakeys@unspecified} -% An internal macro for unspecified values. It is used to initialize keys.\ednote{MK: -% we could probably embed an package error or warning in here} -% \begin{macrocode} -\newrobustcmd\metakeys@unspecified{an metakeys-defined key left unspecified}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\metakeysifus} -% This just tests for equality of the first arg with |\metakeys@unspecified| -% \begin{macrocode} -\newrobustcmd\metakeysifus[4]{% - \message{testing #1@#2=\csname#1@#2\endcsname}% - \expandafter\ifx\csname #1@#2\endcsname\metakeys@unspecified{#3}\else{#4}\fi% -}% -%</package> -% \end{macrocode} -% \end{macro} -% \Finale -\endinput -% \iffalse -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: -% \fi - - -% LocalWords: iffalse kohlhase Thu metakeys metakeys.dtx scsys sc sc latexml omdoc foo -% LocalWords: omdocv texttt fileversion maketitle setcounter tocdepth newpage filedate -% LocalWords: tableofcontents ednote showmeta NeedsTeXFormat stex rdfmeta ctancite dval -% LocalWords: makeatletter newcommand emph makeatother exfig vspace impl ltxml textbf -% LocalWords: printbibliography keyval expandafter gdef csname ifx tkp99 sref -% LocalWords: endcsname setkeys ifundefined omfidus metakeysifus addmetakey foo@vals -% LocalWords: doctex metasetkeys metasetkeys marginpar hidemetakeys textsf omd rangle -% LocalWords: hidemetakeys showmetakeys showmetakeys langle textsf langle addmetalistkey -% LocalWords: newif ifmetakeys showmetafalse showmetatrue ifstar showkeys addmetalistkey -% LocalWords: nameuse setmetakeys addmetakeynew textbackslash compactenum rangle xdef -% LocalWords: addmetakey@nostar addmetalistkey@nostar scriptsize endinput diff --git a/macros/latex/contrib/stex/sty/metakeys/metakeys.ins b/macros/latex/contrib/stex/sty/metakeys/metakeys.ins deleted file mode 100644 index 1ed4e2cce0..0000000000 --- a/macros/latex/contrib/stex/sty/metakeys/metakeys.ins +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% This file generates files required to use the ed package. -%% At your command prompt write -%% -%% latex metakeys.ins -%% -%% Copyright(c) 2010 Michael Kohlhase -%% The development version of this file can be found at -%% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/metakeys/metakeys.ins $ -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{metakeys.sty}{\from{metakeys.dtx}{package}}} - -\Msg{*} -\Msg{* You probably need to move the file metakeys.sty into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/metakeys/metakeys.pdf b/macros/latex/contrib/stex/sty/metakeys/metakeys.pdf Binary files differdeleted file mode 100644 index ddf654d939..0000000000 --- a/macros/latex/contrib/stex/sty/metakeys/metakeys.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/mikoslides/README b/macros/latex/contrib/stex/sty/mikoslides/README deleted file mode 100644 index 444da1dbc1..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/mikoslides/beamerthemeJacobs.sty b/macros/latex/contrib/stex/sty/mikoslides/beamerthemeJacobs.sty deleted file mode 100644 index 2581f00c04..0000000000 --- a/macros/latex/contrib/stex/sty/mikoslides/beamerthemeJacobs.sty +++ /dev/null @@ -1,64 +0,0 @@ -% Beamer Jacobs slide theme; some hints from CXL's DFKI theme included -% -% (C) 2009 Michael Kohlhase <m.kohlhase@jacobs-university.de. - -\ProvidesPackage{beamerthemeJacobs} -\typeout{Beamer KWARC theme} -\author[Kohlhase]{Michael Kohlhase} -\institute{Computer Science, Jacobs University Bremen, Germany\\\url{http://kwarc.info}} - -\mode -<presentation> - -%% Shadings and logo images -\pgfdeclareimage[height=.5ex,width=113mm]{shade-l2r}{shading-l2r} -\pgfdeclareimage[height=2ex]{jacobslogo}{jacobs-logo} -\pgfdeclareimage[height=2ex]{cclogo}{cc_somerights} - -%% Headers flushed to the left. -\setbeamertemplate{frametitle}[default][left] - - -%% Add the line below the header -\addtobeamertemplate{frametitle}{}{\hspace*{-1cm} % - \begin{pgfpicture}{0cm}{0cm}{128mm}{2mm} - \pgfputat{\pgforigin}{\pgfbox[left,bottom]{\pgfuseimage{shade-l2r}}} - \end{pgfpicture} - } - -\setbeamertemplate{footline}[text line]{% - \usebeamercolor[fg]{titlelike} - \strut\hspace*{2cm}\insertshortauthor: \insertshorttitle\hfill{}% - \insertframenumber\hfill\insertshortdate\hspace*{3cm}% - } - \addtobeamertemplate{footline}{ % - \begin{pgfpicture}{0cm}{0cm}{128mm}{0mm} % - \pgfputat{\pgfpoint{126mm}{1mm}}{\pgfbox[right,top]{\pgfuseimage{jacobslogo}}} % - \pgfputat{\pgfpoint{10mm}{1mm}}{\pgfbox[right,top]{\pgfuseimage{cclogo}}} % - \end{pgfpicture}}{} - -%% Turn off the navigation symbols -\setbeamertemplate{navigation symbols}{} - -%% Inner theme -\useinnertheme{default} -%\setbeamertemplate{enumerate item}{(\alph{enumi})} -%\setbeamertemplate{enumerate subitem}{(\roman{enumii})} - -%% Big logo for the title page. -%\pgfdeclareimage[height=1cm]{biglogo}{beamer/img/DFKI-SKS} -%\titlegraphic{\pgfuseimage{biglogo}} - -\mode -<all> - -%% Redefine various margin sizes -\setbeamersize{text margin left=3mm} -\setbeamersize{text margin right=3mm} -\setlength\leftmargini{1em} -\setlength\leftmarginii{1em} -\setlength\leftmarginiii{1em} -\providecommand{\vstretch}[1]{\vspace*{\stretch{#1}}} -\beamer@descriptionwidth=1cm - - diff --git a/macros/latex/contrib/stex/sty/mikoslides/cc-by-sa.png b/macros/latex/contrib/stex/sty/mikoslides/cc-by-sa.png Binary files differdeleted file mode 100644 index f0a944e0b8..0000000000 --- a/macros/latex/contrib/stex/sty/mikoslides/cc-by-sa.png +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/mikoslides/cc_somerights.png b/macros/latex/contrib/stex/sty/mikoslides/cc_somerights.png Binary files differdeleted file mode 100644 index fd7d3c7f33..0000000000 --- a/macros/latex/contrib/stex/sty/mikoslides/cc_somerights.png +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/mikoslides/dangerous-bend.png b/macros/latex/contrib/stex/sty/mikoslides/dangerous-bend.png Binary files differdeleted file mode 100644 index fbcfefa5d9..0000000000 --- a/macros/latex/contrib/stex/sty/mikoslides/dangerous-bend.png +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/mikoslides/jacobs-logo.png b/macros/latex/contrib/stex/sty/mikoslides/jacobs-logo.png Binary files differdeleted file mode 100644 index 0bbe28c44f..0000000000 --- a/macros/latex/contrib/stex/sty/mikoslides/jacobs-logo.png +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/mikoslides/mikoslides.dtx b/macros/latex/contrib/stex/sty/mikoslides/mikoslides.dtx deleted file mode 100644 index 1fc76db644..0000000000 --- a/macros/latex/contrib/stex/sty/mikoslides/mikoslides.dtx +++ /dev/null @@ -1,810 +0,0 @@ -% \iffalse meta-comment -% A LaTeX Class for Jacobs University Slides -% Copyright (c) 2007 Michael Kohlhase, all rights reserved -% this file is released under the -% Gnu Library Public Licences (LGPL) -% -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<cls|package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<cls>\ProvidesClass{mikoslides}[2019/03/20 v1.2 MiKo slides Class] -%<package>\ProvidesPackage{mikoslides}[2019/03/20 v1.2 MiKo slides Package] -% -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage{url,array,float,xspace} -\usepackage[show]{ed} -\usepackage{graphicx,paralist} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\def\githubissue#1{\cite{sTeX:github:on}, -\hyperlink{https://github.com/KWARC/sTeX/issues/#1}{issue #1}} -\usepackage{hyperref} -\begin{document} -\RecordChanges -\DocInput{mikoslides.dtx} -\end{document} -%</driver> -% \fi -% -% \CheckSum{469} -% -% \changes{v0.1}{2005/12/06}{Initial Version} -% \changes{v0.2}{2006/01/11}{course notes back on seminar} -% \changes{v0.3}{2007/05/16}{changing to Jacobs logo} -% \changes{v0.4}{2007/10/16}{re-basing the whole thing on beamer} -% \changes{v0.4}{2008/09/06}{moving line-end-comment to \texttt{omdoc.dtx}} -% \changes{v0.5}{2009/06/17}{eliminating mytwocolumns, this is better done by \texttt{beamer.cls}} -% \changes{v0.9}{2010/06/18}{this is almost done} -% \changes{v0.9}{2012/09/17}{basic options handling for the \texttt{frame} environment in -% notes mode} -% \changes{v0.9}{2013/08/23}{numbered sectocframes} -% \changes{v1.0}{2014/01/07}{adding \texttt{\textbackslash frameimage}} -% \changes{v1.1}{2015/10/25}{Removing the old title macros (use the regular ones instead)} -% \changes{v1.1}{2015/10/25}{reinterpreting omgroup} -% \changes{v1.1}{2015/11/04}{moving MathHub support out to separate package} -% \changes{v1.2}{2018/12/03}{changed to keyval class/package options, allowed arbitrary classes} -% -% \GetFileInfo{mikoslides.cls} -% \MakeShortVerb{\|} -% -% \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\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} -% \def\stex{\hbox{\raisebox{-.5ex}S\kern-.5ex\TeX}} -% \def\sTeX{\stex} -% \def\cnxml{\scshape{CNXml}} -% \def\connexions{\scshape{Connexions}} -% \def\element#1{{\ttfamily{#1}}} -% \def\snippet#1{{\ttfamily{#1}}} -% \def\cnxlatex{CNX\LaTeX\xspace} -% \def\mathml{{\scshape{MathML}}\xspace} -% \def\omdoc{OMDoc\xspace} -% \def\activemath{{\scshape{ActiveMath}}\xspace} -% \def\textwarning{\includegraphics[width=1.2em]{dangerous-bend}\xspace} -% -% \title{Slides and Course Notes\thanks{Version {\fileversion} -% (last revised {\filedate})}} -% \author{Michael Kohlhase\\ -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}} -% \maketitle -% -% \begin{abstract} -% We present a document class from which we can generate both course slides and course -% notes in a transparent way. -% \end{abstract} -% -% \tableofcontents\newpage -% -%\section{Introduction} -% -% The |mikoslides| document class is derived from |beamer.cls|~\cite{beamerclass:on}, it -% adds a ``notes version'' for course notes derived from the |omdoc| -% class~\cite{Kohlhase:smomdl} that is more suited to printing than the one supplied by -% |beamer.cls|. -% -% -%\section{The User Interface}\label{sec:user} -% -% The |mikoslides| class takes the notion of a slide frame from Till Tantau's excellent -% |beamer| class and adapts its notion of frames for use in the \sTeX and \omdoc. To -% support semantic course notes, it extends the notion of mixing frames and explanatory -% text, but rather than treating the frames as images (or integrating their contents into -% the flowing text), the |mikoslides| package displays the slides as such in the course -% notes to give students a visual anchor into the slide presentation in the course (and to -% distinguish the different writing styles in slides and course notes). -% -% In practice we want to generate two documents from the same source: the slides for -% presentation in the lecture and the course notes as a narrative document for home -% study. To achieve this, the |mikoslides| class has two modes: \emph{slides mode} and -% \emph{notes mode} which are determined by the package option. -% -% \subsection{Package Options}\label{sec:user:options} -% -% The |mikoslides| class takes a variety of class options:\ednote{leaving out noproblems -% for the moment until we decide what to do with it.} -% \begin{itemize} -% \item The options \DescribeMacro{slides}|slides|\DescribeMacro and {notes}|notes| switch -% between slides mode and notes mode (see Section~\ref{sec:user:notesslides}). -% \item If the option \DescribeMacro{sectocframes}|sectocframes| is given, then special -% frames with section table of contents are produced headers \ednote{document the functionality} -% \item \DescribeMacro{showmeta}|showmeta|. If this is set, then the metadata keys are -% shown (see~\cite{Kohlhase:metakeys:ctan} for details and customization options). -% \item If the option \DescribeMacro{frameimages}|frameimages| is set, then slide mode -% also shows the |\frameimage|-generated frames. -% \item \DescribeMacro{topsect}|topsect=|\meta{sect} can be used to specify the -% top-level sectioning level; the default for \meta{setc} is |section|. -% \end{itemize} -% -% \subsection{Notes and Slides}\label{sec:user:notesslides} -% -% Slides are represented with the \DescribeEnv{frame}|frame| just like in the |beamer| -% class, see~\cite{Tantau:ugbc} for details. The |mikoslides| class adds the -% \DescribeEnv{note}|note| environment for encapsulating the course note -% fragments.\footnote{MK: it would be very nice, if we did not need this environment, and -% this should be possible in principle, but not without intensive LaTeX trickery. Hints to -% the author are welcome.} -% -% \textwarning Note that it is essential to start and end the |notes| environment at the -% start of the line -- in particular, there may not be leading blanks -- else {\LaTeX} -% becomes confused and throws error messages that are difficult to decipher. -% -% \begin{exfig} -% \begin{verbatim} -% \begin{note} -% We start this course with ... -% \end{note} -% -% \begin{frame} -% \frametitle{The first slide} -% ... -% \end{frame} -% \begin{note} -% ... and more explanatory text -% \end{note} -% -% \begin{frame} -% \frametitle{The second slide} -% ... -% \end{frame} -% ... -% \end{verbatim} -% \caption{A typical Course Notes File}\label{fig:notesfile} -% \end{exfig} -% -% By interleaving the |frame| and |note| environments, we can build course notes as shown -% in Figure~\ref{fig:notesfile}. -% -% Sometimes, we want to integrate slides as images after all -- e.g. because we already -% have a PowerPoint presentation, to which we want to add \sTeX notes. In this case we can -% use \DescribeMacro{\frameimage}|\frameimage[|\meta{opt}|]{|\meta{path}|}|, where -% \meta{opt} are the options of |\includegraphics| from the |graphicx| -% package~\cite{CarRah:tpp99} and \meta{path} is the file path (extension can be left off -% like in |\includegraphics|). -% -% If we want to transclude a the contents of a file as a note, we can use the -% \DescribeMacro{\ninputref}|\ninputref| macro. |\ninputref{foo}| is equivalent to -%\begin{verbatim} -% \begin{note} -% \inputref{foo} -% \end{note} -% \end{verbatim} -% -% There are some environments that tend to occur at the top-level of |note| -% environments. We make convenience versions of these: e.g. the -% \DescribeEnv{nomtext}|nomtext| environment is just an |omtext| inside a |note| -% environemnt (but looks nicer in the source, since it avoids one level of source -% indenting). Similarly, we have the \DescribeEnv{nomgroup}|nomgroup| environment. -% -% \subsection{Header and Footer Lines}\label{sec:user:headfootlines} -% -% \subsection{Colors and Highlighting}\label{sec:user:highlighting} -% The \DescribeMacro{\textwarning}|\textwarning| macro generates a warning -% sign: \textwarning -% -% \subsection{Front Matter, Titles, etc}\label{sec:user:matter} -% -% \subsection{Miscellaneous}\label{sec:user:misc} -% -% \section{Limitations}\label{sec:limitations} -% -% In this section we document known limitations. If you want to help alleviate them, -% please feel free to contact the package author. Some of them are currently discussed in -% the \sTeX GitHub repository~\cite{sTeX:github:on}. -% \begin{enumerate} -% \item when option |book| which uses |\pagestyle{headings}| is given and semantic macros -% are given in the |omgroup| titles, then they sometimes are not defined by the time the -% heading is formatted. Need to look into how the headings are made. This is a problem -% of the underlying |omdoc| package. -% \end{enumerate} -% -% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography} -% -%\section{The Implementation}\label{sec:impl} -% -%\subsection{Class and Package Options}\label{sec:impl:init} -% -% We define some Package Options and switches for the |mikoslides| class and activate them -% by passing them on to |beamer.cls| and |omdoc.cls| and the |mikoslides| package. We pass -% the |nontheorem| option to the |statements| package when we are not in notes mode, since -% the |beamer| package has its own (overlay-aware) theorem environments. -% -% \begin{macrocode} -%<*cls> -\RequirePackage{kvoptions} -\RequirePackage{etoolbox} -\SetupKeyvalOptions{family=mks@cls,prefix=mks@cls@} -\DeclareStringOption[article]{class} -\AddToKeyvalOption*{class}{\PassOptionsToClass{class=\mks@cls@class}{omdoc} - \ifdefstring{\mks@cls@class}{book}{\PassOptionsToPackage{topsect=part}{mikoslides}}{} - \ifdefstring{\mks@cls@class}{report}{\PassOptionsToPackage{topsect=part}{mikoslides}}}{} -\DeclareBoolOption{notes} -\DeclareComplementaryOption{slides}{notes} -\DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{omdoc} - \PassOptionsToClass{\CurrentOption}{beamer} - \PassOptionsToPackage{\CurrentOption}{mikoslides}} -\ProcessKeyvalOptions{mks@cls} -%</cls> -% \end{macrocode} -% now we do the same for the |mikoslides| package. -% \begin{macrocode} -%<*package> -\RequirePackage{kvoptions} -\SetupKeyvalOptions{family=mks@sty,prefix=mks@sty@} -\DeclareStringOption[section]{topsect} -\DeclareBoolOption{mh} -\AddToKeyvalOption*{mh}{ - \PassOptionsToPackage{mh}{stex} - \PassOptionsToPackage{mh}{smglom} - \PassOptionsToPackage{mh}{tikzinput}} -\newif\ifnotes\notestrue -\DeclareBoolOption{notes} -\AddToKeyvalOption*{notes}{\notestrue\PassOptionsToPackage{notes}{statements}} -\DeclareComplementaryOption{slides}{notes} -\AddToKeyvalOption*{slides}{\notesfalse\PassOptionsToPackage{nontheorem}{statements}} -\DeclareBoolOption{sectocframes} -\AddToKeyvalOption*{sectocframes}{\PassOptionsToPackage{msection}{statements}} -\DeclareBoolOption{frameimages} -\DeclareBoolOption{noproblems} -\DeclareDefaultOption{\PassOptionsToPackage{\CurrentOption}{stex} - \PassOptionsToPackage{\CurrentOption}{smglom} - \PassOptionsToPackage{\CurrentOption}{tikzinput}} -\ProcessKeyvalOptions{mks@sty} -%</package> -% \end{macrocode} -% -% Depending on the options, we either load the |article|-based |omdoc| or the |beamer| -% class (and set some counters). -% \begin{macrocode} -%<*cls> -\ifmks@cls@notes - \LoadClass{omdoc} -\else - \LoadClass[10pt,notheorems]{beamer} - \newcounter{Item} - \newcounter{paragraph} - \newcounter{subparagraph} - \newcounter{Hfootnote} -\fi -% \end{macrocode} -% now it only remains to load the |mikoslides| package that does all the rest. -% \begin{macrocode} -\RequirePackage{mikoslides} -%</cls> -% \end{macrocode} -% -% In |notes| mode, we also have to make the |beamer|-specific things available to -% |article| via the |beamerarticle| package. We use options to avoid loading theorem-like -% environments, since we want to use our own from the $\sTeX$ packages. The first batch -% of packages we want are loaded on |mikoslides.sty|. These are the general ones, we will -% load the \sTeX-specific ones after we have done some work (e.g. defined the counters -% |m*|). Only the |stex-logo| package is already needed now for the default theme. -% -% \begin{macrocode} -%<*package> -\ifmks@sty@notes -\RequirePackage{a4wide} -\RequirePackage{marginnote} -\RequirePackage{xcolor} -\RequirePackage{mdframed} -\RequirePackage[noxcolor,noamsthm]{beamerarticle} -\fi -\ifmks@sty@mh\RequirePackage{mikoslides-mh}\fi -\RequirePackage{etoolbox} -\RequirePackage{amssymb} -\RequirePackage{amsmath} -\RequirePackage{comment} -\RequirePackage{textcomp} -\RequirePackage{url} -\RequirePackage{graphicx} -\RequirePackage{stex-logo} -\RequirePackage{pgf} -\ifmks@sty@notes -\RequirePackage[bookmarks,bookmarksopen,bookmarksnumbered,breaklinks, -linkcolor=black,citecolor=black,urlcolor=cyan,filecolor=cyan,colorlinks]{hyperref} -\fi -% \end{macrocode} -% -% finally, we require the |metakeys| package from \sTeX, so that we can use the -% |\addmetakey| mechanism. -% -% \begin{macrocode} -\RequirePackage{metakeys} -% \end{macrocode} -% -% \subsection{Notes and Slides}\label{sec:impl:noteslides} -% -% For the lecture notes cases, we also provide the |\usetheme| macro that would otherwise -% from the the |beamer| class. While the latter loads |beamertheme|\meta{theme}{.sty}, the -% notes version loads |beamernotestheme|\meta{theme}|.sty|.\ednote{MK: This is not ideal, but -% I am not sure that I want to be able to provide the full theme functionality there.} -% \begin{macrocode} -\ifmks@sty@notes -\renewcommand\usetheme[2][]{\usepackage[#1]{beamernotestheme#2}} -\fi -% \end{macrocode} -% We define the sizes of slides in the notes. Somehow, we cannot get by with the same -% here. -% -% \begin{macrocode} -\newcounter{slide} -\newlength{\slidewidth}\setlength{\slidewidth}{12.8cm} -\newlength{\slideheight}\setlength{\slideheight}{9cm} -% \end{macrocode} -% -% \begin{environment}{note} -% The |note| environment is used to leave out text in the |slides| mode. It does not have -% a counterpart in OMDoc. So for course notes, we define the |note| environment to be a -% no-operation otherwise we declare the |note| environment as a comment via the |comment| -% package. -% \begin{macrocode} -\ifmks@sty@notes% - \renewenvironment{note}{\ignorespaces}{}% -\else% - \excludecomment{note}% -\fi% -% \end{macrocode} -% \end{environment} -% -% \begin{macro}{\ninputref} -% \begin{macrocode} -\newcommand\ninputref[2][]{\ifmks@sty@notes\inputref[#1]{#2}\fi} -% \end{macrocode} -% \end{macro} -% -% -% We first set up the slide boxes in |article| mode. We set up sizes and provide a -% box register for the frames and a counter for the slides. -% -% \begin{macrocode} -\ifmks@sty@notes - \newlength{\slideframewidth} - \setlength{\slideframewidth}{1.5pt} -% \end{macrocode} -% -% \begin{environment}{frame} -% We first define the keys. -% \begin{macrocode} - \addmetakey{frame}{label} - \addmetakey[yes]{frame}{allowframebreaks} - \addmetakey{frame}{allowdisplaybreaks} - \addmetakey[yes]{frame}{fragile} - \addmetakey[yes]{frame}{shrink} - \addmetakey[yes]{frame}{squeeze} - \addmetakey[yes]{frame}{t} -% \end{macrocode} -% We define the environment, read them, and construct the slide number and label. -% \begin{macrocode} - \renewenvironment{frame}[1][]{% - \metasetkeys{frame}{#1}% - \stepcounter{slide}% - \def\@currentlabel{\theslide}% - \ifx\frame@label\@empty% - \else% - \label{\frame@label}% - \fi% -% \end{macrocode} -% We redefine the |itemize| environment so that it looks more like the one in |beamer|. -% \begin{macrocode} - \def\itemize@level{outer}% - \def\itemize@outer{outer}% - \def\itemize@inner{inner}% - \renewcommand\newpage{}% - \renewcommand\metakeys@show@keys[2]{\marginnote{{\scriptsize ##2}}}% - \renewenvironment{itemize}{% - \ifx\itemize@level\itemize@outer% - \def\itemize@label{$\rhd$}% - \fi% - \ifx\itemize@level\itemize@inner% - \def\itemize@label{$\scriptstyle\rhd$}% - \fi% - \begin{list}% - {\itemize@label}% - {\setlength{\labelsep}{.3em}% - \setlength{\labelwidth}{.5em}% - \setlength{\leftmargin}{1.5em}% - }% - \edef\itemize@level{\itemize@inner}% - }{% - \end{list}% - }% -% \end{macrocode} -% We create the box with the |mdframed| environment from the equinymous package. -% \begin{macrocode} - \begin{mdframed}[linewidth=\slideframewidth,skipabove=1ex,skipbelow=1ex,userdefinedwidth=\slidewidth,align=center]\sf% - }{% - \medskip\miko@slidelabel\end{mdframed}% - }% -% \end{macrocode} -% \end{environment} -% -% Now, we need to redefine the frametitle (we are still in course notes mode). -% \begin{macro}{\frametitle} -% \begin{macrocode} - \renewcommand{\frametitle}[1]{{\Large\bf\sf\color{blue}{#1}}\medskip}% -\fi %ifnotes -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\frameimage} -% We have to make sure that the width is overwritten, for that we check the -% |\Gin@ewidth| macro from the |graphicx| package\ednote{MK@DG; we need to do that in -% the LaTeXML binding as well!} -% \begin{macrocode} -\newrobustcmd\frameimage[2][]{% - \stepcounter{slide}% - \ifmks@sty@frameimages% - \def\Gin@ewidth{}\setkeys{Gin}{#1}% - \ifmks@sty@notes\else\vfill\fi% - \ifx\Gin@ewidth\@empty% - \mycgraphics[width=\slidewidth,#1]{#2}\else\mycgraphics[#1]{#2}% - \fi% - \par\strut\hfill{\footnotesize Slide \arabic{slide}}% - \ifmks@sty@notes\else\vfill\fi% - \fi% -}% ifframeimages -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\pause} -% \ednote{MK: fake it in notes mode for now} -% \begin{macrocode} -\ifmks@sty@notes\newcommand\pause{}\fi -% \end{macrocode} -% \end{macro} -% -% \begin{environment}{nomtext} -% \begin{macrocode} -\ifmks@sty@notes\newenvironment{nomtext}[1][]{\begin{omtext}[#1]}{\end{omtext}}% -\else\excludecomment{nomtext}\fi% -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{nomgroup} -% \begin{macrocode} -\ifmks@sty@notes\newenvironment{nomgroup}[2][]{\begin{omgroup}[#1]{#2}}{\end{omgroup}}% -\else\excludecomment{nomgroup}\fi% -% \end{macrocode} -% \end{environment} -% \subsection{Header and Footer Lines}\label{sec:impl:headfootlines} -% -% Now, we set up the infrastructure for the footer line of the slides, we use boxes for -% the logos, so that they are only loaded once, that considerably speeds up processing. -% -% \begin{macro}{\setslidelogo} -% The default logo is the logo of Jacobs University. Customization can be done by |\setslidelogo{|\meta{logo name}|}|. -% \begin{macrocode} -\newlength{\slidelogoheight} -\ifmks@sty@notes% - \setlength{\slidelogoheight}{.4cm}% -\else% - \setlength{\slidelogoheight}{1cm}% -\fi% -\newsavebox{\slidelogo}% -\sbox{\slidelogo}{\sTeX}% -\newrobustcmd{\setslidelogo}[1]{% - \sbox{\slidelogo}{\includegraphics[height=\slidelogoheight]{#1}}% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\setsource} -% |\source| stores the writer's name. By default it is {\it Michael Kohlhase} since he is the main user and designer of this package. |\setsource{|\meta{name}|}| can change the writer's name. -% \begin{macrocode} -\def\source{Michael Kohlhase}% customize locally -\newrobustcmd{\setsource}[1]{\def\source{#1}}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\setlicensing} -% Now, we set up the copyright and licensing. By default we use the Creative Commons -% Attribuition-ShareAlike license to strengthen the public domain. If package |hyperref| -% is loaded, then we can attach a hyperlink to the license -% logo. |\setlicensing[|\meta{url}|]{|\meta{logo name}|}| is used for customization, -% where ||\meta{url}|| is optional. -% \begin{macrocode} -\def\copyrightnotice{\footnotesize\copyright:\hspace{.3ex}{\source}}% -\newsavebox{\cclogo}% -\sbox{\cclogo}{\includegraphics[height=\slidelogoheight]{cc_somerights}}% -\newif\ifcchref\cchreffalse% -\AtBeginDocument{% - \@ifpackageloaded{hyperref}{\cchreftrue}{\cchreffalse} -}% -\def\licensing{% - \ifcchref% - \href{http://creativecommons.org/licenses/by-sa/2.5/}{\usebox{\cclogo}}% - \else% - {\usebox{\cclogo}}% - \fi% -}% -\newrobustcmd{\setlicensing}[2][]{% - \def\@url{#1}% - \sbox{\cclogo}{\includegraphics[height=\slidelogoheight]{#2}}% - \ifx\@url\@empty% - \def\licensing{{\usebox{\cclogo}}}% - \else% - \def\licensing{% - \ifcchref% - \href{#1}{\usebox{\cclogo}}% - \else% - {\usebox{\cclogo}}% - \fi% - }% - \fi% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\slidelabel} -% Now, we set up the slide label for the |article| mode.\ednote{see that we can use the themes for the slides some day. This is all fake.} -% \begin{macrocode} -\newrobustcmd\miko@slidelabel{% - \vbox to \slidelogoheight{% - \vss\hbox to \slidewidth% - {\licensing\hfill\copyrightnotice\hfill\arabic{slide}\hfill\usebox{\slidelogo}}% - }% -}% -% \end{macrocode} -% \end{macro} -% -% \subsection{Colors and Highlighting}\label{sec:impl:highlighting} -% -% We first specify sans serif fonts as the default. -% -% \begin{macrocode} -\sffamily -% \end{macrocode} -% -% Now, we set up an infrastructure for highlighting phrases in slides. Note that we use -% content-oriented macros for highlighting rather than directly using color markup. -% The first thing to to is to adapt the green so that it is dark enough for most beamers -% \begin{macrocode} -\AtBeginDocument{% -\definecolor{green}{rgb}{0,.5,0}% -\definecolor{purple}{cmyk}{.3,1,0,.17}% -}% -% \end{macrocode} -% -% We customize the |\defemph|, |\notemph|, and |\stDMemph| macros with colors for the use -% in the |statements| package. Furthermore we customize the |\@@lec| macro for the -% appearance of line end comments in |\lec|. -% -% \begin{macrocode} -% \def\STpresent#1{\textcolor{blue}{#1}} -\def\defemph#1{{\textcolor{magenta}{#1}}} -\def\notemph#1{{\textcolor{magenta}{#1}}} -\def\stDMemph#1{{\textcolor{blue}{#1}}} -\def\@@lec#1{(\textcolor{green}{#1})} -% \end{macrocode} -% -% I like to use the dangerous bend symbol for warnings, so we provide it here. -% \begin{macro}{\textwarning} -% as the macro can be used quite often we put it into a box register, so that it is only -% loaded once. -% \begin{macrocode} -\pgfdeclareimage[width=.8em]{miko@small@dbend}{dangerous-bend} -\def\smalltextwarning{% - \pgfuseimage{miko@small@dbend}% - \xspace% -}% -\pgfdeclareimage[width=1.2em]{miko@dbend}{dangerous-bend} -\newrobustcmd\textwarning{% - \raisebox{-.05cm}{\pgfuseimage{miko@dbend}}% - \xspace% -}% -\pgfdeclareimage[width=2.5em]{miko@big@dbend}{dangerous-bend}% -\newrobustcmd\bigtextwarning{% - \raisebox{-.05cm}{\pgfuseimage{miko@big@dbend}}% - \xspace% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macrocode} -\newrobustcmd\putgraphicsat[3]{% - \begin{picture}(0,0)\put(#1){\includegraphics[#2]{#3}}\end{picture}% -}% -\newrobustcmd\putat[2]{% - \begin{picture}(0,0)\put(#1){#2}\end{picture}% -}% -% \end{macrocode} -% -% \subsection{Sectioning} -% -% If the |sectocframes| option is set, then we make section frames. We first define a set -% of counters\ednote{I forget: why not use the counters from beamer/article? --> document -% this.} -% \begin{macrocode} -\ifmks@sty@sectocframes% -\ifdefstring\mks@sty@topsect{part}{% - \newcounter{mpart}\newcounter{mchapter}\newcounter{msection}[mchapter]} -{\ifdefstring\mks@sty@topsect{chapter}{% - \newcounter{mchapter}\newcounter{msection}[mchapter]} - {\newcounter{msection}}} -\newcounter{msubsection}[msection]% -\newcounter{msubsubsection}[msubsection]% -\newcounter{msubsubsubsection}[msubsubsection]% -\fi% ifsectocframes -% \end{macrocode} -% -% Now that we have defined the counters, we can load the \sTeX-specific packages (in -% particular |statements| that needs these counters). -% -% \begin{macrocode} -\RequirePackage{stex} -\RequirePackage{smglom} -\RequirePackage{tikzinput} -% \end{macrocode} -% -% Finally, we set the \DescribeMacro{\section@level}|\section@level| macro that governs -% sectioning. -% -% \begin{macrocode} -\section@level=2 -\ifdefstring{\mks@sty@topsect}{part}{\section@level=0}{} -\ifdefstring{\mks@sty@topsect}{chapter}{\section@level=1}{} -% \end{macrocode} -% -% Now \sTeX is loaded, we redefine the |omgroup| environment to produce section toc frames -% (if the option |sectocframes| is specified.)\ednote{MK: we should probably just redefine -% omgroup@num and omgroup@nonum, since they do the actual work so that we can add the -% sectocframes behavior here without having to copy the internals. Then there is less -% material that can get out of sync. Additionally, we should have a hook in the original -% code of those so that we can increment the slides counter in notes node (to keep slides -% in sync)} -% -% \begin{macrocode} -\ifmks@sty@notes\else% only in slides -\def\part@prefix{\ifdefstring\mks@sty@topsect{part}{\arabic{mchapter}.}{}} -\renewenvironment{omgroup}[2][]{% - \metasetkeys{omgroup}{#1}\sref@target% - \advance\section@level by 1% - \ifmks@sty@sectocframes% - \stepcounter{slide} - \begin{frame}[noframenumbering]% - \vfill\Large\centering% - \red{% - \ifcase\section@level\or - \stepcounter{mpart} - \def\@@label{Part \Roman{mpart}} - \def\currentsectionlevel{part} - \or% - \stepcounter{mchapter} - \def\@@label{Chapter \arabic{mchapter}} - \def\currentsectionlevel{chapter} - \or - \stepcounter{msection} - \def\@@label{\part@prefix\arabic{msection}} - \def\currentsectionlevel{section} - \or - \stepcounter{msubsection} - \def\@@label{\part@prefix\arabic{msection}.\arabic{msubsection}} - \def\currentsectionlevel{subsection} - \or - \stepcounter{msubsubsection} - \def\@@label{\part@prefix\arabic{msection}.\arabic{msubsection}.\arabic{msubsubsection}} - \def\currentsectionlevel{subsubsection} - \or - \stepcounter{msubsubsubsection} - \def\@@label{\part@prefix\arabic{msection}.\arabic{msubsection}.\arabic{msubsubsection}.\arabic{msubsubsubsection}} - \def\currentsectionlevel{subsubsubsection} - \fi% end ifcase - \@@label\sref@label@id\@@label - \quad #2% - }% - \vfill% - \end{frame}% - \fi %ifmks@sty@sectocframes -} -{\advance\section@level by -1}% -\fi% ifmks@sty@notes -% \end{macrocode} -% -% \subsection{Miscellaneous} -% -% We set up a |beamer| template for theorems like ams style, but without a block -% environment. -% \begin{macrocode} -\def\inserttheorembodyfont{\normalfont} -\defbeamertemplate{theorem begin}{miko} -{\inserttheoremheadfont\inserttheoremname\inserttheoremnumber - \ifx\inserttheoremaddition\@empty\else\ (\inserttheoremaddition)\fi% - \inserttheorempunctuation\inserttheorembodyfont\xspace} -\defbeamertemplate{theorem end}{miko}{} -% \end{macrocode} -% and we set it as the default one. -% \begin{macrocode} -\setbeamertemplate{theorems}[miko] -% \end{macrocode} -% The following fixes an error I do not understand, this has something to do with -% beamer compatibility, which has similar definitions but only up to 1. -% \begin{macrocode} -\expandafter\def\csname Parent2\endcsname{} -% \end{macrocode} -% We need to disregard the columns macros introduced by the |beamer| class in the notes. -% \begin{macrocode} -\ifmks@sty@notes% - \renewenvironment{columns}[1][]{% - \par\noindent% - \begin{minipage}% - \slidewidth\centering\leavevmode% - }{% - \end{minipage}\par\noindent% - }% - \newsavebox\columnbox% - \renewenvironment<>{column}[2][]{% - \begin{lrbox}{\columnbox}\begin{minipage}{#2}% - }{% - \end{minipage}\end{lrbox}\usebox\columnbox% - }% -\fi% ifnotes -% \end{macrocode} -% -% \begin{macrocode} -\ifmks@sty@noproblems% - \newenvironment{problems}{}{}% -\else% - \excludecomment{problems}% -\fi% -%</package> -% \end{macrocode} -% \Finale -\endinput -% \iffalse -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: -% \fi -% LocalWords: mikoslides dtx beamer omdoc notheorems noamsthm beamerarticle sc Licences -% LocalWords: graphicx slidelabel stex amssymb tikz url CPERL amsmath filedate -% LocalWords: LoadClass RequirePackage DefRegister DefEnvironment omgroup rgb frameimage -% LocalWords: afterDigestBegin setProperty LookupValue DefConstructor hyperref Tantau's -% LocalWords: cmyk lec DefMacro titleslide ttitle RawTeX metadata etoolbox cls emph ugbc -% LocalWords: noproblems linkcolor bookmarksopen citecolor urlcolor colorlinks Tantau di -% LocalWords: breaklinks plainpages pdfpagelabels srcref iffalse texttt atwin exfig dt -% LocalWords: mytwocolumns twintoo atwintoo scsys sc hbox raisebox cnxml impl notesfile -% LocalWords: scshape ttfamily cnxlatex mathml activemath fileversion newpage tpp99 dd -% LocalWords: maketitle tableofcontents ednote compactitem showmeta showmeta beamerclass -% LocalWords: sectocframes sectocframes textwarning textwarning compactenum eq omgroups -% LocalWords: includegraphics tracissue printbibliography textsf langle textsf rangle -% LocalWords: langle ltxml metakeys newif ifnotes notesfalse ifsectocframes rangle putat -% LocalWords: sectocframesfalse ifproblems problemstrue notestrue marginnote frontmatter -% LocalWords: problemsfalse sectocframestrue mdframed noxcolor newcounter ifx equinymous -% LocalWords: Hfootnote usetheme tikzinput usepgflibrary usetikzlibrary rhd ignorespaces -% LocalWords: tikzmark textcomp newlength slidewidth setlength slidewidth miko setkeys -% LocalWords: slideheight slideheight renewenvironment excludecomment itenize Gin@ewidth -% LocalWords: slideframewidth slideframewidth surroundwithmdframed addmetakey Gen@ewidth -% LocalWords: allowframebreaks allowdisplaybreaks metasetkeys stepcounter sbox mpart baz -% LocalWords: currentlabel theslide renewcommand scriptsize scriptstyle hspace mchapter -% LocalWords: medskip linewidth skipabove skipbelow frametitle newenvironment msection -% LocalWords: slidelogoheight newsavebox slidelogo slidelogo jacobs-logo vbox ifcase -% LocalWords: Attribuition-ShareAlike copyrightnotice footnotesize cclogo vss minipage -% LocalWords: cclogo somerights ifcchref cchreffalse ifpackageloaded usebox mycgraphics -% LocalWords: cchreftrue usebox newcommand hfill hfill definecolor definecolor endinput -% LocalWords: defemph notemph stDMemph STpresent textcolor textwarigrening ltx HorIacJuc -% LocalWords: pgfdeclareimage dbend pgfuseimage xspace titleframe titlepage mycgraphics -% LocalWords: titleframewith hline vspace ttitlejoint newbox boxwith boxwith msubsection -% LocalWords: putgraphicsat beginomgroup ifnum vfill vfill noindent leavevmode cscpnrr11 -% LocalWords: columnbox lrbox needwrapper unlist omtext bgroup autoclose pgf readXToken -% LocalWords: mygraphics doctex NeedsTeXFormat textbackslash userdefinedwidth foobar -% LocalWords: includegrahics smalltextwarnings msubsubsection msubsubsubsection ldots -% LocalWords: frameimages frameimages ifframeimages frameimagesfalse frameimagestrue -% LocalWords: expandafter csname endcsname specializes customization flexiformal colors -% LocalWords: initialize Initialization defindex realized itemize newrobustcmd -% LocalWords: specialize centering itemizations setsource setlicensing diff --git a/macros/latex/contrib/stex/sty/mikoslides/mikoslides.ins b/macros/latex/contrib/stex/sty/mikoslides/mikoslides.ins deleted file mode 100644 index 75c1024cd3..0000000000 --- a/macros/latex/contrib/stex/sty/mikoslides/mikoslides.ins +++ /dev/null @@ -1,35 +0,0 @@ -%% -%% This file generates files required to use the mikoslides class. -%% At your command prompt write -%% -%% latex mikoslides.ins -%% -%% Copyright(c) 2007 Michael Kohlhase -%% The development version of this file can be found at -%% $HeadURL: https://svn.kwarc.info/repos/stex-content/sty/mikoslides/mikoslides.ins $ -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{mikoslides.sty}{\from{mikoslides.dtx}{package}}} -\generate{\file{mikoslides.cls}{\from{mikoslides.dtx}{cls}}} - -\Msg{*} -\Msg{* You probably need to move the file mikolides.cls and mikoslides.sty - into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} - -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/mikoslides/mikoslides.pdf b/macros/latex/contrib/stex/sty/mikoslides/mikoslides.pdf Binary files differdeleted file mode 100644 index 79660957ba..0000000000 --- a/macros/latex/contrib/stex/sty/mikoslides/mikoslides.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/mikoslides/shading-l2r.png b/macros/latex/contrib/stex/sty/mikoslides/shading-l2r.png Binary files differdeleted file mode 100644 index 2eabe7a8b1..0000000000 --- a/macros/latex/contrib/stex/sty/mikoslides/shading-l2r.png +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/modules/README b/macros/latex/contrib/stex/sty/modules/README deleted file mode 100644 index 1ca4729991..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/modules/modules.dtx b/macros/latex/contrib/stex/sty/modules/modules.dtx deleted file mode 100644 index e3f9787873..0000000000 --- a/macros/latex/contrib/stex/sty/modules/modules.dtx +++ /dev/null @@ -1,1674 +0,0 @@ -% \iffalse meta-comment -% An Infrastructure for Semantic Macros and Module Scoping -% Copyright (C) 2004-2013 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<package>\ProvidesPackage{modules}[2019/03/20 v1.4 Semantic Markup] -% -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} -\usepackage{stex-logo,modules} -\usepackage{url,array,float,textcomp} -\usepackage[show]{ed} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{listings} -\usepackage{amsfonts} -\usepackage{ctangit} -\usepackage{xspace} -\usepackage{hyperref} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\def\githubissue#1{\cite{sTeX:github:on}, \hyperlink{https://github.com/KWARC/sTeX/issues/#1}{issue #1}} -\begin{document} -\RecordChanges -\DocInput{modules.dtx} -\end{document} -%</driver> -% \fi -% -% \CheckSum{802} -% -% \changes{v0.9}{2005/06/14}{First Version with Documentation} -% \changes{v0.9a}{2005/07/01}{Completed Documentation} -% \changes{v0.9b}{2005/08/06}{Complete functionality and Updated Documentation} -% \changes{v0.9c}{2006/01/13}{more packaging} -% \changes{v0.9d}{2007/12/12}{fixing double loading of .tex and .sms} -% \changes{v0.9e}{2008/06/17}{fixing LaTeXML} -% \changes{v0.9f}{2008/06/17}{remove unused options uses and usesqualified} -% \changes{v0.9g}{2009/05/02}{adding resymdef functionality} -% \changes{v0.9g}{2009/08/12}{adding importOMDocmodule} -% \changes{v0.9h}{2010/01/19}{using {\texttt{\textbackslash mod@newcommand}} instead of -% {\texttt{\textbackslash providecommand}} for more intuitive inheritance.} -% \changes{v0.9h}{2010/03/05}{adding {\texttt{\textbackslash metalanguage}}} -% \changes{v1.0}{2010/06/18}{minor fixes} -% \changes{v1.1}{2010/12/30}{adding optional arguments to semantic macros for display -% variants. The resymdef functionality introduced in 0.9g is now deprecated. It was hardly -% used.} -% \changes{v1.1}{2012/06/25}{adding additional keys for the \texttt{\textbackslash symdef} -% macro and exporting them to OMDoc} -% \changes{v1.1}{2012/07/06}{exporting requiremodules to the \texttt{aux} file, so that -% they are preloaded (pre-required) so semantic macros in section titles can work.} -% \changes{v1.1}{2012/11/09}{Moving LaTeXML bindings into \texttt{modules.sty.ltxml} and -% disabling generation} -% \changes{v1.2}{2013/08/25}{No longer loading the aux file at the end of the document} -% \changes{v1.3}{2013/12/12}{adding MathHub support} -% \changes{v1.4}{2015/03/31}{Completely revamped importing modules this is much faster now, -% but can no longer do relative paths.} -% \changes{v1.4}{2015/04/02}{deprecated \texttt {\textbackslash sinput} and \texttt {\textbackslash sinputref}} -% \changes{v1.5}{2015/11/02}{Moved MH Versions to a separate \texttt{mathhub} package} -% \changes{v1.5}{2018/06/15}{``unidentified cd'' in termref is now an error.} -% -% \GetFileInfo{modules.sty} -% -% \MakeShortVerb{\|} -%\def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}\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}} -% \title{{\texttt{modules.sty}}: Semantic Macros and Module Scoping in {\stex}\thanks{Version {\fileversion} (last revised -% {\filedate})}} -% \author{Michael Kohlhase\\ -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}\and -% Deyan Ginev\\Authorea\and -% Rares Ambrus\\Jacobs University Bremen} -% \maketitle -% -% \begin{abstract} -% The |modules| package 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 {\TeX/\LaTeX} 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 dependency 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. -% \end{abstract} -% -% \newpage\setcounter{tocdepth}{2}\tableofcontents\newpage -% -% \section{Introduction}\label{sec:intro} -% -% Following general practice in the {\TeX/\LaTeX} community, we use the term ``semantic -% macro'' for a macro whose expansion stands for a mathematical object, and whose name -% (the command sequence) is inspired by the name of the mathematical object. This can -% range from simple definitions like |\def\Reals{\mathbb{R}}| for individual mathematical -% objects to more complex (functional) ones object constructors like -% |\def\SmoothFunctionsOn#1{\mathcal{C}^\infty(#1,#1)}|. Semantic macros are traditionally -% used to make {\TeX/\LaTeX} code more portable. However, the {\TeX/\LaTeX} scoping model -% (macro definitions are scoped either in the local group or until the rest of the -% document), does not mirror mathematical practice, where notations are scoped by -% mathematical environments like statements, theories, or such. For an in-depth discussion -% of semantic macros and scoping we refer the reader~\cite{Kohlhase:ulsmf08}. -% -% The |modules| package provides a {\LaTeX}-based markup infrastructure for defining -% module-scoped semantic macros and {\latexml} bindings~\cite{Miller:latexml:online} to -% create {\omdoc}~\cite{Kohlhase:OMDoc1.2} from {\stex} documents. In the {\stex} world -% semantic macros have a special status, since they allow the transformation of -% {\TeX/\LaTeX} formulae into a content-oriented markup format like -% {\openmath}~\cite{BusCapCar:2oms04} and (strict) content -% {\mathml}~\cite{CarlisleEd:MathML3}; see Figure~\ref{fig:omsemmac} for an example, where -% the semantic macros above have been defined by the |\symdef| macros (see -% Section~\ref{sec:symdef}) in the scope of a |\begin{module}[id=calculus]| (see -% Section~\ref{sec:modules}). -% -% \begin{exfig}\lstset{basicstyle=\scriptsize,aboveskip=-.5em,belowskip=-1.5em} -% \begin{tabular}{l|p{9.7cm}} -% \LaTeX & \verb|\SmoothFunctionsOn\Reals| \\\hline -% PDF/DVI & ${\mathcal{C}^\infty(\mathbb{R},\mathbb{R})}$\\\hline -% {\openmath} & \lstset{morekeywords={OMA,OMS}} -% \begin{lstlisting} -% <OMA> -% <OMS cd="calculus" name="SmoothFunctionsOn"/> -% <OMS cd="calculus" name="Reals"/> -% </OMA>\end{lstlisting}\\\hline -% {\mathml} & \lstset{morekeywords={apply,csymbol}} -% \begin{lstlisting} -% <apply> -% <csymbol cd="calculus">SmoothFunctionsOn</csymbol> -% <csymbol cd="calculus">Reals</csymbol> -% </apply>\end{lstlisting}\\ -% \end{tabular} -% \caption{{\openmath} and {\mathml} generated from Semantic Macros}\label{fig:omsemmac} -% \end{exfig} -% -% \section{The User Interface} -% -% The main contributions of the |modules| package are the |module| environment, which -% allows for lexical scoping of semantic macros with inheritance and the |\symdef| macro -% for declaration of semantic macros that underly the |module| scoping. -% -% \subsection{Package Options}\label{sec:options} -% -% The |modules| package takes six options: If we set -% \DescribeMacro{showmods}|showmods|\ednote{This mechanism does not work yet, since we -% cannot disable it when importing modules and that leads to unwanted boxes. What we need -% to do instead is to tweak the sms utility to use an internal version that never shows -% anything during sms reading.}, then the views (see Section~\ref{sec:user:views}) are -% shown. If we set the \DescribeMacro{qualifiedimports}|qualifiedimports| option, then -% qualified imports are enabled. Qualified imports give more flexibility in module -% inheritance, but consume more internal memory. As qualified imports are not fully -% implemented at the moment, they are turned off by default see -% Limitation~\ref{sec:limitations:qualified-imports}. The option -% \DescribeMacro{noauxreq}|noauxreq| prohibits the registration of |\@requiremodules| -% commands in the |aux| file. They are necessary for preloading the module signatures so -% that entries in the table of contents can have semantic macros; but as they sometimes -% cause trouble the option allows to turn off preloading. -% -% If the \DescribeMacro{showmeta}|showmeta| optin is set, then the metadata keys are shown -% (see~\cite{Kohlhase:metakeys:ctan} for details and customization options). -% -% The \texttt{mh} option enables MathHub support; see~\cite{Kohlhase:mss:ctan}. -% -% Finally, if the \DescribeMacro{trwarn}|trwrn| is given, then the |modules| package only -% gives warnings instead of hard errors when term references are unknown. -% -% \subsection{Semantic Macros}\label{sec:symdef} -% -% The \DescribeMacro{\symdef} is the main constructor for semantic macros in {\sTeX}. A -% call to the |\symdef| macro has the general form -% \begin{quote} -% |\symdef[|\meta{keys}|]{|\meta{cseq}|}[|\meta{args}|]{|\meta{definiens}|}| -% \end{quote} -% where {\meta{cseq}} is a control sequence (the name of the semantic macro) {\meta{args}} -% is a number between 0 and 9 for the number of arguments {\meta{definiens}} is the token -% sequence used in macro expansion for {\meta{cseq}}. Finally {\meta{keys}} is a keyword -% list that further specifies the semantic status of the defined macro. -% -% The two semantic macros in Figure~\ref{fig:omsemmac} would have been declared by -% invocations of the |\symdef| macro of the form: -% \begin{verbatim} -% \symdef{Reals}{\mathbb{R}} -% \symdef{SmoothFunctionsOn}[1]{\mathcal{C}^\infty(#1,#1)} -% \end{verbatim} -% -% Note that both semantic macros correspond to {\openmath} or {\mathml} ``symbols'', -% i.e. named representations of mathematical concepts (the real numbers and the -% constructor for the space of smooth functions over a set); we call these names the -% \textbf{symbol name} of a semantic macro. Normally, the symbol name of a semantic macro -% declared by a |\symdef| directive is just \meta{cseq}. The key-value pair -% \DescribeMacro{name}|name=|\meta{symname} can be used to override this behavior and -% specify a differing name. There are two main use cases for this. -% -% The first one is shown in Example~\ref{fig:symvariant}, where we define semantic macros -% for the ``exclusive or'' operator. Note that we define two semantic macros: |\xorOp| and -% |\xor| for the applied form and the operator. As both relate to the same mathematical -% concept, their symbol names should be the same, so we specify |name=xor| on the -% definition of |\xorOp|. -% -% A key \DescribeMacro{local}|local| can be added to {\meta{keys}} to specify that the -% symbol is local to the module and is invisible outside. Note that even though |\symdef| -% has no advantage over |\def| for defining local semantic macros, it is still considered -% good style to use |\symdef| and |\abbrdef|, if only to make switching between local and -% exported semantic macros easier. -% -% Finally, the key \DescribeMacro{primary}|primary| (no value) can be given for primary -% symbols. -% -% \DescribeMacro{\abbrdef}The |\abbrdef| macro is a variant of |\symdef| that is only -% different in semantics, not in presentation. An abbreviative macro is like a semantic -% macro, and underlies the same scoping and inheritance rules, but it is just an -% abbreviation that is meant to be expanded, it does not stand for an atomic mathematical -% object. -% -% We will use a simple module for natural number arithmetics as a running example. It -% defines exponentiation and summation as new concepts while drawing on the basic -% operations like $+$ and $-$ from {\LaTeX}. In our example, we will define a semantic -% macro for summation |\Sumfromto|, which will allow us to express an expression like -% $\sum{i=1}^nx^i$ as |\Sumfromto{i}1n{2i-1}| (see Example~\ref{fig:semmodule} for an -% example). In this example we have also made use of a local semantic symbol for $n$, -% which is treated as an arbitrary (but fixed) symbol. -% -%\begin{exfig} -% \begin{verbatim} -% \begin{module}[id=arith] -% \symdef{Sumfromto}[4]{\sum_{#1=#2}^{#3}{#4}} -% \symdef[local]{arbitraryn}{n} -% What is the sum of the first $\arbitraryn$ odd numbers, i.e. -% $\Sumfromto{i}1\arbitraryn{2i-1}?$ -% \end{module} -% \end{verbatim} -% \vspace*{-3.5ex}\hrule\vspace*{1ex} -% \begin{module}[id=arith] -% \symdef{Sumfromto}[4]{\sum_{#1=#2}^{#3}{#4}} -% \symdef[local]{arbitraryn}{n} -% What is the sum of the first $\arbitraryn$ odd numbers, i.e. -% $\Sumfromto{i}1\arbitraryn{2i-1}?$ -% \end{module} -% \caption{Semantic Markup in a {\texttt{module}} Context}\label{fig:semmodule} -% \end{exfig} -% -% The \DescribeMacro{\symvariant}|\symvariant| macro can be used to define presentation -% variants for semantic macros previously defined via the |\symdef| directive. In an -% invocation -% \begin{quote} -% |\symdef[|\meta{keys}|]{|\meta{cseq}|}[|\meta{args}|]{|\meta{pres}|}|\\ -% |\symvariant{|\meta{cseq}|}[|\meta{args}|]{|\meta{var}|}{|\meta{varpres}|}| -% \end{quote} -% the first line defines the semantic macro |\|\meta{cseq} that when applied to -% \meta{args} arguments is presented as \meta{pres}. The second line allows the semantic -% macro to be called with an optional argument \meta{var}: |\|\meta{cseq}|[var]| (applied -% to \meta{args} arguments) is then presented as \meta{varpres}. We can define a variant -% presentation for |\xor|; see Figure~\ref{fig:symvariant} for an example. -% -%\begin{exfig} -% \begin{verbatim} -% \begin{module}[id=xbool] -% \symdef[name=xor]{xorOp}{\oplus} -% \symvariant{xorOp}{uvee}{\underline{\vee}} -% \symdef{xor}[2]{#1\xorOp #2} -% \symvariant{xor}[2]{uvee}{#1\xorOp[uvee] #2} -% Exclusive disjunction is commutative: $\xor{p}q=\xor{q}p$\\ -% Some authors also write exclusive or with the $\xorOp[uvee]$ operator, -% then the formula above is $\xor[uvee]{p}q=\xor[uvee]{q}p$ -% \end{module} -% \end{verbatim} -% \vspace*{-3.5ex}\hrule\vspace*{1ex} -% \begin{module}[id=xbool] -% \symdef[name=xor]{xorOp}{\oplus} -% \symvariant{xorOp}{uvee}{\underline{\vee}} -% \symdef{xor}[2]{#1\xorOp #2} -% \symvariant{xor}[2]{uvee}{#1\xorOp[uvee] #2} -% Exclusive disjunction is commutative: $\xor{p}q=\xor{q}p$\\ -% Some authors also write exclusive or with the $\xorOp[uvee]$ operator, -% then the formula above is $\xor[uvee]{p}q=\xor[uvee]{q}p$ -% \end{module} -% \caption{Presentation Variants of a Semantic Macro}\label{fig:symvariant} -% \end{exfig} -% -% Version 1.0 of the |modules| package had the \DescribeMacro{\resymdef}|\resymdef| macro -% that allowed to locally redefine the presentation of a macro. But this did not interact -% well with the |beamer| package and was less useful than the |\symvariant| -% functionality. Therefore it is deprecated now and leads to an according error message. -% \subsection{Testing Semantic Macros}\label{sec:user:testing} -% -% One of the problems in managing large module graphs with many semantic macros, so the -% |module| package gives an infrastructure for unit testing. The first macro is -% \DescribeMacro{\symtest}|\symtest|, which allows the author of a semantic macro to -% generate test output (if the |symtest| option is set) see figure~\ref{fig:symtest} for a -% ``tested semantic macro definition''. -% \begin{exfig} -% \begin{verbatim} -% \symdef[name=setst]{SetSt}[2]{\{#1\,\vert\,#2\}} -% \symtest[name=setst]{SetSt}{\SetSt{a}{a>0}} -% \end{verbatim} -% \vspace*{-2em} generates the output -% \begin{module}[id=foo] -% \symdef[name=setst]{SetSt}[2]{\{#1\,\vert\,#2\}} -% \symtest[name=setst]{SetSt}{\SetSt{a}{a>0}} -% \end{module} -% \caption{A Semantic Macro Definition with Test}\label{fig:symtest} -% \end{exfig} -% Note that the language in this purely generated, so that it can be adapted (tbd). -% -% The \DescribeMacro{\abbrtest}|\abbrtest| macro gives the analogous functionality for -% |\abbrdef|. -% -% \subsection{Axiomatic Assumptions}\label{sec:user:assumptions} -% -% In many ways, axioms and assumptions in definitions behave a lot like symbols -% (see~\cite{RabKoh:WSMSML13} for discussion). Therefore we provide the macro -% \DescribeMacro{\assdef}|\assdef| that can be used to mark up assumptions. Given a phrase -% \meta{phrase} in a definition\ednote{only definitions?}, we can use -% |\assdef{|\meta{name}|}{|\meta{phrase}|}| to give this the symbol name -% \meta{name}.\ednote{continue} -% -% \subsection{Semantic Macros for Variables}\label{sec:user:semvars} -% -% Up to now, the semantic macros generated \openmath and \mathml markup where the heads of -% the semantic macros become constants (the |OMS| and |csymbol| elements in -% Figure~\ref{fig:omsemmac}). But sometimes we want to have semantic macros for variables, -% e.g. to associate special notation conventions. For instance, if we want to define -% mathematical structures from components as in Figure~\ref{fig:monoid}, where the -% semigroup operation $\circ$ is a variable epistemologically, but is a $n$-ary -% associative operator -- we are in a semigroup after all. Let us call such variables -% \textbf{semantic variables} to contrast them from \textbf{semantic constants} generated -% by |\symdef| and |\symvariant|. -% -%\begin{exfig} -% \textbf{Definition 3.17} Let $\langle G,\circ\rangle$ be a semigroup, then we call -% $e\in G$ a \textbf{unit}, iff $e\circ x=x\circ e=x$. A semigroup with unit $\langle -% G,\circ,e\rangle$ is called a \textbf{monoid}. -% \caption{A Definition of a Structure with ``semantic -% variables''.}\label{fig:monoid} -% \end{exfig} -% -% Semantic variables differ from semantic constants in two ways: -% \begin{enumerate} -% \item they do not participate -% in the imports mechanism and -% \item they generate markup with variables. -% \end{enumerate} -% In the case of -% Figure~\ref{fig:monoid} we (want to) have the \xml markup in Figure~\ref{fig:omsemvar}. -% To associate the notation to the variables, we define semantic macros for them, here the -% macro |\op| for the (semigroup) operation via the \DescribeMacro{\vardef}|\vardef| -% macro. |\vardef| works exactly like, except -% \begin{enumerate} -% \item semantic variables are local to the current {\TeX} group and -% \item they generate variable markup in the \xml -% \end{enumerate} -% -% \begin{exfig}\lstset{basicstyle=\scriptsize,aboveskip=-.5em,belowskip=-1.5em} -% \begin{tabular}{l|p{9.7cm}} -% \sTeX & \verb|\vardef{op}[1]{\assoc\circ{#1}}|\\\hline -% \omdoc & -% \begin{lstlisting} -% <notation> -% <prototype> -% <OMA> -% <OMV name="op"/> -% <expr name="a1"/> -% <expr name="a2"/> -% </OMA> -% </prototype> -% <rendering> -% <mrow> -% <render name="a1"/> -% <mo>⎄</mo> -% <render name="a2"/> -% </mrow> -% </rendering> -% </notation>\end{lstlisting}\\\hline -% \LaTeX & \verb|\op{x,e}| \\\hline -% PDF/DVI & $x\circ e$\\\hline -% {\openmath} & \lstset{morekeywords={OMA,OMV}} -% \begin{lstlisting} -% <OMA><OMV name="op"/><OMV name="x"/><OMV name="e"/></OMA>\end{lstlisting}\\\hline -% {\mathml} & \lstset{morekeywords={apply,ci}} -% \begin{lstlisting} -% <apply><ci>op</ci><ci>x</ci><ci>e</ci></apply>\end{lstlisting}\\ -% \end{tabular} -% \caption{Semantic Variables in {\openmath} and {\mathml}}\label{fig:omsemvar} -% \end{exfig} -% -% \subsection{Symbol and Concept Names}\label{sec:user:termdef} -% -% Just as the |\symdef| declarations define semantic macros for mathematical symbols, the -% |modules| package provides an infrastructure for {\emph{mathematical concepts}} that are -% expressed in mathematical vernacular. The key observation here is that concept names -% like ``finite symplectic group'' follow the same scoping rules as mathematical symbols, -% i.e. they are module-scoped. The \DescribeMacro{\termdef}|\termdef| macro is an analogue -% to |\symdef| that supports this: use -% |\termdef[|\meta{keys}|]{|\meta{cseq}|}{|\meta{concept}|}| to declare the macro -% |\|\meta{cseq} that expands to \meta{concept}. See Figure~\ref{fig:termref} for an -% example, where we use the \DescribeMacro{\capitalize}|\capitalize| macro to adapt -% \meta{concept} to the sentence beginning.\ednote{continue, describe \meta{keys}, they -% will have to to with plurals,\ldots once implemented}. The main use of the -% |\termdef|-defined concepts lies in automatic cross-referencing facilities via the -% \DescribeMacro{\termref}|\termref| and \DescribeMacro{\symref}|\symref| macros provided -% by the |statements| package~\ctancite{Kohlhase:smms}. Together with the |hyperref| -% package~\cite{RahObe:hmlmh10}, this provide cross-referencing to the definitions of the -% symbols and concepts. As discussed in section~\ref{sec:limitations:crossref}, the -% |\symdef| and |\termdef| declarations must be on top-level in a module, so the -% infrastructure provided in the |modules| package alone cannot be used to locate the -% definitions, so we use the infrastructure for mathematical statements for that. -% -%\begin{exfig} -% \begin{verbatim} -% \termdef[name=xor]{xdisjunction}{exclusive disjunction} -% \capitalize\xdisjunction is commutative: $\xor{p}q=\xor{q}p$ -% \end{verbatim} -% \vspace*{-3.5ex} -% \caption{Extending Example~\ref{fig:symvariant} with Term References}\label{fig:termref} -% \end{exfig} -% -% \subsection{Modules and Inheritance}\label{sec:modules} -% -% The\DescribeEnv{module}|module| environment takes an optional |KeyVal| -% argument. Currently, only the |id| key is supported for specifying the identifier of a -% module (also called the {\twintoo{module}{name}}). A module introduced by -% |\begin{module}[id=foo]| restricts the scope the semantic macros defined by the -% |\symdef| form to the end of this module given by the corresponding |\end{module}|, -% and to any other |module| environments that import them by a |\importmodule{foo}| -% directive. If the module |foo| contains |\importmodule| directives of its own, these are -% also exported to the importing module. -% -% Thus the \DescribeMacro{\importmodule}|\importmodule| declarations induce the -% {\atwintoo{semantic}{inheritance}{relation}}. Figure~\ref{exf:importmodule} shows a -% module that imports the semantic macros from three others. In the simplest form, -% |\importmodule{|\meta{mod}|}| will activate the semantic macros and concepts declared by -% |\symdef| and |\termdef| in module \meta{mod} in the current module\footnote{Actually, -% in the current {\TeX} group, therefore \texttt{\textbackslash importmodule} should be -% placed directly after the \texttt{\textbackslash begin\{module\}}.}. To understand the -% mechanics of this, we need to understand a bit of the internals. The |module| -% environment sets up an internal macro pool, to which all the macros defined by the -% |\symdef| and |\termdef| declarations are added; |\importmodule| only activates this -% macro pool. Therefore |\importmodule{|\meta{mod}|}| can only work, if the {\TeX} parser -% --- which linearly goes through the {\sTeX} sources --- already came across the module -% \meta{mod}. In many situations, this is not obtainable; e.g. for ``semantic forward -% references'', where symbols or concepts are previewed or motivated to knowledgeable -% readers before they are formally introduced or for modularizations of documents into -% multiple files. To enable situations like these, the |module| package uses auxiliary -% files called {\textbf{\sTeX module signatures}}. For any file, \meta{file}|.tex|, we -% generate a corresponding \sTeX module signature \meta{file}|.sms| with the |sms| utility -% (see also Limitation~\ref{sec:limitations:sms}), which contains (copies of) all -% |\begin|/|\end{module}|, |\importmodule|, |\symdef|, and |\termdef| invocations in -% \meta{file}|.tex|. The value of an \sTeX module signature is that it can be loaded -% instead its corresponding \sTeX document, if we are only interested in the semantic -% macros. So |\importmodule[|load=\meta{filepath}|]{|\meta{mod}|}| will load the \sTeX -% module signature \meta{filepath}|.sms| (if it exists and has not been loaded before) and -% activate the semantic macros from module \meta{mod} (which was supposedly defined in -% \meta{filepath}|.tex|). Note that since \meta{filepath}|.sms| contains all -% |\importmodule| statements that \meta{filepath}|.tex| does, an |\importmodule| -% recursively loads all necessary files to supply the semantic macros inherited by the -% current module.\ednote{MK: document the other keys of |module|} -% -% The \DescribeMacro{\metalanguage}|\metalanguage| macro is a variant of -% \lstinline|importmodule| that imports the meta language, i.e. the language in which the -% meaning of the new symbols is expressed. For mathematics this is often first-order logic -% with some set theory; see~\cite{RabKoh:WSMSML13} for discussion. -% -% \subsection{Dealing with multiple Files}\label{sec:user:multiple} -% -% The infrastructure presented above works well if we are dealing with small files or -% small collections of modules. In reality, collections of modules tend to grow, get -% re-used, etc, making it much more difficult to keep everything in one file. This general -% trend towards increasing entropy is aggravated by the fact that modules are very -% self-contained objects that are ideal for re-used. Therefore in the absence of a -% content management system for {\LaTeX} document (fragments), module collections tend to -% develop towards the ``one module one file'' rule, which leads to situations with lots -% and lots of little files. -% -% Moreover, most mathematical documents are not self-contained, i.e. they do not build up -% the theory from scratch, but pre-suppose the knowledge (and notation) from other -% documents. In this case we want to make use of the semantic macros from these -% prerequisite documents without including their text into the current document. One way -% to do this would be to have {\LaTeX} read the prerequisite documents without producing -% output. For efficiency reasons, {\stex} chooses a different route. It comes with a -% utility |sms| (see Section~\ref{sec:limitations:sms}) that exports the modules and macros -% defined inside them from a particular document and stores them inside |.sms| files. This -% way we can avoid overloading LaTeX with useless information, while retaining the -% important information which can then be imported in a more efficient way. -% -% \DescribeMacro{\importmodule} For such situations, the |\importmodule| macro can be -% given an optional first argument that is a path to a file that contains a path to the -% module file, whose module definition (the |.sms| file) is read. Note that the -% |\importmodule| macro can be used to make module files truly self-contained. To arrive -% at a file-based content management system, it is good practice to reuse the module -% identifiers as module names and to prefix module files with corresponding -% |\importmodule| statements that pre-load the corresponding module files. -% -%\begin{exfig} -% \begin{verbatim} -% \begin{module}[id=foo] -% \importmodule[load=../other/bar]{bar} -% \importmodule[load=../mycolleaguesmodules]{baz} -% \importmodule[load=../other/bar]{foobar} -% ... -% \end{module} -% \end{verbatim} -% \vspace{-1.7em} -% \caption{Self-contained Modules via {\texttt{importmodule}}}\label{exf:importmodule} -% \end{exfig} -% -% In Example~\ref{exf:importmodule}, we have shown the typical setup of a module -% file. The |\importmodule| macro takes great care that files are only read once, as -% {\sTeX} allows multiple inheritance and this setup would lead to an exponential (in the -% module inheritance depth) number of file loads. -% -% Sometimes we want to import an existing {\omdoc} theory\footnote{{\omdoc} theories are -% the counterpart of {\stex} modules.} $\widehat\cT$ into (the {\omdoc} document -% $\widehat\cD$ generated from) a {\stex} document $\cD$. Naturally, we have to provide an -% {\stex} stub module $\cT$ that provides |\symdef| declarations for all symbols we use in -% $\cD$. In this situation, we use\DescribeMacro{\importOMDocmodule} -% |\importOMDocmodule[|\meta{spath}|]{|\meta{OURI}|}{|\meta{name}|}|, where \meta{spath} -% is the file system path to $\cT$ (as in |\importmodule|, this argument must not contain -% the file extension), \meta{OURI} is the URI to the {\omdoc} module (this time with -% extension), and \meta{name} is the name of the theory $\widehat\cT$ and the module in -% $\cT$ (they have to be identical for this to work). Note that since the \meta{spath} -% argument is optional, we can make ``local imports'', where the stub $\cT$ is in $\cD$ -% and only contains the |\symdef|s needed there. -% -% Note that the recursive (depth-first) nature of the file loads induced by this setup is -% very natural, but can lead to problems with the depth of the file stack in the {\TeX} -% formatter (it is usually set to something like 15\footnote{If you have sufficient rights -% to change your {\TeX} installation, you can also increase the variable -% {\texttt{max\_in\_open}} in the relevant {\texttt{texmf.cnf}} file. Setting it to 50 -% usually suffices}). Therefore, it may be necessary to circumvent the recursive load -% pattern providing (logically spurious) |\importmodule| commands. Consider for instance -% module |bar| in Example~\ref{exf:importmodule}, say that |bar| already has load depth -% 15, then we cannot naively import it in this way. If module |bar| depended say on a -% module |base| on the critical load path, then we could add a statement -% \DescribeMacro{\requiremodules} |\requiremodules{../base}| in the second line. This -% would load the modules from |../base.sms| in advance (uncritical, since it has load -% depth 10) without activating them, so that it would not have to be re-loaded in the -% critical path of the module |foo|. Solving the load depth problem. -% -% The \DescribeMacro{\inputref}|\inputref| macro behaves just like |\input| in the -% {\LaTeX} workflow, but in the {\latexml} conversion process creates a reference to the -% transformed version of the input file instead. -% -% \subsection{Using Semantic Macros in Narrative Structures}\label{sec:user:using} -% -% The |\importmodule| macro establishes the inheritance relation, a transitive relation -% among modules that governs visibility of semantic macros. In particular, it can only be -% used in modules (and has to be used at the top-level, otherwise it is hindered by -% {\LaTeX} groups). In many cases, we only want to \emph{use} the semantic macros in an -% environment (and not re-export them). Indeed, this is the normal situation for most -% parts of mathematical documents. For that \sTeX provides the -% \DescribeMacro{\usemodule}|\usemodule| macro, which takes the same arguments as -% |\importmodule|, but is treated differently in the \sTeX module signatures. A typical -% situation is shown in Figure~\ref{fig:use-ring}, where we open the module |ring| (see -% Figure~\ref{fig:ring}) and use its semantic macros (in the |omtext| environment). In -% earlier versions of \sTeX, we would have to wrap the |omtext| environment in an -% anonymous |module| environment to prevent re-export. -% -%\begin{exfig} -% \begin{verbatim} -% \begin{omtext} -% \usemodule[load=../algebra/rings.tex]{ring} -% We $R$ be a ring $(\rbase,\rplus,\rzero,\rminusOp,\rtimes,\rone)$, ... -% \end{omtext} -% \end{verbatim} -% \caption{Using Semantic Macros in Narrative Structures}\label{fig:use-ring} -% \end{exfig} -% -% \subsection{Including Externally Defined Semantic Macros } -% -% In some cases, we use an existing {\LaTeX} macro package for typesetting objects that -% have a conventionalized mathematical meaning. In this case, the macros are ``semantic'' -% even though they have not been defined by a |\symdef|. This is no problem, if we are -% only interested in the {\LaTeX} workflow. But if we want to e.g. transform them to -% {\omdoc} via {\latexml}, the {\latexml} bindings will need to contain references to an -% {\omdoc} theory that semantically corresponds to the {\LaTeX} package. In particular, -% this theory will have to be imported in the generated {\omdoc} file to make it -% {\omdoc}-valid. -% -% \DescribeMacro{\requirepackage} To deal with this situation, the |modules| package -% provides the |\requirepackage| macro. It takes two arguments: a package name, and a URI -% of the corresponding {\omdoc} theory. In the {\LaTeX} workflow this macro behaves like a -% |\usepackage| on the first argument, except that it can --- and should --- be used -% outside the {\LaTeX} preamble. In the {\latexml} workflow, this loads the {\latexml} -% bindings of the package specified in the first argument and generates an appropriate -% |imports| element using the URI in the second argument. -% -% \section{Limitations \& Extensions}\label{sec:limitations} -% -% In this section we will discuss limitations and possible extensions of the |modules| -% package. Any contributions and extension ideas are welcome; please discuss ideas, -% requests, fixes, etc on the {\sTeX} TRAC~\cite{sTeX:github:on}. -% -% \subsection{Perl Utility \texttt{sms}}\label{sec:limitations:sms} -% -% Currently we have to use an external perl utility |sms| to extract \sTeX module -% signatures from \sTeX files. This considerably adds to the complexity of the \sTeX -% installation and workflow. If we can solve security setting problems that allows us to -% write to \sTeX module signatures outside the current directory, writing them from \sTeX -% may be an avenue of future development see~\cite[issue \#1522]{sTeX:github:on} for a -% discussion. -% -% \subsection{Qualified Imports}\label{sec:limitations:qualified-imports} -% -% In an earlier version of the \texttt{modules} package we used the \texttt{usesqualified} -% for importing macros with a disambiguating prefix (this is used whenever we have -% conflicting names for macros inherited from different modules). This is not accessible -% from the current interface. We need something like a |\importqualified| macro for this; -% see~\cite[issue \#1505]{sTeX:github:on}. Until this is implemented the infrastructure is -% turned off by default, but we have already introduced the -% \DescribeMacro{qualifiedimports}|qualifiedimports| option for the future. -% -% \subsection{Error Messages}\label{sec:limitations:errormsg} -% -% The error messages generated by the |modules| package are still quite bad. For instance -% if |thyA| does note exists we get the cryptic error message -% \begin{verbatim} -% ! Undefined control sequence. -% \module@defs@thyA ...hy -% \expandafter \mod@newcomma... -% l.490 ...ortmodule{thyA} -% \end{verbatim} -% This should definitely be improved. -% -% \subsection{Crossreferencing}\label{sec:limitations:crossref} -% -% Note that the macros defined by |\symdef| are still subject to the normal {\TeX} scoping -% rules. Thus they have to be at the top level of a module to be visible throughout the -% module as intended. As a consequence, the location of the |\symdef| elements cannot be -% used as targets for crossreferencing, which is currently supplied by the |statement| -% package~\ctancite{Kohlhase:smms}. A way around this limitation would be to import -% the current module from the \sTeX module signature (see Section~\ref{sec:modules}) via -% the |\importmodule| declaration. -% -% \subsection{No Forward Imports}\label{sec:limitations:forward-imports} -% -% {\sTeX} allows imports in the same file via |\importmodule{|\meta{mod}|}|, but due to -% the single-pass linear processing model of {\TeX}, \meta{mod} must be the name of a -% module declared {\emph{before}} the current point. So we cannot have forward imports as -% in \ednote{usemodule should work here; revise} -% \begin{verbatim} -% \begin{module}[id=foo] -% \importmodule{mod} -% ... -% \end{module} -% ... -% \begin{module}[id=mod] -% ... -% \end{module} -% \end{verbatim} -% a workaround, we can extract the module \meta{mod} into a file {{{mod.tex}}} and replace -% it with |\sinput{mod}|, as in -% \begin{verbatim} -% \begin{module}[id=foo] -% \importmodule[load=mod]{mod} -% ... -% \end{module} -% ... -% \sinput{mod} -% \end{verbatim} -% then the |\importmodule| command can read |mod.sms| (created via the |sms| utility) -% without having to wait for the module \meta{mod} to be defined. -% -% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\newpage\printbibliography}\newpage -% -% \section{The Implementation} -% -% The |modules| package generates two files: the {\LaTeX} package (all the code between -% {\textlangle\textsf{*package}\textrangle} and {\textsf{\textlangle/package\textrangle}}) -% and the {\latexml} bindings (between {\textsf{\textlangle*ltxml\textrangle}} and -% {\textsf{\textlangle/ltxml\textrangle}}). We keep the corresponding code fragments -% together, since the documentation applies to both of them and to prevent them from -% getting out of sync. -% -% \subsection{Package Options}\label{sec:impl:options} -% -% We declare some switches which will modify the behavior according to the package -% options. Generally, an option |xxx| will just set the appropriate switches to true -% (otherwise they stay false). The options we are not using, we pass on to the |sref| -% package we require next. -% \begin{macrocode} -%<*package> -\newif\if@modules@mh@\@modules@mh@false -\DeclareOption{mh}{\@modules@mh@true} -\newif\ifmod@show\mod@showfalse -\DeclareOption{showmods}{\mod@showtrue} -\newif\ifaux@req\aux@reqtrue -\DeclareOption{noauxreq}{\aux@reqfalse} -\newif\ifmod@qualified\mod@qualifiedfalse -\DeclareOption{qualifiedimports}{\mod@qualifiedtrue} -\newif\if@trwarn\@trwarnfalse -\DeclareOption{trwarn}{\@trwarntrue} -\newif\if@mmt\@mmtfalse -\DeclareOption{mmt}{\@mmttrue} -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{sref}} -\ProcessOptions -% \end{macrocode} -% -% {\latexml} does not support module options yet, so we do not have to do anything here -% for the {\latexml} bindings. We only set up the {\perl} packages (and tell {\texttt{emacs}} -% about the appropriate mode for convenience -% -% The next measure is to ensure that the |sref| and |xcomment| packages are loaded (in the -% right version). For {\latexml}, we also initialize the package inclusions. -% \begin{macrocode} -\RequirePackage{sref} -\if@modules@mh@\RequirePackage{modules-mh}\fi -\if@mmt\RequirePackage{mmt}\fi -\RequirePackage{xspace} -\RequirePackage{mdframed} -\RequirePackage{pathsuris} -% \end{macrocode} -% -% \subsection{Modules and Inheritance}\label{sec:impl:modules} -% -% We define the keys for the |module| environment and the actions that are undertaken, -% when the keys are encountered. -% -% \begin{macro}{module:cd} -% This |KeyVal| key is only needed for {\latexml} at the moment; use this to specify a -% content dictionary name that is different from the module name. -% \begin{macrocode} -\addmetakey{module}{cd}% no longer used -\addmetakey{module}{load}% ignored -\addmetakey*{module}{title} -\addmetakey*{module}{creators} -\addmetakey*{module}{contributors} -\addmetakey*{module}{srccite} -\addmetakey*{module}{align}[WithTheModuleOfTheSameName] -\addmetakey*{module}{noalign}[true] -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{module:id} -% For a module with |[id=|\meta{name}|]|, we have a macro |\module@defs@|\meta{name} -% that acts as a repository for semantic macros of the current module. I will be called -% by |\importmodule| to activate them. We will add the internal forms of the semantic -% macros whenever |\symdef| is invoked. To do this, we will need an unexpended form -% |\this@module| that expands to |\module@defs@|\meta{name}; we define it first and then -% initialize |\module@defs@|\meta{name} as empty. Then we do the same for qualified -% imports as well (if the |qualifiedimports| option was specified). Furthermore, we save -% the module name in the token register |\mod@id|. -% \begin{macrocode} -\define@key{module}{id}{% - \edef\this@module{% - \expandafter\noexpand\csname module@defs@#1\endcsname% - }% - \csgdef{module@defs@#1}{}% - \ifmod@qualified% - \edef\this@qualified@module{% - \expandafter\noexpand\csname module@defs@#1\endcsname% - }% - \csgdef{module@defs@qualified@#1}{}% - \fi% - \def\mod@id{#1}% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{module@heading} -% Then we make a convenience macro for the module heading. This can be customized. -% \begin{macrocode} -\ifdef{\thesection}{\newcounter{module}[section]}{\newcounter{module}}% -\newrobustcmd\module@heading{% - \stepcounter{module}% - \ifmod@show% - \noindent{\textbf{Module} \thesection.\themodule [\mod@id]}% - \sref@label@id{Module \thesection.\themodule [\mod@id]}% - \ifx\module@title\@empty :\quad\else\quad(\module@title)\hfill\\\fi% - \fi% -}% mod@show -% \end{macrocode} -% \end{macro} -% -% \begin{environment}{module} -% Finally, we define the begin module command for the module environment. Much of the -% work has already been done in the keyval bindings, so this is quite simple. We store -% the file name (without extension) and extension of the module file in the global -% macros |\module@|\meta{name}|@path| and |\module@|\meta{name}|@ext|, so that we can -% use them later. The source of these two macros, |\mod@path| and |\mod@ext|, are -% defined in |\requiremodules|. -% \begin{macrocode} -\newenvironment{module}[1][]{% - \begin{@module}[#1]% - \ifcsundef{mod@id}{}{% only define if components are! - \ifcsundef{mod@path}{}{\csxdef{module@\mod@id @path}{\mod@path}}% - \ifcsundef{mod@ext}{}{\csxdef{module@\mod@id @ext}{\mod@ext}}% - }% - \if@mmt\if@importing\else\mmtheory{\mod@id}{????}\fi\fi% - \module@heading% make the headings - \ignorespaces}{% - \if@mmt\if@importing\else\mmtheoryend\fi\fi% - \end{@module}% - \ignorespacesafterend% -}% -\ifmod@show\surroundwithmdframed{module}\fi% -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{@module} -% A variant of the |module| environment that does not create printed representations (in -% particular no frames) -% \begin{macrocode} -\newenvironment{@module}[1][]{\metasetkeys{module}{#1}}{}% -% \end{macrocode} -% \end{environment} -% -% \begin{macro}{\activate@defs} -% To activate the |\symdef|s from a given module \meta{mod}, we call the macro -% |\module@defs@|\meta{mod}. But to make sure that every module is activated only once, -% we only activate if the macro |\module@defs@|\meta{mod} is undefined, and define it -% directly afterwards to prohibit further activations. -% \begin{macrocode} -\def\activate@defs#1{% - \ifcsundef{module@#1@activated}{\csname module@defs@#1\endcsname}{}% - \@namedef{module@#1@activated}{true}% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\export@defs} -% |\export@defs{|\meta{mod}|}| exports all the |\symdef|s from module \meta{mod} to the -% current module (if it has the name \meta{currmod}), by adding a call to -% |\module@defs@|\meta{mod} to the registry |\module@defs@|\meta{currmod}.\ednote{MK: I -% have the feeling that we may be exporting modules multiple times here, is that a -% problem?}\ednote{Jinbo: This part of code is extremely easy to generate bugs, cautiously edit this part of code.}\newline -% Naive understanding of this code: |#1| be will be expanded first, then |\this@module|, then |\active@defs|, then |\g@addto@macro|. -% \begin{macrocode} -\def\export@defs#1{\@ifundefined{mod@id}{}{% -\expandafter\expandafter\expandafter\g@addto@macro% -\expandafter\this@module\expandafter{\activate@defs{#1}}}}% -% \end{macrocode} -% \end{macro} -% -% Now we come to the implementation of |\importmodule|, but before we do, we define -% conditional and an auxiliary macro: -% \begin{macro}{\if@importing} -% |\if@importing| can be used to shut up macros in an import situation. -% \begin{macrocode} -\newif\if@importing\@importingfalse -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\update@used@modules} -% This updates the register |\used@modules| -% \begin{macrocode} -\newcommand\update@used@modules[1]{% - \ifx\used@modules\@empty% - \edef\used@modules{#1}% - \else% - \edef\used@modules{\used@modules,#1}% - \fi} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\importmodule} -% The |\importmodule[|\meta{file}|]{|\meta{mod}|}| macro is an interface macro that -% loads \meta{file} and activates and re-exports the |\symdef|s from module -% \meta{mod}. As we will (probably) need to keep a record of the currently imported modules -% (top-level only), we divide the functionality into a user-visible macro that records -% modules in the |\used@modules| register and an internal one (|\@importmodule|) -% that does the actual work. -% \begin{macrocode} -\gdef\used@modules{} -\srefaddidkey{importmodule} -\addmetakey{importmodule}{load} -\addmetakey[sms]{importmodule}{ext} -\addmetakey[false]{importmodule}{conservative}[true] -\newcommand\importmodule[2][]{% - \metasetkeys{importmodule}{#1}% - \update@used@modules{#2}% - \@importmodule[\importmodule@load]{#2}{\importmodule@ext}{export}% - \ignorespacesandpars% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\@importmodule} -% |\@importmodule[|\meta{filepath}|]{|\meta{mod}|}{|\meta{ext}|}{|\meta{export?}|}| -% loads \meta{filepath}|.|\meta{ext} (if it is given) and activates the module -% \meta{mod}. If \meta{export?} is |export|, then it also re-exports the |\symdef|s from -% \meta{mod}. -% -% First |\@load| will store the base file name with full path, then check if -% |\module@|\meta{mod}|@path| is defined. If this macro is defined, a module of this -% name has already been loaded, so we check whether the paths coincide, if they do, all -% is fine and we do nothing otherwise we give a suitable error. If this macro is -% undefined we load the path by |\requiremodules|. -% \begin{macrocode} -\newcommand\@importmodule[4][]{% - {\@importingtrue% to shut up macros while in the group opened here - \edef\@load{#1}% - \ifx\@load\@empty% - \relax% - \else% - \ifcsundef{module@#2@path}{% - \requiremodules{#1}{#3}% - }{% - \edef\@path{\csname module@#2@path\endcsname}% - \IfStrEq\@load\@path{% if the known path is the same as the requested one - \relax% do nothing, it has already been loaded, else signal an error - }{% - \PackageError{modules} - {Module Name Clash\MessageBreak - A module with name #2 was already loaded under the path "\@path"\MessageBreak - The imported path "\@load" is probably a different module with the\MessageBreak - same name; this is dangerous -- not importing}% - {Check whether the Module name is correct}% - }% - }% - \fi}% - \activate@defs{#2}% activate the module - \edef\@export{#4}\def\@@export{export}%prepare comparison - \ifx\@export\@@export\export@defs{#2}\fi% export the module - \if@importing\else\if@mmt\mmtinclude{#1?#2}\fi\fi% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\usemodule} -% |\usemodule| acts like |\importmodule|, except that the |sms| utility does not -% transfer it to the module signatures and it does not re-export the symdefs. -% \begin{macrocode} -\newcommand\usemodule[2][]{% - \metasetkeys{importmodule}{#1}% - \update@used@modules{#2}% - \@importmodule[\importmodule@load]{#2}{\importmodule@ext}{noexport}% - \ignorespacesandpars% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\withusedmodules} -% This variant just imports all the modules in a comma-separated list (usually -% |\used@modules|) -% \begin{macrocode} -\newcommand\withusedmodules[2]{{\@for\@I:=#1\do{\activate@defs\@I}{#2}}}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\importOMDocmodule} -% for the {\LaTeX} side we can just re-use |\importmodule|, for the {\latexml} side we -% have a full URI anyways. So things are easy.\ednote{MK@DG: this macro is seldom used, -% maybe I should just switch arguments.} -% \begin{macrocode} -\newrobustcmd\importOMDocmodule[3][]{\importmodule[#1]{#3}}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\metalanguage} -% |\metalanguage| behaves exactly like |\importmodule| for formatting. For {\latexml}, -% we only add the |type| attribute. -% \begin{macrocode} -\let\metalanguage=\importmodule% -% \end{macrocode} -% \end{macro} -% -% \subsection{Semantic Macros}\label{sec:impl:symdef} -% -% \begin{macro}{\mod@newcommand} -% We first hack the {\LaTeX} kernel macros to obtain a version of the |\newcommand| -% macro that does not check for definedness. -% \begin{macrocode} -\let\mod@newcommand=\providerobustcmd% -% \end{macrocode} -% \end{macro} -% -% Now we define the optional KeyVal arguments for the |\symdef| form and the actions that -% are taken when they are encountered. -% -% \begin{environment}{conceptdef} -% \begin{macrocode} -\srefaddidkey{conceptdef}% -\addmetakey*{conceptdef}{title}% -\addmetakey{conceptdef}{subject}% -\addmetakey*{conceptdef}{display}% -\def\conceptdef@type{Symbol}% -\newrobustcmd\conceptdef[2][]{% - \metasetkeys{conceptdef}{#1}% - \ifx\conceptdef@display\st@flow\else{\stDMemph{\conceptdef@type} #2:}\fi% - \ifx\conceptdef@title\@empty~\else~(\stDMemph{\conceptdef@title})\par\fi% -}% -% \end{macrocode} -% \ednote{MK@DG: maybe we need to add DefKeyVals here?} -% \end{environment} -% -% \begin{macro}{symdef:keys} -% The optional argument local specifies the scope of the function to be defined. If -% local is not present as an optional argument then |\symdef| assumes the scope of the -% function is global and it will include it in the pool of macros of the current -% module. Otherwise, if local is present then the function will be defined only locally -% and it will not be added to the current module (i.e. we cannot inherit a local -% function). Note, the optional key local does not need a value: we write -% |\symdef[local]{somefunction}[0]{some expansion}|. The other keys are not used in the -% {\LaTeX} part. -% \begin{macrocode} -\newif\if@symdeflocal% -\srefaddidkey{symdef}% -\define@key{symdef}{local}[true]{\@symdeflocaltrue}% -\define@key{symdef}{noverb}[all]{}% -\define@key{symdef}{align}[WithTheSymbolOfTheSameName]{}% -\define@key{symdef}{specializes}{}% -\addmetakey*{symdef}{noalign}[true] -\define@key{symdef}{primary}[true]{}% -\define@key{symdef}{assocarg}{}% -\define@key{symdef}{bvars}{}% -\define@key{symdef}{bargs}{}% -\addmetakey{symdef}{name}% -\addmetakey*{symdef}{title}% -\addmetakey*{symdef}{description}% -\addmetakey{symdef}{subject}% -\addmetakey*{symdef}{display}% -% \end{macrocode} -% \end{macro} -% \ednote{MK@MK: we need to document the binder keys above.} -% \begin{macro}{\symdef} -% The the |\symdef|, and |\@symdef| macros just handle optional arguments. -% \begin{macrocode} -\def\symdef{\@ifnextchar[{\@symdef}{\@symdef[]}}% -\def\@symdef[#1]#2{\@ifnextchar[{\@@symdef[#1]{#2}}{\@@symdef[#1]{#2}[0]}}% -% \end{macrocode} -% \end{macro} -% -% next we locally abbreviate |\mod@newcommand| to simplify argument passing. -% \begin{macrocode} -\def\@mod@nc#1{\mod@newcommand{#1}[1]}% -% \end{macrocode} -% and we copy a very useful piece of code from -% \url{http://tex.stackexchange.com/questions/23100/looking-for-an-ignorespacesandpars}, -% it ignores spaces and following implicit paragraphs (double newlines), explicit |\par|s -% are respected however -% \begin{macrocode} -\def\ignorespacesandpars{% - \begingroup - \catcode13=10 - \@ifnextchar\relax - {\endgroup}% - {\endgroup}% -} -% \end{macrocode} -% and more adapted from \url{http://tex.stackexchange.com/questions/179016/ignore-spaces-and-pars-after-an-environment} -% \begin{macrocode} -\def\ignorespacesandparsafterend#1\ignorespaces\fi{#1\fi\ignorespacesandpars} -\def\ignorespacesandpars{ - \ifhmode\unskip\fi% - \@ifnextchar\par% - {\expandafter\ignorespacesandpars\@gobble}% - {}% -} -% \end{macrocode} -% -% \begin{macro}{\@@symdef} -% now comes the real meat: the |\@@symdef| macro does two things, it adds the macro -% definition to the macro definition pool of the current module and also provides it. -% \begin{macrocode} -\def\@@symdef[#1]#2[#3]#4{% -% \end{macrocode} -% We use a switch to keep track of the local optional argument. We initialize the switch -% to false and set all the keys that have been provided as arguments: |name|, |local|. -% \begin{macrocode} - \@symdeflocalfalse% - \metasetkeys{symdef}{#1}% -% \end{macrocode} -% If the |mmt| option is set and we are not importing, then we write out the constant -% declaration for this symdef\ednote{eventually we may want to do something about the -% notations. This would pass \#4 to MMT via a macro that makes the \# (argumentmarkers) -% active and empty. I am not clear how well this works, so we leave out notations.} -% \begin{macrocode} - \if@mmt\if@importing\else% -\ifx\symdef@name\@empty\mmtconstdec{#2}\else\mmtconstdec{\symdef@name}\fi% -\fi\fi% -% \end{macrocode} -% First, using |\mod@newcommand| we initialize the intermediate macro -% |\module@|\meta{sym}|@pres@|, the one that can be extended with |\symvariant| -% \begin{macrocode} - \expandafter\mod@newcommand\csname modules@#2@pres@\endcsname[#3]{#4}% -% \end{macrocode} -% and then we define the actual semantic macro, which when invoked with an optional -% argument \meta{opt} calls |\modules@|\meta{sym}|@pres@|\meta{opt} provided by the -% |\symvariant| macro. -% \begin{macrocode} - \expandafter\mod@newcommand\csname #2\endcsname[1][]% - {\csname modules@#2@pres@##1\endcsname}% -% \end{macrocode} -% Finally, we prepare the internal macro to be used in the |\symref| call. -% \begin{macrocode} - \expandafter\@mod@nc\csname mod@symref@#2\expandafter\endcsname\expandafter% - {\expandafter\mod@termref\expandafter{\mod@id}{#2}{##1}}% -% \end{macrocode} -% We check if the switch for the local scope is set: if it is we are done, since this -% function has a local scope. Similarly, if we are not inside a module, which we could -% export from. -% \begin{macrocode} - \if@symdeflocal% - \else% - \ifcsundef{mod@id}{}{% -% \end{macrocode} -% Otherwise, we add three functions to the module's pool of defined macros using -% |\g@addto@macro|. We first add the definition of the intermediate function -% |\modules@|\meta{sym}|@pres@|. -% \begin{macrocode} - \expandafter\g@addto@macro\this@module% - {\expandafter\mod@newcommand\csname modules@#2@pres@\endcsname[#3]{#4}}% -% \end{macrocode} -% Then we add add the definition of |\|\meta{sym} which calls the intermediate -% function and handles the optional argument. -% \begin{macrocode} - \expandafter\g@addto@macro\this@module% - {\expandafter\mod@newcommand\csname #2\endcsname[1][]% - {\csname modules@#2@pres@##1\endcsname}}% -% \end{macrocode} -% We also add |\mod@symref@|\meta{sym} macro to the macro pool so that the |\symref| macro -% can pick it up. -% \begin{macrocode} - \expandafter\g@addto@macro\csname module@defs@\mod@id\expandafter\endcsname\expandafter% - {\expandafter\@mod@nc\csname mod@symref@#2\expandafter\endcsname\expandafter% - {\expandafter\mod@termref\expandafter{\mod@id}{#2}{##1}}}% -% \end{macrocode} -% Finally, using |\g@addto@macro| we add the two functions to the qualified version of the -% module if the |qualifiedimports| option was set. -% \begin{macrocode} - \ifmod@qualified% - \expandafter\g@addto@macro\this@qualified@module% - {\expandafter\mod@newcommand\csname modules@#2@pres@qualified\endcsname[#3]{#4}}% - \expandafter\g@addto@macro\this@qualified@module% - {\expandafter\def\csname#2@qualified\endcsname{\csname modules@#2@pres@qualified\endcsname}}% - \fi% - }% mod@qualified - \fi% symdeflocal -% \end{macrocode} -% So now we only need to show the data in the symdef, if the options allow. -% \begin{macrocode} - \ifmod@show% - \ifx\symdef@display\st@flow\else{\noindent\stDMemph{\symdef@type} #2:}\fi% - \ifx\symdef@title\@empty~\else~(\stDMemph{\symdef@title})\par\fi% - \fi% - \ignorespacesandpars% -}% mod@show -\def\symdef@type{Symbol}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\symvariant} -% |\symvariant{|\meta{sym}|}[|\meta{args}|]{|\meta{var}|}{|\meta{cseq}|}| just extends -% the internal macro |\modules@|\meta{sym}|@pres@| defined by -% |\symdef{|\meta{sym}|}[|\meta{args}|]{|\ldots|}| with a variant -% |\modules@|\meta{sym}|@pres@|\meta{var} which expands to \meta{cseq}. Recall that this -% is called by the macro |\|\meta{sym}|[|\meta{var}|]| induced by the -% |\symdef|.\ednote{MK@DG: this needs to be implemented in LaTeXML} -% \begin{macrocode} -\def\symvariant#1{% - \@ifnextchar[{\@symvariant{#1}}{\@symvariant{#1}[0]}% - }% -\def\@symvariant#1[#2]#3#4{% - \expandafter\mod@newcommand\csname modules@#1@pres@#3\endcsname[#2]{#4}% -% \end{macrocode} -% and if we are in a named module, then we need to export the function -% |\modules@|\meta{sym}|@pres@|\meta{opt} just as we have done that in |\symdef|. -% \begin{macrocode} - \ifcsundef{mod@id}{}{% - \expandafter\g@addto@macro\this@module% - {\expandafter\mod@newcommand\csname modules@#1@pres@#3\endcsname[#2]{#4}}% - }% -\ignorespacesandpars}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\resymdef} -% This is now deprecated. -% \begin{macrocode} -\def\resymdef{% - \@ifnextchar[{\@resymdef}{\@resymdef[]}% -}% -\def\@resymdef[#1]#2{% - \@ifnextchar[{\@@resymdef[#1]{#2}}{\@@resymdef[#1]{#2}[0]}% -}% -\def\@@resymdef[#1]#2[#3]#4{% - \PackageError{modules}% - {The \protect\resymdef macro is deprecated}{use the \protect\symvariant instead!}% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\abbrdef} -% The |\abbrdef| macro is a variant of |\symdef| that does the same on the {\LaTeX} -% level. -% \begin{macrocode} -\let\abbrdef\symdef% -% \end{macrocode} -% \end{macro} -% -% \subsection{Defining Math Operators}\label{sec:impl:defmathop} -% -% \begin{macro}{\DefMathOp} -% |\DefMathOp[|\meta{key pair}|]{definition}| will take 2 arguments. ||\meta{key pair}|| should be something like |[name=...]|, for example, |[name=equal]|. Though |\setkeys|, |\defmathop@name| will be set. Further definition will be done by |\symdef|. -% \begin{macrocode} -\define@key{DefMathOp}{name}{% - \def\defmathop@name{#1}% -}% -\newrobustcmd\DefMathOp[2][]{% - \setkeys{DefMathOp}{#1}% - \symdef[#1]{\defmathop@name}{#2}% -}% -% \end{macrocode} -% \end{macro} -% -% -% \subsection{Axiomatic Assumptions}\label{sec:impl:assumptions} -% -% \begin{macro}{\assdef} -% We fake it for now, not clear what we should do on the {\LaTeX} side. -% \begin{macrocode} -\newcommand\assdef[2][]{#2} -% \end{macrocode} -% \end{macro} -% -% \subsection{Semantic Macros for Variables}\label{sec:impl:semvars} -% -% \begin{macro}{\vardef} -% We do the argument parsing like in |\symdef| above, but add the |local| key. All the -% other changes are in the \latexml binding exclusively. -% \begin{macrocode} -\def\vardef{\@ifnextchar[{\@vardef}{\@vardef[]}}% -\def\@vardef[#1]#2{% - \@ifnextchar[{\@@vardef[#1]{#2}}{\@@vardef[#1]{#2}[0]}} -\def\@@vardef[#1]#2[#3]#4{% - \def\@test{#1}% - \ifx\@test\@empty% - \@@symdef[local]{#2}[#3]{#4}% - \else% - \symdef[local,#1]{#2}[#3]{#4}% - \fi% - \ignorespacesandpars}% -% \end{macrocode} -% \end{macro} -% -% \subsection{Testing Semantic Macros}\label{sec:impl:testing} -% -% \begin{macro}{\symtest} -% Allows to test a |\symdef| in place, this shuts up when being imported. -% \begin{macrocode} -\addmetakey{symtest}{name}% -\addmetakey{symtest}{variant}% -\newrobustcmd\symtest[3][]{% - \if@importing% - \else% - \metasetkeys{symtest}{#1}% - \par\noindent \textbf{Symbol}~% - \ifx\symtest@name\@empty\texttt{#2}\else\texttt{\symtest@name}\fi% - \ifx\symtest@variant\@empty\else\ (variant \texttt{\symtest@variant})\fi% - \ with semantic macro % - \texttt{\textbackslash #2\ifx\symtest@variant\@empty\else[\symtest@variant]\fi}% - : used e.g. in \ensuremath{#3}% - \fi% - \ignorespacesandpars% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\abbrtest} -% \begin{macrocode} -\addmetakey{abbrtest}{name}% -\newrobustcmd\abbrtest[3][]{% - \if@importing% - \else% - \metasetkeys{abbrtest}{#1}% - \par\noindent \textbf{Abbreviation}~% - \ifx\abbrtest@name\@empty\texttt{#2}\else\texttt{\abbrtest@name}\fi% - : used e.g. in \ensuremath{#3}% - \fi% - \ignorespacesandpars}% -% \end{macrocode} -% \end{macro} -% -% \subsection{Symbol and Concept Names}\label{sec:impl:concepts} -% -% \begin{macro}{\termdef} -% \begin{macrocode} -\def\mod@true{true}% -\addmetakey[false]{termdef}{local}% -\addmetakey{termdef}{name}% -\newrobustcmd\termdef[3][]{% - \metasetkeys{termdef}{#1}% - \expandafter\mod@newcommand\csname#2\endcsname[0]{#3\xspace}% - \ifx\termdef@local\mod@true% - \else% - \ifcsundef{mod@id}{}{% - \expandafter\g@addto@macro\this@module% - {\expandafter\mod@newcommand\csname#2\endcsname[0]{#3\xspace}}% - }% - \fi% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\capitalize} -% \begin{macrocode} -\def\@capitalize#1{\uppercase{#1}}% -\newrobustcmd\capitalize[1]{\expandafter\@capitalize #1}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\module@component} -% This macro computes the module component identifier for external links on term -% references. It is initially empty, but can be redefined later (e.g.in the |smultiling| -% package). -% \begin{macrocode} -\newcommand\mod@component[1]{} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\mod@termref} -% |\mod@termref{|\meta{module}|}{|\meta{name}|}{|\meta{nl}|}| determines whether the -% macro |\module@|\meta{module}|@path| is defined. If it is, we make it the prefix of a -% URI reference in the local macro |\@uri|, which we compose to the hyper-reference, -% otherwise we give a warning.\ednote{MK: this should be rethought, in particular the -% local reference does not work!} -% \begin{macrocode} -\newcommand\mod@termref[3]{\def\@test{#3}% - \@ifundefined{module@defs@#1}{% - \protect\G@refundefinedtrue% - \if@trwarn - \PackageWarning{modules}{`\protect\termref' with unidentified cd "#1":\MessageBreak - the cd key must reference an active module}% - \else - \PackageError{modules}{`\protect\termref' with unidentified cd "#1"} - {the cd key must reference an active module}% - \fi}% - {\def\@label{sref@#2@#1\mod@component{#1}@target}% - \@ifundefined{module@#1@path}% local reference - {\sref@hlink@ifh{\@label}{\ifx\@test\@empty #2\else #3\fi}% -% \footnote{sTeX mod@termref: local reference to\\ \@label} - }% - {\def\@uri{\csname module@#1@path\endcsname\mod@component{#1}.pdf\#\@label}% - \sref@href@ifh{\@uri}{\ifx\@test\@empty #2\else #3\fi}% -% \footnote{sTeX mod@termref: external reference to \\\@uri} -}% - }}% -% \end{macrocode} -% \end{macro} -% -% \subsection{Dealing with Multiple Files}\label{sec:impl:multiple} -% -% We use the |pathsuris| package deals with the canonicalization of paths. |\@cpath| will -% canonicalize a path and store the result into |\@CanPath|. To print a canoncalized path, -% simply use |\cpath{|\meta{path}|}|. -% -% \begin{macro}{\@rinput} -% |\@rinput{|\meta{path to the current file without extension}|}{|\meta{extension}|}| allows loading -% modules with relative path. For example, |\@rinput{foo/bar/B}{tex}| will load |foo/bar/B.tex|. -% \ednote{Jinbo: How to handle |mod@path|?} -% \begin{macrocode} -\def\CurrentDir{}% -\newrobustcmd{\@rinput}[2]{% - \@cpath{\CurrentDir#1}% - \StrCut[\value{RealAddrNum}]{/\@CanPath}{/}\@TempPath\@Rubbish% - \StrCut[1]{\@TempPath/}{/}\@Rubbish\@DirPath% - \edef\CurrentDir{\@DirPath}% -% \edef\mod@path{}% what should I put in here??? -% \edef\mod@ext{}% - \input{\@CanPath.#2}% - \def\CurrentDir{}% -}% -% \end{macrocode} -% \end{macro} -% -% \subsection{Loading Module Signatures} -% -% \subsubsection{Selective Inclusion} -% -% \begin{macro}{\requiremodules} -% this macro loads the modules in a file and makes sure that no text is deposited (we -% set the flags |\mod@showfalse| and |\@importingtrue| in the local group). It also -% remembers the file name and extension in |\mod@path| and |\mod@ext| so that -% |\begin{module}| can pick them up later. -% \begin{macrocode} -\newrobustcmd\requiremodules[2]{% - \mod@showfalse% - \@importingtrue% save state and ensure silence while reading sms - \edef\mod@path{#1}% - \edef\mod@ext{#2}% set up path/ext - \input{#1.#2}% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\@requiremodules} -% the internal version of |\requiremodules| for use in the |*.aux| file. We disable it -% at the end of the document, so that when the |aux| file is read again, nothing is -% loaded. -% \begin{macrocode} -\newrobustcmd\@requiremodules[2]{% - \if@tempswa\requiremodules{#1}{#2}\fi% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\inputref} -% |\inputref{|\meta{path to the current file without extension}|}| supports both -% absolute path and relative path, meanwhile, records the path and the extension (not -% for relative path). \ednote{MK: the first (optional) argument is not used. Maybe do -% something with a non-standard (i.e. non-\texttt{tex}) extension with an optional -% argument?} -% \begin{macrocode} -\newrobustcmd\inputref[2][]{% - \def\@Slash{/} - \edef\@load{#2}% - \StrChar{\@load}{1}[\@testchar] - \ifx\@testchar\@Slash% - \edef\mod@path{#2}% - \edef\mod@ext{tex}% - \input{#2}% - \else% - \@rinput{#2}{tex}% - \fi% -}% -% \end{macrocode} -% \end{macro} -% -% \subsection{Including Externally Defined Semantic Macros }\label{sec:impl:packages} -% -% \begin{macro}{\requirepackage} -% \begin{macrocode} -\def\requirepackage#1#2{\makeatletter\input{#1.sty}\makeatother}% -% \end{macrocode} -% \end{macro} -% -% \subsection{Deprecated Functionality}\label{sec:impl:deprecated} -% -% \begin{macro}{\sinput*} -% \begin{macrocode} -\newrobustcmd\sinput[1]{% - \PackageError{modules}% - {The `\protect\sinput' macro is deprecated}{use the \protect\input instead!}% -}% -\newrobustcmd\sinputref[1]{% - \PackageError{modules}% - {The \protect\sinputref macro is deprecated}{use the \protect\inputref instead!}% -}% -% \end{macrocode} -% \end{macro} -% -% In this section we centralize old interfaces that are only partially supported any more. -% \begin{macro}{module:uses} -% For each the module name |xxx| specified in the |uses| key, we activate their symdefs -% and we export the local symdefs.\ednote{this issue is deprecated, it will be removed -% before 1.0.} -% \begin{macrocode} -\define@key{module}{uses}{% - \@for\module@tmp:=#1\do{\activate@defs\module@tmp\export@defs\module@tmp}% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{module:usesqualified} -% This option operates similarly to the module:uses option defined above. The only -% difference is that here we import modules with a prefix. This is useful when two -% modules provide a macro with the same name. -% \begin{macrocode} -\define@key{module}{usesqualified}{% - \@for\module@tmp:=#1\do{\activate@defs{qualified@\module@tmp}\export@defs\module@tmp}% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\coolurion/off} -% \begin{macrocode} -\def\coolurion{\PackageWarning{modules}{coolurion is obsolete, please remove}}% -\def\coolurioff{\PackageWarning{modules}{coolurioff is obsolete, please remove}}% -% \end{macrocode} -% \end{macro} -% -% \subsection{Experiments} -% In this section we develop experimental functionality. Currently support for complex -% expressions, see -% \url{https://svn.kwarc.info/repos/stex/doc/blue/comlex_semmacros/note.pdf} for details. -% -% \begin{macro}{\csymdef} -% For the {\LaTeX} we use |\symdef| and forget the last argument. The code here is just -% needed for parsing the (non-standard) argument structure. -% \begin{macrocode} -\def\csymdef{\@ifnextchar[{\@csymdef}{\@csymdef[]}}% -\def\@csymdef[#1]#2{% - \@ifnextchar[{\@@csymdef[#1]{#2}}{\@@csymdef[#1]{#2}[0]}% -}% -\def\@@csymdef[#1]#2[#3]#4#5{% - \@@symdef[#1]{#2}[#3]{#4}% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\notationdef} -% For the {\LaTeX} side, we just make |\notationdef| invisible. -% \begin{macrocode} -\def\notationdef[#1]#2#3{} -% \end{macrocode} -% \end{macro} -% -% The code for avoiding duplicate loading is very very complex and brittle (and does not -% quite work). Therefore I would like to replace it with something better. It has two -% parts: -% \begin{itemize} -% \item keeping a registry of file paths, and only loading when the file path has not been -% mentioned in that, and -% \item dealing with relative paths (for that we have to string together prefixes and pass -% them one) -% \end{itemize} -% For the first problem, there is a very nice and efficient solution using |etoolbox| which -% I document below. If I decide to do away with relative paths, this would be it. -% -% \begin{macro}{\reqmodules} -% We keep a file path registry |\@register| and only load a module signature, if it is -% not in there. -% \begin{macrocode} -\newrobustcmd\reqmodules[2]{% - \ifinlist{#1}{\@register}{}{\listadd\@register{#1}\input{#1.#2}}% -}% -% \end{macrocode} -% \end{macro} -% for the relative paths, I have to find out the directory prefix and the file name. Here -% are two helper functions, which work well, but do not survive being called in an -% |\edef|, which is what we would need. First some preparation: we set up a path parser -% \begin{macrocode} -\newcounter{@pl} -\DeclareListParser*{\forpathlist}{/} -% \end{macrocode} -% -% \begin{macro}{\file@name} -% |\file@name| selects the filename of the file path: |\file@name{/foo/bar/baz.tex}| is -% |baz.tex|. -% \begin{macrocode} -\def\file@name#1{% - \setcounter{@pl}{0}% - \forpathlist{\stepcounter{@pl}\listadd\@pathlist}{#1} - \def\do##1{% - \ifnumequal{\value{@pl}}{1}{##1}{\addtocounter{@pl}{-1}} - }% - \dolistloop{\@pathlist}% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\file@path} -% |\file@path| selects the path of the file path |\file@path{/foo/bar/baz.tex}| is -% |/foo/bar| -% \begin{macrocode} -\def\file@path#1{% - \setcounter{@pl}{0}% - \forpathlist{\stepcounter{@pl}\listadd\@pathlist}{#1}% - \def\do##1{% - \ifnumequal{\value{@pl}}{1}{}{% - \addtocounter{@pl}{-1}% - \ifnumequal{\value{@pl}}{1}{##1}{##1/}% - }% - }% - \dolistloop{\@pathlist}% -}% -%</package> -% \end{macrocode} -% \end{macro} -% what I would really like to do in this situation is -% \begin{macro}{\NEWrequiremodules} -% but this does not work, since the |\file@name| and |\file@path| do not survive the -% |\edef|. -% \begin{macrocode} -\def\@NEWcurrentprefix{} -\def\NEWrequiremodules#1{% - \def\@pref{\file@path{#1}}% - \ifx\@pref\@empty% - \else% - \xdef\@NEWcurrentprefix{\@NEWcurrentprefix/\@pref}% - \fi% - \edef\@input@me{\@NEWcurrentprefix/\file@name{#1}}% - \message{requiring \@input@me}\reqmodule{\@input@me}% -}% -% \end{macrocode} -% \end{macro} -% \Finale -\endinput -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: -% LocalWords: GPL structuresharing STR dtx env envfalse idfalse displayfalse filedate nl -% LocalWords: usesfalse usesqualified usesqualifiedfalse envtrue idtrue CPERL Rares pres -% LocalWords: usestrue displaytrue usesqualifiedtrue RequirePackage keyval tmp 2oms04 eg -% LocalWords: defs foreach LookupValue activateScope DefEnvironment keyvals cd varpres -% LocalWords: OptionalKeyVals getValue toString AssignValue openElement omdoc uvee vee -% LocalWords: closeElement beforeDigest useTheoryItemizations afterDigestBegin symtest -% LocalWords: whatsit setProperty getArg qw symdef iffalse importOMDocmodule symtest ci -% LocalWords: DefKeyVal Semiverbatim symdeflocal atqualified DefMacro STDERR setst spath -% LocalWords: args unlist DefPrimitive nargs Stringify eq attr omcd ltx XMTok abbrtest -% LocalWords: convertLaTeXArgs scriptpos XMApp OMA XMArg simpl abbrtest 2oms04 circ ary -% LocalWords: blaaaa savedprefix aaa simplhelp tust tist tost reguse spath baz rangle -% LocalWords: updatedpre ReturnAfterFi updateall updatedpost updatesms bgroup includeref -% LocalWords: texclude tinclude getGullet requiredmodule tex sms egroup pmml sincluderef -% LocalWords: toks mixfixi mixfixa mixfixii mixfixia mixfixai mixfixiii arg cr OPaths -% LocalWords: undef tok PARAM thyid BerFieMas inparaenum omsemvar vardef vardef mhview -% LocalWords: getString showfalse showtrue xcomment stex srcref KeyVal omext osslepsdl13 -% LocalWords: beginItemize getProperty introdcue afterOpen numberIt Tokenize mathhub mmt -% LocalWords: OptionalSemiverbatim omdocmod PushValue assocarg getStomach prs HorIacJuc -% LocalWords: begingroup beginMode endMode endgroup insertElement resymdef sym cscpnrr11 -% LocalWords: updir nargkey PresFormatters mixfixaii formatters argname expr behavior -% LocalWords: getSymmdefProperties XMath mcdcr exprlist recurse texttt scsys foobar mrow -% LocalWords: textbackslash newcommand providecommand sc sc mathml openmath nx st@flow -% LocalWords: latexml cmathml activemath twintoo atwin atwintoo mathcal Deyan viewsketch -% LocalWords: mathcal fileversion Ginev maketitle newpage infty ulsmf08 exfig endinput -% LocalWords: omsemmac lstset basicstyle scriptsize aboveskip belowskip hline mh-variant -% LocalWords: morekeywords lstlisting csymbol showmods foo exf cseq mdframed usemhmodule -% LocalWords: qualifiedimports qualifiedimports termdef textbf filepath RabKoh mhinput -% LocalWords: symname varSmoothfunctionsOn ednote abbrdef Sumfromto semmodule mhinputref -% LocalWords: vspace hrule vspace arith arbitraryn xbool oplus xdisjunction tw mhinput -% LocalWords: emph capitalize ldots termref termref symref symref ctancite nc mhinputref -% LocalWords: smms hyperref RahObe hmlmh10 widehat texmf.cnf requiremodules cs 2oms04 -% LocalWords: sinput sinputref sinputref cname csname 2oms04 if@mmt modules-mh pathsuris -% LocalWords: OPhats usepackage importqualified Crossreferencing jobname ltxml etoolbox -% LocalWords: jobname printbibliography textsf langle textsf langle textlangle listadd -% LocalWords: textrangle textlangle newif ifmod qualifiedfalse qualifiedtrue usemhmodule -% LocalWords: sref xspace expandafter noexpand endcsname namedef setkeys ifx mh-variants -% LocalWords: newenvironment parentmod usemodule ifundefined coolurion cooluri reqmodule -% LocalWords: coolurioff cwd ouri ifdefinable testopt ifnextchar xargdef bvars 2oms04 -% LocalWords: argdef yargdef somefunction symdeflocaltrue bvar xpath assoc qr reqmodules -% LocalWords: symdeflocalfalse localpres isbound symdefs COMPLEXTOKEN localp fromrepos -% LocalWords: findnodes localname carg renewcommand bbb showmeta showmeta exp ifnumequal -% LocalWords: refundefinedtrue subsubsection blaaa makeatletter makeatother rm ifinlist -% LocalWords: ifmodules gdef xdef xdef modulestrue modulesfalse pathpostfix abbreviative -% LocalWords: updatedsms newreg xref texorpdfstring srefaddidkey newsavebox importmodule -% LocalWords: viewbox newcounter thesection theview theproblem hfill lrbox req torepos -% LocalWords: stepcounter textwidth hbox noindent smallskip fbox vbox usebox forpathlist -% LocalWords: smallskip newxcomment vassign ensuremath mapsto doctex tocdepth dolistloop -% LocalWords: setcounter tableofcontents mathbb symvariant importmodulevia assdef Jinbo -% LocalWords: importmodulevia compactdesc tassign tassign tname source-tname frompath -% LocalWords: ttassign metakeys addmetakey themodule metasetkeys aftergroup addtocounter -% LocalWords: groupling requation IMPORTCD CURRENTCD bindargs defmathop cnode topath -% LocalWords: icvariant aftercounter prestok inputref oref loadfrom loadto customization -% LocalWords: csymdef notationdef noauxreq noauxreq rinput ifaux reqtrue bargs assdef -% LocalWords: reqfalse currmod importmoduleenv conceptdef stDMemph tempswa mhviewsketch -% LocalWords: auxout omtext surroundwithmdframed ignorespaces NeedsTeXFormat lstinline -% LocalWords: modularizations conventionalized initialize xstring srccite csgdef csxdef -% LocalWords: customized newrobustcmd ifcsundef definedness providerobustcmd cpath -% LocalWords: canonicalization canonicalize canoncalized RealAddrNum itemize mmtheory -% LocalWords: NEWrequiremodules mmtheoryend ignorespacesafterend ignorespacesandpars -% LocalWords: mmtinclude noexport withusedmodules catcode13 ignorespacesandparsafterend -% LocalWords: ifhmode unskip mmtconstdec mmtconstdec - -% \endinput -% Local Variables: -% mode: doctex -% TeX-master: t -% End: diff --git a/macros/latex/contrib/stex/sty/modules/modules.ins b/macros/latex/contrib/stex/sty/modules/modules.ins deleted file mode 100644 index cde996b92b..0000000000 --- a/macros/latex/contrib/stex/sty/modules/modules.ins +++ /dev/null @@ -1,38 +0,0 @@ - %% -%% This file generates files required to use the ed package. -%% At your command prompt write -%% -%% latex modules.ins -%% -%% Copyright(c) 2005 Michael Kohlhase -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{modules.sty}{\from{modules.dtx}{package}}} - -\Msg{*} -\Msg{* You probably need to move the generated style files into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} - -% \nopreamble\nopostamble -% \generate{\file{modules.sty.ltxml}{\from{modules.dtx}{ltxml}}} - -% \Msg{*} -% \Msg{* You probably need to move the generated ltxml files into a directory searched by LaTeXML.} -% \Msg{*} - -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/modules/modules.pdf b/macros/latex/contrib/stex/sty/modules/modules.pdf Binary files differdeleted file mode 100644 index d30504f08e..0000000000 --- a/macros/latex/contrib/stex/sty/modules/modules.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/omdoc/README b/macros/latex/contrib/stex/sty/omdoc/README deleted file mode 100644 index ff6a71db6b..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/omdoc/omdoc.dtx b/macros/latex/contrib/stex/sty/omdoc/omdoc.dtx deleted file mode 100644 index 5cc680fc25..0000000000 --- a/macros/latex/contrib/stex/sty/omdoc/omdoc.dtx +++ /dev/null @@ -1,782 +0,0 @@ -% \iffalse meta-comment -% A LaTeX Class and Package for OMDoc Document Structures -% Copyright (c) 2016 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<package|cls>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<package>\ProvidesPackage{omdoc}[2019/03/20 v1.3 OMDoc document Structure] -%<cls>\ProvidesClass{omdoc}[2019/03/20 v1.3 OMDoc Documents] -% -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage{url,array,float} -\usepackage[show]{ed} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{stex-logo} -\usepackage{omdoc} -\usepackage{omtext} -\usepackage{ctangit} -\usepackage{hyperref} -\usepackage{paralist} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\begin{document} -\RecordChanges -\DocInput{omdoc.dtx} -\end{document} -%</driver> -% \fi -% -%\CheckSum{385} -% -% \changes{v0.1}{2006/1/17}{First Version} -% \changes{v0.2}{2006/7/11}{added OMDoc class} -% \changes{v0.3}{2007/09/09}{moved omtext and friends here from the statements package} -% \changes{v0.4}{2008/09/06}{added quotes} -% \changes{v0.5}{2008/03/28}{more package/class options} -% \changes{v0.7}{2009/11/24}{giving keyval arguments to the document environment} -% \changes{v1.0}{2010/05/25}{separated out \texttt{omtext.dtx}} -% \changes{v1.1}{2012/02/14}{integrated \texttt{etoolbox} package} -% \changes{v1.2}{2014/01/12}{front/backmatter} -% \changes{v1.3}{2015/11/18}{removing keyval arg from document in favor of -% \texttt{\textbackslash documentkeys} macro} -% \changes{v1.3}{2018/09/10}{global variables and switches} -% \changes{v1.3}{2018/12/03}{changed to keyval class/package options, allowed arbitrary classes} -% -% -% \MakeShortVerb{\|} -% -% \def\omdoc{OMDoc} -% \def\latexml{{\LaTeX}ML} -% \title{{\texttt{omdoc.sty/cls}}: Semantic Markup for Open Mathematical Documents in {\LaTeX}} -% \author{Michael Kohlhase\\ -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}} -% \maketitle -% -% \begin{abstract} -% The |omdoc| package is 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 {\TeX/\LaTeX} into a document format for mathematical -% knowledge management (MKM). -% -% This package supplies an infrastructure for writing {\omdoc} documents in {\LaTeX}. -% This includes a simple structure sharing mechanism for {\sTeX} that allows to to move -% from a copy-and-paste document development model to a copy-and-reference model, which -% conserves space and simplifies document management. The augmented structure can be -% used by MKM systems for added-value services, either directly from the {\sTeX} -% sources, or after translation. -% \end{abstract} -% -%\newpage\tableofcontents\newpage -% -%\begin{omgroup}[id=sec:STR]{Introduction} -% -% {\sTeX} is a version of {\TeX/\LaTeX} that allows to markup {\TeX/\LaTeX} documents -% semantically without leaving the document format, essentially turning {\TeX/\LaTeX} -% into a document format for mathematical knowledge management (MKM). The package -% supports direct translation to the {\omdoc} format~\cite{Kohlhase:OMDoc1.2} -% -% The |omdoc| package supplies macros and environment that allow to label document -% fragments and to reference them later in the same document or in other documents. In -% essence, this enhances the document-as-trees model to -% documents-as-directed-acyclic-graphs (DAG) model. This structure can be used by MKM -% systems for added-value services, either directly from the {\sTeX} sources, or after -% translation. Currently, trans-document referencing provided by this package can only -% be used in the {\sTeX} collection. -% -% DAG models of documents allow to replace the ``Copy and Paste'' in the source document -% with a label-and-reference model where document are shared in the document source and -% the formatter does the copying during document -% formatting/presentation.\ednote{integrate with latexml's XMRef in the Math mode.} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:user]{The User Interface} -% -% The |omdoc| package generates two files: |omdoc.cls|, and |omdoc.sty|. The {\omdoc} -% class is a minimally changed variant of the standard |article| class that includes the -% functionality provided by |omdoc.sty|. The rest of the documentation pertains to the -% functionality introduced by |omdoc.sty|. -% -% \begin{omgroup}[id=sec:user:options]{Package and Class Options} -% -% The |omdoc| class accept the following options: -% \begin{center} -% \begin{tabular}{|l|p{10cm}|}\hline -% \texttt{class=\meta{name}} & load \meta{name}|.cls| instead of |article.cls|\\\hline -% \texttt{topsect=\meta{sect}} & The top-level sectioning level; the default for -% \meta{sect} is \texttt{section}\\\hline -% \texttt{showignores} & show the the contents of the |ignore| environment after all \\\hline -% \texttt{showmeta} & show the metadata; see |metakeys.sty|\\\hline -% \texttt{showmods} & show modules; see |modules.sty|\\\hline -% \texttt{extrefs} & allow external references; see |sref.sty|\\\hline -% \texttt{defindex} & index definienda; see |statements.sty|\\\hline -% \texttt{mh} & MathHub support; see~\cite{Kohlhase:mss:ctan}\\\hline -% \end{tabular} -% \end{center} -% The |omdoc| package accepts the same except the first two. -% \end{omgroup} -% -% \begin{omgroup}[id=sec:user:struct]{Document Structure} -% -% The top-level \DescribeEnv{document}|document| environment can be given key/value -% information by the \DescribeMacro{\documentkeys}|\documentkeys| macro in the -% preamble\footnote{We cannot patch the document environment to accept an optional -% argument, since other packages we load already do; pity.}. This can be used to give -% metadata about the document. For the moment only the \DescribeMacro{id}|id| key is -% used to give an identifier to the \texttt{omdoc} element resulting from the {\latexml} -% transformation. -% -% The structure of the document is given by the \DescribeEnv{omgroup}|omgroup| -% environment just like in {\omdoc}. In the {\LaTeX} route, the |omgroup| environment is -% flexibly mapped to sectioning commands, inducing the proper sectioning level from the -% nesting of |omgroup| environments. Correspondingly, the |omgroup| environment takes an -% optional key/value argument for metadata followed by a regular argument for the -% (section) title of the omgroup. The optional metadata argument has the keys -% \DescribeMacro{id}|id| for an identifier, \DescribeMacro{creators}|creators| and -% \DescribeMacro{contributors}|contributors| for the Dublin Core -% metadata~\cite{DCMI:dmt03}; see~\ctancite{Kohlhase:dcm} for details of the format. The -% \DescribeMacro{short}|short| allows to give a short title for the generated -% section. If the title contains semantic macros, they need to be protected by -% |\protect|, and we need to give the \DescribeMacro{loadmodules}|loadmodules| key it -% needs no value. For instance we would have -% \begin{verbatim} -% \begin{module}{foo} -% \symdef{bar}{B^a_r} -% ... -% \begin{omgroup}[id=barderiv,loadmodules] -% {Introducing $\protect\bar$ Derivations} -% \end{verbatim} -% -% \sTeX automatically computes the sectioning level, from the nesting of |omgroup| -% environments. But sometimes, we want to skip levels (e.g. to use a subsection* as an -% introduction for a chapter). Therefore the |omdoc| package provides a variant -% \DescribeEnv{blindomgroup}|blindomgroup| that does not produce markup, but increments -% the sectioning level and logically groups document parts that belong together, but -% where traditional document markup relies on convention rather than explicit -% markup. The |blindomgroup| environment is useful e.g. for creating frontmatter at the -% correct level. Example~\ref{fig:docstruct} shows a typical setup for the outer -% document structure of a book with parts and chapters. We use two levels of -% |blindomgroup|: -% \begin{itemize} -% \item The outer one groups the introductory parts of the book (which we assume to have -% a sectioning hierarchy topping at the part level). This |blindomgroup| makes sure -% that the introductory remarks become a ``chapter'' instead of a ``part''. -% \item Th inner one groups the frontmatter\footnote{We shied away from redefining the -% |frontmatter| to induce a blindomgroup, but this may be the ``right'' way to go in -% the future.} and makes the preface of the book a section-level construct. Note that -% here the |display=flow| on the |omgroup| environment prevents numbering as is -% traditional for prefaces. -% \end{itemize} -% \begin{exfig} -% \begin{verbatim} -% \begin{document} -% \begin{blindomgroup} -% \begin{blindomgroup} -% \begin{frontmatter} -% \maketitle\newpage -% \begin{omgroup}[display=flow]{Preface} -% ... <<preface>> ... -% \end{omgroup} -% \clearpage\setcounter{tocdepth}{4}\tableofcontents\clearpage -% \end{frontmatter} -% \end{blindomgroup} -% ... <<introductory remarks>> ... -% \end{blindomgroup} -% \begin{omgroup}{Introduction} -% ... <<intro>> ... -% \end{omgroup} -% ... <<more chapters>> ... -% \bibliographystyle{alpha}\bibliography{kwarc} -% \end{document} -% \end{verbatim}\vspace*{-2em} -% \caption{A typical Document Structure of a Book}\label{fig:docstruct} -% \end{exfig} -% -% -% The \DescribeMacro{\currentsectionlevel}|\currentsectionlevel| macro supplies the name -% of the current sectioning level, e.g. ``chapter'', or -% ``subsection''. \DescribeMacro{\CurrentSectionLevel}|\CurrentSectionLevel| is the -% capitalized variant. They are useful to write something like ``In this -% |\currentsectionlevel|, we will\ldots'' in an |omgroup| environment, where we do not -% know which sectioning level we will end up. -% \end{omgroup} -% -% \begin{omgroup}[id=sec:user:ignore]{Ignoring Inputs} -% -% The \DescribeEnv{ignore}|ignore| environment can be used for hiding text parts from the -% document structure. The body of the environment is not PDF or DVI output unless the -% \DescribeMacro{showignores}|showignores| option is given to the |omdoc| class or -% |package|. But in the generated {\omdoc} result, the body is marked up with a |ignore| -% element. This is useful in two situations. For -% \begin{description} -% \item[editing] One may want to hide unfinished or obsolete parts of a document -% \item[narrative/content markup] In {\stex} we mark up narrative-structured documents. In -% the generated {\omdoc} documents we want to be able to cache content objects that are -% not directly visible. For instance in the |statements| -% package~\ctancite{Kohlhase:smms} we use the |\inlinedef| macro to mark up phrase-level -% definitions, which verbalize more formal definitions. The latter can be hidden by an -% ignore and referenced by the |verbalizes| key in |\inlinedef|. -% \end{description} -% -% \end{omgroup} -% -% \begin{omgroup}[id=sec:user:sharing]{Structure Sharing} -% -% The \DescribeMacro{\STRlabel}|\STRlabel| macro takes two arguments: a label and the -% content and stores the the content for later use by -% \DescribeMacro{\STRcopy}|\STRcopy[|\meta{URL}|]{|\meta{label}|}|, which expands to the -% previously stored content. If the |\STRlabel| macro was in a different file, then we -% can give a URL \meta{URL} that lets {\latexml} generate the correct reference. -% -% \DescribeMacro{\STRsemantics} The |\STRlabel| macro has a variant |\STRsemantics|, -% where the label argument is optional, and which takes a third argument, which is -% ignored in {\LaTeX}. This allows to specify the meaning of the content (whatever that -% may mean) in cases, where the source document is not formatted for presentation, but -% is transformed into some content markup format.\ednote{document LMID und LMXREf here -% if we decide to keep them.} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:user:gvars]{Global Variables} -% -% Text fragments and modules can be made more re-usable by the use of global -% variables. For instance, the admin section of a course can be made course-independent -% (and therefore re-usable) by using variables (actually token registers) -% |courseAcronym| and |courseTitle| instead of the text itself. The variables can then -% be set in the \sTeX preamble of the course notes file. -% \DescribeMacro{\setSGvar}|\setSGvar{|\meta{vname}|}{|\meta{text}|}| to set the global -% variable \meta{vname} to \meta{text} and -% \DescribeMacro{\useSGvar}|\useSGvar{|\meta{vname}|}| to reference it. -% -% With \DescribeMacro{\ifSGvar}|\ifSGvar| we can test for the contents of a global -% variable: the macro call |\ifSGvar{|\meta{vname}|}{|\meta{val}|}{|\meta{ctext}|}| -% tests the content of the global variable \meta{vname}, only if (after expansion) it is -% equal to \meta{val}, the conditional text \meta{ctext} is formatted. -% \end{omgroup} -% -% \begin{omgroup}[id=sec:user:colors]{Colors} -% -% For convenience, the |omdoc| package defines a couple of color macros for the |color| -% package: For instance \DescribeMacro{\blue}|\blue| abbreviates |\textcolor{blue}|, so -% that |\blue{|\meta{something}|}| writes \meta{something} in blue. The macros -% \DescribeMacro{\red}|\red| \DescribeMacro{...}|\green|, |\cyan|, |\magenta|, |\brown|, -% |\yellow|, |\orange|, |\gray|, and finally \DescribeMacro{\black}|\black| are -% analogous. -% \end{omgroup} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:limitations]{Limitations} -% -% In this section we document known limitations. If you want to help alleviate them, -% please feel free to contact the package author. Some of them are currently discussed in -% the \sTeX GitHub repository~\cite{sTeX:github:on}. -% \begin{enumerate} -% \item when option |book| which uses |\pagestyle{headings}| is given and semantic macros -% are given in the |omgroup| titles, then they sometimes are not defined by the time the -% heading is formatted. Need to look into how the headings are made. -% \end{enumerate} -% \end{omgroup} -% -% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\newpage\printbibliography}\newpage -% -% \begin{omgroup}[id=sec:impl:cls]{Implementation: The OMDoc Class} -% -% The functionality is spread over the |omdoc| class and package. The class provides the -% |document| environment and the |omdoc| element corresponds to it, whereas the -% package provides the concrete functionality. -% -% \begin{omgroup}[id=sec:impl:cls:options]{Class Options} -% To initialize the |omdoc| class, we declare and process the necessary options using -% the |kvoptions| package for key/value options handling. For -% |omdoc.cls| this is quite simple. We have options |report| and |book|, which set the -% \DescribeMacro{\omdoc@cls@class}|\omdoc@cls@class| macro and pass on the macro to |omdoc.sty| -% for further processing. -% -% \begin{macrocode} -%<*cls> -\RequirePackage{etoolbox} -\RequirePackage{kvoptions} -\SetupKeyvalOptions{family=omdoc@cls,prefix=omdoc@cls@} -\DeclareStringOption[article]{class} -\AddToKeyvalOption*{class}{\PassOptionsToPackage{class=\omdoc@cls@class}{omdoc}} -% \end{macrocode} -% -% the following options are deprecated. -% -% \begin{macrocode} -\DeclareVoidOption{report}{\def\omdoc@cls@class{report}% -\ClassWarning{omdoc}{the option 'report' is deprecated, use 'class=report', instead}} -\DeclareVoidOption{book}{\def\omdoc@cls@class{book}% -\ClassWarning{omdoc}{the option 'part' is deprecated, use 'class=book', instead}} -\DeclareVoidOption{bookpart}{\def\omdoc@cls@class{book}% -\PassOptionsToPackage{topsect=chapter}{omdoc}% -\ClassWarning{omdoc}{the option 'bookpart' is deprecated, use 'class=book,topsect=chapter', instead}} -% \end{macrocode} -% the rest of the options are only passed on to |omdoc.sty| and the class selected by the -% first options. We need to load the |etoolbox| package early for |\@xappto|. -% \begin{macrocode} -\def\@omdoc@cls@docopt{} -\DeclareDefaultOption{% -\ifx\@omdoc@cls@docopt\@empty% -\xdef\@omdoc@cls@docopt{\CurrentOption}% -\else\xappto\@omdoc@cls@docopt{,\CurrentOption}% -\fi}% -\PassOptionsToPackage{\CurrentOption}{omdoc} -\PassOptionsToPackage{\CurrentOption}{stex} -\ProcessKeyvalOptions{omdoc@cls} -% \end{macrocode} -% -% We load |article.cls|, and the desired packages. For the {\latexml} bindings, we make -% sure the right packages are loaded. -% -% \begin{macrocode} -\LoadClass[\@omdoc@cls@docopt]{\omdoc@cls@class} -\RequirePackage{omdoc} -\RequirePackage{stex} -% \end{macrocode} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:impl:cls:document]{Beefing up the \texttt{document} environment} -% -% Now, we will define the environments we need. The top-level one is the |document| -% environment, which we redefined so that we can provide keyval arguments. -% -% \begin{environment}{document} -% For the moment we do not use them on the {\LaTeX} level, but the document identifier -% is picked up by {\latexml}.\ednote{faking documentkeys for now. @HANG, please implement} -% \begin{macrocode} -\srefaddidkey{document} -\newcommand\documentkeys[1]{\metasetkeys{document}{#1}} -\let\orig@document=\document -\renewcommand{\document}[1][]{\metasetkeys{document}{#1}\orig@document} -%</cls> -% \end{macrocode} -% \end{environment} -% \end{omgroup} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:impl:sty]{Implementation: OMDoc Package} -% -% \begin{omgroup}[id=sec:impl:options]{Package Options} -% -% We declare some switches which will modify the behavior according to the package -% options. Generally, an option |xxx| will just set the appropriate switches to true -% (otherwise they stay false). -% -% \begin{macrocode} -%<*package> -\RequirePackage{kvoptions} -\SetupKeyvalOptions{family=omdoc@sty,prefix=omdoc@sty@} -\DeclareBoolOption{mh} -\DeclareStringOption[article]{class} -\DeclareBoolOption{showignores} -\DeclareStringOption[section]{topsect} -\newcount\section@level -\DeclareDefaultOption{\PassOptionsToPackage{\CurrentOption}{sref}} -\ProcessKeyvalOptions{omdoc@sty} -% \end{macrocode} -% -% Then we need to set up the packages by requiring the |sref| package to be loaded. -% -% \begin{macrocode} -\ifomdoc@sty@mh\RequirePackage{omdoc-mh}\fi -\RequirePackage{sref} -\RequirePackage{xspace} -\RequirePackage{comment} -\RequirePackage{pathsuris} -% \end{macrocode} -% -% Finally, we set the \DescribeMacro{\section@level}|\section@level| macro that governs -% sectioning. The default is two (corresponding to the |article| class), then we set the -% defaults for the standard classes |book| and |report| and then we take care of the -% levels passed in via the |topsect| option. -% -% \begin{macrocode} -\section@level=2 -\ifdefstring{\omdoc@sty@class}{book}{\section@level=0}{} -\ifdefstring{\omdoc@sty@class}{report}{\section@level=0}{} -\ifdefstring{\omdoc@sty@topsect}{part}{\section@level=0}{} -\ifdefstring{\omdoc@sty@topsect}{chapter}{\section@level=1}{} -% \end{macrocode} -% -% \end{omgroup} -% -% \begin{omgroup}[id=sec:impl:struct]{Document Structure} -% -% The structure of the document is given by the |omgroup| environment just like in -% OMDoc. The hierarchy is adjusted automatically according to the {\LaTeX} class in -% effect. -% \begin{macro}{\currentsectionlevel} -% For the |\currentsectionlevel| and |\Currentsectionlevel| macros we use an internal -% macro |\current@section@level| that only contains the keyword (no markup). We -% initialize it with ``document'' as a default. In the generated OMDoc, we only generate -% a text element of class |omdoc_currentsectionlevel|, wich will be instantiated by CSS -% later.\ednote{MK: we may have to experiment with the more powerful uppercasing macro -% from \texttt{mfirstuc.sty} once we internationalize.} -% \begin{macrocode} -\def\current@section@level{document}% -\newcommand\currentsectionlevel{\lowercase\expandafter{\current@section@level}\xspace}% -\newcommand\Currentsectionlevel{\expandafter\MakeUppercase\current@section@level\xspace}% -% \end{macrocode} -% \end{macro} -% -% \begin{environment}{blindomgroup} -% \begin{macrocode} -\newcommand\at@begin@blindomgroup[1]{} -\newenvironment{blindomgroup} -{\advance\section@level by 1\at@begin@blindomgroup\setion@level} -{\advance\section@level by -1} -% \end{macrocode} -% \end{environment} -% -% \begin{macro}{\omgroup@nonum} -% convenience macro: |\omgroup@nonum{|\meta{level}|}{|\meta{title}|}| makes an unnumbered -% sectioning with title \meta{title} at level \meta{level}. -% \begin{macrocode} -\newcommand\omgroup@nonum[2]{% -\ifx\hyper@anchor\@undefined\else\phantomsection\fi% -\addcontentsline{toc}{#1}{#2}\@nameuse{#1}*{#2}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\omgroup@num} -% convenience macro: |\omgroup@nonum{|\meta{level}|}{|\meta{title}|}| makes numbered -% sectioning with title \meta{title} at level \meta{level}. We have to check the |short| -% key was given in the |omgroup| environment and -- if it is use it. But how to do that -% depends on whether the |rdfmeta| package has been loaded. In the end we call -% |\sref@label@id| to enable crossreferencing. -% \begin{macrocode} -\newcommand\omgroup@num[2]{% -\edef\@@ID{\sref@id} -\ifx\omgroup@short\@empty% no short title -\@nameuse{#1}{#2}% -\else% we have a short title -\@ifundefined{rdfmeta@sectioning}% - {\@nameuse{#1}[\omgroup@short]{#2}}% - {\@nameuse{rdfmeta@#1@old}[\omgroup@short]{#2}}% -\fi% -\sref@label@id@arg{\omdoc@sect@name~\@nameuse{the#1}}\@@ID} -% \end{macrocode} -% \end{macro} -% -% \begin{environment}{omgroup} -% \begin{macrocode} -\def\@true{true} -\def\@false{false} -\srefaddidkey{omgroup} -\addmetakey{omgroup}{date} -\addmetakey{omgroup}{creators} -\addmetakey{omgroup}{contributors} -\addmetakey{omgroup}{srccite} -\addmetakey{omgroup}{type} -\addmetakey*{omgroup}{short} -\addmetakey*{omgroup}{display} -\addmetakey[false]{omgroup}{loadmodules}[true] -% \end{macrocode} -% we define a switch for numbering lines and a hook for the beginning of groups: The -% \DescribeMacro{\at@begin@omgroup}|\at@begin@omgroup| macro allows customization. It is -% run at the beginning of the |omgroup|, i.e. after the section heading. -% \begin{macrocode} -\newif\if@@num\@@numtrue -\newif\if@mainmatter\@mainmattertrue -\newcommand\at@begin@omgroup[3][]{} -% \end{macrocode} -% -% Then we define a helper macro that takes care of the sectioning magic. It comes with its -% own key/value interface for customization. -% -% \begin{macrocode} -\addmetakey{omdoc@sect}{name} -\addmetakey[false]{omdoc@sect}{clear}[true] -\addmetakey{omdoc@sect}{ref} -\addmetakey[false]{omdoc@sect}{num}[true] -\newcommand\omdoc@sectioning[3][]{\metasetkeys{omdoc@sect}{#1}% -\ifx\omdoc@sect@clear\@true\cleardoublepage\fi% -\if@@num% numbering not overridden by frontmatter, etc. -\ifx\omdoc@sect@num\@true\omgroup@num{#2}{#3}\else\omgroup@nonum{#2}{#3}\fi% -\def\current@section@level{\omdoc@sect@name}% -\else\omgroup@nonum{#2}{#3}% -\fi}% if@@num -% \end{macrocode} -% and another one, if redefines the |\addtocontentsline| macro of {\LaTeX} to import the -% respective macros. It takes as an argument a list of module names.\ednote{MK: the -% extension sms is hard-coded here, but should not be. This will not work in multilingual -% settings.} -% \begin{macrocode} -\newcommand\omgroup@redefine@addtocontents[1]{% -\edef\@@import{#1}% -\@for\@I:=\@@import\do{% -\edef\@path{\csname module@\@I @path\endcsname}% -\@ifundefined{tf@toc}\relax% - {\protected@write\tf@toc{}{\string\@requiremodules{\@path}{sms}}}} -\ifx\hyper@anchor\@undefined% hyperref.sty loaded? -\def\addcontentsline##1##2##3{% -\addtocontents{##1}{\protect\contentsline{##2}{\string\withusedmodules{#1}{##3}}{\thepage}}} -\else% hyperref.sty not loaded -\def\addcontentsline##1##2##3{% -\addtocontents{##1}{\protect\contentsline{##2}{\string\withusedmodules{#1}{##3}}{\thepage}{\@currentHref}}}% -\fi}% hypreref.sty loaded? -% \end{macrocode} -% now the |omgroup| environment itself. This takes care of the table of contents via the -% helper macro above and then selects the appropriate sectioning command from -% |article.cls|. -% \begin{macrocode} -\newenvironment{omgroup}[2][]% keys, title -{\metasetkeys{omgroup}{#1}\sref@target% -\ifx\omgroup@display\st@flow\@@numfalse\fi -\if@mainmatter\else\@@numfalse\fi -% \end{macrocode} -% If the |loadmodules| key is set on |\begin{omgroup}|, we redefine the |\addcontetsline| -% macro that determines how the sectioning commands below construct the entries for the -% table of contents. -% \begin{macrocode} -\ifx\omgroup@loadmodules\@true% -\omgroup@redefine@addtocontents{\@ifundefined{mod@id}\used@modules% -{\@ifundefined{module@\mod@id @path}{\used@modules}\mod@id}}\fi% -% \end{macrocode} -% now we only need to construct the right sectioning depending on the value of -% |\section@level|. -% \begin{macrocode} -\advance\section@level by 1\relax% -\ifcase\section@level% -\or\omdoc@sectioning[name=Part,clear,num]{part}{#2}% -\or\omdoc@sectioning[name=Chapter,clear,num]{chapter}{#2}% -\or\omdoc@sectioning[name=Section,num]{section}{#2}% -\or\omdoc@sectioning[name=Subsection,num]{subsection}{#2}% -\or\omdoc@sectioning[name=Subsubsection,num]{subsubsection}{#2}% -\or\omdoc@sectioning[name=Paragraph,ref=this paragraph]{paragraph}{#2}% -\or\omdoc@sectioning[name=Subparagraph,ref=this subparagraph]{paragraph}{#2}% -\fi% \ifcase -\at@begin@omgroup[#1]\section@level{#2}}% for customization -{\advance\section@level by -1} -% \end{macrocode} -% \end{environment} -% -% \end{omgroup} -% -% \begin{omgroup}[id=sec:user:docmatter]{Front and Backmatter} -% -% Index markup is provided by the |omtext| package~\cite{Kohlhase:smmtf:ctan}, so in the -% |omdoc| package we only need to supply the corresponding |\printindex| command, if it -% is not already defined -% \begin{macro}{\printindex} -% \begin{macrocode} -\providecommand\printindex{\IfFileExists{\jobname.ind}{\input{\jobname.ind}}{}} -%</package> -% \end{macrocode} -% \end{macro} -% -% \begin{environment}{frontmatter} -% some classes (e.g. |book.cls|) already have |\frontmatter|, |\mainmatter|, and -% |\backmatter| macros. As we want to define |frontmatter| and |backmatter| -% environments, we save their behavior (possibly defining it) in |orig@*matter| macros -% and make them undefined (so that we can define the environments). -% \begin{macrocode} -%<*cls> -\ifcsdef{frontmatter}% to redefine if necessary - {\cslet{orig@frontmatter}{\frontmatter}\cslet{frontmatter}{\relax}} - {\cslet{orig@frontmatter}{\clearpage\@mainmatterfalse\pagenumbering{roman}}} -\ifcsdef{backmatter}% to redefine if necessary - {\cslet{orig@backmatter}{\backmatter}\cslet{backmatter}{\relax}} - {\cslet{orig@backmatter}{\clearpage\@mainmatterfalse\pagenumbering{roman}}} -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{frontmatter} -% now we can define the environments -% \begin{macrocode} -\newenvironment{frontmatter} -{\orig@frontmatter} -{\ifcsdef{mainmatter}{}{\clearpage\@mainmattertrue\pagenumbering{arabic}}} -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{backmatter} -% some classes (e.g. |book.cls|) already have a |\backmatter| macro. We use that -% (possibly defining it). -% \begin{macrocode} -\newenvironment{backmatter} -{\orig@backmatter} -{\ifcsdef{mainmatter}{}{\clearpage\@mainmattertrue\pagenumbering{arabic}}} -% \end{macrocode} -% -% finally, we make sure that page numbering is arabic. -% -% \begin{macrocode} -\pagenumbering{arabic} -%</cls> -% \end{macrocode} -% \end{environment} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:impl:ignore]{Ignoring Inputs} -% \begin{environment}{ignore} -% \begin{macrocode} -%<*package> -\ifomdoc@sty@showignores -\addmetakey{ignore}{type} -\addmetakey{ignore}{comment} -\newenvironment{ignore}[1][] -{\metasetkeys{ignore}{#1}\textless\ignore@type\textgreater\bgroup\itshape} -{\egroup\textless/\ignore@type\textgreater} -\renewenvironment{ignore}{}{}\else\excludecomment{ignore}\fi -% \end{macrocode} -% \end{environment} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:impl:share]{Structure Sharing} -% \ednote{The following is simply copied over from the |latexml| package, which we -% eliminated, we should integrate better.} -% \begin{macrocode} -\providecommand{\lxDocumentID}[1]{}% -\def\LXMID#1#2{\expandafter\gdef\csname xmarg#1\endcsname{#2}\csname xmarg#1\endcsname} -\def\LXMRef#1{\csname xmarg#1\endcsname} -% \end{macrocode} -% -% \begin{macro}{\STRlabel} -% The main macro, it it used to attach a label to some text expansion. Later on, using the -% |\STRcopy| macro, the author can use this label to get the expansion originally assigned. -% \begin{macrocode} -\long\def\STRlabel#1#2{\STRlabeldef{#1}{#2}{#2}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\STRcopy} -% The |\STRcopy| macro is used to call the expansion of a given label. In case the label -% is not defined it will issue a warning.\ednote{MK: we need to do something about the -% ref!} -% \begin{macrocode} -\newcommand\STRcopy[2][]{\expandafter\ifx\csname STR@#2\endcsname\relax -\message{STR warning: reference #2 undefined!} -\else\csname STR@#2\endcsname\fi} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\STRsemantics} -% if we have a presentation form and a semantic form, then we can use -% \begin{macrocode} -\newcommand\STRsemantics[3][]{#2\def\@test{#1}\ifx\@test\@empty\STRlabeldef{#1}{#2}\fi} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\STRlabeldef} -% This is the macro that does the actual labeling. Is it called inside |\STRlabel| -% \begin{macrocode} -\def\STRlabeldef#1{\expandafter\gdef\csname STR@#1\endcsname} -% \end{macrocode} -% \end{macro} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:impl:gvars]{Global Variables} -% -% \begin{macro}{\setSGvar} -% set a global variable -% \begin{macrocode} -\newcommand\setSGvar[1]{\@namedef{sTeX@Gvar@#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\useSGvar} -% use a global variable -% \begin{macrocode} -\newcommand\useSGvar[1]{\@nameuse{sTeX@Gvar@#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\ifSGvar} -% set a global variable -% \begin{macrocode} -\newcommand\ifSGvar[3]{\def\@test{#2}\expandafter\ifx\csname sTeX@Gvar@#1\endcsname\@test #3\fi} -% \end{macrocode} -% \end{macro} -% -% \end{omgroup} -% -% \begin{omgroup}[id=sec:impl:colors]{Colors} -% -% \begin{environment}{blue, red, green, magenta} -% We will use the following abbreviations for colors from |color.sty| -% \begin{macrocode} -\def\black#1{\textcolor{black}{#1}} -\def\gray#1{\textcolor{gray}{#1}} -\def\blue#1{\textcolor{blue}{#1}} -\def\red#1{\textcolor{red}{#1}} -\def\green#1{\textcolor{green}{#1}} -\def\cyan#1{\textcolor{cyan}{#1}} -\def\magenta#1{\textcolor{magenta}{#1}} -\def\brown#1{\textcolor{brown}{#1}} -\def\yellow#1{\textcolor{yellow}{#1}} -\def\orange#1{\textcolor{orange}{#1}} -%</package> -% \end{macrocode} -% \end{environment} -% \end{omgroup} -% \end{omgroup} -% \Finale -\endinput -% \iffalse -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: -% \fi -% LocalWords: GPL structuresharing STR omdoc dtx stex CPERL LoadClass url dc filedate om -% LocalWords: RequirePackage RegisterNamespace namespace xsl DocType ltxml dtd DAG hline -% LocalWords: ltx DefEnvironment beforeDigest AssignValue inPreamble getGullet rangle -% LocalWords: afterDigest keyval omgroup DefKeyVal Semiverbatim KeyVal srcf frontmatter -% LocalWords: OptionalKeyVals DefParameterType IfBeginFollows skipSpaces CMP rangle xdef -% LocalWords: ifNext DefMacro needwrapper unlist DefConstructor omtext bgroup showmods -% LocalWords: useCMPItemizations RefStepItemCounter egroup beginItemize li di pathsuris -% LocalWords: beforeDigestEnd dt autoclose ul ol dl env showignores srcref Cwd rdfmeta -% LocalWords: afterOpen LastSeenCMP autoClose DefCMPEnvironment proto ToString st@flow -% LocalWords: addAttribute nlex nlcex omdocColorMacro args tok MergeFont qw setion@level -% LocalWords: TokenizeInternal toString isMath foreach maybeCloseElement id'd Backmatter -% LocalWords: autoOpen minipage footnotesize scriptsize numberIt whatsit href endinput -% LocalWords: getAttribute setAttribute OMDoc RelaxNGSchema noindex xml lec KeyVals -% LocalWords: Subsubsection useDefaultItemizations refundefinedtrue sblockquote defindex -% LocalWords: DefCMPConstructor sinlinequote idx idt ide idp emph extrefs sref Tokenize -% LocalWords: flushleft flushright DeclareOption PassOptions undef cls iffalse noauxreq -% LocalWords: ProcessOptions subparagraph ignoresfalse ignorestrue texttt ttin behavior -% LocalWords: texttt latexml fileversion maketitle newpage tableofcontents cwd srccite -% LocalWords: newpage ednote ctancite dmt03 smms inlinedef STRlabel STRcopy loadmodules -% LocalWords: STRlabel STRsemantics STRsemantics textcolor printbibliography loadmodules -% LocalWords: textsf langle textsf langle respetively orig renewcommand cdir capitalized -% LocalWords: baseuri baseuri baselocal baselocal SOURCEFILE cooluri newif ifx tf@toc -% LocalWords: SOURCEBASE chapterfalse partfalse newcount ifshow chaptertrue initialize -% LocalWords: parttrue srefaddidkey newenvironment textbf compactenum showmeta tf@toc -% LocalWords: noindent noindent ignorespaces ifnum thepart thechapter regexp color.sty -% LocalWords: thesection thesubsection thesubsubsection needswrapper itshape xmarg xmarg -% LocalWords: textgreater renewenvironment excludecomment STRlabeldef csname Section,num -% LocalWords: expandafter endcsname xref newcommand gdef doctex metakeys Hacky arabic -% LocalWords: metasetkeys addmetakey printindex providecommand jobname.ind importmodules -% LocalWords: jobname.ind tocdepth hateq ensuremath xspace hatequiv equiv NeedsTeXFormat -% LocalWords: textleadsto leadsto etoolbox blindomgroup blindomgroup docstruct setSGvar -% LocalWords: compactitem exfig vspace currentsectionlevel currentsectionlevel setSGvar -% LocalWords: ldots URLBASE ifclass bookfalse booktrue currentsetionlevel thedocument@ID -% LocalWords: nonum phantomsection nameuse numtrue numfalse contentsline unnum vname -% LocalWords: thepage hypreref.sty ifcase cleardoublepage frontmatterfalse customization -% LocalWords: frontmattertrue pagenumbering setcounter hyperref.sty addcontetsline ctext -% LocalWords: mfirstuc.sty internationalize documentkeys withusedmodules Part,clear,num - -% \endinput -% Local Variables: -% mode: doctex -% TeX-master: t -% End: -% LocalWords: crossreferencing Chapter,clear,num Subsection,num Subsubsection,num cslet -% LocalWords: Paragraph,ref Subparagraph,ref useSGvar useSGvar ifSGvar ifSGvar topsect -% LocalWords: sTeX@Gvar kvoptions omdoc@cls,prefix book,topsect xappto omdoc@sty,prefix -% LocalWords: ifdefstring ifcsdef cslet diff --git a/macros/latex/contrib/stex/sty/omdoc/omdoc.ins b/macros/latex/contrib/stex/sty/omdoc/omdoc.ins deleted file mode 100644 index 74a42175af..0000000000 --- a/macros/latex/contrib/stex/sty/omdoc/omdoc.ins +++ /dev/null @@ -1,31 +0,0 @@ -%% -%% This file generates files required to use the ed package. -%% At your command prompt write -%% -%% latex omdoc.ins -%% -%% Copyright(c) 2005 Michael Kohlhase -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{omdoc.sty}{\from{omdoc.dtx}{package}}} -\generate{\file{omdoc.cls}{\from{omdoc.dtx}{cls}}} - -\Msg{*} -\Msg{* You probably need to move the generated style files into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/omdoc/omdoc.pdf b/macros/latex/contrib/stex/sty/omdoc/omdoc.pdf Binary files differdeleted file mode 100644 index d36cc256ba..0000000000 --- a/macros/latex/contrib/stex/sty/omdoc/omdoc.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/omtext/README b/macros/latex/contrib/stex/sty/omtext/README deleted file mode 100644 index 4493a03f38..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/omtext/omtext.dtx b/macros/latex/contrib/stex/sty/omtext/omtext.dtx deleted file mode 100644 index c5cc4c0c20..0000000000 --- a/macros/latex/contrib/stex/sty/omtext/omtext.dtx +++ /dev/null @@ -1,707 +0,0 @@ -% \iffalse meta-comment -% A LaTeX Class and Package for OMDoc Text Fragments -% Copyright (c) 2010 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<package>\ProvidesPackage{omtext}[2019/03/20 v1.1 OMDoc Text Fragments] -% -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage{url,array,float,amsfonts} -\usepackage{omtext,omdoc} -\usepackage{graphicx} -\usepackage[show]{ed} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{stex-logo} -\usepackage{ctangit} -\usepackage{hyperref} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\def\githubissue#1{\cite{sTeX:github:on}, \hyperlink{https://github.com/KWARC/sTeX/issues/#1}{issue #1}} -\begin{document} -\RecordChanges -\DocInput{omtext.dtx} -\end{document} -%</driver> -% \fi -% -%\CheckSum{411} -% -% \changes{v0.4}{2008/07/22}{added index markup} -% \changes{v0.4}{2008/09/29}{augmenting the index macros with optional values} -% \changes{v0.6}{2009/07/08}{removing {\texttt{ttin}} {\texttt{{emin}}} and friends, -% they were almost never used.} -% \changes{v0.6}{2009/07/08}{renmanig {\texttt{myindex}} to {\texttt{omdoc\@ index}}, -% {\texttt{twin}} to {\texttt{\@ twin}}, and {\texttt{atwin}} to {\texttt{\@ atwin}} to -% make them packge-local} -% \changes{v0.7}{2010/02/11}{changing blockquote to sblockquote and inlinequote similarly} -% \changes{v0.9}{2010/05/25}{separated out from \texttt{omdoc.dtx}} -% \changes{v1.0}{2010/06/18}{fixing typos} -% \changes{v1.1}{2015/10/13}{changing \texttt{\textbackslash textleadsto} to -% \texttt{\textbackslash ergo} and defining inverse \texttt{\textbackslash ogre}} -% \changes{v1.1}{2015/11/04}{moving MathHub support out to separate package} -% -% \GetFileInfo{omtext.sty} -% -% \MakeShortVerb{\|} -% -% \def\omdoc{OMDoc} -% \def\latexml{{\LaTeX}ML} -% \title{\texttt{omtext}: Semantic Markup for Mathematical Text Fragments in {\LaTeX}\thanks{Version {\fileversion} (last revised -% {\filedate})}} -% \author{Michael Kohlhase\\ -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}} -% \maketitle -% -% \begin{abstract} -% The |omtext| package is 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 {\TeX/\LaTeX} into a document format for mathematical -% knowledge management (MKM). -% -% This package supplies an infrastructure for writing {\omdoc} text fragments in -% {\LaTeX}. -% \end{abstract} -% -%\newpage\tableofcontents\newpage -% -%\begin{omgroup}[id=sec:STR]{Introduction} -% -% The |omtext| package supplies macros and environment that allow to mark up mathematical -% texts in {\sTeX}, a version of {\TeX/\LaTeX} that allows to markup {\TeX/\LaTeX} -% documents semantically without leaving the document format, essentially turning -% {\TeX/\LaTeX} into a document format for mathematical knowledge management (MKM). The -% package supports direct translation to the {\omdoc} format~\cite{Kohlhase:OMDoc1.2} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:user]{The User Interface} -% -% \begin{omgroup}[id=sec:user:options]{Package Options} -% -% The |omtext| package takes a single option: \DescribeMacro{showmeta}|showmeta|. If -% this is set, then the metadata keys are shown (see~\cite{Kohlhase:metakeys:ctan} for -% details and customization options). -% \end{omgroup} -% -% \begin{omgroup}[id=sec:user:omtext]{Mathematical Text} -% -% The \DescribeEnv{omtext}|omtext| environment is used for any text fragment that has a -% contribution to a text that needs to be marked up. It can have a title, which can be -% specified via the \DescribeMacro{title=}|title| key. Often it is also helpful to -% annotate the \DescribeMacro{type=}|type| key. The standard relations from rhetorical -% structure theory |abstract|, |introduction|, |conclusion|, |thesis|, |comment|, -% |antithesis|, |elaboration|, |motivation|, |evidence|, |transition|, | note|, |annote| -% are recommended as values. Note that some of them are unary relations like -% |introduction|, which calls for a target. In this case, a target using the -% \DescribeMacro{for=}|for| key should be specified. The |transition| relation is -% special in that it is binary (a ``transition between two statements''), so -% additionally, a source should be specified using the \DescribeMacro{from=}|from| key. -% -% Note that the values of the |title| and |type| keys are often displayed in the -% text. This can be turned off by setting the \DescribeMacro{display=}|display| key to -% the value |flow|. Sometimes we want to specify that a text is a continuation of -% another, this can be done by giving the identifier of this in the -% \DescribeMacro{continues=}|continues| key. -% -% Finally, there is a set of keys that pertain to the mathematical formulae in the -% text. The \DescribeMacro{functions=}|functions| key allows to specify a list of -% identifiers that are to be interpreted as functions in the generate content -% markup. The \DescribeMacro{theory=}|theory| specifies a module -% (see~\cite{KohAmb:smmssl:svn}) that is to be pre-loaded in this one\ednote{this is not -% implemented yet.} Finally, \DescribeMacro{verbalizes=}|verbalizes| specifies a (more) -% formal statement (see~\cite{Kohlhase:smms:svn}) that this text verbalizes or -% paraphrases.\ednote{MK:specify the form of the reference.} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:user:phrase]{Phrase-Level Markup} -% -% \DescribeMacro{\phrase} The |phrase| macro allows to mark up phrases with semantic -% information. It takes an optional |KeyVal| argument with the keys -% \DescribeMacro{verbalizes=}|verbalizes| and \DescribeMacro{type=}|type| as above and -% \DescribeMacro{style}|style,| \DescribeMacro{class}|class|, -% \DescribeMacro{index}|index| that are disregarded in the {\LaTeX}, but copied into the -% generated content markup. -% -% We use the \DescribeMacro{\nlex}|\nlex{|\meta{phrase}|}| for marking up phrases that -% serve as natural language examples and \DescribeMacro{\nlcex}|\nlcex{|\meta{phrase}|}| -% for counter-examples (utterances that are not acceptable for some reason). In natural -% language examples, we sometimes use ``co-reference markers'' to specify the -% resolution of anaphora and the like. We use the -% \DescribeMacro{\coreft}|\coreft{|\meta{phrase}|}{|\meta{mark}|}| to mark up the -% ``target'' of a co-reference and analogously \DescribeMacro{\corefs}|\corefs| for -% coreference source -- e.g. for an anaphoric reference. The usage is the following: -% \begin{verbatim} -% \nlex{If \coreft{a farmer}1 owns \coreft{a donkey}2, -% \corefs{he}2 beats \corefs{it}2.} -% \end{verbatim} -% is formatted to -% \begin{quote} -% \nlex{If \coreft{a farmer}1 owns \coreft{a donkey}2, \corefs{he}2 beats \corefs{it}2.} -% \end{quote} -% -% \DescribeMacro{\sinlinequote} The |sinlinequote| macro allows to mark up quotes inline -% and attribute them. The quote itself is given as the argument, possibly preceded by -% the a specification of the source in a an optional argument. For instance, we would -% quote Hamlet with -% \begin{verbatim} -% \sinlinequote[Hamlet, \cite{Shak:1603:Hamlet}]{To be or not to be} -% \end{verbatim} -% which would appear as \sinlinequote[Hamlet, (Shakespeare 1603)]{To be or not to be} in -% the text. The style in which inline quotations appear in the text can be adapted by -% specializing the macros \DescribeMacro{\@sinlinequote}|\@sinlinequote| --- for -% quotations without source and \DescribeMacro{\@@sinlinequote}|\@@sinlinequote| --- for -% quotations with source. -% \end{omgroup} -% -% \begin{omgroup}[id=sec:user:decl]{Declarations (under development)} -% -% Declarations are special phrases that carry a lot of meaning in mathematics: they -% introduce and further specify the indentifiers available in formulae. They are marked -% up via the \DescribeMacro{\vdec}|\vdec| macro. Inside a declaration we can use the -% \DescribeMacro{\vids}|\vids| macro to mark up the variable names and -% \DescribeMacro{\vrest}|\vrest| to mark up the restrictions. In the simplest case we -% have a single variable as in ``\ldots for all $u$'', which we mark up as. -% \begin{verbatim} -% ... for all \vdec{\vids[u]{$u$}}. -% \end{verbatim} -% A more complex example has multiple identifiers embedded in a restriction, as in ``Let -% $x,y,z\in\mathbb{R}$, such that $x+2y=z$, then \ldots'', which we mark up as -% \begin{verbatim} -% Let \vdec[x,y,z]{\vcond$\minset{x,y,z}\Reals$}, -% such that \vrest{$x+2y=z$}}, then \ldots'' -% \end{verbatim} -% \ednote{explain and make better examples}\ednote{talk with Frederic about this see -% what other examples there are.}\ednote{how do we identify the variables in complex -% restriction patterns. maybe with LMXref, which we should reinstate for this.} -% \ednote{document strucdec and impdec} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:user:block]{Block-Level Markup} -% -% \DescribeEnv{sblockquote} The |sblockquote| environment is the big brother of the -% |\sinlinequote| macro. It also takes an optional argument to specify the source. Here -% the four internal macros \DescribeMacro{\begin@sblockquote}|\begin@sblockquote| to -% \DescribeMacro{\end@@sblockquote}|\end@@sblockquote| are used for styling and can be -% adapted by package integrators. Here a quote of Hamlet would marked up as -% \begin{verbatim} -% \begin{sblockquote}[Hamlet, \cite{Shak:1603:Hamlet}]\obeylines -% To be, or not to be: that is the question: -% Whether 'tis nobler in the mind to suffer -% \end{sblockquote} -% \end{verbatim} -% and would render as -% \begin{sblockquote}[Hamlet, (Shakespeare 1603)]\obeylines -% To be, or not to be: that is the question: -% Whether 'tis nobler in the mind to suffer -% \end{sblockquote} -% -% \DescribeMacro{\lec}The |\lec| macro takes one argument and sets it as a comment at the -% end of the line, making sure that if the content is too long it is pushed into a new -% line. We use it internally for placing the of source of the |sblockquote| environment -% above. The actual appearance of the line end comment is determined by the -% \DescribeMacro{\@@lec}|\@@lec| macro, which can be customized in the document class. -% \end{omgroup} -% -% \begin{omgroup}[id=sec:user:index]{Index Markup} -% -% The |omtext| package provides some extensions for the well-known indexing macros of -% {\LaTeX}. The main reason for introducing these macros is that index markup in -% {\omdoc} wraps the indexed terms rather than just marking the spot for -% cross-referencing. Furthermore the index commands only indexes words unless -% the\DescribeMacro{noindex} |noindex| option is set in the |\usepackage|. The |omtext| -% package and class make the usual |\index| macro undefined\ednote{implement this and -% issue the respective error message}. -% -% The \DescribeMacro{\indi}|\indi| macro renders a word and marks it for the -% index. Sometimes, we want to index a slightly different form of the word, e.g. for -% non-standard plurals: while |\indi{word}s| works fine, we cannot use this for the -% word ``datum'', which has the plural ``data''. For this we have the macro -% \DescribeMacro{\aindi}|\aindi|, which takes another argument for the displayed text, -% allowing us to use |\aindi{data}{datum}|, which prints ``data'' but puts ``datum'' -% into the index. -% -% The second set of macros adds an infrastructure for multi-word compounds. Take for -% instance the compound ``OMDoc document'', which we usually want to add into the -% index under ``OMDoc'' and -% ``document''. \DescribeMacro{\indii}|\indii{OMDoc}{document}| is a variant of -% |\indi| that will do just this. Again, we have a version that prints a variant: This -% is useful for situations like this the one in Figure~\ref{fig:index-markup}: -% \begin{exfig} -% \begin{verbatim} -% We call group \aindii{Abelian}{Abelian}{group}, iff \ldots -% \end{verbatim} -% \vspace*{-1em}will result in the following -% \begin{quote} -% We call group \aindii{Abelian}{Abelian}{group}, iff \ldots -% \end{quote} -% and put ``Abelian Group'' into the index. -% \caption{Index markup}\label{fig:index-markup} -% \end{exfig} -% -% Analogously, there are variants for tree/four-word compounds: -% \DescribeMacro{\indiii}|\indiii|, \DescribeMacro{\aindiii}|\aindiii|, -% \DescribeMacro{\indiv}|\indiv|, and \DescribeMacro{\aindiv}|\indiv|. For instance for -% ``wonderful OMDoc -% document''. \DescribeMacro{\indiii}|\atwin{wonderful}{OMdoc}{document}| will make the -% necessary index entries under ``wonderful'' and ``document''. -% -% Finally, there are variants \DescribeMacro{\Indi*}|\Indi|, |\Indii|, |\Indiii|, and -% |\Indiv| that print the capitalized version of the word complex, and |\indis|, -% |\indiis|, |\indiiis|, and |\indivs| that add a plurals, and ultimately -% \DescribeMacro{\Indi*}|\Indis|, |\Indiis|, |\indiiis|, and |\Indivs| that print the -% capitalized version of the plural. -% -% All index macros take an optional first keyword argument: If the |loadmodules| key is -% given, we import the module we are in, otherwise all the currently imported modules. We -% do not have to require the module files, since the index is a the end of the -% document. If the |at| key is given, then we use that for sorting in the index. -% \end{omgroup} -% -% \begin{omgroup}[id=sec:user:misc]{Miscellaneous} -% -% We supply some text-level shortcuts for mathematical formulations, for instance \hateq -% for ``this corresponds to'' or \ergo for ``therefore''. They are semantic in the sense -% that they are used as special words -- not part of formulae, even though they look -% like mathematical symbols. The following table gives the full set. -% \begin{center} -% \DescribeMacro{\hateq}\DescribeMacro {\hatequiv} -% \DescribeMacro {\ergo}\DescribeMacro{\ogre} -% \begin{tabular}{|l|l|l|}\hline -% macro & pres. & stands for \\\hline -% |\hateq| & \hateq& this corresponds to\\ -% |\hatequiv| & \hatequiv & this statement corresponds to\\ -% |\ergo| &\ergo & therefore\\ -% |\ogre| &\ogre & because of \\\hline -% \end{tabular} -% \end{center} -% \end{omgroup} -% \end{omgroup} -% -% \begin{omgroup}{Limitations}\label{sec:limitations} -% -% In this section we document known limitations. If you want to help alleviate them, -% please feel free to contact the package author. Some of them are currently discussed in -% the \sTeX GitHub repository~\cite{sTeX:github:on}. -% \begin{enumerate} -% \item none reported yet -% \end{enumerate} -% \end{omgroup} -% -% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography}\newpage -% -% \begin{omgroup}[id=sec:impl]{Implementation} -% -% \begin{omgroup}[id=sec:impl:options]{Package Options} -% -% We declare some switches which will modify the behavior according to the package -% options. Generally, an option |xxx| will just set the appropriate switches to true -% (otherwise they stay false).\ednote{need an implementation for {\latexml}} -% -% \begin{macrocode} -%<*package> -\newif\if@omtext@mh@\@omtext@mh@false -\DeclareOption{mh}{\@omtext@mh@true -\PassOptionsToPackage{\CurrentOption}{modules}} -\newif\ifindex\indextrue -\DeclareOption{noindex}{\indexfalse} -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{modules}} -\ProcessOptions -\ifindex\makeindex\fi -% \end{macrocode} -% -% \begin{macrocode} -\if@omtext@mh@\RequirePackage{omtext-mh}\fi -\RequirePackage{xspace} -\RequirePackage{modules} -\RequirePackage{comment} -\RequirePackage{mdframed} -\RequirePackage{latexsym} -% \end{macrocode} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:impl:mtxt]{Mathematical Text} -% -% We define the actions that are undertaken, when the keys are encountered. The first -% set just records metadata; this is very simple via the |\addmetakey| -% infrastructure~\ctancite{Kohlhase:metakeys}. Note that we allow math in the |title| -% field, so we do not declare it to be |Semiverbatim| (indeed not at all, which allows -% it by default). -% -% \begin{macrocode} -\srefaddidkey{omtext} -\addmetakey[]{omtext}{functions} -\addmetakey*{omtext}{display} -\addmetakey{omtext}{for} -\addmetakey{omtext}{from} -\addmetakey{omtext}{type} -\addmetakey*{omtext}{title} -\addmetakey*{omtext}{start} -\addmetakey{omtext}{theory} -\addmetakey{omtext}{continues} -\addmetakey{omtext}{verbalizes} -\addmetakey{omtext}{subject} -% \end{macrocode} -% The next keys handle module loading (see~\ctancite{KohAmb:smmssl}). -% \begin{macrocode} -% \ednote{MK: need to implement these in LaTeXML, I wonder whether there is a general -% mechanism like numberit.}\ednote{MK: this needs to be rethought in the light of -% |\usemodule|. It is probably obsolete. Is this used? Is this documented?} -\define@key{omtext}{require}{\requiremodules{#1}{sms}} -\define@key{omtext}{module}{\message{module: #1}\importmodule{#1}\def\omtext@theory{#1}} -% \end{macrocode} -% -% \begin{macro}{\st@flow} -% We define this macro, so that we can test whether the |display| key has the value |flow| -% \begin{macrocode} -\def\st@flow{flow} -% \end{macrocode} -% \end{macro} -% -% We define a switch that allows us to see whether we are inside an |omtext| environment -% or a statement. It will be used to give better error messages for inline statements. -% -% \begin{macrocode} -\newif\if@in@omtext\@in@omtextfalse -% \end{macrocode} -% -% \begin{environment}{omtext} -% The |omtext| environment is different, it does not have a keyword that marks -% it. Instead, it can have a title, which is used in a similar way. We redefine the -% |\lec| macro so the trailing |\par| does not get into the way. -% \begin{macrocode} -\def\omtext@pre@skip{\smallskip} -\def\omtext@post@skip{} -\providecommand{\stDMemph}[1]{\textbf{#1}} -\newenvironment{omtext}[1][]{\@in@omtexttrue% -\bgroup\metasetkeys{omtext}{#1}\sref@label@id{this paragraph}% -\def\lec##1{\@lec{##1}}% -\ifx\omtext@display\st@flow\else\omtext@pre@skip\par\noindent% -\ifx\omtext@title\@empty% -\ifx\omtext@start\@empty\else\stDMemph{\omtext@start}\xspace\fi% -\else\stDMemph{\omtext@title}:\xspace% -\ifx\omtext@start\@empty\else\omtext@start\xspace\fi% -\fi% omtext@title empty -\fi% omtext@display=flow -\ignorespaces} -{\egroup\omtext@post@skip\@in@omtextfalse} -% \end{macrocode} -% \end{environment} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:impl:phrase]{Phrase-level Markup} -% -% \begin{macro}{\phrase} -% For the moment, we do disregard the most of the keys -% \begin{macrocode} -\srefaddidkey{phrase} -\addmetakey{phrase}{style} -\addmetakey{phrase}{class} -\addmetakey{phrase}{index} -\addmetakey{phrase}{verbalizes} -\addmetakey{phrase}{type} -\addmetakey{phrase}{only} -\newcommand\phrase[2][]{\metasetkeys{phrase}{#1}% -\ifx\prhase@only\@empty\only<\phrase@only>{#2}\else #2\fi} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\coref*} -% \begin{macrocode} -\providecommand\textsubscript[1]{\ensuremath{_{#1}}} -\newcommand\corefs[2]{#1\textsubscript{#2}} -\newcommand\coreft[2]{#1\textsuperscript{#2}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\n*lex} -% \begin{macrocode} -\newcommand\nlex[1]{\green{\sl{#1}}} -\newcommand\nlcex[1]{*\green{\sl{#1}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{sinlinequote} -% \begin{macrocode} -\def\@sinlinequote#1{``{\sl{#1}}''} -\def\@@sinlinequote#1#2{\@sinlinequote{#2}~#1} -\newcommand\sinlinequote[2][] -{\def\@opt{#1}\ifx\@opt\@empty\@sinlinequote{#2}\else\@@sinlinequote\@opt{#2}\fi} -% \end{macrocode} -% \end{macro} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:user:decl]{Declarations (under development)} -% -% The declaration macros are still under development (i.e. the macros) are still under -% development and may change at any time. Currently they are completely empty. -% -% \begin{macrocode} -\newcommand\vdec[2][]{#2} -\newcommand\vrest[2][]{#2} -\newcommand\vcond[2][]{#2} -% \end{macrocode} -% -% \begin{macro}{\strucdec} -% \ednote{document above} -% \begin{macrocode} -\newcommand\strucdec[2][]{#2} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\impdec} -% \ednote{document above} -% \begin{macrocode} -\newcommand\impdec[2][]{#2} -% \end{macrocode} -% \end{macro} -% -% \end{omgroup} -% -% \begin{omgroup}[id=sec:impl:block]{Block-Level Markup} -% -% \begin{environment}{sblockquote} -% \begin{macrocode} -\def\begin@sblockquote{\begin{quote}\sl} -\def\end@sblockquote{\end{quote}} -\def\begin@@sblockquote#1{\begin@sblockquote} -\def\end@@sblockquote#1{\def\@@lec##1{\textrm{##1}}\@lec{#1}\end@sblockquote} -\newenvironment{sblockquote}[1][] - {\def\@opt{#1}\ifx\@opt\@empty\begin@sblockquote\else\begin@@sblockquote\@opt\fi} - {\ifx\@opt\@empty\end@sblockquote\else\end@@sblockquote\@opt\fi} -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{sboxquote} -% \begin{macrocode} -\newenvironment{sboxquote}[1][] -{\def\@@src{#1}\begin{mdframed}[leftmargin=.5cm,rightmargin=.5cm]} -{\@lec{\textrm\@@src}\end{mdframed}} -% \end{macrocode} -% \end{environment} -% -% The line end comment macro makes sure that it will not be forced on the next line unless -% necessary. -% \begin{macro}{\lec} -% The actual appearance of the line end comment is determined by the |\@@lec| macro, -% which can be customized in the document class. The basic one here is provided so that -% it is not missing. -% \begin{macrocode} -\providecommand{\@@lec}[1]{(#1)} -\def\@lec#1{\strut\hfil\strut\null\nobreak\hfill\@@lec{#1}} -\def\lec#1{\@lec{#1}\par} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\my*graphics} -% We set up a special treatment for including graphics to respect the intended {\omdoc} -% document structure. The main work is done in the transformation stylesheet though. -% \begin{macrocode} -\newcommand\mygraphics[2][]{\includegraphics[#1]{#2}} -\newcommand\mycgraphics[2][]{\begin{center}\mygraphics[#1]{#2}\end{center}} -\newcommand\mybgraphics[2][]{\fbox{\mygraphics[#1]{#2}}} -\newcommand\mycbgraphics[2][]{\begin{center}\fbox{\mygraphics[#1]{#2}}\end{center}} -% \end{macrocode} -% \end{macro} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:impl:index]{Index Markup} -% -% \begin{macro}{\omdoc@index*} -% these are the main internal indexing commands -- dividing them into four macros is awful, -% but I did not get list processing running. It makes sure that the modules necessary -% for interpreting the math in the index entries are loaded. If the |loadmodules| key is -% given, we import the module we are in otherwise all the currently imported modules. We -% do not have to require the module files, since the index is a the end of the -% document. If the |at| key is given, then we use that for sorting in the index. -% \begin{macrocode} -\addmetakey{omdoc@index}{at} -\addmetakey[false]{omdoc@index}{loadmodules}[true] -\newcommand\omdoc@indexi[2][]{\ifindex% -\metasetkeys{omdoc@index}{#1}% -\@bsphack\begingroup\@sanitize% -\protected@write\@indexfile{}{\string\indexentry% -{\ifx\omdoc@index@at\@empty\else\omdoc@index@at @\fi% -\ifx\omdoc@index@loadmodules\@true% -\string\withusedmodules{\@ifundefined{mod@id}\used@modules\mod@id}{#2}% -\else #2\fi% loadmodules -}{\thepage}}% -\endgroup\@esphack\fi}%ifindex -\newcommand\omdoc@indexii[3][]{\ifindex% -\metasetkeys{omdoc@index}{#1}% -\@bsphack\begingroup\@sanitize% -\protected@write\@indexfile{}{\string\indexentry% -{\ifx\omdoc@index@at\@empty\else\omdoc@index@at @\fi% -\ifx\omdoc@index@loadmodules\@true% -\string\withusedmodules{\@ifundefined{mod@id}\used@modules\mod@id}{#2}!% -\string\withusedmodules{\@ifundefined{mod@id}\used@modules\mod@id}{#3}% -\else #2!#3\fi% loadmodules -}{\thepage}}% -\endgroup\@esphack\fi}%ifindex -\newcommand\omdoc@indexiii[4][]{\ifindex% -\metasetkeys{omdoc@index}{#1}% -\@bsphack\begingroup\@sanitize% -\protected@write\@indexfile{}{\string\indexentry% -{\ifx\omdoc@index@at\@empty\else\omdoc@index@at @\fi% -\ifx\omdoc@index@loadmodules\@true% -\string\withusedmodules{\@ifundefined{mod@id}\used@modules\mod@id}{#2}!% -\string\withusedmodules{\@ifundefined{mod@id}\used@modules\mod@id}{#3}!% -\string\withusedmodules{\@ifundefined{mod@id}\used@modules\mod@id}{#4}% -\else #2!#3!#4\fi% loadmodules -}{\thepage}}% -\endgroup\@esphack\fi}%ifindex -\newcommand\omdoc@indexiv[5][]{\ifindex% -\metasetkeys{omdoc@index}{#1}% -\@bsphack\begingroup\@sanitize% -\protected@write\@indexfile{}{\string\indexentry% -{\ifx\omdoc@index@at\@empty\else\omdoc@index@at @\fi% -\ifx\omdoc@index@loadmodules\@true% -\string\withusedmodules{\@ifundefined{mod@id}\used@modules\mod@id}{#2}!% -\string\withusedmodules{\@ifundefined{mod@id}\used@modules\mod@id}{#3}!% -\string\withusedmodules{\@ifundefined{mod@id}\used@modules\mod@id}{#4}% -\string\withusedmodules{\@ifundefined{mod@id}\used@modules\mod@id}{#5}% -\else #2!#3!#4!#5\fi% loadmodules -}{\thepage}}% -\endgroup\@esphack\fi}%ifindex -% \end{macrocode} -% \end{macro} -% -% Now, we make two interface macros that make use of this: -% -% \begin{macro}{\*indi*} -% \begin{macrocode} -\newcommand\aindi[3][]{{#2}\omdoc@indexi[#1]{#3}} -\newcommand\indi[2][]{{#2}\omdoc@indexi[#1]{#2}} -\newcommand\indis[2][]{{#2}\omdoc@indexi[#1]{#2s}} -\newcommand\Indi[2][]{{\captitalize{#2}}\omdoc@indexi[#1]{#2}} -\newcommand\Indis[2][]{{\capitalize{#2}}\omdoc@indexi[#1]{#2s}} - -\newcommand\@indii[3][]{\omdoc@indexii[#1]{#2}{#3}\omdoc@indexii[#1]{#3}{#2}} -\newcommand\aindii[4][]{#2\@indii[#1]{#3}{#4}} -\newcommand\indii[3][]{{#2 #3}\@indii[#1]{#2}{#3}} -\newcommand\indiis[3][]{{#2 #3s}\@indii[#1]{#2}{#3}} -\newcommand\Indii[3][]{{\captitalize{#2 #3}}\@indii[#1]{#2}{#3}} -\newcommand\Indiis[3][]{{\capitalize{#2 #3}}\@indii[#1]{#2}{#3}} - -\newcommand\@indiii[4][]{\omdoc@indexiii[#1]{#2}{#3}{#4}\omdoc@indexii[#1]{#3}{#2 (#4)}} -\newcommand\aindiii[5][]{{#2}\@indiii[#1]{#3}{#4}{#5}} -\newcommand\indiii[4][]{{#2 #3 #4}\@indiii[#1]{#2}{#3}{#4}} -\newcommand\indiiis[4][]{{#2 #3 #4s}\@indiii[#1]{#2}{#3}{#4}} -\newcommand\Indiii[4][]{\captitalize{#2 #3 #4}\@indiii[#1]{#2}{#3}{#4}} -\newcommand\Indiiis[4][]{\capitalize{#2 #3 #4s}\@indiii[#1]{#2}{#3}{#4}} - -\newcommand\@indiv[5][]{\omdoc@indexiv[#1]{#2}{#3}{#4}{#5}} -\newcommand\aindiv[6][]{#2\@indiv[#1]{#3}{#4}{#5}{#6}} -\newcommand\indiv[5][]{{#2 #3 #4 #5}\@indiv[#1]{#2}{#3}{#4}{#5}} -\newcommand\indivs[5][]{{#2 #3 #4 #5s}\@indiv[#1]{#2}{#3}{#4}{#5}} -\newcommand\Indiv[5][]{\capitalize{#2 #3 #4 #5s}\@indiv[#1]{#2}{#3}{#4}{#5}} -\newcommand\Indivs[5][]{\capitalize{#2 #3 #4 #5s}\@indiv[#1]{#2}{#3}{#4}{#5}} -% \end{macrocode} -% \end{macro} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:impl:misc]{Miscellaneous} -% Some shortcuts that use math symbols but are not mathematical at all; in particular, -% they should not be translated by {\latexml}. -% \begin{macrocode} -\newcommand\hateq{\ensuremath{\widehat=}\xspace} -\newcommand\hatequiv{\ensuremath{\widehat\equiv}\xspace} -\@ifundefined{ergo}% -{\newcommand\ergo{\ensuremath{\leadsto}\xspace}}% -{\renewcommand\ergo{\ensuremath{\leadsto}\xspace}}% -\newcommand{\reflect@squig}[2]{\reflectbox{$\m@th#1\rightsquigarrow$}}% -\newcommand\ogre{\ensuremath{\mathrel{\mathpalette\reflect@squig\relax}}\xspace}% -\newcommand\notergo{\ensuremath{\not\leadsto}} -\newcommand\notogre{\ensuremath{\not\mathrel{\mathpalette\reflect@squig\relax}}\xspace}% -% \end{macrocode} -% -% \end{omgroup} -% -% \begin{omgroup}{Deprecated Functionality}\label{sec:deprecated} -% -% In this section we centralize old interfaces that are only partially supported any -% more. -% \begin{macro}{\*def*} -% \begin{macrocode} -\newcommand\indextoo[2][]{\indi[#1]{#2}% -\PackageWarning{omtext}{\protect\indextoo\space is deprecated, use \protect\indi\space instead}} -\newcommand\indexalt[2][]{\aindi[#1]{#2}% -\PackageWarning{omtext}{\protect\indextoo\space is deprecated, use \protect\aindi\space instead}} -\newcommand\twintoo[3][]{\indii[#1]{#2}{#3}% -\PackageWarning{omtext}{\protect\twintoo\space is deprecated, use \protect\indii\space instead}} -\newcommand\twinalt[3][]{\aindii[#1]{#2}{#3}% -\PackageWarning{omtext}{\protect\twinalt\space is deprecated, use \protect\aindii\space instead}} -\newcommand\atwintoo[4][]{\indiii[#1]{#2}{#3}{#4}% -\PackageWarning{omtext}{\protect\atwintoo\space is deprecated, use \protect\indiii\space instead}} -\newcommand\atwinalt[4][]{\aindii[#1]{#2}{#3}{#4}% -\PackageWarning{omtext}{\protect\atwinalt\space is deprecated, use \protect\aindiii\space instead}} -%</package> -% \end{macrocode} -% \end{macro} -% \end{omgroup} -% \end{omgroup} -% \Finale -\endinput -% \iffalse -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: -% \fi -% LocalWords: GPL structuresharing STR omdoc dtx stex CPERL LoadClass url dc filedate sl -% LocalWords: RequirePackage RegisterNamespace namespace xsl DocType ltxml dtd annote mh -% LocalWords: ltx DefEnvironment beforeDigest AssignValue inPreamble getGullet indexalt -% LocalWords: afterDigest keyval omgroup DefKeyVal Semiverbatim KeyVal regexp indexalt -% LocalWords: OptionalKeyVals DefParameterType IfBeginFollows skipSpaces CMP rangle rel -% LocalWords: ifNext DefMacro needwrapper unlist DefConstructor omtext bgroup rangle baz -% LocalWords: useCMPItemizations RefStepItemCounter egroup beginItemize li di makeindex -% LocalWords: beforeDigestEnd dt autoclose ul ol dl env showignores srcref def st@flow -% LocalWords: afterOpen LastSeenCMP autoClose DefCMPEnvironment proto ToString KeyVals -% LocalWords: addAttribute nlex nlcex omdocColorMacro args tok MergeFont qw rm XPointer -% LocalWords: TokenizeInternal toString isMath foreach maybeCloseElement id'd endinput -% LocalWords: autoOpen minipage footnotesize scriptsize numberIt whatsit href HorIacJuc -% LocalWords: getAttribute setAttribute OMDoc RelaxNGSchema noindex xml lec sc cscpnrr11 -% LocalWords: Subsubsection useDefaultItemizations refundefinedtrue sblockquote foobar -% LocalWords: DefCMPConstructor sinlinequote idx idt ide idp emph extrefs sref mhrepos -% LocalWords: flushleft flushright DeclareOption PassOptions undef cls iffalse mathhub -% LocalWords: ProcessOptions subparagraph ignoresfalse ignorestrue raisebox tr finalpath -% LocalWords: texorpdfstring latexml texttt fileversion maketitle newpage iff mh-variant -% LocalWords: tableofcontents newpage ednote obeylines usepackage indextoo Cwd coreft -% LocalWords: indextoo twintoo twintoo exfig vspace twinalt ldots ttin emin importmodule -% LocalWords: renmanig myindex atwin atwin packge-local blockquote inlinequote coreft -% LocalWords: atwintoo atwinalt atwinalt printbibliography impl cwd newif ifx mhgraphics -% LocalWords: ifindex indextrue indexfalse srefaddidkey smallskip showmeta importmodules -% LocalWords: providecommand stDMemph textbf newenvironment hfil showmeta NeedsTeXFormat -% LocalWords: noindent ignorespaces newcommand nobreak hfill hbox mygraphics mhcgraphics -% LocalWords: includegraphics mycgraphics mybgraphics fbox adjectivized hspace corefs -% LocalWords: printindex jobname.ind jobname.ind omspace footnotemark thead mhcgraphics -% LocalWords: footnotetext findnodes doctex textsf langle textsf langle funval corefs -% LocalWords: metakeys funsymbs addmetakey metasetkeys startemph textsl textit mdframed -% LocalWords: compactenum ifundefined localname localname xspace ctancite mhcurrentrepos -% LocalWords: KohAmb smmssl requiremodules prhase bsphack begingroup thepage mh-variants -% LocalWords: indexentry endgroup esphack SOURCEFILE baselocal BASELOCAL importmhmodule -% LocalWords: mh@currentrepos mhbgraphics co-rerefence usemodule coref textsubscript -% LocalWords: ensuremath textsuperscript sboxquote leftmargin rightmargin mycbgraphics -% LocalWords: mhcbgraphics textleadsto customization specializing customized behavior -% LocalWords: flexiformal latexsym itemize loadmodules recognize hateq hatequiv equiv -% LocalWords: leadsto renewcommand reflect@squig reflectbox m@th rightsquigarrow -% LocalWords: mathrel mathpalette -% \endinput -% Local Variables: -% mode: doctex -% TeX-master: t -% End: diff --git a/macros/latex/contrib/stex/sty/omtext/omtext.ins b/macros/latex/contrib/stex/sty/omtext/omtext.ins deleted file mode 100644 index 9dafd62b59..0000000000 --- a/macros/latex/contrib/stex/sty/omtext/omtext.ins +++ /dev/null @@ -1,31 +0,0 @@ -%% -%% This file generates files required to use the ed package. -%% At your command prompt write -%% -%% latex omtext.ins -%% -%% Copyright(c) 2008 Michael Kohlhase -%% The development version of this file can be found at http://github.com/KWARC/sTeX -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{omtext.sty}{\from{omtext.dtx}{package}}} - -\Msg{*} -\Msg{* You probably need to move the file omtext.sty into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/omtext/omtext.pdf b/macros/latex/contrib/stex/sty/omtext/omtext.pdf Binary files differdeleted file mode 100644 index 8b7bf843cc..0000000000 --- a/macros/latex/contrib/stex/sty/omtext/omtext.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/presentation/README b/macros/latex/contrib/stex/sty/presentation/README deleted file mode 100644 index a5afc3a06c..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/presentation/presentation.dtx b/macros/latex/contrib/stex/sty/presentation/presentation.dtx deleted file mode 100644 index bc32a499ff..0000000000 --- a/macros/latex/contrib/stex/sty/presentation/presentation.dtx +++ /dev/null @@ -1,1055 +0,0 @@ -% \iffalse meta-comment -% An Infrastructure for Presenting Semantic Macros in sTeX -% Copyright (C) 2004-2007 Michael Kohlhase, all rights reserved -% This file is released under the LaTeX Project Public License (LPPL) -% -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<package>\ProvidesPackage{presentation}[2019/03/20 v1.0 presentation for semantic macros] -% -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage{url,array,float,amstext,alltt} -\usepackage{modules,presentation,stex-logo} -\usepackage[show]{ed} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{ctangit} -\usepackage{hyperref} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\def\githubissue#1{\cite{sTeX:github:on}, \hyperlink{https://github.com/KWARC/sTeX/issues/#1}{issue #1}} -\begin{document} -\RecordChanges -\DocInput{presentation.dtx} -\end{document} -%</driver> -% \fi -% -% \CheckSum{551} -% -% \changes{v0.9}{2005/06/14}{First Version with Documentation} -% \changes{v0.9a}{2005/07/01}{Completed Documentation} -% \changes{v0.9b}{2005/08/06}{Complete functionality and Updated Documentation} -% \changes{v0.9c}{2006/01/13}{more packaging} -% \changes{v0.9d}{2006/10/13}{adding mixfix declarations} -% \changes{v0.9d}{2006/10/13}{dealing with precedences in keyword arguments} -% \changes{v0.9e}{2007/09/03}{fixing argument precedences, adding LaTeXML bindings} -% \changes{v0.9f}{2007/12/09}{adding general elision} -% \changes{v0.9g}{2008/06/17}{getting the LaTeXML right} -% \changes{v0.9h}{2009/02/27}{turning the precedence order around to make this compatible -% with the latest OMDoc, change all precedences $n$ to $1000-n$} -% \changes{v0.9h}{2009/07/30}{adding brackets to the generated notation elements} -% \changes{v0.9h}{2010/06/18}{considering done now} -% \changes{v1.0}{2010/12/27}{adding \texttt{\textbackslash funapp}} -% \changes{v1.0}{2011/01/28}{moving \texttt{\textbackslash funapp} and -% \texttt{\textbackslash vname} (and friends) to new package {\texttt{cmath}}} -% \changes{v1.0}{2012/11/09}{Moving LaTeXML bindings into \texttt{presentation.sty.ltxml} and -% disabling generation} -% \GetFileInfo{presentation.sty} -% -% \MakeShortVerb{\|} -%\def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} -% \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}} -% \title{{\texttt{presentation.sty}}: An Infrastructure for Presenting Semantic -% Macros in {\stex}\thanks{Version {\fileversion} (last revised {\filedate})}} -% \author{Michael Kohlhase -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}\and -% \& Deyan Ginev\\Authorea} -% \date{\today} -% \maketitle -% -% \begin{abstract} -% The |presentation| package 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 {\TeX/\LaTeX} into a document format -% for mathematical knowledge management (MKM). -% -% 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. -% \end{abstract} -% -% \newpage\setcounter{tocdepth}{2}\tableofcontents\newpage -% -%\section{Introduction}\label{sec:presentation} -% -% The |presentation| 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. -% -% {\stex} is a version of {\TeX/\LaTeX} that allows to markup {\TeX/\LaTeX} documents -% semantically without leaving the document format, essentially turning {\TeX/\LaTeX} into -% a document format for mathematical knowledge management (MKM). -% -% The setup for semantic macros described in the {\stex} |modules| package works well for -% simple mathematical functions: we make use of the macro application syntax in {\TeX} to -% express function application. For a simple function called ``foo'', we would just -% declare |\symdef{foo}[1]{foo(#1)}| and have the concise and intuitive syntax |\foo{x}| -% for $foo(x)$. But mathematical notation is much more varied and interesting than just -% this. -% -% \section{The User Interface}\label{sec:user} -% -% In this package we will follow the {\sTeX} approach and assume that there are four basic -% types of mathematical expressions: symbols, variables, applications and -% binders. Presentation of the variables is relatively straightforward, so we will not -% concern ourselves with that. The application of functions in mathematics is mostly -% presented in the form $f(a_1,\ldots,a_n)$, where $f$ is the function and the $a_i$ are -% the arguments. However, many commonly-used functions from this presentational scheme: -% for instance binomial coefficients: $\bigl({n\atop k}\bigr)$, pairs: $\langle -% a,b\rangle$, sets: $\{x\in S\,\vert\, x^2\ne0\}$, or even simple addition: $3+5+7$. Note -% that in all these cases, the presentation is determined by the (functional) head of the -% expression, so we will bind the presentational infrastructure to the operator. -% -% \subsection{Prefix \& Postfix Notations}\label{sec:prepostfix} -% -% The default notation for an object that is obtained by applying a function $f$ to -% arguments $a_1$ to $a_n$ is $f(a_1,\ldots,a_n)$. The \DescribeMacro{\prefix}|\prefix| -% macro allows to specify a prefix presentation for a function (the usual presentation in -% mathematics). Note that it is better to specify |\symdef{uminus}[1]{\prefix{-}{#1}}| -% than just |\symdef{uminus}[1]{-#1}|, since we can specify the bracketing behavior in the -% former (see Section~\ref{sec:elision}). -% -% The \DescribeMacro{\postfix}|\postfix| macro is similar, only that the function is -% presented after the argument as for e.g. the factorial function: $5!$ stands for the -% result of applying the factorial function to the number 5. Note that the function is -% still the first argument to the |\postfix| macro: we would specify the presentation for -% the factorial function with |\symdef{factorial}[1]{\postfix{!}{#1}}|. -% -% |\prefix| and |\postfix| have $n$-ary variants \DescribeMacro{\prefixa}|\prefixa| and -% \DescribeMacro{\postfixa}|\postfixa| that take an arbitrary number of arguments -% (mathematically; syntactically grouped into one {\TeX} argument). These take an extra -% separator argument.\ednote{think of a good example!} -% -% Note that in \stex the |\prefix| and |\postfix| macros should primarily be used in -% |\symdef| declarations. For marking up applications of symbolic functions in text we -% should use the |\symdef|-defined semantic macros direct. For applications of function -% variables we have two options: -% \begin{enumerate} -% \item direct prefix markup of the form |f(x)|, where we have declared the symbol |f| to -% be a function via the |function| key of the enclosing environment --- e.g. |omtext| -% (see~\cite{Kohlhase:smmtf*:svn}). -% \item using the \DescribeMacro{\funapp}|\funapp| macro as in |\funapp{f}{x}|, which -% leads to the same effect and is more general (e.g. for complex function variables, -% such as $f_1^\prime$). Note that the default prefix rendering of the function is -% sufficient here, since we can otherwise make use of a user-defined application -% operator. -% \end{enumerate} -% -% \subsection{Mixfix Notations}\label{sec:mixfix} -% -% For the presentation of more complex operators, we will follow the approach used by the -% Isabelle theorem prover. There, the presentation of an $n$-ary function (i.e. one that -% takes $n$ arguments) is specified as -% \meta{pre}\meta{arg$_0$}\meta{mid$_1$}$\cdots$\meta{mid$_n$}\meta{arg$_n$}\meta{post}, -% where the \meta{arg$_i$} are the arguments and \meta{pre}, \meta{post}, and the -% \meta{mid$_i$} are presentational material. For instance, in infix operators like the -% binary subset operator, \meta{pre} and $\meta{post}$ are empty, and \meta{mid$_1$} is -% $\subseteq$. For the ternary conditional operator in a programming language, we might -% have the presentation pattern -% |if|\meta{arg$_1$}|then|\meta{arg$_2$}|else|\meta{arg$_3$}|fi| that utilizes all -% presentation positions. -% -% \DescribeMacro{\mixfix*}The |presentation| package provides mixfix declaration macros -% |\mixfixi|, |\mixfixii|, and |\mixfixiii| for unary, binary, and ternary functions. This -% covers most of the cases, larger arities would need a different argument -% pattern.\footnote{If you really need larger arities, contact the author!} The call -% pattern of these macros is just the presentation pattern above. In general, the mixfix -% declaration of arity $i$ has $2n+1$ arguments, where the even-numbered ones are for the -% arguments of the functions and the odd-numbered ones are for presentation material. For -% instance, to define a semantic macro for the subset relation and the conditional, we -% would use the markup in Figure~\ref{fig:mixfix}. -% \begin{exfig} -% \begin{verbatim} -% \symdef{sseteq}[2]{\mixfixii{}{#1}{\subseteq}{#2}{}} -% \symdef{sseteq}[2]{\infix\subseteq{#1}{#2}} -% \symdef{ite}[2]{\mixfixiii{{\tt{if}}\;}{#1} -% {\;{\tt{then}}\;}{#2} -% {\;{\tt{else}}\;}{#3}{\;{\tt{fi}}}} -% \end{verbatim} -% \vspace*{-1.5em} -% \begin{center} -% \begin{tabular}{|l|l|}\hline -% source & presentation \\\hline -% |\sseteq{S}T| & $(S\subseteq T)$\\\hline -% |\ite{x<0}{-x}x| & ${\tt{if}}\,x<0\,{\tt{then}}\,-x\,{\tt{else}}\,x\,{\tt{fi}}$\\\hline -% \end{tabular} -% \end{center} -% \caption{Declaration of mixfix operators}\label{fig:mixfix} -% \end{exfig} -% -% For certain common cases, the |presentation| package provides shortcuts for the mixfix -% declarations. For instance, we provide the \DescribeMacro{\infix}|\infix| macro for -% binary operators that are written between their arguments (see -% Figure~\ref{fig:mixfix}).\ednote{really?} -% -% \subsection{\texorpdfstring{$n$}{n}-ary Associative Operators}\label{sec:assoc} -% -% Take for instance the operator for set union: formally, it is a binary function on -% sets that is associative (i.e. $(S_1\cup S_2)\cup S_3=S_1\cup (S_2\cup S_3)$), therefore -% the brackets are often elided, and we write $S_1\cup S_2\cup S_3$ instead (once we have -% proven associativity). Some authors even go so far to introduce set union as a $n$-ary -% operator, i.e. a function that takes an arbitrary (positive) number of arguments. We will -% call such operators {\bf{$n$-ary -% associative}\atwin{n-ary}{associative}{operator}}. -% -% Specifying the presentation\ednote{introduce the notion of presentation above} of -% $n$-ary associative operators in |\symdef| forms is not straightforward, so we provide -% some infrastructure for that. As we cannot predict the number of arguments for $n$-ary -% operators, we have to give them all at once, if we want to maintain our use of {\TeX} -% macro application to specify function application. So a semantic macro for an $n$-ary -% operator will be applied as |\nunion{|\meta{$a_1$}|,|\ldots|,|\meta{$a_n$}|}|, where the -% sequence of $n$ logical arguments \meta{$a_i$} are supplied as one {\TeX} argument which -% contains a comma-separated list. We provide variants of the mixfix declarations -% presented in section~\ref{sec:mixfix} which deal with associative arguments. For -% instance, the variant \DescribeMacro{\mixfixa}|\mixfixa| allows to specify $n$-ary -% associative operators. -% |\mixfixa{|\meta{pre}|}{|\meta{arg}|}{|\meta{post}|}{|\meta{op}|}| specifies a -% presentation, where \meta{arg} is the associative argument and \meta{op} is the -% corresponding operator that is mapped over the argument list; as above, {\meta{pre}}, -% \meta{post}, are prefix and postfix presentational material. For instance, the finite -% set constructor could be constructed as -% \begin{verbatim} -% \newcommand\fset[1]{\mixfixa{\{}{#1}{\}},} -% \end{verbatim} -% -% The \DescribeMacro{\assoc}|\assoc| macro is a convenient abbreviation of a |\mixfixa| -% that can be used in cases, where \meta{pre} and \meta{post} are empty (i.e. in the -% majority of cases). It takes two arguments: the presentation of a binary operator, and a -% comma-separated list of arguments, it replaces the commas in the second argument with -% the operator in the first one. For instance |\assoc\cup{S_1,S_2,S_3}| will be formatted -% to $S_1\cup S_2\cup S_3$. Thus we can use |\def\nunion#1{\assoc\cup{#1}}| or even -% |\def\nunion{\assoc\cup}|, to define the $n$-ary operator for set union in {\TeX}. For -% the definition of a semantic macro in {\stex}, we use the second form, since we are more -% conscious of the right number of arguments and would declare -% |\symdef{nunion}[1]{\assoc\cup{#1}}|.\ednote{think about big operators for ACI -% functions} -% -% The |\mixfixii| macro has variants \DescribeMacro{\mixfixia}|\mixfixia| and -% \DescribeMacro{\mixfixai}|\mixfixai| which allow to make one or two arguments in a -% binary function associative. A use case for the second macro is an nary function type -% operator |\fntype|, which can be defined via -% \begin{verbatim} -% \def\fntype#1#2{\mixfixai{}{#1}\rightarrow{#2}{}\times} -% \end{verbatim} -% \def\fntype#1#2{\mixfixai{}{#1}\rightarrow{#2}{}\times} -% and which will format |\fntype{\alpha,\beta,\gamma}\delta| as -% $\fntype{\alpha,\beta,\gamma}\delta$ -% -% Finally, the |\mixfixiii| macro has the variants |\mixfixaii|, |\mixfixiai|, and -% |\mixfixiia| as above\footnote{If you really need larger arities with associative -% arguments, contact the package author!}. For instance we can use the first variant for -% a typing judgment using -% \begin{verbatim} -% \def\typej#1#2#3{\mixfixaii{}{#1}{\vdash_{\Sigma}}{#2}\colon{#3}{}{,}} -% \end{verbatim} -% \def\typej#1#2#3{\mixfixaii{}{#1}{\vdash_{\Sigma}}{#2}\colon{#3}{}{,}} -% which formats |\typej{\Gamma,[x:\alpha],[y:\beta]}{f(x,y)}{\beta}| as -% \[\typej{\Gamma,[x:\alpha],[y:\beta]}{f(x,y)}{\beta}.\] -% -% \subsection{Precedence-Based Bracket Elision}\label{sec:elision} -% -% In the infrastructure discussed above, we have completely ignored the fact that we use -% brackets to disambiguate the formula structure. The general baseline rule here is that -% we enclose any presented subformula with (round) brackets to mark it as a logical unit. -% If we applied this to the following formula that combines set union and set intersection -% \begin{equation}\label{cupcap} -% |\nunion{\ninters{a,b},\ninters{c,d}}| -% \end{equation} -% this would yield $((a\cap b)\cup (c\cap d))$, and not $a\cap b\cup c\cap d$ as we are -% used to. In mathematics, brackets are elided, whenever the author anticipates that the -% reader can understand the formula without them, and would be overwhelmed with them. To -% achieve this, there are set of common conventions that govern bracket elision --- -% ``$\cap$ binds stronger than $\cup$'' in (\ref{cupcap}). The most common is to assign -% precedences to all operators, and elide brackets, if the {\index*{precedence}} of the -% operator is larger than that of the context it is presented in (or equivalently: we only -% write brackets, if the operator precedence is smaller or equal to the context -% precedence). Note that this is more selective that simply dropping outer brackets which -% would yield $a\cap b\cup c\cap d$ for (\ref{capcup}), where we would have liked $(a\cup -% b)\cap(c\cup d)$ -% \begin{equation}\label{capcup} -% |\ninters{\nunion{a,b},\nunion{c,d}}| -% \end{equation} -% In our example above, we would assign $\cap$ a larger precedence than $\cup$ (and both a -% larger precedence than the initial precedence to avoid outer brackets). To compute the -% presentation of (\ref{capcup}) we start out with the |\ninters|, elide its brackets -% (since the precedence $n$ of $\cup$ is larger than the initial precedence $i$), and set -% the context precedence for the arguments to $n$. When we present the arguments, we -% present the brackets, since the precedence of |nunion| is larger than the context -% precedence $n$. -% -% This algorithm --- which we call {\textbf{precedence-based bracket elision}} --- goes a -% long way towards approximating mathematical practice. Note that full bracket elision in -% mathematical practice is a reader-oriented process, it cannot be fully mechanical, -% e.g. in $(a\cap b\cap c\cap d\cap e\cap f\cap g)\cup h$ we better put the brackets -% around the septary intersection to help the reader even though they could have been -% elided by our algorithm. Therefore, the author has to retain full control\ednote{think -% about how to implement that. We need a way to override precedences locally} over -% bracketing in a bracket elision architecture. Otherwise it would become impossible to -% explain the concept of associativity in $(a\circ b)\circ c =a\circ(b\circ c)$, where we -% need the brackets for this one time on an otherwise associative operation $\circ$. -% -% \begin{figure}[htb] -% \begin{center} -% \begin{tabular}{|l|l|l|}\hline -% Precedence & Operators & Comment\\\hline\hline -% 800 & +,- & unary \\\hline -% 800 & $\hat{}$ & exponentiation \\\hline -% 600 & $*,\land,\cap$ & multiplicative \\\hline -% 500 & $+,-,\lor,\cup$ & additive\\\hline -% 400 & / & fraction \\\hline -% 300 & $=, \ne, \leq, <, >, \geq$ & relation\\\hline -% \end{tabular} -% \end{center}\vspace*{-1em} -% \caption{Common Operator Precedences}\label{fig:precedence} -% \end{figure} -% -% Furthermore, we supply an optional keyval arguments to the mixfix declarations and their -% abbreviations that allow to specify precedences: The key \DescribeMacro{p}|p| key is -% used to specify the {\bf{operator precedence}}, and the keys -% \DescribeMacro{pi}\DescribeMacro{pii}\DescribeMacro{piii}|p|\meta{i} can be used to -% specify the {\bf{argument precedence}s}. The latter will set the precedence level while -% processing the arguments, while the operator precedence invokes brackets, if it is -% smaller than the current precedence level --- which is set by the appropriate argument -% precedence by the dominating operators or the outer precedence. The values of the -% precedence keys can be integers or \DescribeMacro{\iprec}|\iprec| for the infinitely -% large precedence or \DescribeMacro{\niprec}|\niprec| for the infinitely small -% precedence. -% -% If none of the precedences is specified, then the defaults are assumed. The operator -% precedence is set to the default operator precedence, which defaults to 0. The argument -% precedences default to the operator precedence. -% -% Figure~\ref{fig:precedence} gives an overview over commonly used precedences. Note that -% most operators have precedences higher than the default precedence of 0, otherwise the -% brackets would not be elided. For our examples above, we would define -% \begin{verbatim} -% \newcommand\nunion[1]{\assoc[p=500]{\cup}{#1}} -% \newcommand\ninters[1]{\assoc[p=600]{\cap}{#1}} -% \end{verbatim} -% to get the desired behavior. -% -% Note that the presentation macros uses round brackets for grouping by default. We can -% specify other brackets via two more keywords: \DescribeMacro{lbrack}|lbrack| and -% \DescribeMacro{rbrack}|rbrack|. -% -% Note that formula parts that look like brackets usually are not. For instance, we should -% not define the finite set constructor via -% \begin{equation}\label{wrongset} -% |\newcommand\fset[1]{\assoc[lbrack=\{,rbrack=\}]{,}{#1}}| -% \end{equation} -% where the curly braces are used as brackets, but as presented in section~\ref{sec:assoc} -% even though both would format |\fset{a,b,c}| as $\{a,b,c\}$. In the encoding here, an -% operator with suitably high operator precedence (it is the best practice u)would be able -% to make the brackets disappear. Thus the correct version of (\ref{wrongset}) is -% \begin{equation}\label{goodset} -% |\newcommand\fset[1]{\mixfixa[p=\iprec,pi=0]{\{}{#1}{\}}{,}}| -% \end{equation} -% Note that |\prefix| and |\postfix| and their variants declared in -% section~\ref{sec:prepostfix} have brackets that do not participate (actively) in the -% precedence-based elision: function application brackets are not subject to elision. But -% the operator precedence |p| is still taken into account for outer brackets. The argument -% precedence |pi| has negative infinity as a default to avoid spurious brackets for -% arguments. -% -% There is another use case for the |\mixfixi| macro that is not apparent at first -% glance. In some cases, we would naively construct presentations without a mixfix -% declaration, e.g. -% \begin{equation}\label{wrongfrac} -% |\newcommand\half[1]{\frac{#1}2}| -% \end{equation} -% The the problem here is that the fraction does not participate in the precedence-based -% bracketing system, and in particular, the numerator will often have too many brackets -% (the incoming precedence is just passe through the |\half| macro). A better way is to -% wrap the intended presentation in a (somewhat spurious) |\mixfixi|, which we give the -% precedence |nobrackets|, which suppresses all (outer and argument) brackets for one -% level: -% \begin{equation}\label{wrongfrac} -% |\newcommand\half[1]{\mixfixi[nobrackets]{}{\frac{#1}2}{}}| -% \end{equation} -% -% \subsection{Flexible Elision}\label{sec:flexible-elision} -% -% There are several situations in which it is desirable to display only some parts of the -% presentation: -% \begin{itemize} -% \item We have already seen the case of redundant brackets above -% \item Arguments that are strictly necessary are omitted to simplify the notation, and the -% reader is trusted to fill them in from the context. -% \item Arguments are omitted because they have default values. For example $\log_{10}x$ -% is often written as $\log x$. -% \item Arguments whose values can be inferred from the other arguments are usually -% omitted. For example, matrix multiplication formally takes five arguments, namely the -% dimensions of the multiplied matrices and the matrices themselves, but only the latter -% two are displayed. -% \end{itemize} -% -% Typically, these elisions are confusing for readers who are getting acquainted with a -% topic, but become more and more helpful as the reader advances. For experienced readers -% more is elided to focus on relevant material, for beginners representations are more -% explicit. In the process of writing a mathematical document for traditional (print) -% media, an author has to decide on the intended audience and design the level of elision -% (which need not be constant over the document though). With electronic media we have new -% possibilities: we can make elisions flexible. The author still chooses the elision level -% for the initial presentation, but the reader can adapt it to her level of competence and -% comfort, making details more or less explicit. -% -% To provide this functionality, the |presentation| package provides the -% \DescribeMacro{\elide}|\elide| macro allows to associate a text with an integer -% {\textbf{visibility level}} and group them into {\textbf{elision groups}}. High levels -% mean high elidability. -% -% Elision can take various forms in print and digital media. In static media like -% traditional print on paper or the PostScript format, we have to fix the elision level, -% and can decide at presentation time which elidable tokens will be printed and which will -% not. In this case, the presentation algorithm will take visibility thresholds $T_g$ for -% every elidability group $g$ as a user parameter and then elide (i.e. not print) all -% tokens in visibility group $g$ with level $l>T_g$. We specify this threshold for via the -% \DescribeMacro{\setegroup}|\setegroup| macro. For instance in the example below, we have -% a two type annotations |par| for type parameters and |typ| for type annotations -% themselves. -% -% \begin{exfig}[ht] -% \begin{verbatim} -% $\mathbf{I}\elide{par}{500}{^\alpha}\elide{typ}{100}{_{\alpha\to\alpha}} -% :=\lambda{X\elide{typ}{500}{_\alpha}}.X$ -% \end{verbatim}\vspace*{-2em} -% \caption{Elision with Elision Groups}\label{ex:elision} -% \end{exfig} -% -% The visibility levels in the example encode how redundant the author thinks the elided -% parts of the formula are: low values show high redundancy. In our example the intuition -% is that the type parameter on the $\mathbf{I}$ combinator and the type annotation on the -% bound variable $X$ in the $\lambda$ expression are of the same obviousness to the -% reader. So in a document that contains |\setegroup{typ}{0}| and |\setegroup{par}{0}| -% Figure~\ref{ex:elision} will show $\mathbf{I}:=\lambda{X}.X$ eliding all redundant -% information. If we have both values at 600, then we will see -% $\mathbf{I}^\alpha:=\lambda{X_\alpha}.X$ and only if the threshold for |typ| rises above -% 900, then we see the full information: -% $\mathbf{I}^\alpha_{\alpha\to\alpha}:=\lambda{X_\alpha}.X$. -% -% In an output format that is capable of interactively changing its appearance, e.g. -% dynamic XHTML+MathML (i.e. XHTML with embedded Presentation {\mathml} formulas, which -% can be manipulated via JavaScript in browsers), an application can export the -% information about elision groups and levels to the target format, and can then -% dynamically change the visibility thresholds by user interaction. Here the visibility -% threshold would also be used, but here it only determines the default rendering; a user -% can then fine-tune the document dynamically to reveal elided material to support -% understanding or to elide more to increase conciseness. -% -% The price the author has to pay for this enhanced user experience is that she has to -% specify elided parts of a formula that would have been left out in conventional -% {\LaTeX}. Some of this can be alleviated by good coding practices. Let us consider the -% log base case. This is elided in mathematics, since the reader is expected to pick it up -% from context. Using semantic macros, we can mimic this behavior: defining two semantic -% macros: |\logC| which picks up the log base from the context via the |\logbase| macro -% and |\logB| which takes it as a (first) argument. -% -% \begin{verbatim} -% \provideEdefault{logbase}{10} -% \symdef{logB}[2]{\prefix{\mathrm{log}\elide{base}{100}{_{#1}}}{#2}} -% \abbrdef{logC}[1]{\logB{\fromEcontext{logbase}}{#1}} -% \end{verbatim} -% -% \DescribeMacro{\provideEdefault} Here we use the |\provideEdefault| macro to initialize -% a {\LaTeX} token register for the |logbase| default, which we can pick up from the -% elision context using \DescribeMacro{\fromEcontext}|\fromEcontext| in the definition of -% |\logC|. Thus |\logC{x}| would render as $\mathrm{log}_{10}(x)$ with a threshold of 50 -% for |base| and as $\mathrm{log}_2$, if the local {\TeX} group e.g. given by the -% |assertion| environment contains a -% \DescribeMacro{setEdefault}|\setEdefault{logbase}{2}|. -% -% \subsection{Other Layout Primitives}\label{sec:inter:primitives} -% -% Not all mathematical layouts are producible with mixfix notations. A prime example are -% grid layouts which are marked up using the |array| element in {\TeX/\LaTeX}, e.g. for -% definition by cases as the (somewhat contrived) definition of the absolute value -% function in the upper part of Figure~\ref{fig:piece}. We will now motivate the need of -% special layout primitives with this example. -% \begin{exfig} -% \begin{module}[id=foo] -% \symdef{piece}[2]{\parrayline{\parraycell{#1}}{\text{if}\;#2}} -% \symdef{otherwise}[1]{\parrayline{\parraycell{#1}}{\text{else}}} -% \symdef{piecewise}[1]{\left\{\parray{rl}{#1}\right.} -% \qquad\begin{minipage}[c]{5cm} -% $\vert x\vert\colon=\piecewise{\piece{x}{x>0}\piece{-x}{x<0}\otherwise{0}}$ -% \end{minipage} -% \qquad -% \begin{minipage}[c]{7cm} -% \begin{verbatim} -% |x|\colon=\left\{ -% \begin{array}{rl} -% x & x>0\\ -% -x & x<0\\ -% 0 & \text{else} -% \end{array} -% \right. -% \end{verbatim} -% \end{minipage} -% \end{module} -% \hrule -% \begin{verbatim} -% \symdef{piece}[2]{\parrayline{\parraycell{#1}}{\text{if}\;#2}} -% \symdef{otherwise}[1]{\parrayline{\parraycell{#1}}{\text{else}}} -% \symdef{piecewise}[1]{\left\{\begin{array}{rl}#1\end{array}\right.} -% $|x|\colon=\piecewise{\piece{x}{x>0}\piece{-x}{x<0}\otherwise{0}}$ -% \end{verbatim} -% \vspace*{-1.5em} -% \caption{A piecewise definition of the absolute value function}\label{fig:piece} -% \end{exfig} -% But this does not work for content markup via semantic macros~\cite{KohAmb:smmssl:ctan}, -% which wants to group formula parts by function. For definition by cases, we may want to -% follow the OpenMath |piece1| content dictionary~\cite{CD:piece1:on}, which groups -% ``piecewise'' definitions into a constructor |piecewise|, whose children are a list of -% |piece| constructors optionally followed by an |otherwise|. If we want to mimic this by -% semantic macros in \stex (these are defined via |\symdef|; see~\cite{KohAmb:smmssl:ctan} -% for details), we would naturally define |\piecewise| by wrapping an |array| environment -% (see the last line in Figure~\ref{fig:piece}). Then we would naturally be tempted to -% define |\piece| via |\symdef{piece}[2]{#1&\text{if}\;{#2}\\}| and |\otherwise| via -% |\symdef{otherwise}[1]{#1&\text{else}}|. But this does not support the generation of -% separate notation definitions for |\piece| and |\otherwise|: here \latexml has to -% generate presentational information outside of the |array| context that provides the |&| -% and |\\| command sequences\footnote{Note that this is not a problem when we only run -% |latex| if we assume that \texttt{\textbackslash piece} and \texttt{\textbackslash -% otherwise} are only used in arguments of \texttt{\textbackslash piecewise}.}. Therefore -% the |presentation| package provides the macros |\parrayline| and |\parraycell| that -% refactor this functionality. -% -% \DescribeMacro{\parrayline}|\parrayline{|\meta{cells}|}{|\meta{cell}|}| is -% {\LaTeX}-equivalent to \meta{cells}|&|\meta{cell}|\\| and can thus be used to create -% array lines with one or more array cells: \meta{cell} is the last array cell, and the -% previous ones are each marked up as -% \DescribeMacro{\parraycell}|\parraycell{|\meta{cell}|}|, where \meta{cell} is the cell -% content. In last lines of Figure~\ref{fig:piece} we have used them to create the array -% lines for |\piece| and |\otherwise|. Note that the array cell specifications in -% |\parrayline| must coincide with the array specification in the main constructor (here -% |rl| in |\piecewise|). -% -% \section{Limitations}\label{sec:limitations} -% -% In this section we document known limitations. If you want to help alleviate them, -% please feel free to contact the package author. Some of them are currently discussed in -% the \sTeX GitHub repository~\cite{sTeX:github:on}. -% \begin{enumerate} -% \item none reported yet -% \end{enumerate} -% -% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography} -% -% \section{The Implementation}\label{sec:implementation} -% -% \subsection{Package Options}\label{sec:impl:options} -% The |presentation| package does not take options (at the moment), but we accept any and -% ignore them. -% \begin{macrocode} -%<*package> -\DeclareOption*{} -\ProcessOptions -% \end{macrocode} -% -% We first make sure that the KeyVal package is loaded (in the right -% version). For {\latexml}, we also initialize the package inclusions. -% \begin{macrocode} -\RequirePackage{keyval}[1997/11/10] -\RequirePackage{amsmath} -% \end{macrocode} -% We will first specify the default precedences and brackets, together with the macros -% that allow to set them. -% \begin{macrocode} -\def\pres@default@precedence{0} -\def\pres@infty{1000000} -\def\pres@infty@minusone{999999} -\def\iprec{\pres@infty} -\def\niprec{-\pres@infty} -\def\pres@initial@precedence{0} -\def\pres@current@precedence{\pres@initial@precedence} -\def\pres@default@lbrack{(}\def\pres@lbrack{\pres@default@lbrack} -\def\pres@default@rbrack{)}\def\pres@rbrack{\pres@default@rbrack} -% \end{macrocode} -% -% \subsection{The System Commands}\label{sec:impl:syscommands} -% -% \begin{macro}{\withprec*} -% |\withprec| will set the current precedence.\ednote{need to implement this in -% {\latexml}! it is used in |power| in |smglom/smglom/source/arithmetcis.tex|. We also -% need to document it above!} -% \begin{macrocode} -\newcommand\withpreci[1]{\edef\pres@current@precedence{#1}} -\newcommand\withprecii[1]{\edef\pres@current@precedence{#1}} -\newcommand\withpreciii[1]{\edef\pres@current@precedence{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\PrecSet} -% |\PrecSet| will set the default precedence.\ednote{need to implement this in -% {\latexml}! Also document it above! On the other hand it is never used.} -% \begin{macrocode} -\newcommand\PrecSet[1]{\edef\pres@default@precedence{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\PrecWrite} -% |\PrecWrite| will write a bracket, if the precedence mandates it, i.e. if |\pres@p| is -% greater than the current precedence specified by |\pres@current@precedence| -% \begin{macrocode} -\def\PrecWrite#1{\ifnum\pres@p>\pres@current@precedence\else{#1}\fi} -\def\PrepostPrecWrite#1{\ifnum\pres@p@key>\pres@infty@minusone\else{#1}\fi} -% \end{macrocode} -% \end{macro} -% -% \subsection{Prefix \& Postfix Notations}\label{sec:impl:prepostfix} -% -% We first define the keys for the keyval arguments for |\prefix| and |\postfix|. -% -% \begin{macrocode} -\def\prepost@clearkeys{\def\pres@p@key{\pres@default@precedence}\def\pres@pi@key{\niprec} -\def\pres@lbrack{\pres@default@lbrack}\def\pres@rbrack{\pres@default@rbrack}} -\define@key{prepost}{lbrack}{\def\pres@lbrack{#1}} -\define@key{prepost}{rbrack}{\def\pres@lbrack{#1}} -\define@key{prepost}{p}{\def\pres@p@key{#1}} -\define@key{prepost}{pi}{\def\pres@pi@key{#1}} -\define@key{prepost}{nobrackets}[yes]{\def\pres@p@key{\pres@infty}% -\def\pres@pi@key{-\pres@infty}} -% \end{macrocode} -% -% \begin{macro}{\prefix} -% In prefix we always write the brackets. -% \begin{macrocode} -\newcommand\prefix[3][]%key, fn, arg -{\prepost@clearkeys\setkeys{prepost}{#1} -{#2}\PrepostPrecWrite\pres@lbrack{\edef\pres@current@precedence{\pres@pi@key}#3}\PrepostPrecWrite\pres@rbrack} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\postfix} -% \begin{macrocode} -\newcommand\postfix[3][]%key, fn, arg -{\prepost@clearkeys\setkeys{prepost}{#1} -\PrepostPrecWrite\pres@lbrack{\edef\pres@current@precedence{\pres@pi@key}#3}\PrepostPrecWrite\pres@rbrack{#2}} -% \end{macrocode} -% \end{macro} -% -% \subsection{Mixfix Operators}\label{sec:impl:mixfix} -% -% We need to enable notation definitions of the operators that have -% argument- and precedence-aware renderings. To this end, we -% circumvent {\latexml}'s limitations induced by its internal -% processing stages, by pulling most of the argument rendering -% functionality to the XSLT which produces the final {\omdoc} result. -% -% In the {\latexml} bindings, the internal structure of the mixfix -% operators is generically preserved, via the |symdef_presentation_pmml| subroutine -% in the Modules package. Nevertheless, in the current module we add the promised syntactic -% enhancements to each element of the mixfix family. Also, we use the -% |argument_precedence| subroutine to store the precedences given by -% the 'pi', 'pii', etc. keys as a temporary |argprec| -% attribute of the rendering, to be abolished during the final {\omdoc} generation. -% This setup is finally utilized by the XSLT stylesheet which combines -% the operator structure with the preserved precedences to produce the -% proper form of the argument render elements. -% -% \begin{macrocode} -\def\clearkeys{\let\pres@p@key=\relax -\let\pres@pi@key=\relax% -\let\pres@pi@key=\relax% -\let\pres@pii@key=\relax% -\let\pres@piii@key=\relax} -\define@key{mi}{nobrackets}[yes]{\def\pres@p@key{\pres@infty}% -\def\pres@pi@key{-\pres@infty}} -\define@key{mi}{lbrack}{\def\pres@lbrack@key{#1}} -\define@key{mi}{rbrack}{\def\pres@lbrack@key{#1}} -\define@key{mi}{p}{\def\pres@p@key{#1}} -\define@key{mi}{pi}{\def\pres@pi@key{#1}} -\def\prep@keys@mi% -{\edef\pres@lbrack{\@ifundefined{pres@lbrack@key}\pres@default@lbrack\pres@lbrack@key} -\edef\pres@rbrack{\@ifundefined{pres@rbrack@key}\pres@default@rbrack\pres@rbrack@key} -\edef\pres@p{\@ifundefined{pres@p@key}\pres@default@precedence\pres@p@key} -\edef\pres@pi{\@ifundefined{pres@pi@key}\pres@p\pres@pi@key}} -% \end{macrocode} -% -% \begin{macro}{\mixfixi} -% \begin{macrocode} -\newcommand\mixfixi[4][]%key, pre, arg, post -{\clearkeys\setkeys{mi}{#1}\prep@keys@mi% -\PrecWrite\pres@lbrack% -#2{\edef\pres@current@precedence{\pres@pi}#3}#4% -\PrecWrite\pres@rbrack} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\@assoc} -% We are using functionality from the {\LaTeX} core packages here to iterate over the -% arguments. -% \begin{macrocode} -\def\@assoc#1#2#3{% precedence, function, argv -\let\@tmpop=\relax% do not print the function the first time round -\@for\@I:=#3\do{\@tmpop% print the function -% write the i-th argument with locally updated precedence -{\edef\pres@current@precedence{#1}\@I}% -\def\@tmpop{#2}}}%update the function -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\mixfixa} -% \begin{macrocode} -\newcommand\mixfixa[5][]%key, pre, arg, post, assocop -{\clearkeys\setkeys{mi}{#1}\prep@keys@mi% -\PrecWrite\pres@lbrack{#2}{\@assoc\pres@pi{#5}{#3}}{#4}\PrecWrite\pres@rbrack} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\mixfixA} -% A variant of |\mixfixa| that puts the arguments into an array.\ednote{MK: this is very -% experimental now, if this works, we need to document this above and extend this to the -% other mixfix declarations. Also we could use a key for the array format argument.} -% \begin{macrocode} -\newcommand\mixfixA[5][]%key, pre, arg, post, assocop -{\clearkeys\setkeys{mi}{#1}\prep@keys@mi% -\renewcommand\do[1]{\@assoc\pres@pi{#5}{##1}{#5}\tabularnewline}% -\PrecWrite\pres@lbrack% write bracket if necessary -#2{\begin{array}{l}\docsvlist{#3}\end{array}}% -#4\PrecWrite\pres@rbrack} -% \end{macrocode} -% \end{macro} -% -% \begin{macrocode} -\define@key{mii}{nobrackets}[yes]{\def\pres@p@key{\pres@infty}% -\def\pres@pi@key{-\pres@infty}\def\pres@pii@key{-\pres@infty}} -\define@key{mii}{lbrack}{\def\pres@lbrack@key{#1}} -\define@key{mii}{rbrack}{\def\pres@lbrack@key{#1}} -\define@key{mii}{p}{\def\pres@p@key{#1}} -\define@key{mii}{pi}{\def\pres@pi@key{#1}} -\define@key{mii}{pii}{\def\pres@pii@key{#1}} -\def\prep@keys@mii{\prep@keys@mi% -\edef\pres@pii{\@ifundefined{pres@pii@key}\pres@p\pres@pii@key}} -% \end{macrocode} -% -% \begin{macro}{\mixfixii} -% \begin{macrocode} -\newcommand\mixfixii[6][]%key, pre, arg1, mid, arg2, post -{\clearkeys\setkeys{mii}{#1}\prep@keys@mii% -\PrecWrite\pres@lbrack% write bracket if necessary -#2{\edef\pres@current@precedence{\pres@pi}#3}% -#4{\edef\pres@current@precedence{\pres@pii}#5}#6% -\PrecWrite\pres@rbrack} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\mixfixia} -% \begin{macrocode} -\newcommand\mixfixia[7][]%key, pre, arg1, mid, arg2, post, assocop -{\clearkeys\setkeys{mii}{#1}\prep@keys@mii% -\PrecWrite\pres@lbrack% write bracket if necessary -#2{\edef\pres@current@precedence{\pres@pi}#3}% -#4{\@assoc\pres@pii{#7}{#5}}#6% -\PrecWrite\pres@rbrack} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\mixfixiA} -% A variant of |\mixfixia| that puts the arguments into an array.\ednote{MK: this is very -% experimental now, if this works, we need to document this above and extend this to the -% other mixfix declarations. Also we could use a key for the array format argument.} -% \begin{macrocode} -\newcommand\mixfixiA[7][]%key, pre, arg1, mid, arg2, post, assocop -{\clearkeys\setkeys{mii}{#1}\prep@keys@mii% -\renewcommand\do[1]{\@assoc\pres@pi{#7}{##1}{#7}\tabularnewline}% -\PrecWrite\pres@lbrack% write bracket if necessary -#2{\edef\pres@current@precedence{\pres@pi}#3}% -#4{\begin{array}{l}\docsvlist{#5}\end{array}}#6% -\PrecWrite\pres@rbrack} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\mixfixai} -% \begin{macrocode} -\newcommand\mixfixai[7][]%key, pre, arg1, mid, arg2, post, assocop -{\clearkeys\setkeys{mii}{#1}\prep@keys@mii% -\PrecWrite\pres@lbrack% write bracket if necessary -#2{\@assoc\pres@pi{#7}{#3}}% -#4{\edef\pres@current@precedence{\pres@pii}#5}#6% -\PrecWrite\pres@rbrack} -% \end{macrocode} -% \end{macro} -% -% \begin{macrocode} -\define@key{miii}{nobrackets}[yes]{\def\pres@p@key{\pres@infty}% -\def\pres@pi@key{-\pres@infty} -\def\pres@pii@key{-\pres@infty} -\def\pres@pii@key{-\pres@infty}} -\define@key{miii}{lbrack}{\def\pres@lbrack@key{#1}} -\define@key{miii}{rbrack}{\def\pres@lbrack@key{#1}} -\define@key{miii}{p}{\def\pres@p@key{#1}} -\define@key{miii}{pi}{\def\pres@pi@key{#1}} -\define@key{miii}{pii}{\def\pres@pii@key{#1}} -\define@key{miii}{piii}{\def\pres@piii@key{#1}} -\def\prep@keys@miii{\prep@keys@mii% -\edef\pres@piii{\@ifundefined{pres@piii@key}{\pres@p}{\pres@piii@key}}} -% \end{macrocode} -% -% \begin{macro}{\mixfixiii} -% \begin{macrocode} -\newcommand\mixfixiii[8][]%key, pre, arg1, mid1, arg2, mid2, arg3, post -{\clearkeys\setkeys{miii}{#1}\prep@keys@miii% -\PrecWrite\pres@lbrack% write bracket if necessary -#2{\edef\pres@current@precedence{\pres@pi}#3}% -#4{\edef\pres@current@precedence{\pres@pii}#5}% -#6{\edef\pres@current@precedence{\pres@pii}#7}#8% -\PrecWrite\pres@rbrack} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\mixfixaii} -% \begin{macrocode} -\newcommand\mixfixaii[9][]%key, pre, arg1, mid1, arg2, mid2, arg3, post, sep -{\clearkeys\setkeys{miii}{#1}\prep@keys@miii% -\PrecWrite\pres@lbrack% write bracket if necessary -#2{\@assoc\pres@pi{#9}{#3}}% -#4{\edef\pres@current@precedence{\pres@pii}#5}% -#6{\edef\pres@current@precedence{\pres@pii}#7}#8% -\PrecWrite\pres@rbrack} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\mixfixiai} -% \begin{macrocode} -\newcommand\mixfixiai[9][]%key, pre, arg1, mid1, arg2, mid2, arg3, post, assocop -{\clearkeys\setkeys{miii}{#1}\prep@keys@miii% -\PrecWrite\pres@lbrack% write bracket if necessary -#2{\edef\pres@current@precedence{\pres@pi}#3}% -#4{\@assoc\pres@pi{#9}{#5}}% -#6{\edef\pres@current@precedence{\pres@pii}#7}#8% -\PrecWrite\pres@rbrack} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\mixfixiia} -% \begin{macrocode} -\newcommand\mixfixiia[9][]%key, pre, arg1, mid1, arg2, mid2, arg3, post,assocop -{\clearkeys\setkeys{miii}{#1}\prep@keys@miii% -\PrecWrite\pres@lbrack% write bracket if necessary -#2{\edef\pres@current@precedence{\pres@pi}#3}% -#4{\edef\pres@current@precedence{\pres@pii}#5}% -#6{\@assoc\pres@pi{#9}{#7}}#8% -\PrecWrite\pres@rbrack} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\prefixa} -% In prefix we always write the brackets. -% \begin{macrocode} -\newcommand\prefixa[4][]%keys, fn, arg, sep -{\prepost@clearkeys\setkeys{prepost}{#1}% -{#2}\pres@lbrack{\@assoc\pres@pi@key{#4}{#3}}\pres@rbrack} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\postfixa} -% \begin{macrocode} -\newcommand\postfixa[4][]%keys, fn, arg, sep -{\prepost@clearkeys\setkeys{prepost}{#1}% -\pres@lbrack{\@assoc\pres@pi@key{#4}{#3}}\pres@rbrack{#2}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\infix} -% |\infix|\ednote{need infixl as well, use counters for precedences here.} is a simple -% special case of |\mixfixii|. -% \begin{macrocode} -\newcommand\infix[4][]{\mixfixii[#1]{}{#3}{#2}{#4}{}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\assoc} -% \begin{macrocode} -\newcommand\assoc[3][]{\mixfixa[#1]{}{#3}{}{#2}} -% \end{macrocode} -% \end{macro} -% -% \subsection{General Elision}\label{sec:impl:elision} -% -% \ednote{all of these still need to be tested and implemented in LaTeXML.} -% \begin{macro}{\setegroup} -% The elision macros are quite simple, a group |foo| is internally represented by a -% macro |foo@egroup|, which we set by a |\gdef|. -% \begin{macrocode} -\def\setegroup#1#2{\expandafter\def\csname #1@egroup\endcsname{#2}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\elide} -% Then the elision command is picks up on this (flags an error) if the internal macro -% does not exist and prints the third argument, if the elision value threshold is above -% the elision group threshold in the paper.\ednote{do we need to turn this around as -% well?} We test the implementation with Figure~\ref{ex:elision-test}. -% \begin{macrocode} -\def\elide#1#2#3{\@ifundefined{#1@egroup}% -{\def\@elevel{0} -\PackageError{presentation}{undefined egroup #1, assuming value 0}% -{When calling \protect\elide{#1}... the elision group #1 has be have\MessageBreak -been set by \protect\setegroup before, e.g. by \protect\setegroup{an}{0}.}}% -{\edef\@elevel{\csname #1@egroup\endcsname}}% -\ifnum\@elevel>#2\else{#3}\fi} -% \end{macrocode} -% \end{macro} -% -% \begin{figure}[ht]\centering -% \begin{tabular}{|l|l|l|l|}\hline -% {\texttt{par}} & {\texttt{typ}} & result & expected \\\hline\hline -% 0 & 0 & \setegroup{par}{0}\setegroup{typ}{0} -% $\mathbf{I}\elide{par}{500}{^\alpha}\elide{typ}{100}{_{\alpha\to\alpha}} -% :=\lambda{X\elide{typ}{500}{_\alpha}}.X$ -% & $\mathbf{I}:=\lambda{X}.X$\\\hline -% 600 & 600 & \setegroup{par}{600}\setegroup{typ}{600} -% $\mathbf{I}\elide{par}{500}{^\alpha}\elide{typ}{100}{_{\alpha\to\alpha}} -% :=\lambda{X\elide{typ}{500}{_\alpha}}.X$ -% & $\mathbf{I}^\alpha:=\lambda{X_\alpha}.X$\\\hline -% 600 & 1000 & \setegroup{par}{600}\setegroup{typ}{1000} -% $\mathbf{I}\elide{par}{500}{^\alpha}\elide{typ}{100}{_{\alpha\to\alpha}} -% :=\lambda{X\elide{typ}{500}{_\alpha}}.X$ -% & $\mathbf{I}^\alpha_{\alpha\to\alpha}:=\lambda{X_\alpha}.X$\\\hline -% \end{tabular} -% \caption{Testing Elision with the example in Figure~\protect\ref{ex:elision}}\label{ex:elision-test} -% \end{figure} -% -% \begin{macro}{\provideEdefault} -% The |\provideEdefault| macro sets up the context for an elision default by locally -% defining the internal macro \meta{default}|@edefault| and (if necessary) exporting it -% from the module. -% \begin{macrocode} -\def\provideEdefault#1#2{\expandafter\def\csname#1@edefault\endcsname{#2} -\@ifundefined{this@module}{}% -{\expandafter\g@addto@macro\this@module{\expandafter\def\csname#1@edefault\endcsname{#2}}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\setEdefault} -% The |\setEdefault| macro just redefines the internal \meta{default}|@edefault| in the -% local group -% \begin{macrocode} -\def\setEdefault#1#2{\expandafter\def\csname #1@edfault\endcsname{#2}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\fromEcontext} -% The |\fromEcontext| macro just calls internal \meta{default}|@edefault| macro. -% \begin{macrocode} -\def\fromEcontext#1{\csname #1@edefault\endcsname} -% \end{macrocode} -% \end{macro} -% -% \subsection{Other Layout Primitives}\label{sec:impl:primitives} -% -% The |\parray|, |\parrayline| and |\parraycell| macros are simple refactorings of the -% |array| functionality on the {\LaTeX} side. -% -% \begin{macro}{\parray} -% \begin{macrocode} -\newcommand\parray[2]{\begin{array}{#1}#2\end{array}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\parrayline} -% \begin{macrocode} -\newcommand\parrayline[2]{#1#2\\} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\prmatrix} -% \begin{macrocode} -\newcommand\prmatrix[1]{\begin{matrix}#1\end{matrix}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\pmrow} -% \ednote{this does not work together with the robustification (using |newrobustcmd|) -% in |symdef|} -% \begin{macrocode} -\def\pmrow#1{\expandafter\@gobble\x@mrow#1\endx@mrow,} -\def\x@mrow#1,{\x@mrow} -\def\endx@mrow#1{\\} -\def\pmrowh#1{\expandafter\@gobble\x@mrowh#1\endx@mrowh,} -\def\x@mrowh#1,{\x@mrowh} -\def\endx@mrowh#1{\\\hline} -% \end{macrocode} -% \end{macro} -% -% \subsection{Deprecated Functionality} -% -% These macros may go away at any time. -% -% \begin{macro}{\parraylineh} -% \begin{macrocode} -\newcommand\parraylineh[2]{#1#2\\\hline} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\parraycell} -% \begin{macrocode} -\newcommand\parraycell[1]{#1&} -%</package> -% \end{macrocode} -% \end{macro} -% -% \Finale -\endinput -% -% LocalWords: dtx CPERL RequirePackage keyval lbrack rbrack DefKeyVal omdoc cd -% LocalWords: Semiverbatim DefConstructor OptionalKeyVals pmml ltx XMath mii -% LocalWords: pii miii piii KeyVal egroup namedef attr precs foreach ToString -% LocalWords: DefMacro stex srcref argprec mrow getSymmdefProperties funapp -% LocalWords: args arg LaTeX cvar iffalse scsys sc sc mathml openmath latexml -% LocalWords: cmathml activemath twintoo atwin atwintoo texttt fileversion foo -% LocalWords: Deyan Ginev maketitle setcounter tocdepth tableofcontents symdef -% LocalWords: newpage ldots bigl bigr langle ary cdots subseteq mixfixi exfig -% LocalWords: mixfixii mixfixiii vspace hline sseteq ite tt tt tt tt uminus rb -% LocalWords: texorpdfstring assoc ednote nunion mixfixa mixfixa postfixa leq -% LocalWords: postfixa mixfixia mixfixia mixfixai mixfixai fntype rightarrow -% LocalWords: mixfixaii mixfixiai mixfixiia typej vdash cupcap ninters ninters -% LocalWords: capcup geq prec fset textbf textbf setegroup setegroup mathbf fn -% LocalWords: provideEdefault provideEdefault fromEcontext fromEcontext mathrm -% LocalWords: setEdefault setEdefault widetilde cdot vname vname vnref vnname -% LocalWords: ulivar ulivar primvar primvar pprimvar pprimvar textsf textsf rl -% LocalWords: printbibliography ltxml infty ifnum clearkeys nobrackets whatsit -% LocalWords: ifundefined keyvals kvhash newcommand setkeys crossrefOp argv -% LocalWords: tmpop i-th assocop textbackslash infixl gdef expandafter csname -% LocalWords: endcsname edefault edfault ifx prepostfix circ circ circ circ -% LocalWords: iprec iprec niprec niprec wrongset goodset prepost prepkeys -% LocalWords: arrayline arraycell qquad hrule cmath compactenum omtext smmtf -% LocalWords: wrongfrac elidability elidable renewcommand tabularnewline -% LocalWords: docsvlist refactorings - -% \endinput -% Local Variables: -% mode: doctex -% TeX-master: t -% End: diff --git a/macros/latex/contrib/stex/sty/presentation/presentation.ins b/macros/latex/contrib/stex/sty/presentation/presentation.ins deleted file mode 100644 index 78e2be6c41..0000000000 --- a/macros/latex/contrib/stex/sty/presentation/presentation.ins +++ /dev/null @@ -1,30 +0,0 @@ -%% -%% This file generates files required to use the ed package. -%% At your command prompt write -%% -%% latex presentation.ins -%% -%% Copyright(c) 2005 Michael Kohlhase -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{presentation.sty}{\from{presentation.dtx}{package}}} - -\Msg{*} -\Msg{* You probably need to move the generated style files into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/presentation/presentation.pdf b/macros/latex/contrib/stex/sty/presentation/presentation.pdf Binary files differdeleted file mode 100644 index e74eefda89..0000000000 --- a/macros/latex/contrib/stex/sty/presentation/presentation.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/problem/README b/macros/latex/contrib/stex/sty/problem/README deleted file mode 100644 index 15cf1883fb..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/problem/problem.dtx b/macros/latex/contrib/stex/sty/problem/problem.dtx deleted file mode 100644 index d46c7d028d..0000000000 --- a/macros/latex/contrib/stex/sty/problem/problem.dtx +++ /dev/null @@ -1,580 +0,0 @@ -% \iffalse meta-comment -% An Infrastructure for Problems -% Copyright (c) 2006-2008 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<package>\ProvidesPackage{problem}[2019/03/20 v1.3 Semantic Markup for Problems] -% -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage{url,float,xspace} -\usepackage[solutions,hints,notes]{problem} -\usepackage[show]{ed} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{stex-logo} -\usepackage{ctangit} -\usepackage{hyperref} -\makeindex -\def\latexml{\hbox{{\LaTeX}ML}\xspace} -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\def\githubissue#1{\cite{sTeX:github:on}, \hyperlink{https://github.com/KWARC/sTeX/issues/#1}{issue #1}} -\begin{document} -\RecordChanges -\DocInput{problem.dtx} -\end{document} -%</driver> -% \fi -% -% \CheckSum{318} -% -% \changes{v0.9}{2006/09/18}{First Version with Documentation} -% \changes{v0.9a}{2007/01/02}{Renamed to \texttt{problem.sty}} -% \changes{v0.9c}{2010/01/03}{based on \texttt{omd.sty} now} -% \changes{v1.0}{2013/10/09}{adding \texttt{\textbackslash start/stopsolution}} -% \changes{v1.1}{2013/12/12}{adding MathHub support} -% \changes{v1.2}{2015/11/04}{moving MathHub support out to separate package} -% \changes{v1.3}{2018/11/23}{Addint Multiple Choice Blocks} -% -% \GetFileInfo{problem.sty} -% -% \MakeShortVerb{\|} -% -% \title{\texttt{problem.sty}: An Infrastructure for formatting Problems\thanks{Version {\fileversion} (last revised -% {\filedate})}} -% \author{Michael Kohlhase\\ -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}} -% \maketitle -% -% \begin{abstract} -% The |problem| package supplies an infrastructure that allows specify problems and to -% reuse them efficiently in multiple environments. -% \end{abstract} -% \setcounter{tocdepth}{2}\tableofcontents\newpage -% -%\section{Introduction}\label{sec:intro} -% -% The |problem| package supplies an infrastructure that allows specify problem. Problems -% are text fragments that come with auxiliary functions: hints, notes, and -% solutions\footnote{for the moment multiple choice problems are not supported, but may -% well be in a future version}. Furthermore, we can specify how long the solution to a -% given problem is estimated to take and how many points will be awarded for a perfect -% solution. -% -% Finally, the |problem| package facilitates the management of problems in small files, -% so that problems can be re-used in multiple environment. -% -% \section{The User Interface}\label{sec:ui} -% -% \subsection{Package Options} -% The |problem| package takes the options \DescribeMacro{solutions}|solutions| (should -% solutions be output?), \DescribeMacro{notes}|notes| (should the problem notes be -% presented?), \DescribeMacro{hints}|hints| (do we give the hints?), -% \DescribeMacro{pts}|pts| (do we display the points awarded for solving the problem?), -% \DescribeMacro{min}|min| (do we display the estimated minutes for problem soling). If -% theses are specified, then the corresponding auxiliary parts of the problems are output, -% otherwise, they remain invisible. -% -% The \DescribeMacro{boxed}|boxed| option specifies that problems should be formatted in -% framed boxes so that they are more visible in the text. Finally, the -% \DescribeMacro{test}|test| option signifies that we are in a test situation, so this -% option does not show the solutions (of course), but leaves space for the students to -% solve them. -% -% Finally, if the \DescribeMacro{showmeta}|showmeta| is set, then the metadata keys are -% shown (see~\cite{Kohlhase:metakeys:ctan} for details and customization options). -% -% \subsection{Problems and Solutions}\label{sec:user:probsols} -% -% \DescribeEnv{problem} The main environment provided by the |problem| package is -% (surprise surprise) the |problem| environment. It is used to mark up problems and -% exercises. The environment takes an optional KeyVal argument with the keys -% \DescribeMacro{id}|id| as an identifier that can be reference later, -% \DescribeMacro{pts}|pts| for the points to be gained from this exercise in homework or -% quiz situations, \DescribeMacro{min}|min| for the estimated minutes needed to solve the -% problem, and finally \DescribeMacro{title}|title| for an informative title of the -% problem. For an example of a marked up problem see Figure~\ref{fig:problem} and the -% resulting markup see Figure~\ref{fig:result}. -% -%\begin{exfig} -% \begin{verbatim} -% \usepackage[solutions,hints,pts,min]{problem} -% \begin{document} -% \begin{problem}[id=elefants,pts=10,min=2,title=Fitting Elefants] -% How many Elefants can you fit into a Volkswagen beetle? -% \begin{hint} -% Think positively, this is simple! -% \end{hint} -% \begin{exnote} -% Justify your answer -% \end{exnote} -% \begin{solution}[for=elefants,height=3cm] -% Four, two in the front seats, and two in the back. -% \end{solution} -% \end{problem} -% \end{document} -% \end{verbatim} -% \caption{A marked up Problem}\label{fig:problem} -% \end{exfig} -% -% \DescribeEnv{solution} The |solution| environment can be to specify a solution to a -% problem. If the \DescribeMacro{solutions}|solutions| option is set or |\solutionstrue| -% is set in the text, then the solution will be presented in the output. The |solution| -% environment takes an optional KeyVal argument with the keys \DescribeMacro{id}|id| for -% an identifier that can be reference \DescribeMacro{for}|for| to specify which problem -% this is a solution for, and \DescribeMacro{height}|height| that allows to specify the -% amount of space to be left in test situations (i.e. if the \DescribeMacro{test}|test| -% option is set in the |\usepackage| statement). -% -%\begin{exfig} -% \begin{minipage}{.9\linewidth} -% \begin{problem}[id=elefants.prob,title=Fitting Elefants] -% How many Elefants can you fit into a Volkswagen beetle? -% \begin{hint} -% Think positively, this is simple! -% \end{hint} -% \begin{exnote} -% Justify your answer -% \end{exnote} -% \smallskip\noindent\hrule\textbf{Solution:} -% Four, two in the front seats, and two in the back. -% \hrule -% \end{problem} -% \end{minipage} -% \caption{The Formatted Problem from Figure~\ref{fig:problem}}\label{fig:result} -% \end{exfig} -% -% \DescribeEnv{hint}\DescribeEnv{note}, the |hint| and |exnote| environments can be used -% in a |problem| environment to give hints and to make notes that elaborate certain aspects -% of the problem. -% -% Sometimes we would like to locally override the |solutions| option we have given to the -% package. To turn on solutions we use the -% \DescribeMacro{\startsolutions}|\startsolutions|, to turn them off, -% \DescribeMacro{\stopsolutions}|\stopsolutions|. These two can be used at any point in -% the documents. -% -% \subsection{Multiple Choice Blocks}\label{sec:user:mcq} -% -% Multiple choice blocks can be formatted using the \DescribeMacro{mcb}|mcb| environment, -% in which single choices are marked up with -% \DescribeMacro{\mcc}|\mcc[|\meta{keyvals}|]{|\meta{text}|}| macro, which takes an -% optional key/value argument \meta{keyvals} for choice metadata and a required argument -% \meta{text} for the proposed answer text. The following keys are supported -% \begin{itemize} -% \item \DescribeMacro{T}|T| for true answers, \DescribeMacro{F}|F| for false ones, -% \item \DescribeMacro{Ttext}|Ttext| the verdict for true answers, -% \DescribeMacro{Ftext}|Ftext| for false ones, and -% \item \DescribeMacro{feedback}|feedback| for a short feedback text given to the student. -% \end{itemize} -% See Figure~\ref{fig: mcq} for an example -%\begin{exfig} -% \begin{verbatim} -% \begin{problem}[title=Functions] -% What is the keyword to introduce a function definition in python? -% \begin{mcb} -% \mcc[T]{def} -% \mcc[F,feedback=that is for C and C++]{function} -% \mcc[F,feedback=that is for Standard ML]{fun} -% \mcc[F,Ftext=Nooooooooo,feedback=that is for Java]{public static void} -% \end{mcb} -% \end{problem} -% \end{verbatim} -% \solutionsfalse\hrule -% \begin{problem}[title=Functions] -% What is the keyword to introduce a function definition in python? -% \begin{mcb} -% \mcc[T]{def} -% \mcc[F,feedback=that is for C and C++]{function} -% \mcc[F,feedback=that is for Standard ML]{fun} -% \mcc[F,Ftext=Nooooooooo,feedback=that is for Java]{public static void} -% \end{mcb} -% \end{problem} -% \solutionstrue\hrule -% \begin{problem}[title=Functions] -% What is the keyword to introduce a function definition in python? -% \begin{mcb} -% \mcc[T]{def} -% \mcc[F,feedback=that is for C and C++]{function} -% \mcc[F,feedback=that is for Standard ML]{fun} -% \mcc[F,Ftext=Nooooooooo,feedback=that is for Java]{public static void} -% \end{mcb} -% \end{problem} -% \caption{A Problem with a multiple choice block}\label{fig:mcq} -% \end{exfig} -% -% \subsection{Including Problems}\label{sec:user:includeproblem} -% -% The \DescribeMacro{\includeproblem}|\includeproblem| macro can be used to include a -% problem from another file. It takes an optional KeyVal argument and a second argument -% which is a path to the file containing the problem (the macro assumes that there is only -% one problem in the include file). The keys \DescribeMacro{title}|title|, -% \DescribeMacro{min}|min|, and \DescribeMacro{pts}|pts| specify the problem title, the -% estimated minutes for solving the problem and the points to be gained, and their values -% (if given) overwrite the ones specified in the |problem| environment in the included -% file. -% -% \subsection{Reporting Metadata}\label{sec:user:reporting} -% -% The sum of the points and estimated minutes (that we specified in the |pts| and |min| -% keys to the |problem| environment or the |\includeproblem| macro) to the log file and -% the screen after each run. This is useful in preparing exams, where we want to make sure -% that the students can indeed solve the problems in an allotted time period. -% -% The |\min| and |\pts| macros allow to specify (i.e. to print to the margin) the -% distribution of time and reward to parts of a problem, if the |pts| and |pts| package -% options are set. This allows to give students hints about the estimated time and the -% points to be awarded. -% -% \section{Limitations}\label{sec:limitations} -% -% In this section we document known limitations. If you want to help alleviate them, -% please feel free to contact the package author. Some of them are currently discussed in -% the \sTeX GitHub repository~\cite{sTeX:github:on}. -% \begin{enumerate} -% \item none reported yet -% \end{enumerate} -% -% \StopEventually{\newpage\PrintChanges} -% \newpage -% -% \section{The Implementation}\label{sec:implementation} -% -% \subsection{Package Options}\label{sec:impl:options} -% -% The first step is to declare (a few) package options that handle whether certain -% information is printed or not. They all come with their own conditionals that are set by -% the options. -% -% \begin{macrocode} -%<*package> -\newif\if@problem@mh@\@problem@mh@false -\DeclareOption{mh}{\@problem@mh@true} -\newif\ifexnotes\exnotesfalse -\DeclareOption{notes}{\exnotestrue} -\newif\ifhints\hintsfalse -\DeclareOption{hints}{\hintstrue} -\newif\ifsolutions\solutionsfalse -\DeclareOption{solutions}{\solutionstrue} -\newif\ifpts\ptsfalse -\DeclareOption{pts}{\ptstrue} -\newif\ifmin\minfalse -\DeclareOption{min}{\mintrue} -\newif\ifboxed\boxedfalse -\DeclareOption{boxed}{\boxedtrue} -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{omtext}} -\ProcessOptions -% \end{macrocode} -% -% Then we make sure that the necessary packages are loaded (in the right versions). -% \begin{macrocode} -\if@problem@mh@\RequirePackage{problem-mh}\fi -\RequirePackage{omtext} -\RequirePackage{comment} -\RequirePackage{mdframed} -\RequirePackage[base]{babel} -% \end{macrocode} -% -% \begin{macro}{\prob@*@kw} -% For multilinguality, we define internal macros for keywords that can be specialized in -% |*.ldf| files. -% \begin{macrocode} -\AfterBabelLanguage{ngerman}{\input{problem-ngerman.ldf}} -\AfterBabelLanguage{arabic}{\input{problem-arabic.ldf}} -\def\prob@problem@kw{Problem} -\def\prob@solution@kw{Solution} -% \end{macrocode} -% \end{macro} -% -% \subsection{Problems and Solutions}\label{sec:impl:probsols} -% -% We now prepare the KeyVal support for problems. The key macros just set appropriate -% internal macros. -% -% \begin{macrocode} -\srefaddidkey[prefix=prob.]{problem} -\addmetakey{problem}{pts} -\addmetakey{problem}{min} -\addmetakey*{problem}{title} -\addmetakey{problem}{refnum} -% \end{macrocode} -% -% Then we set up a counter for problems. -% \begin{macro}{\numberproblemsin} -% \begin{macrocode} -\newcounter{problem} -\newcommand\numberproblemsin[1]{\@addtoreset{problem}{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\prob@label} -% We provide the macro |\prob@label| to redefine later to get context involved. -% \begin{macrocode} -\newcommand\prob@label[1]{#1} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\prob@number} -% We consolidate the problem number into a reusable internal macro -% \begin{macrocode} -\newcommand\prob@number{% -\ifx\inclprob@refnum\@empty% if there is no outside refnumb -\ifx\problem@refnum\@empty\prob@label\theproblem% -\else\prob@label\problem@refnum\fi% -\else\prob@label\inclprob@refnum\fi} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\prob@title} -% We consolidate the problem title into a reusable internal macro as well. |\prob@title| -% takes three arguments the first is the fallback when no title is given at all, the -% second and third go around the title, if one is given. -% \begin{macrocode} -\newcommand\prob@title[3]{% -\ifx\inclprob@title\@empty% if there is no outside title -\ifx\problem@title\@empty{#1}\else{#2\problem@title{#3}}\fi -\else{#2}\inclprob@title{#3}\fi}% else show the outside title -% \end{macrocode} -% \end{macro} -% -% With these the problem header is a one-liner -% -% \begin{macro}{\prob@heading} -% We consolidate the problem header line into a separate internal macro that can be -% reused in various settings. -% \begin{macrocode} -\def\prob@heading{\prob@problem@kw~\prob@number\prob@title{ }{ (}{)\strut\\}% -\sref@label@id{\prob@problem@kw~\prob@number}} -% \end{macrocode} -% \end{macro} -% -% With this in place, we can now define the |problem| environment. It comes in two shapes, -% depending on whether we are in boxed mode or not. In both cases we increment the problem -% number and output the points and minutes (depending) on whether the respective options -% are set. -% \begin{environment}{problem} -% \begin{macrocode} -\newenvironment{problem}[1][]{\metasetkeys{problem}{#1}\sref@target% -\@in@omtexttrue% we are in a statement (for inline definitions) -\stepcounter{problem}\record@problem% -\def\current@section@level{\prob@problem@kw}% -\par\noindent\textbf\prob@heading\show@pts\show@min\rmfamily\noindent\ignorespaces} -{\smallskip} -\ifboxed\surroundwithmdframed{problem}\fi -% \end{macrocode} -% \end{environment} -% -% \begin{macro}{\record@problem} -% This macro records information about the problems in the |*.aux| file. -% \begin{macrocode} -\def\record@problem{\protected@write\@auxout{}% -{\string\@problem{\prob@number}% -{\ifx\inclprob@pts\@empty\problem@pts\else\inclprob@pts\fi}% -{\ifx\inclprob@min\@empty\problem@min\else\inclprob@min\fi}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\@problem} -% This macro acts on a problem's record in the |*.aux| file. It does not have any -% functionality here, but can be redefined elsewhere (e.g. in the |assignment| -% package). -% \begin{macrocode} -\def\@problem#1#2#3{} -% \end{macrocode} -% \end{macro} -% -% The \DescribeEnv{solution}|solution| environment is similar to the |problem| -% environment, only that it is independent of the boxed mode. It also has it's own keys -% that we need to define first. -% -% \begin{macrocode} -\srefaddidkey{soln} -\addmetakey{soln}{for} -\addmetakey{soln}{height} -\addmetakey{soln}{creators} -\addmetakey{soln}{contributors} -\addmetakey{soln}{srccite} -% \begin{macrocode} -% the next step is to define a helper macro that does what is needed to start a solution. -% \begin{macrocode} -\newcommand\@startsolution[1][]{\metasetkeys{soln}{#1}% -\@in@omtexttrue% we are in a statement. -\ifboxed\else\hrule\fi\smallskip\noindent{\textbf\prob@solution@kw: }\begin{small}% -\def\current@section@level{\prob@solution@kw}% -\ignorespaces} -% \end{macrocode} -% -% \begin{macro}{\startsolutions} -% for the |\startsolutions| macro we use the |\specialcomment| macro from the |comment| -% package. Note that we use the |\@startsolution| macro in the start codes, that parses -% the optional argument. -% \begin{macrocode} -\newcommand\startsolutions{\specialcomment{solution}{\@startsolution}% -{\ifboxed\else\hrule\medskip\fi\end{small}}% -\ifboxed\surroundwithmdframed{solution}\fi} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\stopsolutions} -% \begin{macrocode} -\newcommand\stopsolutions{\excludecomment{solution}} -% \end{macrocode} -% \end{macro} -% -% so it only remains to start/stop solutions depending on what option was specified. -% -% \begin{macrocode} -\ifsolutions\startsolutions\else\stopsolutions\fi -% \end{macrocode} -% -% \begin{macrocode} -\ifexnotes -\newenvironment{exnote}[1][]% -{\par\smallskip\hrule\smallskip\noindent\textbf{Note: }\small} -{\smallskip\hrule} -\else%ifexnotes -\excludecomment{exnote} -\fi%ifexnotes -\ifhints -\newenvironment{hint}[1][]% -{\par\smallskip\hrule\smallskip\noindent\textbf{Hint: }\small} -{\smallskip\hrule} -\newenvironment{exhint}[1][]% -{\par\smallskip\hrule\smallskip\noindent\textbf{Hint: }\small} -{\smallskip\hrule} -\else%ifhints -\excludecomment{hint} -\excludecomment{exhint} -\fi%ifhints -% \end{macrocode} -% -% \subsection{Multiple Choice Blocks}\label{sec:impl:mcq} -% -% \begin{environment}{mcb} -% \ednote{MK: maybe import something better here from a dedicated MC package} -% \begin{macrocode} -\newenvironment{mcb} -{\begin{enumerate}} -{\end{enumerate}} -% \end{macrocode} -% \end{environment} -% we define the keys for the |mcc| macro -% \begin{macrocode} -\srefaddidkey{mcc} -\addmetakey{mcc}{feedback} -\addmetakey[T]{mcc}{T} -\addmetakey[F]{mcc}{F} -\addmetakey[Yes]{mcc}{Ttext} -\addmetakey[No]{mcc}{Ftext} -% \end{macrocode} -% -% \begin{macro}{\mcc} -% \begin{macrocode} -\newcommand\mcc[2][]{% -\metasetkeys{mcc}{#1}% -\item #2% -\ifsolutions\\% -\ifcsstring{mcc@T}{T}{}{\mcc@Ttext}% -\ifcsstring{mcc@F}{F}{}{\mcc@Ftext}% -\ifx\mcc@feedback\@empty!\else, \mcc@feedback\fi% -\fi} %solutions -% \end{macrocode} -% \end{macro} -% -% \subsection{Including Problems}\label{sec:impl:includeproblem} -% -% \begin{macro}{\includeproblem} -% The |\includeproblem| command is essentially a glorified |\input| statement, it sets -% some internal macros first that overwrite the local points. Importantly, it resets the -% |inclprob| keys after the input. -% \begin{macrocode} -\addmetakey{inclprob}{pts} -\addmetakey{inclprob}{min} -\addmetakey*{inclprob}{title} -\addmetakey{inclprob}{refnum} -\addmetakey{inclprob}{mhrepos} -\clear@inclprob@keys%initially -\newcommand\includeproblem[2][]{\metasetkeys{inclprob}{#1}% -\input{#2}\clear@inclprob@keys} -% \end{macrocode} -% \end{macro} -% -% \subsection{Reporting Metadata} -% -% \begin{macrocode} -\def\pts#1{\ifpts\marginpar{#1 pt}\fi} -\def\min#1{\ifmin\marginpar{#1 min}\fi} -% \end{macrocode} -% -% \begin{macrocode} -\AtEndDocument{\ifpts\message{Total: \arabic{pts} points}\fi -\ifmin\message{Total: \arabic{min} minutes}\fi} -% \end{macrocode} -% -% \begin{macro}{\show@pts} -% The |\show@pts| shows the points: if no points are given from the outside and also no -% points are given locally do nothing, else show and add. If there are outside points -% then we show them in the margin. -% \begin{macrocode} -\newcounter{pts} -\def\show@pts{\ifx\inclprob@pts\@empty% -\ifx\problem@pts\@empty\else% -\ifpts\marginpar{\problem@pts pt\smallskip}\addtocounter{pts}{\problem@pts}\fi% -\fi\else% inclprob@pts nonempty -\ifpts\marginpar{\inclprob@pts pt\smallskip}\addtocounter{pts}{\inclprob@pts}\fi% -\fi} -% \end{macrocode} -% \end{macro} -% and now the same for the minutes -% \begin{macro}{\show@min} -% \begin{macrocode} -\newcounter{min} -\def\show@min{\ifx\inclprob@min\@empty% -\ifx\problem@min\@empty\else% -\ifmin\marginpar{\problem@min min}\addtocounter{min}{\problem@min}\fi% -\fi\else% -\ifmin\marginpar{\inclprob@min min}\addtocounter{min}{\inclprob@min}\fi -\fi} -%</package> -% \end{macrocode} -% \end{macro} -% \Finale -\endinput -% \iffalse -% LocalWords: GPL structuresharing STR dtx pts keyval xcomment CPERL DefKeyVal iffalse -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: -% \fi -% LocalWords: RequirePackage Semiverbatim DefEnvironment OptionalKeyVals soln texttt baz -% LocalWords: exnote DefConstructor inclprob NeedsTeXFormat omd.sty textbackslash exfig -% LocalWords: stopsolution fileversion filedate maketitle setcounter tocdepth newpage -% LocalWords: tableofcontents showmeta showmeta solutionstrue usepackage minipage hrule -% LocalWords: linewidth elefants.prob Elefants smallskip noindent textbf startsolutions -% LocalWords: startsolutions stopsolutions stopsolutions includeproblem includeproblem -% LocalWords: textsf HorIacJuc cscpnrr11 includemhproblem includemhproblem importmodule -% LocalWords: importmhmodule foobar ldots latexml mhcurrentrepos mh-variants mh-variant -% LocalWords: compactenum langle rangle langle rangle ltxml metakeys newif ifexnotes rm -% LocalWords: exnotesfalse exnotestrue ifhints hintsfalse hintstrue ifsolutions ifpts -% LocalWords: solutionsfalse ptsfalse ptstrue ifmin minfalse mintrue ifboxed boxedfalse -% LocalWords: boxedtrue sref mdframed marginpar prob srefaddidkey addmetakey refnum kv -% LocalWords: newcounter ifx thesection theproblem hfill newenvironment metasetkeys ltx -% LocalWords: stepcounter currentsectionlevel xspace ignorespaces surroundwithmdframed -% LocalWords: omdoc autoopen autoclose solvedinminutes kvi qw vals newcommand exhint -% LocalWords: specialcomment excludecomment mhrepos xref marginpar addtocounter doctex -% LocalWords: mh@currentrepos endinput - diff --git a/macros/latex/contrib/stex/sty/problem/problem.ins b/macros/latex/contrib/stex/sty/problem/problem.ins deleted file mode 100644 index 5254c98da6..0000000000 --- a/macros/latex/contrib/stex/sty/problem/problem.ins +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% This file generates files required to use the problem package. -%% At your command prompt write -%% -%% latex problem.ins -%% -%% Copyright(c) 2007 Michael Kohlhase -%% The development version of this file can be found at -%% $HeadURL: https://svn.kwarc.info/repos/stex-content/sty/problem/problem.ins $ -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{problem.sty}{\from{problem.dtx}{package}}} - -\Msg{*} -\Msg{* You probably need to move the file problem.sty into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/problem/problem.pdf b/macros/latex/contrib/stex/sty/problem/problem.pdf Binary files differdeleted file mode 100644 index 0a01800f16..0000000000 --- a/macros/latex/contrib/stex/sty/problem/problem.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/rfdmeta/README b/macros/latex/contrib/stex/sty/rfdmeta/README deleted file mode 100644 index 3f3b9edf4d..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/rfdmeta/certification.pdf b/macros/latex/contrib/stex/sty/rfdmeta/certification.pdf Binary files differdeleted file mode 100644 index 429ce535e4..0000000000 --- a/macros/latex/contrib/stex/sty/rfdmeta/certification.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/rfdmeta/certification.tex b/macros/latex/contrib/stex/sty/rfdmeta/certification.tex deleted file mode 100644 index 85fa8b7f38..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/rfdmeta/rdfmeta.dtx b/macros/latex/contrib/stex/sty/rfdmeta/rdfmeta.dtx deleted file mode 100644 index c2425516fe..0000000000 --- a/macros/latex/contrib/stex/sty/rfdmeta/rdfmeta.dtx +++ /dev/null @@ -1,459 +0,0 @@ -% \iffalse meta-comment -% An Infrastructure for extending macros by general metadata keys -% Copyright (c) 2007 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<*package> -\NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{rdfmeta}[2019/03/20 v0.2 Metadata key upgrades] -%</package> -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage[sectioning]{rdfmeta} -\usepackage{url,array,float,stex-logo} -\usepackage[show]{ed} -\usepackage{listings} -\lstset{basicstyle=\small\tt,columns=flexible} -\lstset{frame=none,numbers=none,lineskip=-.7ex,aboveskip=-.5ex,belowskip=-.5ex} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{ctangit} -\usepackage{hyperref} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\def\githubissue#1{\cite{sTeX:github:on}, \hyperlink{https://github.com/KWARC/sTeX/issues/#1}{issue #1}} -\def\omdoc{OMDoc\xspace} -\def\omdocv#1{OMDoc{#1}\xspace} -\begin{document} -\RecordChanges -\DocInput{rdfmeta.dtx} -\end{document} -%</driver> -% \fi -% -%\CheckSum{175} -% -% \changes{v0.1}{2010/03/05}{new} -% \changes{v0.2}{2010/09/01}{starred forms work now, more documentation} -% -% \GetFileInfo{rdfmeta.sty} -% -% \MakeShortVerb{\|} -% \def\latexml{{\LaTeX}ML} -% -% \title{RDFa Metadata in {\LaTeX}\thanks{Version {\fileversion} (last revised -% {\filedate})}} -% \author{Michael Kohlhase \\ -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}} -% \maketitle -% \begin{abstract} -% The |rdfmeta| package allows mark up Ontology-based Metadata in {\LaTeX} documents -% that can be harvested by automated tools or exported to PDF. -% \end{abstract} -%\tableofcontents -%\begin{center}\bf\Huge -% Experimental!\\ -% do not use! -%\end{center}\newpage -% -% \section[id=intro]{Introduction} -% -% The |rdfmeta| package allows mark up extensible metadata in \stex documents, so that -% that it can be harvested by automated tools or exported to PDF. It is also intended to -% support the new metadata infrastructure for the {\omdoc} format~\cite{Kohlhase:OMDoc1.2} -% introduced in {\omdocv{1.3}}~\cite{Kohlhase:OMDoc1.3} (see~\cite{LK:MathOntoAuthDoc09} -% for the relevant ideas and and~\cite{KohKohLan:ssffld10:biblatex} for an application). -% -% Metadata are annotated as key value pairs in the semantic environments provided by -% \stex. In most markup formats, the metadata vocabularies are fixed by the language -% designer. In \stex, the |rdfmeta| package allows the user to extend the metadata -% vocabulary. -% -% \begin{exfig}[ht] -% \begin{verbatim} -% \importmodule[../ontologies/cert]{certification} -% ... -% \section[id=userreq,hasState=$\statedocrd{\tuev}$]{User Requirements} -% ... -% \end{verbatim} -% \vspace*{-1.5em}\hrule -% \lstinputlisting[language=XMl,morekeywords={imports,metadata,resource,link,omgroup},aboveskip=.5ex]{hasstate.omdoc} -% \caption{Metadata for Certification}\label{fig:hasState} -% \end{exfig} -% -% Take, for instance, the case where we want to use metadata for the certification status -% of document fragments. In Figure~\ref{fig:hasState} we use the |hasState| key to say -% that a section has been approved by the T\"UV, a specific certification agency. There -% are two concerns here. First, the |hasState| key has to be introduced and given a -% meaning, and same for the (complex) value |\statedocrd{\tuev}|. This meaning is given in -% the |certifiation| ontology which we imported via the |\importmodule| command. The -% ontology can be marked up in \stex (see Figure~\ref{fig:certification}), with the -% exception that we use the |\keydef| macro for the definition of the |hasState| relation -% so that it also defines the key. For the details of this see the next section. -% -% \section[id=user]{User Interface} -% -% We now document the specifics of the environments and macros provided by the |rdfmeta| -% package from a user perspective. -% -% \subsection[id=sec:user:options]{Package Options} -% -% The |rdfmeta| package takes the option: \DescribeMacro{showmeta}|showmeta|. If this is -% set, then the metadata keys are shown (see~\cite{Kohlhase:metakeys:ctan} for details and -% customization options). -% -% The remaining options can be used to specify metadata upgrades of standard keys. The -% \DescribeMacro{sectioning}|sectioning| option upgrades the |\part|, |\chapter|, -% |\section|, |\subsection|, |\subsubsection|, |\paragraph| macros (and of course their -% starred variants). -% -% \subsection[id=sec:user:keydef]{Extending Macros and Environments by Metadata Keys} -% -% The main user-visible feature of the |rdfmeta| package is the -% \DescribeMacro{\keydef}|keydef| macro. It takes two arguments, a ``key group -% identifier'' and a key name. In a nutshell, every \stex command that takes metadata keys -% comes with a ``key group identifier'' that identifies the set of admissible keys; -% see~\cite{Kohlhase:metakeys:ctan} for details on this concept. Figure~\ref{fig:keygroups} -% gives an overview over the key groups and their identifiers in \stex. -% \begin{figure} -% \begin{tabular}{|>{\tt}l|>{\tt}p{5.5cm}|>{\tt}p{2.4cm}|}\hline -% \rmfamily\textbf{Key Group Identifier} & \rmfamily\textbf{Macros} & \rmfamily\textbf{Package/Class} \\\hline\hline -% dcm@person & DCMPerson & dcm.sty\\\hline -% dcm@institution & DCMInstitution & dcm.sty\\\hline -% dcm@sect & section & dcm.sty\\\hline -% assig & assignment & hwexam.cls\\\hline -% inclassig & includeassignment & hwexam.cls\\\hline -% quizheading & quizheading & hwexam.cls\\\hline -% testheading & quizheading & hwexam.cls\\\hline -% module & module & modules.sty\\\hline -% termdef & termdef & modules.sty \\\hline -% view & view & modules.sty\\\hline -% omgroup & omgroup & omdoc.sty\\\hline -% ignore & ignore & omdoc.sty\\\hline -% omtext & omtext, definition, axiom, assertion, example, inlinedef & omtext.sty, statements.sty\\\hline -% phrase & phrase & omtext.sty\\\hline -% problem & problem & problem.sty\\\hline -% inclprob & includeproblem & problem.sty\\\hline -% req & requirement & reqdoc.sty\\\hline -% spf & sproof, spfcases, spfcase, spfstep, spfcomment & sproof.sty\\\hline -% termref & termref & statements.sty \\\hline -% symboldec & symboldec & statements.sty\\\hline -% \end{tabular} -% \caption{Key Group Identifiers in \protect\stex}\label{fig:keygroups} -% \end{figure} -% -% Semantically, |\keydef{|\meta{keygroup}|}{|\meta{key}|}| defines a symbol just like the -% |\symdef| macro from the |modules| package~\cite{KohAmb:smmssl:ctan}. But it also -% extends the syntax of \stex itself: it adds a key \meta{key} to \meta{keygroup}, which -% allows to state the corresponding metadata as a key/value pair in the \stex macro or -% environment. Following the ideas from~\cite{LK:MathOntoAuthDoc09}, the metadata is -% transformed to RDFa metadata~\cite{w3c:WD-rdfa-core-20100803} in {\omdoc}, where the -% identifiers of relations are exactly the symbols introduced by the corresponding -% |\keydef|. -% -% \begin{exfig}[ht] -% \lstinputlisting[language=TeX,morekeywords={metalanguage}]{certification} -% \caption{A simple Ontology on Certification}\label{fig:certification} -% \end{exfig} -% -% In our example in Figure~\ref{fig:certification} we have defined a key |hasstate| in the -% |omtext| key group\footnote{For the \texttt{\textbackslash omtext} environment and key group -% see~\cite{Kohlhase:smmtf:ctan}} and a symbol |hasstate| via -% |\addkey{omtext}{hasstate}|. Furthermore, we have defined the meaning of the relation -% expressed by the |hasstate| symbol informally and specified some possible objects for -% the relation (that could of course have been done in other modules as well). We have -% made use of this metadata ontology and the new key |hasState| in the example in -% Figure~\ref{fig:hasState}. -% -% \subsection{Redefinitions of Common {\LaTeX} Macros and Environments} -% -% The |rdfmeta| package redefines common {\LaTeX} commands (e.\,g.\ the sectioning macros) -% so that they include optional KeyVal arguments that can be extended by |\keydef| -% commands. With this extension, we can add RDFa metadata to any existing {\LaTeX} -% document and generate linked data (XHTML+RDFa documents) via the {\latexml} -% translator. -% -% \subsection[id=redefining]{Extending Packages with \texttt{rdfmeta}} -% -% The |rdfameta| package also exposes its internal infrastructure for extending the -% redefinitions. Note that the upgrade macros can only be used in {\LaTeX} packages, as -% the macro names contain |@|. Consequently, this section is only addressed at package -% developers who want to extend existing (i.e. not written by them) packages with flexible -% metadata functionality. -% -% \DescribeMacro{\rdfmeta@upgrade}|\rdfmeta@upgrade| is the basic upgrade macro. It takes -% an optional keyval argument an a command sequence \meta{cseq} as a proper argument and -% (if that is defined), redefines |\|\meta{cseq} to take a keyval argument. There is a -% variant \DescribeMacro{\rdfmeta@upgrade*}|\rdfmeta@upgrade*| that has to be used to -% upgrade macros that have a starred form (e.g. |\section| and friends). Note that -% |\rdfmeta@upgrade*| upgrades both forms (e.g. |\section| and |\section*|). -% -% |\rdfmeta@upgrade| uses four keys to specify the behavior in the case the the macro to -% be upgraded already has an optional argument. For concreteness, we introduce them using -% the |\section| macro from standard {\LaTeX} as an example. |\section| has an optional -% argument for the ``short title'', which will appear in the table of contents. The -% \DescribeMacro{optarg}|optarg| key can be used to specify a key for the existing -% optional argument. Thus, after upgrading it via -% |\rdfmeta@upgrade*[optarg=short]{section}|, we can use the updated form -% |\section[short=|\meta{toctitle}|]{|\meta{title}|}| instead of the old -% |\section[|\meta{toctitle}|]{|\meta{title}|}|. Actually, this still has a problem: the -% |\section*| would also be given the |short| key and would be passed an optional argument -% (which it does not accept). To remedy this we can set the -% \DescribeMacro{optargstar}|optargstar| key to |no|. In summary, the correct upgrade -% command for |\section| and |\section*| would be -% \begin{verbatim} -% \rdfmeta@upgrade*[optarg=short,optargstar=no]{section} -% \end{verbatim} -% The |\rdfmeta@upgrade*| macro also initializes a metadata key-group (a named set of -% keys and their handlers; see~\cite{Kohlhase:metakeys:svn} for details) for the section -% macro with an |id| key for identification (see~\cite{Kohlhase:sref*} for -% details). Often, the name of the key-group is the same as the command sequence, so we -% take this as the default, if we want to specify a different metadata key-group name, we -% can do so with the \DescribeMacro{keygroup}|keygroup| key in |\rdfmeta@upgrade*|. -% -% If \DescribeMacro{idlabel}|idlabel| is set to \meta{prefix}, then the {\LaTeX} label is -% set to the value \meta{prefix}|.|\meta{id}, where \meta{id} is the value given in the -% RDFa |id| key. This allows to use the normal {\LaTeX} referencing mechanism in addition -% to the semantic referencing mechanism provided by the |sref| -% package~\ctancite{Kohlhase:sref}. -% -% \subsection[id=limitations]{Limitations} -% -% In this section we document known limitations. If you want to help alleviate them, -% please feel free to contact the package author. Some of them are currently discussed in -% the \sTeX GitHub repository~\cite{sTeX:github:on}. -% -% \begin{enumerate} -% \item Currently the coverage of the redefinitions of standard commands in the -% \url{rdfmeta} package is minimal; we will extend this in the future. -% \item The |\rdfmeta@upgrade| macro only works with single arguments, this should be easy -% to fix with |\case| for the argument string. -% \item I am not sure |\rdfmeta@upgrade| works with environments. -% \item it would be convenient, if we had a macro |\keydefs|, which takes a list of -% keygroups, so that we can define keys in multiple groups in one go, -% e.g. |\keydefs{omtext,omgroup}{hasState}| in Figure~\ref{fig:certification}. But the -% obvious ``solution'' -% \begin{verbatim} -% \newcommand\keydefs[2]{\@for\@I:=#1\do{\keydef{#1}{#2}}} -% \end{verbatim} -% does not work for me. -% \end{enumerate} -% -% \StopEventually{\printbibliography} -% -% \section[id=impl]{The Implementation} -% -% \subsection{Package Options}\label{sec:impl:options} -% -% We declare some switches which will modify the behavior according to the package -% options. Generally, an option |xxx| will just set the appropriate switches to true -% (otherwise they stay false).\ednote{need an implementation for {\latexml}} -% -% \begin{macrocode} -%<*package> -\newif\if@rdfmeta@sectioning\@rdfmeta@sectioningfalse -\DeclareOption{sectioning}{\@rdfmeta@sectioningtrue} -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{sref} - \PassOptionsToPackage{\CurrentOption}{modules}} -\ProcessOptions -% \end{macrocode} -% -% The first measure is to ensure that the right packages are loaded. From the from {\stex} -% collection, we need the |sref| package (see~\ctancite{Kohlhase:sref}) for handling keys, -% the |modules| package for exporting the |\keydef| (see~\ctancite{KohAmb:smmssl}). -% -% \begin{macrocode} -\RequirePackage{sref} -\RequirePackage{modules} -% \end{macrocode} -% -% and we define a macro \DescribeMacro{\rdfmeta@loaded}|rdfmeta@loaded| just for the -% purpose of determining whether the |rdfmeta| package is loaded. -% -% \begin{macro}{\rdfmeta@loaded} -% \begin{macrocode} -\newcommand\rdfmeta@loaded{yes} -% \end{macrocode} -% \end{macro} -% -% And another macro \DescribeMacro{\rdfmeta@sectioning}|rdfmeta@sectioning| to determine -% wether the sectioning macros have been redefined. -% -% \begin{macro}{\rdfmeta@loaded} -% \begin{macrocode} -\if@rdfmeta@sectioning\newcommand\rdfmeta@sectioning{yes}\fi -% \end{macrocode} -% \end{macro} -% -% \subsection[id=impl:keydef]{Key Definitions} -% -% \begin{macro}{\keydef} -% The |\keydef| macro is rather simple, we just add a key to the respective environment -% and extend the export token register for the current module by an |\addmetakey| -% instruction. -% \begin{macrocode} -\newcommand\keydef[2]{\addmetakey{#1}{#2}% -\expandafter\g@addto@macro\this@module{\addmetakey{#1}{#2}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\listkeydef} -% The |\listkeydef| macro is analogous, but uses |\addmetalistkey| instead. -% instruction. -% \begin{macrocode} -\newcommand\listkeydef[2]{\addmetalistkey{#1}{#2}% -\expandafter\g@addto@macro\this@module{\addmetalistkey{#1}{#2}}} -% \end{macrocode} -% \end{macro} -% -% \subsection[id=impl:upgrade]{RDFa upgrade Facilities} -% -% We first define the keys for the |\rdfmeta@upgrade| macro. -% \begin{macrocode} -\def\@yes@{yes} -\addmetakey*{upgrade}{idlabel} -\addmetakey*{upgrade}{optarg} -\addmetakey*[yes]{upgrade}{optargstar} -\addmetakey*{upgrade}{keygroup} -% \end{macrocode} -% -% \begin{macro}{\rdfmeta@upgrade} -% This upgrade macro gives extended functionality according to the optional keys. The -% top-level invocation just differentiates on whether a star is following: -% \begin{macrocode} -\def\rdfmeta@upgrade{\@ifstar\rdfmeta@upgrade@star\rdfmeta@upgrade@nostar} -% \end{macrocode} -% Both cases are almost the same, they only differ in the third line where they call -% |\rdfmeta@upgrade@base| or |\rdfmeta@upgrade@base@star| defined above. In particular, -% both take the arguments originally intended for |\rdfmeta@upgrade|. -% \begin{macrocode} -\newcommand\rdfmeta@upgrade@nostar[2][]{\metasetkeys{upgrade}{#1}% -\ifx\upgrade@keygroup\@empty\def\@@group{#2}\else\def\@@group{\upgrade@keygroup}\fi -\rdfmeta@upgrade@base{#2}{\@nameuse{\@@group @\upgrade@optarg}}} -% \end{macrocode} -% They set the metakeys from the second argument, then set |\@@group| to be the intended -% group (if the |keygroup| key was specified, it takes precedence over the default -% |#2|). -% \begin{macrocode} -\newcommand\rdfmeta@upgrade@star[2][]{\metasetkeys{upgrade}{#1}% -\ifx\upgrade@keygroup\@empty\def\@@group{#2}\else\def\@@group{\upgrade@keygroup}\fi -\rdfmeta@upgrade@base@star{#2}{\@nameuse{\@@group @\upgrade@optarg}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\rdfmeta@upgrade@base} -% This auxiliary macro and is invoked as -% |\rdfmeta@upgrade@base{|\meta{cseq}|}{|\meta{optarg}|}|, where \meta{cseq} is a -% command sequence name. It checks if |\|\meta{cseq} is defined (if not it does -% nothing), saves the old behavior of |\|\meta{cseq} as |\rdfmeta@|\meta{cseq}|@old|, -% and then redefines |\|\meta{cseq} to take a keyval argument and passes \meta{optarg} -% as the optional argument. -% \begin{macrocode} -\newcommand\rdfmeta@upgrade@base[2]{\@ifundefined{#1}{}% -{\message{redefining macro #1,} -\ifx\upgrade@idlabel\@empty\srefaddidkey{#1}\else\srefaddidkey[prefix=\upgrade@idlabel]{#1}\fi% -\expandafter\let\csname rdfmeta@#1@old\expandafter\endcsname\csname #1\endcsname% -\expandafter\renewcommand\csname #1\endcsname[2][]% -{\metasetkeys{#1}{##1}\@nameuse{rdfmeta@#1@old}[#2]{##2}} -\addmetakey*\@@group{\upgrade@optarg}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\rdfmeta@upgrade@base@star} -% This is a variant of |\rdfmeta@upgrade@base|, which also takes care of the starred -% variants of a macro. -% \begin{macrocode} -\newcommand\rdfmeta@upgrade@base@star[2]{\@ifundefined{#1}{}% -{\message{redefining macros #1 and #1*,} -\ifx\upgrade@idlabel\@empty\srefaddidkey{#1}\else\srefaddidkey[prefix=\upgrade@idlabel]{#1}\fi% -\expandafter\let\csname rdfmeta@#1@old\expandafter\endcsname\csname #1\endcsname% -% \end{macrocode} -% In this case, we cannot just use |\newcommand| for dealing with the optional argument -% because the star is between the command sequence and the arguments. So we make a case -% distinction on the presence of the star. -% |\rdfmeta@|\meta{cseq}|@old|. -% \begin{macrocode} -\expandafter\renewcommand\csname #1\endcsname% -{\@ifstar{\@nameuse{rdfmeta@#1@star}}{\@nameuse{rdfmeta@#1@nostar}}}% -% \end{macrocode} -% the macros |\rdfmeta@|\meta{cseq}|@star| and |\rdfmeta@|\meta{cseq}|@nostar| that are -% defined in terms of |\rdfmeta@|\meta{cseq}|@old| handle the necessary cases. The second -% one is simple: -% \begin{macrocode} -\expandafter\newcommand\csname rdfmeta@#1@nostar\endcsname[2][]% -{\metasetkeys{#1}{##1}\edef\@test{#2}% -\ifx\@test\@empty\@nameuse{rdfmeta@#1@old}{##2}% -\else\@nameuse{rdfmeta@#1@old}[#2]{##2}\fi}% -% \end{macrocode} -% For |\rdfmeta@|\meta{cseq}|@star| we have to take care of the optional argument of the -% old macro: if the |optargstar| key was set, then we pass the second argument of -% |\rdfmeta@upgrade@base| as an optional argument to it as above. -% \begin{macrocode} -\ifx\upgrade@optargstar\@yes@% -\expandafter\newcommand\csname rdfmeta@#1@star\endcsname[2][]% -{\metasetkeys{#1}{##1}\@nameuse{rdfmeta@#1@old}*[#2]{##2}}% -\else% -\expandafter\newcommand\csname rdfmeta@#1@star\endcsname[2][]% -{\metasetkeys{#1}{##1}\@nameuse{rdfmeta@#1@old}*{##2}}% -\fi% -\addmetakey*\@@group{\upgrade@optarg}}} -% \end{macrocode} -% \end{macro} -% -% \subsection[id=impl:redef]{Redefinitions} -% -% If the |sectioning| macro is set, we redefine the respective commands -% -% \begin{macrocode} -\if@rdfmeta@sectioning -\message{redefining sectioning commands!} -\rdfmeta@upgrade*[optarg=short,optargstar=no]{part} -\rdfmeta@upgrade*[optarg=short,optargstar=no]{chapter} -\rdfmeta@upgrade*[optarg=short,optargstar=no]{section} -\rdfmeta@upgrade*[optarg=short,optargstar=no]{subsection} -\rdfmeta@upgrade*[optarg=short,optargstar=no]{subsubsection} -\rdfmeta@upgrade*[optarg=short,optargstar=no]{paragraph} -\fi -%</package> -% \end{macrocode} -% \Finale -\endinput -% \iffalse -% LocalWords: GPL structuresharing STR LaTeX dcm dtx keyval sref CPERL url qw -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: -% \fi -% LocalWords: RequirePackage birthdate personaltitle academictitle workaddress -% LocalWords: privaddress worktel privtel workfax privfax worktelfax noDelim -% LocalWords: privtelfax getKeyValue valuelist ToString getValue affill STDERR -% LocalWords: ExportMetadata AssignValue DCMperson DefConstructor afterDigest -% LocalWords: getArg setValue FishOutMetadata keyvals foreach idlist tabline -% LocalWords: LookupValue insertElement atabline bitabline shorttitle nc args -% LocalWords: sharealike noderivativeworks DefMacro authorblock subsubsection -% LocalWords: contribs OptionalKeyVals omgroup omdoc srcref xml RawTeX -% LocalWords: openElement iffalse kohlhase Thu rdfmeta latexml fileversion omd -% LocalWords: maketitle setcounter tocdepth tableofcontents newpage section -% LocalWords: stex exfig vspace hrule lstinputlisting morekeywords aboveskip -% LocalWords: hasstate.omdoc statedocrd tuev certifiation keydef ednote texttt -% LocalWords: keysets rdfameta cseq idlabel ctancite ifundefined impl ltxml -% LocalWords: printbibliography newcommand srefaddidkey expandafter csname ifx -% LocalWords: expandafter endcsname csname endcsname renewcommand showmeta -% LocalWords: symdef redef doctex showmeta metakeys keyset textbackslash cert -% LocalWords: MathOntoAuthDoc09 WD-rdfa-core-20100803 hasstate omtext omtext -% LocalWords: addkey optarg optarg toctitle optargstar optargstar keygroup -% LocalWords: oldpart textsf langle textsf langle newif sectioningfalse ifstar -% LocalWords: sectioningtrue metasetkeys nameuse addmetakey nostar diff --git a/macros/latex/contrib/stex/sty/rfdmeta/rdfmeta.ins b/macros/latex/contrib/stex/sty/rfdmeta/rdfmeta.ins deleted file mode 100644 index d8ee3d6bad..0000000000 --- a/macros/latex/contrib/stex/sty/rfdmeta/rdfmeta.ins +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% This file generates files required to use the ed package. -%% At your command prompt write -%% -%% latex rdfmeta.ins -%% -%% Copyright(c) 2008 Michael Kohlhase -%% The development version of this file can be found at -%% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/rdfmeta/rdfmeta.ins $ -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{rdfmeta.sty}{\from{rdfmeta.dtx}{package}}} - -\Msg{*} -\Msg{* You probably need to move the file rdfmeta.sty into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/rfdmeta/rdfmeta.pdf b/macros/latex/contrib/stex/sty/rfdmeta/rdfmeta.pdf Binary files differdeleted file mode 100644 index 7f5c0907f6..0000000000 --- a/macros/latex/contrib/stex/sty/rfdmeta/rdfmeta.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/smglom/README b/macros/latex/contrib/stex/sty/smglom/README deleted file mode 100644 index ff6a71db6b..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/smglom/smglom.dtx b/macros/latex/contrib/stex/sty/smglom/smglom.dtx deleted file mode 100644 index 4063a66d03..0000000000 --- a/macros/latex/contrib/stex/sty/smglom/smglom.dtx +++ /dev/null @@ -1,398 +0,0 @@ -% \iffalse meta-comment -% A LaTeX Class and Package for the SMGloM Glossary -% Copyright (c) 2009 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<package|cls>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<cls>\ProvidesClass{smglom}[2019/03/20 v0.1 Semantic Multilingual Glossary for Math] -%<sty>\ProvidesPackage{smglom}[2019/03/20 v0.1 Semantic Multilingual Glossary for Math] -% -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage{url,array,omdoc,omtext,float} -\usepackage[show]{ed} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{stex-logo} -\usepackage{ctangit} -\usepackage{hyperref} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\def\githubissue#1{\cite{sTeX:github:on}, \hyperlink{hstp://trac.kwarc.info/sTeX/ticket/#1}{issue #1}} -\begin{document} -\DocInput{smglom.dtx} -\end{document} -%</driver> -% \fi -% -%\CheckSum{152} -% -% \changes{v0.1}{2013/12/17}{First Version} -% \changes{v0.1}{2014/2/17}{Renamed ad split into \texttt{smglom.sty} and \texttt{smglom.cls}} -% -% -% \MakeShortVerb{\|} -% -% \def\omdoc{OMDoc\xspace} -% \def\smglom{SMGloM\xspace} -% \def\latexml{{\LaTeX}ML\xspace} -% \title{{\texttt{smglom.cls/sty}}: Semantic Multilingual Glossary for Math} -% \author{Michael Kohlhase\\ -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}} -% \maketitle -% -% \begin{abstract} -% The |smglom| package is 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 {\TeX/\LaTeX} into a document format for -% mathematical knowledge management (MKM). -% -% This package supplies an infrastructure for writing {\omdoc} glossary entries. -% \end{abstract} -% -%\tableofcontents\newpage -% -%\begin{omgroup}[id=sec:STR]{Introduction} -% -% \end{omgroup} -% -% \begin{omgroup}[id=sec:user]{The User Interface}\ -% -% -% \begin{omgroup}[id=sec:user:options]{Package and Class Options} -% |smglom.cls| accepts all options of the |omdoc.cls| and |article.cls| and just passes -% them on to these. -% \end{omgroup} -% -% \begin{omgroup}[id=user:modules]{Convenience Macros for \protect\smglom Modules} -% \ednote{document them} -% \end{omgroup} -% -% \begin{omgroup}[id=user:relations]{Terminological Relations} -% \ednote{document them} -% \end{omgroup} -% -% \begin{omgroup}[id=user:alignments]{Namespaces and Alignments} -% \ednote{MK: maybe this should go into some other module; it seems awfully -% foundational.} In \smglom, we often want to align the content of glossary modules to -% formalizations, e.g. to take advantage of type declarations there. The -% \DescribeMacro{\symalign}|\symalign| macro takes two regular arguments: the first is -% the name symbol declared in the current module (e.g. by a |\symi|), and the second the -% URI name of a symbol in an external theory in the form \meta{theory}|?|\meta{name}. -% -% As full MMT URIs are of the form \meta{URI}|?|\meta{theory}|?|\meta{name}, we need a -% way to specify the \meta{URI}. We adopt the system of \textbf{namespaces} of in MMT: -% the \DescribeMacro{\namespace} macro declares a namespace URI. If the optional -% argument is given, then this is a namespace abbreviation declaration, which can be -% used later, for instance in |\symalign| that takes an optional first argument: the -% namespace of the external theory. -% -% The situation below is typical. We first declare the namespace abbreviation |sets| and -% then use the \DescribeMacro{\modalign}|\modalign| macro to specify that the external -% theory |sets:?ESet| is the default alignment target, i.e. any symbol that in the local -% |emptyset| module is aligned by default to the symbol with the same name in the -% external |sets:?ESet| theory. -% -% \begin{verbatim} -% \begin{modsig}[creators=miko]{emptyset} -% \gimport{set} -% \namespace[sets]{http://mathhub.info/MitM/smglom/sets} -% \modalign[sets]{ESet} -% -% \symdef{eset}{\emptyset} -% \symi{non-empty} -% \symalign{non-empty}{ESet?non_empty} -% \end{modsig} -% \end{verbatim} -% -% The default alignment breaks down for the symbol |non-empty|, so we specify an -% alignment to the symbol |Eset?non_empty| via |\symalign|. -% \end{omgroup} -% \end{omgroup} -% -% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography}\newpage -% -% \begin{omgroup}[id=sec:impl:cls]{Implementation: The SMGloM Class} -% -% \begin{omgroup}[id=sec:impl:cls:options]{Class Options} -% -% To initialize the |smglom| class, we pass on all options to |omdoc.cls| as well as the -% |stex| and |smglom| packages. -% -% \begin{macrocode} -%<*cls> -\DeclareOption*{\PassOptionsToClass{\CurrentOption}{omdoc} - \PassOptionsToPackage{\CurrentOption}{stex} - \PassOptionsToPackage{\CurrentOption}{smglom}} -\ProcessOptions -% \end{macrocode} -% -% We load |omdoc.cls|, the |smglom| package that provides the SMGloM-specific -% functionality\ednote{MK:describe that above}, and the |stex| package to allow OMDoc -% compatibility. -% -% \begin{macrocode} -\LoadClass{omdoc} -\RequirePackage{smglom} -\RequirePackage{stex} -\RequirePackage{amstext} -\RequirePackage{amsfonts} -%</cls> -% \end{macrocode} -% -% Now we do the same thing for the package; first the options, which we just pass on to -% the |stex| package. -% -% \begin{macrocode} -%<*sty> -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{statements} - \PassOptionsToPackage{\CurrentOption}{structview} - \PassOptionsToPackage{\CurrentOption}{smultiling}} -\ProcessOptions -% \end{macrocode} -% -% We load |omdoc.cls|, and the desired packages. For the {\latexml} bindings, we make sure -% the right packages are loaded. -% -% \begin{macrocode} -\RequirePackage{statements} -\RequirePackage[langfiles]{smultiling} -\RequirePackage{structview} -% \end{macrocode} -% \end{omgroup} -% -% \begin{omgroup}[id=impl:modules]{Convenience Macros for \protect\smglom Modules} -% \begin{macro}{\gimport} -% Just a shortcut, we have a starred and unstarred version, the first one is conservative. -% For example, if we execute:\newline -% \begin{center} -% |\gimport[smglom/numberfields]{naturalnumbers}|\newline -% \end{center} -% First we are redirected to |\@gimport@nostar|, we store the -% |smglom/numberfields|\meta{the repo's path} in |\@test|, then store -% |\mh@currentrepos|\meta{current directory} in |\mh@repos|. If no repo's path is offered, -% that means the module to import is under the same directory, so we let |repos=\mh@repos| -% and pass bunch of parameters to |\importmhmodule|, which is defined in |module.sty|. If -% there's a repo's path, then we let repos=\meta{the repo's path}. Finally we use -% |\mhcurrentrepos|(defined in |module.sty|) to change the |\mh@currentrepos|. -% \begin{macrocode} -\def\gimport{\@ifstar\@gimport@star\@gimport@nostar}% -\newrobustcmd\@gimport@star[2][]{% - \def\@test{#1}% - \edef\mh@@repos{\mh@currentrepos}% - \ifx\@test\@empty% - \importmhmodule[conservative,repos=\mh@@repos,ext=tex,path=#2]{#2}% - \else% - \importmhmodule[conservative,repos=#1,ext=tex,path=#2]{#2}% - \fi% - \mhcurrentrepos{\mh@@repos}% - \ignorespacesandpars% -}% -\newrobustcmd\@gimport@nostar[2][]{% - \def\@test{#1}% - \edef\mh@@repos{\mh@currentrepos}% - \ifx\@test\@empty% - \importmhmodule[repos=\mh@@repos,ext=tex,path=#2]{#2}% - \else% - \importmhmodule[repos=#1,ext=tex,path=#2]{#2}% - \fi% - \mhcurrentrepos{\mh@@repos}% - \ignorespacesandpars% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{guse} -% just a shortcut -% \begin{macrocode} -\newrobustcmd\guse[2][]{\def\@test{#1}% - \edef\mh@@repos{\mh@currentrepos}% - \ifx\@test\@empty% - \usemhmodule[repos=\mh@@repos,ext=tex,path=#2]{#2}% - \else% - \usemhmodule[repos=#1,ext=tex,path=#2]{#2}% - \fi% - \mhcurrentrepos{\mh@@repos}% - \ignorespacesandpars% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{environment}{gstructure} -% we essentially copy over the definition of |mhstructure|, but adapt it to the \smglom -% situation. -% \begin{macrocode} -\newenvironment{gstructure}[3][]{\def\@test{#1}% - \xdef\mh@@@repos{\mh@currentrepos}% - \ifx\@test\@empty% - \gdef\@@doit{\importmhmodule[repos=\mh@@@repos,path=#3,ext=tex]{#3}}% - \else% - \gdef\@@doit{\importmhmodule[repos=#1,path=#3,ext=tex]{#3}}% - \fi% - \ifmod@show\par\noindent structure import "#2" from module #3 \@@doit\fi% - \ignorespacesandpars} -{\aftergroup\@@doit\ifmod@show end import\fi% - \ignorespacesandparsafterend} -% \end{macrocode} -% \end{environment} -% \end{omgroup} -% -% \begin{omgroup}[id=impl:relations]{Terminological Relations} -% -% \begin{macro}{*nym} -% \begin{macrocode} -\newrobustcmd\hypernym[3][]{\if@importing\else\par\noindent #2 is a hypernym of #3\fi}% -\newrobustcmd\hyponym[3][]{\if@importing\else\par\noindent #2 is a hyponym of #3\fi}% -\newrobustcmd\meronym[3][]{\if@importing\else\par\noindent #2 is a meronym of #3\fi}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\MSC} -% to define the Math Subject Classification, \ednote{MK: what to do for the LaTeXML side?} -% \begin{macrocode} -\newrobustcmd\MSC[1]{\if@importing\else MSC: #1\fi\ignorespacesandpars}% -% \end{macrocode} -% \end{macro} -% \end{omgroup} -% -% \begin{omgroup}[id=impl:alignments]{Namespaces and Alignments} -% -% \begin{macro}{\namespace} -% \begin{macrocode} -\newcommand\namespace[2][]{\ignorespaces} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\modalign} -% \begin{macrocode} -\newcommand\modalign[2][]{\ignorespaces} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\symalign} -% \begin{macrocode} -\newcommand\symalign[3][]{\ignorespaces} -% \end{macrocode} -% \end{macro} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:langbindings]{For Language Bindings} -% -% Here we adapt the |smultiling| functionality to the special situation, where the module -% and file names are identical by design. -% -% \begin{environment}{gviewsig} -% The |gviewsig| environment is just a layer over the |mhviewsig| environment with the keys -% suitably adapted. -% \begin{macrocode} -\newenvironment{gviewsig}[4][]{% keys, id, from, to - \def\test{#1}% - \ifx\@test\@empty% - \begin{mhviewsig}[frompath=#3,topath=#4]{#2}{#3}{#4}% - \else% - \begin{mhviewsig}[frompath=#3,topath=#4,#1]{#2}{#3}{#4}% - \fi% - \ignorespacesandpars% -}{% - \end{mhviewsig}% - \ignorespacesandparsafterend% -}% -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{gviewnl} -% The |gviewnl| environment is just a layer over the |mhviewnl| environment with the -% keys suitably adapted. -% \begin{macrocode} -\newenvironment{gviewnl}[5][]{% keys, id, lang, from, to - \def\@test{#1}\ifx\@test\@empty% - \begin{mhviewnl}[frompath=#4,topath=#5]{#2}{#3}{#4}{#5}% - \else% - \begin{mhviewnl}[frompath=#4,topath=#5,#1]{#2}{#3}{#4}{#5}% - \fi% -\ignorespacesandpars% -}{% - \end{mhviewnl}% - \ignorespacesandparsafterend% -}% -% \end{macrocode} -% \end{environment} -% -% \begin{macro}{\gincludeview} -% \ednote{This is fake for now, needs to be implemented and documented} -% \begin{macrocode} -\newcommand\gincludeview[2][]{\ignorespacesandpars}% -% \end{macrocode} -% \end{macro} -% \end{omgroup} -% -% \begin{omgroup}{Authoring States, etc} -% We add a key to the module environment. -% \begin{macrocode} -\addmetakey{module}{state}% -% \end{macrocode} -% \end{omgroup} -% -% \begin{omgroup}{Shadowing of repositories} -% \begin{macro}{\repos@macro} -% |\repos@macro| parses a GitLab repository name \meta{group}|/|\meta{name} and creates -% an internal macro name from that, which will be used -% \begin{macrocode} -\def\repos@macro#1/#2;{#1@shadows@#2}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\shadow} -% |\shadow{|\meta{orig}|}{|\meta{fork}|}| declares a that the private repository -% \meta{fork} shadows the MathHub repository \meta{orig}. Internally, it simply defines -% an internal macro with the shadowing information. -% \begin{macrocode} -\def\shadow#1#2{\@namedef{\repos@macro#1;}{#2}}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\MathHubPath} -% |\MathHubPath{|\meta{repos}|}| computes the path of the fork that shadows the MathHub -% repository \meta{repos} according to the current |\shadow| specification. The computed -% path can be used for loading modules from the private version of \meta{repos}. -% \begin{macrocode} -\def\MathHubPath#1{\@ifundefined{\repos@macro#1;}{#1}{\@nameuse{\repos@macro#1;}}}% -%</sty> -% \end{macrocode} -% \end{macro} -% \end{omgroup} -% \end{omgroup} -% \Finale -\endinput -% \iffalse -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: -% \fi - -% LocalWords: iffalse cls smglo smglo.dtx omdoc latexml texttt smlog.cls sref SMGloM ifx -% LocalWords: maketitle newpage tableofcontents newpage omgroup ednote ltxml smglom.dtx -% LocalWords: printbibliography showmeta metakeys amstext ginput newrobustcmd sproof cmath -% LocalWords: module-defs gimport renewrobustcmd langbindings gle newenvironment amsfonts -% LocalWords: doctex NeedsTeXFormat langfiles ngerman smultiling xspace formalizations -% LocalWords: symalign symalign symi textbf modalign modalign ESet emptyset initialize -% LocalWords: stex impl:modules unstarred numberfields mh@currentrepos mh@repos 1,ext -% LocalWords: importmhmodule mhcurrentrepos conservative,repos tex,path guse gstructure -% LocalWords: ignorespacesandpars usemhmodule mhstructure xdef gdef 3,ext 1,path nym -% LocalWords: ifmod@show noindent aftergroup ignorespacesandparsafterend impl:relations -% LocalWords: impl:alignments newcommand begingroup catcode`_ gviewsig mhviewsig -% LocalWords: 3,topath gviewnl mhviewnl 4,topath gincludeview addmetakey diff --git a/macros/latex/contrib/stex/sty/smglom/smglom.ins b/macros/latex/contrib/stex/sty/smglom/smglom.ins deleted file mode 100644 index ae653eee88..0000000000 --- a/macros/latex/contrib/stex/sty/smglom/smglom.ins +++ /dev/null @@ -1,31 +0,0 @@ -%% -%% This file generates files required to use the ed package. -%% At your command prompt write -%% -%% latex smultiling.ins -%% -%% Copyright(c) 2014 Michael Kohlhase -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{smglom.sty}{\from{smglom.dtx}{sty}}} -\generate{\file{smglom.cls}{\from{smglom.dtx}{cls}}} - -\Msg{*} -\Msg{* You probably need to move the generated style files into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/smglom/smglom.pdf b/macros/latex/contrib/stex/sty/smglom/smglom.pdf Binary files differdeleted file mode 100644 index 948f4df711..0000000000 --- a/macros/latex/contrib/stex/sty/smglom/smglom.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/smultiling/README b/macros/latex/contrib/stex/sty/smultiling/README deleted file mode 100644 index ff6a71db6b..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/smultiling/smultiling.dtx b/macros/latex/contrib/stex/sty/smultiling/smultiling.dtx deleted file mode 100644 index 8bf96302fc..0000000000 --- a/macros/latex/contrib/stex/sty/smultiling/smultiling.dtx +++ /dev/null @@ -1,599 +0,0 @@ -% \iffalse meta-comment -% A LaTeX Class and Package for the Smultiling Glossary -% Copyright (c) 2009 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<sty>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<sty>\ProvidesPackage{smultiling}[2019/03/20 v0.2 Multilingual Support for sTeX] -% -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage{url,array,omdoc,omtext,float} -\usepackage[show]{ed} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{stex-logo} -\usepackage{ctangit} -\usepackage{hyperref} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\def\githubissue#1{\cite{sTeX:github:on}, \hyperlink{hstp://trac.kwarc.info/sTeX/ticket/#1}{issue #1}} -\def\smglom{\textsf{SMGloM}\xspace} -\def\omdoc{\textsf{OMDoc}\xspace} -\def\latexml{{\LaTeX}ML\xspace} -\def\lmh{\textsf{lmh}\xspace} -\begin{document} -\RecordChanges -\DocInput{smultiling.dtx} -\end{document} -%</driver> -% \fi -% -%\CheckSum{189} -% -% \changes{v0.1}{2014/04/19}{First Version} -% \changes{v0.2}{2017/10/15}{Adding a key-value argument to \texttt{\textbackslash symi} -% and friends for GF metadata} -% -% -% \MakeShortVerb{\|} -% -% \def\omdoc{OMDoc} -% \def\latexml{{\LaTeX}ML} -% \title{{\texttt{smultiling.sty}}: Multilinguality Support for \protect\sTeX} -% \author{Michael Kohlhase\\ -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}\and -% Deyan Ginev\\Authorea} -% \maketitle -% -% \begin{abstract} -% The |smultiling| package is 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 {\TeX/\LaTeX} into a document format for -% mathematical knowledge management (MKM). -% -% The |smultiling| package adds multilinguality support for \sTeX, the idea is that -% multilingual modules in \sTeX consist of a module signature together with multiple -% language bindings that inherit symbols from it, which also account for cross-language -% coordination. -% \end{abstract} -% -%\tableofcontents\newpage -% -%\begin{omgroup}[id=sec:STR]{Introduction} -% We have been using \sTeX as the encoding for the Semantic Multilingual Glossary of -% Mathematics (\smglom; see~\cite{GinIanJuc:spsttom16,SMGloM:gloss:on}). The \smglom data -% model has been taxing the representational capabilities of \sTeX with respect to -% multilingual support and verbalization definitions; see~\cite{Kohlhase:dmesmgm14}, -% which we assume as background reading for this note. -% -% \begin{omgroup}{\protect\sTeX Module Signatures} -% (Monolingual) \sTeX had the intuition that the symbol definitions (|\symdef| and -% |\symvariant|) are interspersed with the text and we generate \sTeX module signatures -% (SMS |*.sms| files) from the \sTeX files. The SMS duplicate ``formal'' information -% from the ``narrative'' \sTeX files. In the \smglom, we extend this idea by making the -% the SMS primary objects that contain the language-independent part of the formal -% structure conveyed by the \sTeX documents and there may be multiple narrative -% ``language bindings'' that are translations of each other -- and as we do not want to -% duplicate the formal parts, those are inherited from the SMS rather than written down -% in the language binding itself. So instead of the traditional monolingual markup in -% Figure~\ref{fig:stex-monolingual}, we we now advocate the divided style in -% Figure~\ref{fig:stex-multiling}. -% -% \begin{exfig} -% \begin{verbatim} -% \begin{module}[id=foo] -% \symdef{bar}{BAR} -% \begin{definition}[for=bar] -% A \defiii{big}{array}{raster} ($\bar$) is a\ldots, it is much -% bigger than a \defiii[sar]{small}{array}{raster}. -% \end{definition} -% \end{module} -% \end{verbatim}\vspace{-2em} -% \caption{A module with definition in monolingual \protect\sTeX}\label{fig:stex-monolingual} -% \end{exfig} -% -% \begin{exfig} -% \begin{verbatim} -% \usepackage{multiling} -% \begin{modsig}{foo} -% \symdef{bar}{BAR} -% \symi[gfc=N]{sar} -% \end{modsig} -% -% \begin{modnl}[creators=miko,primary]{foo}{en} -% \begin{definition} -% A \defiii[bar]{big}{array}{raster} ($\bar$) is a\ldots, it is much bigger -% than a \defiii[sar]{small}{array}{raster}. -% \end{definition} -% \end{modnl} -% -% \begin{modnl}[creators=miko]{foo}{de} -% \begin{definition} -% Ein \defiii[bar]{gro"ses}{Feld}{Raster} ($\bar$) ist ein\ldots, es -% ist viel gr"o"ser als ein \defiii[sar]{kleines}{Feld}{Raster}. -% \end{definition} -% \end{modnl} -% \end{verbatim}\vspace{-2em} -% \caption{Multilingual \protect\sTeX for Figure \protect\ref{fig:stex-monolingual}.} -% \label{fig:stex-multiling} -% \end{exfig} -% -% We retain the old |module| environment as an intermediate stage. It is still useful -% for monolingual texts. Note that for files with a module, we still have to extract -% |*.sms| files. It is not completely clear yet, how to adapt the workflows. We clearly -% need a \lmh or editor command that transfers an old-style module into a new-style -% signature/binding combo to prepare it for multilingual treatment. -% \end{omgroup} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:user]{The User Interface} -% The |smultiling| package accepts the \DescribeMacro{langfiles}|langfiles| option that -% specifies -- for a module \meta{mod} that the module signature file has the name -% \meta{mod}|.tex| and the language bindings of language with the ISO 639 language -% specifier \meta{lang} have the file name -% \meta{mod}|.|\meta{lang}|.tex|.\ednote{implement other schemes, e.g. the onefile -% scheme.} -% -% \begin{omgroup}{Multilingual Modules} -% There the \DescribeEnv{modsig}|modsig| environment works exactly like the old |module| -% environment, only that the |id| attribute has moved into the required argument -- -% anonymous module signatures do not make sense. -% -% The \DescribeEnv{modnl}|modnl| environment takes two arguments the first is the name -% of the module signature it provides language bindings for and the second the ISO 639 -% language specifier of the content language. We add the |primary| key |modnl|, which -% can specify the primary language binding (the one the others translate from; and which -% serves as the reference in case of translation conflicts).\ednote{@Hang: This needs to -% be implemented in LaTeXML} -% -% There is another difference in the multilingual encoding: All symbols are introduced -% in the module signature, either by a |\symdef| or the new \DescribeMacro{\symi}|\symi| -% macro. |\symi[|\meta{keys}|]{|\meta{name}|}| takes a symbol name \meta{name} as an -% argument and reserves that name. The variant -% \DescribeMacro{\symi*}|\symi*[|\meta{keys}|]{|\meta{name}|}| declares \meta{name} to -% be a primary symbol; see~\cite{Kohlhase:dmesmgm14} for a discussion. \sTeX provides -% variants \DescribeMacro{\symii}|\symii|, \DescribeMacro{\symiii}|\symiii|, and -% \DescribeMacro{\symiv}|\symiv| -- and their starred versions -- for multi-part -% names. The key-value interface \meta{keys} does not have any effect on the {\LaTeX} -% rendering, it can be used to embed metadata. See for instance \sref{user:GFmeta}. -% \end{omgroup} -% -% \begin{omgroup}{Multilingual Definitions and Cross-referencing Terms} -% We do not need a new infrastructure for defining mathematical concepts, only the -% realization that symbols are language-independent. So we can use symbols for the -% coordination of corresponding verbalizations. As the example in -% Figure~\ref{fig:stex-multiling} already shows, we can just specify the symbol name in -% the optional argument of the |\defi| macro to establish that the language bindings -% provide different verbalizations of the same symbol. -% -% For multilingual term references the situtation is more complex: For single-word -% verbalizations we could use |\atrefi| for language bindings. Say we have introduced a -% symbol |foo| in English by |\defi{foo}| and in German by |\defi[foo]{Foo}|. Then we -% can indeed reference it via |\trefi{foo}| and |\atrefi{Foo}{foo}|. But one the one -% hand this blurs the distinction between translation and ``linguistic variants'' and on -% the other hand does not scale to multi-word compounds as |bar| in -% Figure~\ref{fig:stex-multiling}, which we would have to reference as -% |\atrefiii{gro"ses Feld Raster}{bar}|. To avoid this, the |smultiling| package -% provides the new macros \DescribeMacro{\mtref}|\mtrefi|, |\mtrefii|, and |\mtrefiii| -% for multilingual references. Using this, we can reference |bar| as -% |\mtrefiii[?bar]{gro"ses}{Feld}{Raster}|, where we use the (up to three) mandatory -% arguments to segment the lexical constituents. -% -% The first argument it syntactically optional to keep the parallelism to |\*def*| -% |\*tref*| it specifies the symbol via its name \meta{name} and module name \meta{mod} -% in a MMT URI \meta{mod}|?|\meta{name}. Note that MMT URIs can be relative: -% \begin{enumerate} -% \item |foo?bar| denotes the symbol |bar| from module |foo| -% \item |foo| the module |foo| (the symbol name is induced from the remaining -% arguments of |\mtref*|) -% \item |?bar| specifies symbol |bar| from the current module -% \end{enumerate} -% Note that the number suffix |i|/|ii|/|iii|/|iv| indicates the number of words in the -% actual language binding, not in the symbol name as in |\atref*|. -% -% Finally note that hyperlinks on term references only have information on the -% underlying symbol and module names -- i.e. signature information -- and we need to -% cross-reference into the language bindings. To do this, we need to know the base -% language of the document. To ensure basic functionality we set this to |en| and -% provide the \DescribeMacro{\sTeXlanguage}|\sTeXlanguage| macro to set it. -% \end{omgroup} -% -% \begin{omgroup}{Multilingual Views} -% Views receive a similar treatment as modules in the |smultiling| package. A -% multilingual view consists of -% \begin{enumerate} -% \item a \textbf{view signature} marked up with the \DescribeEnv{viewsig}|viewsig| -% environment. This takes three required arguments: a view name, the source module, -% and the target module. The optional first argument is for metadata (|display|, -% |title|, |creators|, and |contributors|) and load information (|loadfrom| and -% |loadto|) and -% \item multiple \textbf{language bindings} marked up by the -% \DescribeEnv{viewnl}|viewnl| environment, which takes two required arguments: the -% view name and the language specifier. The optional first key/value argument takes -% the same keys as |viewsig| except the last two. -% \end{enumerate} -% -% \begin{verbatim} -% \begin{viewsig}[creators=miko]{norm-metric}{metric-space}{norm} -% \vassign{base-set}{base-set} -% \fassign{x,y}{\metric{x,y}}{\norm{x-y}} -% \end{viewsig} -% \end{verbatim} -% Views have language bindings just as modules do, in our case, we have -% \begin{verbatim} -% \begin{viewnl}[creators=miko]{norm-metric}{en} -% \obligation{metric-space}{obl.norm-metric.en} -% \begin{assertion}[type=obligation,id=obl.norm-metric.en] -% $\defeq{d(x,y)}{\norm{x-y}}$ is a \trefii[metric-space]{distance}{function} -% \end{assertion} -% \begin{sproof}[for=obl.norm-metric.en] -% {we prove the three conditions for a distance function:} -% ... -% \end{sproof} -% \end{viewnl} -% \end{verbatim} -% -% \end{omgroup} -% -% \begin{omgroup}{Mathematical Keywords} -% For translations of the mathematical keywords, the |statements| and |sproofs| packages -% in \sTeX define special language definition files, -% e.g. |statements-ngerman.ldf|.\ednote{say more about this}\ednote{There is the -% translator package which belongs to beamer, maybe we should switch to that.} There is -% currently only very limited support for this. -% \end{omgroup} -% -% \begin{omgroup}[id=user:GFmeta]{GF Metadata} -% Several \sTeX macros and environments allow keys for syntactical information about the -% objects declared. -% -% The symbol-declaring macros |\symi| and friends as well as |\symdef| allow -% \DescribeMacro{gfc}{gfc} key allows to specify the grammatical category in terms of -% the Resource Grammar of the Grammatical Framework~\cite{GFResourceGrammar:on}. -% -% The verbalization-defining macros |\defi| and friends allow the |gfa| (GF apply) and -% |gfl| (GF linearization) keys. -% -% A definiendum of the form -% |\defii[gfa=mkN]{empty}{set}| generates the GF linearization |empty_set = mkN "empty set"|. -% Some what less conveniently, -% |\defii[name=datum,gfl={mkN "Datum", "Daten"}{Datum}| can be used if the GF -% linearization is more complex than simply applying a ``make command'' to the -% verbalization. -% \end{omgroup} -% \end{omgroup} -% -% \begin{omgroup}{Limitations} -% -% We list the limitations of the |smultiling| package. -% -% \begin{omgroup}{General \texttt{babel} Integration} -% There is currently no integration with the |babel| package that handles -% language-specific aspects in {\LaTeX}. In particular, selecting the right language -% must be done manually. In particular, the example from Figure~\ref{fic:stex-multiling} -% would really have the form given in Figure~\ref{fig:stex-multiling-babel} -- see the -% |\usepackage[usenglish,ngerman]{babel}| in line 2, and the |\selectlanguage| -% statements in lines 6 and 13. -% \begin{exfig} -% \begin{verbatim} -% \usepackage{multiling} -% \usepackage[usenglish,ngerman]{babel}% babel support -% \begin{modsig}{foo} -% \symdef{bar}{BAR} -% \symi{sar} -% \end{modsig} -% \selectlanguage{english}% english version follows -% \begin{modnl}[creators=miko,primary]{foo}{en} -% \begin{definition} -% A \defiii[bar]{big}{array}{raster} ($\bar$) is a\ldots, it is much bigger -% than a \defiii[sar]{small}{array}{raster}. -% \end{definition} -% \end{modnl} -% \selectlanguage{german}% german umlauts please -% \begin{modnl}[creators=miko]{foo}{de} -% \begin{definition} -% Ein \defiii[bar]{gro"ses}{Feld}{Raster} ($\bar$) ist ein\ldots, es -% ist viel gr"o"ser als ein \defiii[sar]{kleines}{Feld}{Raster}. -% \end{definition} -% \end{modnl} -% \end{verbatim}\vspace{-2em} -% \caption{Multilingual \protect\sTeX with \texttt{babel}} -% \label{fig:stex-multiling-babel} -% \end{exfig} -% -% For the |langfiles| setup, which assumes that module signatures and language bindings -% are in separate files, |babel| integration can be simplified by providing a -% language-specific preamble file with |\usepackage{|\meta{language}|}{babel}| which is -% pre-pended to all language binding files when formatted. This preamble can also contain -% the other language-specific packages (e.g. for font encodings, etc.). -% \end{omgroup} -% -% \begin{omgroup}{PDF links on term references are language-dependent} -% Given the |langfiles| mode, we need the intended language to generate PDF links on -% term references. But we cannot infer this for top-level ``papers'' (we do in the -% language bindings). So it has to be specified via |\sTexlanguage|, and we do not -% really had a way to check that it is. Unfortunately, the only place it would be natural -% to do so is in |\mod@component|, but the |\PackageError| there had to be commented -% out, since it leads to serious errors. Thus we set the language to |en| by default, -% which is sub-optimal. Maybe there is a way to infer the document language from the -% babel settings. -% \end{omgroup} -% -% \begin{omgroup}{Language-Specific Limitations} -% Some languages have more problems than others -% \begin{description} -% \item[Turkish] makes \texttt{=} an active character (to give better spacing); this -% interacts unfavourably with the |keyval| package which needs \texttt{=} as key/value -% separator (and gives it a different category code). Therefore we need to prohibit this by -% restricting the |shorthands| option: use |\usepackage[turkish,shorthands=:!]{babel}|. -% \item[Chinese] needs special fonts and |xelatex|\ednote{get Jinbo to document this}. -% \end{description} -% \end{omgroup} -% \end{omgroup} -% -% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography}\newpage -% -% \begin{omgroup}[id=sec:impl:cls]{Implementation} -% -% \begin{omgroup}[id=sec:impl:cls:options]{Class Options} -% \begin{macrocode} -%<*sty> -\newif\if@smultiling@mh@\@smultiling@mh@false -\DeclareOption{mh}{\@smultiling@mh@true} -\newif\if@langfiles\@langfilesfalse -\DeclareOption{langfiles}{\@langfilestrue} -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{modules}} -\ProcessOptions -% \end{macrocode} -% -% We load the packages referenced here. -% -% \begin{macrocode} -\if@smultiling@mh@\RequirePackage{smultiling-mh}\fi -\RequirePackage{etoolbox} -\RequirePackage{structview} -% \end{macrocode} -% \end{omgroup} -% -% \begin{omgroup}{Signatures} -% -% \begin{environment}{modsig} -% The |modsig| environment is just a layer over the |module| environment. We also -% redefine macros that may occur in module signatures so that they do not create -% markup. Finally, we set the flag |\mod@|\meta{mod}|@multiling| to |true|. -% \begin{macrocode} -\newenvironment{modsig}[2][]{\def\@test{#1}% -\ifx\@test\@empty\begin{module}[id=#2]\else\begin{module}[id=#2,#1]\fi% -\expandafter\gdef\csname mod@#2@multiling\endcsname{true}% -\ignorespacesandpars} -{\end{module}\ignorespacesandparsafterend} -% \end{macrocode} -% \end{environment} -% -% \begin{macro}{\mod@component} -% We redefine the macro from the |modules| package that computes the module component -% identifier for external links on term references. If |\mod@|\meta{mod}|@multiling| is -% |true|, then we make the component identifier |.|\meta{lang}, which can be customized -% by the next macro below. -% \begin{macrocode} -\renewcommand\mod@component[1]{% -\expandafter\ifx\csname mod@#1@multiling\endcsname\@true% -\@ifundefined{smultiling@language}{} -% for some reason this error message bombs big time; so we leave it out. -% {\PackageError{smultiling}% -% {No document language specified for term reference links} -% {use \protect\sTeXlanguage to specify it!}} -{.\smultiling@language}% -\fi} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\sTeXlanguage} -% This macro sets the internal flag |\smultiling@language|, we set the default to |en|, -% since otherwise hyper-references on term references do not work. -% \begin{macrocode} -\newcommand\sTeXlanguage[1]{\def\smultiling@language{#1}} -\sTeXlanguage{en} -% \end{macrocode} -% \end{macro} -% -% \begin{environment}{viewsig} -% The |viewsig| environment is just a layer over the |view| environment with the keys -% suitably adapted. -% \begin{macrocode} -\newenvironment{viewsig}[4][]{\def\@test{#1}\ifx\@test\@empty% - \begin{view}[id=#2,ext=tex]{#3}{#4}\else\begin{view}[id=#2,#1,ext=tex]{#3}{#4}\fi% - \ignorespacesandpars} - {\end{view}\ignorespacesandparsafterend} -% \end{macrocode} -% \end{environment} -% -% \begin{macro}{\@sym*} -% has a starred form for primary symbols. The key/value interface has no effect on the -% {\LaTeX} side. We read the to check whether only allowed ones are used. -% \begin{macrocode} -\define@key{symi}{noverb}[all]{}% -\define@key{symi}{align}[WithTheSymbolOfTheSameName]{}% -\define@key{symi}{specializes}{}% -\define@key{symi}{noalign}[true]{}% -\newcommand\symi{\@ifstar\@symi@star\@symi} -\newcommand\@symi[2][]{\metasetkeys{symi}{#1}% - \if@importing\else\par\noindent Symbol: \textsf{#2}\fi\ignorespacesandpars} -\newcommand\@symi@star[2][]{\metasetkeys{symi}{#1}% - \if@importing\else\par\noindent Primary Symbol: \textsf{#2}\fi\ignorespacesandpars} -\newcommand\symii{\@ifstar\@symii@star\@symii} -\newcommand\@symii[3][]{\metasetkeys{symi}{#1}% - \if@importing\else\par\noindent Symbol: \textsf{#2-#3}\fi\ignorespacesandpars} -\newcommand\@symii@star[3][]{\metasetkeys{symi}{#1}% - \if@importing\else\par\noindent Primary Symbol: \textsf{#2-#3}\fi\ignorespacesandpars} -\newcommand\symiii{\@ifstar\@symiii@star\@symiii} -\newcommand\@symiii[4][]{\metasetkeys{symi}{#1}% - \if@importing\else\par\noindent Symbol: \textsf{#2-#3-#4}\fi\ignorespacesandpars} -\newcommand\@symiii@star[4][]{\metasetkeys{symi}{#1}% - \if@importing\else\par\noindent Primary Symbol: \textsf{#2-#3-#4}\fi\ignorespacesandpars} -\newcommand\symiv{\@ifstar\@symiv@star\@symiv} -\newcommand\@symiv[5][]{\metasetkeys{symi}{#1}% - \if@importing\else\par\noindent Symbol: \textsf{#2-#3-#4-#5}\fi\ignorespacesandpars} -\newcommand\@symiv@star[5][]{\metasetkeys{symi}{#1}% - \if@importing\else\par\noindent Primary Symbol: \textsf{#2-#3-#4-#5}\fi\ignorespacesandpars} -% \end{macrocode} -% \end{macro} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:langbindings]{Language Bindings} -% -% \begin{macro}{modnl:*} -% \begin{macrocode} -\addmetakey{modnl}{load} -\addmetakey*{modnl}{title} -\addmetakey*{modnl}{creators} -\addmetakey*{modnl}{contributors} -\addmetakey{modnl}{srccite} -\addmetakey{modnl}{primary}[yes] -% \end{macrocode} -% \end{macro} -% -% \begin{environment}{modnl} -% The |modnl| environment is just a layer over the |module| environment and the -% |\importmodule| macro with the keys and language suitably adapted. -% \begin{macrocode} -\newenvironment{modnl}[3][]{\metasetkeys{modnl}{#1}% - \def\@test{#1}\ifx\@test\@empty\begin{module}[id=#2.#3]\else\begin{module}[id=#2.#3,#1]\fi% - \def\smultiling@language{#3}% - \if@langfiles\importmodule[load=#2,ext=tex]{#2}\else - \ifx\modnl@load\@empty\importmodule{#2}\else\importmodule[ext=tex,load=\modnl@load]{#2}\fi% - \fi% - \ignorespacesandpars} -{\end{module}\ignorespacesandparsafterend} -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{viewnl} -% The |viewnl| environment is just a layer over the |view| environment with the keys and -% language suitably adapted.\ednote{MK: we have to do something about the if@langfiles -% situation here. But this is non-trivial, since we do not know the current path, to -% which we could append .\meta{lang}!} -% \begin{macrocode} -\newenvironment{viewnl}[5][]{\def\@test{#1}\ifx\@test\@empty% - \begin{view}[id=#2.#3,ext=tex]{#4}{#5}\else% - \begin{view}[id=#2.#3,#1,ext=tex]{#4}{#5}\fi% - \ignorespacesandpars} - {\end{view}\ignorespacesandparsafterend} -% \end{macrocode} -% \end{environment} -% \end{omgroup} -% -% \begin{omgroup}{Multilingual Statements and Terms} -% -% \begin{macro}{\mtref} -% we first first define an auxiliary conditional |\@instring| that checks of |?| is in -% the first argument. |\mtrefi| uses it, if there is one, it just calls |\termref|, -% otherwise it calls |\@mtrefi|, which assembles the |\termref| after splitting at the -% |?|. -% \begin{macrocode} -\def\@instring#1#2{TT\fi\begingroup\edef\x{\endgroup\noexpand\in@{#1}{#2}}\x\ifin@} -\def\@mtref#1?#2\relax{\@@mtref{#1}{#2}} -\newcommand\@@mtref[3]{\def\@@cd{#1}\def\@@name{#2}% -\ifx\@@cd\@empty% -\ifx\@@name\@empty\termref[]{#3}\else\termref[name=\@@name]{#3}\fi% -\else% -\ifx\@@name\@empty\termref[cd=\@@cd]{#3}\else\termref[cd=\@@cd,name=\@@name]{#3}\fi% -\fi} -\newcommand\mtref[2][]{\if\@instring{?}{#1}\@mtref #1\relax{#2}\else\termref[cd=#1]{#2}\fi} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\mtrefi*} -% \begin{macrocode} -\newcommand\mtrefi[2][]{\if\@instring{?}{#1}\@mtref #1\relax{#2}% -\else\termref[cd=#1]{#2}\fi} -\newcommand\mtrefis[2][]{\mtrefi[#1]{#2s}} -\newcommand\Mtrefi[2][]{\if\@instring{?}{#1}\@mtref #1\relax{\capitalize{#2}}% -\else\termref[cd=#1]{\capitalize{#2}}\fi} -\newcommand\Mtrefis[2][]{\Mtrefi[#1]{#2s}} -\newcommand\mtrefii[3][]{\mtrefi[#1]{#2 #3}} -\newcommand\mtrefiis[3][]{\mtrefi[#1]{#2 #3s}} -\newcommand\Mtrefii[3][]{\Mtrefi[#1]{#2 #3a}} -\newcommand\Mtrefiis[3][]{\Mtrefi[#1]{#2 #3s}} -\newcommand\mtrefiii[4][]{\mtrefi[#1]{#2 #3 #4}} -\newcommand\Mtrefiiis[4][]{\Mtrefi[#1]{#2 #3 #4s}} -\newcommand\Mtrefiii[4][]{\Mtrefi[#1]{#2 #3 #4}} -\newcommand\mtrefiiis[4][]{\mtrefi[#1]{#2 #3 #4s}} -\newcommand\mtrefiv[5][]{\mtrefi[#1]{#2 #3 #4 #5}} -\newcommand\mtrefivs[5][]{\mtrefi[#1]{#2 #3 #4 #5s}} -\newcommand\Mtrefiv[5][]{\Mtrefi[#1]{#2 #3 #4 #5}} -\newcommand\Mtrefivs[5][]{\Mtrefi[#1]{#2 #3 #4 #5s}} -% \end{macrocode} -% \end{macro} -% \end{omgroup} -% -% \begin{omgroup}[id=impl:GFmeta]{GF Metadata} -% -% \begin{macro}{gfc} -% We add the |gfc| key to various symbol declaration macros. -% \begin{macrocode} -\addmetakey{symi}{gfc} -\addmetakey{symdef}{gfc}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{gfa/l} -% \begin{macrocode} -\addmetakey{definiendum}{gfa} -\addmetakey{definiendum}{gfl} -% \end{macrocode} -% \end{macro} -% \end{omgroup} -% -% \begin{omgroup}{Miscellaneneous} -% the |\ttl| macro (to-translate) is used to mark untranslated stuff. We need a better -% \latexml treatment of this eventually that is integrated with MathHub.info. -% \begin{macro}{\ttl} -% \begin{macrocode} -\newcommand\ttl[1]{\red{TTL: #1}} -%</sty> -% \end{macrocode} -% \end{macro} -% \end{omgroup} -% \end{omgroup} -% \Finale -% -\endinput -% \iffalse -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: -% \fi - -% LocalWords: iffalse cls omdoc latexml texttt smlog.cls sref NeedsTeXFormat symi Deyan -% LocalWords: maketitle newpage tableofcontents newpage omgroup ednote ltxml Ginev exfig -% LocalWords: printbibliography showmeta metakeys amstext ginput newcommand smglom lmh -% LocalWords: module-defs gimport renewcommand langbindings gle newenvironment symdef -% LocalWords: doctex smultiling.dtx smultiling.sty GinIanJuc:spsttom16 verbalization gfc -% LocalWords: Kohlhase:dmesmgm14 symvariant fig:stex-monolingual fig:stex-multiling gfc -% LocalWords: vspace onefile modnl modnl symii symii symiii symiii symiv symiv atrefi -% LocalWords: user:GFmeta realization verbalizations trefi atrefiii mtref mtrefi atref -% LocalWords: mtrefii mtrefiii textbf viewsig viewsig loadfrom loadto viewnl viewnl gfa -% LocalWords: sproofs statements-ngerman.ldf gfl linearization defii datum,gfl keyval -% LocalWords: fic:stex-multiling fig:stex-multiling-babel usepackage usenglish,ngerman -% LocalWords: selectlanguage turkish,shorthands xelatex Jinbo newif smultiling-mh ifx -% LocalWords: etoolbox ignorespacesandpars ignorespacesandparsafterend 2,ext 1,ext ttl -% LocalWords: metasetkeys noindent addmetakey srccite tex,load 3,ext termref begingroup -% LocalWords: endgroup noexpand mtrefis mtrefiis Mtrefiiis mtrefiv mtrefivs impl:GFmeta -% LocalWords: Miscellaneneous sTeXlanguage sTeXlanguage expandafter gdef csname -% LocalWords: endcsname smultiling@language diff --git a/macros/latex/contrib/stex/sty/smultiling/smultiling.ins b/macros/latex/contrib/stex/sty/smultiling/smultiling.ins deleted file mode 100644 index 8b39a05efc..0000000000 --- a/macros/latex/contrib/stex/sty/smultiling/smultiling.ins +++ /dev/null @@ -1,30 +0,0 @@ -%% -%% This file generates files required to use the ed package. -%% At your command prompt write -%% -%% latex smultiling.ins -%% -%% Copyright(c) 2014 Michael Kohlhase -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{smultiling.sty}{\from{smultiling.dtx}{sty}}} - -\Msg{*} -\Msg{* You probably need to move the generated style files into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/smultiling/smultiling.pdf b/macros/latex/contrib/stex/sty/smultiling/smultiling.pdf Binary files differdeleted file mode 100644 index ea30faadc3..0000000000 --- a/macros/latex/contrib/stex/sty/smultiling/smultiling.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/sproof/README b/macros/latex/contrib/stex/sty/sproof/README deleted file mode 100644 index 6642685638..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/sproof/sproof.dtx b/macros/latex/contrib/stex/sty/sproof/sproof.dtx deleted file mode 100644 index 16f5226020..0000000000 --- a/macros/latex/contrib/stex/sty/sproof/sproof.dtx +++ /dev/null @@ -1,775 +0,0 @@ -% \iffalse meta-comment -% An Infrastructure for Structural Markup for Proofs -% Copyright (C) 2004-2011 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<package>\ProvidesPackage{sproof}[2019/03/20 v1.1 Semantic Markup for Proofs] -% -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage{url,array,stex,float,moreverb} -\usepackage[show]{ed} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{ctangit} -\usepackage{paralist} -\usepackage{hyperref} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\def\githubissue#1{\cite{sTeX:github:on}, \hyperlink{https://github.com/KWARC/sTeX/issues/#1}{issue #1}} -\begin{document} -\RecordChanges -\DocInput{sproof.dtx} -\end{document} -%</driver> -% \fi -% -% \CheckSum{341} -% -% \changes{v0.9}{2005/06/14}{First Version with Documentation} -% \changes{v0.9a}{2005/07/01}{Completed Documentation} -% \changes{v0.9b}{2005/08/06}{Complete functionality and Updated Documentation} -% \changes{v0.9c}{2006/01/13}{more packaging} -% \changes{v0.9d}{2006/10/31}{made sproof.dtx independent of statements.dtx} -% \changes{v0.9d}{2006/10/31}{revamped the proof end mark management} -% \changes{v0.9e}{2008/10/11}{taking type seriously} -% \changes{v0.9f}{2009/12/14}{changing to omd metadata framework} -% \changes{v0.9f}{2008/12/14}{first steps to sref} -% \changes{v1.0}{2011/01/23}{making proof step labels stylable} -% \changes{v1.1}{2013/09/29}{subproof now more like proof (takes comment arg)} -% -% \GetFileInfo{sproof.sty} -% -% \MakeShortVerb{\|} -%\def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} -% \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}} -% \title{{\texttt{sproof.sty}}: Structural Markup for Proofs\thanks{Version {\fileversion} (last revised -% {\filedate})}} -% \author{Michael Kohlhase\\ -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}} -% \maketitle -% -% \begin{abstract} -% The |sproof| package is 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 {\TeX/\LaTeX} into a document format for mathematical -% knowledge management (MKM). -% -% This package supplies macros and environment that allow to annotate the structure of -% mathematical proofs in {\stex} files. This structure can be used by MKM systems for -% added-value services, either directly from the {\sTeX} sources, or after translation. -% \end{abstract} -% -% \newpage\tableofcontents\newpage -% -%\section{Introduction}\label{sec:sproof} -% -% The |sproof| ({\twintoo{semantic}{proofs}}) package supplies macros and environment that -% allow to annotate the structure of mathematical proofs in {\stex} files. This structure -% can be used by MKM systems for added-value services, either directly from the {\sTeX} -% sources, or after translation. Even though it is part of the {\stex} collection, it can -% be used independently, like it's sister package |statements|. -% -% {\stex} is a version of {\TeX/\LaTeX} that allows to markup {\TeX/\LaTeX} documents -% semantically without leaving the document format, essentially turning {\TeX/\LaTeX} into -% a document format for mathematical knowledge management (MKM). -% -% \begin{exfig}\scriptsize -% \begin{verbatim} -% \begin{sproof}[id=simple-proof,for=sum-over-odds] -% {We prove that $\sum_{i=1}^n{2i-1}=n^{2}$ by induction over $n$} -% \begin{spfcases}{For the induction we have to consider the following cases:} -% \begin{spfcase}{$n=1$} -% \begin{spfstep}[display=flow] then we compute $1=1^2$\end{spfstep} -% \end{spfcase} -% \begin{spfcase}{$n=2$} -% \begin{sproofcomment}[display=flow] -% This case is not really necessary, but we do it for the -% fun of it (and to get more intuition). -% \end{sproofcomment} -% \begin{spfstep}[display=flow] We compute $1+3=2^{2}=4$.\end{spfstep} -% \end{spfcase} -% \begin{spfcase}{$n>1$} -% \begin{spfstep}[type=assumption,id=ind-hyp] -% Now, we assume that the assertion is true for a certain $k\geq 1$, -% i.e. $\sum_{i=1}^k{(2i-1)}=k^{2}$. -% \end{spfstep} -% \begin{sproofcomment} -% We have to show that we can derive the assertion for $n=k+1$ from -% this assumption, i.e. $\sum_{i=1}^{k+1}{(2i-1)}=(k+1)^{2}$. -% \end{sproofcomment} -% \begin{spfstep} -% We obtain $\sum_{i=1}^{k+1}{2i-1}=\sum_{i=1}^k{2i-1}+2(k+1)-1$ -% \begin{justification}[method=arith:split-sum] -% by splitting the sum. -% \end{justification} -% \end{spfstep} -% \begin{spfstep} -% Thus we have $\sum_{i=1}^{k+1}{(2i-1)}=k^2+2k+1$ -% \begin{justification}[method=fertilize] -% by inductive hypothesis. -% \end{justification} -% \end{spfstep} -% \begin{spfstep}[type=conclusion] -% We can \begin{justification}[method=simplify]simplify\end{justification} -% the right-hand side to ${k+1}^2$, which proves the assertion. -% \end{spfstep} -% \end{spfcase} -% \begin{spfstep}[type=conclusion] -% We have considered all the cases, so we have proven the assertion. -% \end{spfstep} -% \end{spfcases} -% \end{sproof} -% \end{verbatim} -% \vspace*{-.5cm} -% \caption{A very explicit proof, marked up semantically}\label{fig:proof:src} -% \end{exfig} -% -% We will go over the general intuition by way of our running example (see -% Figure~\ref{fig:proof:src} for the source and Figure~\ref{fig:proof:result} for the -% formatted result).\ednote{talk a bit more about proofs and their structure,... maybe -% copy from OMDoc spec. } -% -% \section{The User Interface} -% -% \subsection{Package Options}\label{sec:user:options} -% -% The |sproof| package takes a single option: \DescribeMacro{showmeta}|showmeta|. If -% this is set, then the metadata keys are shown (see~\cite{Kohlhase:metakeys:ctan} for details -% and customization options). -% -% \subsection{Proofs and Proof steps} -% -% \DescribeEnv{sproof} The |proof| environment is the main container for proofs. It takes -% an optional |KeyVal| argument that allows to specify the |id| (identifier) and |for| -% (for which assertion is this a proof) keys. The regular argument of the |proof| -% environment contains an introductory comment, that may be used to announce the proof -% style. The |proof| environment contains a sequence of |\step|, |proofcomment|, and -% |pfcases| environments that are used to markup the proof steps. The |proof| environment -% has a variant |Proof|, which does not use the proof end marker. This is convenient, if a -% proof ends in a case distinction, which brings it's own proof end marker with it. -% \DescribeEnv{sProof} The |Proof| environment is a variant of |proof| that does not mark -% the end of a proof with a little box; presumably, since one of the subproofs already has -% one and then a box supplied by the outer proof would generate an otherwise empty line. -% \DescribeMacro{\spfidea} The |\spfidea| macro allows to give a one-paragraph -% description of the proof idea. -% -% For one-line proof sketches, we use the \DescribeMacro{spfsketch}|\spfsketch| macro, -% which takes the |KeyVal| argument as |sproof| and another one: a natural language text -% that sketches the proof. -% -% \DescribeEnv{spfstep} Regular proof steps are marked up with the |step| environment, which -% takes an optional |KeyVal| argument for annotations. A proof step usually contains a -% local assertion (the text of the step) together with some kind of evidence that this can -% be derived from already established assertions. -% -% Note that both |\premise| and |\justarg| can be used with an empty second argument to -% mark up premises and arguments that are not explicitly mentioned in the text. -% -% \begin{exfig} -% \begin{sproof}[id=simple-proof,for=sum-over-odds] -% {We prove that $\sum_{i=1}^n{2i-1}=n^{2}$ by induction over $n$} -% \begin{spfcases}{For the induction we have to consider the following cases:} -% \begin{spfcase}{$n=1$} -% \begin{spfstep}[display=flow] then we compute $1=1^2$\end{spfstep} -% \end{spfcase} -% \begin{spfcase}{$n=2$} -% \begin{sproofcomment}[display=flow] -% This case is not really necessary, but we do it for the fun -% of it (and to get more intuition). -% \end{sproofcomment} -% \begin{spfstep}[display=flow] -% We compute $1+3=2^{2}=4$ -% \end{spfstep} -% \end{spfcase} -% \begin{spfcase}{$n>1$} -% \begin{spfstep}[type=hypothesis,id=ind-hyp] -% Now, we assume that the assertion is true for a certain $k\geq 1$, i.e. -% $\sum_{i=1}^k{(2i-1)}=k^{2}$. -% \end{spfstep} -% \begin{sproofcomment} -% We have to show that we can derive the assertion for $n=k+1$ from this -% assumption, i.e. $\sum_{i=1}^{k+1}{(2i-1)}=(k+1)^{2}$. -% \end{sproofcomment} -% \begin{spfstep}[id=splitit] -% We obtain $\sum_{i=1}^{k+1}{(2i-1)}=\sum_{i=1}^k{(2i-1)}+2(k+1)-1$ -% \begin{justification}[method=arith:split-sum] -% by splitting the sum -% \end{justification} -% \end{spfstep} -% \begin{spfstep}[id=byindhyp] -% Thus we have $\sum_{i=1}^{k+1}{(2i-1)}=k^2+2k+1$ -% \begin{justification}[method=fertilize] -% by \premise[ind-hyp]{inductive hypothesis}. -% \end{justification} -% \end{spfstep} -% \begin{spfstep}[type=conclusion] -% We can \begin{justification}[method=simplify-eq] -% simplify the {\justarg[rhs]{right-hand side}} -% \end{justification} to $(k+1)^2$, which proves the assertion. -% \end{spfstep} -% \end{spfcase} -% \begin{spfstep}[type=conclusion] -% We have considered all the cases, so we have proven the assertion. -% \end{spfstep} -% \end{spfcases} -% \end{sproof} -% \caption{The formatted result of the proof in Figure~\ref{fig:proof:src}}\label{fig:proof:result} -% \end{exfig} -% -% \subsection{Justifications} -% -% \DescribeEnv{justification} This evidence is marked up with the |justification| -% environment in the |sproof| package. This environment totally invisible to the formatted -% result; it wraps the text in the proof step that corresponds to the evidence. The -% environment takes an optional |KeyVal| argument, which can have the |method| key, whose -% value is the name of a proof method (this will only need to mean something to the -% application that consumes the semantic annotations). Furthermore, the justification can -% contain ``premises'' (specifications to assertions that were used justify the step) and -% ``arguments'' (other information taken into account by the proof method). -% -% \DescribeMacro{\premise} The |\premise| macro allows to mark up part of the text as -% reference to an assertion that is used in the argumentation. In the example in -% Figure~\ref{fig:proof:src} we have used the |\premise| macro to identify the inductive -% hypothesis. -% -% \DescribeMacro{\justarg} The |\justarg| macro is very similar to |\premise| with the -% difference that it is used to mark up arguments to the proof method. Therefore the -% content of the first argument is interpreted as a mathematical object rather than as an -% identifier as in the case of |\premise|. In our example, we specified that the -% simplification should take place on the right hand side of the equation. Other examples -% include proof methods that instantiate. Here we would indicate the substituted object in -% a |\justarg| macro. -% -% \subsection{Proof Structure} -% -% \DescribeEnv{subproof} The |pfcases| environment is used to mark up a subproof. This -% environment takes an optional |KeyVal| argument for semantic annotations and a second -% argument that allows to specify an introductory comment (just like in the |proof| -% environment). The \DescribeMacro{method}|method| key can be used to give the name of the -% proof method executed to make this subproof. -% -% \DescribeEnv{spfcases} The |pfcases| environment is used to mark up a proof by -% cases. Technically it is a variant of the |subproof| where the |method| is -% |by-cases|. Its contents are |spfcase| environments that mark up the cases one by one. -% -% \DescribeEnv{spfcase} The content of a |pfcases| environment are a sequence of case -% proofs marked up in the |pfcase| environment, which takes an optional |KeyVal| argument -% for semantic annotations. The second argument is used to specify the the description of -% the case under consideration. The content of a |pfcase| environment is the same as that -% of a |proof|, i.e. |step|s, |proofcomment|s, and |pfcases| -% environments. \DescribeMacro{\spfcasesketch}|\spfcasesketch| is a variant of the |spfcase| -% environment that takes the same arguments, but instead of the |spfstep|s in the body -% uses a third argument for a proof sketch. -% -% \DescribeEnv{sproofcomment} The |proofcomment| environment is much like a |step|, only -% that it does not have an object-level assertion of its own. Rather than asserting some -% fact that is relevant for the proof, it is used to explain where the proof is going, -% what we are attempting to to, or what we have achieved so far. As such, it cannot be the -% target of a |\premise|. -% -% \subsection{Proof End Markers} -% -% Traditionally, the end of a mathematical proof is marked with a little box at the end of -% the last line of the proof (if there is space and on the end of the next line if there -% isn't), like so:\sproofend -% -% The |sproof| package provides the \DescribeMacro{\sproofend}|\sproofend| macro for -% this. If a different symbol for the proof end is to be used (e.g. {\sl{q.e.d}}), then -% this can be obtained by specifying it using the -% \DescribeMacro{\sProofEndSymbol}|\sProofEndSymbol| configuration macro (e.g. by specifying -% |\sProofEndSymbol{q.e.d}|). -% -% Some of the proof structuring macros above will insert proof end symbols for sub-proofs, -% in most cases, this is desirable to make the proof structure explicit, but sometimes -% this wastes space (especially, if a proof ends in a case analysis which will supply its -% own proof end marker). To suppress it locally, just set |proofend={}| in them or use use -% |\sProofEndSymbol{}|. -% -% \subsection{Configuration of the Presentation}\label{sec:user:conf} -% -% Finally, we provide configuration hooks in Figure~\ref{fig:hooks} for the keywords in -% proofs. These are mainly intended for package authors building on |statements|, e.g. for -% multi-language support.\ednote{we might want to develop an extension -% \texttt{sproof-babel} in the future.}. -%\begin{figure}[ht]\centering -% \begin{tabular}{|lll|}\hline -% Environment & configuration macro & value\\\hline\hline -% \texttt{sproof} & \texttt{\textbackslash spf@proof@kw} & \makeatletter\spf@proof@kw\\\hline -% \texttt{sketchproof} & \texttt{\textbackslash spf@sketchproof@kw} & \makeatletter\spf@proofsketch@kw\\\hline -% \end{tabular} -% \caption{Configuration Hooks for Semantic Proof Markup}\label{fig:hooks} -% \end{figure} -% The proof step labels can be customized via the -% \DescribeMacro{\pstlabelstyle}|\pstlabelstyle| macro: |\pstlabelstyle{|\meta{style}|}| -% sets the style; see Figure~\ref{fig:pstlabel} for an overview of styles. Package writers -% can add additional styles by adding a macro |\pst@make@label@|\meta{style} that takes -% two arguments: a comma-separated list of ordinals that make up the prefix and the current -% ordinal. Note that comma-separated lists can be conveniently iterated over by the -% {\LaTeX} |\@for|\ldots|:=|\ldots|\do{|\ldots|}| macro; see Figure~\ref{fig:pstlabel} for -% examples. -% -%\begin{figure}[ht]\centering\makeatletter\small -% \begin{tabular}{|lll|}\hline -% style & example& configuration macro\\\hline\hline -% \texttt{long} & \pst@make@label@long{0,8,1}{5} & \verb|\def\pst@make@label@long#1#2{\@for\@I:=#1\do{\@I.}#2}|\\\hline -% \texttt{angles} & \pst@make@label@angles{0,8,1}{5} & \verb|\def\pst@make@label@angles#1#2|\\ -% &&\quad\verb|{\ensuremath{\@for\@I:=#1\do{\rangle}}#2}|\\\hline -% \texttt{short} & \pst@make@label@short{0,8,1}{5} & \verb|\def\pst@make@label@short#1#2{#2}|\\\hline -% \texttt{empty} & \pst@make@label@empty{0,8,1}{5} & \verb|\def\pst@make@label@empty#1#2{}|\\\hline -% \end{tabular} -% \caption{Configuration Proof Step Label Styles}\label{fig:pstlabel} -% \end{figure} -% -% \section{Limitations}\label{sec:limitations} -% -% In this section we document known limitations. If you want to help alleviate them, -% please feel free to contact the package author. Some of them are currently discussed in -% the TRAC. -% \begin{enumerate} -% \item The numbering scheme of proofs cannot be changed. It is more geared for teaching -% proof structures (the author's main use case) and not for writing papers.\lec{reported -% by Tobias Pfeiffer (fixed)} -% \item currently proof steps are formatted by the {\LaTeX} |description| environment. We -% would like to configure this, e.g. to use the |inparaenum| environment for more -% condensed proofs. I am just not sure what the best user interface would be I can -% imagine redefining an internal environment |spf@proofstep@list| or adding a key -% |prooflistenv| to the |proof| environment that allows to specify the environment -% directly. Maybe we should do both. -% \end{enumerate} -% -% -% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography} -% \newpage -% -% \section{The Implementation} -% -% \subsection{Package Options}\label{sec:impl:options} -% -% We declare some switches which will modify the behavior according to the package -% options. Generally, an option |xxx| will just set the appropriate switches to true -% (otherwise they stay false).\ednote{need an implementation for {\latexml}} -% -% \begin{macrocode} -%<*package> -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{sref}} -\ProcessOptions -% \end{macrocode} -% -% Then we make sure that the |sref| package is loaded~\ctancite{Kohlhase:sref}. -% \begin{macrocode} -\RequirePackage{sref} -\RequirePackage{etoolbox} -\RequirePackage[base]{babel} -% \end{macrocode} -% -% \subsection{Proofs}\label{sec:impl:proofs} -% -% We first define some keys for the |proof| environment. -% \begin{macrocode} -\srefaddidkey{spf} -\addmetakey*{spf}{display} -\addmetakey{spf}{for} -\addmetakey{spf}{from} -\addmetakey*[\sproof@box]{spf}{proofend} -\addmetakey{spf}{type} -\addmetakey*{spf}{title} -\addmetakey{spf}{continues} -\addmetakey{spf}{functions} -\addmetakey{spf}{method} -% \end{macrocode} -% -% \begin{macro}{\spf@flow} -% We define this macro, so that we can test whether the |display| key has the value |flow| -% \begin{macrocode} -\def\spf@flow{flow} -% \end{macrocode} -% \end{macro} -% -% For proofs, we will have to have deeply nested structures of enumerated list-like -% environments. However, {\LaTeX} only allows |enumerate| environments up to nesting depth -% 4 and general list environments up to listing depth 6. This is not enough for us. -% Therefore we have decided to go along the route proposed by Leslie Lamport to use a -% single top-level list with dotted sequences of numbers to identify the position in the -% proof tree. Unfortunately, we could not use his |pf.sty| package directly, since it does -% not do automatic numbering, and we have to add keyword arguments all over the place, to -% accomodate semantic information. -% -% \begin{environment}{pst@with@label} -% This environment manages\footnote{This gets the labeling right but only works 8 levels -% deep} the path labeling of the proof steps in the description environment of the -% outermost |proof| environment. The argument is the label prefix up to now; which we -% cache in |\pst@label| (we need evaluate it first, since are in the right place -% now!). Then we increment the proof depth which is stored in |\count10| (lower counters -% are used by {\TeX} for page numbering) and initialize the next level counter -% |\count\count10| with 1. In the end call for this environment, we just decrease the -% proof depth counter by 1 again. -% \begin{macrocode} -\newenvironment{pst@with@label}[1]{% - \edef\pst@label{#1}% - \advance\count10 by 1% - \count\count10=1% -}{% - \advance\count10 by -1% -}% -% \end{macrocode} -% \end{environment} -% -% \begin{macro}{\the@pst@label} -% |\the@pst@label| evaluates to the current step label. -% \begin{macrocode} -\def\the@pst@label{% - \pst@make@label\pst@label{\number\count\count10}\pstlabel@postfix% -}% -% \end{macrocode} -%\end{macro} -% -% \begin{macro}{\setpstlabelstyle} -% |\setpstlabelstyle{|meta{Key-Val pairs}|}| makes the labeling style customizable. -% |\setpstlabelstyle{prefix=Pr,delimiter=-,postfix=\dag}| will change the labeling style -% from \textbf{P.1.2.3} to \textbf{Pr-1-2-3\dag}. |\setpstlabelstyledefault| will set the -% labeling style back to default. -% \begin{macrocode} -\addmetakey[P]{pstlabel}{prefix}[] -\addmetakey[.]{pstlabel}{delimiter}[] -\addmetakey[]{pstlabel}{postfix}[] -\metasetkeys{pstlabel}{}% initialization -\newrobustcmd\setpstlabelstyle[1]{% - \metasetkeys{pstlabel}{#1}% -}% -\newrobustcmd\setpstlabelstyledefault{% - \metasetkeys{pstlabel}{prefix=P,delimiter=.,postfix=}% -}% -% \end{macrocode} -%\end{macro} -% -% \begin{macro}{\pstlabelstyle} -% |\pstlabelstyle| just sets the |\pst@make@label| macro according to the style. -% \begin{macrocode} -\def\pst@make@label@long#1#2{\@for\@I:=#1\do{\expandafter\@I\pstlabel@delimiter}#2} -\def\pst@make@label@angles#1#2{\ensuremath{\@for\@I:=#1\do{\rangle}}#2} -\def\pst@make@label@short#1#2{#2} -\def\pst@make@label@empty#1#2{} -\def\pstlabelstyle#1{% - \def\pst@make@label{\@nameuse{pst@make@label@#1}}% -}% -\pstlabelstyle{long}% -% \end{macrocode} -%\end{macro} -% -% \begin{macro}{\next@pst@label} -% |\next@pst@label| increments the step label at the current level. -% \begin{macrocode} -\def\next@pst@label{% - \global\advance\count\count10 by 1% -}% -% \end{macrocode} -%\end{macro} -% -%\begin{macro}{\sproofend} -% This macro places a little box at the end of the line if there is space, or at the -% end of the next line if there isn't -% \begin{macrocode} -\def\sproof@box{% - \hbox{\vrule\vbox{\hrule width 6 pt\vskip 6pt\hrule}\vrule}% -}% -\def\spf@proofend{\sproof@box}% -\def\sproofend{% - \ifx\spf@proofend\@empty% - \else% - \hfil\null\nobreak\hfill\spf@proofend\par\smallskip% - \fi% -}% -\def\sProofEndSymbol#1{\def\sproof@box{#1}}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{spf@*@kw} -% \begin{macrocode} -\def\spf@proofsketch@kw{Proof Sketch} -\def\spf@proof@kw{Proof} -\def\spf@step@kw{Step} -% \end{macrocode} -% \end{macro} -% -% For the other languages, we set up triggers -% \begin{macrocode} -\AfterBabelLanguage{ngerman}{\input{sproof-ngerman.ldf}} -\AfterBabelLanguage{arabic}{\input{sproof-arabic.ldf}} -% \end{macrocode} -% -% \begin{macro}{spfsketch} -% \begin{macrocode} -\newrobustcmd\spfsketch[2][]{% - \metasetkeys{spf}{#1}% - \sref@target% - \ifx\spf@display\spf@flow% - \else% - {\stDMemph{\ifx\spf@type\@empty\spf@proofsketch@kw\else\spf@type\fi}:} - \fi{ #2}% - \sref@label@id{this \ifx\spf@type\@empty\spf@proofsketch@kw\else\spf@type\fi}\sproofend% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{spfeq} -% This is very similar to |\spfsketch|, but uses a computation array\ednote{This should -% really be more like a tabular with an ensuremath in it. or invoke text on the last -% column}\ednote{document above} -% \begin{macrocode} -\newenvironment{spfeq}[2][]{% - \metasetkeys{spf}{#1}\sref@target% - \ifx\spf@display\spf@flow% - \else% - {\stDMemph{\ifx\spf@type\@empty\spf@proof@kw\else\spf@type\fi}:} #2% - \fi% display=flow - \begin{displaymath}\begin{array}{rcll}% -}{% - \end{array}\end{displaymath}% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{environment}{sproof} -% In this environment, we initialize the proof depth counter |\count10| to 10, and set -% up the description environment that will take the proof steps. At the end of the -% proof, we position the proof end into the last line. -% \begin{macrocode} -\newenvironment{spf@proof}[2][]{% - \metasetkeys{spf}{#1}% - \sref@target% - \count10=10% - \par\noindent% - \ifx\spf@display\spf@flow% - \else% - \stDMemph{\ifx\spf@type\@empty\spf@proof@kw\else\spf@type\fi}:% - \fi{ #2}% - \sref@label@id{this \ifx\spf@type\@empty\spf@proof@kw\else\spf@type\fi}% - \def\pst@label{}% - \newcount\pst@count% initialize the labeling mechanism - \begin{description}\begin{pst@with@label}{\pstlabel@prefix}% -}{% - \end{pst@with@label}\end{description}% -}% -\newenvironment{sproof}[2][]{\begin{spf@proof}[#1]{#2}}{\sproofend\end{spf@proof}}% -\newenvironment{sProof}[2][]{\begin{spf@proof}[#1]{#2}}{\end{spf@proof}}% -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{spfidea} -% \begin{macrocode} -\newrobustcmd\spfidea[2][]{% - \metasetkeys{spf}{#1}% - \stDMemph{\ifx\spf@type\@empty{Proof Idea}\else\spf@type\fi:} #2\sproofend% -}% -% \end{macrocode} -% \end{environment} -% -% The next two environments (proof steps) and comments, are mostly semantical, they take -% |KeyVal| arguments that specify their semantic role. In draft mode, they read these -% values and show them. If the surrounding proof had |display=flow|, then no new |\item| is -% generated, otherwise it is. In any case, the proof step number (at the current level) is -% incremented. -% \begin{environment}{spfstep} -% \ednote{MK: labeling of steps does not work yet.} -% \begin{macrocode} -\newenvironment{spfstep}[1][]{% - \metasetkeys{spf}{#1}% - \@in@omtexttrue% - \ifx\spf@display\spf@flow% - \else% - \item[\the@pst@label]% - \fi% - \ifx\spf@title\@empty\else{(\stDMemph{\spf@title}) }\fi% - \sref@label@id{\pst@label}\ignorespaces% -}{% - \next@pst@label\@in@omtextfalse\ignorespaces% -}% -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{sproofcomment} -% \begin{macrocode} -\newenvironment{sproofcomment}[1][]{% - \metasetkeys{spf}{#1}% - \ifx\spf@display\spf@flow\else\item[\the@pst@label]\fi% -}{% - \next@pst@label% -}% -% \end{macrocode} -% \end{environment} -% -% The next two environments also take a |KeyVal| argument, but also a regular one, which -% contains a start text. Both environments start a new numbered proof level. -% -% \begin{environment}{subproof} -% In the |subproof| environment, a new (lower-level) proproofof environment is started. -% \begin{macrocode} -\newenvironment{subproof}[2][]{% - \metasetkeys{spf}{#1}% - \def\@test{#2}% - \ifx\@test\empty% - \else% - \ifx\spf@display\spf@flow {#2}% - \else% - \item[\the@pst@label]{#2} % - \fi% - \fi% - \begin{pst@with@label}{\pst@label,\number\count\count10}% -}{% - \end{pst@with@label}\next@pst@label% -}% -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{spfcases} -% In the |pfcases| environment, the start text is displayed as the first comment of the -% proof. -% \begin{macrocode} -\newenvironment{spfcases}[2][]{% - \def\@test{#1}% - \ifx\@test\empty% - \begin{subproof}[method=by-cases]{#2}% - \else% - \begin{subproof}[#1,method=by-cases]{#2}% - \fi% -}{% - \end{subproof}% -}% -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{spfcase} -% In the |pfcase| environment, the start text is displayed specification of the case -% after the |\item| -% \begin{macrocode} -\newenvironment{spfcase}[2][]{% - \metasetkeys{spf}{#1}% - \ifx\spf@display\spf@flow\else\item[\the@pst@label]\fi% - \def\@test{#2}% - \ifx\@test\@empty% - \else% - {\stDMemph{#2}: }% need blank here - \fi% - \begin{pst@with@label}{\pst@label,\number\count\count10} -}{% - \ifx\spf@display\spf@flow% - \else% - \sproofend% - \fi% - \end{pst@with@label}% - \next@pst@label% -}% -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{spfcase} -% similar to |spfcase|, takes a third argument. -% \begin{macrocode} -\newrobustcmd\spfcasesketch[3][]{% - \metasetkeys{spf}{#1}% - \ifx\spf@display\spf@flow% - \else% - \item[\the@pst@label]% - \fi% - \def\@test{#2}% - \ifx\@test\@empty% - \else% - {\stDMemph{#2}: }% - \fi#3% - \next@pst@label% -}% -% \end{macrocode} -% \end{environment} -% -% \subsection{Justifications} -% -% We define the actions that are undertaken, when the keys for justifications are -% encountered. Here this is very simple, we just define an internal macro with the value, -% so that we can use it later. -% \begin{macrocode} -\srefaddidkey{just} -\addmetakey{just}{method} -\addmetakey{just}{premises} -\addmetakey{just}{args} -% \end{macrocode} -% -% The next three environments and macros are purely semantic, so we ignore the keyval -% arguments for now and only display the content.\ednote{need to do something about the -% premise in draft mode.} -% -% \begin{environment}{justification} -% \begin{macrocode} -\newenvironment{justification}[1][]{}{} -% \end{macrocode} -% \end{environment} -% -% \begin{macro}{\premise} -% \begin{macrocode} -\newrobustcmd\premise[2][]{#2} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\justarg} -% the |\justarg| macro is purely semantic, so we ignore the keyval arguments for now and -% only display the content. -% \begin{macrocode} -\newrobustcmd\justarg[2][]{#2} -%</package> -% \end{macrocode} -% \end{macro} -% -% \Finale -\endinput -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: -% LocalWords: GPL structuresharing STR sproof dtx CPERL keyval methodfalse env -% LocalWords: methodtrue envtrue medhodtrue DefKeyVal Semiverbatim omdoc args -% LocalWords: DefEnvironment OptionalKeyVals KeyVal omtext DefConstructor str -% LocalWords: proofidea KeyVal pfstep DefCMPEnvironment KeyVal proofcomment eq -% LocalWords: KeyVal pfcases KeyVal pfcase KeyVal extractBodyText unlist elsif -% LocalWords: foreach getBody toString str str str LookupValue LastSeenCMP Thu -% LocalWords: appendText getValue undef openElement closeElement DefMacro omd -% LocalWords: afterClose nodeType childNodes firstCMP localname hasChildNodes -% LocalWords: firstChild textContent removeChild iffalse kohlhase sref scsys -% LocalWords: sproofs.sty sc sc mathml openmath latexml cmathml activemath geq -% LocalWords: twintoo atwin atwintoo texttt fileversion maketitle stex newpage -% LocalWords: tableofcontents newpage exfig scriptsize vspace ednote spfidea -% LocalWords: spfidea spfsketch spfsketch spfstep justarg spfcases spfcase rhs -% LocalWords: sproofcomment ind-hyp splitit arith byindhyp sproofend proofend -% LocalWords: printbibliography textsf langle textsf langle ltxml ctancite spf -% LocalWords: srefaddidkey pf.sty newenvironment hbox vrule vbox ifx showmeta -% LocalWords: hrule vskip hrule vrule hfil nobreak hfill smallskip newcommand -% LocalWords: stDMemph newcount endsproof xref doctex showmeta hline lec ldots -% LocalWords: textbackslash makeatletter sketchproof compactenum tracissue -% LocalWords: metakeys addmetakey metasetkeys stylable pstlabelstyle pstlabel -% LocalWords: pstlabelstyle pstlabelstyle ldots ldots ensuremath inparaenum -% LocalWords: nameuse prooflistenv spfcasesketch spfcasesketch spfeq rcll -% LocalWords: displaymath noindent ignorespaces diff --git a/macros/latex/contrib/stex/sty/sproof/sproof.ins b/macros/latex/contrib/stex/sty/sproof/sproof.ins deleted file mode 100644 index e5f5198021..0000000000 --- a/macros/latex/contrib/stex/sty/sproof/sproof.ins +++ /dev/null @@ -1,30 +0,0 @@ -%% -%% This file generates files required to use the ed package. -%% At your command prompt write -%% -%% latex sproof.ins -%% -%% Copyright(c) 2005 Michael Kohlhase -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{sproof.sty}{\from{sproof.dtx}{package}}} - -\Msg{*} -\Msg{* You probably need to move the generated style files into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/sproof/sproof.pdf b/macros/latex/contrib/stex/sty/sproof/sproof.pdf Binary files differdeleted file mode 100644 index 9478c6f254..0000000000 --- a/macros/latex/contrib/stex/sty/sproof/sproof.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/sref/README b/macros/latex/contrib/stex/sty/sref/README deleted file mode 100644 index 3b4269614a..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/sref/book.pdf b/macros/latex/contrib/stex/sty/sref/book.pdf Binary files differdeleted file mode 100644 index 3c65f6e9f0..0000000000 --- a/macros/latex/contrib/stex/sty/sref/book.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/sref/book.tex b/macros/latex/contrib/stex/sty/sref/book.tex deleted file mode 100644 index b603fdc079..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/sref/idc.pdf b/macros/latex/contrib/stex/sty/sref/idc.pdf Binary files differdeleted file mode 100644 index 3759d8c92f..0000000000 --- a/macros/latex/contrib/stex/sty/sref/idc.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/sref/idc.tex b/macros/latex/contrib/stex/sty/sref/idc.tex deleted file mode 100644 index f85a341375..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/sref/idcmain.tex b/macros/latex/contrib/stex/sty/sref/idcmain.tex deleted file mode 100644 index 3664d95deb..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/sref/scr.pdf b/macros/latex/contrib/stex/sty/sref/scr.pdf Binary files differdeleted file mode 100644 index 5deae5865b..0000000000 --- a/macros/latex/contrib/stex/sty/sref/scr.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/sref/scr.tex b/macros/latex/contrib/stex/sty/sref/scr.tex deleted file mode 100644 index 16b3500302..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/sref/scrmain.tex b/macros/latex/contrib/stex/sty/sref/scrmain.tex deleted file mode 100644 index 044810a103..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/sref/sref.dtx b/macros/latex/contrib/stex/sty/sref/sref.dtx deleted file mode 100644 index 6c3db26266..0000000000 --- a/macros/latex/contrib/stex/sty/sref/sref.dtx +++ /dev/null @@ -1,869 +0,0 @@ -% \iffalse meta-comment -% A LaTeX Class and Package for Semantic Cross-Referencing -% Copyright (c) 2009 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<*package> -\NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{sref}[2019/03/20 v1.2 Semantic Cross-References] -%</package> -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage{url,array,float} -\usepackage[show]{ed} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{stex-logo,sref} -\usepackage{ctangit} -\usepackage{hyperref} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\newrobustcmd\githubissue[1]{\cite{sTeX:github:on}, \hyperlink{https://github.com/KWARC/sTeX/issues/#1}{issue #1}} -\begin{document} -\RecordChanges -\DocInput{sref.dtx} -\end{document} -%</driver> -% \fi -% -%\CheckSum{352} -% -% \changes{v0.5}{2008/03/28}{split off from omdoc.sty} -% \changes{v0.6}{2009/12/07}{introducing sequation} -% \changes{v0.9}{2009/07/14}{using omd for metadata} -% \changes{v1.0}{2011/12/20}{adding \texttt{\textbackslash sreflabel}} -% \changes{v1.1}{2013/10/15}{adding fallback argument to \texttt{\textbackslash sref}} -% \changes{v1.2}{2015/10/27}{\texttt{pre} and \texttt{post} keys to \texttt{\textbackslash sref}} -% -% \GetFileInfo{sref.sty} -% -% \MakeShortVerb{\|} -% -% \def\omdoc{OMDoc} -% \def\latexml{{\LaTeX}ML} -% \title{{\texttt{sref.sty}}: Semantic Cross-Referencing in {\LaTeX}\thanks{Version {\fileversion} (last revised -% {\filedate})}} -% \author{Michael Kohlhase\\ -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}} -% \maketitle -% -% \begin{abstract} -% The |sref| package is 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 {\TeX/\LaTeX} into a document format for mathematical -% knowledge management (MKM). -% -% The |sref| package supplies an for semantic cross-referencing over multiple documents. -% \end{abstract} -% -%\tableofcontents\newpage -% -% \section{Introduction}\label{sec:intro} -% -% The automatic computation of cross-references is one of the traditional strong points of -% {\LaTeX}. However, cross-referencing is limited to labels in the current document -% only. Cross-referencing between multiple documents in a jointly developed document -% collection is not easy to achieve in the {\LaTeX} processing model, which reads files -% sequentially and lacks a path concept. -% -% The |sref| package is mainly aimed at package developers. It supplies the internal -% macros that can be used to make document structuring elements cross-referencable. The -% general strategy here is to equip the document structuring macros with an -% \DescribeMacro{id}|id| key, so that the author can specify meaningful ones, but to let -% the transformation give default ones if the author did not. The value of the |id| key -% can also be used for cross-referencing like the |\label|/|\ref| mechanism in -% {\LaTeX}. We implement an independent referencing mechanism, since the referencing model -% is geared more towards referencing text fragments than text fragment labels like section -% numbers. Therefore we let the referenced fragments define the reference text much like -% the |\autoref| macro from |\hpyerref|. -% -% \section{The User Interface}\label{sec:user} -% -% This package is currently mainly meaningful in the context of the {\sTeX} collection, -% since all cross-referencable macros and environments must be extended to know about -% their referencing mechanism. We explain the user interface in \sref{sucrossref}. To port -% the functionality to other {\LaTeX} classes and packages, they have to be upgraded via -% the API in \sref{supackage-authors}. -% -% \subsection{Package Options}\label{sec:user:options} -% -% The |sref| package has the \DescribeMacro{extrefs}|extrefs| package option, which can be -% set to activate multi-file support (see \sref{suinterdoc}). If the -% \DescribeMacro{showmeta}|showmeta| is set, then the metadata keys are shown -% (see~\cite{Kohlhase:metakeys:ctan} for details and customization options). -% -% \subsection{Cross-Referencing}\sreflabel{Section}{sucrossref} -% -% The \DescribeMacro{\sref}|\sref{|\meta{id}|}| macro is the main cross-referencing macro, -% see Figure~\ref{fig:mysection} for an example. Depending on the whether macro or -% environment marking up the respective document fragment carries the key/value pair -% |id=|\meta{id} the cross-reference will expand to ``Section 2.1'' or ``this remark'', -% both carrying hyper-references. The |\sref| macro takes an optional key/value argument -% that allows to customize its behavior: The |linktext| key can be used to specify a link -% text that overrides the auto-generated one and the |fallback| allows to give the -% fallback text when the label \meta{id} is not defined. The |pre| and |post| keys allow -% to specify text that is pre/postpended to the generated label. This is particularly -% useful if combined with the |fallback| option as in the last |\sref| in -% Figure~\ref{fig:mysection}, where the generated ``in Section\ldots'' is equivalent to -% the fallback ``above''. -% -% \begin{exfig} -% \begin{verbatim} -% \mysection[id=foo]{#2} -% ... \sref{foo} ... -% ... \sref[linktext=this section]{foo} ... -% ... \sref[pre={in~},fallback=above]{foo} ... -% \end{verbatim} -% \vspace*{-1.5em} -% \caption{Semantic Crossreferencing}\label{fig:mysection} -% \end{exfig} -% -% The \DescribeMacro{\sreflabel}|\sreflabel|\footnote{It would have been more natural to -% name the macro \texttt{slabel}, but this is overwritten by other packages without -% warning.} macro is a variant to the |\label| macro provided by {\LaTeX} proper. It takes -% two arguments, the first one is a classification (used in |\sref|) and the second one -% the identifier. -% -% The -% \DescribeMacro{\srefs}|\srefl{|\meta{id\textsuperscript{1}}|}{|\meta{id\textsuperscript{2}}|}| -% is a variant it |\sref|, only that it allows to reference two semantic objects and -% expands to ``\meta{reference\textsuperscript{1}} and -% \meta{reference\textsuperscript{2}}''. \DescribeMacro{\srefl}|\srefl{|\meta{id\textsuperscript{1}}|}{|\meta{id\textsuperscript{n}}|}| -% is similar, but for ranges; it expands to ``\meta{reference\textsuperscript{1}} to -% \meta{reference\textsuperscript{n}}''. Its use should be restricted to cases, where the -% types of objects references are homogenous. -% -% Finally, there is a variant \DescribeMacro{\spageref}|\spageref| that only outputs the -% page number of the referenced object. It can be used in cases where no hyper-referencing -% is present. It uses the macro \DescribeMacro{\sref@page@label}|\sref@page@label| for -% styling the page reference. Redefining this will allows to customize this. The default -% setting is -% \begin{verbatim} -% \newcommand\sref@page@label[1]{p.~{#1}} -% \end{verbatim} -% -% \subsection{An API for Package Authors}\sreflabel{Section}{supackage-authors} -% -% To make use of the |sref| package, the package must define the document structuring -% infrastructure using the |sref| internal macros. The {\sTeX} packages already does this, -% so we make an example here for a slightly upgraded sectioning command in -% Figure~\ref{fig:mysection:setup}. The first three lines define the keys for the keyval -% attribute of the |\mysection| command using the infrastructure supplied by the |omd| -% package~\ctancite{Kohlhase:metakeys} (remember the |\RequirePackage{metakeys}|). The first two just -% initialize the keys to save the key values in internal macros, and the |\metasetkeys| -% activates the keys when reading the keyval argument. The -% \DescribeMacro{\srefaddidkey}|\srefaddidkey| macro is a variant of |\addmetakey| macro -% supplied by the |sref| package that sets up the keys to set the -% \DescribeMacro{\sref@id}|\sref@id| register for later use by the |sref| -% infrastructure. Note that the |\srefaddidkey| macro uses the |prefix| key to -% systematically construct prefixed identifiers. This can be useful in particular for -% sectioning commands. -% -% \begin{exfig} -% \begin{verbatim} -% \addmetakey{sec}{short} -% \addmetakey[black]{sec}{color} -% \srefaddidkey[prefix=sec.]{sec} -% \newcommand\mysection[2][]{\metasetkeys{#1}\sref@target\color{\sec@color} -% \section[\sec@short]{#2}\sref@label@id{Section \thesection}} -% \end{verbatim} -% \vspace*{-1.5em} -% \caption{A slightly upgraded sectioning command}\label{fig:mysection:setup} -% \end{exfig} -% -% In this situation, the |\mysection| macro processes the optional argument with -% |\metasetkeys| and then sets the color of the section. The -% \DescribeMacro{\sref@target}|\sref@target| sets up the hyper-target for the |hyperref| -% package to use. Then we use the regular |\section| command, and we use the -% \DescribeMacro{\sref@label@id}|\sref@label@id| macro to define the label that the -% |\sref| macro will use for cross-referencing. -% -% Note that the use of the straight use of the label ``Section'', which will be written -% into the auxiliary files is bad practice since it is not configurable. It would be much -% better to make it configurable via a presentation macro like |\my@section@label| in -% Figure~\ref{fig:mysection:configurable}. Then translators or even the user could redefine -% the |\my@section@label| to adapt them to their needs. -% -% \begin{exfig} -% \begin{verbatim} -% \newcommand\my@section@label[1]{Section~{#1}} -% \newcommand\mysection[2][]{\metasetkeys{#1}\sref@target\color{\sec@color} -% \section[\sec@short]{#2}\sref@label@id{\my@section@label\thesection}} -% \end{verbatim} -% \vspace*{-1.5em} -% \caption{A Sectioning Command with Configurable Label}\label{fig:mysection:configurable} -% \end{exfig} -% -% \subsection{Inter-Document Cross-Referencing}\sreflabel{Section}{suinterdoc} -% -% |sref.sty| provides inter-document cross-referencing. The use case is simple: we want to -% have a document collection (e.g. a book with conference proceedings), but also want to -% be able format the individual documents separately, and still have meaningful -% cross-references. To show off the possibilities, let us assume that we have a book with -% two separate papers, which we put into separate directories |idc| and |scr| to minimize -% interference between the authors Jane Doe and John Bull. To achieve this, we would set -% up paper driver files |main.tex| like the one in Figure~\ref{fig:paper-driver} in the -% two directories. These use the \DescribeMacro{\makeextrefs}|\makeextrefs| macro, which -% causes the |sref| package to generate a {\emph{external references file}} -% |main.refs|. Note that the |\makeextrefs| macro reads the previous |main.refs| file so -% that forward-referencing is possible (in the pass after a reference was labeled). -% -% \begin{exfig} -% \begin{verbatim} -% \documentclass{article} -% \usepackage[extrefs]{sref} -% \makeextrefs{idc} -% \inputrefs{scr}{../scr/main} -% \extrefstyle{scr}{\cite[\protect{\theextref}]{Doe09}} -% \title{Inter-Document Crossreferencing} -% \author{John Bull\\...} -% \begin{document}\maketitle\input{paper}\end{document} -% \end{verbatim} -% \vspace*{-2em} -% \caption{A document driver {\texttt{idc/main.tex}} for a paper}\label{fig:paper-driver} -% \end{exfig} -% -% The external references file can be read by other documents; in -% Figure~\ref{fig:paper-driver}, we read the references file of Jane Doe's paper via the -% \DescribeMacro{\inputrefs}|\inputrefs| macro. This allows John Bull to use\footnote{Note -% that the external references file is updated every time {\LaTeX} is run, so that -% references may be off by one version.} references like -% \DescribeMacro{\extref}|\extref{scr}{foo}| to reference document fragments in Jane Doe's -% paper she has labeled with the {\emph{reference prefix}} |\sreflabel{foo}| (assuming that -% she has added |\makeextrefs{scr}| in the preamble of her paper). Note that just as the -% |\sref| macro |\extref| takes an optional first argument that allows to specify the link -% text. Here, John Bull uses the \DescribeMacro{\extrefstyle}|\extrefstyle| macro to -% specify how the external references are to be formatted, in this case he decided to use a -% {\LaTeX} citation. Generally, first argument of the |\extrefstyle| macro is the -% reference prefix which should be configured, and the second is the format, where the -% \DescribeMacro{\theextref}|\theextref| macro expands to the cross-reference. In this -% case, John chose to use a bib{\TeX} citation (he has an entry |Doe09| in his database) -% for the reference to the external paper. -% -% As the content of the respective paper is input from a file |paper.tex| in the -% individual papers, we can re-use these in the book. To do this we set up a book driver -% file like the one in Figure~\ref{fig:book-driver}. This one does not use the |extrefs| -% option, so the references are written to the |.aux| file. Furthermore |\extref| is -% redefined to act like |\sref| disregarding the first required argument. Thus all -% references work like they should. -% \begin{exfig} -% \begin{verbatim} -% \documentclass{book} -% \usepackage{sref} -% \title{Cross-Referencing in {\LaTeX}} -% \author{Elder Reseacher} -% \begin{document} -% \maketitle -% \chapter{Semantic Crossreferencing (Jane Doe, ...)} -% \input{scr/paper}\newpage -% ... -% \chapter{Inter-Document Crossreferencing (John Bull, ...)} -% \input{idc/paper}\newpage -% \end{document} -% \end{verbatim} -% \vspace*{-2em} -% \caption{A document driver for the book assembling the papers}\label{fig:book-driver} -% \end{exfig} -% -% This example has been carried through (without the separation of chapters in to -% subdirectories) in the files accompanying the source distribution of the |sref| -% package. They are used for testing the package. -% -% \subsection{Semantic Versions of Commonly used Referencing Commands}\label{sec:user:common} -% -% The |sref| package defines semantically referencable versions of commonly used {\LaTeX} -% environments and command sequences.\footnote{This section will be extended by need, so -% if you miss some semantic environment, please contact the package author, or (better) -% file an issue at~\cite{sTeX:github:on})} -% -% The \DescribeEnv{sequation}|sequation| environment takes an optional key/value argument -% that allows to specify an identifier and unifies the behavior of the |equation| (if an -% |id| key is given) and |displaymath| (else) environments. So the markup -% \begin{exfig} -% \begin{verbatim} -% A semantic equation with id -% \begin{sequation}[id=foo] -% e^{mc}=-1 -% \end{sequation} -% and another one without id -% \begin{sequation} -% e^{mc}=-1 -% \end{sequation} -% now, we reference the first equation: \sref{foo} -% \end{verbatim} -% \vspace*{-1.5em}\hrule -% yields the result:\hrule -% A semantic equation with id -% \begin{sequation}[id=foo] -% e^{mc}=-1 -% \end{sequation} -% and another one without id -% \begin{sequation} -% e^{mc}=-1 -% \end{sequation} -% now, we reference the first equation: \sref{foo} -% \caption{Semantic Equation}\label{fig:sequation} -% \end{exfig} -% -% \subsection{Semantic Citations}\label{sec:user:citations} -% -% \withcite{Patashnik:b88}{bib\TeX} and \withcite{Lehmann:biblatex10}{bib\LaTeX} provide a -% semi-semantic way of referencing literature. If we look at the -% \begin{withcitation}{LasSwi:rdf99} -% current practice of citing from an RDF standpoint~\citeit which views links as -% subject/predicate/object triples, -% \end{withcitation} -% then the treatment of the predicate and object are semantic, but the subject is hinted -% at by mere juxtaposition in the text. The |sref| package helps out here via the -% \DescribeMacro{\withcite} macro for short subjects (in the second argument) that are -% postfixed by the citation (key in the first argument). For instance the occurrence at -% the beginning of this paragraph was created by -% \begin{verbatim} -% \withcite{Patashnik:b88}{bib\TeX} -% \end{verbatim} -% The general case is covered by the \DescribeEnv{withcitation}|withcitation| environment -% for long subjects. In the latter, the citation can be placed by the -% \DescribeMacro{\citeit}. For instance, the second sentence was marked up as -% \begin{verbatim} -% If we look at the -% \begin{withcitation}{LasSwi:rdf99} -% current practice of citing from an RDF standpoint which views links as -% subject/predicate/object triples, -% \end{withcitation} -% then the treatment of the predicate ... -% \end{verbatim} -% The advantage of this treatment is that the meaning of the reference is fully marked up -% and can be taken advantage of in the \omdoc transformation, from which RDF triples can -% then be harvested for a linked open data treatment. -% -% \section{Limitations}\label{sec:limitations} -% -% In this section we document known limitations. If you want to help alleviate them, -% please feel free to contact the package author. Some of them are currently discussed in -% the \sTeX GitHub repository~\cite{sTeX:github:on}. -% \begin{enumerate} -% \item currently only the |\sref| macro has a fallback argument. The others |\srefs| and -% |\srefl| and their external variants should also have them, but I am not clear what -% the adequate invocation pattern would be. -% \end{enumerate} -% -% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography} -% \newpage -% -% \section{Implementation}\label{sec:impl} -% -% \subsection{Package Options}\label{sec:impl:options} -% -% We declare some switches which will modify the behavior according to the package -% options. Generally, an option |xxx| will just set the appropriate switches to true -% (otherwise they stay false).\ednote{need an implementation for {\latexml}} -% -% \begin{macrocode} -%<*package> -\newif\ifextrefs\extrefsfalse -\DeclareOption{extrefs}{\extrefstrue} -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{metakeys}} -\ProcessOptions -% \end{macrocode} -% -% Then we need to set up the packages by requiring the |metakeys| package~\ctancite{Kohlhase:metakeys} -% to be loaded (in the right version). -% -% \begin{macrocode} -\RequirePackage{metakeys} -\RequirePackage{xspace} -\RequirePackage{etoolbox} -% \end{macrocode} -% -% \subsection{Crossreferencing}\label{sec:impl:crossref} -% -% The following user-level macros just use the |\sref@hlink| macros in various ways for -% internal referencing.\ednote{they need implementation in LaTeXML, the ones here only are -% stubs to make the error messages shut up.} -% -% \begin{macro}{\sref} -% First we declare the keys for |\sref|. |\sref@part| will be globally defined when -% |\makeextrefs| is called. -% \begin{macrocode} -\addmetakey{sref}{linktext} -\addmetakey{sref}{fallback} -\addmetakey{sref}{pre} -\addmetakey{sref}{post} -\newcommand\sref[2][]{% - \metasetkeys{sref}{#1}% - \ifcsundef{sref@part}{% - \sref@hlink[\sref@linktext]{#2}{\sref@fallback}{\sref@pre}{\sref@post}% - }{% - \sref@hlink[\sref@linktext]{\sref@part @#2}{\sref@fallback}{\sref@pre}{\sref@post}% - }% - \xspace% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\srefs} -% \begin{macrocode} -\newcommand\srefs[3][]{% - \def\@test{#1}% - \ifx\@test\@empty% - \sref{#2} and \sref{#3}% - \else% - #1% - \fi% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\srefl} -% \begin{macrocode} -\newcommand\srefl[3][]{% - \def\@test{#1}% - \ifx\@test\@empty% - \sref{#2} to \sref{#3}% - \else% - #1% - \fi% -}% -% \end{macrocode} -% \end{macro} -% \ednote{it is not clear what we want in the LaTeXML implementation of spageref} -% \begin{macro}{\spageref} -% \begin{macrocode} -\newcommand\spageref[1]{% - \ifcsundef{sref@part}{% - \sref@pageref{#1}% - }{% - \sref@pageref{\sref@part @#1}% - }% -}% -% \end{macrocode} -% \end{macro} -% -% \subsection{An API for Package Authors}\label{sec:impl:package-authors} -% -% We find out whether the |hyperref| package is loaded, since we may want to use it for -% cross-references, for which we set up some internal macros that gracefully degrade if -% |hyperref| is not loaded. -% -% \begin{macro}{\sref@*@ifh} -% \begin{macrocode} -\newif\ifhref\hreffalse% -\AtBeginDocument{% - \@ifpackageloaded{hyperref}{% - \hreftrue% - }{% - \hreffalse% - }% -}% -\newcommand\sref@href@ifh[2]{% - \ifhref% - \href{#1}{#2}% - \else% - #2% - \fi% -}% -\newcommand\sref@hlink@ifh[2]{% - \ifhref% - \hyperlink{#1}{#2}% - \else% - #2% - \fi% -}% -\newcommand\sref@target@ifh[2]{% - \ifhref% - \hypertarget{#1}{#2}% - \else% - #2% - \fi% -}% -% \end{macrocode} -% \end{macro} -% -% Then we provide some macros for {\sTeX}-specific crossreferencing -% -% \begin{macro}{\sref@target} -% The next macro uses this and makes an target from the current |sref@id| declared by -% a |id| key. -% \begin{macrocode} -\def\sref@target{% - \ifx\sref@id\@empty% - \relax% - \else% - \edef\@target{sref@\ifcsundef{sref@part}{}{\sref@part @}\sref@id @target}% - \sref@target@ifh\@target{}% - \fi% -}% -% \end{macrocode} -% \end{macro} -% -% The next two macros are used for setting labels, it is mainly used for enabling forward -% references, to do this, it is written into \meta{jobname}|.aux| or \meta{jobname}|.refs|. -% -% \begin{macro}{\@sref@def} -% This macro stores the value of its last argument in a custom macro for reference. -% \begin{macrocode} -%\newcommand\@sref@def[3]{\expandafter\gdef\csname sref@#1@#2\endcsname{#3}} -\newcommand\@sref@def[3]{\csgdef{sref@#1@#2}{#3}} -% \end{macrocode} -% \end{macro} -% -% The next step is to set up a file to which the references are written, this is normally -% the |.aux| file, but if the |extref| option is set, we have to use an |.ref| file. -% \begin{macrocode} -\ifextrefs% - \newwrite\refs@file% -\else% - \def\refs@file{\@auxout}% -\fi% -% \end{macrocode} -% -% \begin{macro}{\sref@def} -% This macro writes an |\@sref@def| command to the current aux file and also executes it. -% \begin{macrocode} -\newcommand\sref@def[3]{% - %\@sref@def{#1}{#2}{#3}% - \protected@write\refs@file{}{\string\@sref@def{#1}{#2}{#3}}% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\srefaddidkey} -% |\srefaddidkey[|\meta{keyval}|]{|\meta{group}|}| extends the metadata keys of the -% group \meta{group} with an |id| key. In the optional key/value pairs in \meta{keyval} -% the |prefix| key can be used to specify a prefix. Note that the |id| key defined by -% |\srefaddidkey[|\meta{keyval}|]{|\meta{group}|}| not only defines |\sref@id|, which is -% used for referencing by the |sref| package, but also |\|\meta{group}|@id|, which is -% used for showing metadata via the |showmeta| option of the |metakeys| package. -% \begin{macrocode} -\addmetakey{srefaddidkey}{prefix} -\newcommand\srefaddidkey[2][]{% - \metasetkeys{srefaddidkey}{#1}% - \@metakeys@ext@clear@keys{#2}{sref@id}{}% id cannot have a default - \metakeys@ext@clear@keys{#2}{id}{}% - \metakeys@ext@showkeys{#2}{id}% - \define@key{#2}{id}{% - \edef\sref@id{\srefaddidkey@prefix ##1}% - %\expandafter\edef\csname #2@id\endcsname{\srefaddidkey@prefix ##1}% - \csedef{#2@id}{\srefaddidkey@prefix ##1}% - }% -}% -% \end{macrocode} -% \end{macro} -% -% \subsection{Inter-Document Crossreferencing}\label{sec:impl:interdoc} -% -% \begin{macro}{\makeextrefs} -% \begin{macrocode} -\newcommand\makeextrefs[1]{% - \gdef\sref@part{#1}% - \makeatletter% - \IfFileExists{\jobname.refs}{\input{\jobname.refs}}{}% - \immediate\openout\refs@file=\jobname.refs - \makeatother% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\sref@label} -% The |\sref@label| macro writes a label definition to the auxfile. -% \begin{macrocode} -\newcommand\sref@label[2]{% - \sref@def{\ifcsundef{sref@part}{}{\sref@part @}#2}{page}{\thepage}% - \sref@def{\ifcsundef{sref@part}{}{\sref@part @}#2}{label}{#1}% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\sreflabel} -% The |\sreflabel| macro is a semantic version of |\label|, it combines the categorization -% given in the first argument with {\LaTeX}'s |\@currentlabel|. -% \begin{macrocode} -\newcommand\sreflabel[2]{\sref@label{#1 \@currentlabel}{#2}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\sref@label@id} -% The |\sref@label@id| writes a label definition for the current |\sref@id| if it is -% defined. -% \begin{macrocode} -\newcommand\sref@label@id[1]{% - \ifx\sref@id\@empty% - \relax% - \else% - \sref@label{#1}{\sref@id}% - \fi% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\sref@label@id@arg} -% The |\sref@label@id@arg| writes a label definition for the second argument if it is -% defined. -% \begin{macrocode} -\newcommand\sref@label@id@arg[2]{% - \def\@@id{#2} - \ifx\@@id\@empty% - \relax% - \else% - \sref@label{#1}{\@@id}% - \fi% -}% -% \end{macrocode} -% \end{macro} -% -% Finally we come to the user visible macro |\sref| which is used for -% referencing.\ednote{The {\latexml} does not take into account the optional argument -% yet.} -% -% \begin{macro}{\sref@hlink} -% |\sref@hlink[|\meta{alt}|]{|\meta{label}|}{|\meta{fallback}|}{|\meta{pre}|}{|\meta{post}|}| -% creates an error message if the target specified by \meta{label} is not defined (but -% uses \meta{fallback} if provided), and otherwise generates a hyperlinked reference -% whose link text is \meta{alt} (if the optional argument is given) and the label -% generated by object specified by \meta{label} otherwise. -% \begin{macrocode} -\newcommand\sref@hlink[5][]{% - \edef\@linktext{#1}% - \edef\@fallback{#3}% - \ifcsundef{sref@#2@label}{% - \ifx\@fallback\@empty% warn about undefined links and show a substitute - \protect\G@refundefinedtrue\PackageWarning{sref}{reference #2 undefined}% - \ifx\@linktext\@empty% - ?#2?% - \else% - \@linktext% - \fi% - \else% - \protect\G@refundefinedtrue\PackageWarning{sref}{using fallback for undefined reference #2}% - \@fallback% - \fi - }{% - \edef\@link{#4\@nameuse{sref@#2@label}#5}% retrieve the reference label and prepost it - \ifx\@linktext\@empty% - \sref@hlink@ifh{sref@#2@target}{\@link}% - \else% - \sref@hlink@ifh{sref@#2@target}{\@linktext}% - \fi% - }% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\sref@page@label} -% This macro styles a page reference. -% \begin{macrocode} -\newcommand\sref@page@label[1]{p.~{#1}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\sref@pageref} -% The next macro creates an error message if the target is not defined, and otherwise -% generates a page reference. -% \begin{macrocode} -\newcommand\sref@pageref[1]{% - \ifcsundef{sref@#1@page}{% - \protect\G@refundefinedtrue\PackageWarning{sref}{reference #1 undefined}\sref@page@label{??}% - }{% - \sref@hlink@ifh{sref@#1@target}{\sref@page@label{\@nameuse{sref@#1@page}}}% - }% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\sref@href} -% The next macro creates an error message if the target is not defined, and otherwise -% generates a hyperlinked reference. -% \begin{macrocode} -\newcommand\sref@href[3][]{% - \edef\@linktext{#1}% - \ifcsundef{sref@#2@label}{% - \protect\G@refundefinedtrue\PackageWarning{sref}{reference #2 undefined}??% - }{% - \ifcsundef{sref@#3@URI}{% - \protect\G@refundefinedtrue\PackageWarning{sref}{external refs of type #3 undefined}??% - }{% - \edef\@uri{\@nameuse{sref@#3@URI}.pdf\#sref@#2@target}% - \edef\@label{\ifx\@linktext\@empty\@nameuse{sref@#2@label}\else\@linktext\fi}% - \sref@href@ifh\@uri\@label% - }% - }% -}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\extref} -% The next macros use |\sref@href| with the respective prefix for external referencing -% if external references are used as indicated by the |extrefs| option; otherwise it -% disregards the first required macro and uses internal referencing.\ednote{This needs -% to be implemented on the LaTeXML side.} -% \begin{macrocode} -\ifextrefs% - \newcommand\extref[3][]{% - \def\theextref{\sref@href[#1]{#2@#3}{#2}}% - \csname doextref@#2\endcsname% - }% -\else% - \newcommand\extref[3][]{\sref[#1]{#3}}% -\fi% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\extpageref} -% The next macros use |\sref@pagref| with the respective prefix for external referencing -% if external references are used as indicated by the |extrefs| option; otherwise it -% disregards the first required macro and uses internal referencing.\ednote{This needs -% to be implemented on the LaTeXML side.} -% \begin{macrocode} -\ifextrefs% - \newcommand\extpageref[3][]{% - \def\theextref{\sref@pageref{#2@#3}}% - \csname doextpageref@#2\endcsname% - }% -\else% - \newcommand\extpageref[3][]{\spageref{#3}}% -\fi% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\extrefstyle} -% This user macro defines an internal macro that is used for internal styling; for -% instance |\extrefstyle{foo}{\theextref in bar}| defines the macro |\doextref@foo| -% which evaluates to \meta{the reference} |in bar|. This is used in the |\extref| macro. -% \begin{macrocode} -%\newcommand\extrefstyle[2]{\expandafter\gdef\csname doextref@#1\endcsname{#2}}% -\newcommand\extrefstyle[2]{\csgdef{doextref@#1}{#2}}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\extpagerefstyle} -% This is analogous to |\extrefstyle| -% \begin{macrocode} -%\newcommand\extpagerefstyle[2]{\expandafter\gdef\csname doextpageref@#1\endcsname{#2}}% -\newcommand\extpagerefstyle[2]{\csgdef{doextpageref@#1}{#2}}% -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\inputrefs} -% If the external references file exists, it is read (under the protection of -% |\makeatother|) otherwise an error message is displayed. -% \begin{macrocode} -\newcommand\inputrefs[2]{% - %\@namedef{sref@#1@URI}{#2}% - \csdef{sref@#1@URI}{#2}% - \extrefstyle{#1}{\theextref}\extpagerefstyle{#1}{\theextref}% - \makeatletter% - \IfFileExists{#2.refs}{% - \message{Reading external references: #2.refs}\input{#2.refs}% - }{% - \PackageError{sref}{Reference file #2.refs does not exist}% - {Maybe you have to run LaTeX on #2.tex first}}% - \makeatother% -}% -% \end{macrocode} -% \end{macro} -% -% \subsection{Semantic Versions of Commonly used Referencing Commands}\label{sec:impl:common} -% -% \begin{environment}{sequation} -% \begin{macrocode} -\srefaddidkey{sequation}% -\def\sref@sequation@heading{equation}% -\newenvironment{sequation}[1][]{% - \metasetkeys{sequation}{#1}% - \ifx\sref@id\@empty% - \begin{displaymath}% - \else% no id, using equation* - \begin{equation}% - \sref@target\sref@label@id{\sref@sequation@heading~(\theequation)}% - \fi% -}{% - \ifx\sref@id\@empty% - \end{displaymath}% - \else% - \end{equation}% - \fi% -}% -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{seqnarray} -% \begin{macrocode} -\newenvironment{seqnarray}[1][]{% - \metasetkeys{sequation}{#1}% - \begin{eqnarray*}% - \sref@target% - \sref@label@id{\sref@sequation@heading~(\theequation)}% -}{% - \end{eqnarray*}% -}% -% \end{macrocode} -% \end{environment} -% -% \subsection{Semantic Citations}\label{sec:impl:citations} -% -% \begin{macro}{withcite} -% \begin{macrocode} -\newcommand\withcite[2]{#2~\cite{#1}}% -% \end{macrocode} -% \end{macro} -% -% \begin{environment}{withcitation} -% \begin{macrocode} -\newenvironment{withcitation}[1]{\def\citeit{\cite{#1}\xspace}}{}% -%</package> -% \end{macrocode} -% \end{environment} -% \Finale -\endinput -% \iffalse -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: -% \fi - -% LocalWords: GPL structuresharing STR omdoc dtx stex CPERL LoadClass url dc sreflabel -% LocalWords: RequirePackage RegisterNamespace namespace xsl DocType ltxml dtd filedate -% LocalWords: ltx DefEnvironment beforeDigest AssignValue inPreamble getGullet slabel -% LocalWords: afterDigest keyval omgroup DefKeyVal Semiverbatim KeyVal iffalse rangle -% LocalWords: OptionalKeyVals DefParameterType IfBeginFollows skipSpaces CMP sucrossref -% LocalWords: ifNext DefMacro needwrapper unlist DefConstructor omtext bgroup suinterdoc -% LocalWords: useCMPItemizations RefStepItemCounter egroup beginItemize li di rangle -% LocalWords: beforeDigestEnd useTheoryItemizations dt autoclose ul ol dl env xspace -% LocalWords: afterOpen LastSeenCMP autoClose proto ToString textsuperscript withhash -% LocalWords: addAttribute nlex nlcex omdocColorMacro args tok MergeFont qw oref XMath -% LocalWords: TokenizeInternal toString isMath foreach maybeCloseElement id'd extpageref -% LocalWords: autoOpen minipage footnotesize scriptsize numberIt whatsit href citenode -% LocalWords: getAttribute setAttribute OMDoc RelaxNGSchema noindex xml lec hypertarget -% LocalWords: Subsubsection useDefaultItemizations refundefinedtrue blockquote findnodes -% LocalWords: DefCMPConstructor inlinequote idx idt ide idp emph sref extrefs endinput -% LocalWords: flushleft flushright DeclareOption hyperref LaTeX tex pdf hlink behavior -% LocalWords: sequation omd def texorpdfstring raisebox latexml texttt newpage etoolbox -% LocalWords: fileversion maketitle tableofcontents autoref hpyerref mysection ifcsundef -% LocalWords: exfig vspacesrefaddidkey srefaddidkey scr vspace withcite LasSwi csgdef -% LocalWords: makeextrefs inputrefs extref foo Patashnik withcite biblatex10 sref@pagref -% LocalWords: extrefstyle theextref theextref displaymath hrule impl ednote sref@ifundef -% LocalWords: printbibliography newif ifextrefs extrefsfalse extrefstrue srefs csedef -% LocalWords: Crossreferencing newrobustcmd ifundefined ifx srefl xref ifh gdef csdef -% LocalWords: ifhref hreffalse ifpackageloaded hreftrue expandafter jobname doextpageref -% LocalWords: jobname csname endcsname newwrite auxout makeatletter openout initialize -% LocalWords: makeatother auxfile nameuse doextref namedef newenvironment NeedsTeXFormat -% LocalWords: theequation refnum refnum seqnarray eqnarray endseqnarray doctex ldots -% LocalWords: textsuperscript spageref spageref thepage pageref ctancite rdf99 prepost -% LocalWords: cross-referencable showmeta showmeta metakeys metasetkeys textsf -% LocalWords: addmetakey referencable langle textsf langle withcitation citeit -% LocalWords: compactenum textbackslash supackage-authors extpagerefstyle customization -% LocalWords: categorization postpended diff --git a/macros/latex/contrib/stex/sty/sref/sref.ins b/macros/latex/contrib/stex/sty/sref/sref.ins deleted file mode 100644 index 195dace45b..0000000000 --- a/macros/latex/contrib/stex/sty/sref/sref.ins +++ /dev/null @@ -1,30 +0,0 @@ -%% -%% This file generates files required to use the ed package. -%% At your command prompt write -%% -%% latex sref.ins -%% -%% Copyright(c) 2009 Michael Kohlhase -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{sref.sty}{\from{sref.dtx}{package}}} - -\Msg{*} -\Msg{* You probably need to move the generated style files into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/sref/sref.pdf b/macros/latex/contrib/stex/sty/sref/sref.pdf Binary files differdeleted file mode 100644 index d78872018e..0000000000 --- a/macros/latex/contrib/stex/sty/sref/sref.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/statements/README b/macros/latex/contrib/stex/sty/statements/README deleted file mode 100644 index 2f214e6806..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/statements/statements.dtx b/macros/latex/contrib/stex/sty/statements/statements.dtx deleted file mode 100644 index 3d839be5fb..0000000000 --- a/macros/latex/contrib/stex/sty/statements/statements.dtx +++ /dev/null @@ -1,1304 +0,0 @@ -% \iffalse meta-comment -% An Infrastructure for Mathematical Statements in sTeX -% Copyright (C) 2004-2008 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<package>\ProvidesPackage{statements}[2019/03/20 v1.4 Semantic Markup for Statements] -% -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage[T1]{fontenc} -\usepackage{url,array,float,amsfonts} -\usepackage{statements,presentation} -\usepackage{paralist} -\usepackage[show]{ed} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{stex-logo} -\usepackage{ctangit} -\usepackage{hyperref} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\def\githubissue#1{\cite{sTeX:github:on}, \hyperlink{https://github.com/KWARC/sTeX/issues/#1}{issue #1}} -\begin{document} -\RecordChanges -\DocInput{statements.dtx} -\end{document} -%</driver> -% \fi -% -% \CheckSum{809} -% -% \changes{v0.9}{2005/06/14}{First Version with Documentation} -% \changes{v0.9a}{2005/07/01}{Completed Documentation} -% \changes{v0.9b}{2005/08/06}{Complete functionality and Updated Documentation} -% \changes{v0.9c}{2006/01/13}{more packaging} -% \changes{v0.9d}{2007/09/09}{moved omtext and friends to the omdoc package} -% \changes{v0.9d}{2007/09/09}{made dependence on the omdoc package explicit} -% \changes{v0.9d}{2007/09/09}{adding ids to many elements} -% \changes{v0.9e}{2008/05/27}{adding cross-references} -% \changes{v0.9e}{2008/09/29}{augmenting the index macros with optional values} -% \changes{v0.9f}{2008/12/04}{changed 'consymb' to 'symboldec' and documented it.} -% \changes{v0.9g}{2010/01/14}{the package is now based on {\texttt{ntheorem for presentation}}} -% \changes{v0.9g}{2010/01/19}{Added support for localization} -% \changes{v0.9g}{2010/02/23}{added {\texttt{\textbackslash symref}}} -% \changes{v1.0}{2010/06/18}{now based on {\texttt{omtext}} package instead of {\texttt{omdoc}}} -% \changes{v1.0}{2010/07/13}{adding {\texttt{\textbackslash inlineex}}} -% \changes{v1.1}{2011/08/25}{renaming all convenience macros for {\texttt{\textbackslash -% definendum}} and {\texttt{\textbackslash termref}}} -% \changes{v1.1}{2012/07/06}{adding \texttt{\textbackslash usevocab} to example for importing} -% \changes{v1.1}{2013/05/17}{more support for types: \texttt{typedec} and -% \texttt{\textbackslash inlinetypedec}} -% \changes{v1.2}{2015/04/03}{adding optional last arg to \texttt{\textbackslash \*defi*}} -% \changes{v1.2}{2015/04/17}{adding \texttt{\textbackslash inlineass}} -% \changes{v1.2}{2015/09/05}{adding \texttt{\textbackslash defis} and friends} -% \changes{v1.3}{2017/07/31}{adding \texttt{\textbackslash Defi}, \texttt{\textbackslash Trefi} and friends} -% \changes{v1.4}{2017/10/15}{changing the optional argument of \texttt{\textbackslash -% defi} and friends to a keyval argument} -% -% \GetFileInfo{statements.sty} -% -% \MakeShortVerb{\|} -% \def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} -% \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\activemath{\scsys{ActiveMath}} -% \title{Semantic Markup for Mathematical Statements\thanks{Version {\fileversion} (last revised -% {\filedate})}} -% \author{Michael Kohlhase\\ -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}} -% \maketitle -% -% \begin{abstract} -% The |statements| package is 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 {\TeX/\LaTeX} into a document format for -% mathematical knowledge management (MKM). -% -% This package provides semantic markup facilities for mathematical statements like -% Theorems, Lemmata, Axioms, Definitions, etc. in {\stex} files. This structure can be -% used by MKM systems for added-value services, either directly from the {\sTeX} -% sources, or after translation. -% \end{abstract} -% -% \setcounter{tocdepth}{2}\tableofcontents\newpage -% -% \section{Introduction}\label{sec:intro} -% -% The motivation for the |statements| package is very similar to that for semantic macros -% in the |modules| package: We want to annotate the structural semantic properties of -% statements in the source, but present them as usual in the formatted documents. In -% contrast to the case for mathematical objects, the repertoire of mathematical statements -% and their structure is more or less fixed. -% -% This structure can be used by MKM systems for added-value services, either directly from -% the {\sTeX} sources, or after translation. Even though it is part of the {\stex} -% collection, it can be used independently, like it's sister package |sproofs|. -% -% {\stex}~\cite{Kohlhase:ulsmf08,sTeX:online} is a version of {\TeX/\LaTeX} that allows to -% markup {\TeX/\LaTeX} documents semantically without leaving the document format, -% essentially turning {\TeX/\LaTeX} into a document format for mathematical knowledge -% management (MKM). Currently the {\omdoc} format~\cite{Kohlhase:OMDoc1.2} is directly -% supported. -% -% \section{The User Interface}\label{sec:user-interface} -% -% The |statements| package supplies a semantically oriented infrastructure for marking up -% mathematical statements: fragments of natural language that state properties of -% mathematical objects, e.g. axioms, definitions, or theorems. The |statement| package -% provides an infrastructure for marking up the semantic relations between statements for -% the {\omdoc} transformation and uses the |ntheorem| package~\cite{MaySch:eltte09} for -% formatting (i.e. transformation to PDF). -% -% \subsection{Package Options}\label{sec:user:options} -% -% The |statements| package provides the \DescribeMacro{defindex}|defindex| option to -% \sTeX. If this is set, then definienda are automatically passed into the index of the -% document. Furthermore, the |statements| package passes the -% \DescribeMacro{showmeta}|showmeta| to the |metakeys| package. If this is set, then the -% metadata keys are shown (see~\cite{Kohlhase:metakeys:ctan} for details and customization -% options). The |nontheorem| option tells statements not to load the |ntheorem| package -- -% in case some other theorem package is already loaded; e.g. by the |beamer| package and -% we prefer that. Note that using the |nontheorem| option in a case where no theorem -% package is loaded will lead to errors. -% -% \subsection{Statements}\label{sec:statements} -% -% All the statements are marked up as environments, that take a |KeyVal| argument that -% allows to annotate semantic information. Generally, we distinguish two forms of -% statements: -% \begin{description} -% \item[{\twintoo{block}{statement}s}] have explicit discourse markers that delimit their -% content in the surrounding text, e.g. the boldface word ``{\bf{Theorem}:}'' as a start -% marker and a little line-end box as an end marker of a proof. -% \item[{\twintoo{flow}{statement}s}] do not have explicit markers, they are interspersed -% with the surrounding text. -% \end{description} -% Since they have the same semantic status, they must both be marked up, but styled -% differently. We distinguish between these two presentational forms with the -% \DescribeMacro{display=}|display| key, which is allowed on all statement -% environments. If it has the value |block| (the default), then the statement will be -% presented in a paragraph of its own, have explicit discourse markers for its begin and -% end, possibly numbering, etc. If it has the value |flow|, then no extra presentation -% will be added the semantic information is invisible to the reader. Another key that is -% present on all statement environments in the \DescribeMacro{id=}|id| key it allows to -% identify the statement with a name and to reference it with the semantic referencing -% infrastructure provided by the |sref| package~\ctancite{Kohlhase:sref}. -% -% \subsubsection{Axioms and Assertions}\label{sec:user:axiomassertion} -% -% The \DescribeEnv{assertion}|assertion| environment is used for marking up statements -% that can be justified from previously existing knowledge (usually marked with the -% monikers ``Theorem'', ``Lemma'', ``Proposition'', etc. in mathematical vernacular). The -% environment |assertion| is used for all of them, and the particular subtype of -% assertion is given in the \DescribeMacro{type=}|type| key. So instead of -% |\begin{Lemma}|\iffalse\end{Lemma}\fi we have to write -% |\begin{assertion}[type=lemma]|\iffalse\end{assertion}\fi (see -% Example~\ref{fig:assertion} for an example). -% \begin{exfig} -% \begin{verbatim} -% \begin{assertion}[id=sum-over-odds,type=lemma] -% $\sum_{i=1}^n{2i-1}=n^2$ -% \end{assertion} -% \end{verbatim} -% \vspace{-1em}will lead to the result\vspace{-2em}\par\noindent -% \begin{assertion}[id=sum-over-odds,type=lemma] -% $\sum_{i=1}^n{2i-1}=n^2$ -% \end{assertion} -% \caption{Semantic Markup for a Lemma in a {\texttt{module}} context}\label{fig:assertion} -% \end{exfig} -% -% Whether we will see the keyword ``Lemma'' will depend on the value of the optional -% |display| key. In all of the |assertion| environments, the presentation expectation is -% that the text will be presented in italic font. The presentation (keywords, spacing, and -% numbering) of the |assertion| environment is delegated to a theorem styles from the -% |ntheorem| environment. For an assertion of type \meta{type} the |assertion| environment -% calls the |ST|\meta{type}|AssEnv| environment provided by the |statements| package; see -% Figure~\ref{fig:assertion-types} for a list of provided assertion types. Their -% formatting can be customized by redefining the |ST|\meta{type}|AssEnv| environment via -% the |\renewtheorem| command from the |ntheorem| package; see~\cite{MaySch:eltte09} for -% details. -% -% \begin{exfig} -% \begin{tabular}{|l|l|}\hline -% Value & Explanation \\\hline\hline -% \textbf{theorem}, \textbf{proposition} -% & an important assertion with a proof\\\hline -% \multicolumn{2}{|p{12cm}|}{\footnotesize Note that the meaning of \textbf{theorem} -% (in this case the existence of a proof) is not -% enforced by {\omdoc} applications. It can be appropriate to give an assertion -% the \textbf{theorem}, if the -% author knows of a proof (e.g. in the literature), but has not formalized it in -% {\omdoc} yet.}\\\hline\hline -% \textbf{lemma} & a less important assertion with a proof\\\hline -% \multicolumn{2}{|p{12cm}|}{\footnotesize The difference of importance specified -% here is even softer than the other ones, since e.g. reusing -% a mathematical paper as a chapter in a larger monograph, may make it necessary to -% downgrade a theorem (e.g. the main theorem of the paper) and give it the status of -% a lemma in the overall work.}\\\hline\hline -% \textbf{corollary} & a simple consequence\\\hline -% \multicolumn{2}{|p{12cm}|}{\footnotesize An assertion is -% sometimes marked as a corollary to some other statement, if the proof is -% considered simple. This is often the case for important theorems that are simple -% to get from technical lemmata.}\\\hline\hline -% \textbf{postulate}, \textbf{conjecture} -% & an assertion without proof or counter-exam\-ple\\\hline -% \multicolumn{2}{|p{12cm}|}{\footnotesize Conjectures are assertions, whose -% semantic value is not yet decided, but which the author considers likely to be -% true. In particular, there is no proof or counter-example.}\\\hline\hline -% \textbf{false-conjecture} -% & an assertion with a counter-example\\\hline -% \multicolumn{2}{|p{12cm}|}{\footnotesize A conjecture that has proven to be false, -% i.e. it has a counter-example. Such assertions are often kept for illustration and -% historical purposes.}\\\hline\hline -% \textbf{obligation}, \textbf{assumption} -% & an assertion on which a proof of another depends\\\hline -% \multicolumn{2}{|p{12cm}|}{\footnotesize These kinds of assertions -% are convenient during the exploration of a mathematical theory. They can be used -% and proven later (or assumed as an axiom).}\\\hline\hline -% \textbf{rule} -% & a normative assertion\\\hline -% \multicolumn{2}{|p{12cm}|}{\footnotesize These kinds of assertions can be interpreted -% procedurally to trigger actions}\\\hline\hline -% \textbf{observation}, \textbf{remark} & if everything else fails\\\hline -% \multicolumn{2}{|p{12cm}|}{\footnotesize This type is the catch-all if none of the others -% applies.}\\\hline -% \end{tabular} -% \caption{Types of Mathematical Assertions}\label{fig:assertion-types} -% \end{exfig} -% -% \DescribeEnv{axiom} The |axiom| environment is similar to |assertion|, but the content -% has a different ontological status: axioms are assumed without (formal) justification, -% whereas assertions are expected to be justified from other assertions, axioms or -% definitions. This environment relegates the formatting to the |STaxiomEnv| environment, -% which can be redefined for configuration. -% -% \subsubsection{Symbols}\label{sec:user:symbol} -% -% \DescribeEnv{symboldec} The |symboldec| environment can be used for declaring concepts -% and symbols. Note the the |symdef| forms from the |modules| package will not do this -% automatically (but the |definition| environment and the |\inlinedef| macro will for all -% the definienda; see below). The |symboldec| environment takes an optional keywords -% argument with the keys |id|, |role|, |title| and |name|. The first is for general -% identification, the |role| specifies the {\openmath}/{\omdoc} role, which is one of -% |object|, |type|, |sort|, |binder|, |attribution|, |application|, |constant|, -% |semantic-attribution|, and |error| (see the {\omdoc} specification for details). The -% |name| key specifies the {\openmath} name of the symbol, it should coincide with the -% control sequence introduced by the corresponding |\symdef| (if one is present). The -% |title| key is for presenting the title of this symbol as in other statements. Usually, -% |axiom| and |symboldec| environments are used together as in Figure~\ref{fig:axioms}. -% -%\begin{exfig} -% \begin{verbatim} -% \symdef{zero}{0} -% \begin{symboldec}[name=zero,title=The number zero,type=constant] -% The number zero, it is used as the base case of the inductive definition -% of natural numbers via the Peano Axioms. -% \end{symboldec} -% -% \symdef{succ}[1]{\prefix{s}{#1}} -% \begin{symboldec}[name=succ,title=The Successor Function,type=application] -% The successor function, it is used for the step case of the inductive -% definition of natural numbers via the Peano Axioms. -% \end{symboldec} -% -% \symdef{NaturalNumbers}{\mathbb{N}} -% \begin{symboldec}[name=succ,title=The Natural Numbers,type=constant] -% The natural numbers inductively defined via the Peano Axioms. -% \end{symboldec} -% -% \begin{axiom}[id=peano.P1,title=P1] -% $\zero$ is a natural number. -% \end{axiom} -% ... -% \begin{axiom}[id=peano.P5,title=P5] -% Any property $P$ such $P(\zero)$ and $P(\succ{k})$ whenever $P(k)$ -% holds for all $n$ in $\NaturalNumbers$ -% \end{axiom} -% \end{verbatim} -% \vspace{-1em}will lead to the result\medskip\par\noindent -% \begin{module}[id=peano] -% \symdef{zero}{0} -% \begin{symboldec}[name=zero,title=The number zero,role=constant] -% The number zero, it is used as the base case of the inductive definition -% of natural numbers via the Peano Axioms. -% \end{symboldec} -% -% \symdef{succ}[1]{\prefix{s}{#1}} -% \begin{symboldec}[name=succ,title=The Successor Function,role=application] -% The successor function, it is used for the step case of the inductive -% definition of natural numbers via the Peano Axioms. -% \end{symboldec} -% -% \symdef{NaturalNumbers}{\mathbb{N}} -% \begin{symboldec}[name=succ,title=The Natural Numbers,role=constant] -% The natural numbers inductively defined via the Peano Axioms. -% \end{symboldec} -% -% \begin{axiom}[id=peano.P1,title=P1] -% $\zero$ is a natural number. -% \end{axiom} -% \ldots \stepcounter{STtheoremAssEnv}\stepcounter{STtheoremAssEnv}\stepcounter{STtheoremAssEnv} -% \begin{axiom}[id=peano.P5,title=P5] -% Any property $P$ such $P(\zero)$ and $P(\succ{k})$ whenever $P(k)$ -% holds for all $n$ in $\NaturalNumbers$ -% \end{axiom} -% \end{module} -% \caption{Semantic Markup for the Peano Axioms}\label{fig:axioms} -% \end{exfig} -% -% \subsubsection{Types}\label{sec:user:types} -% -% In many cases, we can give additional information for symbols in the form of type -% assignments. \sTeX does not fix a type system, but allows types to be arbitrary -% mathematical objects that they can be defined in (imported) modules. The -% \DescribeMacro{\symtype}|\symtype| macro can be used to assign a type to a symbol: -% \begin{quote} -% |\symtype[|\meta{keys}|]{|\meta{sym}|}{|\meta{type}|}| -% \end{quote} -% assigns the type \meta{type} to a symbol with name \meta{sym}. For instance -% -% \begin{center}% -% |\symtype[id=plus-nat.type,system=sts]{plus}{\fntype{\Nat,\Nat}\Nat}| -% \end{center} -% -% \noindent assigns the type $\mathbb{N}\times\mathbb{N}\rightarrow\mathbb{N}$ (in the -% |sts| type system) to the symbol |plus|. This states (type assignments are statements -% epistemologically) that addition is a binary function on natural numbers. The |\symtype| -% macro supports the keys |id| (for identifiers) and |system| for the type system. -% -% Often, type assignments occur in informal context, where the type assignment is given by -% a natural language sentence or phrase. For this, the |statements| package supplies the -% \DescribeEnv{typedec}|typedec| environment and the -% \DescribeMacro{\inlinetypedec}|\inlinetypedec| macro. Both take an optional keyval -% argument followed by the type. The phrase/sentence is the body of the |typedec| -% environment and the last argument of the |\inlinetypedec| macro. The symbol name is -% given in via the |for| key. For convenience, the macro -% \DescribeMacro{\thedectype}|\thedectype| is bound to the type. So we can use -%\begin{verbatim} -% \begin{typedec}[for=plus,id=plus-nat.type]{\fntype{\Nat,\Nat}\Nat} -% $+:\thedectype$ is a binary function on $\Nat$ -% \end{typedec} -% \end{verbatim} -% instead of the |\symtype| above in an informal setting. -% -% \subsubsection{Definitions, and Definienda}\label{sec:definition} -% -% \DescribeEnv{definition} The |definition| environment is used for marking up -% mathematical definitions. Its peculiarity is that it defines (i.e. gives a meaning to) -% new mathematical concepts or objects. These\DescribeMacro{\definiendum} are identified -% by the |\definiendum| macro, which is used as -% |\definiendum[|\meta{keys}|]{|\meta{text}|}|. Here, \meta{text} is the text that is to -% be emphasized in the presentation. |\definiendum| takes the key -% \DescribeMacro{name}|name| for the optional system name of the symbol defined (for -% reference via |\termref|, see Section~\ref{sec:user:crossref}). If the |name| key is not -% given, then \meta{text} is used as a system name instead, which is usually sufficient -% for most situations. The set of keys is extensible to add additional metadata for the -% definiendum. Currently only the \DescribeMacro{lemma}|lemma| key is supported, which -% allows to specify the base form of the name of the concept involved -- e.g. for -% referencing in a glossary or index. -% -%\begin{exfig} -% \def\succ#1{s(#1)} -% \begin{verbatim} -% \symdef{one}{1} -% \begin{definition}[id=one.def,for=one] -% $\notatiendum[one]{\one}$ is the successor of $\zero$ -% (formally: $\one :=\succ\zero$) -% \end{definition} -% \end{verbatim} -% \vspace{-1em}will lead to the result\medskip\par\noindent\vspace*{-1em} -% \begin{module}[id=onedef] -% \importmodule{peano} -% \symdef{one}{1} -% \begin{definition}[id=one.def,for=one] -% $\notatiendum[one]{\one}$ is the successor of $\zero$ -% (formally: $\one :=\succ\zero$) -% \end{definition} -% \end{module} -% \caption{A Definition based on Figure {\ref{fig:axioms}}}\label{fig:definition} -% \end{exfig} -% The \DescribeMacro{defi}|\defi{|\meta{word}|}| macro combines the functionality of the -% |\definiendum| macro with index markup from the |omdoc| -% package~\ctancite{Kohlhase:smomdl}: For definienda where the lemma and \meta{text} -% coincide use -% \begin{center} -% |\defi[|\meta{name}|]{|\meta{lemma}|}[|\meta{indexkeys}|]| -% \end{center} -% to markup a definiendum \meta{lemma} with system name \meta{name} that appear in the -% index (where \meta{indexkeys} are passed to the |\omdoc@index*| macros from the |omtext| -% package) --- in other words in almost all definitions of single-word concepts. We also -% have the variants \DescribeMacro{\defii}|\defii|, \DescribeMacro{\defiii}|\defiii|, and -% \DescribeMacro{\defiv}|\defiv| for (adjectivized) multi-word compounds. Note that if -% the definiendum contains semantic macros, then we need to specify the |loadmodules| key -% and also protect the semantic macro. For instance if |\eset| is the semantic macro for -% $\emptyset$, then we would use -% \begin{verbatim} -% \defii[eset-comp]{$\protect\eset$}{compatible}[loadmodules] -% \end{verbatim} -% for the definiendum markup. -% -% \begin{exfig} -% \begin{verbatim} -% A \defi{graph} consists of \adefi{vertices}{vertex} and \defis{edge}. -% \end{verbatim} -% \caption{Definienda where Lemma and Text Form differ}\label{fig:lemma} -% \end{exfig} -% -% For the cases where the lemma and \meta{text} are different we can use the variants -% \DescribeMacro{\adefi}|\adefi|, \DescribeMacro{\adefii}|\adefii|, -% \DescribeMacro{\adefiii}|\adefiii|, and \DescribeMacro{\adefiv}|\adefiv| that have -% an additional first argument that allows to specify an alternative \meta{text}; see -% Figure~\ref{fig:defin}. The main use of these is to mark up inflected forms as in -% Figure~\ref{fig:lemma}. -% -% As the greatest number of these are plurals, which tends to be regular (e.g. adding a -% trailing ``s'' in English), we provide the variants \DescribeMacro{\defis}|\defis|, -% \DescribeMacro{\defiis}|\defiis|, \DescribeMacro{\defiiis}|\defiiis|, and -% \DescribeMacro{\defivs}|\defivs| for that case: |\defiis{simple}{group}| is -% equivalent to much longer |\adefii{simple groups}{simple}{group}| (but also see -% Figure~\ref{fig:lemma}). -% -% \begin{exfig} -% \begin{tabular}{l|l|l} -% \multicolumn{3}{l}{source}\\\hline -% system name & result & index \\\hline\hline -% \multicolumn{3}{l}{\texttt{\textbackslash defi\{concept\}}}\\\hline -% |concept| & concept& concept\\\hline\hline -% \multicolumn{3}{l}{\texttt{\textbackslash defi[csymbol]\{concept\}}}\\\hline -% |csymbol| & concept & concept\\\hline\hline -% \multicolumn{3}{l}{\texttt{\textbackslash adefi[csymbol]\{concepts\}\{concept\}}}\\\hline -% |csymbol| & concepts & concept\\\hline\hline -% \multicolumn{3}{l}{\texttt{\textbackslash defii\{concept\}\{group\}}}\\\hline -% |concept-group| & concept group & concept group, \\ -% && group - , concept\\\hline\hline -% \multicolumn{3}{l}{\texttt{\textbackslash adefii\{small\}\{concept\}\{group\}}}\\\hline -% |small-concept-group| & small concept group & small concept group, \\ -% && concept group - , small\\\hline -% \end{tabular} -% \caption{Some definienda with Index}\label{fig:defin} -% \end{exfig} -% -% Note that the |\definiendum|, |\defi*|, |\adefi*|, and |\defi*s|, macros can only be -% used inside the definitional situation, i.e. in a |definition| or |symboldec| -% environment or a |\inlinedef| macro. If you find yourself in a situation where you want -% to use it outside, you will most likely want to wrap the appropriate text fragment in a -% |\begin{definition}[display=flow]| ... and |\end{definition}|. For instance, we could -% continue the example in Figure~\ref{fig:axioms} with the |definition| environment in -% Figure~\ref{fig:definition}. -% -% \DescribeMacro{\inlinedef} Sometimes we define mathematical concepts in passing, e.g. in -% a phrase like ``\ldots $s(o)$ which we call {\textbf{one}}.''. For this we cannot use -% the |definition| environment, which presupposes that its content gives all that is -% needed to understand the definition. But we do want to make use of the infrastructure -% introduced for the |definition| environment. In this situation, we just wrap the phrase -% in an |\inlinedef| macro that makes them available. The |\inlinedef| macro accepts the -% same |id| and |for| keys in its optional argument, and additionally the |verbalizes| key -% which can be used to point to a full definition of the concept somewhere else. -% -% Note that definienda can only be referenced via a |\term| element, if they are only -% allowed inside a named module, i.e. a |module| environment with a name given by the -% |id=| key or the |theory=| key on is specified on the definitional environment. -% -% \subsubsection{Examples}\label{sec:user:example} -% -% \DescribeEnv{example} The |example| environment is a generic statement environment, -% except that the |for| key should be given to specify the identifier what this is an -% example for. The |example| environment also expects a |type| key to be specified, so -% that we know whether this is an example or a counterexample. -% -% \DescribeMacro{\inlineex} The |\inlineex| is analogous to |\inlinedef|, only that it is -% used for inline examples, e.g. ``\ldots mammals, e.g. goats''. Note that we have used an -% inline example for an inline example. -% -% -% \subsection{Cross-Referencing Symbols and Concepts}\label{sec:user:crossref} -% -% If we have defined a concept with the |\definiendum| macro, then we can mark up other -% occurrences of the term as referring to this concept. Note that this process cannot be -% fully automatized yet, since that would need advanced language technology to get around -% problems of disambiguation, inflection, and non-contiguous phrases\footnote{We do have a -% program that helps annotate larger text collections spotting the easy cases; see -% {\url{http://kwarc.info/projects/stex}} and look for the program -% |termin|.}. Therefore, the \DescribeMacro{\termref}|\termref| can be used to make this -% information explicit. It takes the keys -% \begin{compactdesc} -% \item[\texttt{cdbase}] to specify a URI (a path actually, since {\LaTeX} cannot load -% from URIs) where the module can be found. -% \item[\texttt{cd}] to specify the module in which the term is defined. If the |cd| key -% is not given, then the current module is assumed. If no |cdbase| is specified (this is -% the usual case), then the CD has to be imported via a |\importmodule| from the -% |modules| package~\ctancite{KohAmb:smmssl}. -% \item[\texttt{name}] to specify the name of the definiendum (which is given in the body -% of the |\definiendum| or the optional argument). If the |name| key is not specified, -% then argument of the |\termref| macro is used. -% \item[\texttt{role}] is currently unused. -% \end{compactdesc} -% |\termref[cd=|\meta{cd}|,name=|\meta{name}|]{|\meta{text}|}| will just typeset the link -% text \meta{text} with (if the |hyperref| package is loaded) a hyperlink to the -% definition in module \meta{cd} that defines the concept \meta{name}, e.g. that contains -% |\defi[|\meta{name}|]{|\meta{text}|}|. -% -% Just as the |\definiendum| macro has the convenience variants |\defi| and |\?defi*|, the -% |\termref| has variants |\trefi|, |\trefii|, |\trefiii|, and |\trefiv| that take two and -% three arguments for the parts of the compositum. In the same module, concepts that are -% marked up by |\defi{|\meta{name}|}| in the definition can be referenced by -% \DescribeMacro{\trefi}|\trefi{|\meta{name}|}|. Here the link text is just -% \meta{name}. Concepts defined via |\defii{|\meta{first}|}{|\meta{second}|}| can be -% referenced by \DescribeMacro{\trefii}|\trefii{|\meta{first}|}{|\meta{second}|}| (with -% link text ``\meta{first} \meta{second}'') and analogously for -% |\defiii|/\DescribeMacro{\trefiii}|\trefiii| and % |\defiv|/\DescribeMacro{\trefiv}|\trefiv|. -% -% We have variants \DescribeMacro{\atref*}|\atrefi|, |\atrefii|, |\atrefiii|, and -% |\atrefiv| with alternative link text. For instance -% |\atrefii{|\meta{text}|{|\meta{first}|}{|\meta{second}|}| references a concept -% introduced by |\defii{|\meta{first}|}{|\meta{second}|}| but with link text \meta{text}. -% Of course, if the system identifier is given explicitly in the optional argument of the -% definition form, as in |\defii[|\meta{name}|]{|\meta{first}|}{|\meta{second}|}|, then -% the terms are referenced by |\trefi{|\meta{name}|}|. -% -% For referencing terms outside the current module, the module name can be specified in -% the first optional argument of the |\*tref*| macros. To specify the |cdbase|, we have to -% resort to the |\termref| macro with the keyval arguments. -% -% Note that the |\termref| treatment above is natural for ``concepts'' declared by the -% |\termdef| macro from the |modules| package~\ctancite{KohAmb:smmssl}. Concepts are -% natural language names for mathematical objects. For ``symbols'', i.e. symbolic -% identifiers for mathematical objects used in mathematical formulae, we use the |\symdef| -% macro from the |modules| package. Sometimes, symbols also have an associated natural -% language concept, and we want to use the symbol name to reference it (instead of -% specifying |cd| and |name| which is more inconvenient). For this the |statements| -% package supplies the \DescribeMacro{\symref}|\symref| macro. Like |\termref|, and -% invocation of |\symref{|\meta{cseq}|}{|\meta{text}|}| will just typeset \meta{text} with -% a hyperlink to the relevant definition (i.e. the one that has the declaration -% |for=|\meta{cseq} in the metadata argument.) -% -% The \DescribeMacro{\term}|\term| macro is a variant of the |\termref| macro that marks -% up a phrase as a (possible) term reference, which does not have a link \emph{yet}. This -% macro is a convenient placeholder for authoring, where a |\termref| annotation is -% (currently) too tedious or the link target has not been authored yet. It facilitates -% lazy flexiformalization workflows, where definitions for mathematical concepts are -% supplied or marked up by need (e.g. after a |grep| shows that the number of |\term| -% annotations of a concept is above a threshold). Editors or active documents can also -% support the |\term| macro like a wiki-like dangling link: a click on -% |\term{|\meta{phrase}|}| could generate a new editor buffer with a stub definition (an -% |definition| environment with |\definiendum| macro and appropriate metadata).\ednote{MK: -% we probably need multi-part variants for |?tref*|} -% -% \section{Configuration of the Presentation}\label{sec:conf} -% -% \DescribeMacro{\defemph} The |\defemph| macro is a configuration hook that allows to -% specify the style of presentation of the {\index*{definiendum}}. By default, it is set to -% |\bf| as a fallback, since we can be sure that this is always available. It can be -% customized by redefinition: For instance |\renewcommand{\defemph}[1]{\emph{#1}}|, -% changes the default behavior to italics. -% -% \DescribeMacro{\termemph} The |\termenph| macro does the same for the style for -% |\termref|, it is empty by default. Note the term might carry an implicit hyper-reference -% to the defining occurrence and that the presentation engine might mark this up, changing -% this behavior. -% -% \DescribeMacro{\stDMemph} The |\stDMemph| macro does the same for the style for the -% markup of the discourse markers like ``Theorem''. If it is not defined, it is set to -% |\bf|; that allows to preset this in the class file. \ednote{function declarations} -% -% Some authors like to lowercase the semantic references, i.e. use ``axiom 2.6'' instead -% of the default ``\sref{peano.P5}'' to refer to the last axiom in -% Figure~\ref{fig:axioms}. This can be achieved by redefining the -% \DescribeMacro{\STpresent}|\STpresent| macro, which is applied to the keyword of the -% |ST*Env| theorem environments.\ednote{this does not quite work as yet, since -% \textbf{STpresent} is applied when the label is written. But we would really like to -% have it applied when the reference is constructed. But for that we need to split the -% label into keyword and number in package |sref|.} -% -% Finally, we provide configuration hooks in Figure~\ref{fig:hooks} for the statement -% types provided by the |statement| package. These are mainly intended for package -% authors building on |statements|, e.g. for multi-language support. The language -% bindings are given in the |smultiling|~\cite{KohGin:smss:svn} package not in -% |statements| itself. -% -%\begin{exfig} -% \begin{tabular}{lll} -% Environment & configuration macro & value\\\hline\hline -% \texttt{STtheoremAssEnv} & \texttt{\textbackslash st@theorem@kw} & \makeatletter\st@theorem@kw\\\hline -% \texttt{STlemmaAssEnv} & \texttt{\textbackslash st@lemma@kw} & \makeatletter\st@lemma@kw \\\hline -% \texttt{STpropositionAssEnv} & \texttt{\textbackslash st@proposition@kw} & \makeatletter\st@proposition@kw \\\hline -% \texttt{STcorollaryAssEnv} & \texttt{\textbackslash st@corollary@kw} & \makeatletter\st@corollary@kw\\\hline -% \texttt{STconjectureAssEnv} & \texttt{\textbackslash st@conjecture@kw} & \makeatletter\st@conjecture@kw\\\hline -% \texttt{STfalseconjectureAssEnv} & \texttt{\textbackslash st@falseconjecture@kw} & \makeatletter\st@falseconjecture@kw\\\hline -% \texttt{STpostulateAssEnv} & \texttt{\textbackslash st@postulate@kw} & \makeatletter\st@postulate@kw\\\hline -% \texttt{STobligationAssEnv} & \texttt{\textbackslash st@obligation@kw} & \makeatletter\st@obligation@kw\\\hline -% \texttt{STassumptionAssEnv} & \texttt{\textbackslash st@assumption@kw} & \makeatletter\st@assumption@kw\\\hline -% \texttt{STobservationAssEnv} & \texttt{\textbackslash st@observation@kw} & \makeatletter\st@observation@kw\\\hline -% \texttt{STremarkAssEnv} & \texttt{\textbackslash st@remark@kw} & \makeatletter\st@remark@kw\\\hline -% \texttt{STruleAssEnv} & \texttt{\textbackslash st@rule@kw} & \makeatletter\st@rule@kw\\\hline -% \texttt{STexampleEnv} & \texttt{\textbackslash st@example@kw} & \makeatletter\st@example@kw\\\hline -% \texttt{STaxiomEnv} & \texttt{\textbackslash st@axiom@kw} & \makeatletter\st@axiom@kw\\\hline -% \texttt{STdefinitionEnv} & \texttt{\textbackslash st@definition@kw} & \makeatletter\st@definition@kw\\\hline -% \texttt{STnotationEnv} & \texttt{\textbackslash st@notation@kw} & \makeatletter\st@notation@kw -% \end{tabular} -% \caption{Configuration Hooks for statement types}\label{fig:hooks} -% \end{exfig} -% -% \section{Limitations}\label{sec:limitations} -% -% In this section we document known limitations. If you want to help alleviate them, -% please feel free to contact the package author. Some of them are currently discussed in -% the \sTeX GitHub repository~\cite{sTeX:github:on}. -% \begin{enumerate} -% \item none reported yet -% \end{enumerate} -% -% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography} -% -% \section{The Implementation}\label{sec:impl} -% -% \subsection{Package Options}\label{sec:impl:options} -% -% We declare some switches which will modify the behavior according to the package -% options. Generally, an option |xxx| will just set the appropriate switches to true -% (otherwise they stay false). First we have the general options: |msection| specifies -% that theorems should be numbered in the |msection| counter provided by the |mikoslides| -% package/class. -% \begin{macrocode} -%<*package> -\newif\ifdef@index\def@indexfalse -\DeclareOption{defindex}{\def@indextrue} -\newif\if@nthm\@nthmtrue -\DeclareOption{nontheorem}{\@nthmfalse} -\newif\if@msection\@msectionfalse -\DeclareOption{msection}{\@msectiontrue} -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{omtext}} -\ProcessOptions -% \end{macrocode} -% -% The next measure is to ensure that some {\sTeX} packages are loaded: |omdoc| for the -% statement keys, |modules| since we need module identifiers for referencing. Furthermore, -% we need the |ntheorem| package for presenting statements. -% \begin{macrocode} -\RequirePackage{omtext} -\RequirePackage[base]{babel} -\ifcsdef{proof}{\cslet{proof}{\relax}\cslet{endproof}{\relax}}{}% to redefine if necessary -\if@nthm -\RequirePackage[hyperref]{ntheorem} -\theoremstyle{plain} -\else -\RequirePackage{amsthm} -\fi -% \end{macrocode} -% Now, we define an auxiliary function that lowercases strings -% \begin{macrocode} -% \end{macrocode} -% Sometimes it is necessary to fallback to symbol names in order to generate xml:id -% attributes. For this purpose, we define an auxiliary function which ensures the name -% receives a unique NCName equivalent.\ednote{Hard to be unique here, e.g. the names -% "foo\_bar" and "foo bar" would receive the same xml:id attributes... of course we can -% devise a more complex scheme for the symbol replacement.} -% \begin{macrocode} -% \end{macrocode} -% The following functions are strictly utility functions that makes our life easier later on -% \begin{macrocode} -% \end{macrocode} -% -% For the other languages, we set up triggers -% \begin{macrocode} -\AfterBabelLanguage{ngerman}{\input{statements-ngerman.ldf}} -\AfterBabelLanguage{arabic}{\input{statements-arabic.ldf}} -% \end{macrocode} -% -% \subsection{Statements}\label{sec:impl:statements} -% -% \begin{macro}{\STpresent} -% \begin{macrocode} -\providecommand\STpresent[1]{#1} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\define@statement@env} -% We define a meta-macro that allows us to define several variants of statements. Upon -% beginning this environment, we first set the |KeyVal| attributes, then we decide -% whether to print the discourse marker based on the value of the |display| key, then -% (given the right Options were set), we show the semantic annotations, and finally -% initialize the environment using the appropriate macro. Upon ending the environment, -% we just run the respective termination macro. -% \begin{macrocode} -\def\define@statement@env#1{% -\ifcsdef{#1}{\cslet{#1}{\relax}\cslet{end#1}{\relax}}{}% to redefine if necessary -\newenvironment{#1}[1][]{\metasetkeys{omtext}{##1}\sref@target% -\@in@omtexttrue% -\ifx\omtext@display\st@flow\else% -\ifx\omtext@title\@empty\begin{ST#1Env}\else\begin{ST#1Env}[\omtext@title]\fi% -\ifx\sref@id\@empty\else\label{#1.\sref@id}\fi -\csname st@#1@initialize\endcsname\fi% display -\ifx\sref@id\@empty\sref@label@id{here}\else% -\sref@label@id{\STpresent{\csname st@#1@kw\endcsname}~\@currentlabel}\fi% -\strut\ignorespaces} -{\csname st@#1@terminate\endcsname\ifx\omtext@display\st@flow\else\end{ST#1Env}\fi% -\omtext@post@skip\@in@omtextfalse}} -% \end{macrocode} -% \end{macro} -% -% \begin{environment}{assertion} -% \begin{macrocode} -\newenvironment{assertion}[1][]{\metasetkeys{omtext}{#1}\sref@target% -\@in@omtexttrue% -\ifx\omtext@display\st@flow - \itshape\noindent\ignorespaces% -\else% display!=flow - \xdef\@@@type{\omtext@type}% to keep it safe from \inlinedef - \ifx\omtext@title\@empty\begin{ST\@@@type AssEnv}% - \else\begin{ST\@@@type AssEnv}[\omtext@title]% - \fi% -\fi %display=flow -\ifx\omtext@type\@empty\else% -\sref@label@id{\STpresent{\csname st@\@@@type @kw\endcsname}~\@currentlabel} -\fi} -{\ifx\omtext@display\st@flow\else\end{ST\@@@type AssEnv}\@in@omtextfalse\fi} -% \end{macrocode} -% \end{environment} -% -% \begin{macro}{\st@*@kw} -% We configure the default keywords for the various theorem environments. -% \begin{macrocode} -\def\st@theorem@kw{Theorem} -\def\st@lemma@kw{Lemma} -\def\st@proposition@kw{Proposition} -\def\st@corollary@kw{Corollary} -\def\st@conjecture@kw{Conjecture} -\def\st@falseconjecture@kw{Conjecture (false)} -\def\st@postulate@kw{Postulate} -\def\st@obligation@kw{Obligation} -\def\st@assumption@kw{Assumption} -\def\st@rule@kw{Rule} -\def\st@observation@kw{Observation} -\def\st@remark@kw{Remark} -% \end{macrocode} -% -% \end{macro} -% Then we configure the presentation of the theorem environments -% \begin{macrocode} -\if@nthm -\theorembodyfont{\itshape} -\theoremheaderfont{\normalfont\bfseries} -\else -\theoremstyle{plain} -\fi -% \end{macrocode} -% -% \begin{environment}{ST*AssEnv} -% We define a number of internal assertion environments according to the values of its -% |type| key. -% \begin{macrocode} -\if@msection -\newtheorem{STtheoremAssEnv}{\st@theorem@kw}[msection] -\else -\ifdef{\thesection} -{\newtheorem{STtheoremAssEnv}{\st@theorem@kw}[section]} -{\newtheorem{STtheoremAssEnv}{\st@theorem@kw}} -\fi -\newtheorem{STlemmaAssEnv}[STtheoremAssEnv]{\st@lemma@kw} -\newtheorem{STpropositionAssEnv}[STtheoremAssEnv]{\st@proposition@kw} -\newtheorem{STcorollaryAssEnv}[STtheoremAssEnv]{\st@corollary@kw} -\newtheorem{STconjectureAssEnv}[STtheoremAssEnv]{\st@conjecture@kw} -\newtheorem{STfalseconjectureAssEnv}[STtheoremAssEnv]{\st@falseconjecture@kw} -\newtheorem{STpostulateAssEnv}[STtheoremAssEnv]{\st@postulate@kw} -\newtheorem{STobligationAssEnv}[STtheoremAssEnv]{\st@obligation@kw} -\newtheorem{STassumptionAssEnv}[STtheoremAssEnv]{\st@assumption@kw} -\newtheorem{STobservationAssEnv}[STtheoremAssEnv]{\st@observation@kw} -\if@nthm\theorembodyfont{\rmfamily}\else\theoremstyle{definition}\fi -\newtheorem{STremarkAssEnv}[STtheoremAssEnv]{\st@remark@kw} -\newtheorem{STruleAssEnv}[STtheoremAssEnv]{\st@rule@kw} -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{example} -% \begin{macrocode} -\def\st@example@initialize{}\def\st@example@terminate{} -\define@statement@env{example} -\def\st@example@kw{Example} -\newtheorem{STexampleEnv}[STtheoremAssEnv]{\st@example@kw} -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{axiom} -% \begin{macrocode} -\def\st@axiom@initialize{}\def\st@axiom@terminate{} -\define@statement@env{axiom} -\def\st@axiom@kw{Axiom} -\newtheorem{STaxiomEnv}[STtheoremAssEnv]{\st@axiom@kw} -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{symboldec} -% We use |\symdef@type| from the |modules| package as the visual cue. -% \begin{macrocode} -\srefaddidkey{symboldec} -\addmetakey{symboldec}{functions} -\addmetakey{symboldec}{role} -\addmetakey*{symboldec}{title} -\addmetakey*{symboldec}{name} -\addmetakey{symboldec}{subject} -\addmetakey*{symboldec}{display} -\newenvironment{symboldec}[1][]{\metasetkeys{symboldec}{#1}\sref@target\st@indeftrue% -\ifx\symboldec@display\st@flow\else{\noindent\stDMemph{\symdef@type} \symboldec@name:}\fi% -\ifx\symboldec@title\@empty~\else~(\stDMemph{\symboldec@title})\par\fi}{} -% \end{macrocode} -% \end{environment} -% -% \subsubsection{Types}\label{sec:impl:types} -% -% \begin{macro}{\symtype}\ednote{MK@DG; the type element should percolate up.} -% \begin{macrocode} -\srefaddidkey{symtype} -\addmetakey*{symtype}{system} -\addmetakey*{symtype}{for} -\newcommand\type@type{Type} -\newcommand\symtype[3][]{\metasetkeys{symtype}{#1}\sref@target% -\noindent\type@type \ifx\symtype@\@empty\else (\symtype@system)\fi #2: $#3$} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\inlinetypedec} -% \begin{macrocode} -\newcommand\inlinetypedec[3][]{\metasetkeys{symtype}{#1}\sref@target{\def\thedectype{#2}#3}} -% \end{macrocode} -% \end{macro} -% -% \begin{environment}{typedec} -% We first define a theorem environment -% \begin{macrocode} -\def\st@typedec@kw{Type Declaration} -\newtheorem{STtypedecEnv}[STtheoremAssEnv]{\st@typedec@kw} -% \end{macrocode} -% and then the environment itself. -% \begin{macrocode} -\newenvironment{typedec}[2][]{\metasetkeys{omtext}{#1}\sref@target% -\def\thedectype{#2}% -\ifx\omtext@display\st@flow\else% -\ifx\omtext@title\@empty\begin{STtypedecEnv}\else\begin{STtypedecEnv}[\omtext@title]\fi% -\ifx\sref@id\@empty\else\label{typedec.\sref@id}\fi -\ifx\sref@id\@empty\sref@label@id{here}\else% -\sref@label@id{\STpresent{\csname st@typedec@kw\endcsname}~\@currentlabel}\fi% -\ignorespaces} -{\ifx\omtext@display\st@flow\else\end{STtypedecEnv}\fi\omtext@post@skip} -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{definition} -% The |definition| environment itself is quite similar to the other's but we need to set -% the |\st@indef| switch to suppress warnings from |\st@def@target|. -% \begin{macrocode} -\newif\ifst@indef\st@indeffalse -\ifcsdef{definition}{\cslet{definition}{\relax}\cslet{enddefinition}{\relax}}{}% to redefine if necessary -\newenvironment{definition}[1][]{\metasetkeys{omtext}{#1}\sref@target\st@indeftrue% -\ifx\omtext@display\st@flow\else% -\ifx\omtext@title\@empty\begin{STdefinitionEnv}\else\begin{STdefinitionEnv}[\omtext@title]\fi\fi% -\ifx\sref@id\@empty\sref@label@id{here}\else% -\sref@label@id{\STpresent{\csname st@definition@kw\endcsname}~\@currentlabel}\fi% -\ignorespaces} -{\ifx\omtext@display\st@flow\else\end{STdefinitionEnv}\fi} -\def\st@definition@kw{Definition} -\newtheorem{STdefinitionEnv}[STtheoremAssEnv]{\st@definition@kw} -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{notation} -% We initialize the |\def\st@notation@initialize{}| here, and extend it with -% functionality below. -% \begin{macrocode} -\def\notemph#1{#1} -\def\st@notation@terminate{} -\def\st@notation@initialize{} -\define@statement@env{notation} -\def\st@notation@kw{Notation} -\newtheorem{STnotationEnv}[STtheoremAssEnv]{\st@notation@kw} -% \end{macrocode} -% \end{environment} -% -% \begin{macro}{\st@def@target} -% the next macro is a variant of the |\sref@target| macro provided by the |sref| package -% specialized for the use in the |\definiendum|, |\defi*|, |\Defi*|, |\defi*s|, and |\Defi*s| -% macros. |\st@def@target{|\meta{opt}|}{|\meta{name}|}{|\meta{text}|}| makes a target -% with label |sref@|\meta{opt}|@|\meta{modulename}|@target|, if \meta{opt} is non-empty, -% else with the label |sref@|\meta{name}|@|\meta{modulename}|@target| (the first time it -% encounters this symbol; i.e. if |\sref@|\meta{name}|@|\meta{modulename}|@defined| is -% undefined). And it formats the |\defemph|-emphasized \meta{text}. Also it generates -% the necessary warnings for a definiendum-like macro. -% \begin{macrocode} -\newcommand\st@def@target[3]{\edef\@symname{#1}\def\@verbname{#2}% -\ifst@indef% if we are in a definition or such -\@ifundefined{mod@id}% if we are not in a module -{\PackageWarning{statements}{definiendum in unidentified module\MessageBreak -\protect\definiendum, \protect\defi*, -\protect\Defi*, \protect\defi*s, \protect\Defi*s\MessageBreak -can only be referenced when called in a module with id key}}% -{% now we are in a module -\edef\@@cd{\ifx\omtext@theory\@empty\mod@id\else\omtext@theory\fi}% -\edef\@@name{\ifx\@symname\@empty\@verbname\else\@symname\fi}% -\defemph{\@ifundefined{sref@\@@name @\@@cd @defined}% -{\expandafter\sref@target@ifh{sref@\@@name @\@@cd @target}{#3}}% -{#3}}% -%\footnote{sTeX: target sref@\@@name @\@@cd @target}% for testing targets -\expandafter\gdef\csname sref@\@@name @\@@cd @defined\endcsname{yes}% -\ifmetakeys@showmeta\metakeys@show@keys{\@@cd}{name:\@@name}\fi}% -\else% st@indef: we are not in a definition or such -\PackageError{statements}% -{definiendum outside definition context\MessageBreak -\protect\definiendum, \protect\defi, -\protect\Defi, \protect\defi*s, \protect\Defi*s\MessageBreak -do not make sense semantically outside a definition.} -{Consider wrapping the defining phrase in a \protect\inlinedef}% -\fi}% st@indef -% \end{macrocode} -% \end{macro} -% -% The |\definiendum| and |\notatiendum| macros are very simple. -% -% \begin{macro}{\@termdef} -% This macro is experimental, it is supposed to be invoked in |\definiendum| to define a -% macro with the definiendum text, so that can be re-used later in term assignments (see -% the |modules| package). But in the current context, where we rely on {\TeX} groupings -% for visibility, this does not work, since the invocations of |\definiendum| are in -% |definition| environments and thus one group level too low. Keeping this for future -% reference. -% \begin{macrocode} -\newcommand\@termdef[2][]{\def\@test{#1}% -\@ifundefined{mod@id}{}{\ifx\@test\@empty\def\@@name{#2}\else\def\@@name{#1}\fi% -\termdef{\mod@id @\@@name}{#2}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\definiendum} -% \begin{macrocode} -\addmetakey{definiendum}{name} -\addmetakey{definiendum}{lemma} -\newcommand\definiendum[2][]{\setkeys{definiendum}{#1}% -\st@def@target{\definiendum@name}{\definiendum@name}{#2}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\notatiendum} -% the |notatiendum| macro also needs to be visible in the |notation| and |definition| -% environments -% \begin{macrocode} -\newcommand\notatiendum[2][]{\notemph{#2}} -% \end{macrocode} -% \end{macro} -% -% We expand the {\latexml} bindings for |\defi|, |\defii|, |\defiii| and |\defiv| into two -% instances one will be used for the definition and the other for indexing. -% -% \begin{macro}{\defi} -% We split the |\defi| macro in two: |\defi| does the definiendum bit and |\@defi| -% handles the last optional argument and does the indexing. The information flow between -% them goes via the local |\@phrase| macro. -% \begin{macrocode} -\newcommand\@defi[1][]{\ifdef@index\omdoc@indexi[#1]{\@phrase}\fi\xspace} -\newcommand\defi[2][]{\metasetkeys{definiendum}{#1}% -\st@def@target{\definiendum@name}{#2}{#2}\def\@phrase{#2}\@defi} -\newcommand\defis[2][]{\metasetkeys{definiendum}{#1}% -\st@def@target{\definiendum@name}{#2}{#2s}\def\@phrase{#2}\@defi} -\newcommand\Defi[2][]{\metasetkeys{definiendum}{#1}% -\st@def@target{\definiendum@name}{#2}{\capitalize{#2}}\def\@phrase{#2}\@defi} -\newcommand\Defis[2][]{\metasetkeys{definiendum}{#1}% -\st@def@target{\definiendum@name}{#2}{\capitalize{#2s}}\def\@phrase{#2}\@defi} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\adefi} -% Again we split the |\adefi| macro into two parts: |\adef| does the definiendum bit and -% |\@adefi| handles the last optional argument and does the indexing. -% \begin{macrocode} -\newcommand\adefi[3][]{\metasetkeys{definiendum}{#1}\def\@verb{#3}% -\st@def@target{\definiendum@name}{#3}{#2}\@adefi} -\newcommand\@adefi[1][]{% -\ifdef@index% -\ifx\definiendum@name\@empty\omdoc@indexi[#1]{\@verb}% -\else\omdoc@indexi[at=\definiendum@name,#1]{\@verb}\fi% -\fi\xspace} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\defii} -% \begin{macrocode} -\newcommand\@defii[1][]{\ifdef@index\omdoc@indexii[#1]{\@pone}{\@ptwo}\fi\xspace} -\newcommand\defii[3][]{\metasetkeys{definiendum}{#1}% -\def\@pone{#2}\def\@ptwo{#3}% -\st@def@target{\definiendum@name}{#2-#3}{#2 #3}\@defii} -\newcommand\defiis[3][]{\metasetkeys{definiendum}{#1}% -\def\@pone{#2}\def\@ptwo{#3}% -\st@def@target{\definiendum@name}{#2-#3}{#2 #3s}\@defii} -\newcommand\Defii[3][]{\metasetkeys{definiendum}{#1}% -\def\@pone{#2}\def\@ptwo{#3}% -\st@def@target{\definiendum@name}{#2-#3}{\capitalize{#2 #3}}\@defii} -\newcommand\Defiis[3][]{\metasetkeys{definiendum}{#1}% -\def\@pone{#2}\def\@ptwo{#3}% -\st@def@target{\definiendum@name}{#2-#3}{\capitalize{#2 #3s}}\@defii} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\adefii} -% analogous to |\adefi| -% \begin{macrocode} -\newcommand\adefii[4][]{\metasetkeys{definiendum}{#1}\def\@pone{#3}\def\@ptwo{#4}% -\st@def@target{\definiendum@name}{#3-#4}{#2}\@adefii} -\newcommand\@adefii[1][]{% -\ifdef@index% -\ifx\definiendum@name\@empty\omdoc@indexii[#1]{\@pone}{\@ptwo}% -\else\omdoc@indexii[at=\definiendum@name,#1]{\@pone}{\@ptwo}\fi% -\fi\xspace} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\defiii} -% similar to |\defii| -% \begin{macrocode} -\newcommand\@defiii[1][]{\ifdef@index\omdoc@indexiii[#1]{\@pone}{\@ptwo}{\@pthree}\fi\xspace} -\newcommand\defiii[4][]{\metasetkeys{definiendum}{#1}% -\def\@pone{#2}\def\@ptwo{#3}\def\@pthree{#4}% -\st@def@target{\definiendum@name}{#2-#3-#4}{#2 #3 #4}\@defiii} -\newcommand\defiiis[4][]{\metasetkeys{definiendum}{#1}% -\def\@pone{#2}\def\@ptwo{#3}\def\@pthree{#4}% -\st@def@target{\definiendum@name}{#2-#3-#4}{#2 #3 #4s}\@defiii} -\newcommand\Defiii[4][]{\metasetkeys{definiendum}{#1}% -\def\@pone{#2}\def\@ptwo{#3}\def\@pthree{#4}% -\st@def@target{\definiendum@name}{#2-#3-#4}{\capitalize{#2 #3 #4}}\@defiii} -\newcommand\Defiiis[4][]{\metasetkeys{definiendum}{#1}% -\def\@pone{#2}\def\@ptwo{#3}\def\@pthree{#4}% -\st@def@target{\definiendum@name}{#2-#3-#4}{\capitalize{#2 #3 #4s}}\@defiii} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\adefiii} -% \begin{macrocode} -\newcommand\adefiii[5][]{\metasetkeys{definiendum}{#1}\def\@pone{#3}\def\@ptwo{#4}\def\@pthree{#5}% -\st@def@target{\definiendum@name}{#3-#4-#5}{#2}\@adefiii} -\newcommand\@adefiii[1][]{% -\ifdef@index% -\ifx\definiendum@name\@empty\omdoc@indexiii[#1]{\@pone}{\@ptwo}{\@pthree}% -\else\omdoc@indexiii[at=\definiendum@name,#1]{\@pone}{\@ptwo}{\@pthree}\fi% -\fi\xspace} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\defiv} -% similar to |\defiii| -% \begin{macrocode} -\newcommand\@defiv[1][]{\ifdef@index\omdoc@indexiv[#1]{\@pone}{\@ptwo}{\@pthree}{\@ptfour}\fi\xspace} -\newcommand\defiv[5][]{\metasetkeys{definiendum}{#1}% -\def\@pone{#2}\def\@ptwo{#3}\def\@pthree{#4}\def\@ptfour{#5}% -\st@def@target{\definiendum@name}{#2-#3-#4-#5}{#2 #3 #4 #5}\@defiv} -\newcommand\defivs[5][]{\metasetkeys{definiendum}{#1}% -\def\@pone{#2}\def\@ptwo{#3}\def\@pthree{#4}\def\@ptfour{#5}% -\st@def@target{\definiendum@name}{#2-#3-#4-#5}{#2 #3 #4 #5s}\@defiv} -\newcommand\Defiv[5][]{\metasetkeys{definiendum}{#1}% -\def\@pone{#2}\def\@ptwo{#3}\def\@pthree{#4}\def\@ptfour{#5}% -\st@def@target{\definiendum@name}{#2-#3-#4-#5}{\capitalize{#2 #3 #4 #5}}\@defiv} -\newcommand\Defivs[5][]{\metasetkeys{definiendum}{#1}% -\def\@pone{#2}\def\@ptwo{#3}\def\@pthree{#4}\def\@ptfour{#5}% -\st@def@target{\definiendum@name}{#2-#3-#4-#5}{\capitalize{#2 #3 #4 #5s}}\@defiv} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\adefiv} -% \begin{macrocode} -\newcommand\adefiv[6][]{\metasetkeys{definiendum}{#1}% -\def\@pone{#3}\def\@ptwo{#4}\def\@pthree{#5}\def\@ptfour{#6}% -\st@def@target{\definiendum@name}{#3-#4-#5-#6}{#2}\@adefiv} -\newcommand\@adefiv[1][]{% -\ifdef@index% -\ifx\definiendum@name\@empty\@indiv[#1]{\@pone}{\@ptwo}{\@pthree}{\@ptfour}% -\else\@indiv[at=\definiendum@name,#1]{\@pone}{\@ptwo}{\@pthree}{\@ptfour}\fi% -\fi\xspace} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\inlineex} -% \begin{macrocode} -\newcommand\inlineex[2][]{\metasetkeys{omtext}{#1}% -\sref@target\sref@label@id{here}#2} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\inlineass} -% \begin{macrocode} -\newcommand\inlineass[2][]{\metasetkeys{omtext}{#1}% -\sref@target\sref@label@id{here}#2} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\inlinedef} -% \begin{macrocode} -\newcommand\inlinedef[2][]{\metasetkeys{omtext}{#1}% -\if@in@omtext\else% we are not in an omtext or statement -\PackageError{modules}{\protect\inlinedef\space outside a statement!}% -{Try wrapping the paragraph in a\MessageBreak -\protect\begin{omtext}, \protect\begin{assertion}, \protect\begin{axiom}, ... \MessageBreak -whatever is suitable semantically}\fi% -\sref@target\sref@label@id{here}\st@indeftrue #2} -% \end{macrocode} -% \end{macro} -% -% \subsection{Cross-Referencing Symbols and Concepts}\label{sec:impl:crossref} -% -% \begin{macro}{\termref} -% |\termref{|\meta{opt}|}{|\meta{text}|}| makes a hyperlink with link text \meta{text} -% to the definitional occurrence of the symbol specified by the |name|, |cd|, and -% |cdbase| keys in \meta{opt}. We first set sensible defaults if the keys are not -% given. If the symbol is defined in the current document (i.e. if the macro -% |\sref@|\meta{name}|@|\meta{cd}|@defined| is defined), then we make a local hyperref, -% otherwise we punt to |\mod@termref|. -% \begin{macrocode} -\addmetakey*{termref}{cd} -\addmetakey*{termref}{cdbase} -\addmetakey*{termref}{name} -\addmetakey*{termref}{role} -\newcommand\termref[2][]{\metasetkeys{termref}{#1}% -\ifx\termref@cd\@empty\def\termref@cd{\mod@id}\fi% -\ifx\termref@name\@empty\def\termref@name{#2}\fi% -\@ifundefined{sref@\termref@name @\termref@cd @defined}% -{\ifx\termref@cdbase\@empty% external reference -\mod@termref\termref@cd\termref@name{#2}% -\else\sref@href@ifh\termref@cdbase{#2}% -\fi}% -{\def\@label{sref@\termref@name @\termref@cd @target}% -\sref@hlink@ifh\@label{#2}%\footnote{termref: internal reference to \@label} -}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\tref*} -% \begin{macrocode} -\newcommand\atrefi[3][]{\def\@test{#1}% -\ifx\@test\@empty\termref[name=#3]{#2}\else\termref[cd=#1,name=#3]{#2}\fi} -\newcommand\atrefii[4][]{\atrefi[#1]{#2}{#3-#4}} -\newcommand\atrefiii[5][]{\atrefi[#1]{#2}{#3-#4-#5}} -\newcommand\atrefiv[6][]{\atrefi[#1]{#2}{#3-#4-#5-#6}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\tref*} -% \begin{macrocode} -\newcommand\trefi[2][]{\atrefi[#1]{#2}{#2}} -\newcommand\trefii[3][]{\atrefi[#1]{#2 #3}{#2-#3}} -\newcommand\trefiii[4][]{\atrefi[#1]{#2 #3 #4}{#2-#3-#4}} -\newcommand\trefiv[5][]{\atrefi[#1]{#2 #3 #4 #5}{#2-#3-#4-#5}} -\newcommand\trefis[2][]{\atrefi[#1]{#2s}{#2}} -\newcommand\trefiis[3][]{\atrefi[#1]{#2 #3s}{#2-#3}} -\newcommand\trefiiis[4][]{\atrefi[#1]{#2 #3 #4s}{#2-#3-#4}} -\newcommand\trefivs[5][]{\atrefi[#1]{#2 #3 #4 #5s}{#2-#3-#4-#5}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\Tref*} -% \begin{macrocode} -\newcommand\Trefi[2][]{\atrefi[#1]{\capitalize{#2}}{#2}} -\newcommand\Trefii[3][]{\atrefi[#1]{\capitalize{#2 #3}}{#2-#3}} -\newcommand\Trefiii[4][]{\atrefi[#1]{\capitalize{#2 #3 #4}}{#2-#3-#4}} -\newcommand\Trefiv[5][]{\atrefi[#1]{\capitalize{#2 #3 #4 #5}}{#2-#3-#4-#5}} -\newcommand\Trefis[2][]{\atrefi[#1]{\capitalize{#2s}}{#2}} -\newcommand\Trefiis[3][]{\atrefi[#1]{\capitalize{#2 #3s}}{#2-#3}} -\newcommand\Trefiiis[4][]{\atrefi[#1]{\capitalize{#2 #3 #4s}}{#2-#3-#4}} -\newcommand\Trefivs[5][]{\atrefi[#1]{\capitalize{#2 #3 #4 #5s}}{#2-#3-#4-#5}} -% \end{macrocode} -% \end{macro} -% -% Now we care about the configuration switches, they are set to sensible values, if they -% are not defined already. These are just configuration parameters, which should not -% appear in documents, therefore we do not provide {\latexml} bindings for them. -% \begin{macro}{\*emph} -% \begin{macrocode} -\providecommand{\termemph}[1]{#1} -\providecommand{\defemph}[1]{{\textbf{#1}}} -\providecommand{\stDMemph}[1]{{\textbf{#1}}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\term} -% The |\term| macro is used for wiki-style dangling links with editor support.\ednote{MK: document above} -% \begin{macrocode} -\newcommand\term[2][]{\def\@test{#1}% -\ifx\@test\@empty\else -\@ifundefined{module@defs@#1}{\PackageWarning{statements}% -{{\protect\term} specifies module #1 which is not in - scope\MessageBreak import it via e.g. via \protect\importmhmodule}}{} -\fi% -\PackageWarning{statements}% -{Dangling link (\protect\term) for "#2" still needs to be specified}% -\textcolor{blue}{\underline{#2}}} -% \end{macrocode} -% \end{macro} -% \begin{macro}{\symref} -% The |\symref| macros is quite simple, since we have done all the heavy lifting in the -% |modules| package: we simply apply |\mod@symref@|\meta{arg1} to -% \meta{arg2}. -% \begin{macrocode} -\newcommand\symref[2]{\@nameuse{mod@symref@#1}{#2}} -% \end{macrocode} -% \end{macro} -% -% \subsection{Deprecated Functionality}\label{sec:deprecated} -% -% In this section we centralize old interfaces that are only partially supported any -% more. -% \begin{macro}{\*def*} -% \begin{macrocode} -\newcommand\defin[2][]{\defi[#1]{#2}% -\PackageWarning{statements}{\protect\defin\space is deprecated, use \protect\defi\space instead}} -\newcommand\twindef[3][]{\defii[#1]{#2}{#3}% -\PackageWarning{statements}{\protect\twindef\space is deprecated, use \protect\defii\space instead}} -\newcommand\atwindef[4][]{\defiii[#1]{#2}{#3}{#4}% -\PackageWarning{statements}{\protect\atwindef\space is deprecated, use \protect\defiii\space instead}} -\newcommand\definalt[3][]{\adefi[#1]{#2}{#3}% -\PackageWarning{statements}{\protect\definalt\space is deprecated, use \protect\adefi\space instead}} -\newcommand\twindefalt[4][]{\adefii[#1]{#2}{#3}{#4}% -\PackageWarning{statements}{\protect\twindefalt\space is deprecated, use \protect\adefii\space instead}} -\newcommand\atwindefalt[5][]{\adefiii[#1]{#2}{#3}{#4}{#5}% -\PackageWarning{statements}{\protect\atwindefalt\space is deprecated, use \protect\adefiii\space instead}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\*def*} -% \begin{macrocode} -\newcommand\twinref[3][]{\trefii[#1]{#2}{#3}% -\PackageWarning{statements}{\protect\twinref\space is deprecated, use \protect\trefii\space instead}} -\newcommand\atwinref[4][]{\atrefiii[#1]{#2}{#3}{#4}% -\PackageWarning{statements}{\protect\atwindef\space is deprecated, use \protect\trefiii\space instead}} -%</package> -% \end{macrocode} -% \end{macro} -% \Finale -% -\endinput -% \iffalse -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: -% \fi -% LocalWords: GPL structuresharing STR dtx keyval env envfalse idfalse idtrue typedec st -% LocalWords: displayfalse envtrue displaytrue forfalse typefalse titlefalse filedate eg -% LocalWords: continuesfalse fortrue fromtrue typetrue titletrue CPERL omdoc thedectype -% LocalWords: continuestrue symboldec omtext RequirePackage lowcase lc ToString termin -% LocalWords: foreach hyperref href hlink DefStatement OptionalKeyVals ne NeedsTeXFormat -% LocalWords: KeyVal xml CMP simpleDef PatternDef DefStatement PatternRule thedectype -% LocalWords: requation PatternCMP RecDef DefConstructor keyvals defs psymbols tref eset -% LocalWords: openElement symb closeElement ffor getValue attrs metadata undef rangle -% LocalWords: afterDigestBegin setProperty AssignValue afterDigest definiendum rangle -% LocalWords: cd addr LookupValue getArg toString idx idt definiendum ide idp st@flow -% LocalWords: DefMacro args unlist inlinedef uri pdf afterOpen numberIt texttt XMath -% LocalWords: iffalse consymb ntheorem textbackslash symref def scsys sc sc kw endinput -% LocalWords: mathml openmath latexml activemath fileversion maketitle stex importmodule -% LocalWords: setcounter tocdepth tableofcontents newpage sproofs ulsmf08 sref usevocab -% LocalWords: MaySch eltte09 twintoo sref subsubsection exfig vspace vspace usemhvocab -% LocalWords: noindent renewtheorem hline textbf textbf footnotesize ple peano inlineass -% LocalWords: STaxiomEnv symdef medskip succ mathbb ldots stepcounter ednote usemhmodule -% LocalWords: STtheoremAssEnv stepcounter STtheoremAssEnv stepcounter defin STtypedecEnv -% LocalWords: STtheoremAssEnv notatiendum defin smomdl biblatex twindef cdbase defis -% LocalWords: twindef atwindef atwindef adjectivized varaiants twindefalt cseq defindex -% LocalWords: twindefalt atwindefalt atwindefalt csymbol definalt termref emph emptyset -% LocalWords: termref compactdesc KohAmb smmssl twinref atwinref newpart impl customized -% LocalWords: termdef defemph defemph renewcommand termemph termenph stDMemph formalized -% LocalWords: stDMemph STpresent STpresent makeatletter STlemmaAssEnv textsf emphasized -% LocalWords: STpropositionAssEnv STcorollaryAssEnv STconjectureAssEnv langle defiis -% LocalWords: STfalseconjectureAssEnv STpostulateAssEnv STobligationAssEnv foo defiis -% LocalWords: STassumptionAssEnv STobservationAssEnv STexampleEnv textsf ltxml defiiis -% LocalWords: STdefinitionEnv STnotationEnv printbibliography langle ncname localization -% LocalWords: theoremstyle sym newenvironment ifx csname endcsname inlineex loadmodules -% LocalWords: currentlabel theorembodyfont itshape theoremheaderfont bfseries defiiis -% LocalWords: normalfont newtheorem upshape srefaddidkey definendum customization gdef -% LocalWords: newcommand indef newif ifst indeffalse indeftrue attr whatsit automatized -% LocalWords: STdefinitionEnvKeyword notemph modulename ifundefined atwin defi behavior -% LocalWords: expandafter providecommand nameuse doctex ctancite funval defii initialize -% LocalWords: funsymbs findnodes symbolnode defsref showmeta showmeta sysname ngerman -% LocalWords: defii defiii defiii adefi adefi adefii adefii adefiii adefiii STruleAssEnv -% LocalWords: trefi trefii trefiii atref atrefi atrefii atrefiii conf metakeys setkeys -% LocalWords: compactenum Deref metasetkeys addmetakey symtype ltx ltx sts specialized -% LocalWords: ifmetakeys fntype rightarrow inlinetypedec inlinetypedec STremarkAssEnv -% LocalWords: ignorespaces usemodule textcolor STtypedecEnvKeyword flexiformalization -% LocalWords: statements-ngerman.ldf omdoc@indexi xspace trefis trefiis trefiiis -% LocalWords: importmhmodule - -% \endinput -% Local Variables: -% mode: doctex -% TeX-master: t -% End: diff --git a/macros/latex/contrib/stex/sty/statements/statements.ins b/macros/latex/contrib/stex/sty/statements/statements.ins deleted file mode 100644 index feb580fc54..0000000000 --- a/macros/latex/contrib/stex/sty/statements/statements.ins +++ /dev/null @@ -1,30 +0,0 @@ -%% -%% This file generates files required to use the ed package. -%% At your command prompt write -%% -%% latex statements.ins -%% -%% Copyright(c) 2005 Michael Kohlhase -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{statements.sty}{\from{statements.dtx}{package}}} - -\Msg{*} -\Msg{* You probably need to move the generated style files into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/statements/statements.pdf b/macros/latex/contrib/stex/sty/statements/statements.pdf Binary files differdeleted file mode 100644 index bdc3fb9851..0000000000 --- a/macros/latex/contrib/stex/sty/statements/statements.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/stex/README b/macros/latex/contrib/stex/sty/stex/README deleted file mode 100644 index d07ccbb7c6..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/stex/stex.dtx b/macros/latex/contrib/stex/sty/stex/stex.dtx deleted file mode 100644 index bec4f38373..0000000000 --- a/macros/latex/contrib/stex/sty/stex/stex.dtx +++ /dev/null @@ -1,701 +0,0 @@ -% \iffalse meta-comment -% The sTeX packages all at once -% Copyright (c) 2016 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<package|logo>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<package>\ProvidesPackage{stex}[2019/03/20 v1.0 Semantic Markup] -%<logo>\ProvidesPackage{stex-logo}[2019/03/20 v1.0 sTeX Logo] -% -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage{url,float,xspace,tikz} -\usepackage[show]{ed} -\usepackage[hyperref=auto,style=alphabetic,backend=bibtex]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{stex-logo} -\usepackage{ctangit} -\usepackage{hyperref} -\makeindex -\def\latexml{\hbox{{\LaTeX}ML}\xspace} -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\def\xml{XML\xspace} -\def\xslt{XSLT\xspace} -\def\mathml{MathML\xspace} -\def\omdoc{OMDoc\xspace} -\def\smglom{SMGloM\xspace} -\begin{document}\DocInput{stex.dtx}\end{document} -%</driver> -% \fi -% -% \CheckSum{36} -% -% \changes{v1.0}{2015/11/19}{self-documenting package} -% \changes{v1.0}{2015/12/17}{Package dependency figure} -% \changes{v1.0}{2016/04/06}{documenting all \protect\sTeX packages} -% -% \MakeShortVerb{\|} -% -% \title{Semantic Markup in {\TeX/\LaTeX}} -% \author{Michael Kohlhase\\ -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}} -% \maketitle -% -% \begin{abstract} -% We present a collection of {\TeX} macro packages that allow to markup {\TeX/\LaTeX} -% documents semantically without leaving the document format, essentially turning -% {\TeX/\LaTeX} into a document format for mathematical knowledge management (MKM). -% \end{abstract} -% \setcounter{tocdepth}{2}\tableofcontents\newpage -% -% \section{Introduction} -% -% The last few years have seen the emergence of various content-oriented {\xml}-based, -% content-oriented markup languages for mathematics on the web, e.g. -% OpenMath~\cite{BusCapCar:2oms04}, content MathML~\cite{CarIon:MathML03}, or our own -% {\omdoc}~\cite{Kohlhase:OMDoc1.2}. These representation languages for mathematics, that -% make the structure of the mathematical knowledge in a document explicit enough that -% machines can operate on it. Other examples of content-oriented formats for mathematics -% include the various logic-based languages found in automated reasoning tools -% (see~\cite{RobVor:hoar01} for an overview), program specification languages (see -% e.g.~\cite{Bergstra:as89}). -% -% The promise if these content-oriented approaches is that various tasks involved in ``doing -% mathematics'' (e.g. search, navigation, cross-referencing, quality control, user-adaptive -% presentation, proving, simulation) can be machine-supported, and thus the working -% mathematician is relieved to do what humans can still do infinitely better than machines: -% The creative part of mathematics --- inventing interesting mathematical objects, -% conjecturing about their properties and coming up with creative ideas for proving these -% conjectures. However, before these promises can be delivered upon (there is even a -% conference series~\cite{MKM-IG-Meetings:online} studying ``Mathematical Knowledge -% Management (MKM)''), large bodies of mathematical knowledge have to be converted into -% content form. -% -% Even though {\mathml} is viewed by most as the coming standard for representing -% mathematics on the web and in scientific publications, it has not not fully taken off in -% practice. One of the reasons for that may be that the technical communities that need -% high-quality methods for publishing mathematics already have an established method which -% yields excellent results: the {\TeX/\LaTeX} system: and a large part of mathematical -% knowledge is prepared in the form of {\TeX}/{\LaTeX} documents. -% -% {\TeX}~\cite{Knuth:ttb84} is a document presentation format that combines complex -% page-description primitives with a powerful macro-expansion facility, which is utilized -% in {\LaTeX} (essentially a set of {\TeX} macro packages, see~\cite{Lamport:ladps94}) to -% achieve more content-oriented markup that can be adapted to particular tastes via -% specialized document styles. It is safe to say that {\LaTeX} largely restricts content -% markup to the document structure\footnote{supplying macros e.g. for sections, -% paragraphs, theorems, definitions, etc.}, and graphics, leaving the user with the -% presentational {\TeX} primitives for mathematical formulae. Therefore, even though -% {\LaTeX} goes a great step into the direction of an MKM format, it is not, as it lacks -% infrastructure for marking up the functional structure of formulae and mathematical -% statements, and their dependence on and contribution to the mathematical context. -% -% \subsection{The {\xml} vs. {\TeX/\LaTeX} Formats and Workflows} -% -% {\mathml} is an {\xml}-based markup format for mathematical formulae, it is standardized -% by the World Wide Web Consortium in {\cite{CarIon:MathML03}}, and is supported by the -% major browsers. The {\mathml} format comes in two integrated components: presentation -% {\mathml} presentation MathML and content {\mathml} content MathML. The former provides -% a comprehensive set of layout primitives for presenting the visual appearance of -% mathematical formulae, and the second one the functional/logical structure of the -% conveyed mathematical objects. For all practical concerns, presentation {\mathml} is -% equivalent to the math mode of {\TeX}. The text mode facilitates of {\TeX} (and the -% multitude of {\LaTeX} classes) are relegated to other {\xml} formats, which embed -% {\mathml}. -% -% The programming language constructs of {\TeX} (i.e. the macro definition -% facilities\footnote{We count the parser manipulation facilities of {\TeX}, e.g. category -% code changes into the programming facilities as well, these are of course impossible for -% {\mathml}, since it is bound to {\xml} syntax.}) are relegated to the {\xml} -% programming languages that can be used to develop language extensions. -% transformation language {\xslt}~\cite{Deach:exls99,Kay:xpr00} or proper {\xml}-enabled -% The {\xml}-based syntax and the separation of the presentational-, functional- and -% programming/extensibility concerns in {\mathml} has some distinct advantages over the -% integrated approach in {\TeX/\LaTeX} on the services side: {\mathml} gives us better -% \begin{itemize} -% \item integration with web-based publishing, -% \item accessibility to disabled persons, e.g. (well-written) {\mathml} contains enough -% structural information to supports screen readers. -% \item reusability, searchabiliby and integration with mathematical software systems -% (e.g. copy-and-paste to computer algebra systems), and -% \item validation and plausibility checking. -% \end{itemize} -% -% On the other hand, {\TeX/\LaTeX}/s adaptable syntax and tightly integrated programming -% features within has distinct advantages on the authoring side: -% -% \begin{itemize} -% \item The {\TeX/\LaTeX} syntax is much more compact than {\mathml}, and if needed, the -% community develops {\LaTeX} packages that supply new functionality in with a succinct -% and intuitive syntax. -% \item The user can define ad-hoc abbreviations and bind them to new control sequences to -% structure the source code. -% \item The {\TeX/\LaTeX} community has a vast collection of language extensions and best -% practice examples for every conceivable publication purpose and an established and very -% active developer community that supports these. -% \item There is a host of software systems centered around the {\TeX/\LaTeX} language that -% make authoring content easier: many editors have special modes for {\LaTeX}, there are -% spelling/style/grammar checkers, transformers to other markup formats, etc. -% \end{itemize} -% -% In other words, the technical community is is heavily invested in the whole -% {\index*{workflow}}, and technical know-how about the format permeates the -% community. Since all of this would need to be re-established for a {\mathml}-based -% workflow, the technical community is slow to take up {\mathml} over {\TeX/\LaTeX}, even -% in light of the advantages detailed above. -% -% \subsection{A {\LaTeX}-based Workflow for {\xml}-based Mathematical Documents} -% -% An elegant way of sidestepping most of the problems inherent in transitioning from a -% {\LaTeX}-based to an {\xml}-based workflow is to combine both and take advantage of the -% respective advantages. -% -% The key ingredient in this approach is a system that can transform {\TeX\LaTeX} documents -% to their corresponding {\xml}-based counterparts. That way, {\xml}-documents can be -% authored and prototyped in the {\LaTeX} workflow, and transformed to {\xml} for -% publication and added-value services, combining the two workflows. -% -% There are various attempts to solve the {\TeX/\LaTeX} to {\xml} transformation problem -% (see ~\cite{StaGinDav:maacl09} for an overview); the most mature is probably Bruce -% Miller's \latexml system~\cite{Miller:latexml:online}. It consists of two parts: a -% re-implementation of the {\TeX} {\index*{analyzer}} with all of it's intricacies, and a -% extensible {\xml} emitter (the component that assembles the output of the parser). Since -% the {\LaTeX} style files are (ultimately) programmed in {\TeX}, the {\TeX} analyzer can -% handle all {\TeX} extensions, including all of {\LaTeX}. Thus the \latexml parser can -% handle all of {\TeX/\LaTeX}, if the emitter is extensible, which is guaranteed by the -% \latexml binding language: To transform a {\TeX/\LaTeX} document to a given {\xml} -% format, all {\TeX} extensions\footnote{i.e. all macros, environments, and syntax -% extensions used int the source document} must have ``\latexml -% bindings''\index{LaTeXML}{binding}, i.e. a directive to the \latexml emitter that -% specifies the target representation in {\xml}. -% -% \subsection{Generating \protect\omdoc from \protect\sTeX} -% -% The \sTeX packages (see Section~\ref{sec:packages}) provide functionalities for marking -% up the functional structure of mathematical documents, so that the {\LaTeX} sources -% contain enough information that can be exported to the \omdoc format (\underline{O}pen -% \underline{M}athematical \underline{Doc}uments; see~\cite{Kohlhase:OMDoc1.2}). For the -% actual transformation, we use a \latexml plugin~\cite{LaTeXMLsTeX:github:on} that -% provides the \latexml bindings for the \sTeX packages. -% -% \subsection{Conclusion}\label{sec:concl} -% -% The {\stex} collection provides a set of semantic macros that extends the familiar and -% time-tried {\LaTeX} workflow in academics until the last step of Internet publication of -% the material. For instance, an {\smglom} module can be authored and maintained in -% {\LaTeX} using a simple text editor, a process most academics in technical subjects are -% well familiar with. Only in a last publishing step (which is fully automatic) does it get -% transformed into the {\xml} world, which is unfamiliar to most academics. -% -% Thus, {\stex} can serve as a conceptual interface between the document author and MKM -% systems: Technically, the semantically preloaded {\LaTeX} documents are transformed into -% the (usually {\xml}-based) MKM representation formats, but conceptually, the ability to -% semantically annotate the source document is sufficient. -% -% The {\stex} macro packages have been validated together with a case -% study~\cite{Kohlhase04:stex}, where we semantically preload the course materials for a -% two-semester course in Computer Science at Jacobs University Bremen and transform them to -% the {\omdoc} MKM format. -% -% \subsection{Licensing, Download and Setup}\label{sec:setup} -% -% The {\stex} packages are licensed under the {\LaTeX} Project Public License~\cite{LPPL}, -% which basically means that they can be downloaded, used, copied, and even modified by -% anyone under a set of simple conditions (e.g. if you modify you have to distribute under a -% different name). -% -% \subsubsection{The \protect\sTeX Distribution} -% -% The {\stex} packages and classes are available from the Comprehensive {\TeX} Archive -% Network (CTAN~\cite{CTAN:on}) and are part of the primary {\TeX/\LaTeX} distributions -% (e.g. TeXlive~\cite{TeXLive:on} and MikTeX~\cite{MiKTeX:on}). The development version is -% on GitHub~\cite{sTeX:github:on}, it can cloned or forked from the repository URL -% \begin{center} -% \url{https://github.com/KWARC/sTeX.git} -% \end{center} -% It is usually a good idea to enlarge the internal memory allocation of the \TeX/\LaTeX executables. This can be done by -% adding the following configurations in \texttt{texmf.cnf} (or changing them, if they -% already exist). Note that you will probably need \texttt{sudo} to do this. -% \begin{footnotesize}\sf -% \begin{verbatim} -% max_in_open = 50 % simultaneous input files and error insertions, -% 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 -% \end{verbatim} -% \end{footnotesize} -% After that, you have to run the -% \begin{verbatim} -% sudo fmtutil-sys --all -% \end{verbatim} -% -% With this installation using \sTeX is as painless as using \LaTeX, just make sure the -% \sTeX distribution is where \texttt{latex} can find it and run \texttt{pdflatex} over -% the main file. -% -% \subsubsection{The \protect\sTeX Plugin for \protect\latexml} -% -% For the \omdoc transformation of \sTeX documents we use a \latexml plugin that provides -% the \latexml bindings for the \sTeX packages. For installation and setup follow the -% instructions at~\cite{LaTeXMLsTeX:github:on}\ednote{We are working on a CPAN submission -% that should make installations painless.} -% -%\newpage -% \section{The Packages of the \protect\stex Collection}\label{sec:packages} -% -% In the following, we will shortly preview the packages and classes in the {\stex} -% collection. They all provide part of the solution of representing semantic structure in -% the {\TeX/\LaTeX} workflow. We will group them by the conceptual level they -% address. Figure~\ref{fig:packages} gives an overview. -% -% \subsection{The \protect\sTeX Distribution}\label{pkg:stex} -% -% The |stex| package provides |stex.sty| that just loads all packages below and passes -% around the package options accordingly and |stex-logo.sty| that provides the macros -% \DescribeMacro{\sTeX}|\sTeX| and \DescribeMacro{\stex}|\stex| that typeset the \sTeX -% logo. -% -% \begin{figure}[ht]\centering -% \begin{tikzpicture}[xscale=1.1]\tt -% \node (metakeys) at (0,0) {metakeys}; -% \node (cpath) at (-2,0) {cpath}; -% \node (presentation) at (2.5,0) {presentation}; -% -% \node (sref) at (0,1) {sref}; -% \node (cmath) at (2.5,1) {cmath}; -% -% \node (rdfmeta) at (-2,2) {rdfmeta}; -% \node (modules) at (0,2) {modules}; -% \node (omdoc) at (1.5,2) {omdoc}; -% \node (sproof) at (3,2) {sproof}; -% -% \node (wa) at (-2,3) {workaddress}; -% \node (omtext) at (0,3) {omtext}; -% \node (structview) at (3,3) {structview}; -% -% \node (dcm) at (-2,4) {dcm}; -% \node (statements) at (0,4) {statements}; -% \node (stex-logo) at (3.5,4) {stex-logo}; -% -% \node (problem) at (4.5,5) {problem}; -% \node (tikzinput) at (2.5,5) {tikzinput}; -% \node (stex) at (0,5) {stex}; -% \node (smultiling) at (-2,5) {smultiling}; -% -% \node (smglomsty) at (-2,6) {smglom.sty}; -% \node (mikoslidessty) at (.5,6) {mikoslides.sty}; -% \node (hwexamsty) at (4.5,6) {hwexam.sty}; -% -% \node (smglomcls) at (-2,7) {smglom.cls}; -% \node (mikoslidescls) at (.5,7) {mikoslides.cls}; -% \node (hwexamcls) at (4.5,7) {hwexam.cls}; -% \node (omdoccls) at (2.5,6.5) {omdoc.cls}; -% -% \draw[->] (sref) -- (metakeys); -% \draw[->] (cmath) -- (presentation); -% \draw[->] (rdfmeta) -- (sref); -% \draw[->] (wa) -- (modules); -% \draw[->] (modules) -- (sref); -% \draw[->] (modules) -- (cpath); -% \draw[->] (omdoc) -- (sref); -% \draw[->] (sproof) -- (sref); -% \draw[->] (dcm) to[bend right=70] (rdfmeta); -% \draw[->] (dcm) -- (wa); -% \draw[->] (omtext) -- (modules); -% \draw[->] (statements) -- (omtext); -% \draw[->] (stex) -- (statements); -% \draw[->] (stex) -- (dcm); -% \draw[->] (stex) to[bend left=5] (sproof); -% \draw[->] (stex) to[bend left=5] (structview); -% \draw[->] (structview) -- (modules); -% \draw[->] (stex) to[bend left=15] (cmath); -% \draw[->] (stex) to[bend left=20] (omdoc); -% \draw[->] (stex) -- (stex-logo); -% \draw[->] (problem) -- (omtext); -% \draw[->] (smglomsty) -- (smultiling); -% \draw[->] (smglomsty) -- (statements); -% \draw[->] (smglomcls) -- (smglomsty); -% \draw[->] (smglomcls) -- (stex); -% \draw[->] (mikoslidescls) -- (mikoslidessty); -% \draw[->] (mikoslidescls) -- (smglomsty); -% \draw[->] (mikoslidessty) -- (tikzinput); -% \draw[->] (mikoslidessty) -- (stex); -% \draw[->] (mikoslidessty) -- (smglomsty); -% \draw[->] (hwexamcls) -- (hwexamsty); -% \draw[->] (hwexamsty) -- (problem); -% \draw[->] (omdoccls) to[bend right=20] (omdoc); -% -% \draw[->] (hwexamcls) -- (tikzinput); -% \draw[->] (hwexamcls) to[bend right=10] (omdoccls); -% \draw[->] (mikoslidescls) to[bend left=10] (omdoccls); -% \draw[->] (smglomcls) to[bend right=10] (omdoccls); -% \end{tikzpicture} -% \caption{The \protect\sTeX packages and their dependencies.}\label{fig:packages} -% \end{figure} -% -% \subsection{Content Markup of Mathematical Formulae in {\TeX/\LaTeX}} -% -% \subsubsection{\texttt{cmath}: Building Content Math Representations}\label{pkg:cmath} -% -% The |cmath| package (see~\ctancite{Kohlhase:cmath}) supplies an interface for building -% content math representations. It gives special macros for marking up variables, -% applications and bindings. It supports the transformation into both -% OpenMath~\cite{BusCapCar:2oms04} and content MathML~\cite{CarIon:MathML03}. -% -% \subsubsection{{\texttt{presentation}}: Flexible Presentation for Semantic -% Macros}\label{pkg:presentation} -% -% The {\texttt{presentation}} package (see~\ctancite{Kohlhase:ipsmsl}) 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. -% -% \subsection{Mathematical Statements} -% -% \subsubsection{{\texttt{statements}}: Extending Content Macros for Mathematical -% Notation}\label{pkg:statements} -% -% The \texttt{statements} package (see\ctancite{Kohlhase:smms}) provides semantic markup -% facilities for mathematical statements like Theorems, Lemmata, Axioms, Definitions, -% etc. in {\stex} files. This structure can be used by MKM systems for added-value services, -% either directly from the {\sTeX} sources, or after translation. -% -% \subsubsection{{\texttt{sproof}}: Extending Content Macros for Mathematical -% Notation}\label{pkg:sproof} -% -% The \texttt{sproof} package (see~\ctancite{Kohlhase:smp}) supplies macros and environment -% that allow to annotate the structure of mathematical proofs in {\stex} files. This -% structure can be used by MKM systems for added-value services, either directly from the -% {\sTeX} sources, or after translation. -% -% \subsubsection{\texttt{omtext}: Mathematical Text}\label{pkg:omtext} -% \ednote{say something} -% -% \subsection{Context Markup for Mathematics} -% -% \subsubsection{{\texttt{modules}}: Extending Content Macros for Mathematical\ -% Notation}\label{pkg:modules} -% -% The \texttt{modules} package (see~\ctancite{KohAmb:smmssl}) supplies a definition -% mechanism for semantic macros and a non-standard scoping construct for them, which is -% oriented at the semantic dependency 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. A side effect of this is that we have an -% ``object-oriented'' inheritance mechanism for semantic macros: the semantic macros for -% the mathematical objects described in a module come with the module itself. As a -% consequence, the \textbf{modules signatures} (only the macro definitions, not the -% descriptions) need to be loaded before they can be used somewhere else. -% -% \subsubsection{\texttt{smultiling}: Multilingual Mathematical -% Modules}\label{pkg:smultiling} -% -% In multilingual settings, i.e. where we have multiple \sTeX documents that are -% translations of each other, it is better to separate the module signature from the -% descriptive document. \ednote{continue} -% -% \subsubsection{\texttt{structview}: Structures and Views}\label{pkg:structview} -% \ednote{Say something} -% -% \subsection{Mathematical Document Classes} -% -% \subsubsection{OMDoc Documents}\label{pkg:omdoc} -% -% The \texttt{omdoc} package provides an infrastructure that allows to markup {\omdoc} -% documents in {\LaTeX}. It provides \texttt{omdoc.cls}, a class with the and -% {\texttt{omdocdoc.sty}}\ednote{continue} -% -% \subsubsection{\texttt{hwexam}: Homeworks and Exams}\label{pkg:hwexam} -% -% The \texttt{hwexam} package~\ctancite{Kohlhase:hwexam} provides |hwexam.cls| and -% |hwexam.sty| for marking up homework assignments, and exams. The content markup strategy -% employed in \sTeX allows to specify -- and profit from -- administrative metadata such -% as time and point counts. This package relies on the |problem| -% package~\ctancite{Kohlhase:problem} which provides markup for problems, hints, and -% solutions. -% -% \subsubsection{\texttt{mikoslides}: Slides and Course Notes}\label{pkg:mikoslides} -% -% The |mikoslides| package provides a document class from which we can generate both -% course slides -- via the |beamer| classs -- and course notes -- via the |omdoc| class -- -% in a transparent way. -% -% \subsection{Metadata} -% -% \subsubsection{\texttt{rdfmeta}: RDFa Metadata for \protect\sTeX}\label{pkg:rdfmeta} -% \ednote{Say something} -% -% \subsubsection{\texttt{dcm}: Dublin Core Metadata}\label{pkg:dcm} -% \ednote{Say something} -% -% \subsubsection{\texttt{workaddress}: Markup for FOAF Metadata}\label{pkg:workaddress} -% \ednote{Say something} -% -% \subsection{Support for MathHub} -% -% The |mathhub| package provides the supplementary packages |mikoslides-mh|, -% |modules-mh.sty|, |omtext-mh.sty|, |problem-mh.sty|, |smultiling-mh.sty|, -% |structview-mh.sty|, and |tikzinput-mh.sty| with variants of the user-visible macros -% that are adapted to the MathHub system -- see Section~\ref{sec:mathhub} for details. -% -% \subsection{Auxiliary Packages} -% -% \subsubsection{\texttt{metakeys}: An extended key/value Interface}\label{pkg:metakeys} -% \ednote{Say something} -% -% \subsubsection{\texttt{pathsuris}: Managing Relative/Absolute File Paths}\label{pkg:pathsuris} -% \ednote{Say something} -% -% \subsubsection{\texttt{tikzinput}: External TIKZ Pictures as Standalone Images}\label{pkg:tikzinput} -% \ednote{Say something} -% -% \newpage -% \section{Workflows and Best Practices}\label{sec:workflows} -% -% \subsection{The ``Little Modules'' Approach} -% -% One of the key advantages of semantic markup with \sTeX is that the \sTeX sources are -% highly reusable by the ``object-oriented'' inheritance model induced by \sTeX -% modules. It turned out to be useful to divide \sTeX documents into three kinds of files: -% \begin{enumerate} -% \item \textbf{module files}: files that essentially contain a collection of \sTeX -% modules~\ctancite{KohAmb:smmssl} -- usually a single one whose module name coincides -% the file name base. -% \item \textbf{fragment files}: files that contain a group of input references to module- -% or fragment files -- usually one group deep for flexibility, transition text, and -% additional remarks. -% \item \textbf{driver files} that set up the document class, contain the preambles, and -% input reference fragment files. -% \end{enumerate} -% -% These correspond to the \sTeX documents, but can reuse and share \sTeX fragments and -% modules. Figure~\ref{fig:reuse} shows a situation, where we have two courses given over -% multiple years, which results in five course notes documents given by driver files, wich -% share quite a few components. As drivers and fragment files are mostly content-free -- -% they only contribute document structure, this lets all documents contribute from the -% development of the modules. -% -% \begin{figure}[ht]\centering -% \begin{tikzpicture}\footnotesize -% \tikzstyle{course} = [draw,rounded corners,inner sep=0pt] -% \tikzstyle{topic} = [draw,inner sep=2pt] -% -% \node at (-1,0) {modules}; -% \node at (-1,1) {fragments}; -% \node at (-1,2) {drivers}; -% -% \node[topic] (strings) at (1,0) {strings}; -% \node[topic] (pref) at (2.5,0) {\begin{tabular}{c}prefix\\codes\end{tabular}}; -% \node[topic] (codes) at (1.5,1) {codes}; -% -% \node[topic] (xml) at (5.3,0) {DAG}; -% \node[topic] (uc) at (4,0) {Trees}; -% \node[topic] (html) at (4.5,1) {GraphTheo}; -% -% \node[topic] (docbook) at (8,0) {NatDed}; -% \node[topic] (dita) at (6.8,0) {FOL}; -% \node[topic] (man) at (7.5,1) {Logic}; -% -% \node[course] (gencs) at (3,2) {\begin{tabular}{c}GenCS\\2011\end{tabular}}; -% \node[course] (gencs10) at (1.5,2) {\begin{tabular}{c}GenCS\\2010\end{tabular}}; -% \node[course] (gencs12) at (4.5,2) {\begin{tabular}{c}GenCS\\2012\end{tabular}}; -% \node (gdots) at (3,1) {\ldots}; -% \node[course] (tdm) at (6.5,2) {\begin{tabular}{c}AdvCS\\2011\end{tabular}}; -% \node[course] (tdm12) at (8,2) {\begin{tabular}{c}AdvCS\\2012\end{tabular}}; -% \node (tdots) at (6,1) {\ldots}; -% -% \draw (gencs) -- (strings) -- (codes); -% \draw (gencs) -- (html) -- (uc); -% \draw (tdm) -- (man) -- (docbook); -% \draw (tdm) -- (html) -- (xml); -% \draw (codes) -- (pref); -% \draw (man) -- (dita); -% \draw (gencs) -- (gdots); -% \draw (tdm) -- (tdots); -% \draw (gencs12) -- (codes); -% \draw (gencs10) -- (codes); -% \draw (gencs12) -- (gdots); -% \draw (gencs10) -- (gdots); -% \draw (gencs12) -- (html); -% \draw (gencs10) -- (html); -% \draw (tdm12) -- (html); -% \draw (tdm12) -- (tdots); -% \draw (tdm12) -- (man); -% \end{tikzpicture} -% \caption{Reuse of Fragments and Modules in a Course Notes Setting}\label{fig:reuse} -% \end{figure} -% -% The downside of this ``object-oriented'' inheritance mechanism is that we need to keep -% the module signatures (see Section~\ref{pkg:modules}) up to date adding to the -% complexity of document management. -% -% Another advantage of the ``little modules approach'' is that modules can be developed -% separately. Indeed all modules of a given subject share common pre- and post-ambles which -% can be developed in special files -- usually named |pre.tex|, |post.tex|, and -% |preamble.tex| (the latter is included in |pre.tex|). Given such a setup, the call to -% |pdflatex| can be suitably adapted to handle the pre/postfixes. -% -% \subsection{Basic Utilities \& Makefiles}\label{sec:utilities} -% -% The \sTeX distribution contains three basic command line utilities to manage \sTeX -% documents in the |bin| directory of the distribution. -% \begin{description} -% \item[\texttt{sms}] computes the \stex module signatures for a given \stex file -% (see~\ctancite{KohAmb:smmssl} details). -% \item[\texttt{filedate} and \texttt{checksum}] that help keeping the metadata of the -% self-documenting {\LaTeX} packages in the \stex distribution up to date. -% \item[\texttt{installFonts.sh}] that installs the fonts necessary for chinese \sTeX -% documents. -% \end{description} -% These are supplemented by a set of UNIX |Makefiles| in the |lib/make| directory. The way -% to use them is to include them into a |Makefile| in the directory and then run one of -% the targets |pdf| and |mpdf| to make the PDF versions of the drivers and -% modules\ednote{MK: what about the fragments?} and |omdoc| and |mods| to generate -% \omdoc. Note that we need to |make sms| in order to make the respective \sTeX module -% signatures for the modules. -% -% \subsection{MathHub: a Portal for Active Mathematical Documents}\label{sec:mathhub} -% -% MathHub (\url{http://mathhub.info} see~\cite{IanJucKoh:sdm14}) is a portal for Active -% Mathematical Documents -- documents that are made context-aware and interactive by -% semantic annotations. \sTeX is one of the main input formats for informal active -% documents. MathHub supports \sTeX documents in three ways: -% \begin{enumerate} -% \item MathHub offers free/open hosting in document repositories for (mathematical) \sTeX -% document collections. -% \item the backend system supports the large-scale change- and error-management for \sTeX -% documents in the ``little modules'' paradigm. -% \item the front-end displays interactive (HTML5) documents generated from the \sTeX -% sources (via \omdoc). -% \end{enumerate} -% The MathHub system is probably the best way of developing and hosting larger \sTeX -% document collections. It offers two authoring workflows an online authoring workflow via -% a direct web interface~\cite{MathHub:oa:on} or casual users and an offline authoring -% workflow that we describe next. -% -% \subsection{\texttt{lmh}: MathHub's Build System Locally}\label{sec:lmh} -% -% As direct web editing workflows are not efficient for larger document collections, the -% MathHub system offers an offline authoring system. This uses GIT repositories for -% distribution -- the author develops the document collection on a local working copy and -% then commits for inclusion to MathHub. The MathHub build system can be used locally for -% efficient development via the |localmh| system~\cite{lmh:github:on}. In a nutshell -- -% see~\cite{MathHub:law:on} for details -- -% \begin{enumerate} -% \item |localmh| is installed in a docker container that supplies the build system and -% provides the |lmh| command suite. -% \item |lmh pdf| formats \sTeX modules to PDF -- building all dependencies, e.g. module -% signatures, first. -% \item |lmh omdoc| generates \omdoc for \sTeX documents -- again with dependencies. -% \item |lmh xhtml| generates active documents (in XHTML5) from the \sTeX sources or their -% \omdoc versions. -% \item |lmh| \meta{gitsc} distributes the git subcommand \meta{gitsc} over multiple -% repositories. -% \end{enumerate} -% Various other |lmh| subcommands help with large-scale editing problems like renaming or -% moving modules, translations in multilingual settings, etc. -% -% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\newpage\printbibliography}\newpage -% -% \newpage -% \section{The Implementation}\label{sec:implementation} -% -% \subsection{Package Options}\label{sec:impl:options} -% -% The first step is to declare (a few) package options that handle whether certain -% information is printed or not. They all come with their own conditionals that are set by -% the options. -% -% \begin{macrocode} -%<*package> -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{statements} - \PassOptionsToPackage{\CurrentOption}{structview} - \PassOptionsToPackage{\CurrentOption}{sproofs} - \PassOptionsToPackage{\CurrentOption}{omdoc} - \PassOptionsToPackage{\CurrentOption}{cmath} - \PassOptionsToPackage{\CurrentOption}{dcm}} -\ProcessOptions -% \end{macrocode} -% -% Then we make sure that the necessary packages are loaded (in the right versions). -% \begin{macrocode} -\RequirePackage{stex-logo} -\RequirePackage{omdoc} -\RequirePackage{statements} -\RequirePackage{structview} -\RequirePackage{sproof} -\RequirePackage{cmath} -\RequirePackage{dcm} -%</package> -% \end{macrocode} -% -% \subsection{The \protect\sTeX Logo}\label{sec:impl:ids} -% -% To provide default identifiers, we tag all elements that allow |xml:id| attributes by -% executing the |numberIt| procedure from |omdoc.sty.ltxml|. -% -% \begin{macrocode} -%<*logo> -\RequirePackage{xspace} -\def\stex{% - \@ifundefined{texorpdfstring}% - {\let\texorpdfstring\@firstoftwo}% - {}% - \texorpdfstring{\raisebox{-.5ex}S\kern-.5ex\TeX}{sTeX}\xspace% -} -\def\sTeX{\stex} -%</logo> -% \end{macrocode} -% \Finale -\endinput -% \iffalse -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: -% \fi -% LocalWords: GPL structuresharing STR dtx pts keyval xcomment CPERL DefKeyVal iffalse -% LocalWords: RequirePackage Semiverbatim DefEnvironment OptionalKeyVals soln texttt baz -% LocalWords: exnote DefConstructor inclprob NeedsTeXFormat omd.sty textbackslash exfig -% LocalWords: stopsolution fileversion filedate maketitle setcounter tocdepth newpage uc -% LocalWords: tableofcontents showmeta showmeta solutionstrue usepackage minipage hrule -% LocalWords: linewidth elefants.prob Elefants smallskip noindent textbf startsolutions -% LocalWords: startsolutions stopsolutions stopsolutions includeproblem includeproblem -% LocalWords: textsf HorIacJuc cscpnrr11 includemhproblem includemhproblem importmodule -% LocalWords: importmhmodule foobar ldots latexml mhcurrentrepos mh-variants mh-variant -% LocalWords: compactenum langle rangle langle rangle ltxml metakeys newif ifexnotes rm -% LocalWords: exnotesfalse exnotestrue ifhints hintsfalse hintstrue ifsolutions ifpts -% LocalWords: solutionsfalse ptsfalse ptstrue ifmin minfalse mintrue ifboxed boxedfalse -% LocalWords: boxedtrue sref mdframed marginpar prob srefaddidkey addmetakey refnum kv -% LocalWords: newcounter ifx thesection theproblem hfill newenvironment metasetkeys ltx -% LocalWords: stepcounter currentsectionlevel xspace ignorespaces surroundwithmdframed -% LocalWords: omdoc autoopen autoclose solvedinminutes kvi qw vals newcommand exhint pgk -% LocalWords: specialcomment excludecomment mhrepos xref marginpar addtocounter doctex -% LocalWords: mh@currentrepos endinput stex Bergstra mathml ttb84 utilized ladps94 xslt -% LocalWords: specialized standardized Deach exls99 xpr00 compactitem searchabiliby tdm -% LocalWords: StaGinDav maacl09 analyzer athematical uments concl smglom subsubsection -% LocalWords: TeXlive TeXLive texmf.cnf pdflatex ednote cmath cmath ctancite ipsmsl lmh -% LocalWords: centering tikzpicture xscale cpath cpath rdfmeta rdfmeta sproof sproof -% LocalWords: workaddress omtext omtext tikzinput tikzinput smglomsty mikoslidessty -% LocalWords: mikoslides.sty hwexamsty hwexam.sty smglomcls smglom.cls mikoslidescls -% LocalWords: mikoslides.cls hwexamcls hwexam.cls omdoccls omdoc.cls smms KohAmb smmssl -% LocalWords: omdocdoc.sty hwexam hwexam mikoslides mikoslides mathhub modules-mh.sty -% LocalWords: omtext-mh.sty problem-mh.sty smultiling-mh.sty structview-mh.sty docbook -% LocalWords: tikzinput-mh.sty pathsuris pathsuris tikzstyle NatDed gencs gdots tdots -% LocalWords: printbibliography sproofs texorpdfstring raisebox IanJucKoh sdm14 localmh -% LocalWords: gitsc gitsc diff --git a/macros/latex/contrib/stex/sty/stex/stex.ins b/macros/latex/contrib/stex/sty/stex/stex.ins deleted file mode 100644 index d49b07d36b..0000000000 --- a/macros/latex/contrib/stex/sty/stex/stex.ins +++ /dev/null @@ -1,33 +0,0 @@ -%% -%% This file generates files required to use the stex package. -%% At your command prompt write -%% -%% latex stex.ins -%% -%% Copyright(c) 2007 Michael Kohlhase -%% The development version of this file can be found at -%% $HeadURL: https://svn.kwarc.info/repos/stex-content/sty/stex/stex.ins $ -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{stex.sty}{\from{stex.dtx}{package}}} -\generate{\file{stex-logo.sty}{\from{stex.dtx}{logo}}} - -\Msg{*} -\Msg{* You probably need to move the file stex.sty into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/stex/stex.pdf b/macros/latex/contrib/stex/sty/stex/stex.pdf Binary files differdeleted file mode 100644 index 5dc9e72586..0000000000 --- a/macros/latex/contrib/stex/sty/stex/stex.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/structview/README b/macros/latex/contrib/stex/sty/structview/README deleted file mode 100644 index 1ca4729991..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/structview/structview.dtx b/macros/latex/contrib/stex/sty/structview/structview.dtx deleted file mode 100644 index c87f592464..0000000000 --- a/macros/latex/contrib/stex/sty/structview/structview.dtx +++ /dev/null @@ -1,426 +0,0 @@ -% \iffalse meta-comment -% An Infrastructure for Structures and Views -% Copyright (C) 2004-2013 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<package>\ProvidesPackage{structview}[2019/03/20 v0.9 Structures and Views] -% -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage{stex-logo,structview} -\usepackage{url,array,float,textcomp} -\usepackage[show]{ed} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{listings} -\usepackage{amsfonts} -\usepackage{ctangit} -\usepackage{xspace} -\usepackage{hyperref} -\usepackage{tikz} -\usetikzlibrary{mmt} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\def\githubissue#1{\cite{sTeX:github:on},\hyperlink{https://github.com/KWARC/sTeX/issues/#1}{issue #1}} -\def\gray#1{\textcolor{gray}{#1}} -\def\map#1#2{#1\mapsto #2} -\begin{document} -\RecordChanges -\DocInput{structview.dtx} -\end{document} -%</driver> -% \fi -% -% \CheckSum{926} -% -% \changes{v0.9}{2015/11/05}{Moved out of the \texttt{modules} package} -% \changes{v0.9}{2016/06/11}{Deprecated \texttt{viewsketch}} -% -% \GetFileInfo{modules.sty} -% \MakeShortVerb{\|} -%\def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}\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\cn#1{\mathsf{#1}} -% \title{{\texttt{structview.sty}}: Structures and Views in {\stex}\thanks{Version {\fileversion} (last revised -% {\filedate})}} -% \author{Michael Kohlhase\\ -% FAU Erlangen-N\"urnberg\\ -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}} -% \maketitle -% -% \begin{abstract} -% The |structview| package is 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 {\TeX/\LaTeX} into a document format for -% mathematical knowledge management (MKM). -% -% This package supplies infrastructure for \omdoc structures and views: complex semantic -% relations between modules/theories. -% \end{abstract} -% -% \setcounter{tocdepth}{2}\tableofcontents\newpage -% -% \section{Introduction}\label{sec:intro} -% -% Structures and views constitute ways of defining and relating theories in a theory graph -% that considerably extend the ``object-oriented inheritance'' constituted by the imports -% relation given by the \sTeX |module| package. -% -% Structures are like imports, only that they allow to define new theories via inheritance -% with renaming. Views relate pre-existing theories and model conceptual refinements, -% framing, and implementation relations, again via a mapping between the languages defined -% by the source and target theories; we call these mappings \textbf{theory morphisms}. -% -% For details about theory morphisms we refer to~\cite{RabKoh:WSMSML13}, but hope to make -% the underlying concepts clear with examples. -% -%\begin{figure}[ht]\centering -% \begin{tikzpicture}[scale=.9]\footnotesize -% \node[thy] (Mon) at (0,1.2) {$\mmtthy{monoid}{\gray{\cn{op},\;\cn{unit}}}{}$}; -% \node[thy] (CGr) at (0,3) {$\mmtthy{cgp}{\gray{\cn{mon},\;\cn{inv}}}{}$}; -% \node[thy] (Ring) at (-3.5,3) {$\mmtthy{ring}{\gray{\cn{add}},\;\gray{\cn{mul}}}{}$}; -% \draw[struct](Mon) -- node[left,near end]{$\cn{cgp}?\cn{mon}$} (CGr); -% \draw[struct](CGr) -- node[below]{$\cn{ring}?\cn{add}$}(Ring); -% \draw[struct](Mon) -- node[left]{$\cn{ring}?\cn{mul}$} (Ring); -% \node[thy] (Int) at (3,3) {$\mmtthy{integers}{\gray{+,0,-,\cdot,1}}{}$}; -% \node[draw] (v2) at (1.5,4.8) { -% $\begin{array}{l} -% v_2\colon \\ -% \gray{\left\{\begin{array}{c} -% \map{\cn{mon}/\cn{op}}{+} \\ -% \map{\cn{mon}/\cn{unit}}{0} -% \end{array} -% \right\}} -% \;\mathrm{or}\; \gray{\map{\cn{mon}}{v_1}} \\ -% \gray{\map{\cn{inv}}{-}} -% \end{array}$}; -% \node[draw] at (2.5,1.4) { -% $\begin{array}{l} -% v_1\colon\\ -% \gray{\map{\cn{op}}{+}} \\ -% \gray{\map{\cn{unit}}{0}} -% \end{array}$}; -% \draw[view](Mon) -- (Int); -% \draw[view](CGr) -- node[below]{$v_2$} (Int); -% \draw[struct] (-4,4.5) -- +(1,0); -% \draw[view] (-4,5) -- +(1,0); -% \node[right] at (-3,4.5) {import}; -% \node[right] at (-3,5) {view}; -% \draw[view] (Ring) to[out=17,in=163] node[above,very near start] {$v_3$} (Int); -% \draw[view] (Mon) to[loop left] node[left,draw,solid,outer sep=3pt,thin]{$v_4\colon\map{x\,\cn{op}\,y}{y\,\cn{op}\,x}$}(Mon); -% \end{tikzpicture} -% \caption{A Theory Graph with Structures and Views}\label{fig:structview} -% \end{figure} -% \ednote{explain the contribution of structures and views to theory graphs and -% synchronize with Figure~\ref{fig:ring}.} -% -% \section{The User Interface} -% -% The main contributions of the |modules| package are the |module| environment, which -% allows for lexical scoping of semantic macros with inheritance and the |\symdef| macro -% for declaration of semantic macros that underly the |module| scoping. -% -% \subsection{Package Options}\label{sec:options} -% -% The \DescribeMacro{mh}|mh| option turns on MathHub support. -% -% \subsection{Theory Morphisms}\label{sec:user:assignments} -% -% A theory morphism is a mapping between the languages of its source and target -% theory. This can be described mathematically using all the structures in the \sTeX -% distribution. However, in many situations, the language transformation of a morphism can -% be given in form of \textbf{assignments} that map symbols of the source theory to -% expressions of the target theory. -% -% There are three kinds assignments:\ednote{MK: we need better macros here.} -% \begin{description} -% \item[symbol assignments] via -% \DescribeMacro{\vassign}|\vassign{|\meta{sym}|}{|\meta{exp}|}|, which maps a symbol -% \meta{sym} from source theory an expression \meta{exp} in the target theory. -% \item[function assignments] via -% \DescribeMacro{\fassign}|\fassign{|\meta{bvars}|}{|\meta{pat}|}{|\meta{exp}|}|, is a -% variant which maps a function symbol \meta{sym} by mapping a pattern expression -% \meta{pat} (\meta{sym} applied to \meta{bvars}) to an expression \meta{exp} in the -% target theory on bound variables \meta{bvars}. -% \item[term assignments] via -% \DescribeMacro{\tassign}|\tassign{|\meta{sym}|}{|\meta{tname}|}|, another special -% case, where the value is the symbol with name \meta{tname} in the target theory. -% \end{description} -% Figure~\ref{fig:ring} shows a concrete example\ednote{adapt when we fully understand -% this, and the implementation works.} -% -% The assignments above can be seen as abbreviations for a simple, formal definitions, -% which define a symbol of the source theory by an expression in the target theory. -% -% \subsection{Structures}\label{sec:user:structures} -% -% Structures are specified by the \DescribeEnv{structure}|sstructure|\footnote{The old -% |importmodulevia| environment is now deprecated.} environment: -% \begin{center} -% |\begin{sstructure}[|\meta{keys}|]{|\meta{name}|}{|\meta{sthy}|}|\meta{morph}|\end{sstructure}| -% \end{center} -% gives the structure the name \meta{name}, specifies the ``source theory'' via its -% identifier \meta{sthy}, and the morphism \meta{morph}. The |structure| environment takes -% the same keys as the |\importmodule| macro, which it generalizes. The morphism -% \meta{morph} in the body of the |structure| environment specifies the morphism -% (see~\ref{sec:user:assignments} above). In a structure, we take the target theory to be -% the current theory. -% -%\begin{exfig} -% \begin{verbatim} -% \begin{module}[id=ring] -% \symdef{rbase}{R} -% \symdef{rtimes}[2]{\infix\cdot{#1}{#2}} -% \symdef{rone}{1} -% \begin{sstructure}{mul}{monoid} -% \tassign{magbase}{rbase} -% \fassign{a,b}{\magmaop{a}b}{\rtimes{a}b} -% \tassign{monunit}{rone} -% \end{sstructure} -% \symdef{rplus}[2]{\infix+{#1}{#2}} -% \symdef{rminus}[1]{\infix-{#1}{#2}} -% \begin{sstructure}{add}{cgroup} -% \fassign{a,b}{\magmaop{a}b}{\rplus{a}b} -% \tassign{monunit}{rzero} -% \tassign{cginvOp}{\rminus} -% \end{sstructure} -% ... -% \end{module} -% \end{verbatim} -% \caption{A Module for Rings with inheritance from monoids and commutative groups}\label{fig:ring} -% \end{exfig} -% -% \subsection{Views}\label{sec:user:views} -% -% A view is a mapping between modules, such that all model assumptions (axioms) of the -% source module are satisfied in the target module. For marking up views the |structview| -% package supplies the \DescribeEnv{view}|view| environment; see Figure~\ref{fig:view} for -% the \stex markup of view $v_1$ from Figure~\ref{fig:structview}. The |view| environment -% takes one optional key/value argument followed by two mandatory ones: the names of the -% source and target modules. The |view| environment takes the following keys: |id| for a -% name, |title| and |display| for visual presentation, |loadfrom|, |loadto|, and -% |ext|\ednote{MK: we probably need toext and fromext here, but this never came up yet.} -% for specifying the source files that supply the source and target modules, |creators|, -% |contributors|, |srccite| for document metadata, and |type|\ednote{????}. -% -%\begin{exfig} -% \begin{verbatim} -% \begin{view}{monoid}{integers} -% \vassign{magbase}{base} -% \fassign{a,b}{\magmaop{a}b}{\inttimes{a,b}} -% \tassign{monunit}{\intzero} -% \begin{assertion} -% The Integers with addition form a monoid in the obvious way. -% \end{assertion} -% \end{view} -% \end{verbatim} -% \caption{A view from monoids to integers}\label{fig:view} -% \end{exfig} -% -% \section{Limitations \& Extensions}\label{sec:limitations} -% -% In this section we will discuss limitations and possible extensions of the |modules| -% package. Any contributions and extension ideas are welcome; please discuss ideas, -% requests, fixes, etc on the {\sTeX} TRAC~\cite{sTeX:github:on}. -% -% \section{The Implementation}\label{sec:impl} -% -% \subsection{Package Options}\label{sec:impl:options} -% -% We declare some switches which will modify the behavior according to the package -% options. Generally, an option |xxx| will just set the appropriate switches to true -% (otherwise they stay false). The options we are not using, we pass on to the |sref| -% package we require next. -% \begin{macrocode} -%<*package> -\newif\if@structview@mh@\@structview@mh@false -\DeclareOption{mh}{\@structview@mh@true -\PassOptionsToPackage{\CurrentOption}{modules}} -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{modules}} -\ProcessOptions -% \end{macrocode} -% -% The next measure is to ensure that the |sref| and |xcomment| packages are loaded (in the -% right version). For {\latexml}, we also initialize the package inclusions. -% \begin{macrocode} -\if@structview@mh@\RequirePackage{structview-mh}\fi -\RequirePackage{modules} -% \end{macrocode} -% -% \subsection{Theory Morphisms by Assignments}\label{sec:impl:assignments} -% -% \begin{environment}{\*assign} -% \ednote{probably get rid of the optional argument} -% \begin{macrocode} -\newrobustcmd\vassign[3][]{\ifmod@show\ensuremath{#2\mapsto #3}, \fi}% -\newrobustcmd\fassign[4][]{\ifmod@show \ensuremath{#3(#2)\mapsto #4}, \fi}% -\newrobustcmd\tassign[3][]{\ifmod@show \ensuremath{#2\mapsto} #3, \fi}% -% \end{macrocode} -% \end{environment} -% -% \subsection{Structures}\label{sec:impl:structures} -% -% \begin{environment}{sstructure} -% The |structure| environment just calls |\importmodule|, but to get around the -% group, we first define a local macro |\@@doit|, which does that and can be called with -% an |\aftergroup| to escape the environment grouping introduced by |structure|. -% \begin{macrocode} -\newenvironment{sstructure}[3][]{% - \gdef\@@doit{\importmodule[#1]{#3}}% - \ifmod@show\par\noindent importing module #3 via \@@doit\fi% -}{% - \aftergroup\@@doit\ifmod@show end import\fi% -}% -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{importmodulevia} -% This is now deprecated, we give an error, but punt to |structure|. -% \begin{macrocode} -\newenvironment{importmodulevia}[2][]% -{\PackageError{structview}% - {The {importmodulevia} environment is deprecated}{use the {sstructure} instead!}% - \begin{sstructure}[#1]{missing}{#2}} -{\end{sstructure}} -% \end{macrocode} -% \end{environment} -% -% \subsection{Views}\label{sec:impl:views} -% -% We first prepare the ground by defining the keys for the |view| environment. -% \begin{macrocode} -\srefaddidkey{view} -\addmetakey*{view}{title} -\addmetakey{view}{display} -\addmetakey{view}{loadfrom} -\addmetakey{view}{loadto} -\addmetakey{view}{creators} -\addmetakey{view}{contributors} -\addmetakey{view}{srccite} -\addmetakey{view}{type} -\addmetakey[sms]{view}{ext} -% \end{macrocode} -% -% \begin{macro}{\view@heading} -% Then we make a convenience macro for the view heading. This can be customized. -% \begin{macrocode} -\ifdef{\thesection}{\newcounter{view}[section]}{\newcounter{view}} -\newrobustcmd\view@heading[4]{% - \if@importing% - \else% - \stepcounter{view}% - \edef\@display{#3}\edef\@title{#4}% - \noindent% - \ifx\@display\st@flow% - \else% - {\textbf{View} {\thesection.\theview} from \textsf{#1} to \textsf{#2}}% - \sref@label@id{View \thesection.\theview}% - \ifx\@title\@empty% - \quad% - \else% - \quad(\@title)% - \fi% - \par\noindent% - \fi% - \ignorespaces% - \fi% -}%ifmod@show -% \end{macrocode} -% \end{macro} -% -% \begin{environment}{view} -% The |view| environment relies on the |@view| environment (used also in the \sTeX -% module signatures) for module bookkeeping and adds presentation (a heading and a box) -% if the |showmods| option is set. -% \begin{macrocode} -\newenvironment{view}[3][]{% keys, from, to - \metasetkeys{view}{#1}% - \sref@target% - \begin{@view}{#2}{#3}% - \view@heading{#2}{#3}{\view@display}{\view@title}% -}{% - \end{@view}% - \ignorespaces% -}% -\ifmod@show\surroundwithmdframed{view}\fi% -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{@view} -% The |@view| does the actual bookkeeping at the module level. -% \begin{macrocode} -\newenvironment{@view}[2]{%from, to - \@importmodule[\view@loadfrom]{#1}{\view@ext}% - \@importmodule[\view@loadto]{#2}{\view@ext}% -}{}% -% \end{macrocode} -% \end{environment} -% -% \begin{environment}{viewsketch} -% The |viewsketch| environment is deprecated, we give an error -% \begin{macrocode} -\newenvironment{viewsketch}[3][]% -{\PackageError{structview}% - {The {viewsketch} environment is deprecated}{use the {view} instead!}% - \begin{view}[#1]{#2}{#3}} -{\end{view}} -% \end{macrocode} -% \end{environment} -% -% \begin{macro}{\obligation} -% The |\obligation| element does not do anything yet on the latexml -% side.\ednote{document above} -% \begin{macrocode} -\newrobustcmd\obligation[3][]{% - \if@importing% - \else Axiom #2 is proven by \sref{#3}% - \fi% -}% -%</package> -% \end{macrocode} -% \end{macro} -% -% \Finale -\endinput -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: - -% LocalWords: iffalse NeedsTeXFormat structview.dtx texttt scsys sc sc xspace mathml cn -% LocalWords: omdoc latexml cmathml activemath twintoo atwin atwintoo mathcal mathcal -% LocalWords: structview.sty stex maketitle newpage setcounter tocdepth tableofcontents -% LocalWords: newpage symdef importmodulevia thyid ednote compactdesc vassign vassign -% LocalWords: sym exp fassign fassign bvars tassign tassign tname source-tname exfig -% LocalWords: monoids impl behavior sref newif xcomment initialize structview-mh gdef -% LocalWords: aftergroup newenvironment ifmod@show noindent newrobustcmd ensuremath ifx -% LocalWords: mapsto srefaddidkey addmetakey srccite customized newcounter stepcounter -% LocalWords: textbf thesection theview textsf textsf ignorespaces metasetkeys doctex -% LocalWords: surroundwithmdframed mathsf RabKoh centering tikzpicture mmtthy CGr cgp -% LocalWords: inv cdot mathrm synchronize sstructure sthy loadfrom loadto toext fromext diff --git a/macros/latex/contrib/stex/sty/structview/structview.ins b/macros/latex/contrib/stex/sty/structview/structview.ins deleted file mode 100644 index a0ae65dd91..0000000000 --- a/macros/latex/contrib/stex/sty/structview/structview.ins +++ /dev/null @@ -1,30 +0,0 @@ - %% -%% This file generates files required to use the ed package. -%% At your command prompt write -%% -%% latex structview.ins -%% -%% Copyright(c) 2005 Michael Kohlhase -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{structview.sty}{\from{structview.dtx}{package}}} - -\Msg{*} -\Msg{* You probably need to move the generated style files into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/structview/structview.pdf b/macros/latex/contrib/stex/sty/structview/structview.pdf Binary files differdeleted file mode 100644 index 59cf5cd8c9..0000000000 --- a/macros/latex/contrib/stex/sty/structview/structview.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/tikzinput/README b/macros/latex/contrib/stex/sty/tikzinput/README deleted file mode 100644 index a28883e681..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/tikzinput/tikzinput.dtx b/macros/latex/contrib/stex/sty/tikzinput/tikzinput.dtx deleted file mode 100644 index 278f82fa09..0000000000 --- a/macros/latex/contrib/stex/sty/tikzinput/tikzinput.dtx +++ /dev/null @@ -1,223 +0,0 @@ -% \iffalse meta-comment -% A LaTeX Package for selective input of external TIKZ pictures -% Copyright (c) 2015 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%<package>\ProvidesPackage{tikzinput}[2019/03/20 v1.0 Selective input of TIKZ pictures] -% -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage{url,array,float} -\usepackage{tikzinput,omdoc} -\usepackage[show]{ed} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{stex-logo} -\usepackage{ctangit} -\usepackage{hyperref} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\def\githubissue#1{\cite{sTeX:github:on}, \hyperlink{https://github.com/KWARC/sTeX/issues/#1}{issue #1}} -\begin{document} -\RecordChanges -\DocInput{tikzinput.dtx} -\end{document} -%</driver> -% \fi -% -%\CheckSum{37} -% -% \changes{v1.0}{2015/10/22}{self-documenting package} -% -% \GetFileInfo{tikzinput.sty} -% -% \MakeShortVerb{\|} -% -% \def\omdoc{OMDoc} -% \def\latexml{{\LaTeX}ML} -% \title{\texttt{tikzinput}: Selective Input of TIKZ Pictures\thanks{Version {\fileversion} (last revised -% {\filedate})}} -% \author{Michael Kohlhase\\ -% FAU Erlangen-N\"urnberg\\ -% \url{http://kwarc.info/kohlhase}} -% \maketitle -% -% \begin{abstract} -% Running |tikz| takes a lot of time in \latexml, therefore it is often more efficient -% externalize the TIKZ pictures into separate (standalone) files, to let {\LaTeX} handle -% the TIKZ pictures to generate an image, and just load it via the usual {\LaTeX} -% graphics packages. The |tikzinput| package supports this workflow, and allows to -% switch back to native TIKZ via a package option. -% \end{abstract} -% -%\tableofcontents\newpage -% -%\begin{omgroup}[id=sec:STR]{Introduction} -% -% Running |tikz| takes a lot of time in \latexml, therefore it is often more efficient -% externalize the TIKZ pictures into separate (standalone) files, to let {\LaTeX} handle -% the TIKZ pictures to generate an image, and just load it via the usual {\LaTeX} -% graphics packages. The |tikzinput| package supports this workflow, and allows to -% switch back to native TIKZ via a package option. -% -% A side-effect of the workflow described above is that the TIKZ pictures can be -% developed -- and formatted -- independently of the document they are intended -% for. They can essentially be treated like an image file, which can be included into -% multiple documents. -% -%\end{omgroup} -% -% \begin{omgroup}[id=sec:user]{The User Interface} -% -% \begin{omgroup}[id=sec:user:options]{Package Options} -% -% The behavior of the |tikzinput| package is determined by whether the -% \DescribeMacro{image}|image| option is given. If it is not, then the |tikz| package is -% loaded, all other options are passed on to it and |\tikzinput{|\meta{file}|}| inputs -% the TIKZ file \meta{file}|.tex|; if not, only the |graphicx| package is loaded and -% |\tikzinput{|\meta{file}|}| loads an image file \meta{file}|.|\meta{ext} generated -% from \meta{file}|.tex|. -% -% \end{omgroup} -% -% \begin{omgroup}{Inputting Standalone TIKZ Pictures} -% -% The selective input functionality of the |tikzinput| package assumes that the TIKZ -% pictures are externalized into a standalone picture file, such as the one -% Example~\ref{fig:tikzpic}. -% -% \begin{exfig} -% \begin{verbatim} -% \documentclass{standalone} -% \usepackage{tikz} -% \usetikzpackage{...} -% \begin{document} -% \begin{tikzpicture} -% ... -% \end{tikzpicture} -% \end{document} -% \end{verbatim} -% \caption{A Standalone TIKZ Picture File}\label{fig:tikzpic} -% \end{exfig} -% \end{omgroup} -% \end{omgroup} -% -% The |standalone| class is a minimal {\LaTeX} class that when loaded in a document that -% uses the |standalone| package: the preamble and the |document| environment are -% disregarded during loading, so they do not pose any problems. In effect, an |\input| of -% the file in Figure~\ref{fig:tikzpic} only sees the |tikzpicture| environment, but the -% file itself is standalone in the sense that we can run {\LaTeX} over it separately, -% e.g. for generating an image file from it. -% -% This is exactly where the |tikzinput| package comes in: it supplies the -% \DescribeMacro{\tikzinput}|\tikzinput| macro, which -- depending on the |image| option -% -- either directly inputs the TIKZ picture (source) or tries to load an image file -% generated from it. -% -% Concretely, if the |image| option is not set for the |tikzinput| package, then -% |\tikzinput[|\meta{opt}|]{|\meta{file}|}| disregards the optional argument \meta{opt} -% and inputs \meta{file}|.tex| via |\input| and resizes it to as specified in the |width| -% and |height| keys. If it is, |\tikzinput[|\meta{opt}|]{|\meta{file}|}| expands to -% |\includegraphics[|\meta{opt}|]{|\meta{file}|}|. -% -% \begin{omgroup}{Limitations}\label{sec:limitations} -% -% In this section we document known limitations. If you want to help alleviate them, -% please feel free to contact the package author. Some of them are currently discussed in -% the \sTeX GitHub repository~\cite{sTeX:github:on}. -% \begin{enumerate} -% \item We only listen to the |width| and |height| keys in the tikz case, the others are -% disregarded. -% \end{enumerate} -% \end{omgroup} -% -% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography}\newpage -% -% \begin{omgroup}[id=sec:impl]{Implementation} -% -% \begin{omgroup}{Package Options and Required Packages} -% -% We define a new switch \DescribeMacro{\iftikzinput@image}|\iftikzinput@image| and the -% |image| option. Apart from that we accept all options that might come our -% way.\ednote{MK: Actually we would have liked to pass all options to TIKZ, but that -% does not work, since that is specific about its options.} -% \begin{macrocode} -%<*package> -\newif\if@tikzinput@mh@\@tikzinput@mh@false -\DeclareOption{mh}{\@tikzinput@mh@true} -\newif\iftikzinput@image\tikzinput@imagefalse -\DeclareOption{image}{\tikzinput@imagetrue} -\DeclareOption*{} -\ProcessOptions -% \end{macrocode} -% Next we require the packages we need, in the |image| case, we have to also provide -% ``empty'' versions of some TIKZ macros and environments that do not get defined as the -% |tikz| package is not loaded. -% \begin{macrocode} -\if@tikzinput@mh@\RequirePackage{tikzinput-mh}\fi -\iftikzinput@image -\RequirePackage{graphicx} -\providecommand\usetikzlibrary[1]{} -\else -\RequirePackage{tikz} -\RequirePackage{standalone} -\fi -% \end{macrocode} -% \end{omgroup} -% -% \begin{omgroup}{Inputting Standalone TIKZ Pictures} -% -% \begin{macro}{\tikzinput} -% Depending on the |image| option, we do the necessary things: either we default to the -% image, or we input the tikz file and resize it according to the |width| and |height| -% keys present. -% \begin{macrocode} -\iftikzinput@image -\newcommand\tikzinput[2][]{\includegraphics[#1]{#2}} -\else -\newcommand\tikzinput[2][]{\setkeys{Gin}{#1}% -\ifx\Gin@ewidth\Gin@exclamation -\ifx\Gin@eheight\Gin@exclamation\input{#2}\else\resizebox{!}{\Gin@eheight}{\input{#2}}\fi -\else -\ifx\Gin@eheight\Gin@exclamation\resizebox{\Gin@ewidth}{!}{\input{#2}} -\else\resizebox{\Gin@ewidth}{\Gin@eheight}{\input{#2}}\fi -\fi} -\fi -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\*tikzinput} -% The variants we define in terms of |\tikzinput|. -% \begin{macrocode} -\newcommand\ctikzinput[2][]{\begin{center}\tikzinput[#1]{#2}\end{center}} -%</package> -% \end{macrocode} -% \end{macro} -% \end{omgroup} -% \end{omgroup} -% -% \Finale -% \endinput -% Local Variables: -% mode: doctex -% TeX-master: t -% End: - -% LocalWords: iffalse NeedsTeXFormat tikzinput tikzinput.dtx omdoc latexml texttt tikz -% LocalWords: maketitle externalize newpage tableofcontents newpage omgroup behavior -% LocalWords: graphicx externalized tikzpic exfig compactenum printbibliography impl -% LocalWords: ltxml iftikzinput@image iftikzinput@image ednote newif etoolbox doctex -% LocalWords: includegraphics providecommand usetikzlibrary ctikzinput diff --git a/macros/latex/contrib/stex/sty/tikzinput/tikzinput.ins b/macros/latex/contrib/stex/sty/tikzinput/tikzinput.ins deleted file mode 100644 index 1af5cf8d0a..0000000000 --- a/macros/latex/contrib/stex/sty/tikzinput/tikzinput.ins +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% This file generates files required to use the ed package. -%% At your command prompt write -%% -%% latex tikzinput.ins -%% -%% Copyright(c) 2008 Michael Kohlhase -%% The development version of this file can be found at -%% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/tikzinput/tikzinput.ins $ -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{tikzinput.sty}{\from{tikzinput.dtx}{package}}} - -\Msg{*} -\Msg{* You probably need to move the file tikzinput.sty into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/tikzinput/tikzinput.pdf b/macros/latex/contrib/stex/sty/tikzinput/tikzinput.pdf Binary files differdeleted file mode 100644 index 9fc656381d..0000000000 --- a/macros/latex/contrib/stex/sty/tikzinput/tikzinput.pdf +++ /dev/null diff --git a/macros/latex/contrib/stex/sty/workaddress/README b/macros/latex/contrib/stex/sty/workaddress/README deleted file mode 100644 index f21270b169..0000000000 --- a/macros/latex/contrib/stex/sty/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/macros/latex/contrib/stex/sty/workaddress/workaddress.dtx b/macros/latex/contrib/stex/sty/workaddress/workaddress.dtx deleted file mode 100644 index e3cb1f717e..0000000000 --- a/macros/latex/contrib/stex/sty/workaddress/workaddress.dtx +++ /dev/null @@ -1,478 +0,0 @@ -% \iffalse meta-comment -% An Infrastructure for managing addresses and affiliations in LaTeX -% Copyright (c) 2011 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% The original of this file is in the public repository at -% http://github.com/KWARC/sTeX/ -% \fi -% -% \iffalse -%<*package> -\NeedsTeXFormat{LaTeX2e}[1999/12/01] -\ProvidesPackage{workaddress}[2019/03/20 v0.5 WorkAddress] -%</package> -%<*driver> -\documentclass{ltxdoc} -\usepackage[utf8]{inputenc} -\usepackage{workaddress,sref,url,array,float} -\usepackage[show]{ed} -\usepackage[hyperref=auto,style=alphabetic]{biblatex} -\addbibresource{kwarcpubs.bib} -\addbibresource{extpubs.bib} -\addbibresource{kwarccrossrefs.bib} -\addbibresource{extcrossrefs.bib} -\usepackage{ctangit} -\usepackage{hyperref} -\usepackage{stex-logo} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\WAperson[id=jdoe,affiliation=dfki,department=skss, - url=http://dfki.de/jdoe] - {John Doe} -\WAperson[id=miko,affiliation=jacu,department=case, - url=http://kwarc.info/kohlhase] - {Michael Kohlhase} -\WAinstitution[id=case,acronym=CASE, - url=http://jacobs-university.de/ses/case,partof=jacu] - {Center for Advanced Systems Engineering} -\WAinstitution[id=jacu,url=http://jacobs-university.de,shortname=Jacobs University,acronym=JU] - {Jacobs University Bremen} -\WAinstitution[id=skss,url=http://dfki.de/sks,partof=dfki,acronym=SKS,] - {Safe and Secure Cognitive Systems} -\WAinstitution[id=dfki,url=http://dfki.de,acronym=DFKI,shortname=DFKI] - {German Research Center for Artificial Intelligence} -\def\githubissue#1{\cite{sTeX:github:on}, \hyperlink{https://github.com/KWARC/sTeX/issues/#1}{issue #1}} -\begin{document} -\RecordChanges -\DocInput{workaddress.dtx} -\end{document} -%</driver> -% \fi -% -%\CheckSum{334} -% -% \changes{v0.4}{2011/11/04}{Extracting from dcm.sty} -% \changes{v0.4}{2012/01/18}{new functionality for logos} -% \changes{v0.5}{2016/07/06}{giving \texttt{\textbackslash wp@ref} a first argument for errors} -% -% \GetFileInfo{workaddress.sty} -% -% \MakeShortVerb{\|} -% \def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} -% \def\latexml{\scsys{LaTeXML}} -% -% \title{{\texttt{workaddress.sty}}: An Infrastructure for managing Addresses and -% Affiliations in {\LaTeX}\thanks{Version {\fileversion} (last revised {\filedate})}} -% \author{\WAauthorblock[aff,url]{miko,jdoe}} -% \maketitle -% \begin{abstract}The |workaddress| package allows manage addresses and Affiliations in -% a bib\TeX-like manner.\ednote{continue} -% \end{abstract} -% -% \setcounter{tocdepth}{2}\tableofcontents\newpage -% -% \section{Introduction}\label{sec:intro} -% -% The |workaddress| package allows manage Addresses and affiliations of persons in a -% bib\TeX-like manner.\ednote{continue} -% -% \section{The User Interface}\label{sec:user} -% -% \subsection{Package Options}\label{sec:user.options} -% -% The |workaddress| package takes a single option: \DescribeMacro{showmeta}|showmeta|. If -% this is set, then the metadata keys are shown (see~\cite{Kohlhase:metakeys:ctan} for -% details and customization options). -% -% \subsection{Database Entries for Persons} -% -% The |workaddress| package recognizes that from a metadata perspective, persons are complex -% entities. In particular, specifying metadata is a tedious and repetitive task that leads -% to embarrassing errors. Therefore the |workaddress| package takes a hint from bibTeX and allows -% to specify personal metadata in a database and use it by a database key. -% \begin{exfig}[ht] -% \begin{verbatim} -% \WAperson[id=jdoe,affiliation=dfki,department=skss, -% url=http://dfki.de/jdoe] -% {John Doe} -% \WAperson[id=miko,affiliation=jacu,department=case, -% url=http://kwarc.info/kohlhase] -% {Michael Kohlhase} -% \end{verbatim} -% \caption{A small database of Persons} -% \label{fig:persons} -% \end{exfig} -% The \DescribeMacro{\WAperson}|\WAperson| macro allows to specify personal metadata\ednote{This -% should be synchronized with the FOAF specification~\cite{FOAF:spec}} with the following -% keys: -% \begin{center} -% \begin{tabular}{|l|l|l|}\hline -% key & value & comment\\\hline\hline -% id & string & identifier of this person\\\hline -% birthdate & date & birthdate \\\hline -% email & & the primary e-mail address\\\hline -% url & URI & primary home page \\\hline -% affiliation & Inst. identifier & the primary professional affiliation\\\hline -% personaltitle & string & the personal title e.g. {\texttt{King}}\\\hline -% academictitle & string & the academic title e.g. {\texttt{Prof. Dr.}}\\\hline -% department & Inst. identifier & the department specified in the work address\\\hline -% workaddress & long string & the work address \\\hline -% privaddress & long string & the private address \\\hline -% worktel & string & work telephone number \\\hline -% privtel & string & private telephone number\\\hline -% workfax & string & work fax number \\\hline -% privfax & string & private fax number \\\hline -% worktelfax & string & if the phone and fax share a prefix, give this as well \\\hline -% privtelfax & string & dito\\\hline -% \end{tabular} -% \end{center} -% In Figure~\ref{fig:persons} we have specified (minimal) metadata for the authors of the -% |workaddress| package. The metadata can be accessed by specifying the identifiers (given by the -% |id| key) in the |workaddress| macros defined below, see for instance the |\WAcreators| macro -% in Figure~\ref{fig:workaddressblock}, which leads to the title block of this note. -% -% Like in bibTeX~\cite{Patashnik:b88}, it is a good idea to collect the metadata in a separate -% file that is input in the document. In practice it may be possible to generate these -% files from conventional address databases. -% -% \subsection{Institutions} -% -% Institutions are treated analogously to persons. -% \begin{exfig}[ht] -% \begin{verbatim} -% \WAinstitution[id=case,partof=jacu,acronym=CASE, -% url=http://jacobs-university.de/ses/case] -% {Center for Advanced Systems Engineering} -% \WAinstitution[id=jacu,url=http://jacobs-university.de] -% {Jacobs University Bremen} -% \WAinstitution[id=skss,partof=dfki,url=http://dfki.de/sks,acronym=SKS] -% {Safe and Secure Cognitive Systems} -% \WAinstitution[id=dfki,url=http://dfki.de,shortname=DFKI,acronym=DFKI] -% {German Research Center for Artificial Intelligence} -% \end{verbatim} -% \caption{A small Database of Institutions and their Parts} -% \label{fig:institutions} -% \end{exfig} -% The \DescribeMacro{\WAinstitution}|\WAinstitution| macro allows to specify personal -% metadata\ednote{This should be synchronized with the FOAF -% specification~\cite{FOAF:spec}} with the following keys: -% \begin{center} -% \begin{tabular}{|l|l|l|}\hline -% key & value & comment\\\hline\hline -% id & string & identifier of this person\\\hline -% url & URI & primary home page \\\hline -% partof & Inst. identifier & parent institution\\\hline -% \end{tabular} -% \end{center} -% -% \subsection{Applications}\label{sec:user.appl} -% -% The data from the address database can be used in various ways. For instance, the -% \DescribeMacro{\WAauthorblock}|\WAauthorblock| macro creates a block of users and their -% affiliations. In the context of the database from Figures~\ref{fig:persons} -% and~\ref{fig:institutions}, |\WAauthorblock{miko,jdoe}| creates -% \begin{center}\WAauthorblock{miko,jdoe}\end{center} -% -% \DescribeMacro{\wa@institution@logo}|\wa@institution@logo| creates the logo of an -% institution from the database, and (if that is not there create a box and a message -% instead.) -% -% \section{Limitations}\label{sec:limitations} -% -% In this section we document known limitations. If you want to help alleviate them, -% please feel free to contact the package author. Some of them are currently discussed in -% the \sTeX GitHub repository~\cite{sTeX:github:on}. -% \begin{enumerate} -% \item none reported yet -% \end{enumerate} -% -% \StopEventually{\printbibliography} -% -% \section{The Implementation}\label{sec:impl} -% -% \subsection{Package Options}\label{sec:impl.options} -% The first step is to declare (a few) package options that handle whether certain -% information is printed or not. They all come with their own conditionals that are set by -% the options. -% -% \begin{macrocode} -%<*package> -\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{sref}} -\ProcessOptions -% \end{macrocode} -% -% The first measure is to ensure that the |KeyVal| package is loaded (in the right -% version). For {\latexml} we also initialize the package inclusions. -% \begin{macrocode} -\RequirePackage{sref} -% \end{macrocode} -% -% \subsection{Persons} -% -% To implement the |\WAperson| macro, we need to implement its keywords. -% -% \begin{macrocode} -\addmetakey*{wa@person}{id} -\addmetakey*{wa@person}{birthdate} -\addmetakey*{wa@person}{email} -\addmetakey*{wa@person}{url} -\addmetakey*{wa@person}{affiliation} -\addmetakey*{wa@person}{personaltitle} -\addmetakey*{wa@person}{academictitle} -\addmetakey*{wa@person}{department} -\addmetakey*{wa@person}{workaddress} -\addmetakey*{wa@person}{privaddress} -\addmetakey*{wa@person}{worktel} -\addmetakey*{wa@person}{privtel} -\addmetakey*{wa@person}{workfax} -\addmetakey*{wa@person}{privfax} -\addmetakey*{wa@person}{worktelfax} -\addmetakey*{wa@person}{privtelfax} -% \end{macrocode} -% -% \begin{macro}{\wa@def} -% The next macro is an auxiliary one that puts the value into an appropriate token -% register. -% \begin{macrocode} -\def\wa@def#1#2#3#4{\expandafter\xdef\csname wa@#1@#2@#3\endcsname{#4}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\wa@ref} -% This macro looks up the information specified in the three last arguments. The first -% argument determines the behavior if that information is undefined: |\wa@ref0| fails -% silently (no output, no message), |\waref1| raises a warning but outputs nothing, and -% |\wa@ref2{|\meta{a}|}{|\meta{b}|}{|\meta{c}|}| raises a warning and outputs -% |?|\meta{a}|?|\meta{b}|?|\meta{b}|?|, Finally |\wa@ref3| gives an error and aborts. -% \begin{macrocode} -\newcommand\wa@ref[4]{% - \@ifundefined{wa@#2@#3@#4}{% - \ifcase#1 {}\or% - \PackageWarning{workaddress}{reference to undefined #4 of #2 #3\MessageBreak% - you must define a #2 with #3=#4\MessageBreak% - via the macro \protect\WA#2, before you can use it!}% - \or - \PackageWarning{workaddress}{reference to undefined #4 of #2 #3\MessageBreak% - you must define a #2 with #3=#4\MessageBreak% - via the macro \protect\WA#2, before you can use it!}% - ?#2?#3?#4? - \or - \PackageError{workaddress}{reference to undefined #4 of #2 #3}% - {you must define a #2 with #3=#4\MessageBreak% - via the macro \protect\WA#2, before you can use it!} - \else\PackageError{workaddress}{\protect\wa@ref#1 not defined}{} - \fi - }{\csname wa@#2@#3@#4\endcsname}}% -% \end{macrocode} -% \end{macro} -% -% With this we can define the |\WAperson| macro, it just clears the keys, sets them -% again, and stores them in token registers. If course only if a |id| attribute is given, -% else we raise an error. -% -% \begin{macro}{WAperson} -% \begin{macrocode} -\let\wa@persons=\relax -\newcommand\WAperson[2][]{% - \metasetkeys{wa@person}{#1}% - \ifx\wa@person@id\@empty% - \PackageWarning{workaddress}{key 'id' undefined in WAperson}% - \else% - \wa@def{person}\wa@person@id{id}{\wa@person@id}% redundant, but useful for checking - \wa@def{person}\wa@person@id{name}{#2} - \wa@def{person}\wa@person@id{email}{\wa@person@email} - \wa@def{person}\wa@person@id{birthdate}{\wa@person@birthdate} - \wa@def{person}\wa@person@id{url}{\wa@person@url} - \wa@def{person}\wa@person@id{affiliation}{\wa@person@affiliation} - \wa@def{person}\wa@person@id{workaddress}{\wa@person@workaddress} - \wa@def{person}\wa@person@id{privaddress}{\wa@person@privaddress} - \wa@def{person}\wa@person@id{personaltitle}{\wa@person@personaltitle} - \wa@def{person}\wa@person@id{academictitle}{\wa@person@academictitle} - \wa@def{person}\wa@person@id{department}{\wa@person@department} - \wa@def{person}\wa@person@id{workaddress}{\wa@person@workaddress} - \wa@def{person}\wa@person@id{privaddress}{\wa@person@privaddress} - \wa@def{person}\wa@person@id{worktel}{\wa@person@worktel} - \wa@def{person}\wa@person@id{privtel}{\wa@person@privtel} - \wa@def{person}\wa@person@id{workfax}{\wa@person@workfax} - \wa@def{person}\wa@person@id{privfax}{\wa@person@privfax} - \wa@def{person}\wa@person@id{worktelfax}{\wa@person@worktelfax} - \wa@def{person}\wa@person@id{privtelfax}{\wa@person@privtelfax} - \@ifundefined{wa@persons}{% - \xdef\wa@persons{\wa@person@id}% - }{% - \xdef\wa@persons{\wa@persons,\wa@person@id}% - }% - \fi% -}% -\newcommand\DCMperson[2][]{% - \WAperson[#1]{#2}% - \PackageWarning{workaddress}{\protect\DCMperson\space is deprecated, use \protect\WAperson\space instead} -}% -% \end{macrocode} -% \end{macro} -% -% \subsection{Institutions} -% -% To implement the |\WAinstitution| macro, we need to implement its keywords first. -% -% \begin{macrocode} -\addmetakey*{wa@institution}{id} -\addmetakey*{wa@institution}{shortname} -\addmetakey*{wa@institution}{acronym} -\addmetakey*{wa@institution}{url} -\addmetakey*{wa@institution}{partof} -\addmetakey*{wa@institution}{countryshort} -\addmetakey*{wa@institution}{logo} -\addmetakey*{wa@institution}{streetaddress} -\addmetakey*{wa@institution}{townzip} -\addmetakey*{wa@institution}{type} -\addmetakey*{wa@institution}{country} -% \end{macrocode} -% and we proceed as for |\WAperson|, -% \begin{macrocode} -\let\wa@institutions=\relax -% \end{macrocode} -% -% \begin{macro}{WAinstitution} -% \begin{macrocode} -\newcommand\WAinstitution[2][]{% - \metasetkeys{wa@institution}{#1}% - \ifx\wa@institution@id\@empty% - \PackageWarning{workaddress}{key 'id' undefined in WAinstitution}% - \else% - \wa@def{institution}\wa@institution@id{id}{\wa@institution@id}% redundant, but useful for checking - \wa@def{institution}\wa@institution@id{name}{#2} - \wa@def{institution}\wa@institution@id{shortname}{\wa@institution@shortname} - \wa@def{institution}\wa@institution@id{acronym}{\wa@institution@acronym} - \wa@def{institution}\wa@institution@id{url}{\wa@institution@url} - \wa@def{institution}\wa@institution@id{partof}{\wa@institution@partof} - \wa@def{institution}\wa@institution@id{countryshort}{\wa@institution@countryshort} - \wa@def{institution}\wa@institution@id{logo}{\wa@institution@logo} - \wa@def{institution}\wa@institution@id{townzip}{\wa@institution@townzip} - \wa@def{institution}\wa@institution@id{streetaddress}{\wa@institution@streetaddress} - \wa@def{institution}\wa@institution@id{country}{\wa@institution@country} - \wa@def{institution}\wa@institution@id{type}{\wa@institution@type} - \@ifundefined{wa@institutions}{% - \xdef\wa@institutions{\wa@institution@id}% - }{% - \xdef\wa@institutions{\wa@institutions,\wa@institution@id}% - }% - \fi% -}% -\newcommand\DCMinstitution[2][]{% - \WAinstitution[#1]{#2}% - \PackageWarning{workaddress}{\protect\DCMinstitution\space is deprecated, use \protect\WAinstitution\space instead}% -}% -% \end{macrocode} -% \end{macro} -% -%\subsection{Applications}\label{sec:impl.appl} -% -% \begin{macro}{\WAauthorblock} -% This internal macro builds an author block from a list of |\WAperson| labels in -% |\wa@creators|. -% \begin{macrocode} -\addmetakey[false]{WAauthorblock}{dept}[true] -\addmetakey[false]{WAauthorblock}{aff}[true] -\addmetakey[false]{WAauthorblock}{url}[true] -\def\@true{true} -\newcounter{authors} -\newcommand\WAauthorblock[2][]{% - \metasetkeys{WAauthorblock}{#1} - {\let\tabularnewline\relax - \@for\@I:=#2\do{\stepcounter{authors}} - \def\@authors{}% - \def\@affs{}% - \def\@depts{}% - \def\@urls{}% - \@for\@I:=#2\do{% - \xdef\@authors{\@authors&\wa@ref2{person}\@I{name}} - \xdef\@@dept{\wa@ref1{person}\@I{department}} - \xdef\@shortname{\csname wa@institution@\@@dept @shortname\endcsname} - \xdef\@dept{\ifx\@shortname\@empty\wa@ref0{institution}\@@dept{name}\else\@shortname\fi} - \xdef\@depts{\@depts&\@dept} - \xdef\@@aff{\wa@ref0{person}\@I{affiliation}} - \xdef\@shortname{\csname wa@institution@\@@aff @shortname\endcsname} - \xdef\@aff{\ifx\@shortname\@empty\wa@ref0{institution}\@@aff{name}\else\@shortname\fi} - \xdef\@affs{\@affs&\@aff} - \xdef\@urls{\@urls&\wa@ref0{person}\@I{url}} - }% - \message{\theauthors authors: \@authors}% - }% - \begin{tabular}[t]{l*{\theauthors}{c}} - \@authors\\ - \ifx\WAauthorblock@dept\@true\@depts\\\fi - \ifx\WAauthorblock@aff\@true\@affs\\\fi - \ifx\WAauthorblock@url\@true\@urls\\\fi - \end{tabular} -}% -% \begin{macrocode} -% \end{macro} -% -% \begin{macro}{\wapname} -% \begin{macrocode} -\newcommand\wapname[1]{\wa@ref3{person}{#1}{name}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\waptname} -% \begin{macrocode} -\newcommand\waptname[1]{\wa@ref3{person}{#1}{personaltitle} \wa@ref3{person}{#1}{name}} -% \end{macrocode} -% \end{macro} -% -% \begin{macro}{\wa@institution@logo} -% \begin{macrocode} -\newcommand\wa@institution@logo[2][]{% - \IfFileExists{\wa@ref2{institution}{#2}{logo}}{% - \includegraphics{\wa@ref2{institution}{#2}{logo}}% - }{% - \fbox{#2 logo}\message{still need logo for #2}% - }% -}% -%</package> -% \end{macrocode} -% \end{macro} -% -% \Finale -\endinput -% \iffalse -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: -% \fi - -% LocalWords: RequirePackage birthdate personaltitle academictitle workaddress -% LocalWords: privaddress worktel privtel workfax privfax worktelfax noDelim -% LocalWords: privtelfax getKeyValue valuelist ToString getValue affill STDERR -% LocalWords: ExportMetadata AssignValue WAperson DefConstructor afterDigest -% LocalWords: getArg setValue FishOutMetadata keyvals foreach idlist tabline -% LocalWords: LookupValue insertElement atabline bitabline shorttitle nc args -% LocalWords: sharealike noderivativeworks DefMacro authorblock subsubsection -% LocalWords: contribs OptionalKeyVals omgroup omdoc srcref xml RawTeX partof -% LocalWords: openElement iffalse kohlhase Thu scsys sc sc latexml -% LocalWords: maketitle WAtitle texttt fileversion WAcreators miko jdoe impl -% LocalWords: WAabstract setcounter tocdepth tableofcontents newpage dmt03 -% LocalWords: WAsection ednote WAsubsection exfig hline dcmblock Patashnik -% LocalWords: DescribeEnv WAcontributors WAshorttitle WAshorttitle WAdate -% LocalWords: WAsubject WAsubject WAdescription WAdescription WApublisher -% LocalWords: WApublisher WAdate WAtype WAtype WAidentifier WAidentifier -% LocalWords: WAsource WAsource WAlanguage WAlanguage WArelation ctancite -% LocalWords: WArelation WArights WArights WAlicense WAlicense titlepage -% LocalWords: WAlicensenotice WAlicensenotice WAcopyrightnotice titlepage -% LocalWords: WAcopyrightnotice WAcclicense WAcclicense user.blockstyles -% LocalWords: WAchapter WAchatper WAsubsubsection WAsubsubsection ltxml -% LocalWords: user.conig makeatletter printbibliography expandafter showmeta -% LocalWords: xdef csname endcsname newcommand ifx ifundefined affs showmeta -% LocalWords: Semiverbatim whatsit newenvironment mtabline providecommand vfil -% LocalWords: WAsubtitle cclicense defdcm impl.blockstyles newcounter vskip -% LocalWords: stepcounter tabularnewline theauthors lineskip textbf noindent -% LocalWords: omd omd srefaddidkey thechapter autoclose thesection ifnum ifnum -% LocalWords: thesubsection thesubsubsection WAparagraph ISOtimestamp doctex -% LocalWords: WAinstitution WAinstitution compactenum textsf langle textsf -% LocalWords: langle metakeys addmetakey metasetkeys countryshort townzip aff -% LocalWords: streetaddress depts diff --git a/macros/latex/contrib/stex/sty/workaddress/workaddress.ins b/macros/latex/contrib/stex/sty/workaddress/workaddress.ins deleted file mode 100644 index 3f2a947259..0000000000 --- a/macros/latex/contrib/stex/sty/workaddress/workaddress.ins +++ /dev/null @@ -1,32 +0,0 @@ -%% -%% This file generates files required to use the ed package. -%% At your command prompt write -%% -%% latex workaddress.ins -%% -%% Copyright(c) 2008 Michael Kohlhase -%% The development version of this file can be found at -%% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/workaddress/workaddress.ins $ -%% -%% This file is distributed under the terms of the LaTeX Project Public -%% License from CTAN archives in directory macros/latex/base/lppl.txt. -%% Either version 1.0 or, at your option, any later version. -%% -\input docstrip -\preamble -\endpreamble - -%\usedir{tex/latex/listings} -\keepsilent -\askforoverwritefalse - -% generate base package -\generate{\file{workaddress.sty}{\from{workaddress.dtx}{package}}} - -\Msg{*} -\Msg{* You probably need to move the file workaddress.sty into a directory searched by TeX.} -\Msg{*} -\Msg{* And don't forget to refresh your filename database} -\Msg{* if your TeX distribution uses such a database.} -\Msg{*} -\endbatchfile diff --git a/macros/latex/contrib/stex/sty/workaddress/workaddress.pdf b/macros/latex/contrib/stex/sty/workaddress/workaddress.pdf Binary files differdeleted file mode 100644 index 3a8d073de3..0000000000 --- a/macros/latex/contrib/stex/sty/workaddress/workaddress.pdf +++ /dev/null |