summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/stex/sty/smultiling/smultiling.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/stex/sty/smultiling/smultiling.dtx')
-rw-r--r--macros/latex/contrib/stex/sty/smultiling/smultiling.dtx599
1 files changed, 0 insertions, 599 deletions
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