From 70e387eb63ce4723858c48592208e193dec294f3 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 12 Nov 2010 00:31:31 +0000 Subject: stex 0.9.3 (11nov10) git-svn-id: svn://tug.org/texlive/trunk@20410 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/stex/README | 4 +- Master/texmf-dist/doc/latex/stex/assignment/README | 10 - .../doc/latex/stex/assignment/assignment.pdf | Bin 258876 -> 0 bytes .../texmf-dist/doc/latex/stex/cmathml/cmathml.pdf | Bin 501317 -> 449387 bytes Master/texmf-dist/doc/latex/stex/cnx/cnx.pdf | Bin 335346 -> 342228 bytes Master/texmf-dist/doc/latex/stex/dcm/README | 7 +- Master/texmf-dist/doc/latex/stex/dcm/dcm.pdf | Bin 326217 -> 302878 bytes .../doc/latex/stex/example/background/all.omdoc | 6 +- .../latex/stex/example/background/functions.omdoc | 12 +- .../doc/latex/stex/example/background/reals.omdoc | 6 +- .../doc/latex/stex/example/paper/continuous.omdoc | 8 +- .../latex/stex/example/paper/differentiable.omdoc | 8 +- .../doc/latex/stex/example/paper/paper.omdoc | 236 +- Master/texmf-dist/doc/latex/stex/hwexam/README | 12 + Master/texmf-dist/doc/latex/stex/hwexam/hwexam.pdf | Bin 0 -> 323506 bytes Master/texmf-dist/doc/latex/stex/metakeys/README | 11 + .../doc/latex/stex/metakeys/metakeys.pdf | Bin 0 -> 281364 bytes Master/texmf-dist/doc/latex/stex/mikoslides/README | 6 +- .../doc/latex/stex/mikoslides/mikoslides.pdf | Bin 248126 -> 293762 bytes Master/texmf-dist/doc/latex/stex/modules/README | 5 +- .../texmf-dist/doc/latex/stex/modules/modules.pdf | Bin 527305 -> 462421 bytes Master/texmf-dist/doc/latex/stex/omd/README | 11 - Master/texmf-dist/doc/latex/stex/omd/omd.pdf | Bin 289059 -> 0 bytes Master/texmf-dist/doc/latex/stex/omdoc/README | 5 +- Master/texmf-dist/doc/latex/stex/omdoc/omdoc.pdf | Bin 374399 -> 331026 bytes Master/texmf-dist/doc/latex/stex/omtext/README | 6 +- Master/texmf-dist/doc/latex/stex/omtext/omtext.pdf | Bin 340041 -> 334344 bytes .../texmf-dist/doc/latex/stex/presentation/README | 6 +- .../doc/latex/stex/presentation/presentation.pdf | Bin 422504 -> 404933 bytes Master/texmf-dist/doc/latex/stex/problem/README | 4 +- .../texmf-dist/doc/latex/stex/problem/problem.pdf | Bin 271606 -> 278705 bytes Master/texmf-dist/doc/latex/stex/reqdoc/README | 4 +- Master/texmf-dist/doc/latex/stex/reqdoc/reqdoc.pdf | Bin 308676 -> 287638 bytes .../doc/latex/stex/reqdoc/requirements.pdf | Bin 123719 -> 113323 bytes Master/texmf-dist/doc/latex/stex/sproof/README | 4 +- Master/texmf-dist/doc/latex/stex/sproof/sproof.pdf | Bin 348611 -> 350369 bytes Master/texmf-dist/doc/latex/stex/sref/README | 4 +- Master/texmf-dist/doc/latex/stex/sref/book.pdf | Bin 106736 -> 89718 bytes Master/texmf-dist/doc/latex/stex/sref/idc.pdf | Bin 66599 -> 61341 bytes Master/texmf-dist/doc/latex/stex/sref/scr.pdf | Bin 77776 -> 72075 bytes Master/texmf-dist/doc/latex/stex/sref/sref.pdf | Bin 348527 -> 326248 bytes Master/texmf-dist/doc/latex/stex/statements/README | 4 +- .../doc/latex/stex/statements/statements.pdf | Bin 438283 -> 397686 bytes .../source/latex/stex/assignment/assignment.dtx | 428 --- Master/texmf-dist/source/latex/stex/bin/checksum | 9 +- Master/texmf-dist/source/latex/stex/bin/grep-rerun | 59 + Master/texmf-dist/source/latex/stex/bin/sms | 7 +- Master/texmf-dist/source/latex/stex/bin/stexml | 2 + Master/texmf-dist/source/latex/stex/bin/stexmlmod | 2 + .../source/latex/stex/cmathml/cmathml.dtx | 15 +- Master/texmf-dist/source/latex/stex/cnx/cnx.dtx | 143 +- Master/texmf-dist/source/latex/stex/dcm/dcm.dtx | 100 +- .../texmf-dist/source/latex/stex/hwexam/hwexam.dtx | 566 ++++ .../source/latex/stex/metakeys/metakeys.dtx | 372 +++ .../source/latex/stex/mikoslides/mikoslides.dtx | 61 +- .../source/latex/stex/modules/modules.dtx | 102 +- Master/texmf-dist/source/latex/stex/omd/omd.dtx | 222 -- .../texmf-dist/source/latex/stex/omdoc/omdoc.dtx | 148 +- .../texmf-dist/source/latex/stex/omtext/omtext.dtx | 135 +- .../latex/stex/presentation/presentation.dtx | 143 +- .../source/latex/stex/problem/problem.dtx | 130 +- .../texmf-dist/source/latex/stex/reqdoc/reqdoc.dtx | 59 +- .../texmf-dist/source/latex/stex/sproof/sproof.dtx | 139 +- Master/texmf-dist/source/latex/stex/sref/sref.dtx | 88 +- .../source/latex/stex/statements/statements.dtx | 160 +- .../texmf-dist/source/latex/stex/xsl/omdocpost.xsl | 36 +- .../tex/latex/stex/assignment/assignment.sty | 111 - .../tex/latex/stex/assignment/assignment.sty.ltxml | 29 - Master/texmf-dist/tex/latex/stex/cnx/cnx.cls | 98 +- Master/texmf-dist/tex/latex/stex/cnx/cnx.cls.ltxml | 2 +- Master/texmf-dist/tex/latex/stex/dcm/dcm.sty | 47 +- Master/texmf-dist/tex/latex/stex/dcm/dcm.sty.ltxml | 1 - Master/texmf-dist/tex/latex/stex/hwexam/hwexam.sty | 125 + .../tex/latex/stex/hwexam/hwexam.sty.ltxml | 29 + .../tex/latex/stex/metakeys/metakeys.sty | 49 + .../tex/latex/stex/metakeys/metakeys.sty.ltxml | 3 + .../tex/latex/stex/mikoslides/jacobs-logo.eps | 2723 +++++++++++++++++++- .../stex/mikoslides/mikoaffiliation.sty.ltxml | 8 - .../tex/latex/stex/mikoslides/mikoslides.cls | 8 +- .../tex/latex/stex/mikoslides/mikoslides.cls.ltxml | 11 +- .../texmf-dist/tex/latex/stex/modules/modules.sty | 20 +- .../tex/latex/stex/modules/modules.sty.ltxml | 11 +- Master/texmf-dist/tex/latex/stex/omd/omd.sty | 27 - Master/texmf-dist/tex/latex/stex/omd/omd.sty.ltxml | 0 Master/texmf-dist/tex/latex/stex/omdoc/omdoc.cls | 4 +- Master/texmf-dist/tex/latex/stex/omdoc/omdoc.sty | 22 +- .../tex/latex/stex/omdoc/omdoc.sty.ltxml | 5 +- Master/texmf-dist/tex/latex/stex/omtext/omtext.sty | 35 +- .../tex/latex/stex/omtext/omtext.sty.ltxml | 29 +- .../tex/latex/stex/presentation/presentation.sty | 10 +- .../latex/stex/presentation/presentation.sty.ltxml | 2 +- .../texmf-dist/tex/latex/stex/problem/problem.sty | 27 +- .../tex/latex/stex/problem/problem.sty.ltxml | 47 +- Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty | 21 +- Master/texmf-dist/tex/latex/stex/sproof/sproof.sty | 49 +- .../tex/latex/stex/sproof/sproof.sty.ltxml | 24 +- Master/texmf-dist/tex/latex/stex/sref/sref.sty | 20 +- .../texmf-dist/tex/latex/stex/sref/sref.sty.ltxml | 6 +- .../tex/latex/stex/statements/statements.sty | 60 +- .../tex/latex/stex/statements/statements.sty.ltxml | 27 +- .../texmf-dist/tex/latex/stex/stex-logo.sty.ltxml | 2 +- Master/texmf-dist/tex/latex/stex/stex.sty | 2 +- 102 files changed, 5470 insertions(+), 1729 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/stex/assignment/README delete mode 100644 Master/texmf-dist/doc/latex/stex/assignment/assignment.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/hwexam/README create mode 100644 Master/texmf-dist/doc/latex/stex/hwexam/hwexam.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/metakeys/README create mode 100644 Master/texmf-dist/doc/latex/stex/metakeys/metakeys.pdf delete mode 100644 Master/texmf-dist/doc/latex/stex/omd/README delete mode 100644 Master/texmf-dist/doc/latex/stex/omd/omd.pdf delete mode 100644 Master/texmf-dist/source/latex/stex/assignment/assignment.dtx create mode 100755 Master/texmf-dist/source/latex/stex/bin/grep-rerun create mode 100755 Master/texmf-dist/source/latex/stex/bin/stexml create mode 100755 Master/texmf-dist/source/latex/stex/bin/stexmlmod create mode 100644 Master/texmf-dist/source/latex/stex/hwexam/hwexam.dtx create mode 100644 Master/texmf-dist/source/latex/stex/metakeys/metakeys.dtx delete mode 100644 Master/texmf-dist/source/latex/stex/omd/omd.dtx delete mode 100644 Master/texmf-dist/tex/latex/stex/assignment/assignment.sty delete mode 100644 Master/texmf-dist/tex/latex/stex/assignment/assignment.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/hwexam/hwexam.sty create mode 100644 Master/texmf-dist/tex/latex/stex/hwexam/hwexam.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/metakeys/metakeys.sty create mode 100644 Master/texmf-dist/tex/latex/stex/metakeys/metakeys.sty.ltxml delete mode 100644 Master/texmf-dist/tex/latex/stex/omd/omd.sty delete mode 100644 Master/texmf-dist/tex/latex/stex/omd/omd.sty.ltxml diff --git a/Master/texmf-dist/doc/latex/stex/README b/Master/texmf-dist/doc/latex/stex/README index 6aa73d031a4..1952eb98cee 100644 --- a/Master/texmf-dist/doc/latex/stex/README +++ b/Master/texmf-dist/doc/latex/stex/README @@ -8,5 +8,5 @@ essentially turning it into a document format for mathematical knowledge managem Copyright (c) 2008 Michael Kohlhase The package is distributed under the terms of the LaTeX Project Public License (LPPL) -The development version of this package can be found at -https://svn.kwarc.info/repos/stex/sty/stex/ +See http://trac.kwarc.info/sTeX for the project homepage, the development version of this +package can be found at https://svn.kwarc.info/repos/stex/trunk/sty/stex/ diff --git a/Master/texmf-dist/doc/latex/stex/assignment/README b/Master/texmf-dist/doc/latex/stex/assignment/README deleted file mode 100644 index a62ceef0182..00000000000 --- a/Master/texmf-dist/doc/latex/stex/assignment/README +++ /dev/null @@ -1,10 +0,0 @@ -assignment.sty: An Infrastructure for marking up Assignment Sheets - -The assignment packge allows individual course assignment sheets and compond -assignment documents using problem files marked up with the problem package. - -Copyright (c) 2008 Michael Kohlhase -The package is distributed under the terms of the LaTeX Project Public License (LPPL) - -The development version of this package can be found at -https://svn.kwarc.info/repos/stex/sty/assignment/ diff --git a/Master/texmf-dist/doc/latex/stex/assignment/assignment.pdf b/Master/texmf-dist/doc/latex/stex/assignment/assignment.pdf deleted file mode 100644 index ef791c28e01..00000000000 Binary files a/Master/texmf-dist/doc/latex/stex/assignment/assignment.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/stex/cmathml/cmathml.pdf b/Master/texmf-dist/doc/latex/stex/cmathml/cmathml.pdf index 7c18fa7fbcf..54bc14c8d06 100644 Binary files a/Master/texmf-dist/doc/latex/stex/cmathml/cmathml.pdf and b/Master/texmf-dist/doc/latex/stex/cmathml/cmathml.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/cnx/cnx.pdf b/Master/texmf-dist/doc/latex/stex/cnx/cnx.pdf index f1f1b6824a3..681044e8fdf 100644 Binary files a/Master/texmf-dist/doc/latex/stex/cnx/cnx.pdf and b/Master/texmf-dist/doc/latex/stex/cnx/cnx.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/dcm/README b/Master/texmf-dist/doc/latex/stex/dcm/README index 82799533796..5fd3874b04a 100644 --- a/Master/texmf-dist/doc/latex/stex/dcm/README +++ b/Master/texmf-dist/doc/latex/stex/dcm/README @@ -6,6 +6,7 @@ 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) -The development version of this package can be found at -$HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/dcm/README $ - +See http://trac.kwarc.info/sTeX for the project homepage, the development version +of this package can be found at +https://svn.kwarc.info/repos/stex/trunk/sty/stex/dcm + diff --git a/Master/texmf-dist/doc/latex/stex/dcm/dcm.pdf b/Master/texmf-dist/doc/latex/stex/dcm/dcm.pdf index e240c089652..e437276fac4 100644 Binary files a/Master/texmf-dist/doc/latex/stex/dcm/dcm.pdf and b/Master/texmf-dist/doc/latex/stex/dcm/dcm.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/example/background/all.omdoc b/Master/texmf-dist/doc/latex/stex/example/background/all.omdoc index 45c2c612b05..af660821194 100644 --- a/Master/texmf-dist/doc/latex/stex/example/background/all.omdoc +++ b/Master/texmf-dist/doc/latex/stex/example/background/all.omdoc @@ -24,7 +24,7 @@ ( - × + × @@ -48,7 +48,7 @@ : - + ) @@ -67,7 +67,7 @@ ( - + ) diff --git a/Master/texmf-dist/doc/latex/stex/example/background/functions.omdoc b/Master/texmf-dist/doc/latex/stex/example/background/functions.omdoc index 819908cf05d..4577907ced1 100644 --- a/Master/texmf-dist/doc/latex/stex/example/background/functions.omdoc +++ b/Master/texmf-dist/doc/latex/stex/example/background/functions.omdoc @@ -3,9 +3,7 @@ - -

Functions

-
+ Functions
@@ -23,7 +21,7 @@ ( - × + × @@ -47,7 +45,7 @@ : - + ) @@ -66,7 +64,7 @@ ( - + ) @@ -76,7 +74,7 @@

-A functionfunction is a left-total, right-unique relation in

+A functionfunction is a left-total, right-unique relation in

diff --git a/Master/texmf-dist/doc/latex/stex/example/background/reals.omdoc b/Master/texmf-dist/doc/latex/stex/example/background/reals.omdoc index 96455425373..0f148890d06 100644 --- a/Master/texmf-dist/doc/latex/stex/example/background/reals.omdoc +++ b/Master/texmf-dist/doc/latex/stex/example/background/reals.omdoc @@ -3,9 +3,7 @@ - -

Real Numbers

-
+ Real Numbers
@@ -56,7 +54,7 @@

-We denote the set of real numbersrealnumbers we all know and love with +We denote the set of real numbersrealnumbers we all know and love with .

diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/continuous.omdoc b/Master/texmf-dist/doc/latex/stex/example/paper/continuous.omdoc index d02a6d216e7..6b73e519730 100644 --- a/Master/texmf-dist/doc/latex/stex/example/paper/continuous.omdoc +++ b/Master/texmf-dist/doc/latex/stex/example/paper/continuous.omdoc @@ -3,9 +3,7 @@ - -

Continuous Functions

-
+ Continuous Functions
@@ -27,7 +25,7 @@ C 0 - + @@ -42,7 +40,7 @@

-A function is called continuouscontinuous at +A function is called continuouscontinuous at , iff for all 0 there is a 0, such that for all

diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.omdoc b/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.omdoc index 20c184eff4a..b1415a2334b 100644 --- a/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.omdoc +++ b/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.omdoc @@ -3,9 +3,7 @@ - -

Differentiable Functions

-
+ Differentiable Functions
@@ -26,7 +24,7 @@ C 1 - + @@ -41,7 +39,7 @@

-A function is called differentiabledifferentiable at +A function is called differentiabledifferentiable at , iff for all 0 there is a 0, such that for all .

diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/paper.omdoc b/Master/texmf-dist/doc/latex/stex/example/paper/paper.omdoc index ca38d57bd73..02d7d746649 100644 --- a/Master/texmf-dist/doc/latex/stex/example/paper/paper.omdoc +++ b/Master/texmf-dist/doc/latex/stex/example/paper/paper.omdoc @@ -2,44 +2,29 @@ - -

Michael Kohlhase

-
- -

Copyright (c) 2009 Michael Kohlhase

-
- -

An example of semantic Markup in sTeX

-
- -

In this note we give an example of semantic markup in sTeX: + MichaelKohlhase + Copyright (c) 2009 Michael Kohlhase + An example of semantic Markup in sTeX + In this note we give an example of semantic markup in sTeX: Continuous and differentiable functions are introduced using real numbers, sets and -functions as an assumed background.

-
+functions as an assumed background.
- -

Introduction

-
+ Introduction
- -

We will show how to semantically mark up mathematics in the sTeX -format  and how to convert it into -OMDoc . -

-

We have some mathematical material in Section which will serve as example + We will show how to semantically mark up mathematics in the sTeX +format  and how to convert it into +OMDoc . +We have some mathematical material in Section which will serve as example content. In the rest of this section we will explain the setup of the example and present an approach to automation of the OMDoc conversion via Unix Makefiles. -

-
+
- -

The Setup

-
+ The Setup
@@ -50,27 +35,25 @@ present an approach to automation of the OMDoc conversion via Unix Makefiles.

The source of this note is contained in the file paper.tex. We call it -the targettarget, since formatting it with LaTeX will generate the main +the targettarget, since formatting it with LaTeX will generate the main document. The content in Section and Section comes from included files continuous.tex and -differentiable.tex, we will call them modulemodules, since they may +differentiable.tex, we will call them modulemodules, since they may be used (i.e. included) by other target documents as well.

- -

As the modules are built for inclusion into other documents, they are not + As the modules are built for inclusion into other documents, they are not self-contained: -

-
+

they do not contain a LaTeX preamble and -/, and -

+/, and +

@@ -81,8 +64,8 @@ self-contained: -

to facilitate this a module file modf.tex comes with a “semantic -macro short form” modf.sms that can be included without generating +

to facilitate this a module file modf.tex comes with a “semantic +macro short form” modf.sms that can be included without generating output in the PDF.

@@ -90,59 +73,46 @@ output in the PDF.
- -

this will have consequences for the automation. Concretely, the module on -differentiable functions in Section depends on that for continuous -functions in Section . Both of them depend on modules for real numbers, -sets and functions that we do not want to cover in this note. We assume that + this will have consequences for the automation. Concretely, the module on +differentiable functions in Section depends on that for continuous +functions in Section . Both of them depend on modules for real numbers, +sets and functions that we do not want to cover in this note. We assume that they have already been marked up with the same methods as we describe here and are -accessible to us and call them background modulebackgroundmodules. In our setup we -keep them in the subdirectory background. -

-
+accessible to us and call them background modulebackgroundmodules. In our setup we +keep them in the subdirectory background. +
- -

Formatting and OMDoc conversion

-
+ Formatting and OMDoc conversion
- -

To format an sTeX document — i.e. to produce a PDF file from the sTeX marked-up -sources — we only need to run the pdflatex program over the target document -— assuming that all modules (regular or background) have semantic macro short forms. -

-

To convert an sTeX document to OMDoc, we need to run latexml over it, -post-process the result by latexmlpost, and finally massage away all remaining -LaTeXML islands with a stylesheet, see   for details. -

-
+ To format an sTeX document — i.e. to produce a PDF file from the sTeX marked-up +sources — we only need to run the pdflatex program over the target document +— assuming that all modules (regular or background) have semantic macro short forms. +To convert an sTeX document to OMDoc, we need to run latexml over it, +post-process the result by latexmlpost, and finally massage away all remaining +LaTeXML islands with a stylesheet, see   for details. +
- -

Makefile-based Automation

-
+ Makefile-based Automation
- -

As the conversion to OMDoc is rather complex (the programs in the three steps take a + As the conversion to OMDoc is rather complex (the programs in the three steps take a variety of options), we support an automation by Unix Makefiles. There are three main -make targets. -

-
+make targets. +
-

- make omdoc -

+ make omdoc
@@ -154,9 +124,7 @@ document. -

- make mods -

+ make mods
@@ -167,9 +135,7 @@ document. -

- make pdf -

+ make pdf
@@ -180,9 +146,7 @@ document. -

- make mpdf -

+ make mpdf
@@ -193,9 +157,7 @@ document. -

- make sms -

+ make sms
@@ -206,82 +168,38 @@ forms of modules (this is implicitly called in all the other - -

To use this, we need to set up a Makefile of the following form: -

- - - - - - - - - - - - - - - - - - - - - - - - - - - -
- STEXDIR = ../..
2TARGET = paper.tex
- MODSLIBDIR = ../background
4 -
- include $(STEXDIR)/make/Makefile.vars
6all: omdoc mods pdf
- include $(STEXDIR)/make/Makefile.in
-
-
-
-

The variable STEXDIR has to be set to the main directory of the sTeX + To use this, we need to set up a Makefile of the following form: + +
STEXDIR = ../..
2TARGET = paper.tex
MODSLIBDIR = ../background
4
include $(STEXDIR)/make/Makefile.vars
6all: omdoc mods pdf
include $(STEXDIR)/make/Makefile.in
+The variable STEXDIR has to be set to the main directory of the sTeX distribution. The variable TARGET specifies the target document (all other -*.tex files that are not excluded in the BUTFILES variables are -considered as modules). Here, the background directory for convenience. The +*.tex files that are not excluded in the BUTFILES variables are +considered as modules). Here, the background directory for convenience. The MODSLIBDIR specifies the location of the prefix and postfix files -pre.tex and post.tex that will be prepended and appended to the +pre.tex and post.tex that will be prepended and appended to the modules to make them into complete files TeX files that can be converted. The last -three lines just include the Makefiles from the sTeX distribution and configure the -default make target (make all) to be produce the pdf version -

-

Note that in the directory background we have a very similar Makefile as +three lines just include the Makefiles from the sTeX distribution and configure the +default make target (make all) to be produce the pdf version +Note that in the directory background we have a very similar Makefile as above. The only differences are that the variable STEXDIR is adapted and -that the BUTFILE variable is set to pre.tex and -post.tex, so that they are not converted. In the directory -background we have followed good practice by establishing a phony -

-
+that the BUTFILE variable is set to pre.tex and +post.tex, so that they are not converted. In the directory +background we have followed good practice by establishing a phony +
- -

Mathematical Content

-
+ Mathematical Content
- -

We present some standard mathematical definitions, here from calculus. -

-
+ We present some standard mathematical definitions, here from calculus. +
- -

Continuous Functions

-
+ Continuous Functions
@@ -303,7 +221,7 @@ that the BUT C 0 - + @@ -318,7 +236,7 @@ that the BUT

-A function is called continuouscontinuous at +A function is called continuouscontinuous at , iff for all 0 there is a 0, such that for all

@@ -327,9 +245,7 @@ A function - -

Differentiable Functions

-
+ Differentiable Functions
@@ -350,7 +266,7 @@ A function C 1 - + @@ -365,7 +281,7 @@ A function

-A function is called differentiabledifferentiable at +A function is called differentiabledifferentiable at , iff for all 0 there is a 0, such that for all .

@@ -376,24 +292,20 @@ A function - -

Conclusion

-
+ Conclusion
- -

In this note we have given an example of standard mathematical markup and shown how a a -sTeX collection can be set up for automation. -

-
+ In this note we have given an example of standard mathematical markup and shown how a a +sTeX collection can be set up for automation. +
- + - + - +
diff --git a/Master/texmf-dist/doc/latex/stex/hwexam/README b/Master/texmf-dist/doc/latex/stex/hwexam/README new file mode 100644 index 00000000000..cebd165fa19 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/hwexam/README @@ -0,0 +1,12 @@ +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) + +See http://trac.kwarc.info/sTeX for the project homepage, the development version +of this package can be found at +https://svn.kwarc.info/repos/stex/trunk/sty/stex/hwexam + diff --git a/Master/texmf-dist/doc/latex/stex/hwexam/hwexam.pdf b/Master/texmf-dist/doc/latex/stex/hwexam/hwexam.pdf new file mode 100644 index 00000000000..cbb89e36794 Binary files /dev/null and b/Master/texmf-dist/doc/latex/stex/hwexam/hwexam.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/metakeys/README b/Master/texmf-dist/doc/latex/stex/metakeys/README new file mode 100644 index 00000000000..56c6eea13b2 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/metakeys/README @@ -0,0 +1,11 @@ +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) + +See http://trac.kwarc.info/sTeX for the project homepage, the development version +of this package can be found at +https://svn.kwarc.info/repos/stex/trunk/sty/stex/metakeys diff --git a/Master/texmf-dist/doc/latex/stex/metakeys/metakeys.pdf b/Master/texmf-dist/doc/latex/stex/metakeys/metakeys.pdf new file mode 100644 index 00000000000..735b2f53ddf Binary files /dev/null and b/Master/texmf-dist/doc/latex/stex/metakeys/metakeys.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/mikoslides/README b/Master/texmf-dist/doc/latex/stex/mikoslides/README index 57bf5ac2054..822e74a199a 100644 --- a/Master/texmf-dist/doc/latex/stex/mikoslides/README +++ b/Master/texmf-dist/doc/latex/stex/mikoslides/README @@ -5,5 +5,7 @@ The mikoslides class provides a practical basis for marking up slides semantical Copyright (c) 2008 Michael Kohlhase The package is distributed under the terms of the LaTeX Project Public License (LPPL) -The development version of this document class can be found at -https://svn.kwarc.info/repos/stex/sty/mikoslides +See http://trac.kwarc.info/sTeX for the project homepage, the development version +of this package can be found at +https://svn.kwarc.info/repos/stex/trunk/sty/stex/mikoslides + diff --git a/Master/texmf-dist/doc/latex/stex/mikoslides/mikoslides.pdf b/Master/texmf-dist/doc/latex/stex/mikoslides/mikoslides.pdf index b5cf7c8204f..b90cbd5d30a 100644 Binary files a/Master/texmf-dist/doc/latex/stex/mikoslides/mikoslides.pdf and b/Master/texmf-dist/doc/latex/stex/mikoslides/mikoslides.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/modules/README b/Master/texmf-dist/doc/latex/stex/modules/README index b260a1e9d36..bc64ed35416 100644 --- a/Master/texmf-dist/doc/latex/stex/modules/README +++ b/Master/texmf-dist/doc/latex/stex/modules/README @@ -16,5 +16,6 @@ added-value services, either directly from the sTeX sources, or after translatio Copyright (c) 2008 Michael Kohlhase The package is distributed under the terms of the LaTeX Project Public License (LPPL) -The development version of this package can be found at -$HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/modules/README $ +See http://trac.kwarc.info/sTeX for the project homepage, the development version +of this package can be found at +https://svn.kwarc.info/repos/stex/trunk/sty/stex/modules diff --git a/Master/texmf-dist/doc/latex/stex/modules/modules.pdf b/Master/texmf-dist/doc/latex/stex/modules/modules.pdf index cd0d16b778c..19325c00531 100644 Binary files a/Master/texmf-dist/doc/latex/stex/modules/modules.pdf and b/Master/texmf-dist/doc/latex/stex/modules/modules.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/omd/README b/Master/texmf-dist/doc/latex/stex/omd/README deleted file mode 100644 index f655e5d95b2..00000000000 --- a/Master/texmf-dist/doc/latex/stex/omd/README +++ /dev/null @@ -1,11 +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) - -The development version of this package can be found at -$HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/omd/README $ - diff --git a/Master/texmf-dist/doc/latex/stex/omd/omd.pdf b/Master/texmf-dist/doc/latex/stex/omd/omd.pdf deleted file mode 100644 index 550b18c8064..00000000000 Binary files a/Master/texmf-dist/doc/latex/stex/omd/omd.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/stex/omdoc/README b/Master/texmf-dist/doc/latex/stex/omdoc/README index 80a516784ed..2a5111f8d38 100644 --- a/Master/texmf-dist/doc/latex/stex/omdoc/README +++ b/Master/texmf-dist/doc/latex/stex/omdoc/README @@ -7,5 +7,6 @@ This package and class supplies a the infrastructure for writing OMDoc documents Copyright (c) 2008 Michael Kohlhase The package is distributed under the terms of the LaTeX Project Public License (LPPL) -The development version of this package can be found at -$HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/omdoc/README $ +See http://trac.kwarc.info/sTeX for the project homepage, the development version +of this package can be found at https://svn.kwarc.info/repos/stex/trunk/sty/stex/omdoc + diff --git a/Master/texmf-dist/doc/latex/stex/omdoc/omdoc.pdf b/Master/texmf-dist/doc/latex/stex/omdoc/omdoc.pdf index f30f84c833f..748bd0ba232 100644 Binary files a/Master/texmf-dist/doc/latex/stex/omdoc/omdoc.pdf and b/Master/texmf-dist/doc/latex/stex/omdoc/omdoc.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/omtext/README b/Master/texmf-dist/doc/latex/stex/omtext/README index d4681ffbb93..579f02789b3 100644 --- a/Master/texmf-dist/doc/latex/stex/omtext/README +++ b/Master/texmf-dist/doc/latex/stex/omtext/README @@ -6,5 +6,7 @@ This package supplies a the infrastructure for writing OMDoc text fragments. Copyright (c) 2010 Michael Kohlhase The package is distributed under the terms of the LaTeX Project Public License (LPPL) -The development version of this package can be found at -$HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/omtext/README $ +See http://trac.kwarc.info/sTeX for the project homepage, the development version +of this package can be found at +https://svn.kwarc.info/repos/stex/trunk/sty/stex/omtext + diff --git a/Master/texmf-dist/doc/latex/stex/omtext/omtext.pdf b/Master/texmf-dist/doc/latex/stex/omtext/omtext.pdf index 418f5eef06d..eee9af67ad2 100644 Binary files a/Master/texmf-dist/doc/latex/stex/omtext/omtext.pdf and b/Master/texmf-dist/doc/latex/stex/omtext/omtext.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/presentation/README b/Master/texmf-dist/doc/latex/stex/presentation/README index 3436ba5a327..6fd953f20d1 100644 --- a/Master/texmf-dist/doc/latex/stex/presentation/README +++ b/Master/texmf-dist/doc/latex/stex/presentation/README @@ -10,5 +10,7 @@ translation. Copyright (c) 2008 Michael Kohlhase The package is distributed under the terms of the LaTeX Project Public License (LPPL) -The development version of this package can be found at -$HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/presentation/README $ +See http://trac.kwarc.info/sTeX for the project homepage, the development version +of this package can be found at +https://svn.kwarc.info/repos/stex/trunk/sty/stex/presentation + diff --git a/Master/texmf-dist/doc/latex/stex/presentation/presentation.pdf b/Master/texmf-dist/doc/latex/stex/presentation/presentation.pdf index 1d63eea05b3..e7b90a82151 100644 Binary files a/Master/texmf-dist/doc/latex/stex/presentation/presentation.pdf and b/Master/texmf-dist/doc/latex/stex/presentation/presentation.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/problem/README b/Master/texmf-dist/doc/latex/stex/problem/README index 6b72fdc32a8..77b9314109e 100644 --- a/Master/texmf-dist/doc/latex/stex/problem/README +++ b/Master/texmf-dist/doc/latex/stex/problem/README @@ -6,5 +6,5 @@ them efficiently in multiple environments. Copyright (c) 2008 Michael Kohlhase The package is distributed under the terms of the LaTeX Project Public License (LPPL) -The development version of this package can be found at -https://svn.kwarc.info/repos/stex/sty/problem/ +See http://trac.kwarc.info/sTeX for the project homepage, the development version +of this package can be found at https://svn.kwarc.info/repos/stex/trunk/sty/stex/problem diff --git a/Master/texmf-dist/doc/latex/stex/problem/problem.pdf b/Master/texmf-dist/doc/latex/stex/problem/problem.pdf index 063a4654aca..6f0232ee6d0 100644 Binary files a/Master/texmf-dist/doc/latex/stex/problem/problem.pdf and b/Master/texmf-dist/doc/latex/stex/problem/problem.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/reqdoc/README b/Master/texmf-dist/doc/latex/stex/reqdoc/README index 89c91485ed0..adc3131dbbd 100644 --- a/Master/texmf-dist/doc/latex/stex/reqdoc/README +++ b/Master/texmf-dist/doc/latex/stex/reqdoc/README @@ -8,5 +8,5 @@ Copyright (c) 2008 Michael Kohlhase The package is distributed under the terms of the LaTeX Project Public License (LPPL) -The development version of this package can be found at -$HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/reqdoc/README $ +See http://trac.kwarc.info/sTeX for the project homepage, the development version +of this package can be found at https://svn.kwarc.info/repos/stex/trunk/sty/stex/reqdoc diff --git a/Master/texmf-dist/doc/latex/stex/reqdoc/reqdoc.pdf b/Master/texmf-dist/doc/latex/stex/reqdoc/reqdoc.pdf index c9610596c10..f9f7b443061 100644 Binary files a/Master/texmf-dist/doc/latex/stex/reqdoc/reqdoc.pdf and b/Master/texmf-dist/doc/latex/stex/reqdoc/reqdoc.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/reqdoc/requirements.pdf b/Master/texmf-dist/doc/latex/stex/reqdoc/requirements.pdf index 7f32d2f519e..6365a8adb7a 100644 Binary files a/Master/texmf-dist/doc/latex/stex/reqdoc/requirements.pdf and b/Master/texmf-dist/doc/latex/stex/reqdoc/requirements.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/sproof/README b/Master/texmf-dist/doc/latex/stex/sproof/README index 4037dce940e..0b2a9844ec0 100644 --- a/Master/texmf-dist/doc/latex/stex/sproof/README +++ b/Master/texmf-dist/doc/latex/stex/sproof/README @@ -7,5 +7,5 @@ either directly from the sTeX sources, or after translation via the LaTeXML syst Copyright (c) 2008 Michael Kohlhase The package is distributed under the terms of the LaTeX Project Public License (LPPL) -The development version of this package can be found at -$HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/sproof/README $ +See http://trac.kwarc.info/sTeX for the project homepage, the development version +of this package can be found at https://svn.kwarc.info/repos/stex/trunk/sty/stex/sproof diff --git a/Master/texmf-dist/doc/latex/stex/sproof/sproof.pdf b/Master/texmf-dist/doc/latex/stex/sproof/sproof.pdf index fa441932ded..28f43dfe3e7 100644 Binary files a/Master/texmf-dist/doc/latex/stex/sproof/sproof.pdf and b/Master/texmf-dist/doc/latex/stex/sproof/sproof.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/sref/README b/Master/texmf-dist/doc/latex/stex/sref/README index f221504c5f8..457691747cd 100644 --- a/Master/texmf-dist/doc/latex/stex/sref/README +++ b/Master/texmf-dist/doc/latex/stex/sref/README @@ -5,6 +5,6 @@ This package and class supplies a the infrastructure for crossreferencing across Copyright (c) 2009 Michael Kohlhase The package is distributed under the terms of the LaTeX Project Public License (LPPL) -The development version of this package can be found at -$HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/sref/README $ +See http://trac.kwarc.info/sTeX for the project homepage, the development version +of this package can be found at https://svn.kwarc.info/repos/stex/trunk/sty/stex/sref diff --git a/Master/texmf-dist/doc/latex/stex/sref/book.pdf b/Master/texmf-dist/doc/latex/stex/sref/book.pdf index 6f9a2e051a1..f616243640d 100644 Binary files a/Master/texmf-dist/doc/latex/stex/sref/book.pdf and b/Master/texmf-dist/doc/latex/stex/sref/book.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/sref/idc.pdf b/Master/texmf-dist/doc/latex/stex/sref/idc.pdf index 4e0ef1cbeff..c3d51b8e7ff 100644 Binary files a/Master/texmf-dist/doc/latex/stex/sref/idc.pdf and b/Master/texmf-dist/doc/latex/stex/sref/idc.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/sref/scr.pdf b/Master/texmf-dist/doc/latex/stex/sref/scr.pdf index 91bd32bc17c..dae710266c8 100644 Binary files a/Master/texmf-dist/doc/latex/stex/sref/scr.pdf and b/Master/texmf-dist/doc/latex/stex/sref/scr.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/sref/sref.pdf b/Master/texmf-dist/doc/latex/stex/sref/sref.pdf index d677132867d..1cb747475d1 100644 Binary files a/Master/texmf-dist/doc/latex/stex/sref/sref.pdf and b/Master/texmf-dist/doc/latex/stex/sref/sref.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/statements/README b/Master/texmf-dist/doc/latex/stex/statements/README index 152239e074a..fe5c2dbbe9c 100644 --- a/Master/texmf-dist/doc/latex/stex/statements/README +++ b/Master/texmf-dist/doc/latex/stex/statements/README @@ -6,5 +6,5 @@ This package and class supplies a the infrastructure for writing OMDoc statement Copyright (c) 2008 Michael Kohlhase The package is distributed under the terms of the LaTeX Project Public License (LPPL) -The development version of this package can be found at -$HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/statements/README $ +See http://trac.kwarc.info/sTeX for the project homepage, the development version +of this package can be found at https://svn.kwarc.info/repos/stex/trunk/sty/stex/ diff --git a/Master/texmf-dist/doc/latex/stex/statements/statements.pdf b/Master/texmf-dist/doc/latex/stex/statements/statements.pdf index a3e38f47b9b..031b5a52334 100644 Binary files a/Master/texmf-dist/doc/latex/stex/statements/statements.pdf and b/Master/texmf-dist/doc/latex/stex/statements/statements.pdf differ diff --git a/Master/texmf-dist/source/latex/stex/assignment/assignment.dtx b/Master/texmf-dist/source/latex/stex/assignment/assignment.dtx deleted file mode 100644 index b2cc124ff7a..00000000000 --- a/Master/texmf-dist/source/latex/stex/assignment/assignment.dtx +++ /dev/null @@ -1,428 +0,0 @@ -% \iffalse meta-comment -% An Infrastructure for marking up Assignments -% $URL: https://svn.kwarc.info/repos/stex-content/sty/assignment/assignment.dtx $ -% $Rev: 2871 $; last modified by $Author: kohlhase $ -% $Date: 2010-05-29 07:43:20 +0200 (Sat, 29 May 2010) $ -% Copyright (c) 2007 Michael Kohlhase, all rights reserved -% this file is released under the -% LaTeX Project Public License (LPPL) -% \fi -% -% \iffalse -%\NeedsTeXFormat{LaTeX2e}[1999/12/01] -%\ProvidesPackage{assignment}[2010/06/25 v0.9a assignment documents] -% -%<*driver> -\documentclass{ltxdoc} -\usepackage{url,array,float} -\usepackage[show]{ed} -\usepackage{hyperref} -\usepackage{assignment} -\makeindex -\floatstyle{boxed} -\newfloat{exfig}{thp}{lop} -\floatname{exfig}{Example} -\begin{document}\DocInput{assignment.dtx}\end{document} -% -% \fi -%\CheckSum{323} -% -% \changes{v0.9}{2006/09/18}{First Version with Documentation} -% -% \GetFileInfo{assignment.sty} -% -% \MakeShortVerb{\|} -%\def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} -% \def\latexml{\scsys{LaTeXML}} -% -% \title{An Infrastructure for formatting Assignments\thanks{Version {\fileversion} (last revised -% {\filedate})}} -% \author{Michael Kohlhase\\ -% Jacobs University, Bremen\\ -% \url{http://kwarc.info/kohlhase}} -% \maketitle -% -% \begin{abstract} -% The |assignment| packge allows individual course assignment sheets and compond -% assignment documents using problem files marked up with the |problem| package. -% \end{abstract} -% \setcounter{tocdepth}{2}\tableofcontents\newpage -% -%\section{Introduction}\label{sec:intro} -% -% The |assignment| package supplies an infrastructure that allows to format nice-looking -% assignment sheets by simply including problems from problem files marked up with the -% |problem| package. It is designed to be compatible with |problems.sty|, and inherits -% some of the functionality. -% -% \section{The User Interface} -% -% \subsection{Assignments} -% \DescribeEnv{assignment} This package supplies the |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). -% -% \DescribeMacro{\CourseTitle} |\Coursetitle{|\meta{title}|}| can be used to specify the -% title of the course. It is usually specified in the driver file. -% -% \DescribeMacro{\AssignmentType} Similarly, |\AssignmentType{|\meta{type}|}| can be used -% to specify the default assignment type. -% -% The |assignment| package takes the options \DescribeMacro{solutions}|solutions|, -% \DescribeMacro{notes}|notes|, \DescribeMacro{hints}|hints|, \DescribeMacro{pts}|pts|, -% \DescribeMacro{min}|min|, and \DescribeMacro{boxed}|boxed| that are just passed on to -% the |problems| package (cf. its documentation for a description of the intended -% behavior). -% -% \subsection{Typesetting Exams} -% -% Furthermore, the |assignment| package takes the option -% \DescribeMacro{multiple}|multiple| that allows to combine multiple assigment 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 \DescribeMacro{\testheading}|\testheading| takes a keyword argument where -% the keys |duation| specifies a string that specifies the duration of the test, |min| -% specifies the equivalent in number of minutes, and |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} -% \testheading{duration=one hour,min=60,reqpts=27} -% \end{verbatim} -% \vspace*{-3ex}\hrule\vspace*{.5ex} formats to\vspace*{1ex} \hrule\par\noindent\vspace*{2ex} -% \testheading{duration=one hour,min=60,reqpts=27} -% \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. -% -% \StopEventually{\newpage\PrintChanges} -% \newpage -% -% \section{The Implementation} -% -% \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\iftest\testfalse -\newif\ifsolutions\solutionsfalse -\DeclareOption{test}{\testtrue\solutionsfalse} -\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} -%<*package> -\RequirePackage{keyval}[1997/11/10] -\RequirePackage{problem} -% -% \end{macrocode} -% -% Here comes the equivalent header information for {\latexml}, we also initialize the -% package inclusions. Since {\latexml} does not handle options yet, we have nothing to -% do. -% \begin{macrocode} -%<*ltxml> -# -*- CPERL -*- -package LaTeXML::Package::Pool; -use strict; -use LaTeXML::Package; -RequirePackage('problem'); -% -% \end{macrocode} -% -% Then we register the namespace of the requirements ontology -% \begin{macrocode} -%<*ltxml> -RegisterNamespace('assig'=>"http://omdoc.org/ontology/assignments#"); -RegisterDocumentNamespace('assig'=>"http://omdoc.org/ontology/assignments#"); -% -% \end{macrocode} -% -% \subsection{Assignments} -% -% We will prepare the keyval support for the |assignment| environment. -% -% \begin{macrocode} -%<*package> -\omdaddkey{assig}{number} -\omdaddkey{assig}{title} -\omdaddkey{assig}{type} -\omdaddkey{assig}{given} -\omdaddkey{assig}{due} -% -% \end{macrocode} -% -% The next macro just sets the internal token register to the intended string. -% -% \begin{macrocode} -%<*package> -\def\AssignmentType#1{\gdef\assig@default@type{#1}} -\def\assig@default@type{Assignment} -% -%<*ltxml> -% -% \end{macrocode} -% -% The next three macros are intermediate functions that handle the case gracefully, where -% the respective token registers are undefined. -% -% \begin{macrocode} -%<*package> -\def\Assig@Type{\ifx\assig@type\@empty\assig@default@type\else\assig@type\fi} -\def\Assig@Title{\ifx\assig@title\@empty\else\assig@title~\fi} -% \end{macrocode} -% -% The |\given@due| macro prints information about the given and due status of the -% assignment. Its arguments specify the brackets. -% -% \begin{macrocode} -\def\given@due#1#2{% -\ifx\assig@given\@empty\else\ifx\assig@due\@empty\else{#1}\fi\fi% -\ifx\assig@given\@empty\else{Given {\assig@given}}\fi% -\ifx\assig@given\@empty\else\ifx\assig@due\@empty\else{, }\fi\fi% -\ifx\assig@due\@empty\else{Due {\assig@due}}\fi% -\ifx\assig@given\@empty\else{\ifx\assig@due\@empty\else{#2}\fi}\fi} -% -% \end{macrocode} -% -% 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. -% -% \begin{environment}{assignment} -% \begin{macrocode} -%<*package> -\newenvironment{assignment}[1][]% keyval args -{\omdsetkeys{assig}{#1}% collect the keys and correct them from the outside -\@ifundefined{incl@assig@title}{}{\def\assig@title{\incl@assig@title}} -\@ifundefined{incl@assig@type}{}{\def\assig@type{\incl@assig@type}} -\@ifundefined{incl@assig@num}{}{\def\assig@num{\incl@assig@num}} -\@ifundefined{incl@assig@due}{}{\def\assig@due{\incl@assig@due}} -\@ifundefined{incl@assig@given}{}{\def\assig@given{\incl@assig@given}} -\@ifundefined{assig@num}{\stepcounter{section}}% -{\setcounter{section}{\assig@num}\setcounter{problem}{0}} -\ifmultiple% -\section*{\Assig@Type~\arabic{section}:~\Assig@Title\given@due{\\(})} - \addcontentsline{toc}{section}{\Assig@Type~{\arabic{section}}:~\Assig@Title} -\else -\begin{center} -\Large\Course@Title\\ -{\bf{\Assig@Type}~{\arabic{section}}:~\Assig@Title\strut\\\large{\given@due()}} -\end{center} -\fi%ifmultiple -}{} -% -% \end{macrocode} -% -% \begin{macrocode} -%<*ltxml> -DefEnvironment('{assignment} OptionalKeyVals:assig', - "" - . "" - . "" - . "Assignment ?&KeyVal(#1,'num')(&KeyVal(#1,'num').)()" - . "?&KeyVal(#1,'title')((&KeyVal(#1,'title')))" - . "" - . "?&KeyVal(#1,'given')(&KeyVal(#1,'given'))()" - . "?&KeyVal(#1,'due')(&KeyVal(#1,'due'))()" - . "?&KeyVal(#1,'pts')(&KeyVal(#1,'pts'))()" - . "" - . "#body" - ."\n"); -% -% \end{macrocode} -% \end{environment} -% -% \subsection{Including Assignments} -% -% The next command is essentially a glorified |\include| statement, it just sets some -% internal macros first that overwrite the local points, -% -% \begin{macrocode} -%<*package> -\define@key{incl@assig}{number}{\def\incl@assig@num{#1}} -\define@key{incl@assig}{title}{\def\incl@assig@title{#1}} -\define@key{incl@assig}{type}{\def\incl@assig@type{#1}} -\define@key{incl@assig}{given}{\def\incl@assig@given{#1}} -\define@key{incl@assig}{due}{\def\incl@assig@due{#1}} -\newcommand{\includeassignment}[2][]{\bgroup\setkeys{incl@assig}{#1}\include{#2}\egroup} -% -%<*ltxml> -DefMacro('\includeassignment [] {}','\input{#2}'); -% -% \end{macrocode} -% -% \begin{macrocode} -%<*package> -\def\CourseTitle#1{\gdef\Course@Title{#1}} -% -%<*ltxml> -DefConstructor('\CourseTitle{}',''); -% -% \end{macrocode} -% -% \subsection{Typesetting Exams} -% -% \begin{macrocode} -%<*package> -\omdaddkey{testheading}{min} -\omdaddkey{testheading}{duration} -\omdaddkey{testheading}{reqpts} -\def\testheading#1{\omdsetkeys{testheading}{#1} -{\noindent\large NAME: \\[1ex] MATRICULATION NUMBER:\\[2ex] - {\textbf{You have -\ifx\test@heading@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 scheduled 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 -\end{center}\newpage} -% -%<*ltxml> -DefConstructor('\testheading{}',''); -% -% \end{macrocode} -% -% \begin{macrocode} -%<*package> -\def\testspace#1{\iftest\vspace*{#1}\fi} -\def\testnewpage{\iftest\newpage\fi} -\def\testemptypage{\iftest\begin{center}This page was intentionally left - blank for extra space\end{center}\vfill\eject\else\fi} -% -%<*ltxml> -DefConstructor('\testspace{}',''); -DefConstructor('\testnewpage',''); -DefConstructor('\testemptypage',''); -% -% \end{macrocode} -% -% \begin{macro}{\@problem} -% This macro acts on a problem's record in the |*.aux| file. Here we redefine it to -% generate the correction table. -% \begin{macrocode} -%<*package> -\def\@problem#1#2#3{\stepcounter{assignment@probs} -\def\@test{#2}\ifx\@test\@empty\else\addtocounter{assignment@totalpts}{#2}\fi -\def\@test{#3}\ifx\@test\@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} -%<*package> -\newcounter{assignment@probs} -\newcounter{assignment@totalpts} -\newcounter{assignment@totalmin} -\def\correction@probs{prob.}% -\def\correction@pts{total}% -\def\correction@reached{reached}% -\stepcounter{assignment@probs} -\def\correction@table{\begin{tabular}{|l|*{\theassignment@probs}{c|}|p{3cm}|}\hline% -&\multicolumn{\theassignment@probs}{c||}% -{\footnotesize To be used for grading, do not write here} &\\\hline -\correction@probs & Sum & grade\\\hline -\correction@pts &\theassignment@totalpts & \strut\hspace{3cm}\strut\\\hline -\correction@reached & & \\[.7cm]\hline -\end{tabular}} -% -% \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 -% -% \def\bierglas{{\bierfont\char65}} -% \def\denker{{\denkerfont\char65}} -% \def\uhr{{\uhrfont\char65}} -% \def\warnschild{{\warnschildfont\char 65}} -% \def\hardA{\warnschild} -% \def\longA{\uhr} -% \def\thinkA{\denker} -% \def\discussA{\bierglas} -% \end{verbatim} -% -% Finally, we need to terminate the file with a success mark for perl. -% \begin{macrocode} -%1; -% \end{macrocode} -% \Finale -\endinput -% \iffalse -% LocalWords: GPL structuresharing STR -%%% Local Variables: -%%% mode: doctex -%%% TeX-master: t -%%% End: -% \fi diff --git a/Master/texmf-dist/source/latex/stex/bin/checksum b/Master/texmf-dist/source/latex/stex/bin/checksum index 7e521deaa7c..9f0e533a8d4 100755 --- a/Master/texmf-dist/source/latex/stex/bin/checksum +++ b/Master/texmf-dist/source/latex/stex/bin/checksum @@ -26,7 +26,10 @@ $path = abs_path($path); my ($volume,$dir,$file) = File::Spec->splitpath( $path ); my @lines = `cd $dir; pdflatex "\\nonstopmode\\input{$file}"` if ($mode eq "update"); my ($checksum) = map {$_=~/^\* The checksum should be (\d+)!/; $1;} grep ($_ =~ /^\* The checksum should be (\d+)!/,@lines) if @lines; - +if (!$checksum) { +#One more possible error message: + ($checksum) = map {$_=~/^! Package doc Error: Checksum not passed \((\d+)<>(\d+)\)\./; $2;} grep ($_ =~ /^! Package doc Error: Checksum not passed \((\d+)<>(\d+)\)\./,@lines) if @lines; +} open(IN,"<$path") or die "Cannot open DTX source: $path\n"; @lines = (); while () { @@ -38,8 +41,8 @@ print OUT join("",@lines); close(OUT); ######### Subroutines ############ sub update { - my $checksum=$_[1]||"1"; - $_[0]=~s/\\CheckSum\{\d*\}/\\CheckSum{$checksum}/; + my $checksum=$_[1]; + $_[0]=~s/\\CheckSum\{\d*\}/\\CheckSum{$checksum}/ if $checksum; $_[0]; } diff --git a/Master/texmf-dist/source/latex/stex/bin/grep-rerun b/Master/texmf-dist/source/latex/stex/bin/grep-rerun new file mode 100755 index 00000000000..f73ef082fbb --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/grep-rerun @@ -0,0 +1,59 @@ +#!/usr/bin/perl -w +####################################################################################### +# A tool for updating .dtx files with a correspodning checksum counter # +# Copyright (c) 2010, Deyan Ginev, released under the Gnu General Public License (GPL)# +# see http://www.gnu.org/copyleft/gpl.html # +# $URL: https://svn.kwarc.info/repos/stex/trunk/bin/gre-rerun$ # +####################################################################################### + +use strict; + +use Getopt::Long; +use Pod::Usage; +use File::Spec; +use Cwd qw(abs_path); + +####### start of program ####### +my ($errlog,$pattern)=@ARGV; +my %rerun_set = (); +open(IN,"<",$errlog); +my ($errvol,$errdir)=File::Spec->splitpath($errlog); +my $currpath=abs_path($errdir); +while () { + #Entering, update path + if (/^Entering (.+)$/) { + $currpath.="/$1"; + } + #Leaving, update path + elsif (/^Leaving (.+)$/) { + $currpath =~ s/(\/$1)$//; + } + #Matching error, note source + elsif (/$pattern/) { + my ($name) = split(/:/,$_); + ($name) = split(/\./,$name); + $rerun_set{$currpath."/".$name.".tex"}=1; + } +} +#Perform rerun of affected sources: +print STDERR scalar(keys %rerun_set)." sources to rerun:\n"; +foreach (sort keys %rerun_set) { + my ($vol,$dir,$file) = File::Spec->splitpath( $_ ); + print STDERR "Trying $_\n"; + $file=~s/\.tex$/.omdoc/; + print STDERR `cd $dir; make $file -B`; +} +close(IN); + + +__END__ + + +=head1 SYNOPSIS + +grep-rerun + +Purpose: + Given an error log file, generated via the sTeX Makefiles, and an error pattern, fetches and reconverts all sources that suffered this error. +Example: + grep-rerun latex.errlog "Fatal:" diff --git a/Master/texmf-dist/source/latex/stex/bin/sms b/Master/texmf-dist/source/latex/stex/bin/sms index 4599f3e2763..360be4ea814 100755 --- a/Master/texmf-dist/source/latex/stex/bin/sms +++ b/Master/texmf-dist/source/latex/stex/bin/sms @@ -1,14 +1,17 @@ #!/usr/bin/perl -w ####################################################################################### # A tool for creating STeX Module Signatures (SMS) files. # -# Copyright (c) 2005, Ioan Sucan, released under the Gnu General Public License (GPL) # +# Copyright (c) 2005, Ioan Sucan; (c) 2010, Deyan Ginev, +# released under the Gnu General Public License (GPL) # # see http://www.gnu.org/copyleft/gpl.html # # $URL: svn://kwarc.eecs.iu-bremen.de/repos/kwarc/projects/content/bin/sms$ # # $Date: 2006-10-22 20:01:47 +0200 (Sun, 22 Oct 2006) $ $Rev: 10669 $ # ####################################################################################### use strict; - +use File::Spec::Functions qw(rel2abs); +use File::Basename; +use lib dirname(rel2abs($0)); #Assumption: Modparse is in the same folder as the sms binary. use Getopt::Long; use Modparse; use Pod::Usage; diff --git a/Master/texmf-dist/source/latex/stex/bin/stexml b/Master/texmf-dist/source/latex/stex/bin/stexml new file mode 100755 index 00000000000..2c0586b9130 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/stexml @@ -0,0 +1,2 @@ +exec latexmlc $1 --path=../../../stex/sty --path=../../../stex/rnc --path=../../../stex/rnc/omdoc --path=../../../stex/sty/modules --path=../../../stex/sty/statements --path=../../../stex/sty/sproof --path=../../../stex/sty/omtext --path=../../../stex/sty/omdoc --path=../../../stex/sty/sref --path=../../../stex/sty/presentation --path=../../../stex/sty/dcm --path=../../../stex/sty/reqdoc --path=../../../stex/sty/metakeys --path=../../../stex/sty/mikoslides --path=../../../stex/sty/problem --path=../../../stex/sty/assignment --path=../../../stex/sty/etc --path=../../../sty --path=../../../sty/ded --path=../../../sty/ed --local --mode=standard --destination=#dir/#name.tex.xml --postdest=#dir/#name.omdoc --log=#dir/#name.ltxlog --post --stylesheet=../../../stex/xsl/omdocpost.xsl \ + --openmath --pmml \ No newline at end of file diff --git a/Master/texmf-dist/source/latex/stex/bin/stexmlmod b/Master/texmf-dist/source/latex/stex/bin/stexmlmod new file mode 100755 index 00000000000..55dd1f6ab37 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/stexmlmod @@ -0,0 +1,2 @@ +exec latexmlc --preamble=../../../lib/pre.tex $1 --path=../../../stex/sty --path=../../../stex/rnc --path=../../../stex/rnc/omdoc --path=../../../stex/sty/modules --path=../../../stex/sty/statements --path=../../../stex/sty/sproof --path=../../../stex/sty/omtext --path=../../../stex/sty/omdoc --path=../../../stex/sty/sref --path=../../../stex/sty/presentation --path=../../../stex/sty/dcm --path=../../../stex/sty/reqdoc --path=../../../stex/sty/metakeys --path=../../../stex/sty/mikoslides --path=../../../stex/sty/problem --path=../../../stex/sty/assignment --path=../../../stex/sty/etc --path=../../../sty --path=../../../sty/ded --path=../../../sty/ed --local --mode=fragment --destination=#dir/#name.tex.xml --postdest=#dir/#name.omdoc --log=#dir/#name.ltxlog --post --stylesheet=../../../stex/xsl/omdocpost.xsl \ + --openmath --pmml diff --git a/Master/texmf-dist/source/latex/stex/cmathml/cmathml.dtx b/Master/texmf-dist/source/latex/stex/cmathml/cmathml.dtx index 6e6645d5164..9d121dc25d9 100644 --- a/Master/texmf-dist/source/latex/stex/cmathml/cmathml.dtx +++ b/Master/texmf-dist/source/latex/stex/cmathml/cmathml.dtx @@ -22,17 +22,18 @@ \usepackage{../ctansvn} \usepackage{hyperref} \usepackage[eso-foot,today]{svninfo} -\svnInfo $Id: cmathml.dtx 1502 2010-07-20 08:17:00Z kohlhase $ +\svnInfo $Id: cmathml.dtx 1671 2010-11-06 07:05:15Z kohlhase $ \svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/cmathml/cmathml.dtx $ \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{cmathml.dtx}\end{document} % % \fi % -%\CheckSum{1586} +%\iffalse\CheckSum{1586}\fi % % \changes{v0.1}{2006/01/10}{Initial Version} % \changes{v0.2}{2006/01/16}{Added big operators} @@ -744,6 +745,16 @@ % |\Ccomplement| & 1 & |\Ccomplement{\Cnaturalnumbers}| & $\Ccomplement{\mathbb{N}}$\\\hline %\end{cmtab} % +% +% \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 TRAC~\cite{sTeX:online}. +% \begin{compactenum} +% \item none reported yet +% \end{compactenum} +% % \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography}\newpage % % \section{The Implementation}\label{sec:impl} diff --git a/Master/texmf-dist/source/latex/stex/cnx/cnx.dtx b/Master/texmf-dist/source/latex/stex/cnx/cnx.dtx index f851073fead..55a197b6501 100644 --- a/Master/texmf-dist/source/latex/stex/cnx/cnx.dtx +++ b/Master/texmf-dist/source/latex/stex/cnx/cnx.dtx @@ -20,17 +20,18 @@ \bibliography{kwarc} \usepackage{ctansvn} \usepackage[eso-foot,today]{svninfo} -\svnInfo $Id: cnx.dtx 1502 2010-07-20 08:17:00Z kohlhase $ +\svnInfo $Id: cnx.dtx 1671 2010-11-06 07:05:15Z kohlhase $ \svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/cnx/cnx.dtx $ \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{cnx.dtx}\end{document} % % \fi % -%\CheckSum{432} +%\iffalse\CheckSum{432}\fi % % \changes{v0.1}{2005/12/06}{Initial Version} % \changes{v0.2}{2006/01/11}{Namespaces now work} @@ -98,6 +99,12 @@ % enclosed in curly braces, as in |\foo[args={a,comma,separated,list}]|. Note that the % order the key/value pairs appear in a KeyVal Argument is immaterial. % +% \subsection{Package Options}\label{sec:user:options} +% +% The |cnx| 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{Document Structure} % % \begin{exfig} @@ -324,6 +331,16 @@ % a caption, and tell {\latexml} that\ednote{err, exactly what does it tell latexml?} the % original of the images has the MIME type |image/jpeg|. % +% +% \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 TRAC~\cite{sTeX:online}. +% \begin{compactenum} +% \item none reported yet +% \end{compactenum} +% % \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography}\newpage % % \section{The Implementation} @@ -335,6 +352,22 @@ % 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). First we have the general options +% \begin{macrocode} +%<*package> +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{omdoc}} +% \end{macrocode} +% Finally, we need to declare the end of the option declaration section to {\LaTeX}. +% \begin{macrocode} +\ProcessOptions +% +% \end{macrocode} +% % We first make sure that the |sref|~\ctancite{Kohlhase:sref} and |graphicx| packages are % loaded. % \begin{macrocode} @@ -372,7 +405,7 @@ package LaTeXML::Package::Pool; use strict; use LaTeXML::Package; -RequirePackage('omd'); +RequirePackage('metakeys'); % \end{macrocode} % We set up the necessary namespaces, the first one is the default one for {\cnxml} % \begin{macrocode} @@ -447,9 +480,9 @@ Let('\thedocument@ID','\@empty'); % \begin{environment}{cnxmodule} % \begin{macrocode} %<*cls> -\omdaddkey{cnxmodule}{name} +\addmetakey{cnxmodule}{name} \srefaddidkey{cnxmodule}{id} -\newenvironment{cnxmodule}[1][]{\omdsetkeys{cnxmodule}{#1}}{} +\newenvironment{cnxmodule}[1][]{\metasetkeys{cnxmodule}{#1}}{} % %<*ltxml> DefKeyVal('cnxmodule','name','Semiverbatim'); @@ -493,19 +526,19 @@ DefEnvironment('{ccontent}',"#body"); \newenvironment{csection}[2][]% {\stepcounter{section}\strut\\[1.5ex]\noindent% {\Large\bfseries\arabic{section}.~{#2}}\\[1.5ex] -\omdsetkeys{sectioning}{#1}} +\metasetkeys{sectioning}{#1}} {} \newcounter{subsection}[section] \newenvironment{csubsection}[2][] {\refstepcounter{subsection}\strut\\[1ex]\noindent% {\large\bfseries{\arabic{section}.\arabic{subsection}.~#2\\[1ex]}}% -\omdsetkeys{sectioning}{#1}}% +\metasetkeys{sectioning}{#1}}% {} \newcounter{subsubsection}[subsection] \newenvironment{csubsubsection}[2][] {\refstepcounter{subsubsection}\strut\\[.5ex]\noindent {\bfseries\arabic{section}.\arabic{subsection}.\arabic{subsubsecction}~#2\\[.5ex]}% -\omdsetkeys{sectioning}{#1}}{} +\metasetkeys{sectioning}{#1}}{} % %<*ltxml> DefKeyVal('sectioning','id','Semiverbatim'); @@ -532,7 +565,7 @@ DefEnvironment('{csubsubsection}OptionalKeyVals:sectioning{}', % \begin{macrocode} %<*cls> \srefaddidkey{para}{id} -\newenvironment{cpara}[1][]{\omdsetkeys{para}{#1}}{\par} +\newenvironment{cpara}[1][]{\metasetkeys{para}{#1}}{\par} % %<*ltxml> DefKeyVal('para','id','Semiverbatim'); @@ -558,9 +591,9 @@ Tag('cnx:para', autoClose=>1, autoOpen=>1); % \begin{macrocode} %<*cls> \srefaddidkey{note} -\omdaddkey{note}{type} +\addmetakey{note}{type} \newenvironment{cnote}[1][]% -{\omdsetkeys{note}{#1}\par\noindent\strut\hfill\begin{minipage}{10cm}{\bfseries\note@type}:~}% +{\metasetkeys{note}{#1}\par\noindent\strut\hfill\begin{minipage}{10cm}{\bfseries\note@type}:~}% {\end{minipage}\hfill\strut\par} % %<*ltxml> @@ -578,7 +611,7 @@ DefEnvironment('{cnote}OptionalKeyVals:note','#body \srefaddidkey{equation}{id} \newenvironment{cequation}[1][]% -{\omdsetkeys{equation}{#1}\begin{displaymath}} +{\metasetkeys{equation}{#1}\begin{displaymath}} {\end{displaymath}} % %<*ltxml> @@ -602,10 +635,10 @@ DefEnvironment('{cequation} OptionalKeyVals:equation', % \begin{macrocode} %<*cls> \srefaddidkey{cquote} -\omdaddkey{cquote}{type} -\omdaddkey{cquote}{src} +\addmetakey{cquote}{type} +\addmetakey{cquote}{src} \newenvironment{cquote}[1][]{% -\omdsetkeys{cquote}{#1}\begin{center}\begin{minipage}{.8\textwidth}}{\end{minipage}\end{center}} +\metasetkeys{cquote}{#1}\begin{center}\begin{minipage}{.8\textwidth}}{\end{minipage}\end{center}} % %<*ltxml> DefKeyVal('cquote','id','Semiverbatim'); @@ -765,8 +798,8 @@ DefConstructor('\ref Semiverbatim', "&LookupValue('LABEL@# % \begin{macrocode} %<*cls> \srefaddidkey{example} -\omdaddkey{example}{name} -\newenvironment{cexample}[1][]{\omdsetkeys{example}{#1} +\addmetakey{example}{name} +\newenvironment{cexample}[1][]{\metasetkeys{example}{#1} {\ifx\example@name\@empty\else\noindent\bfseries{\example@name}\fi}} {} % @@ -789,14 +822,14 @@ DefEnvironment('{cexample}OptionalKeyVals:example', %<*cls> \newcounter{cexercise} \srefaddidkey{cexercise} -\omdaddkey{cexercise}{name} -\newenvironment{cexercise}[1][]{\omdsetkeys{cexercise}{#1} +\addmetakey{cexercise}{name} +\newenvironment{cexercise}[1][]{\metasetkeys{cexercise}{#1} {\ifx\cexercise@name\@empty\else\stepcounter{cexercise}\noindent\bfseries{\cexercise@name~\arabic{cexercise}}\fi}} {} \srefaddidkey{cproblem} -\newenvironment{cproblem}[1][]{\omdsetkeys{cproblem}{#1}}{}{} +\newenvironment{cproblem}[1][]{\metasetkeys{cproblem}{#1}}{}{} \srefaddidkey{csolution} -\newenvironment{csolution}[1][]{\omdsetkeys{csolution}{#1}}{\par\noindent\bfseries{Solution}}{} +\newenvironment{csolution}[1][]{\metasetkeys{csolution}{#1}}{\par\noindent\bfseries{Solution}}{} % %<*ltxml> DefKeyVal('cexercise','id','Semiverbatim'); @@ -827,9 +860,9 @@ DefEnvironment('{csolution}OptionalKeyVals:cproblem', % \begin{macrocode} %<*cls> \srefaddidkey{rule} -\omdaddkey{rule}{name} -\omdaddkey{rule}{type} -\newenvironment{crule}[1][]{\omdsetkeys{rule}{#1}% +\addmetakey{rule}{name} +\addmetakey{rule}{type} +\newenvironment{crule}[1][]{\metasetkeys{rule}{#1}% {\noindent\bfseries{\rule@type:}\ifx\rule@name\@empty\else~(\rule@name)\fi}}% {} % @@ -850,7 +883,7 @@ DefEnvironment('{crule}OptionalKeyVals:rule', % \begin{macrocode} %<*cls> \srefaddidkey{statement} -\newenvironment{statement}[1][]{\omdsetkeys{statement}{#1}}{} +\newenvironment{statement}[1][]{\metasetkeys{statement}{#1}}{} % %<*ltxml> DefKeyVal('statement','id','Semiverbatim'); @@ -863,7 +896,7 @@ DefEnvironment('{statement} OptionalKeyVals:statement',' \srefaddidkey{proof} -\newenvironment{proof}[1][]{\omdsetkeys{proof}{#1}}{} +\newenvironment{proof}[1][]{\metasetkeys{proof}{#1}}{} % %<*ltxml> DefKeyVal('proof','id','Semiverbatim'); @@ -876,9 +909,9 @@ DefEnvironment('{proof}OptionalKeyVals:proof','#body \srefaddidkey{definition} -\omdaddkey{definition}{term} -\omdaddkey{definition}{seealso} -\newenvironment{definition}[1][]{\omdsetkeys{definition}{#1}{\noindent\bfseries{Definition:}}}{} +\addmetakey{definition}{term} +\addmetakey{definition}{seealso} +\newenvironment{definition}[1][]{\metasetkeys{definition}{#1}{\noindent\bfseries{Definition:}}}{} % %<*ltxml> DefKeyVal('definition','id','Semiverbatim'); @@ -898,7 +931,7 @@ DefEnvironment('{definition}OptionalKeyVals:definition', % \begin{macrocode} %<*cls> \srefaddidkey{meaning} -\newenvironment{cmeaning}[1][]{\omdsetkeys{meaning}{#1}}{} +\newenvironment{cmeaning}[1][]{\metasetkeys{meaning}{#1}}{} % %<*ltxml> DefKeyVal('meaning','id','Semiverbatim'); @@ -912,11 +945,11 @@ DefEnvironment('{cmeaning}OptionalKeyVals:meaning','# % \begin{macro}{cnxn} % \begin{macrocode} %<*cls> -\omdaddkey{cnxn}{document} -\omdaddkey{cnxn}{target} -\omdaddkey{cnxn}{strength} +\addmetakey{cnxn}{document} +\addmetakey{cnxn}{target} +\addmetakey{cnxn}{strength} \newcommand{\cnxn}[2][]% keys, link text -{\omdsetkeys{cnxn}{#1}{\underline{#2}}\footnote{{\ttfamily\@ifx\cnxn@document\@empty\cnxn@document\fi\#\cnxn@target}}} +{\metasetkeys{cnxn}{#1}{\underline{#2}}\footnote{{\ttfamily\@ifx\cnxn@document\@empty\cnxn@document\fi\#\cnxn@target}}} \newcommand\@makefntext[1]{\parindent 1em\noindent\hb@xt@1.8em{\hss\@makefnmark}#1} % %<*ltxml> @@ -931,8 +964,8 @@ DefConstructor('\cnxn OptionalKeyVals:cnxn {}','#1 -\omdaddkey{link}{src} -\newcommand{\link}[2][]{\omdsetkeys{link}{#1}\underline{#2}} +\addmetakey{link}{src} +\newcommand{\link}[2][]{\metasetkeys{link}{#1}\underline{#2}} % %<*ltxml> DefKeyVal('link','src','Semiverbatim'); @@ -950,13 +983,13 @@ DefConstructor('\link OptionalKeyVals:link {}','#2 \srefaddidkey{cfigure} -\omdaddkey{cfigure}{type} -\omdaddkey{cfigure}{caption} +\addmetakey{cfigure}{type} +\addmetakey{cfigure}{caption} \newcounter{figure} \newcommand{\cfigure}[3][]{% cnx_keys, graphicx_keys, path \begin{center}% \includegraphics[#2]{#3}% -\omdsetkeys{cfigure}{#1}\sref@target% +\metasetkeys{cfigure}{#1}\sref@target% \ifx\cfigure@caption\@empty\else \par\noindent Figure\refstepcounter{figure} {\arabic{figure}}: \cfigure@caption% \protected@edef\@currentlabel{\arabic{figure}}% @@ -981,8 +1014,8 @@ DefConstructor('\cfigure OptionalKeyVals:cfigure Semiverbatim Semiverbatim', % \begin{macro}{ccite} % \begin{macrocode} %<*cls> -\omdaddkey{ccite}{src} -\newcommand{\ccite}[2][]{\omdsetkeys{ccite}{#1}\emph{#2}} +\addmetakey{ccite}{src} +\newcommand{\ccite}[2][]{\metasetkeys{ccite}{#1}\emph{#2}} % %<*ltxml> DefKeyVal('ccite','src','Semiverbatim'); @@ -1007,9 +1040,9 @@ DefConstructor('\term[]{}',"#2"); % \begin{environment}{metadata} % \begin{macrocode} %<*cls> -\omdaddkey{metadata}{version} -\omdaddkey{metadata}{created} -\omdaddkey{metadata}{revised} +\addmetakey{metadata}{version} +\addmetakey{metadata}{created} +\addmetakey{metadata}{revised} \newsavebox{\metadatabox} \newenvironment{metadata}[1][]% {\noindent\hfill\begin{lrbox}{\metadatabox} @@ -1062,13 +1095,13 @@ DefEnvironment('{maintainerlist}',"#body" % \begin{macrocode} %<*cls> \srefaddidkey{auth} -\omdaddkey{auth}{honorific} -\omdaddkey{auth}{firstname} -\omdaddkey{auth}{other} -\omdaddkey{auth}{surname} -\omdaddkey{auth}{lineage} -\omdaddkey{auth}{email} -\newcommand{\cnxauthor}[1][]{\omdsetkeys{auth}{#1}\auth@first~\auth@sur,} +\addmetakey{auth}{honorific} +\addmetakey{auth}{firstname} +\addmetakey{auth}{other} +\addmetakey{auth}{surname} +\addmetakey{auth}{lineage} +\addmetakey{auth}{email} +\newcommand{\cnxauthor}[1][]{\metasetkeys{auth}{#1}\auth@first~\auth@sur,} % %<*ltxml> DefKeyVal('auth','id','Semiverbatim'); @@ -1091,7 +1124,7 @@ DefConstructor('\cnxauthor OptionalKeyVals:auth', % \begin{macro}{maintainer} % \begin{macrocode} %<*cls> -\newcommand{\maintainer}[1][]{\omdsetkeys{auth}{#1}\auth@first~\auth@sur,} +\newcommand{\maintainer}[1][]{\metasetkeys{auth}{#1}\auth@first~\auth@sur,} % %<*ltxml> DefConstructor('\maintainer OptionalKeyVals:auth', @@ -1161,12 +1194,12 @@ DefEnvironment('{cnxabstract} OptionalKeyVals:cnxabstract', % LocalWords: def-cmean cnxn keyval hh ss authorlist maintainerlist cnxauthor % LocalWords: firstname keywordlist cnxabstract cexercise cproblem csolution % LocalWords: cfigure cfigure cgraphics graphicx printbibliography textsf sref -% LocalWords: langle textsf langle ltxml ctancite sref cls setlength omd ltx +% LocalWords: langle textsf langle ltxml ctancite sref cls setlength ltx % LocalWords: paperheight paperwidth size10.clo pagenumbering ltxml.dtd enumi % LocalWords: itemizei idprefix itemizeii itemizeiii itemizeiv itemizev enumii % LocalWords: itemizevi enumiii enumiv enumv enumvi theenumi theenumii Sucan -% LocalWords: theenumiii theenumiv theequation textwidth thedocument omdaddkey -% LocalWords: environement srefaddidkey newenvironment omdsetkeys Semiverbatim +% LocalWords: theenumiii theenumiv theequation textwidth thedocument +% LocalWords: environement srefaddidkey newenvironment Semiverbatim % LocalWords: OptionalKeyVals newcounter stepcounter noindent bfseries % LocalWords: refstepcounter subsubsection whatsit findnodes hfill % LocalWords: displaymath cquote emph eqnarray envionment endeqnarray csname diff --git a/Master/texmf-dist/source/latex/stex/dcm/dcm.dtx b/Master/texmf-dist/source/latex/stex/dcm/dcm.dtx index c78aeb8566f..ba7bdc3df31 100644 --- a/Master/texmf-dist/source/latex/stex/dcm/dcm.dtx +++ b/Master/texmf-dist/source/latex/stex/dcm/dcm.dtx @@ -1,8 +1,8 @@ % \iffalse meta-comment % An Infrastructure for marking up Dublin Core Metadata in LaTeX documents % $URL: https://svn.kwarc.info/repos/stex/trunk/sty/dcm/dcm.dtx $ -% $Rev: 1502 $; last modified by $Author: kohlhase $ -% $Date: 2010-07-20 10:17:00 +0200 (Tue, 20 Jul 2010) $ +% $Rev: 1671 $; last modified by $Author: kohlhase $ +% $Date: 2010-11-06 08:05:15 +0100 (Sat, 06 Nov 2010) $ % Copyright (c) 2007 Michael Kohlhase, all rights reserved % this file is released under the % LaTeX Project Public License (LPPL) @@ -21,8 +21,9 @@ \bibliography{kwarc} \usepackage{../ctansvn} \usepackage{hyperref} +\usepackage{stex-logo} \usepackage[eso-foot,today]{svninfo} -\svnInfo $Id: dcm.dtx 1502 2010-07-20 08:17:00Z kohlhase $ +\svnInfo $Id: dcm.dtx 1671 2010-11-06 07:05:15Z kohlhase $ \svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/dcm/dcm.dtx $ \makeindex \floatstyle{boxed} @@ -32,11 +33,12 @@ url=http://dfki.de/jdoe]{John Doe} \DCMperson[id=miko,affiliation={Jacobs University, Bremen}, url=http://kwarc.info/kohlhase]{Michael Kohlhase} +\def\tracissue#1{\cite{sTeX:online}, \hyperlink{http://trac.kwarc.info/sTeX/ticket/#1}{issue #1}} \begin{document}\DocInput{dcm.dtx}\end{document} % % \fi % -%\CheckSum{667} +%\iffalse\CheckSum{667}\fi % % \changes{v0.1}{2007/01/02}{First Hack for OMDoc spec} % \changes{v0.2}{2008/06/17}{First Version with Documentation} @@ -72,6 +74,12 @@ % % \DCMsection[id=user,creators={miko,jdoe}]{The User Interface} % +% \DCMsubsection[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). +% % \DCMsubsection{Persons} % % The |dcm| package recognizes that from a metadata perspective, persons are complex @@ -261,10 +269,39 @@ % \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 TRAC~\cite{sTeX:online}. +% \begin{compactenum} +% \item none reported yet +% \end{compactenum} +% % \StopEventually{\printbibliography} % % \DCMsection[creators=jdoe,id=impl]{The Implementation} -% +% +% The |dcm| package generates two files: the {\LaTeX} package (all the code between +% {\textsf{$\langle$*package$\rangle$}} and {\textsf{$\langle$/package$\rangle$}}) and the +% {\latexml} bindings (between {\textsf{$\langle$*ltxml$\rangle$ and +% $\langle$/ltxml$\rangle$}}). We keep the corresponding code fragments together, +% since the documentation applies to both of them and to prevent them from getting out of +% sync. +% +% \DCMsubsection[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{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\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} @@ -288,22 +325,22 @@ RequirePackage('sref'); % % \begin{macrocode} %<*package> -\omdaddkey{dcm@person}{id} -\omdaddkey{dcm@person}{birthdate} -\omdaddkey{dcm@person}{email} -\omdaddkey{dcm@person}{url} -\omdaddkey{dcm@person}{affiliation} -\omdaddkey{dcm@person}{personaltitle} -\omdaddkey{dcm@person}{academictitle} -\omdaddkey{dcm@person}{department} -\omdaddkey{dcm@person}{workaddress} -\omdaddkey{dcm@person}{privaddress} -\omdaddkey{dcm@person}{worktel} -\omdaddkey{dcm@person}{privtel} -\omdaddkey{dcm@person}{workfax} -\omdaddkey{dcm@person}{privfax} -\omdaddkey{dcm@person}{worktelfax} -\omdaddkey{dcm@person}{privtelfax} +\addmetakey{dcm@person}{id} +\addmetakey{dcm@person}{birthdate} +\addmetakey{dcm@person}{email} +\addmetakey{dcm@person}{url} +\addmetakey{dcm@person}{affiliation} +\addmetakey{dcm@person}{personaltitle} +\addmetakey{dcm@person}{academictitle} +\addmetakey{dcm@person}{department} +\addmetakey{dcm@person}{workaddress} +\addmetakey{dcm@person}{privaddress} +\addmetakey{dcm@person}{worktel} +\addmetakey{dcm@person}{privtel} +\addmetakey{dcm@person}{workfax} +\addmetakey{dcm@person}{privfax} +\addmetakey{dcm@person}{worktelfax} +\addmetakey{dcm@person}{privtelfax} % % \end{macrocode} % @@ -347,7 +384,7 @@ sub ExportMetadata { % \begin{macro}{DCMPerson} % \begin{macrocode} %<*package> -\newcommand{\DCMperson}[2][]{\omdsetkeys{dcm@person}{#1} +\newcommand{\DCMperson}[2][]{\metasetkeys{dcm@person}{#1} \ifx\dcm@person@id\@empty\@latex@warning{key 'id' undefined in DCMperson}\else \dcm@pers@def{name}{#2} \dcm@pers@def{email}{\dcm@person@email} @@ -389,7 +426,6 @@ DefKeyVal('dcm@person','worktelfax','Semiverbatim'); DefKeyVal('dcm@person','privtelfax','Semiverbatim'); DefConstructor('\DCMperson OptionalKeyVals:dcm@person {}','', -beforeDigest=> sub { AssignValue(inPreamble=>0); }, afterDigest=>sub { my ($stomach,$whatsit)=@_; my $keys=$whatsit->getArg(1); @@ -447,7 +483,7 @@ DefEnvironment('{DCmetadata}[]', "#body"); % % \begin{macrocode} %<*package> -\def\dc@mtabline#1#2{\xdef\tab@line{}% +\def\dcm@tabline#1#2{\xdef\tab@line{}% \@for\@p:={#1}\do{\xdef\tab@line{\tab@line&\dcm@pers@ref\@p{#2}}} \tab@line} \def\dcm@atabline#1#2#3{\xdef\tab@line{}% @@ -767,13 +803,14 @@ DefConstructor('\DCMabstract{}',"#1"); % \DCMsubsection{Augmented Sectioning Macros} % % \begin{macro}{\dcm@sect@clear@keys} -% We first define the sectioning keys with the infrastructure from the |omd| package~\ctancite{Kohlhase:omd} +% We first define the sectioning keys with the infrastructure from the |metakeys| +% package~\ctancite{Kohlhase:metakeys} % \begin{macrocode} %<*package> \srefaddidkey{dcm@sect} -\omdaddkey{dcm@sect}{short} -\omdaddkey{dcm@sect}{creators} -\omdaddkey{dcm@sect}{contributors} +\addmetakey{dcm@sect}{short} +\addmetakey{dcm@sect}{creators} +\addmetakey{dcm@sect}{contributors} % % \end{macrocode} % \end{macro} @@ -785,7 +822,7 @@ DefConstructor('\DCMabstract{}',"#1"); % |\dcm@section@*@style| macro specified \meta{style}. % \begin{macrocode} %<*package> -\def\dcm@section#1#2#3{\def\dcm@sect@type{#1}\omdsetkeys{dcm@sect}{#3}\sref@target% +\def\dcm@section#1#2#3{\def\dcm@sect@type{#1}\metasetkeys{dcm@sect}{#3}\sref@target% \ifx\dcm@sect@short\@empty\csname #1\endcsname{#2}% \else\csname #1\endcsname[\dcm@sect@short]{#2}\fi~% \@ifundefined{sect@style} % @@ -970,6 +1007,7 @@ RawTeX('\def\ISOtimestamp{\count1=\time\divide\count1 by 60 % hours \def\dcm@section@heading{Section} \def\dcm@subsection@heading{Subsection} \def\dcm@subsubsection@heading{Subsubsection} +\def\dcm@paragraph@heading{Paragraph} % % \end{macrocode} % @@ -1020,8 +1058,8 @@ Tag('dc:title',afterOpen=>\&numberIt,afterClose=>\&locateIt); % LocalWords: DCMlicensenotice DCMlicensenotice DCMcopyrightnotice titlepage % LocalWords: DCMcopyrightnotice DCMcclicense DCMcclicense user.blockstyles % LocalWords: DCMchapter DCMchatper DCMsubsubsection DCMsubsubsection ltxml -% LocalWords: user.conig makeatletter printbibliography omdaddkey expandafter -% LocalWords: xdef csname endcsname newcommand omdsetkeys ifx ifundefined affs +% LocalWords: user.conig makeatletter printbibliography expandafter +% LocalWords: xdef csname endcsname newcommand ifx ifundefined affs % LocalWords: Semiverbatim whatsit newenvironment mtabline providecommand vfil % LocalWords: DCMsubtitle cclicense defdcm impl.blockstyles newcounter vskip % LocalWords: stepcounter tabularnewline theauthors lineskip textbf noindent diff --git a/Master/texmf-dist/source/latex/stex/hwexam/hwexam.dtx b/Master/texmf-dist/source/latex/stex/hwexam/hwexam.dtx new file mode 100644 index 00000000000..f7abb4011cc --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/hwexam/hwexam.dtx @@ -0,0 +1,566 @@ +% \iffalse meta-comment +% An Infrastructure for marking up Assignments +% $URL: https://svn.kwarc.info/repos/stex/trunk/sty/hwexam/hwexam.dtx $ +% $Rev: 1671 $; last modified by $Author: kohlhase $ +% $Date: 2010-11-06 08:05:15 +0100 (Sat, 06 Nov 2010) $ +% Copyright (c) 2007 Michael Kohlhase, all rights reserved +% this file is released under the +% LaTeX Project Public License (LPPL) +% \fi +% +% \iffalse +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\ProvidesPackage{hwexam}[2010/06/25 v0.9b homework assignments and exams] +%\ProvidesClass{hwexam}[2010/06/25 v0.9b assignment and exam documents] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{url,float} +\usepackage{hwexam} +\usepackage[show]{ed} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} +\usepackage[eso-foot,today]{svninfo} +\svnInfo $Id: hwexam.dtx 1671 2010-11-06 07:05:15Z kohlhase $ +\svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/hwexam/hwexam.dtx $ +\usepackage{stex-logo} +\usepackage{../ctansvn} +\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{hwexam.dtx}\end{document} +% +% \fi +%\iffalse\CheckSum{323}\fi +% +% \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.} +% +% \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\\ +% Jacobs University, Bremen\\ +% \url{http://kwarc.info/kohlhase}} +% \maketitle +% +% \begin{abstract} +% The |hwexam| packge and class allows individual course assignment sheets and +% compond 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| 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} +% +% \DescribeEnv{assignment} This package supplies the |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 assigment 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 TRAC~\cite{sTeX:online}. +% \begin{compactenum} +% \item none reported yet +% \end{compactenum} +% +% \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. +% +% |hwexam.dtx| generates four files: |hwexam.cls| (all the code between +% {\textsf{$\langle$*cls$\rangle$}} and {\textsf{$\langle$/cls$\rangle$}}), |hwexam.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. +% +% \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{test}{\PassOptionsToPackage{\CurrentOption}{hwexam}} +\DeclareOption{multiple}{\PassOptionsToPackage{\CurrentOption}{hwexam}} +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\DeclareOption{extrefs}{\PassOptionsToPackage{\CurrentOption}{sref}} +\DeclareOption{notes}{\PassOptionsToPackage{\CurrentOption}{problem}} +\DeclareOption{hints}{\PassOptionsToPackage{\CurrentOption}{problem}} +\DeclareOption{solutions}{\PassOptionsToPackage{\CurrentOption}{problem}} +\DeclareOption{pts}{\PassOptionsToPackage{\CurrentOption}{problem}} +\DeclareOption{min}{\PassOptionsToPackage{\CurrentOption}{problem}} +\DeclareOption{boxed}{\PassOptionsToPackage{\CurrentOption}{problem}} +\DeclareOption{extract}{\PassOptionsToPackage{\CurrentOption}{problem}} +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{omdoc}} +\ProcessOptions +% +%<*ltxml.cls> +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +use LaTeXML::Util::Pathname; +use Cwd qw(cwd abs_path); +DeclareOption('test',,sub {PassOptions('hwexam','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('multiple',sub {PassOptions('hwexam','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('showmeta',sub {PassOptions('metakeys','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('extrefs',sub {PassOptions('sref','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('notes',sub {PassOptions('problem','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('hints',sub {PassOptions('problem','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('solutions',sub {PassOptions('problem','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('pts',sub {PassOptions('problem','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('min',sub {PassOptions('problem','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('boxed',sub {PassOptions('problem','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('extract',sub {PassOptions('problem','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption(undef,sub {PassOptions('omdoc','cls',ToString(Digest(T_CS('\CurrentOption')))); }); +ProcessOptions(); +% +% \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} +\RequirePackage{stex} +\RequirePackage{hwexam} +\RequirePackage{graphicx} +\RequirePackage{a4wide} +\RequirePackage{amssymb} +\RequirePackage{amstext} +\RequirePackage{amsmath} +% +%<*ltxml.cls> +LoadClass('omdoc'); +RequirePackage('stex'); +RequirePackage('hwexam'); +RequirePackage('graphicx'); +RequirePackage('amssymb'); +RequirePackage('amstext'); +RequirePackage('amsmath'); +% +% \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> +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\newif\iftest\testfalse +\newif\ifsolutions\solutionsfalse +\DeclareOption{test}{\testtrue\solutionsfalse} +\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} +%<*package> +\RequirePackage{keyval}[1997/11/10] +\RequirePackage{problem} +% +% \end{macrocode} +% +% Here comes the equivalent header information for {\latexml}, we also initialize the +% package inclusions. Since {\latexml} does not handle options yet, we have nothing to +% do. +% \begin{macrocode} +%<*ltxml> +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +RequirePackage('problem'); +% +% \end{macrocode} +% +% Then we register the namespace of the requirements ontology +% \begin{macrocode} +%<*ltxml> +RegisterNamespace('assig'=>"http://omdoc.org/ontology/assignments#"); +RegisterDocumentNamespace('assig'=>"http://omdoc.org/ontology/assignments#"); +% +% \end{macrocode} +% +% \subsection{Assignments} +% +% We will prepare the keyval support for the |assignment| environment. +% +% \begin{macrocode} +%<*package> +\addmetakey{assig}{number} +\addmetakey*{assig}{title} +\addmetakey{assig}{type} +\addmetakey{assig}{given} +\addmetakey{assig}{due} +% \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} +\def\given@due#1#2{% +\ifx\assig@given\@empty\else\ifx\assig@due\@empty\else{#1}\fi\fi% +\ifx\assig@given\@empty\else{Given {\assig@given}}\fi% +\ifx\assig@given\@empty\else\ifx\assig@due\@empty\else{, }\fi\fi% +\ifx\assig@due\@empty\else{Due {\assig@due}}\fi% +\ifx\assig@given\@empty\else{\ifx\assig@due\@empty\else{#2}\fi}\fi} +% \end{macrocode} +% +% 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. +% +% \begin{macro}{assignment@titleblock} +% This macro prints the title block of a section. If the |multiple| package option is +% given we make a section heading out of this, and if not, a title block. Note that as +% |problem|s are numbered by section, we also set the section counter in the latter +% case. +% \begin{macrocode} +\ifmultiple +\def\assignment@titleblock{% +\@ifundefined{assig@number}{\stepcounter{section}}{\setcounter{section}{\assig@number}}% +\section*{\document@hwexamtype~\arabic{section}:~\assig@title\given@due{\\(})}% +\addcontentsline{toc}{section}{\document@hwexamtype~{\arabic{section}}:~\assig@title}% +\setcounter{problem}{0}} +\else +\def\assignment@titleblock{% +\setcounter{section}{\assig@number} +\begin{center}\bf +\Large\@title\\ +\document@hwexamtype~\assig@number:~\assig@title\strut\\ +\large{\given@due()} +\end{center}} +\fi +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{assignment@process@keys} +% this macro collects the keys from its arugment and corrects them from the outside. +% \begin{macrocode} +\def\assignment@process@keys#1{\metasetkeys{assig}{#1} +\ifx\inclassig@title\@empty\else\def\assig@title{\inclassig@title}\fi +\ifx\inclassig@type\@empty\else\def\assig@type{\inclassig@type}\fi +\ifx\inclassig@number\@empty\else\def\assig@number{\inclassig@number}\fi +\ifx\inclassig@due\@empty\else\def\assig@due{\inclassig@due}\fi +\ifx\inclassig@given\@empty\else\def\assig@given{\inclassig@given}\fi} +% \end{macrocode} +% for this to work we need to define the |\inclassig| macros in case no +% |\includeassignment| is ever called. +% \begin{macrocode} +\def\inclassig@title{} +\def\inclassig@type{} +\def\inclassig@number{} +\def\inclassig@due{} +\def\inclassig@given{} +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{assignment} +% \begin{macrocode} +\newenvironment{assignment}[1][]{\assignment@process@keys{#1}% +\assignment@titleblock}{} +% +% \end{macrocode} +% +% \begin{macrocode} +%<*ltxml> +DefEnvironment('{assignment} OptionalKeyVals:assig', + "" + . "" + . "" + . "Assignment ?&KeyVal(#1,'num')(&KeyVal(#1,'num').)()" + . "?&KeyVal(#1,'title')((&KeyVal(#1,'title')))" + . "" + . "?&KeyVal(#1,'given')(&KeyVal(#1,'given'))()" + . "?&KeyVal(#1,'due')(&KeyVal(#1,'due'))()" + . "?&KeyVal(#1,'pts')(&KeyVal(#1,'pts'))()" + . "" + . "#body" + ."\n"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{macrocode} +%<*package> +\addmetakey[\assig@default@type]{document}{hwexamtype} +% +% \end{macrocode} +% +% \subsection{Including Assignments} +% +% The next command is essentially a glorified |\include| statement, it just sets some +% internal macros first that overwrite the local points, \ednote{these keys should be done +% with \texttt{\textbackslash addmetakey}} +% +% \begin{macrocode} +%<*package> +\addmetakey{inclassig}{number} +\addmetakey{inclassig}{title} +\addmetakey{inclassig}{type} +\addmetakey{inclassig}{given} +\addmetakey{inclassig}{due} +\newcommand{\includeassignment}[2][]{\metasetkeys{inclassig}{#1}\include{#2}} +\newcommand{\inputassignment}[2][]{\metasetkeys{inclassig}{#1}\input{#2}} +% +%<*ltxml> +DefMacro('\includeassignment [] {}','\input{#2}'); +DefMacro('\inputassignment [] {}','\input{#2}'); +% +% \end{macrocode} +% +% \subsection{Typesetting Exams} +% +% \begin{macrocode} +%<*package> +\addmetakey{quizheading}{tas} +\newcommand\quizheading[1]{\def\@tas{#1}% +\large\noindent NAME: \hspace{8cm} MAILBOX:\\[2ex]% +\ifx\@tas\@empty\else% +\noindent YOUR TA: \@for\@I:=\@tas\do{$\Box$ \@I\hspace*{1em}}\\[2ex]\fi} +% +% \end{macrocode} +% \begin{macrocode} +%<*package> +\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\test@heading@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} +% +%<*ltxml> +DefEnvironment('{testheading}OptionalKeyVals:omdoc',''); +% +% \end{macrocode} +% +% \begin{macrocode} +%<*package> +\def\testspace#1{\iftest\vspace*{#1}\fi} +\def\testnewpage{\iftest\newpage\fi} +\def\testemptypage{\iftest\begin{center}This page was intentionally left + blank for extra space\end{center}\vfill\eject\else\fi} +% +%<*ltxml> +DefConstructor('\testspace{}',''); +DefConstructor('\testnewpage',''); +DefConstructor('\testemptypage',''); +% +% \end{macrocode} +% +% \begin{macro}{\@problem} +% This macro acts on a problem's record in the |*.aux| file. Here we redefine it to +% generate the correction table. +% \begin{macrocode} +%<*package> +\def\@problem#1#2#3{\stepcounter{assignment@probs} +\def\@test{#2}\ifx\@test\@empty\else\addtocounter{assignment@totalpts}{#2}\fi +\def\@test{#3}\ifx\@test\@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} +%<*package> +\newcounter{assignment@probs} +\newcounter{assignment@totalpts} +\newcounter{assignment@totalmin} +\def\correction@probs{prob.}% +\def\correction@pts{total}% +\def\correction@reached{reached}% +\stepcounter{assignment@probs} +\def\correction@table{\begin{tabular}{|l|*{\theassignment@probs}{c|}|p{3cm}|}\hline% +&\multicolumn{\theassignment@probs}{c||}% +{\footnotesize To be used for grading, do not write here} &\\\hline +\correction@probs & Sum & grade\\\hline +\correction@pts &\theassignment@totalpts & \strut\hspace{3cm}\strut\\\hline +\correction@reached & & \\[.7cm]\hline +\end{tabular}} +% +% \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 +% +% \def\bierglas{{\bierfont\char65}} +% \def\denker{{\denkerfont\char65}} +% \def\uhr{{\uhrfont\char65}} +% \def\warnschild{{\warnschildfont\char 65}} +% \def\hardA{\warnschild} +% \def\longA{\uhr} +% \def\thinkA{\denker} +% \def\discussA{\bierglas} +% \end{verbatim} +% +% Finally, we need to terminate the file with a success mark for perl. +% \begin{macrocode} +%1; +% \end{macrocode} +% \Finale +\endinput +% \iffalse +% LocalWords: GPL structuresharing STR +%%% Local Variables: +%%% mode: doctex +%%% TeX-master: t +%%% End: +% \fi diff --git a/Master/texmf-dist/source/latex/stex/metakeys/metakeys.dtx b/Master/texmf-dist/source/latex/stex/metakeys/metakeys.dtx new file mode 100644 index 00000000000..c8ce7762f59 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/metakeys/metakeys.dtx @@ -0,0 +1,372 @@ +% \iffalse meta-comment +% An Infrastructure for marking up Metadata in LaTeX documents +% $URL: https://svn.kwarc.info/repos/stex/trunk/sty/metakeys/metakeys.dtx $ +% $Rev: 1671 $; last modified by $Author: kohlhase $ +% $Date: 2010-11-06 08:05:15 +0100 (Sat, 06 Nov 2010) $ +% Copyright (c) 2009 Michael Kohlhase, all rights reserved +% this file is released under the +% LaTeX Project Public License (LPPL) +% \fi +% +% \iffalse +%<*package> +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{metakeys}[2010/09/02 v0.9 Framework for Metadata Keys] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{stex-logo,url,array,float} +\usepackage[show]{ed} +\usepackage{../ctansvn} +\usepackage[eso-foot,today]{svninfo} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} +\svnInfo $Id: metakeys.dtx 1671 2010-11-06 07:05:15Z kohlhase $ +\svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/metakeys/metakeys.dtx $ +\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}} +\usepackage[showmeta]{metakeys} +\begin{document}\DocInput{metakeys.dtx}\end{document} +% +% \fi +% +%\iffalse\CheckSum{58}\fi +% +% \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\\ +% Jacobs University, Bremen\\ +% \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} +% +% The |metakeys| package supplies the infrastructure for extending {\sTeX} macros with +% ontology-based metadata. The |metakeys| infrastructure is intended to support the new +% metadata infrastructure for the {\omdoc} format~\cite{Kohlhase:omdoc1.2} introduced in +% {\omdocv{1.3}}~\cite{Kohlhase:OMDoc1.3}. +% +% \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} +% +% If \meta{group} is the name of a metadata key-group \meta{key} is a metadata keyword +% name, then \DescribeMacro{\addmetakey} +% \begin{quote} +% |\addmetakey[|\meta{default}|]{|\meta{group}|}{|\meta{key}|}| +% \end{quote} +% registers \meta{key} in the metadata group \meta{group}, with an optional value +% \meta{default} for \meta{key}. 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}. With these definitions in a used package\footnote{The \texttt\@ +% character is only allowed in packages.} |\foo[type=bar,id=f4711]| is formatted to +% \begin{quote} +% \addmetakey{foo}{id}\addmetakey{foo}{type}\makeatletter +% \newcommand\foo[1][]{\metasetkeys{foo}{#1} I have seen a \emph{foo} of type \texttt{\foo@type} +% with identifier \texttt{\foo@id}!}\makeatother +% \foo[type=bar,id=f4711] +% \end{quote} +% +% \begin{exfig}[ht] +% \begin{verbatim} +% \addmetakey{foo}{id} +% \addmetakey{foo}{type} +% \addmetakey[yes]{foo}{visible} +% \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! +% \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 TRAC~\cite{sTeX:online}. +% \begin{compactenum} +% \item none reported yet +% \end{compactenum} +% +% \StopEventually{\newpage\PrintChanges\printbibliography} +% +% \section{The Implementation}\label{sec:impl} +% +% The |metakeys| package generates two files: the {\LaTeX} package (all the code between +% {\textsf{$\langle$*package$\rangle$}} and {\textsf{$\langle$/package$\rangle$}}) and the +% {\latexml} bindings (between {\textsf{$\langle$*ltxml$\rangle$ and +% $\langle$/ltxml$\rangle$}}). 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). First we have the general options +% \begin{macrocode} +%<*package> +\newif\ifmetakeys@showmeta\metakeys@showmetafalse +\DeclareOption{showmeta}{\metakeys@showmetatrue} +% \end{macrocode} +% Finally, we need to declare the end of the option declaration section to {\LaTeX}. +% \begin{macrocode} +\ProcessOptions +% \end{macrocode} +% +% We build on the |keyval| package which we first need to load. +% \begin{macrocode} +\RequirePackage{keyval}[1997/11/10] +% +% \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} +%<*package> +\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} +%<*package> +\newcommand\addmetakey@star[3][]{\metakeys@ext@clear@keys{#2}{#3}{#1}% +\metakeys@initialize@showkeys{#2}% +\define@key{#2}{#3}[#1]{\expandafter\gdef\csname #2@#3\endcsname{##1}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\addmetakey@nostar} +% |\addmetakey@nostar| takes care of the 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}|@clearkeys|, (if the |showmeta| option is set) shows them, and +% then sets the keys via |keyval|s |\setkeys| command. +% \begin{macrocode} +%<*package> +\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} +%<*package> +\newcommand\metakeys@ext@clear@keys[3]{\@metakeys@ext@clear@keys{#1}{#1@#2}{#3}} +\newcommand\@metakeys@ext@clear@keys[3]{\@ifundefined{clear@#1@keys}% +{\expandafter\def\csname clear@#1@keys\endcsname% +{\expandafter\gdef\csname #2\endcsname{#3}}}% +{\expandafter\g@addto@macro\csname clear@#1@keys\endcsname% +{\expandafter\gdef\csname #2\endcsname{#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} +%<*package> +\newcommand\metakeys@initialize@showkeys[1]% +{\@ifundefined{#1@showkeys}{\expandafter\def\csname #1@showkeys\endcsname{}}{}}% +% \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} +\newcommand\metakeys@ext@showkeys[2]{\@ifundefined{#1@showkeys}% +{\expandafter\def\csname #1@showkeys\endcsname{#2}}% +{\expandafter\edef\csname #1@showkeys\endcsname{\csname #1@showkeys\endcsname,#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} +\newcommand\@metakeys@show@key[2]{\metakeys@show@key{#2}{#1}} +\newcommand\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} +\newcommand\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} +\newcommand\metakeys@show@keyval[2]{\expandafter\@metakeys@show@key\csname #1@#2\endcsname{#2}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\showmetakeys} +% \begin{macrocode} +%\newcommand\showmetakeys{\metakeys@showmetatrue} +%DefConstructor('\showmetakeys',''); +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hidemetakeys} +% \begin{macrocode} +%\newcommand\hidemetakeys{\metakeys@showmetafalse} +%DefConstructor('\hidemetakeys',''); +% \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} +%<*package> +\newcommand\addmetakeynew[3][]{\metakeys@ext@clear@keys{#2}{#3}{#1}% +\define@key{#2}{#3}{\expandafter\gdef\csname #2@#3\endcsname{##1}}} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\metakeys@unspecified} +% Ain 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} +\newcommand\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} +\newcommand\metakeysifus[4]{\message{testing #1@#2=\csname#1@#2\endcsname}% +\expandafter\ifx\csname #1@#2\endcsname\metakeys@unspecified{#3}\else{#4}\fi} +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Finale} +% +% Finally, we need to terminate the file with a success mark for perl. +% \begin{macrocode} +%1; +% \end{macrocode} +% \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 +% LocalWords: tableofcontents ednote showmeta +% LocalWords: makeatletter newcommand emph makeatother exfig vspace impl ltxml +% LocalWords: printbibliography keyval clearkeys expandafter gdef csname ifx +% LocalWords: endcsname setkeys ifundefined omfidus metakeysifus addmetakey +% LocalWords: doctex metasetkeys metasetkeys marginpar hidemetakeys textsf omd +% LocalWords: hidemetakeys showmetakeys showmetakeys langle textsf langle +% LocalWords: newif ifmetakeys showmetafalse showmetatrue ifstar showkeys +% LocalWords: nameuse setmetakeys addmetakeynew diff --git a/Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.dtx b/Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.dtx index 3840ff87e4e..e5aad153e3b 100644 --- a/Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.dtx +++ b/Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.dtx @@ -16,15 +16,18 @@ \documentclass{ltxdoc} \usepackage{url,array,float} \usepackage[show]{ed} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} \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{mikoslides.dtx}\end{document} % % \fi % -% \CheckSum{317} +% \iffalse\CheckSum{317}\fi % % \changes{v0.1}{2005/12/06}{Initial Version} % \changes{v0.2}{2006/01/11}{course notes back on seminar} @@ -75,10 +78,34 @@ % |beamer.cls|. % %\section{The User Interface}\label{sec:user} -% \StopEventually{\newpage\PrintChanges} % +% \subsection{Package Options}\label{sec:user:options} +% +% The |mikoslides| class 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).\ednote{document the functionality} +% +% +% \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 TRAC~\cite{sTeX:online}. +% \begin{compactenum} +% \item none reported yet +% \end{compactenum} +% +% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography} +% %\section{The Implementation}\label{sec:impl} % +% The |mikoslides| package generates two files: the {\LaTeX} package (all the code between +% {\textsf{$\langle$*package$\rangle$}} and {\textsf{$\langle$/package$\rangle$}}) and the +% {\latexml} bindings (between {\textsf{$\langle$*ltxml$\rangle$ and +% $\langle$/ltxml$\rangle$}}). 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{Initialization and Class Options}\label{sec:impl:init} % % For the {\latexml} bindings, we make sure the right perl packages are loaded. @@ -97,6 +124,7 @@ use LaTeXML::Package; % % \begin{macrocode} %<*cls> +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} \newif\ifnotes\notesfalse \newif\ifproblems\problemstrue \DeclareOption{notes}{\notestrue} @@ -120,6 +148,7 @@ RawTeX('\newif\ifproblems\problemsfalse'); \ifnotes \LoadClass{omdoc} \RequirePackage{a4wide} +\RequirePackage{marginnote} \RequirePackage[notheorems,noamsthm]{beamerarticle} \else \LoadClass[notheorems,noamsthm,10pt]{beamer} @@ -132,6 +161,7 @@ RawTeX('\newif\ifproblems\problemsfalse'); % %<*ltxml> LoadClass('omdoc'); +DefConstructor('\usetheme{}',''); % % \end{macrocode} % @@ -218,6 +248,7 @@ DefEnvironment('{note}','#body'); \def\itemize@level{outer} \def\itemize@outer{outer} \def\itemize@inner{inner} +\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 @@ -325,6 +356,7 @@ DefEnvironment('{problems}','#body'); % 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}}} @@ -345,10 +377,25 @@ DefEnvironment('{problems}','#body'); DefMacro('\textwarning',""); % % \end{macrocode} +% +% \subsection{Front Matter, Titles, etc} +% +% We need to redefine the frontmatter macros inherited from the |beamer| class, since +% there they take an optional argument. +% \begin{macrocode} +%<*ltxml> +DefMacro('\title[]{}', '\@add@frontmatter{ltx:title}{#1}'); +DefMacro('\date[]{}', '\@add@frontmatter{ltx:date}[role=creation]{#1}'); +DefMacro('\author[]{}', sub { andSplit(T_CS('\@author'),$_[1]); });#$ +% \end{macrocode} +% +% % Now, we specialize the slide environment that we have implemented above or inherited % from |seminar.cls| for some abbreviations, e.g. separator slides and title slides. % \begin{macrocode} %<*cls> +\newcommand\titleframe{\begin{frame}\titlepage\end{frame}} +\newenvironment{titleframewith}{\begin{frame}\titlepage}{\end{frame}} \newenvironment{ttitle}{\begin{center}\LARGE\begin{tabular}{|c|}\hline}% {\\\hline\end{tabular}\end{center}\vspace{1ex minus 1ex}} \newenvironment{ttitlejoint}[1]% @@ -358,9 +405,14 @@ DefMacro('\textwarning',""); \vspace{1ex minus 1ex}} % %<*ltxml> +DefConstructor('\titleframe',"titleframe elided here"); +DefEnvironment('{titleframewith}', + "begin elided titleframe" + . "#body" + ."end elided titleframe"); DefEnvironment('{titleslide}',""); DefEnvironment('{titleslide}',"#body"); -DefEnvironment('{ttitle}', "\n#body"); +DefEnvironment('{ttitle}', "\n#body"); % % \end{macrocode} % @@ -369,8 +421,7 @@ DefEnvironment('{ttitle}', "\n#body"); %<*cls> \newcommand{\putgraphicsat}[3]{% \begin{picture}(0,0)\put(#1){\includegraphics[#2]{#3}}\end{picture}} -\newcommand{\putat}[2]{% - \begin{picture}(0,0)\put(#1){#2}\end{picture}} +\newcommand{\putat}[2]{\begin{picture}(0,0)\put(#1){#2}\end{picture}} % %<*ltxml> % diff --git a/Master/texmf-dist/source/latex/stex/modules/modules.dtx b/Master/texmf-dist/source/latex/stex/modules/modules.dtx index d68258bcdf6..11f392bfaa7 100644 --- a/Master/texmf-dist/source/latex/stex/modules/modules.dtx +++ b/Master/texmf-dist/source/latex/stex/modules/modules.dtx @@ -22,7 +22,7 @@ \usepackage{amsfonts} \bibliography{kwarc} \usepackage[eso-foot,today]{svninfo} -\svnInfo $Id: modules.dtx 1502 2010-07-20 08:17:00Z kohlhase $ +\svnInfo $Id: modules.dtx 1676 2010-11-08 09:53:09Z kohlhase $ \svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/modules/modules.dtx $ \usepackage{../ctansvn} \usepackage{hyperref} @@ -30,11 +30,12 @@ \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{modules.dtx}\end{document} % % \fi % -% \CheckSum{779} +% \iffalse\CheckSum{787}\fi % % \changes{v0.9}{2005/06/14}{First Version with Documentation} % \changes{v0.9a}{2005/07/01}{Completed Documentation} @@ -148,6 +149,9 @@ % 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}. % +% If the \DescribeMacro{showmeta}|showmeta| is set, then the metadata keys are shown +% (see~\cite{Kohlhase:metakeys:ctan} for details and customization options). +% % \subsection{Modules and Inheritance}\label{sec:modules} % % \DescribeEnv{module} The |module| environment takes an optional |KeyVal| @@ -493,26 +497,55 @@ % the current module from the \sTeX module signature (see Section~\ref{sec:modules}) via % the |\importmodule| declaration. % -% \section{Tips and Tricks}\label{sec:tipstricks} +% \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 +% \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[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. +% % -% \subsection{Forward References}\label{sec:limitations:forward-references} +% \section{Limitations}\label{sec:limitations} % -% It is a inherent limitation of {\sTeX} that we cannot have simple forward references in -% the same file (|\importmodules{|\meta{thy}|}|, where \meta{thy} is in the same file -% after the occurrence of |\importmodule|). In this case, we need to use -% |\importmodule[|\meta{jobname}|]{|\meta{thy}|}|, where \meta{jobname} is the name of the -% file or (if it is the top-level file {\LaTeX} is called with) even |\jobname|. +% 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}. +% \begin{compactenum} +% \item none reported yet +% \end{compactenum} % % \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\newpage\printbibliography}\newpage % % \section{The Implementation} % -% The |modules| package generates to 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. +% 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} % @@ -521,6 +554,7 @@ % (otherwise they stay false). % \begin{macrocode} %<*package> +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} \newif\ifmod@show\mod@showfalse \DeclareOption{show}{\mod@showtrue} \newif\ifmod@qualified\mod@qualifiedfalse @@ -907,6 +941,12 @@ DefConstructor('\metalanguage OptionalSemiverbatim {}', % generates the {\omdoc} |symbol| and |presentation| elements (see % Section~\ref{sec:impl:presentation}). % \begin{macrocode} +%<*package> +\define@key{DefMathOp}{name}{\def\defmathop@name{#1}} +\newcommand\DefMathOp[2][]{% +\setkeys{DefMathOp}{#1}% +\symdef[#1]{\defmathop@name}{#2}} +% %<*ltxml> DefMacro('\DefMathOp OptionalKeyVals:symdef {}', sub { @@ -914,9 +954,13 @@ DefMacro('\DefMathOp OptionalKeyVals:symdef {}', my $name = KeyVal($keyval,'name') if $keyval; #Rewrite this token my $scopes = $STATE->getActiveScopes; - DefMathRewrite(active=>$scopes,xpath=>'descendant-or-self::ltx:XMath',match=>ToString($pres),replace=>"\\".ToString($name)); + DefMathRewrite(xpath=>'descendant-or-self::ltx:XMath',match=>ToString($pres), + replace=>sub{ + map {$STATE->activateScope($_);} @$scopes; + $_[0]->absorb(Digest("\\".ToString($name))); + }); #Invoke symdef - (Invocation(T_CS('\symdef'),$keyval,$name,undef,undef,$pres)->unlist); + (Invocation(T_CS('\symdef'),$keyval,$name,undef,undef,$pres)->unlist); }); DefMacro('\symdef OptionalKeyVals:symdef {}[][]{}', sub { @@ -1092,7 +1136,7 @@ DefPrimitive('\@symdef OptionalKeyVals:symdef {}[][]{}', sub { properties => {name=>$cs->toString, meaning=>$name,omcd=>$cd,role => $role}, scope=>$scope); return; }); -% +%%$ % \end{macrocode} % \end{macro} % @@ -1146,9 +1190,9 @@ DefPrimitive('\abbrdef OptionalKeyVals:symdef {}[][]{}', sub { % \begin{macrocode} %<*package> \def\mod@true{true} -\omdaddkey[false]{termdef}{local} -\omdaddkey{termdef}{name} -\newcommand{\termdef}[3][]{\omdsetkeys{termdef}{#1}% +\addmetakey[false]{termdef}{local} +\addmetakey{termdef}{name} +\newcommand{\termdef}[3][]{\metasetkeys{termdef}{#1}% \expandafter\mod@newcommand\csname#2\endcsname[0]{#3\xspace} \ifx\termdef@local\mod@true\else% \@ifundefined{mod@id}{}{\expandafter\g@addto@macro\this@module% @@ -1268,7 +1312,7 @@ DefMacro('\defpath{}{}', sub { my $paths = LookupValue('defpath')||{}; $$paths{"$arg1"}=$arg2; AssignValue('defpath'=>$paths,'global'); - DefMacro('\\'.$arg1.' {}',$arg2."/#1"); + DefMacro('\\'.$arg1.' Semiverbatim',$arg2."/#1"); });#$ % % \end{macrocode} @@ -1498,9 +1542,11 @@ DefPrimitive('\sinput Semiverbatim', sub { % \begin{macrocode} %<*package> \let\sinputref=\sinput +\let\inputref=\input % %<*ltxml> -DefConstructor('\sinputref{}',""); +DefConstructor('\sinputref{}',"