diff options
author | Karl Berry <karl@freefriends.org> | 2016-04-07 20:49:10 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-04-07 20:49:10 +0000 |
commit | ddfe3a4eaf95167482e923d4da3de2917a7dbfbb (patch) | |
tree | 0acc1bb60b37392451f5e79e00c33c487c19abcf /Master/texmf-dist/source/latex/stex/omdoc | |
parent | a04ae5a947a6b06bc717719f6ad63e6de5cb5af6 (diff) |
stex (7apr16)
git-svn-id: svn://tug.org/texlive/trunk@40320 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/stex/omdoc')
-rw-r--r-- | Master/texmf-dist/source/latex/stex/omdoc/omdoc.dtx | 791 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/stex/omdoc/omdoc.ins | 9 |
2 files changed, 356 insertions, 444 deletions
diff --git a/Master/texmf-dist/source/latex/stex/omdoc/omdoc.dtx b/Master/texmf-dist/source/latex/stex/omdoc/omdoc.dtx index cc6166803db..57bbdf2e3a5 100644 --- a/Master/texmf-dist/source/latex/stex/omdoc/omdoc.dtx +++ b/Master/texmf-dist/source/latex/stex/omdoc/omdoc.dtx @@ -1,41 +1,40 @@ % \iffalse meta-comment % A LaTeX Class and Package for OMDoc Document Structures -% Copyright (c) 2009 Michael Kohlhase, all rights reserved +% Copyright (c) 2016 Michael Kohlhase, all rights reserved % this file is released under the % LaTeX Project Public License (LPPL) % -% The development version of this file can be found at -% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/omdoc/omdoc.dtx $ +% 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}[2012/01/28 v1.0 OMDoc document Structure] -%<cls>\ProvidesClass{omdoc}[2012/01/28 v1.0 OMDoc Documents] +%<package>\ProvidesPackage{omdoc}[2016/04/07 v1.2 OMDoc document Structure] +%<cls>\ProvidesClass{omdoc}[2016/04/07 v1.2 OMDoc Documents] % %<*driver> \documentclass{ltxdoc} \usepackage{url,array,omdoc,omtext,float} \usepackage[show]{ed} \usepackage[hyperref=auto,style=alphabetic]{biblatex} -\bibliography{kwarc} -\usepackage[eso-foot,today]{svninfo} -\svnInfo $Id: omdoc.dtx 1999 2012-01-28 07:32:11Z kohlhase $ -\svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/omdoc/omdoc.dtx $ +\addbibresource{kwarcpubs.bib} +\addbibresource{extpubs.bib} +\addbibresource{kwarccrossrefs.bib} +\addbibresource{extcrossrefs.bib} \usepackage{stex-logo} -\usepackage{../ctansvn} +\usepackage{ctangit} \usepackage{hyperref} \makeindex \floatstyle{boxed} \newfloat{exfig}{thp}{lop} \floatname{exfig}{Example} -\def\tracissue#1{\cite{sTeX:online}, \hyperlink{http://trac.kwarc.info/sTeX/ticket/#1}{issue #1}} \begin{document}\DocInput{omdoc.dtx}\end{document} %</driver> % \fi % -%\CheckSum{364} -% +%\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} @@ -43,16 +42,17 @@ % \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} % % -% \GetFileInfo{omdoc.sty} -% % \MakeShortVerb{\|} % % \def\omdoc{OMDoc} % \def\latexml{{\LaTeX}ML} -% \title{{\texttt{omdoc.sty/cls}}: Semantic Markup for Open Mathematical Documents in {\LaTeX}\thanks{Version {\fileversion} (last revised -% {\filedate})}} +% \title{{\texttt{omdoc.sty/cls}}: Semantic Markup for Open Mathematical Documents in {\LaTeX}} % \author{Michael Kohlhase\\ % Jacobs University, Bremen\\ % \url{http://kwarc.info/kohlhase}} @@ -75,6 +75,11 @@ %\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 @@ -84,47 +89,46 @@ % translation. Currently, trans-document referencing provided by this package can only % be used in the {\sTeX} collection. % -% {\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} -% % 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{talk -% about the advantages and give an example.}\ednote{is there a way to load documents at -% URIs in LaTeX?}\ednote{integrate with latexml's XMRef in the Math mode.} +% 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 four files: |omdoc.cls|, |omdoc.sty| and their {\latexml} -% bindings |omdoc.cls.ltxml| and |omdoc.sty.ltxml|. We keep the corresponding code -% fragments together, since the documentation applies to both of them and to prevent them -% from getting out of sync. The {\omdoc} class is a minimally changed variant of the -% standard |article| class that includes the functionality provided by |omdoc.sty|. Most -% importantly, |omdoc.cls| sets up the {\latexml} infrastructure and thus should be used -% if {\omdoc} is to be generated from the {\sTeX} sources. The rest of the documentation -% pertains to the functionality introduced by |omdoc.sty|. +% 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} % -% |omdoc.sty| has the \DescribeMacro{noindex}|noindex| package option, which allows to -% suppress the creation of index entries. The \DescribeMacro{extrefs} option can be set -% to activate multifile support, see~\ctancite{Kohlhase:sref} for details. -% -% |omdoc.cls| accepts all options of the |omdoc.sty| (see~\sref{sec:user:options}) and -% |article.cls| and just passes them on to these. \ednote{describe them} +% The |omdoc| package and class accept the following options: +% \begin{center} +% \begin{tabular}{|l|l|}\hline +% \texttt{report} & load |report.cls| instead of |article.cls|\\\hline +% \texttt{book} & load |book.cls| instead of |article.cls|\\\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 +% \end{tabular} +% \end{center} % \end{omgroup} % % \begin{omgroup}[id=sec:user:struct]{Document Structure} % -% The top-level \DescribeEnv{document}|document| environment is augmented with an -% optional key/value argument that 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 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. % -% \DescribeEnv{omgroup} The structure of the document is given by the |omgroup| +% 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 @@ -133,11 +137,67 @@ % \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. +% \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{compactitem} +% \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{compactitem} +% \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 +% The \DescribeMacro{\currentsectionlevel}|\currentsectionlevel| macro supplies the name % of the current sectioning level, e.g. ``chapter'', or -% ``subsection''. \DescribeMacro{CurrentSectionLevel}|\CurrentSectionLevel| is the +% ``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. @@ -166,14 +226,16 @@ % % 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{label}|, which expands to the previously stored -% content. -% -% \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{make an example} +% \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:colors]{Colors} @@ -187,20 +249,19 @@ % \end{omgroup} % \end{omgroup} % -% \begin{omgroup}[id=sec:user:misc]{Miscellaneous} -% \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 TRAC~\cite{sTeX:online}. +% the \sTeX GitHub repository~\cite{sTeX:github:on}. % \begin{compactenum} -% \item none reported yet +% \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{compactenum} % \end{omgroup} % -% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography}\newpage +% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\newpage\printbibliography}\newpage % % \begin{omgroup}[id=sec:impl:cls]{Implementation: The OMDoc Class} % @@ -208,98 +269,41 @@ % |document| environment and the |omdoc| element corresponds to it, whereas the % package provides the concrete functionality. % -% |omdoc.dtx| generates four files: |omdoc.cls| (all the code between -% {\textsf{$\langle$*cls$\rangle$}} and {\textsf{$\langle$/cls$\rangle$}}), |omdoc.sty| -% (between {\textsf{$\langle$*package$\rangle$}} and -% {\textsf{$\langle$/package$\rangle$}}) and their {\latexml} bindings (between -% {\textsf{$\langle$*ltxml.cls$\rangle$}} and {\textsf{$\langle$/ltxml.cls$\rangle$}} and -% {\textsf{$\langle$*ltxml.sty$\rangle$}} and {\textsf{$\langle$/ltxml.sty$\rangle$ -% respetively}}). We keep the corresponding code fragments together, since the -% documentation applies to both of them and to prevent them from getting out of sync. -% % \begin{omgroup}[id=sec:impl:cls:options]{Class Options} -% To initialize the |omdoc| class, we declare and process the necessary options. +% To initialize the |omdoc| class, we declare and process the necessary options. For +% |omdoc.cls| this is quite simple. We have options |report| and |book|, which set the +% \DescribeMacro{\omdoc@class}|\omdoc@class| macro and pass on the macro to |omdoc.sty| +% for further processing. The |book| option also sets the \DescribeMacro{\ifclass@book} +% conditional to true for the frontmatter handling later. % % \begin{macrocode} %<*cls> -\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} \def\omdoc@class{article} -\DeclareOption{report}{\def\omdoc@class{report}\PassOptionsToPackage{\CurrentOption}{omdoc}} -\DeclareOption{book}{\def\omdoc@class{book}\PassOptionsToPackage{\CurrentOption}{omdoc}} -\DeclareOption{chapter}{\PassOptionsToPackage{\CurrentOption}{omdoc}} -\DeclareOption{part}{\PassOptionsToPackage{\CurrentOption}{omdoc}} -\DeclareOption{showignores}{\PassOptionsToPackage{\CurrentOption}{omdoc}} -\DeclareOption{extrefs}{\PassOptionsToPackage{\CurrentOption}{sref}} -\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} +\DeclareOption{report}{\def\omdoc@class{report}% + \PassOptionsToPackage{\CurrentOption}{omdoc} + \PassOptionsToPackage{\CurrentOption}{stex}} +\newif\ifclass@book\class@bookfalse +\DeclareOption{book}{\def\omdoc@class{book}\class@booktrue% + \PassOptionsToPackage{\CurrentOption}{omdoc} + \PassOptionsToPackage{\CurrentOption}{stex}} +% \end{macrocode} +% the rest of the options are only passed on to |omdoc.sty| and the class selected by the +% first options. +% \begin{macrocode} +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{\omdoc@class} + \PassOptionsToPackage{\CurrentOption}{omdoc} + \PassOptionsToPackage{\CurrentOption}{stex}} \ProcessOptions -%</cls> -%<*ltxml.cls> -# -*- CPERL -*- -package LaTeXML::Package::Pool; -use strict; -use LaTeXML::Package; -use LaTeXML::Util::Pathname; -use Cwd qw(cwd abs_path); -DeclareOption('report',sub {PassOptions('omdoc','sty',ToString(Digest(T_CS('\CurrentOption')))); }); -DeclareOption('book',sub {PassOptions('omdoc','sty',ToString(Digest(T_CS('\CurrentOption')))); }); -DeclareOption('chapter',sub {PassOptions('omdoc','sty',ToString(Digest(T_CS('\CurrentOption')))); }); -DeclareOption('part',sub {PassOptions('omdoc','sty',ToString(Digest(T_CS('\CurrentOption')))); }); -DeclareOption('showignores',sub {PassOptions('omdoc','sty',ToString(Digest(T_CS('\CurrentOption')))); }); -DeclareOption('extrefs',sub {PassOptions('sref','sty',ToString(Digest(T_CS('\CurrentOption')))); }); -DeclareOption(undef,sub {PassOptions('article','cls',ToString(Digest(T_CS('\CurrentOption')))); }); -ProcessOptions(); -%</ltxml.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} -%<*cls> \LoadClass{\omdoc@class} +\RequirePackage{etoolbox} \RequirePackage{omdoc} -%</cls> -%<*ltxml.cls> -LoadClass('article'); -RequirePackage('sref'); -%</ltxml.cls> -% \end{macrocode} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:impl:cls:namespaces]{Setting up Namespaces and Schemata for LaTeXML} -% -% Now, we also need to register the namespace prefixes for {\latexml} to use. -% \begin{macrocode} -%<*ltxml.cls> -RegisterNamespace('omdoc'=>"http://omdoc.org/ns"); -RegisterNamespace('om'=>"http://www.openmath.org/OpenMath"); -RegisterNamespace('m'=>"http://www.w3.org/1998/Math/MathML"); -RegisterNamespace('dc'=>"http://purl.org/dc/elements/1.1/"); -RegisterNamespace('cc'=>"http://creativecommons.org/ns"); -RegisterNamespace('stex'=>"http://kwarc.info/ns/sTeX"); -RegisterNamespace('ltx'=>"http://dlmf.nist.gov/LaTeXML"); -%</ltxml.cls> -% \end{macrocode} -% Since we are dealing with a class, we need to set up the document type in the {\latexml} -% bindings. -% \begin{macrocode} -%<*ltxml.cls> -RelaxNGSchema('omdoc+ltxml', - '#default'=>"http://omdoc.org/ns", - 'om'=>"http://www.openmath.org/OpenMath", - 'm'=>"http://www.w3.org/1998/Math/MathML", - 'dc'=>"http://purl.org/dc/elements/1.1/", - 'cc'=>"http://creativecommons.org/ns", - 'stex'=>"http://kwarc.info/ns/sTeX", - 'ltx'=>"http://dlmf.nist.gov/LaTeXML"); -%</ltxml.cls> -% \end{macrocode} -% Then we load the |omdoc| package, which we define separately in the next section so that -% it can be loaded separately\ednote{reword} -% \begin{macrocode} -%<*ltxml.cls> -RequirePackage('omdoc'); -%</ltxml.cls> +\RequirePackage{stex} % \end{macrocode} % \end{omgroup} % @@ -310,40 +314,14 @@ RequirePackage('omdoc'); % % \begin{environment}{document} % For the moment we do not use them on the {\LaTeX} level, but the document identifier -% is picked up by {\latexml}. +% is picked up by {\latexml}.\ednote{faking documentkeys for now. @HANG, please implement} % \begin{macrocode} -%<*cls> +\srefaddidkey{document} +\newcommand\documentkeys[1]{\metasetkeys{document}{#1}} \let\orig@document=\document \srefaddidkey{document} \renewcommand{\document}[1][]{\metasetkeys{document}{#1}\orig@document} %</cls> -%<*ltxml.cls> -sub xmlBase { - my $baseuri = LookupValue('baseuri'); - my $baselocal = LookupValue('baselocal'); - my $cdir = abs_path(cwd()); - $cdir =~ s/^$baselocal// if $baselocal; - #DG: Make this more robust! - my ($d,$f,$t); - my $srcf = LookupValue('SOURCEFILE'); - if ( $srcf =~ /^(\w+):\/\//) { - $srcf =~ s/^(\w+):\///; - } # TODO: Hacky, do something better - ($d, $f,$t) = pathname_split(LookupValue('SOURCEFILE')); - $t = '' if LookupValue('cooluri'); - Tokenize($baseuri.$cdir.'/'.$f.$t); } -DefEnvironment('{document} OptionalKeyVals:omdoc', - "<omdoc:omdoc " - . "?&KeyVal(#1,'id')(xml:id='&KeyVal(#1,'id')')" - . "(?&Tokenize(&LookupValue('SOURCEBASE'))" - . "(xml:id='&Tokenize(&LookupValue('SOURCEBASE')).omdoc')()) " - . "?&Tokenize(&LookupValue('baseuri'))" - . "(xml:base='&xmlBase()')()>" - . "#body" - ."</omdoc:omdoc>", - beforeDigest=> sub { AssignValue(inPreamble=>0); }, - afterDigest=> sub { $_[0]->getGullet->flush; return; });#$ -%</ltxml.cls> % \end{macrocode} % \end{environment} % \end{omgroup} @@ -352,122 +330,173 @@ DefEnvironment('{document} OptionalKeyVals:omdoc', % \begin{omgroup}[id=sec:impl:sty]{Implementation: OMDoc Package} % % \begin{omgroup}[id=sec:impl:options]{Package Options} -% -% The initial setup for {\latexml}: -% -% \begin{macrocode} -%<*ltxml.sty> -package LaTeXML::Package::Pool; -use strict; -use LaTeXML::Package; -use Cwd qw(cwd abs_path); -%</ltxml.sty> -% \end{macrocode} % -% 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}} +% 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 |report| and |book| options affect the sectioning +% behavior of the |omgroup| environment via the +% \DescribeMacro{\section@level}|\section@level| macro later. % % \begin{macrocode} %<*package> -\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} -\newif\if@chapter\@chapterfalse -\newif\if@part\@partfalse -\newcount\section@level\section@level=3 \newif\ifshow@ignores\show@ignoresfalse -\def\omdoc@class{article} -\DeclareOption{report}{\def\omdoc@class{report}\section@level=2} -\DeclareOption{book}{\def\omdoc@class{book}\section@level=1} -\DeclareOption{chapter}{\section@level=2\@chaptertrue} -\DeclareOption{part}{\section@level=1\@chaptertrue\@parttrue} \DeclareOption{showignores}{\show@ignorestrue} -\DeclareOption{extrefs}{\PassOptionsToPackage{\CurrentOption}{sref}} +\newcount\section@level\section@level=2 +\DeclareOption{report}{\section@level=0} +\DeclareOption{book}{\section@level=0} +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{sref}} \ProcessOptions -%</package> -%<*ltxml.sty> -DeclareOption('report',''); -DeclareOption('book',''); -DeclareOption('chapter',''); -DeclareOption('part',''); -DeclareOption('showignores',''); -DeclareOption('extrefs',''); -%</ltxml.sty> % \end{macrocode} % % Then we need to set up the packages by requiring the |sref| package to be loaded. % % \begin{macrocode} -%<*package> \RequirePackage{sref} \RequirePackage{xspace} \RequirePackage{comment} -%</package> -%<*ltxml.sty> -RequirePackage('sref'); -RequirePackage('xspace'); -RequirePackage('omtext'); -%</ltxml.sty> +\RequirePackage{pathsuris} % \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\ednote{maybe define the toplevel -% according to a param, need to know how to detect that the chapter macro exists.} +% 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} -%<*package> -\def\level@section#1{\ifcase#1\or{part}\or{chapter}\or{section}\or{subsection}\or{subsubsection}\or{paragraph}\or{subparagraph}\fi} -\def\Level@Section#1{\ifcase#1\or{Part}\or{Chapter}\or{Section}\or{Subsection}\or{Subsubsection}\or{Paragraph}\or{Subparagraph}\fi} -\def\in@level@section#1{\ifcase#1\or{this document}\or{part}\or{chapter}\or{section}\or{subsection}\or{subsubsection}\or{paragraph}\or{subparagraph}\fi} -\def\In@Level@Section#1{\ifcase#1\or{This document}\or{Part}\or{Chapter}\or{Section}\or{Subsection}\or{Subsubsection}\or{Paragraph}\or{Subparagraph}\fi} -\def\currentsectionlevel{\in@level@section\section@level\xspace} -\def\CurrentSectionLevel{\In@Level@Section\section@level\xspace} -%</package> -%<*ltxml.sty> -%</ltxml.sty> +\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}{omgroup} -% 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{environment}{blindomgroup} % \begin{macrocode} -%<*package> +\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. +% \begin{macrocode} +\newcommand\omgroup@num[2]{% +\sref@label@id{\omdoc@sect@name~\@nameuse{the#1}}% +\ifx\omgroup@short\@empty\@nameuse{#1}{#2}% +\else\@ifundefined{rdfmeta@sectioning}{\@nameuse{#1}[\omgroup@short]{#2}}% +{\@nameuse{rdfmeta@#1@old}[\omgroup@short]{#2}}% +\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{omgroup} +% \begin{macrocode} +\def\@true{true} +\def\@false{false} \srefaddidkey{omgroup} -\addmetakey{omgroup}{creators} \addmetakey{omgroup}{date} +\addmetakey{omgroup}{creators} \addmetakey{omgroup}{contributors} +\addmetakey{omgroup}{srccite} \addmetakey{omgroup}{type} \addmetakey*{omgroup}{short} \addmetakey*{omgroup}{display} -\def\at@begin@omgroup#1{} +\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@frontmatter\@frontmatterfalse +\newif\if@backmatter\@backmatterfalse +\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} +% \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\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\noindent{\Large\textbf{#2}\\[.3ex]\noindent\ignorespaces}% -\else% -\if@part\ifnum\section@level=1\part{#2}\sref@label@id{Part \thepart}\fi\fi% -\if@chapter\ifnum\section@level=2\chapter{#2}\sref@label@id{Chapter \thechapter}\fi\fi% -\ifnum\section@level=3\section{#2}\sref@label@id{Section \thesection}\fi% -\ifnum\section@level=4\subsection{#2}\sref@label@id{Subsection \thesubsection}\fi% -\ifnum\section@level=5\subsubsection{#2}\sref@label@id{Subsubsection \thesubsubsection}\fi% -\ifnum\section@level=6\paragraph{#2}\sref@label@id{this paragraph}\fi% -\ifnum\section@level=7\subparagraph{#2}\sref@label@id{this subparagraph}\fi% -\at@begin@omgroup\section@level% for customization -\advance\section@level by 1% -\fi}{\advance\section@level by -1} -%</package> -%<*ltxml.sty> -DefEnvironment('{omgroup} OptionalKeyVals:omgroup {}', - "<omdoc:omgroup layout='sectioning'" - . "?&KeyVal(#1,'id')(xml:id='&KeyVal(#1,'id')')()" - . "?&KeyVal(#1,'type')(type='&KeyVal(#1,'type')')()>\n" - . "<dc:title>#2</dc:title>\n" - . "#body\n" - . "</omdoc:omgroup>"); -%</ltxml.sty> +\ifx\omgroup@display\st@flow\@@numfalse\fi +\if@frontmatter\@@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 +\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} % @@ -480,34 +509,42 @@ DefEnvironment('{omgroup} OptionalKeyVals:omgroup {}', % is not already defined % \begin{macro}{\printindex} % \begin{macrocode} -%<*package> -\providecommand\printindex{\IfFileExists{\jobname.ind}{\input{\jobname.ind}}{}} +\providecommand\printindex{\IfFileExists{\jobname.ind}{\input{\jobname.ind}}{}} %</package> -%<*ltxml.sty> -DefConstructor('\printindex','<omdoc:index/>'); -%</ltxml.sty> % \end{macrocode} % \end{macro} % -% \begin{macro}{\tableofcontents} -% The table of contents already exists in {\LaTeX}, so we only need to provide a -% {\latexml} binding for it. +% \begin{environment}{frontmatter} +% |book.cls| already has a |\frontmatter| macro, so we have to redefine the front +% matter environment in this case. % \begin{macrocode} -%<*ltxml.sty> -DefConstructor('\tableofcontents',"<omdoc:tableofcontents level='&ToString(&CounterValue('tocdepth'))'/>"); -%</ltxml.sty> -% \end{macrocode} -% \end{macro} -% -% The case of the |\bibliography| command is similar +%<*cls> +\ifclass@book +\renewenvironment{frontmatter} +{\@frontmattertrue\cleardoublepage\@mainmatterfalse\pagenumbering{roman}} +{\@frontmatterfalse\setcounter{page}{1}\pagenumbering{arabic}} +\else +\newenvironment{frontmatter} +{\@frontmattertrue\pagenumbering{roman}} +{\@frontmatterfalse\setcounter{page}{1}\pagenumbering{arabic}} +\fi +% \End{macrocode} +% \end{environment} % -% \begin{macro}{\bibliography} +% \begin{environment}{backmatter} +% |book.cls| already has a |\backmatter| macro, so we have to redefine the back +% matter environment in this case. % \begin{macrocode} -%<*ltxml.sty> -DefConstructor('\bibliography{}',"<omdoc:bibliography files='#1'/>"); -%</ltxml.sty> +\ifclass@book +\renewenvironment{backmatter} +{\cleardoublepage\@mainmatterfalse\@backmattertrue} +{\@backmatterfalse} +\else +\newenvironment{backmatter}{\@backmattertrue}{\@backmatterfalse} +\fi +%</cls> % \end{macrocode} -% \end{macro} +% \end{environment} % \end{omgroup} % % \begin{omgroup}[id=sec:impl:ignore]{Ignoring Inputs} @@ -521,74 +558,49 @@ DefConstructor('\bibliography{}',"<omdoc:bibliography files='#1'/>"); {\metasetkeys{ignore}{#1}\textless\ignore@type\textgreater\bgroup\itshape} {\egroup\textless/\ignore@type\textgreater} \renewenvironment{ignore}{}{}\else\excludecomment{ignore}\fi -%</package> -%<*ltxml.sty> -DefKeyVal('ignore','type','Semiverbatim'); -DefKeyVal('ignore','comment','Semiverbatim'); -DefEnvironment('{ignore} OptionalKeyVals:ignore', - "<omdoc:ignore %&KeyVals(#1)>#body</omdoc:ignore>"); -%</ltxml.sty> % \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} -%<*package> \long\def\STRlabel#1#2{\STRlabeldef{#1}{#2}{#2}} -%</package> -%<*ltxml.sty> -DefConstructor('\STRlabel{}{}', sub { - my($document,$label,$object)=@_; - $document->absorb($object); - $document->addAttribute('xml:id'=>ToString($label)) if $label; }); -%</ltxml.sty> % \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. +% 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} -%<*package> -\def\STRcopy#1{\expandafter\ifx\csname STR@#1\endcsname\relax -\message{STR warning: reference #1 undefined!} -\else\csname STR@#1\endcsname\fi} -%</package> -%<*ltxml.sty> -DefConstructor('\STRcopy{}',"<omdoc:ref xref='##1'/>"); -%</ltxml.sty> +\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} -%<*package> -\newcommand{\STRsemantics}[3][]{#2\def\@test{#1}\ifx\@test\@empty\STRlabeldef{#1}{#2}\fi} -%</package> -%<*ltxml.sty> -DefConstructor('\STRsemantics[]{}{}', sub { - my($document,$label,$ignore,$object)=@_; - $document->absorb($object); - $document->addAttribute('xml:id'=>ToString($label)) if $label; }); -%</ltxml.sty>#$ +\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} -%<*package> \def\STRlabeldef#1{\expandafter\gdef\csname STR@#1\endcsname} -%</package> -%<*ltxml.sty> -DefMacro('\STRlabeldef{}{}', ""); -%</ltxml.sty> % \end{macrocode} % \end{macro} % \end{omgroup} @@ -598,7 +610,6 @@ DefMacro('\STRlabeldef{}{}', ""); % \begin{environment}{blue, red, green, magenta} % We will use the following abbreviations for colors from |color.sty| % \begin{macrocode} -%<*package> \def\black#1{\textcolor{black}{#1}} \def\gray#1{\textcolor{gray}{#1}} \def\blue#1{\textcolor{blue}{#1}} @@ -611,141 +622,51 @@ DefMacro('\STRlabeldef{}{}', ""); \def\orange#1{\textcolor{orange}{#1}} %</package> % \end{macrocode} -% For the {\latexml} bindings, we go a generic route, we replace |\blue{#1}| by -% |{\@omdoc@color{blue}\@omdoc@color@content{#1}}|. -% \begin{macrocode} -%<*ltxml.sty> -sub omdocColorMacro { - my ($color, @args) = @_; - my $tok_color = TokenizeInternal($color); - (T_BEGIN, T_CS('\@omdoc@color'), T_BEGIN, $tok_color->unlist, - T_END, T_CS('\@omdoc@color@content'), T_OTHER('['), $tok_color->unlist, T_OTHER(']'), - T_BEGIN, $args[1]->unlist, T_END, T_END); } -DefMacro('\@omdoc@color{}', sub { MergeFont(color=>$_[1]->toString); return; });#$ -%</ltxml.sty> -% \end{macrocode} -% Ideally, here we will remove the optional argument and have a conversion module -% add the attribute at the end (or maybe add it just for math?) -% or, we can take the attributes for style from the current font ? -% \begin{macrocode} -%<*ltxml.sty> -DefConstructor('\@omdoc@color@content[]{}', - "?#isMath(#2)(<ltx:text ?#1(style='color:#1')()>#2</ltx:text>)"); -foreach my $color(qw(black gray blue red green cyan magenta brown yellow orange)) { - DefMacro("\\".$color.'{}', sub { omdocColorMacro($color, @_); }); }#$ -%</ltxml.sty> -% \end{macrocode} % \end{environment} % \end{omgroup} -% -% \begin{omgroup}[id=sec:impl:commands]{{\LaTeX} Commands we interpret differently} -% -% The reinterpretations are quite simple, we either disregard presentational markup or -% we re-interpret it in terms of {\omdoc}. -% \begin{macrocode} -%<*ltxml.sty> -DefConstructor('\newpage',''); -%</ltxml.sty> -% \end{macrocode} -% \end{omgroup} -% -% \begin{omgroup}[id=sec:impl:ids]{Providing IDs for {\omdoc} Elements} -% -% To provide default identifiers, we tag all {\omdoc} elements that allow |xml:id| -% attributes by executing the |numberIt| procedure below. -% -% \begin{macrocode} -%<*ltxml.sty> -Tag('omdoc:ignore',afterOpen=>\&numberIt,afterClose=>\&locateIt); -Tag('omdoc:ref',afterOpen=>\&numberIt,afterClose=>\&locateIt); -%</ltxml.sty> -% \end{macrocode} -% \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} -%<*package> -\newcommand\hateq{\ensuremath{\hat=}\xspace} -\newcommand\hatequiv{\ensuremath{\hat\equiv}\xspace} -\newcommand\textleadsto{\ensuremath{\leadsto}\xspace} -%</package> -%<*ltxml.sty> -DefConstructor('\hateq',"\x{2259}"); -DefConstructor('\hatequiv',"\x{2A6F}"); -DefConstructor('\textleadsto',"\x{219D}"); -%</ltxml.sty> -% \end{macrocode} -% -% \end{omgroup} -% -% \begin{omgroup}{Leftovers} -% -% \begin{macrocode} -%<*package> -\newcommand{\baseURI}[2][]{} -%</package> -%<*ltxml.sty> -DefMacro('\baseURI []Semiverbatim', sub { - if (LookupValue('SOURCEFILE')!~/^(\w+):\/\//) { - my $baselocal = ToString(Expand($_[1])); - $baselocal = abs_path($baselocal) unless $baselocal=~/^(\w+):\/\//; - AssignValue('baselocal'=>$baselocal); - AssignValue('baseuri'=>ToString(Expand($_[2])));} - else { - AssignValue('baselocal'=>undef); - AssignValue('baseuri'=>ToString(Expand($_[2]))); - }}); -DefConstructor('\url Semiverbatim',"<omdoc:link href='#1'>#1</omdoc:link>"); -DefConstructor('\href Semiverbatim {}',"<omdoc:link href='#1'>#2</omdoc:link>"); -%</ltxml.sty> -% \end{macrocode} -% \ednote{this should be handled differently, omdoc.sty should include url and give a new -% macro for it, which we then use in omdoc} -% and finally, we need to terminate the file with a success mark for perl. -% \begin{macrocode} -%<ltxml.sty|ltxml.cls>1; -% \end{macrocode} -% \end{omgroup} % \end{omgroup} % \Finale \endinput % \iffalse -% LocalWords: GPL structuresharing STR omdoc dtx stex CPERL LoadClass url dc %%% Local Variables: %%% mode: doctex %%% TeX-master: t %%% End: % \fi -% LocalWords: RequirePackage RegisterNamespace namespace xsl DocType ltxml dtd -% LocalWords: ltx DefEnvironment beforeDigest AssignValue inPreamble getGullet -% LocalWords: afterDigest keyval omgroup DefKeyVal Semiverbatim KeyVal srcf -% LocalWords: OptionalKeyVals DefParameterType IfBeginFollows skipSpaces CMP -% LocalWords: ifNext DefMacro needwrapper unlist DefConstructor omtext bgroup -% LocalWords: useCMPItemizations RefStepItemCounter egroup beginItemize li di -% LocalWords: beforeDigestEnd dt autoclose ul ol dl env showignores srcref Cwd -% LocalWords: afterOpen LastSeenCMP autoClose DefCMPEnvironment proto ToString -% LocalWords: addAttribute nlex nlcex omdocColorMacro args tok MergeFont qw -% LocalWords: TokenizeInternal toString isMath foreach maybeCloseElement id'd -% LocalWords: autoOpen minipage footnotesize scriptsize numberIt whatsit href -% LocalWords: getAttribute setAttribute OMDoc RelaxNGSchema noindex xml lec -% LocalWords: Subsubsection useDefaultItemizations refundefinedtrue sblockquote -% LocalWords: DefCMPConstructor sinlinequote idx idt ide idp emph extrefs sref -% LocalWords: flushleft flushright DeclareOption PassOptions undef cls iffalse -% LocalWords: ProcessOptions subparagraph ignoresfalse ignorestrue texttt ttin -% LocalWords: texttt latexml fileversion maketitle newpage tableofcontents cwd -% LocalWords: newpage ednote ctancite dmt03 smms inlinedef STRlabel STRcopy -% LocalWords: STRlabel STRsemantics STRsemantics textcolor printbibliography -% LocalWords: textsf langle textsf langle respetively orig renewcommand cdir -% LocalWords: baseuri baseuri baselocal baselocal SOURCEFILE cooluri newif ifx -% LocalWords: SOURCEBASE chapterfalse partfalse newcount ifshow chaptertrue -% LocalWords: parttrue srefaddidkey newenvironment textbf compactenum showmeta -% LocalWords: noindent noindent ignorespaces ifnum thepart thechapter regexp -% LocalWords: thesection thesubsection thesubsubsection needswrapper itshape +% 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 +% 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 % LocalWords: expandafter endcsname xref newcommand gdef doctex metakeys Hacky -% LocalWords: metasetkeys addmetakey printindex providecommand jobname.ind -% LocalWords: jobname.ind tocdepth hateq ensuremath xspace hatequiv equiv -% LocalWords: textleadsto leadsto +% 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 +% LocalWords: compactitem exfig vspace currentsectionlevel currentsectionlevel +% LocalWords: ldots URLBASE ifclass bookfalse booktrue currentsetionlevel thedocument@ID +% LocalWords: nonum phantomsection nameuse numtrue numfalse contentsline unnum +% LocalWords: thepage hypreref.sty ifcase cleardoublepage frontmatterfalse customization +% LocalWords: frontmattertrue pagenumbering setcounter hyperref.sty addcontetsline +% LocalWords: mfirstuc.sty internationalize documentkeys withusedmodules diff --git a/Master/texmf-dist/source/latex/stex/omdoc/omdoc.ins b/Master/texmf-dist/source/latex/stex/omdoc/omdoc.ins index 41de5776ed6..74a42175afa 100644 --- a/Master/texmf-dist/source/latex/stex/omdoc/omdoc.ins +++ b/Master/texmf-dist/source/latex/stex/omdoc/omdoc.ins @@ -28,13 +28,4 @@ \Msg{* And don't forget to refresh your filename database} \Msg{* if your TeX distribution uses such a database.} \Msg{*} - -\nopreamble\nopostamble -\generate{\file{omdoc.sty.ltxml}{\from{omdoc.dtx}{ltxml.sty}}} -\generate{\file{omdoc.cls.ltxml}{\from{omdoc.dtx}{ltxml.cls}}} - -\Msg{*} -\Msg{* You may need to move the generated ltxml files into a directory searched by LaTeXML.} -\Msg{*} - \endbatchfile |