From 849996eca72af498b48b10fbea7f14c4b9d21b8f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 30 Mar 2012 23:23:02 +0000 Subject: restore stex (ca. 28jan12) git-svn-id: svn://tug.org/texlive/trunk@25792 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/stex/README | 13 + Master/texmf-dist/doc/latex/stex/cmath/README | 12 + Master/texmf-dist/doc/latex/stex/cmath/cmath.pdf | Bin 0 -> 331122 bytes Master/texmf-dist/doc/latex/stex/cmathml/README | 13 + .../texmf-dist/doc/latex/stex/cmathml/cmathml.pdf | Bin 0 -> 456477 bytes Master/texmf-dist/doc/latex/stex/cnx/README | 13 + Master/texmf-dist/doc/latex/stex/cnx/cnx.pdf | Bin 0 -> 341640 bytes Master/texmf-dist/doc/latex/stex/dcm/README | 14 + Master/texmf-dist/doc/latex/stex/dcm/dcm.pdf | Bin 0 -> 254733 bytes Master/texmf-dist/doc/latex/stex/example/Makefile | 4 + Master/texmf-dist/doc/latex/stex/example/README | 18 + .../doc/latex/stex/example/background/Makefile | 8 + .../doc/latex/stex/example/background/all.omdoc | 155 ++ .../doc/latex/stex/example/background/all.tex | 12 + .../latex/stex/example/background/functions.omdoc | 215 ++ .../latex/stex/example/background/functions.sms | 13 + .../latex/stex/example/background/functions.tex | 22 + .../doc/latex/stex/example/background/post.tex | 1 + .../doc/latex/stex/example/background/pre.tex | 8 + .../doc/latex/stex/example/background/reals.omdoc | 67 + .../doc/latex/stex/example/background/reals.sms | 5 + .../doc/latex/stex/example/background/reals.tex | 20 + .../doc/latex/stex/example/paper/Makefile | 7 + .../doc/latex/stex/example/paper/continuous.omdoc | 53 + .../doc/latex/stex/example/paper/continuous.sms | 6 + .../doc/latex/stex/example/paper/continuous.tex | 20 + .../latex/stex/example/paper/differentiable.omdoc | 48 + .../latex/stex/example/paper/differentiable.sms | 5 + .../latex/stex/example/paper/differentiable.tex | 16 + .../doc/latex/stex/example/paper/intro.omdoc | 145 + .../doc/latex/stex/example/paper/intro.sms | 2 + .../doc/latex/stex/example/paper/intro.tex | 96 + .../doc/latex/stex/example/paper/paper.omdoc | 48 + .../doc/latex/stex/example/paper/paper.pdf | Bin 0 -> 161414 bytes .../doc/latex/stex/example/paper/paper.tex | 149 + .../doc/latex/stex/example/test/Makefile | 7 + Master/texmf-dist/doc/latex/stex/hwexam/README | 12 + Master/texmf-dist/doc/latex/stex/hwexam/hwexam.pdf | Bin 0 -> 323201 bytes Master/texmf-dist/doc/latex/stex/metakeys/README | 11 + .../doc/latex/stex/metakeys/metakeys.pdf | Bin 0 -> 299544 bytes Master/texmf-dist/doc/latex/stex/mikoslides/README | 11 + .../doc/latex/stex/mikoslides/mikoslides.pdf | Bin 0 -> 298324 bytes Master/texmf-dist/doc/latex/stex/modules/README | 21 + .../texmf-dist/doc/latex/stex/modules/modules.pdf | Bin 0 -> 472622 bytes Master/texmf-dist/doc/latex/stex/omdoc/README | 12 + Master/texmf-dist/doc/latex/stex/omdoc/omdoc.pdf | Bin 0 -> 328731 bytes Master/texmf-dist/doc/latex/stex/omtext/README | 12 + Master/texmf-dist/doc/latex/stex/omtext/omtext.pdf | Bin 0 -> 338774 bytes .../texmf-dist/doc/latex/stex/presentation/README | 16 + .../doc/latex/stex/presentation/presentation.pdf | Bin 0 -> 409360 bytes Master/texmf-dist/doc/latex/stex/problem/README | 10 + .../texmf-dist/doc/latex/stex/problem/problem.pdf | Bin 0 -> 280208 bytes Master/texmf-dist/doc/latex/stex/rdfmeta/README | 11 + .../doc/latex/stex/rdfmeta/certification.pdf | Bin 0 -> 45243 bytes .../doc/latex/stex/rdfmeta/certification.tex | 26 + .../texmf-dist/doc/latex/stex/rdfmeta/rdfmeta.pdf | Bin 0 -> 333948 bytes Master/texmf-dist/doc/latex/stex/reqdoc/README | 12 + Master/texmf-dist/doc/latex/stex/reqdoc/reqdoc.pdf | Bin 0 -> 287460 bytes .../doc/latex/stex/reqdoc/requirements.pdf | Bin 0 -> 110091 bytes .../doc/latex/stex/reqdoc/requirements.tex | 136 + Master/texmf-dist/doc/latex/stex/sproof/README | 11 + Master/texmf-dist/doc/latex/stex/sproof/sproof.pdf | Bin 0 -> 352384 bytes Master/texmf-dist/doc/latex/stex/sref/README | 10 + Master/texmf-dist/doc/latex/stex/sref/book.pdf | Bin 0 -> 95620 bytes Master/texmf-dist/doc/latex/stex/sref/book.tex | 18 + Master/texmf-dist/doc/latex/stex/sref/idc.pdf | Bin 0 -> 61066 bytes Master/texmf-dist/doc/latex/stex/sref/idc.tex | 21 + Master/texmf-dist/doc/latex/stex/sref/idcmain.tex | 23 + Master/texmf-dist/doc/latex/stex/sref/scr.pdf | Bin 0 -> 71483 bytes Master/texmf-dist/doc/latex/stex/sref/scr.tex | 20 + Master/texmf-dist/doc/latex/stex/sref/scrmain.tex | 23 + Master/texmf-dist/doc/latex/stex/sref/sref.pdf | Bin 0 -> 335386 bytes Master/texmf-dist/doc/latex/stex/statements/README | 10 + .../doc/latex/stex/statements/statements.pdf | Bin 0 -> 401367 bytes Master/texmf-dist/doc/latex/stex/stex.pdf | Bin 0 -> 350237 bytes .../texmf-dist/doc/latex/stex/workaddress/README | 12 + .../doc/latex/stex/workaddress/workaddress.pdf | Bin 0 -> 296989 bytes Master/texmf-dist/source/latex/stex/bin/Makefile | 5 + .../texmf-dist/source/latex/stex/bin/Modparse.pm | 189 ++ Master/texmf-dist/source/latex/stex/bin/README | 151 + Master/texmf-dist/source/latex/stex/bin/TexId.pm | 464 ++++ Master/texmf-dist/source/latex/stex/bin/allgen | 30 + Master/texmf-dist/source/latex/stex/bin/bms | 340 +++ Master/texmf-dist/source/latex/stex/bin/checksum | 71 + .../texmf-dist/source/latex/stex/bin/convert-paths | 56 + Master/texmf-dist/source/latex/stex/bin/filedate | 45 + .../source/latex/stex/bin/gen-symdef-table.pl | 85 + Master/texmf-dist/source/latex/stex/bin/grep-rerun | 59 + Master/texmf-dist/source/latex/stex/bin/idcheck | 29 + Master/texmf-dist/source/latex/stex/bin/msplit | 140 + .../texmf-dist/source/latex/stex/bin/old/Makefile | 28 + .../texmf-dist/source/latex/stex/bin/old/defcon.l | 91 + .../texmf-dist/source/latex/stex/bin/old/idcheck.l | 130 + .../texmf-dist/source/latex/stex/bin/old/modstr.l | 137 + Master/texmf-dist/source/latex/stex/bin/old/symdef | 46 + Master/texmf-dist/source/latex/stex/bin/rf | 63 + .../source/latex/stex/bin/rng2dot/ModelRNC.pm | 770 ++++++ .../source/latex/stex/bin/rng2dot/rng2dot | 37 + Master/texmf-dist/source/latex/stex/bin/sgraph | 173 ++ Master/texmf-dist/source/latex/stex/bin/sms | 146 + Master/texmf-dist/source/latex/stex/bin/stexml | 2 + Master/texmf-dist/source/latex/stex/bin/stexmlmod | 2 + Master/texmf-dist/source/latex/stex/bin/termin | 279 ++ .../texmf-dist/source/latex/stex/cmath/cmath.dtx | 352 +++ .../texmf-dist/source/latex/stex/cmath/cmath.ins | 38 + .../source/latex/stex/cmathml/cmathml.dtx | 2503 +++++++++++++++++ .../source/latex/stex/cmathml/cmathml.ins | 37 + Master/texmf-dist/source/latex/stex/cnx/cnx.dtx | 1209 ++++++++ Master/texmf-dist/source/latex/stex/cnx/cnx.ins | 35 + Master/texmf-dist/source/latex/stex/dcm/dcm.dtx | 696 +++++ Master/texmf-dist/source/latex/stex/dcm/dcm.ins | 40 + .../texmf-dist/source/latex/stex/hwexam/hwexam.dtx | 578 ++++ .../texmf-dist/source/latex/stex/hwexam/hwexam.ins | 43 + Master/texmf-dist/source/latex/stex/make/Makefile | 3 + .../source/latex/stex/make/Makefile.base.in | 28 + .../source/latex/stex/make/Makefile.base.vars | 26 + .../texmf-dist/source/latex/stex/make/Makefile.in | 3 + .../source/latex/stex/make/Makefile.latex.in | 31 + .../source/latex/stex/make/Makefile.latex.vars | 16 + .../source/latex/stex/make/Makefile.latexml.in | 43 + .../source/latex/stex/make/Makefile.latexml.vars | 48 + .../source/latex/stex/make/Makefile.subdirs | 6 + .../source/latex/stex/make/Makefile.vars | 3 + Master/texmf-dist/source/latex/stex/make/README | 23 + .../source/latex/stex/metakeys/metakeys.dtx | 435 +++ .../source/latex/stex/metakeys/metakeys.ins | 40 + .../source/latex/stex/mikoslides/mikoslides.dtx | 576 ++++ .../source/latex/stex/mikoslides/mikoslides.ins | 40 + .../source/latex/stex/modules/modules.dtx | 2235 +++++++++++++++ .../source/latex/stex/modules/modules.ins | 38 + .../texmf-dist/source/latex/stex/omdoc/omdoc.dtx | 751 +++++ .../texmf-dist/source/latex/stex/omdoc/omdoc.ins | 40 + .../texmf-dist/source/latex/stex/omtext/omtext.dtx | 850 ++++++ .../texmf-dist/source/latex/stex/omtext/omtext.ins | 40 + .../latex/stex/presentation/presentation.dtx | 1438 ++++++++++ .../latex/stex/presentation/presentation.ins | 38 + .../source/latex/stex/problem/problem.dtx | 603 ++++ .../source/latex/stex/problem/problem.ins | 40 + .../source/latex/stex/rdfmeta/rdfmeta.dtx | 483 ++++ .../source/latex/stex/rdfmeta/rdfmeta.ins | 40 + .../texmf-dist/source/latex/stex/reqdoc/reqdoc.dtx | 387 +++ .../texmf-dist/source/latex/stex/reqdoc/reqdoc.ins | 40 + .../texmf-dist/source/latex/stex/schema/Makefile | 11 + .../latex/stex/schema/rnc/LaTeXML/LaTeXML-bib.rnc | 491 ++++ .../latex/stex/schema/rnc/LaTeXML/LaTeXML-bib.rng | 774 ++++++ .../stex/schema/rnc/LaTeXML/LaTeXML-block.rnc | 305 ++ .../stex/schema/rnc/LaTeXML/LaTeXML-block.rng | 479 ++++ .../stex/schema/rnc/LaTeXML/LaTeXML-common.rnc | 150 + .../stex/schema/rnc/LaTeXML/LaTeXML-common.rng | 229 ++ .../stex/schema/rnc/LaTeXML/LaTeXML-inline.rnc | 308 +++ .../stex/schema/rnc/LaTeXML/LaTeXML-inline.rng | 444 +++ .../latex/stex/schema/rnc/LaTeXML/LaTeXML-math.rnc | 374 +++ .../latex/stex/schema/rnc/LaTeXML/LaTeXML-math.rng | 557 ++++ .../latex/stex/schema/rnc/LaTeXML/LaTeXML-para.rnc | 193 ++ .../latex/stex/schema/rnc/LaTeXML/LaTeXML-para.rng | 312 +++ .../stex/schema/rnc/LaTeXML/LaTeXML-picture.rnc | 285 ++ .../stex/schema/rnc/LaTeXML/LaTeXML-picture.rng | 496 ++++ .../stex/schema/rnc/LaTeXML/LaTeXML-structure.rnc | 513 ++++ .../stex/schema/rnc/LaTeXML/LaTeXML-structure.rng | 916 +++++++ .../stex/schema/rnc/LaTeXML/LaTeXML-tabular.rnc | 124 + .../stex/schema/rnc/LaTeXML/LaTeXML-tabular.rng | 189 ++ .../latex/stex/schema/rnc/LaTeXML/LaTeXML.rnc | 41 + .../latex/stex/schema/rnc/LaTeXML/LaTeXML.rng | 70 + .../source/latex/stex/schema/rnc/LaTeXML/TAGS | 33 + .../stex/schema/rnc/LaTeXML/svg-animation.rnc | 208 ++ .../stex/schema/rnc/LaTeXML/svg-animation.rng | 364 +++ .../schema/rnc/LaTeXML/svg-animevents-attrib.rnc | 33 + .../schema/rnc/LaTeXML/svg-animevents-attrib.rng | 50 + .../stex/schema/rnc/LaTeXML/svg-basic-clip.rnc | 64 + .../stex/schema/rnc/LaTeXML/svg-basic-clip.rng | 110 + .../stex/schema/rnc/LaTeXML/svg-basic-filter.rnc | 338 +++ .../stex/schema/rnc/LaTeXML/svg-basic-filter.rng | 779 ++++++ .../stex/schema/rnc/LaTeXML/svg-basic-font.rnc | 196 ++ .../stex/schema/rnc/LaTeXML/svg-basic-font.rng | 490 ++++ .../rnc/LaTeXML/svg-basic-graphics-attrib.rnc | 49 + .../rnc/LaTeXML/svg-basic-graphics-attrib.rng | 64 + .../schema/rnc/LaTeXML/svg-basic-structure.rnc | 293 ++ .../schema/rnc/LaTeXML/svg-basic-structure.rng | 565 ++++ .../stex/schema/rnc/LaTeXML/svg-basic-text.rnc | 137 + .../stex/schema/rnc/LaTeXML/svg-basic-text.rng | 236 ++ .../latex/stex/schema/rnc/LaTeXML/svg-clip.rnc | 30 + .../latex/stex/schema/rnc/LaTeXML/svg-clip.rng | 29 + .../stex/schema/rnc/LaTeXML/svg-conditional.rnc | 62 + .../stex/schema/rnc/LaTeXML/svg-conditional.rng | 105 + .../schema/rnc/LaTeXML/svg-container-attrib.rnc | 33 + .../schema/rnc/LaTeXML/svg-container-attrib.rng | 39 + .../stex/schema/rnc/LaTeXML/svg-core-attrib.rnc | 35 + .../stex/schema/rnc/LaTeXML/svg-core-attrib.rng | 61 + .../latex/stex/schema/rnc/LaTeXML/svg-cursor.rnc | 47 + .../latex/stex/schema/rnc/LaTeXML/svg-cursor.rng | 81 + .../stex/schema/rnc/LaTeXML/svg-datatypes.rnc | 135 + .../stex/schema/rnc/LaTeXML/svg-datatypes.rng | 158 ++ .../schema/rnc/LaTeXML/svg-docevents-attrib.rnc | 38 + .../schema/rnc/LaTeXML/svg-docevents-attrib.rng | 73 + .../stex/schema/rnc/LaTeXML/svg-extensibility.rnc | 62 + .../stex/schema/rnc/LaTeXML/svg-extensibility.rng | 104 + .../schema/rnc/LaTeXML/svg-extresources-attrib.rnc | 28 + .../schema/rnc/LaTeXML/svg-extresources-attrib.rng | 33 + .../latex/stex/schema/rnc/LaTeXML/svg-filter.rnc | 214 ++ .../latex/stex/schema/rnc/LaTeXML/svg-filter.rng | 468 ++++ .../latex/stex/schema/rnc/LaTeXML/svg-font.rnc | 108 + .../latex/stex/schema/rnc/LaTeXML/svg-font.rng | 123 + .../latex/stex/schema/rnc/LaTeXML/svg-gradient.rnc | 99 + .../latex/stex/schema/rnc/LaTeXML/svg-gradient.rng | 233 ++ .../schema/rnc/LaTeXML/svg-graphevents-attrib.rnc | 47 + .../schema/rnc/LaTeXML/svg-graphevents-attrib.rng | 106 + .../schema/rnc/LaTeXML/svg-graphics-attrib.rnc | 64 + .../schema/rnc/LaTeXML/svg-graphics-attrib.rng | 83 + .../stex/schema/rnc/LaTeXML/svg-hyperlink.rnc | 66 + .../stex/schema/rnc/LaTeXML/svg-hyperlink.rng | 92 + .../latex/stex/schema/rnc/LaTeXML/svg-image.rnc | 56 + .../latex/stex/schema/rnc/LaTeXML/svg-image.rng | 91 + .../latex/stex/schema/rnc/LaTeXML/svg-marker.rnc | 76 + .../latex/stex/schema/rnc/LaTeXML/svg-marker.rng | 143 + .../latex/stex/schema/rnc/LaTeXML/svg-mask.rnc | 74 + .../latex/stex/schema/rnc/LaTeXML/svg-mask.rng | 129 + .../stex/schema/rnc/LaTeXML/svg-opacity-attrib.rnc | 34 + .../stex/schema/rnc/LaTeXML/svg-opacity-attrib.rng | 49 + .../stex/schema/rnc/LaTeXML/svg-paint-attrib.rnc | 97 + .../stex/schema/rnc/LaTeXML/svg-paint-attrib.rng | 180 ++ .../latex/stex/schema/rnc/LaTeXML/svg-pattern.rnc | 76 + .../latex/stex/schema/rnc/LaTeXML/svg-pattern.rng | 125 + .../latex/stex/schema/rnc/LaTeXML/svg-profile.rnc | 58 + .../latex/stex/schema/rnc/LaTeXML/svg-profile.rng | 76 + .../latex/stex/schema/rnc/LaTeXML/svg-qname.rng | 98 + .../latex/stex/schema/rnc/LaTeXML/svg-script.rnc | 38 + .../latex/stex/schema/rnc/LaTeXML/svg-script.rng | 51 + .../latex/stex/schema/rnc/LaTeXML/svg-shape.rnc | 207 ++ .../latex/stex/schema/rnc/LaTeXML/svg-shape.rng | 395 +++ .../stex/schema/rnc/LaTeXML/svg-structure.rnc | 62 + .../stex/schema/rnc/LaTeXML/svg-structure.rng | 78 + .../latex/stex/schema/rnc/LaTeXML/svg-style.rnc | 56 + .../latex/stex/schema/rnc/LaTeXML/svg-style.rng | 101 + .../latex/stex/schema/rnc/LaTeXML/svg-text.rnc | 275 ++ .../latex/stex/schema/rnc/LaTeXML/svg-text.rng | 572 ++++ .../latex/stex/schema/rnc/LaTeXML/svg-view.rnc | 42 + .../latex/stex/schema/rnc/LaTeXML/svg-view.rng | 70 + .../schema/rnc/LaTeXML/svg-viewport-attrib.rnc | 36 + .../schema/rnc/LaTeXML/svg-viewport-attrib.rng | 53 + .../stex/schema/rnc/LaTeXML/svg-xlink-attrib.rnc | 67 + .../stex/schema/rnc/LaTeXML/svg-xlink-attrib.rng | 173 ++ .../latex/stex/schema/rnc/LaTeXML/svg11-basic.rng | 213 ++ .../latex/stex/schema/rnc/LaTeXML/svg11-tiny.rng | 159 ++ .../source/latex/stex/schema/rnc/LaTeXML/svg11.rnc | 193 ++ .../source/latex/stex/schema/rnc/LaTeXML/svg11.rng | 188 ++ .../source/latex/stex/schema/rnc/Makefile | 6 + .../source/latex/stex/schema/rnc/metadata.rnc | 41 + .../source/latex/stex/schema/rnc/omdoc+ltxml.rnc | 149 + .../latex/stex/schema/rnc/omdoc/MARCRelators.rnc | 23 + .../source/latex/stex/schema/rnc/omdoc/Makefile | 11 + .../source/latex/stex/schema/rnc/omdoc/README | 3 + .../latex/stex/schema/rnc/omdoc/arith1.omdoc | 1672 +++++++++++ .../stex/schema/rnc/omdoc/creativecommons.rnc | 48 + .../latex/stex/schema/rnc/omdoc/dublincore.rnc | 42 + .../latex/stex/schema/rnc/omdoc/mathml3-common.rnc | 84 + .../stex/schema/rnc/omdoc/mathml3-content.rnc | 373 +++ .../stex/schema/rnc/omdoc/mathml3-presentation.rnc | 536 ++++ .../schema/rnc/omdoc/mathml3-strict-content.rnc | 60 + .../latex/stex/schema/rnc/omdoc/mathml3-strict.rnc | 80 + .../source/latex/stex/schema/rnc/omdoc/mathml3.rnc | 21 + .../latex/stex/schema/rnc/omdoc/mocksoap.rnc | 39 + .../source/latex/stex/schema/rnc/omdoc/omcd2.rnc | 59 + .../latex/stex/schema/rnc/omdoc/omcdgroup2.rnc | 33 + .../latex/stex/schema/rnc/omdoc/omcdsig2.rnc | 32 + .../latex/stex/schema/rnc/omdoc/omdoc-common.rnc | 66 + .../source/latex/stex/schema/rnc/omdoc/omdoc.rnc | 24 + .../latex/stex/schema/rnc/omdoc/omdocadt.rnc | 49 + .../source/latex/stex/schema/rnc/omdoc/omdoccc.rnc | 10 + .../latex/stex/schema/rnc/omdoc/omdoccth.rnc | 53 + .../source/latex/stex/schema/rnc/omdoc/omdocdc.rnc | 29 + .../source/latex/stex/schema/rnc/omdoc/omdocdg.rnc | 28 + .../latex/stex/schema/rnc/omdoc/omdocdoc.rnc | 62 + .../latex/stex/schema/rnc/omdoc/omdocext.rnc | 64 + .../latex/stex/schema/rnc/omdoc/omdocmeta.rnc | 39 + .../latex/stex/schema/rnc/omdoc/omdocmobj.rnc | 27 + .../latex/stex/schema/rnc/omdoc/omdocmtxt.rnc | 105 + .../source/latex/stex/schema/rnc/omdoc/omdocpf.rnc | 39 + .../latex/stex/schema/rnc/omdoc/omdocphys.rnc | 47 + .../latex/stex/schema/rnc/omdoc/omdocpres.rnc | 91 + .../latex/stex/schema/rnc/omdoc/omdocquiz.rnc | 37 + .../source/latex/stex/schema/rnc/omdoc/omdocrt.rnc | 32 + .../source/latex/stex/schema/rnc/omdoc/omdocst.rnc | 135 + .../latex/stex/schema/rnc/omdoc/openmath2.rnc | 89 + .../source/latex/stex/schema/rnc/omdoc/pxhtml.rnc | 17 + .../source/latex/stex/schema/rnc/omdoc/schemas.xml | 4 + .../source/latex/stex/schema/rnc/omdoc/todo | 3 + .../source/latex/stex/schema/rnc/omdoc/todo.txt | 2 + .../latex/stex/schema/rnc/omdoc/xhtml-applet.rnc | 19 + .../latex/stex/schema/rnc/omdoc/xhtml-attribs.rnc | 14 + .../stex/schema/rnc/omdoc/xhtml-basic-table.rnc | 28 + .../latex/stex/schema/rnc/omdoc/xhtml-bdo.rnc | 7 + .../stex/schema/rnc/omdoc/xhtml-datatypes.rnc | 47 + .../stex/schema/rnc/omdoc/xhtml-hypertext.rnc | 16 + .../latex/stex/schema/rnc/omdoc/xhtml-image.rnc | 11 + .../latex/stex/schema/rnc/omdoc/xhtml-inlstyle.rnc | 3 + .../latex/stex/schema/rnc/omdoc/xhtml-list.rnc | 16 + .../latex/stex/schema/rnc/omdoc/xhtml-object.rnc | 24 + .../latex/stex/schema/rnc/omdoc/xhtml-param.rnc | 9 + .../latex/stex/schema/rnc/omdoc/xhtml-table.rnc | 67 + .../latex/stex/schema/rnc/omdoc/xhtml-text.rnc | 86 + .../source/latex/stex/schema/rnc/owl.rnc | 44 + .../source/latex/stex/schema/rnc/owl2+ltxml.rnc | 15 + .../source/latex/stex/schema/rnc/owl2-xml.rnc | 532 ++++ .../source/latex/stex/schema/rnc/owl2xml.rnc | 138 + .../source/latex/stex/schema/rnc/schemas.xml | 6 + .../source/latex/stex/schema/rnc/statements.rnc | 50 + .../latex/stex/schema/rnc/svg/svg-animation.rnc | 208 ++ .../stex/schema/rnc/svg/svg-animevents-attrib.rnc | 33 + .../latex/stex/schema/rnc/svg/svg-basic-clip.rnc | 64 + .../latex/stex/schema/rnc/svg/svg-basic-filter.rnc | 338 +++ .../latex/stex/schema/rnc/svg/svg-basic-font.rnc | 196 ++ .../schema/rnc/svg/svg-basic-graphics-attrib.rnc | 49 + .../stex/schema/rnc/svg/svg-basic-structure.rnc | 293 ++ .../latex/stex/schema/rnc/svg/svg-basic-text.rnc | 137 + .../source/latex/stex/schema/rnc/svg/svg-clip.rnc | 30 + .../latex/stex/schema/rnc/svg/svg-conditional.rnc | 62 + .../stex/schema/rnc/svg/svg-container-attrib.rnc | 33 + .../latex/stex/schema/rnc/svg/svg-core-attrib.rnc | 35 + .../latex/stex/schema/rnc/svg/svg-cursor.rnc | 47 + .../latex/stex/schema/rnc/svg/svg-datatypes.rnc | 135 + .../stex/schema/rnc/svg/svg-docevents-attrib.rnc | 38 + .../stex/schema/rnc/svg/svg-extensibility.rnc | 62 + .../schema/rnc/svg/svg-extresources-attrib.rnc | 28 + .../latex/stex/schema/rnc/svg/svg-filter.rnc | 214 ++ .../source/latex/stex/schema/rnc/svg/svg-font.rnc | 108 + .../latex/stex/schema/rnc/svg/svg-gradient.rnc | 99 + .../stex/schema/rnc/svg/svg-graphevents-attrib.rnc | 47 + .../stex/schema/rnc/svg/svg-graphics-attrib.rnc | 64 + .../latex/stex/schema/rnc/svg/svg-hyperlink.rnc | 66 + .../source/latex/stex/schema/rnc/svg/svg-image.rnc | 56 + .../latex/stex/schema/rnc/svg/svg-marker.rnc | 76 + .../source/latex/stex/schema/rnc/svg/svg-mask.rnc | 74 + .../stex/schema/rnc/svg/svg-opacity-attrib.rnc | 34 + .../latex/stex/schema/rnc/svg/svg-paint-attrib.rnc | 97 + .../latex/stex/schema/rnc/svg/svg-pattern.rnc | 76 + .../latex/stex/schema/rnc/svg/svg-profile.rnc | 58 + .../source/latex/stex/schema/rnc/svg/svg-qname.rnc | 116 + .../latex/stex/schema/rnc/svg/svg-script.rnc | 38 + .../source/latex/stex/schema/rnc/svg/svg-shape.rnc | 207 ++ .../latex/stex/schema/rnc/svg/svg-structure.rnc | 62 + .../source/latex/stex/schema/rnc/svg/svg-style.rnc | 56 + .../source/latex/stex/schema/rnc/svg/svg-text.rnc | 275 ++ .../source/latex/stex/schema/rnc/svg/svg-view.rnc | 42 + .../stex/schema/rnc/svg/svg-viewport-attrib.rnc | 36 + .../latex/stex/schema/rnc/svg/svg-xlink-attrib.rnc | 67 + .../latex/stex/schema/rnc/svg/svg11-basic.rnc | 183 ++ .../latex/stex/schema/rnc/svg/svg11-tiny.rnc | 138 + .../source/latex/stex/schema/rnc/svg/svg11.rnc | 193 ++ .../source/latex/stex/schema/rng/LaTeXML-bib.rng | 900 ++++++ .../source/latex/stex/schema/rng/LaTeXML-block.rng | 589 ++++ .../latex/stex/schema/rng/LaTeXML-common.rng | 235 ++ .../latex/stex/schema/rng/LaTeXML-inline.rng | 514 ++++ .../source/latex/stex/schema/rng/LaTeXML-math.rng | 613 +++++ .../source/latex/stex/schema/rng/LaTeXML-para.rng | 370 +++ .../latex/stex/schema/rng/LaTeXML-picture.rng | 594 ++++ .../latex/stex/schema/rng/LaTeXML-structure.rng | 1039 +++++++ .../latex/stex/schema/rng/LaTeXML-tabular.rng | 214 ++ .../source/latex/stex/schema/rng/LaTeXML.rng | 62 + .../source/latex/stex/schema/rng/MARCRelators.rng | 190 ++ .../source/latex/stex/schema/rng/Makefile | 23 + .../latex/stex/schema/rng/creativecommons.rng | 390 +++ .../source/latex/stex/schema/rng/dublincore.rng | 164 ++ .../stex/schema/rng/mathml3-cds-pragmatic.rng | 2899 ++++++++++++++++++++ .../latex/stex/schema/rng/mathml3-common.rng | 257 ++ .../latex/stex/schema/rng/mathml3-content.rng | 1543 +++++++++++ .../latex/stex/schema/rng/mathml3-pragmatic.rng | 290 ++ .../latex/stex/schema/rng/mathml3-presentation.rng | 2265 +++++++++++++++ .../stex/schema/rng/mathml3-strict-content.rng | 203 ++ .../latex/stex/schema/rng/mathml3-strict.rng | 267 ++ .../source/latex/stex/schema/rng/mathml3.rng | 23 + .../source/latex/stex/schema/rng/metadata.rng | 217 ++ .../source/latex/stex/schema/rng/omdoc+ltxml.rng | 436 +++ .../source/latex/stex/schema/rng/omdoc-common.rng | 317 +++ .../source/latex/stex/schema/rng/omdoc-xhtml.rng | 28 + .../source/latex/stex/schema/rng/omdoc.rng | 29 + .../source/latex/stex/schema/rng/omdocadt.rng | 229 ++ .../source/latex/stex/schema/rng/omdocattribs.rng | 257 ++ .../source/latex/stex/schema/rng/omdoccc.rng | 25 + .../source/latex/stex/schema/rng/omdoccth.rng | 228 ++ .../source/latex/stex/schema/rng/omdocdc.rng | 121 + .../source/latex/stex/schema/rng/omdocdg.rng | 92 + .../source/latex/stex/schema/rng/omdocdoc.rng | 240 ++ .../source/latex/stex/schema/rng/omdocext.rng | 330 +++ .../source/latex/stex/schema/rng/omdocmeta.rng | 220 ++ .../source/latex/stex/schema/rng/omdocmobj.rng | 77 + .../source/latex/stex/schema/rng/omdocmtxt.rng | 502 ++++ .../source/latex/stex/schema/rng/omdocpf.rng | 212 ++ .../source/latex/stex/schema/rng/omdocpres.rng | 386 +++ .../source/latex/stex/schema/rng/omdocquiz.rng | 176 ++ .../source/latex/stex/schema/rng/omdocrt.rng | 100 + .../source/latex/stex/schema/rng/omdocst.rng | 634 +++++ .../source/latex/stex/schema/rng/openmath2.rng | 253 ++ .../source/latex/stex/schema/rng/openmath3.rng | 247 ++ .../source/latex/stex/schema/rng/owl.rng | 193 ++ .../source/latex/stex/schema/rng/owl2+ltxml.rng | 32 + .../source/latex/stex/schema/rng/owl2-xml.rng | 1321 +++++++++ .../source/latex/stex/schema/rng/owl2xml.rng | 809 ++++++ .../source/latex/stex/schema/rng/pxhtml.rng | 19 + .../source/latex/stex/schema/rng/statements.rng | 279 ++ .../source/latex/stex/schema/rng/svg-animation.rng | 364 +++ .../stex/schema/rng/svg-animevents-attrib.rng | 50 + .../latex/stex/schema/rng/svg-basic-clip.rng | 110 + .../latex/stex/schema/rng/svg-basic-filter.rng | 779 ++++++ .../latex/stex/schema/rng/svg-basic-font.rng | 490 ++++ .../stex/schema/rng/svg-basic-graphics-attrib.rng | 64 + .../latex/stex/schema/rng/svg-basic-structure.rng | 565 ++++ .../latex/stex/schema/rng/svg-basic-text.rng | 236 ++ .../source/latex/stex/schema/rng/svg-clip.rng | 29 + .../latex/stex/schema/rng/svg-conditional.rng | 105 + .../latex/stex/schema/rng/svg-container-attrib.rng | 39 + .../latex/stex/schema/rng/svg-core-attrib.rng | 61 + .../source/latex/stex/schema/rng/svg-cursor.rng | 81 + .../source/latex/stex/schema/rng/svg-datatypes.rng | 158 ++ .../latex/stex/schema/rng/svg-docevents-attrib.rng | 73 + .../latex/stex/schema/rng/svg-extensibility.rng | 104 + .../stex/schema/rng/svg-extresources-attrib.rng | 33 + .../source/latex/stex/schema/rng/svg-filter.rng | 468 ++++ .../source/latex/stex/schema/rng/svg-font.rng | 123 + .../source/latex/stex/schema/rng/svg-gradient.rng | 233 ++ .../stex/schema/rng/svg-graphevents-attrib.rng | 106 + .../latex/stex/schema/rng/svg-graphics-attrib.rng | 83 + .../source/latex/stex/schema/rng/svg-hyperlink.rng | 92 + .../source/latex/stex/schema/rng/svg-image.rng | 91 + .../source/latex/stex/schema/rng/svg-marker.rng | 143 + .../source/latex/stex/schema/rng/svg-mask.rng | 129 + .../latex/stex/schema/rng/svg-opacity-attrib.rng | 49 + .../latex/stex/schema/rng/svg-paint-attrib.rng | 180 ++ .../source/latex/stex/schema/rng/svg-pattern.rng | 125 + .../source/latex/stex/schema/rng/svg-profile.rng | 76 + .../source/latex/stex/schema/rng/svg-script.rng | 51 + .../source/latex/stex/schema/rng/svg-shape.rng | 395 +++ .../source/latex/stex/schema/rng/svg-structure.rng | 78 + .../source/latex/stex/schema/rng/svg-style.rng | 101 + .../source/latex/stex/schema/rng/svg-text.rng | 572 ++++ .../source/latex/stex/schema/rng/svg-view.rng | 70 + .../latex/stex/schema/rng/svg-viewport-attrib.rng | 53 + .../latex/stex/schema/rng/svg-xlink-attrib.rng | 173 ++ .../source/latex/stex/schema/rng/svg11.rng | 188 ++ .../source/latex/stex/schema/rng/xhtml-applet.rng | 47 + .../source/latex/stex/schema/rng/xhtml-attribs.rng | 58 + .../source/latex/stex/schema/rng/xhtml-base.rng | 19 + .../latex/stex/schema/rng/xhtml-basic-table.rng | 146 + .../source/latex/stex/schema/rng/xhtml-bdo.rng | 37 + .../latex/stex/schema/rng/xhtml-datatypes.rng | 93 + .../latex/stex/schema/rng/xhtml-hypertext.rng | 63 + .../source/latex/stex/schema/rng/xhtml-image.rng | 40 + .../latex/stex/schema/rng/xhtml-inlstyle.rng | 9 + .../source/latex/stex/schema/rng/xhtml-link.rng | 52 + .../source/latex/stex/schema/rng/xhtml-list.rng | 95 + .../source/latex/stex/schema/rng/xhtml-object.rng | 82 + .../source/latex/stex/schema/rng/xhtml-param.rng | 32 + .../source/latex/stex/schema/rng/xhtml-table.rng | 263 ++ .../source/latex/stex/schema/rng/xhtml-text.rng | 307 +++ .../texmf-dist/source/latex/stex/sproof/sproof.dtx | 834 ++++++ .../texmf-dist/source/latex/stex/sproof/sproof.ins | 38 + Master/texmf-dist/source/latex/stex/sref/sref.dtx | 850 ++++++ Master/texmf-dist/source/latex/stex/sref/sref.ins | 38 + .../source/latex/stex/statements/statements.dtx | 1439 ++++++++++ .../source/latex/stex/statements/statements.ins | 38 + .../source/latex/stex/workaddress/workaddress.dtx | 552 ++++ .../source/latex/stex/workaddress/workaddress.ins | 40 + .../latex/stex/xsl/LaTeXML/LaTeXML-bib-xhtml.xsl | 54 + .../latex/stex/xsl/LaTeXML/LaTeXML-block-xhtml.xsl | 470 ++++ .../latex/stex/xsl/LaTeXML/LaTeXML-common.xsl | 121 + .../source/latex/stex/xsl/LaTeXML/LaTeXML-html.xsl | 53 + .../latex/stex/xsl/LaTeXML/LaTeXML-html5.xsl | 52 + .../stex/xsl/LaTeXML/LaTeXML-inline-xhtml.xsl | 120 + .../latex/stex/xsl/LaTeXML/LaTeXML-math-image.xsl | 36 + .../stex/xsl/LaTeXML/LaTeXML-math-mathml-html5.xsl | 36 + .../latex/stex/xsl/LaTeXML/LaTeXML-math-mathml.xsl | 46 + .../latex/stex/xsl/LaTeXML/LaTeXML-para-html5.xsl | 96 + .../latex/stex/xsl/LaTeXML/LaTeXML-para-xhtml.xsl | 97 + .../stex/xsl/LaTeXML/LaTeXML-picture-image.xsl | 36 + .../stex/xsl/LaTeXML/LaTeXML-picture-svg-html5.xsl | 33 + .../latex/stex/xsl/LaTeXML/LaTeXML-picture-svg.xsl | 35 + .../stex/xsl/LaTeXML/LaTeXML-structure-html5.xsl | 151 + .../stex/xsl/LaTeXML/LaTeXML-structure-xhtml.xsl | 261 ++ .../stex/xsl/LaTeXML/LaTeXML-tabular-xhtml.xsl | 89 + .../stex/xsl/LaTeXML/LaTeXML-webpage-html5.xsl | 248 ++ .../stex/xsl/LaTeXML/LaTeXML-webpage-xhtml.xsl | 249 ++ .../latex/stex/xsl/LaTeXML/LaTeXML-xhtml.xsl | 60 + .../source/latex/stex/xsl/LaTeXML/amsart.css | 11 + .../source/latex/stex/xsl/LaTeXML/closedbib.css | 5 + .../source/latex/stex/xsl/LaTeXML/core.css | 157 ++ .../source/latex/stex/xsl/LaTeXML/marginpar.css | 11 + .../source/latex/stex/xsl/LaTeXML/navbar-left.css | 9 + .../source/latex/stex/xsl/LaTeXML/navbar-right.css | 7 + .../source/latex/stex/xsl/LaTeXML/theme-blue.css | 15 + Master/texmf-dist/source/latex/stex/xsl/Makefile | 1 + Master/texmf-dist/source/latex/stex/xsl/doc.xsl | 109 + .../texmf-dist/source/latex/stex/xsl/graphics.xsl | 123 + .../texmf-dist/source/latex/stex/xsl/listings.xsl | 85 + .../texmf-dist/source/latex/stex/xsl/ltxml2cnx.xsl | 65 + Master/texmf-dist/source/latex/stex/xsl/math.xsl | 87 + .../texmf-dist/source/latex/stex/xsl/notations.xsl | 130 + .../texmf-dist/source/latex/stex/xsl/omdocpost.xsl | 50 + .../texmf-dist/source/latex/stex/xsl/owl2post.xsl | 83 + .../texmf-dist/source/latex/stex/xsl/symbols.xsl | 112 + Master/texmf-dist/tex/latex/stex/cmath/cmath.sty | 29 + .../tex/latex/stex/cmath/cmath.sty.ltxml | 55 + .../texmf-dist/tex/latex/stex/cmathml/cmathml.sty | 450 +++ .../tex/latex/stex/cmathml/cmathml.sty.ltxml | 974 +++++++ .../texmf-dist/tex/latex/stex/cmathml/cmathmlx.sty | 14 + .../tex/latex/stex/cmathml/cmathmlx.sty.ltxml | 22 + Master/texmf-dist/tex/latex/stex/cnx/cnx.cls | 142 + Master/texmf-dist/tex/latex/stex/cnx/cnx.cls.ltxml | 280 ++ Master/texmf-dist/tex/latex/stex/ctansvn.sty | 2 + Master/texmf-dist/tex/latex/stex/dcm/dcm.sty | 86 + Master/texmf-dist/tex/latex/stex/dcm/dcm.sty.ltxml | 72 + Master/texmf-dist/tex/latex/stex/hwexam/hwexam.cls | 34 + .../tex/latex/stex/hwexam/hwexam.cls.ltxml | 26 + Master/texmf-dist/tex/latex/stex/hwexam/hwexam.sty | 126 + .../tex/latex/stex/hwexam/hwexam.sty.ltxml | 40 + .../tex/latex/stex/metakeys/metakeys.sty | 63 + .../tex/latex/stex/metakeys/metakeys.sty.ltxml | 3 + .../latex/stex/mikoslides/beamerthemeJacobs.sty | 64 + .../tex/latex/stex/mikoslides/cc-by-sa.png | Bin 0 -> 5083 bytes .../tex/latex/stex/mikoslides/cc_somerights.png | Bin 0 -> 1082 bytes .../tex/latex/stex/mikoslides/dangerous-bend.png | Bin 0 -> 2117 bytes .../tex/latex/stex/mikoslides/jacobs-logo.png | Bin 0 -> 6260 bytes .../tex/latex/stex/mikoslides/mikoaffiliation.sty | 54 + .../stex/mikoslides/mikoaffiliation.sty.ltxml | 25 + .../tex/latex/stex/mikoslides/mikoslides.cls | 115 + .../tex/latex/stex/mikoslides/mikoslides.cls.ltxml | 94 + .../tex/latex/stex/mikoslides/shading-l2r.png | Bin 0 -> 1732 bytes .../texmf-dist/tex/latex/stex/modules/modules.sty | 262 ++ .../tex/latex/stex/modules/modules.sty.ltxml | 624 +++++ Master/texmf-dist/tex/latex/stex/omdoc/omdoc.cls | 28 + .../tex/latex/stex/omdoc/omdoc.cls.ltxml | 58 + Master/texmf-dist/tex/latex/stex/omdoc/omdoc.sty | 85 + .../tex/latex/stex/omdoc/omdoc.sty.ltxml | 67 + Master/texmf-dist/tex/latex/stex/omtext/omtext.sty | 96 + .../tex/latex/stex/omtext/omtext.sty.ltxml | 223 ++ .../tex/latex/stex/presentation/presentation.sty | 157 ++ .../latex/stex/presentation/presentation.sty.ltxml | 364 +++ .../texmf-dist/tex/latex/stex/problem/problem.sty | 117 + .../tex/latex/stex/problem/problem.sty.ltxml | 75 + .../texmf-dist/tex/latex/stex/rdfmeta/rdfmeta.sty | 68 + .../tex/latex/stex/rdfmeta/rdfmeta.sty.ltxml | 8 + Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty | 66 + .../tex/latex/stex/reqdoc/reqdoc.sty.ltxml | 23 + Master/texmf-dist/tex/latex/stex/sproof/sproof.sty | 84 + .../tex/latex/stex/sproof/sproof.sty.ltxml | 125 + Master/texmf-dist/tex/latex/stex/sref/sref.sty | 105 + .../texmf-dist/tex/latex/stex/sref/sref.sty.ltxml | 56 + .../tex/latex/stex/statements/statements.sty | 171 ++ .../tex/latex/stex/statements/statements.sty.ltxml | 365 +++ Master/texmf-dist/tex/latex/stex/stex-logo.sty | 5 + .../texmf-dist/tex/latex/stex/stex-logo.sty.ltxml | 18 + Master/texmf-dist/tex/latex/stex/stex.sty | 24 + Master/texmf-dist/tex/latex/stex/stex.sty.ltxml | 24 + Master/texmf-dist/tex/latex/stex/stex.tex | 417 +++ .../tex/latex/stex/workaddress/workaddress.sty | 136 + .../latex/stex/workaddress/workaddress.sty.ltxml | 63 + 554 files changed, 91211 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/stex/README create mode 100644 Master/texmf-dist/doc/latex/stex/cmath/README create mode 100644 Master/texmf-dist/doc/latex/stex/cmath/cmath.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/cmathml/README create mode 100644 Master/texmf-dist/doc/latex/stex/cmathml/cmathml.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/cnx/README create mode 100644 Master/texmf-dist/doc/latex/stex/cnx/cnx.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/dcm/README create mode 100644 Master/texmf-dist/doc/latex/stex/dcm/dcm.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/example/Makefile create mode 100644 Master/texmf-dist/doc/latex/stex/example/README create mode 100644 Master/texmf-dist/doc/latex/stex/example/background/Makefile create mode 100644 Master/texmf-dist/doc/latex/stex/example/background/all.omdoc create mode 100644 Master/texmf-dist/doc/latex/stex/example/background/all.tex create mode 100644 Master/texmf-dist/doc/latex/stex/example/background/functions.omdoc create mode 100644 Master/texmf-dist/doc/latex/stex/example/background/functions.sms create mode 100644 Master/texmf-dist/doc/latex/stex/example/background/functions.tex create mode 100644 Master/texmf-dist/doc/latex/stex/example/background/post.tex create mode 100644 Master/texmf-dist/doc/latex/stex/example/background/pre.tex create mode 100644 Master/texmf-dist/doc/latex/stex/example/background/reals.omdoc create mode 100644 Master/texmf-dist/doc/latex/stex/example/background/reals.sms create mode 100644 Master/texmf-dist/doc/latex/stex/example/background/reals.tex create mode 100644 Master/texmf-dist/doc/latex/stex/example/paper/Makefile create mode 100644 Master/texmf-dist/doc/latex/stex/example/paper/continuous.omdoc create mode 100644 Master/texmf-dist/doc/latex/stex/example/paper/continuous.sms create mode 100644 Master/texmf-dist/doc/latex/stex/example/paper/continuous.tex create mode 100644 Master/texmf-dist/doc/latex/stex/example/paper/differentiable.omdoc create mode 100644 Master/texmf-dist/doc/latex/stex/example/paper/differentiable.sms create mode 100644 Master/texmf-dist/doc/latex/stex/example/paper/differentiable.tex create mode 100644 Master/texmf-dist/doc/latex/stex/example/paper/intro.omdoc create mode 100644 Master/texmf-dist/doc/latex/stex/example/paper/intro.sms create mode 100644 Master/texmf-dist/doc/latex/stex/example/paper/intro.tex create mode 100644 Master/texmf-dist/doc/latex/stex/example/paper/paper.omdoc create mode 100644 Master/texmf-dist/doc/latex/stex/example/paper/paper.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/example/paper/paper.tex create mode 100644 Master/texmf-dist/doc/latex/stex/example/test/Makefile 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 create mode 100644 Master/texmf-dist/doc/latex/stex/mikoslides/README create mode 100644 Master/texmf-dist/doc/latex/stex/mikoslides/mikoslides.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/modules/README create mode 100644 Master/texmf-dist/doc/latex/stex/modules/modules.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/omdoc/README create mode 100644 Master/texmf-dist/doc/latex/stex/omdoc/omdoc.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/omtext/README create mode 100644 Master/texmf-dist/doc/latex/stex/omtext/omtext.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/presentation/README create mode 100644 Master/texmf-dist/doc/latex/stex/presentation/presentation.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/problem/README create mode 100644 Master/texmf-dist/doc/latex/stex/problem/problem.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/rdfmeta/README create mode 100644 Master/texmf-dist/doc/latex/stex/rdfmeta/certification.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/rdfmeta/certification.tex create mode 100644 Master/texmf-dist/doc/latex/stex/rdfmeta/rdfmeta.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/reqdoc/README create mode 100644 Master/texmf-dist/doc/latex/stex/reqdoc/reqdoc.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/reqdoc/requirements.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/reqdoc/requirements.tex create mode 100644 Master/texmf-dist/doc/latex/stex/sproof/README create mode 100644 Master/texmf-dist/doc/latex/stex/sproof/sproof.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/sref/README create mode 100644 Master/texmf-dist/doc/latex/stex/sref/book.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/sref/book.tex create mode 100644 Master/texmf-dist/doc/latex/stex/sref/idc.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/sref/idc.tex create mode 100644 Master/texmf-dist/doc/latex/stex/sref/idcmain.tex create mode 100644 Master/texmf-dist/doc/latex/stex/sref/scr.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/sref/scr.tex create mode 100644 Master/texmf-dist/doc/latex/stex/sref/scrmain.tex create mode 100644 Master/texmf-dist/doc/latex/stex/sref/sref.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/statements/README create mode 100644 Master/texmf-dist/doc/latex/stex/statements/statements.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/stex.pdf create mode 100644 Master/texmf-dist/doc/latex/stex/workaddress/README create mode 100644 Master/texmf-dist/doc/latex/stex/workaddress/workaddress.pdf create mode 100644 Master/texmf-dist/source/latex/stex/bin/Makefile create mode 100644 Master/texmf-dist/source/latex/stex/bin/Modparse.pm create mode 100644 Master/texmf-dist/source/latex/stex/bin/README create mode 100644 Master/texmf-dist/source/latex/stex/bin/TexId.pm create mode 100755 Master/texmf-dist/source/latex/stex/bin/allgen create mode 100755 Master/texmf-dist/source/latex/stex/bin/bms create mode 100755 Master/texmf-dist/source/latex/stex/bin/checksum create mode 100755 Master/texmf-dist/source/latex/stex/bin/convert-paths create mode 100755 Master/texmf-dist/source/latex/stex/bin/filedate create mode 100755 Master/texmf-dist/source/latex/stex/bin/gen-symdef-table.pl create mode 100755 Master/texmf-dist/source/latex/stex/bin/grep-rerun create mode 100755 Master/texmf-dist/source/latex/stex/bin/idcheck create mode 100755 Master/texmf-dist/source/latex/stex/bin/msplit create mode 100644 Master/texmf-dist/source/latex/stex/bin/old/Makefile create mode 100644 Master/texmf-dist/source/latex/stex/bin/old/defcon.l create mode 100644 Master/texmf-dist/source/latex/stex/bin/old/idcheck.l create mode 100644 Master/texmf-dist/source/latex/stex/bin/old/modstr.l create mode 100755 Master/texmf-dist/source/latex/stex/bin/old/symdef create mode 100755 Master/texmf-dist/source/latex/stex/bin/rf create mode 100644 Master/texmf-dist/source/latex/stex/bin/rng2dot/ModelRNC.pm create mode 100755 Master/texmf-dist/source/latex/stex/bin/rng2dot/rng2dot create mode 100755 Master/texmf-dist/source/latex/stex/bin/sgraph create mode 100755 Master/texmf-dist/source/latex/stex/bin/sms create mode 100755 Master/texmf-dist/source/latex/stex/bin/stexml create mode 100755 Master/texmf-dist/source/latex/stex/bin/stexmlmod create mode 100755 Master/texmf-dist/source/latex/stex/bin/termin create mode 100644 Master/texmf-dist/source/latex/stex/cmath/cmath.dtx create mode 100644 Master/texmf-dist/source/latex/stex/cmath/cmath.ins create mode 100644 Master/texmf-dist/source/latex/stex/cmathml/cmathml.dtx create mode 100644 Master/texmf-dist/source/latex/stex/cmathml/cmathml.ins create mode 100644 Master/texmf-dist/source/latex/stex/cnx/cnx.dtx create mode 100644 Master/texmf-dist/source/latex/stex/cnx/cnx.ins create mode 100644 Master/texmf-dist/source/latex/stex/dcm/dcm.dtx create mode 100644 Master/texmf-dist/source/latex/stex/dcm/dcm.ins create mode 100644 Master/texmf-dist/source/latex/stex/hwexam/hwexam.dtx create mode 100644 Master/texmf-dist/source/latex/stex/hwexam/hwexam.ins create mode 100644 Master/texmf-dist/source/latex/stex/make/Makefile create mode 100644 Master/texmf-dist/source/latex/stex/make/Makefile.base.in create mode 100644 Master/texmf-dist/source/latex/stex/make/Makefile.base.vars create mode 100644 Master/texmf-dist/source/latex/stex/make/Makefile.in create mode 100644 Master/texmf-dist/source/latex/stex/make/Makefile.latex.in create mode 100644 Master/texmf-dist/source/latex/stex/make/Makefile.latex.vars create mode 100644 Master/texmf-dist/source/latex/stex/make/Makefile.latexml.in create mode 100644 Master/texmf-dist/source/latex/stex/make/Makefile.latexml.vars create mode 100644 Master/texmf-dist/source/latex/stex/make/Makefile.subdirs create mode 100644 Master/texmf-dist/source/latex/stex/make/Makefile.vars create mode 100644 Master/texmf-dist/source/latex/stex/make/README create mode 100644 Master/texmf-dist/source/latex/stex/metakeys/metakeys.dtx create mode 100644 Master/texmf-dist/source/latex/stex/metakeys/metakeys.ins create mode 100644 Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.dtx create mode 100644 Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.ins create mode 100644 Master/texmf-dist/source/latex/stex/modules/modules.dtx create mode 100644 Master/texmf-dist/source/latex/stex/modules/modules.ins create mode 100644 Master/texmf-dist/source/latex/stex/omdoc/omdoc.dtx create mode 100644 Master/texmf-dist/source/latex/stex/omdoc/omdoc.ins create mode 100644 Master/texmf-dist/source/latex/stex/omtext/omtext.dtx create mode 100644 Master/texmf-dist/source/latex/stex/omtext/omtext.ins create mode 100644 Master/texmf-dist/source/latex/stex/presentation/presentation.dtx create mode 100644 Master/texmf-dist/source/latex/stex/presentation/presentation.ins create mode 100644 Master/texmf-dist/source/latex/stex/problem/problem.dtx create mode 100644 Master/texmf-dist/source/latex/stex/problem/problem.ins create mode 100644 Master/texmf-dist/source/latex/stex/rdfmeta/rdfmeta.dtx create mode 100644 Master/texmf-dist/source/latex/stex/rdfmeta/rdfmeta.ins create mode 100644 Master/texmf-dist/source/latex/stex/reqdoc/reqdoc.dtx create mode 100644 Master/texmf-dist/source/latex/stex/reqdoc/reqdoc.ins create mode 100644 Master/texmf-dist/source/latex/stex/schema/Makefile create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-bib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-bib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-block.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-block.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-common.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-common.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-inline.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-inline.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-math.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-math.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-para.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-para.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-picture.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-picture.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-structure.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-structure.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-tabular.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-tabular.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/TAGS create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-animation.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-animation.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-animevents-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-animevents-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-clip.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-clip.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-filter.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-filter.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-font.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-font.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-graphics-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-graphics-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-structure.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-structure.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-text.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-text.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-clip.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-clip.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-conditional.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-conditional.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-container-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-container-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-core-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-core-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-cursor.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-cursor.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-datatypes.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-datatypes.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-docevents-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-docevents-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-extensibility.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-extensibility.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-extresources-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-extresources-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-filter.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-filter.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-font.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-font.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-gradient.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-gradient.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-graphevents-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-graphevents-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-graphics-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-graphics-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-hyperlink.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-hyperlink.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-image.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-image.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-marker.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-marker.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-mask.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-mask.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-opacity-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-opacity-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-paint-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-paint-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-pattern.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-pattern.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-profile.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-profile.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-qname.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-script.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-script.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-shape.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-shape.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-structure.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-structure.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-style.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-style.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-text.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-text.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-view.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-view.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-viewport-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-viewport-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-xlink-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-xlink-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg11-basic.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg11-tiny.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg11.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg11.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/Makefile create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/metadata.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc+ltxml.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/MARCRelators.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/Makefile create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/README create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/arith1.omdoc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/creativecommons.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/dublincore.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-common.rnc create mode 100755 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-content.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-presentation.rnc create mode 100755 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-strict-content.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-strict.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mocksoap.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omcd2.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omcdgroup2.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omcdsig2.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdoc-common.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdoc.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocadt.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdoccc.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdoccth.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocdc.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocdg.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocdoc.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocext.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocmeta.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocmobj.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocmtxt.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocpf.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocphys.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocpres.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocquiz.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocrt.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocst.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/openmath2.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/pxhtml.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/schemas.xml create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/todo create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/todo.txt create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-applet.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-attribs.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-basic-table.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-bdo.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-datatypes.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-hypertext.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-image.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-inlstyle.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-list.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-object.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-param.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-table.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-text.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/owl.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/owl2+ltxml.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/owl2-xml.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/owl2xml.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/schemas.xml create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/statements.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-animation.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-animevents-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-clip.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-filter.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-font.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-graphics-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-structure.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-text.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-clip.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-conditional.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-container-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-core-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-cursor.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-datatypes.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-docevents-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-extensibility.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-extresources-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-filter.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-font.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-gradient.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-graphevents-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-graphics-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-hyperlink.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-image.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-marker.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-mask.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-opacity-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-paint-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-pattern.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-profile.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-qname.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-script.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-shape.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-structure.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-style.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-text.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-view.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-viewport-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-xlink-attrib.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg11-basic.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg11-tiny.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg11.rnc create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-bib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-block.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-common.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-inline.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-math.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-para.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-picture.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-structure.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-tabular.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/MARCRelators.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/Makefile create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/creativecommons.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/dublincore.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/mathml3-cds-pragmatic.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/mathml3-common.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/mathml3-content.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/mathml3-pragmatic.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/mathml3-presentation.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/mathml3-strict-content.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/mathml3-strict.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/mathml3.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/metadata.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdoc+ltxml.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdoc-common.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdoc-xhtml.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdoc.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdocadt.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdocattribs.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdoccc.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdoccth.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdocdc.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdocdg.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdocdoc.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdocext.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdocmeta.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdocmobj.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdocmtxt.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdocpf.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdocpres.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdocquiz.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdocrt.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/omdocst.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/openmath2.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/openmath3.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/owl.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/owl2+ltxml.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/owl2-xml.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/owl2xml.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/pxhtml.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/statements.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-animation.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-animevents-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-clip.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-filter.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-font.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-graphics-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-structure.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-text.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-clip.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-conditional.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-container-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-core-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-cursor.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-datatypes.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-docevents-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-extensibility.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-extresources-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-filter.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-font.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-gradient.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-graphevents-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-graphics-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-hyperlink.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-image.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-marker.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-mask.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-opacity-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-paint-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-pattern.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-profile.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-script.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-shape.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-structure.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-style.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-text.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-view.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-viewport-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg-xlink-attrib.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/svg11.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/xhtml-applet.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/xhtml-attribs.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/xhtml-base.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/xhtml-basic-table.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/xhtml-bdo.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/xhtml-datatypes.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/xhtml-hypertext.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/xhtml-image.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/xhtml-inlstyle.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/xhtml-link.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/xhtml-list.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/xhtml-object.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/xhtml-param.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/xhtml-table.rng create mode 100644 Master/texmf-dist/source/latex/stex/schema/rng/xhtml-text.rng create mode 100644 Master/texmf-dist/source/latex/stex/sproof/sproof.dtx create mode 100644 Master/texmf-dist/source/latex/stex/sproof/sproof.ins create mode 100644 Master/texmf-dist/source/latex/stex/sref/sref.dtx create mode 100644 Master/texmf-dist/source/latex/stex/sref/sref.ins create mode 100644 Master/texmf-dist/source/latex/stex/statements/statements.dtx create mode 100644 Master/texmf-dist/source/latex/stex/statements/statements.ins create mode 100644 Master/texmf-dist/source/latex/stex/workaddress/workaddress.dtx create mode 100644 Master/texmf-dist/source/latex/stex/workaddress/workaddress.ins create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-bib-xhtml.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-block-xhtml.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-common.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-html.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-html5.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-inline-xhtml.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-math-image.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-math-mathml-html5.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-math-mathml.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-para-html5.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-para-xhtml.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-picture-image.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-picture-svg-html5.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-picture-svg.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-structure-html5.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-structure-xhtml.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-tabular-xhtml.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-webpage-html5.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-webpage-xhtml.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-xhtml.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/amsart.css create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/closedbib.css create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/core.css create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/marginpar.css create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/navbar-left.css create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/navbar-right.css create mode 100644 Master/texmf-dist/source/latex/stex/xsl/LaTeXML/theme-blue.css create mode 100644 Master/texmf-dist/source/latex/stex/xsl/Makefile create mode 100644 Master/texmf-dist/source/latex/stex/xsl/doc.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/graphics.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/listings.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/ltxml2cnx.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/math.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/notations.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/omdocpost.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/owl2post.xsl create mode 100644 Master/texmf-dist/source/latex/stex/xsl/symbols.xsl create mode 100644 Master/texmf-dist/tex/latex/stex/cmath/cmath.sty create mode 100644 Master/texmf-dist/tex/latex/stex/cmath/cmath.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/cmathml/cmathml.sty create mode 100644 Master/texmf-dist/tex/latex/stex/cmathml/cmathml.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/cmathml/cmathmlx.sty create mode 100644 Master/texmf-dist/tex/latex/stex/cmathml/cmathmlx.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/cnx/cnx.cls create mode 100644 Master/texmf-dist/tex/latex/stex/cnx/cnx.cls.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/ctansvn.sty create mode 100644 Master/texmf-dist/tex/latex/stex/dcm/dcm.sty create mode 100644 Master/texmf-dist/tex/latex/stex/dcm/dcm.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/hwexam/hwexam.cls create mode 100644 Master/texmf-dist/tex/latex/stex/hwexam/hwexam.cls.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 create mode 100644 Master/texmf-dist/tex/latex/stex/mikoslides/beamerthemeJacobs.sty create mode 100644 Master/texmf-dist/tex/latex/stex/mikoslides/cc-by-sa.png create mode 100644 Master/texmf-dist/tex/latex/stex/mikoslides/cc_somerights.png create mode 100644 Master/texmf-dist/tex/latex/stex/mikoslides/dangerous-bend.png create mode 100644 Master/texmf-dist/tex/latex/stex/mikoslides/jacobs-logo.png create mode 100644 Master/texmf-dist/tex/latex/stex/mikoslides/mikoaffiliation.sty create mode 100644 Master/texmf-dist/tex/latex/stex/mikoslides/mikoaffiliation.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/mikoslides/mikoslides.cls create mode 100644 Master/texmf-dist/tex/latex/stex/mikoslides/mikoslides.cls.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/mikoslides/shading-l2r.png create mode 100644 Master/texmf-dist/tex/latex/stex/modules/modules.sty create mode 100644 Master/texmf-dist/tex/latex/stex/modules/modules.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/omdoc/omdoc.cls create mode 100644 Master/texmf-dist/tex/latex/stex/omdoc/omdoc.cls.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/omdoc/omdoc.sty create mode 100644 Master/texmf-dist/tex/latex/stex/omdoc/omdoc.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/omtext/omtext.sty create mode 100644 Master/texmf-dist/tex/latex/stex/omtext/omtext.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/presentation/presentation.sty create mode 100644 Master/texmf-dist/tex/latex/stex/presentation/presentation.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/problem/problem.sty create mode 100644 Master/texmf-dist/tex/latex/stex/problem/problem.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/rdfmeta/rdfmeta.sty create mode 100644 Master/texmf-dist/tex/latex/stex/rdfmeta/rdfmeta.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty create mode 100644 Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/sproof/sproof.sty create mode 100644 Master/texmf-dist/tex/latex/stex/sproof/sproof.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/sref/sref.sty create mode 100644 Master/texmf-dist/tex/latex/stex/sref/sref.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/statements/statements.sty create mode 100644 Master/texmf-dist/tex/latex/stex/statements/statements.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/stex-logo.sty create mode 100644 Master/texmf-dist/tex/latex/stex/stex-logo.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/stex.sty create mode 100644 Master/texmf-dist/tex/latex/stex/stex.sty.ltxml create mode 100644 Master/texmf-dist/tex/latex/stex/stex.tex create mode 100644 Master/texmf-dist/tex/latex/stex/workaddress/workaddress.sty create mode 100644 Master/texmf-dist/tex/latex/stex/workaddress/workaddress.sty.ltxml (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/stex/README b/Master/texmf-dist/doc/latex/stex/README new file mode 100644 index 00000000000..ada6fff6096 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/README @@ -0,0 +1,13 @@ +sTeX: An Infrastructure for Semantic Preloading of LaTeX Documents + +This directory contains the sTeX package collection, a version of TeX/LaTeX that allows +to markup TeX/LaTeX documents semantically without leaving the document format, +essentially turning it into a document format for mathematical knowledge management +(MKM). + +Copyright (c) 2008 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. If you are using SVN, it +is useful to include selected subdirectories of this as SVN externals. diff --git a/Master/texmf-dist/doc/latex/stex/cmath/README b/Master/texmf-dist/doc/latex/stex/cmath/README new file mode 100644 index 00000000000..350b674d572 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/cmath/README @@ -0,0 +1,12 @@ +cmath.sty: An Infrastructure for Building Inline Content Math in sTeX + +This package supplies an infrastructure that allows to specify to build inline content math +structures as strict content MathML or OpenMath objects. + +Copyright (c) 2011 Michael Kohlhase +The package is distributed under the terms of the LaTeX Project Public License (LPPL) + +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/cmath/cmath.pdf b/Master/texmf-dist/doc/latex/stex/cmath/cmath.pdf new file mode 100644 index 00000000000..f4b9ba77b08 Binary files /dev/null and b/Master/texmf-dist/doc/latex/stex/cmath/cmath.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/cmathml/README b/Master/texmf-dist/doc/latex/stex/cmathml/README new file mode 100644 index 00000000000..3117561fabb --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/cmathml/README @@ -0,0 +1,13 @@ +cmathml.sty: Semantic Macros for Content MathML in LaTeX +cmathmlx.sty: Semantic Macros for extended Content MathML + +This package provides a collection of semantic macros for Content MathML and their LateXML +bindings. These macros form the basis of a naive translation from semantically preloaded +LaTeX formulae into the Content MathML formulae via the LaTeXML system. + +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/cmathml/README $ + diff --git a/Master/texmf-dist/doc/latex/stex/cmathml/cmathml.pdf b/Master/texmf-dist/doc/latex/stex/cmathml/cmathml.pdf new file mode 100644 index 00000000000..9bd3dcd750a Binary files /dev/null and b/Master/texmf-dist/doc/latex/stex/cmathml/cmathml.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/cnx/README b/Master/texmf-dist/doc/latex/stex/cnx/README new file mode 100644 index 00000000000..113b526364f --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/cnx/README @@ -0,0 +1,13 @@ +cnx.cls: A LaTeX-based Syntax for Connexions Modules + +The cnx class is a collection of TeX macros that allow to write Connexions modules in the +CNXLaTeX format without leaving the LaTeX workflow. Modules are authored using cnx.cls +using only a text editor, transformed to PDF and proofread as usual. For publication, +CNXLaTeX modules are transformed to CNXML via the LaTeXML translator and can be uploaded +to the Connexions system. + +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/cnx/README $ diff --git a/Master/texmf-dist/doc/latex/stex/cnx/cnx.pdf b/Master/texmf-dist/doc/latex/stex/cnx/cnx.pdf new file mode 100644 index 00000000000..0746400edab Binary files /dev/null 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 new file mode 100644 index 00000000000..d2bc0ddac9c --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/dcm/README @@ -0,0 +1,14 @@ +dcm.sty: An Infrastructure for marking up Dublin Core Metadata in LaTeX documents + +The dcm packge allows mark up Dublin Core Metadata in LaTeX documents that can be +harvested by automated tools or exported to PDF. + +The file dcmi.tex is an sTeX ontology file for the DCM relations. + +Copyright (c) 2008 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/dcm + diff --git a/Master/texmf-dist/doc/latex/stex/dcm/dcm.pdf b/Master/texmf-dist/doc/latex/stex/dcm/dcm.pdf new file mode 100644 index 00000000000..67d7607ec09 Binary files /dev/null and b/Master/texmf-dist/doc/latex/stex/dcm/dcm.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/example/Makefile b/Master/texmf-dist/doc/latex/stex/example/Makefile new file mode 100644 index 00000000000..df87da1fbee --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/Makefile @@ -0,0 +1,4 @@ +STEXDIR = .. +MAKEDIRS = background paper +CLEANDIRS = $(MAKEDIRS) +include $(STEXDIR)/make/Makefile.subdirs diff --git a/Master/texmf-dist/doc/latex/stex/example/README b/Master/texmf-dist/doc/latex/stex/example/README new file mode 100644 index 00000000000..7424d68ebca --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/README @@ -0,0 +1,18 @@ +This directory contains a typical (if minimal) example of a sTeX +collection, and a Makefile-based conversion workflow. It is intended +to test the sTeX distribution and serve as an example for sTeX users +to set up their system. It contains + +README: this file +Makefile: this contains rules to automate the PDF formatting and + XML conversion process. +background: a directory with background modules, this is assumed to + exist before starting work on the paper, in real life this + would probably be a subversion external. +paper: a directory with a paper based on two modules and the + background modules. +test: a directory that has the makefiles to accomodate your tests; + just copy your files there adjust TARGET and type make. + +For an explanation of the design of the example see paper/example.pdf or +https://trac.kwarc.info/sTeX/wiki/sTeXCollections diff --git a/Master/texmf-dist/doc/latex/stex/example/background/Makefile b/Master/texmf-dist/doc/latex/stex/example/background/Makefile new file mode 100644 index 00000000000..af7cc21e5eb --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/background/Makefile @@ -0,0 +1,8 @@ +STEXDIR = ../.. +TARGET = all.tex +BUTFILES = pre.tex post.tex +MODSLIBDIR = . + +include $(STEXDIR)/make/Makefile.vars +all: omdoc mods pdf +include $(STEXDIR)/make/Makefile.in diff --git a/Master/texmf-dist/doc/latex/stex/example/background/all.omdoc b/Master/texmf-dist/doc/latex/stex/example/background/all.omdoc new file mode 100644 index 00000000000..af660821194 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/background/all.omdoc @@ -0,0 +1,155 @@ + + + + + + +

Functions

+
+
+ + + + + + + + + + + + + + + ( + + + × + + + + ) + + + + + + + + + + + + + + + + ( + + : + + + + ) + + + + + + + + + + + + + + + ( + + + + ) + + + + + + +

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

+
+
+
+
+ + + +

Real Numbers

+
+
+ + + + + + + + + R + + + + + + + + + + + + + ( + | + + | + ) + + + + + + + + + + + + + + + + + + + + + + +

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

+
+
+ + +

+The absolute value of a real number . +

+
+
+
+
+ +
diff --git a/Master/texmf-dist/doc/latex/stex/example/background/all.tex b/Master/texmf-dist/doc/latex/stex/example/background/all.tex new file mode 100644 index 00000000000..27df61d1e61 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/background/all.tex @@ -0,0 +1,12 @@ +\documentclass{omdoc} +\usepackage{stex} +\usepackage{hyperref,amssymb} +\defpath{backmods}{../background} +\begin{document} +\input{functions} +\input{reals} +\end{document} +%%% Local Variables: +%%% mode: LaTeX +%%% TeX-master: t +%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/example/background/functions.omdoc b/Master/texmf-dist/doc/latex/stex/example/background/functions.omdoc new file mode 100644 index 00000000000..68f4ab80859 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/background/functions.omdoc @@ -0,0 +1,215 @@ + + + + + + Functions + + + + + + + + + + + + + + + ( + + + × + + + + ) + + + + + + + + + + + + + + + + ( + + : + + + + ) + + + + + + + + + + + + + + + ( + + + + ) + + + + + + + + + + + + + + + + + + + + + + + ( + + + + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + ( + + + × + + + + ) + + + + + + + + + + \ + + + + + + + + + + + + + ( + + \ + + ) + + + + + + + + + + + + + + + + ( + { + + + , + + + + } + ) + + + + + + + + + + + + + + + ( + { + + + + } + ) + + + + + + +

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

+
+
+
+
+
diff --git a/Master/texmf-dist/doc/latex/stex/example/background/functions.sms b/Master/texmf-dist/doc/latex/stex/example/background/functions.sms new file mode 100644 index 00000000000..ee824b72754 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/background/functions.sms @@ -0,0 +1,13 @@ +\begin{module}[id=functions]% +\symdef[assocarg=1]{cart}[1]{\assoc[p=500]{\times}{#1}}% +\symdef{fun}[3]{\mixfixiii[p=200]{}{#1}{\colon}{#2}{\rightarrow}{#3}{}}% +\symdef{inset}[2]{\infix[p=650]{\in}{#1}{#2}}% +\symdef[name=sseteq]{sseteqOp}{\subseteq} % +\symdef{sseteq}[2]{\infix[p=300]\sseteqOp{#1}{#2}} % +\symdef{tup}[1]{\langle#1\rangle}% +\symdef{cart}[1]{\assoc\times{#1}}% +\symdef[name=setdiff]{setdiffOp}{\backslash}% +\symdef{setdiff}[2]{\mixfixii[p=600]{}{#1}\setdiffOp{#2}{}} % +\symdef[assocarg=1]{set}[1]{\mixfixa[nobrackets]{\{}{#1}{\}},}% +\symdef{setst}[2]{\mixfixii[nobrackets]{\{}{#1}{\,\mid\,}{#2}{\}}}% +\end{module}% diff --git a/Master/texmf-dist/doc/latex/stex/example/background/functions.tex b/Master/texmf-dist/doc/latex/stex/example/background/functions.tex new file mode 100644 index 00000000000..d4ac497685f --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/background/functions.tex @@ -0,0 +1,22 @@ +\begin{omgroup}[id=sec.functions,creators=miko]{Functions} +\begin{module}[id=functions] +\symdef[assocarg=1]{cart}[1]{\assoc[p=500]{\times}{#1}} +\symdef{fun}[3]{\mixfixiii[p=200]{}{#1}{\colon}{#2}{\rightarrow}{#3}{}} +\symdef{inset}[2]{\infix[p=650]{\in}{#1}{#2}} +\symdef[name=sseteq]{sseteqOp}{\subseteq} +\symdef{sseteq}[2]{\infix[p=300]\sseteqOp{#1}{#2}} +\symdef{tup}[1]{\langle#1\rangle} +\symdef{cart}[1]{\assoc\times{#1}} +\symdef[name=setdiff]{setdiffOp}{\backslash} +\symdef{setdiff}[2]{\mixfixii[p=600]{}{#1}\setdiffOp{#2}{}} +\symdef[assocarg=1]{set}[1]{\mixfixa[nobrackets]{\{}{#1}{\}},} +\symdef{setst}[2]{\mixfixii[nobrackets]{\{}{#1}{\,\mid\,}{#2}{\}}} +\begin{definition}[id=functions.def] + A {\defi{function}} $\fun{f}AB$ is a left-total, right-unique relation in $\cart{A,B}$ +\end{definition} +\end{module} +\end{omgroup} +%%% Local Variables: +%%% mode: LaTeX +%%% TeX-master: "all" +%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/example/background/post.tex b/Master/texmf-dist/doc/latex/stex/example/background/post.tex new file mode 100644 index 00000000000..6b47932f52b --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/background/post.tex @@ -0,0 +1 @@ +\end{document} diff --git a/Master/texmf-dist/doc/latex/stex/example/background/pre.tex b/Master/texmf-dist/doc/latex/stex/example/background/pre.tex new file mode 100644 index 00000000000..59f9473ea44 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/background/pre.tex @@ -0,0 +1,8 @@ +\documentclass{omdoc} +\usepackage{stex,amssymb,lststex} +\usepackage{hyperref} +\def\omdoc{OMDoc} +\def\latexml{LaTeXML} +\defpath{backmods}{../background} +% \baseURI[\backmods{}]{http://linkeddata.tntbase.org/stex} +% \coolurion diff --git a/Master/texmf-dist/doc/latex/stex/example/background/reals.omdoc b/Master/texmf-dist/doc/latex/stex/example/background/reals.omdoc new file mode 100644 index 00000000000..388eeb1a08f --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/background/reals.omdoc @@ -0,0 +1,67 @@ + + + + + + Real Numbers + + + + + + + + + + R + + + + + + + + + + + + + ( + | + + | + ) + + + + + + + + + + + + + + + + + + + + + + +

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

+
+
+ + +

The absolute value of a real number .

+
+
+
+
+
diff --git a/Master/texmf-dist/doc/latex/stex/example/background/reals.sms b/Master/texmf-dist/doc/latex/stex/example/background/reals.sms new file mode 100644 index 00000000000..437865ee78c --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/background/reals.sms @@ -0,0 +1,5 @@ +\begin{module}[id=reals]% +\symdef{RealNumbers}{\mathbb{R}}% +\symdef{absval}[1]{\mixfixi[p=2000]|{#1}|}% +\symdef{rfrac}[2]{\frac{#1}{#2}}% +\end{module}% diff --git a/Master/texmf-dist/doc/latex/stex/example/background/reals.tex b/Master/texmf-dist/doc/latex/stex/example/background/reals.tex new file mode 100644 index 00000000000..9bcba08ab82 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/background/reals.tex @@ -0,0 +1,20 @@ +\begin{omgroup}[id=sec.reals]{Real Numbers} +\begin{module}[id=reals] +\symdef{RealNumbers}{\mathbb{R}} +\symdef{absval}[1]{\mixfixi[p=2000]|{#1}|} +\symdef{rfrac}[2]{\frac{#1}{#2}} + +\begin{definition}[id=reals.def] + We denote the set of {\defii{real}{numbers}} we all know and love with + $\RealNumbers$. +\end{definition} + +\begin{definition}[id=absval.def] + The absolute value $\absval{r}$ of a real number $r$. +\end{definition} +\end{module} +\end{omgroup} +%%% Local Variables: +%%% mode: LaTeX +%%% TeX-master: "all" +%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/Makefile b/Master/texmf-dist/doc/latex/stex/example/paper/Makefile new file mode 100644 index 00000000000..1b71727ec2f --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/paper/Makefile @@ -0,0 +1,7 @@ +STEXDIR = ../.. +TARGET = paper.tex +MODSLIBDIR = ../background + +include $(STEXDIR)/make/Makefile.vars +all: omdoc mods pdf +include $(STEXDIR)/make/Makefile.in diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/continuous.omdoc b/Master/texmf-dist/doc/latex/stex/example/paper/continuous.omdoc new file mode 100644 index 00000000000..19c248a26dd --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/paper/continuous.omdoc @@ -0,0 +1,53 @@ + + + + + + Continuous Functions + + + + + + + + + + + + + + + + + + + C + 0 + + + + + + , + + + + + + + + + + +

A function is called continuouscontinuous at +, iff for all 0 there is a 0, such that + for all . It is called +continuous oncontinuouson a set , iff is is continous at all +, the set of all such functions is denoted with , +if .

+
+
+
+
+
diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/continuous.sms b/Master/texmf-dist/doc/latex/stex/example/paper/continuous.sms new file mode 100644 index 00000000000..6d42d0f52a6 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/paper/continuous.sms @@ -0,0 +1,6 @@ +\begin{module}[id=continuous]% +\importmodule[\backmods{functions}]{functions}% +\importmodule[\backmods{reals}]{reals}% +\symdef{continuousfunctions}[2]{\mathcal{C}^0(#1,#2)}% +\abbrdef{ContRR}[2]{\continuousfunctions\RealNumbers\RealNumbers}% +\end{module}% diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/continuous.tex b/Master/texmf-dist/doc/latex/stex/example/paper/continuous.tex new file mode 100644 index 00000000000..96a8edd9123 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/paper/continuous.tex @@ -0,0 +1,20 @@ +\begin{omgroup}[id=sec.contfuncs]{Continuous Functions} +\begin{module}[id=continuous] +\importmodule[\backmods{functions}]{functions} +\importmodule[\backmods{reals}]{reals} +\symdef{continuousfunctions}[2]{\mathcal{C}^0(#1,#2)} +\abbrdef{ContRR}[2]{\continuousfunctions\RealNumbers\RealNumbers} +\begin{definition}[for=continuousfunctions] + A function $\fun{f}\RealNumbers\RealNumbers$ is called {\defi{continuous}} at + $\inset{x}\RealNumbers$, iff for all $\epsilon>0$ there is a $\delta>0$, such that + $\absval{f(x)-f(y)}<\epsilon$ for all $\absval{x-y}<\delta$. It is called + {\defii{continuous}{on}} a set $\sseteq{S}\RealNumbers$, iff is is continous at all + $\inset{x}S$, the set of all such functions is denoted with $\continuousfunctions{S}T$, + if $\sseteq{f(S)}T$. +\end{definition} +\end{module} +\end{omgroup} +%%% Local Variables: +%%% mode: LaTeX +%%% TeX-master: "paper" +%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.omdoc b/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.omdoc new file mode 100644 index 00000000000..72cd7588bfd --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.omdoc @@ -0,0 +1,48 @@ + + + + + + Differentiable Functions + + + + + + + + + + + + + + + + + + C + 1 + + + + + + , + + + + + + + + + +

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/differentiable.sms b/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.sms new file mode 100644 index 00000000000..cb2122c1064 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.sms @@ -0,0 +1,5 @@ +\begin{module}[id=differentiable]% +\importmodule[continuous]{continuous}% +\symdef{difffunctions}[2]{\mathcal{C}^1(#1,#2)}% +\abbrdef{DiffRR}[2]{\difffunctions\RealNumbers\RealNumbers}% +\end{module}% diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.tex b/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.tex new file mode 100644 index 00000000000..fca1c7fe252 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/paper/differentiable.tex @@ -0,0 +1,16 @@ +\begin{omgroup}[id=sec.differentiable]{Differentiable Functions} +\begin{module}[id=differentiable] +\importmodule[continuous]{continuous} +\symdef{difffunctions}[2]{\mathcal{C}^1(#1,#2)} +\abbrdef{DiffRR}[2]{\difffunctions\RealNumbers\RealNumbers} +\begin{definition} + A function $\fun{f}\RealNumbers\RealNumbers$ is called {\defi{differentiable}} at + $\inset{x}\RealNumbers$, iff for all $\epsilon>0$ there is a $\delta>0$, such that + $\rfrac{\absval{f(x)-f(y)}}{\absval{x-y}}<\epsilon$ for all $\absval{x-y}<\delta$. +\end{definition} +\end{module} +\end{omgroup} +%%% Local Variables: +%%% mode: LaTeX +%%% TeX-master: "paper" +%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/intro.omdoc b/Master/texmf-dist/doc/latex/stex/example/paper/intro.omdoc new file mode 100644 index 00000000000..a4fe8c85f96 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/paper/intro.omdoc @@ -0,0 +1,145 @@ + + + + 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 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 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 +document. The content in and +comes from included files continuous.tex and +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 +self-contained:

+ +
    + +
  1. + +
    +

    they do not contain a LaTeX preamble and +\begin/\end{document}, and

    +
    + +
  2. + +
  3. + +
    +

    they may depend on other modules, whose semantic macros they need to include,

    +
    + +
  4. + +
  5. + +
    +

    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.

    +
    + +
  6. + +
+
+

This will have consequences for the automation. Concretely, the module on +differentiable functions in depends on that for continuous +functions in . 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.

+
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.

+
+
Makefile-based Automation +
+

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

+
+ +
+ +
make omdoc
+
+
+

will trigger the OMDoc transformation of the target +document.

+
+
+ +
make mods
+
+
+

will trigger the OMDoc transformation of the modules.

+
+
+ +
make pdf
+
+
+

will trigger the LaTeX formatting the target

+
+
+ +
make mpdf
+
+
+

will trigger the LaTeX formatting the modules

+
+
+ +
make sms
+
+
+

will trigger the re-generation of all semantic macro short +forms of modules (this is implicitly called in all the other make targets)

+
+
+ +
+ +
+

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

+
+ +
+

The variable STEXDIR}} has to be set to the main directory of thesTeX +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, thebackground directory for convenience. The +MODSLIBDIR}} specifies the location of the prefix and postfix filespre.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 +above. The only differences are that the variable STEXDIR}} is adapted and     that theBUTFILE}} variable is set topre.tex and +post.tex, so that they are not converted. In the directory +background we have followed good practice by establishing a phony

+
+
+
diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/intro.sms b/Master/texmf-dist/doc/latex/stex/example/paper/intro.sms new file mode 100644 index 00000000000..156422aefd8 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/paper/intro.sms @@ -0,0 +1,2 @@ + \begin{module}[id=setup]% +\end{module}% diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/intro.tex b/Master/texmf-dist/doc/latex/stex/example/paper/intro.tex new file mode 100644 index 00000000000..8faed56d132 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/paper/intro.tex @@ -0,0 +1,96 @@ +\begin{omgroup}[id=intro]{Introduction} + We will show how to semantically mark up mathematics in the {\sTeX} + format~\cite{Kohlhase:ulsmf08} and how to convert it into + {\omdoc}~\cite{Kohlhase:OMDoc1.3}. + + We have some mathematical material in {\sref{sec.math}} which will serve as example + content. In the rest of this section we will explain the setup of the example and + present an approach to automation of the {\omdoc} conversion via Unix Makefiles. + \begin{omgroup}{The Setup} + \begin{module}[id=setup] + \begin{definition}[display=flow] + The source of this note is contained in the file {\texttt{paper.tex}}. We call it + the {\defi{target}}, since formatting it with {\LaTeX} will generate the main + document. The content in {\sref{sec.contfuncs}} and {\sref{sec.differentiable}} + comes from included files {\texttt{continuous.tex}} and + {\texttt{differentiable.tex}}, we will call them {\defi{module}s}, since they may + be used (i.e. included) by other target documents as well. + \end{definition} + + \begin{omtext} + As the modules are built for inclusion into other documents, they are not + self-contained: + \begin{enumerate} + \item they do not contain a {\LaTeX} preamble and + \verb|\begin|/\verb|\end{document}|, and + \item they may depend on other modules, whose semantic macros they need to include, + \item to facilitate this a module file {\texttt{modf.tex}} comes with a ``semantic + macro short form'' {\texttt{modf.sms}} that can be included without generating + output in the PDF. + \end{enumerate} + \end{omtext} + + \begin{omtext} + This will have consequences for the automation. Concretely, the module on + differentiable functions in {\sref{sec.differentiable}} depends on that for continuous + functions in {\sref{sec.contfuncs}}. Both of them depend on modules for real numbers, + sets and functions that we do not want to cover in this note. \inlinedef{We assume + that they have already been marked up with the same methods as we describe here and + are accessible to us and call them {\defii{background}{module}s}}. In our setup we + keep them in the subdirectory {\texttt{background}}. + \end{omtext} +\end{module} +\end{omgroup} + +\begin{omgroup}{Formatting and {\omdoc} conversion} + To format an {\sTeX} document --- i.e. to produce a PDF file from the {\sTeX} marked-up + sources --- we only need to run the {\texttt{pdflatex}} program over the target document + --- assuming that all modules (regular or background) have semantic macro short forms. + + To convert an {\sTeX} document to {\omdoc}, we need to run {\texttt{latexml}} over it, + post-process the result by {\texttt{latexmlpost}}, and finally massage away all remaining + {\latexml} islands with a stylesheet, see ~\cite{Kohlhase:ssmtl*} for details. +\end{omgroup} + +\begin{omgroup}{Makefile-based Automation} + As the conversion to {\omdoc} is rather complex (the programs in the three steps take a + variety of options), we support an automation by Unix Makefiles. There are three main + {\texttt{make}} targets. + + \begin{description} + \item[{\texttt{make omdoc}}] will trigger the {\omdoc} transformation of the target + document. + \item[{\texttt{make mods}}] will trigger the {\omdoc} transformation of the modules. + \item[{\texttt{make pdf}}] will trigger the {\LaTeX} formatting the target + \item[{\texttt{make mpdf}}] will trigger the {\LaTeX} formatting the modules + \item[{\texttt{make sms}}] will trigger the re-generation of all semantic macro short + forms of modules (this is implicitly called in all the other {\texttt{make}} targets) + \end{description} + To use this, we need to set up a {\texttt{{Makefile}}} of the following form: + +\lstset{columns=flexible,frame=lines,numbers=left,stepnumber=2,numberstyle=\tiny,basicstyle=\small} +\lstinputlisting[language=make]{Makefile} + + The variable {\lstinline{STEXDIR}} has to be set to the main directory of the {\sTeX} + distribution. The variable {\lstinline{TARGET}} specifies the target document (all other + {\texttt{*.tex}} files that are not excluded in the {\lstinline{BUTFILES}} variables are + considered as modules). Here, the {\texttt{background}} directory for convenience. The + {\lstinline{MODSLIBDIR}} specifies the location of the prefix and postfix files + {\texttt{pre.tex}} and {\texttt{post.tex}} that will be prepended and appended to the + modules to make them into complete files {\TeX} files that can be converted. The last + three lines just include the Makefiles from the {\sTeX} distribution and configure the + default make target (\texttt{make all}) to be produce the pdf version + + Note that in the directory {\texttt{background}} we have a very similar Makefile as + above. The only differences are that the variable {\lstinline{STEXDIR}} is adapted and + that the {\lstinline{BUTFILE}} variable is set to {\texttt{pre.tex}} and + {\texttt{post.tex}}, so that they are not converted. In the directory + {\texttt{background}} we have followed good practice by establishing a phony +\end{omgroup} + +\end{omgroup} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "paper" +%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/paper.omdoc b/Master/texmf-dist/doc/latex/stex/example/paper/paper.omdoc new file mode 100644 index 00000000000..abb6db85073 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/paper/paper.omdoc @@ -0,0 +1,48 @@ + + + +
+

+
+Mathematical ContentCalculus +
+

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

+
+
A Theory Graph for Elementary Algebra +
+

Here we show an example for more advanced theory graph manipulations, in particular +imports via morphisms. +

+
+G() +

A magmamagma is a structure , such that is +closed under the operation .

+
+

A magma, is called a semigroupsemigroup, iff + is associative.

+
e* +

A monoidmonoid is a structure , such that + is a semigroup and is a +neutral elementneutralelement, i.e. that for all .

+
+

In a monoid , we use denote the set + with .

+
ii() +

A groupgroup is a structure , such that + is a monoid and acts as +a inverseinverse, i.e. that for all +.

+
+

We call a group a +commutative groupcommutativegroup, iff is commutative.

+
R()1rbasertimesOprone+(+)0--()rplusrzerorminusOp +

A ringring is a structure , +such that is a monoid and + is a commutative group.

+
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.

+
+
diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/paper.pdf b/Master/texmf-dist/doc/latex/stex/example/paper/paper.pdf new file mode 100644 index 00000000000..b850db63b87 Binary files /dev/null and b/Master/texmf-dist/doc/latex/stex/example/paper/paper.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/example/paper/paper.tex b/Master/texmf-dist/doc/latex/stex/example/paper/paper.tex new file mode 100644 index 00000000000..5451a828f20 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/paper/paper.tex @@ -0,0 +1,149 @@ +\documentclass{omdoc} +\usepackage[showmods]{stex} +\usepackage{amssymb} +\usepackage{alltt} +\usepackage{hyperref} +\usepackage{listings} +\def\omdoc{OMDoc} +\def\latexml{LaTeXML} +\defpath{backmods}{../background} +%% defining the author metadata +\WAperson[id=miko, + affiliation=JUB, + url=http://kwarc.info/kohlhase] + {Michael Kohlhase} +\WAinstitution[id=JUB, + url=http://jacobs-university.de, + streetaddress={Campus Ring 1}, + townzip={28759 Bremen}, + countryshort=D, + country=Germany, + type=University, + acronym=JACU, + shortname=Jacobs Univ.] + {Jacobs University Bremen} + +\begin{document} + +% metadata and title page +% \begin{DCmetadata}[maketitle] +% \DCMcreators{miko} +% \DCMrights{Copyright (c) 2009 Michael Kohlhase} +% \DCMtitle{An example of semantic Markup in {\sTeX}} +% \DCMabstract{In this note we give an example of semantic markup in {\sTeX}: +% Continuous and differentiable functions are introduced using real numbers, sets and +% functions as an assumed background.} +% \end{DCmetadata} + +\inputref{intro} + +\begin{omgroup}[id=sec.math]{Mathematical Content} + \begin{omgroup}{Calculus} + We present some standard mathematical definitions, here from calculus. + \inputref{continuous} + \inputref{differentiable} +\end{omgroup} + +\begin{omgroup}[id=sec.math]{A Theory Graph for Elementary Algebra} + Here we show an example for more advanced theory graph manipulations, in particular + imports via morphisms. + +\begin{module}[id=magma] + \importmodule[\backmods{functions}]{functions} + \symdef{magbase}{G} + \symdef[name=magmaop]{magmaopOp}{\circ} + \symdef{magmaop}[2]{\infix\magmaopOp{#1}{#2}} + \begin{definition}[id=magma.def] + A \defi{magma} is a structure $\tup{\magbase,\magmaopOp}$, such that $\magbase$ is + closed under the operation $\fun\magmaopOp{\cart{\magbase,\magbase}}\magbase$. + \end{definition} +\end{module} + +\begin{module}[id=semigroup] + \importmodule{magma} + \begin{definition}[id=semigroup.def] + A \trefi[magma]{magma} $\tup{\magbase,\magmaopOp}$, is called a \defi{semigroup}, iff + $\magmaopOp$ is associative. + \end{definition} +\end{module} + +\begin{module}[id=monoid] + \importmodule{semigroup} + \symdef{monneut}{e} + \symdef{noneut}[1]{#1^*} + \begin{definition}[id=monoid.def] + A \defi{monoid} is a structure $\tup{\magbase,\magmaopOp,\monneut}$, such that + $\tup{\magbase,\magmaopOp}$ is a \trefi[semigroup]{semigroup} and $\monneut$ is a + \defii{neutral}{element}, i.e. that $\magmaop{x}\monneut=x$ for all $\inset{x}\magbase$. + \end{definition} + + \begin{definition}[id=noneut.def] + In a monoid $\tup{\magbase,\magmaopOp,\monneut}$, we use denote the set + $\setst{\inset{x}S}{x\ne\monneut}$ with $\noneut{S}$. + \end{definition} +\end{module} + +\begin{module}[id=group] + \importmodule{monoid} + \symdef{ginvOp}{i} + \symdef{ginv}[1]{\prefix\ginvOp{#1}} + \begin{definition}[id=group.def] + A \defi{group} is a structure $\tup{\magbase,\magmaopOp,\monneut,\ginvOp}$, such that + $\tup{\magbase,\magmaopOp,\monneut}$ is a \trefi[monoid]{monoid} and $\ginvOp$ acts as + a \defi{inverse}, i.e. that $\magmaop{x}{\ginv{x}}=\monneut$ for all + $\inset{x}\magbase$. + \end{definition} +\end{module} + +\begin{module}[id=cgroup] +\importmodule{group} +\begin{definition}[id=cgroup.def] + We call a \trefi[group]{group} $\tup{\magbase,\magmaopOp,\monneut,\ginvOp}$ a + \defii{commutative}{group}, iff $\magmaopOp$ is commutative. +\end{definition} +\end{module} + +\begin{module}[id=ring] +\symdef{rbase}{R} +\symdef[name=rtimes]{rtimesOp}{\cdot} +\symdef{rtimes}[2]{\infix\rtimesOp{#1}{#2}} +\symdef{rone}{1} +\begin{importmodulevia}{monoid} + \vassign{rbase}\magbase + \vassign{rtimesOp}\magmaopOp + \vassign{rone}\monneut +\end{importmodulevia} +\symdef[name=rplus]{rplusOp}{+} +\symdef{rplus}[2]{\infix\rplusOp{#1}{#2}} +\symdef{rzero}{0} +\symdef[name=rminus]{rminusOp}{-} +\symdef{rminus}[1]{\prefix\rminusOp{#1}} +\begin{importmodulevia}{cgroup} + \vassign{rplus}\magmaopOp + \vassign{rzero}\monneut + \vassign{rminusOp}\ginvOp +\end{importmodulevia} +\begin{definition} + A \defi{ring} is a structure $\tup{\rbase,\rplusOp,\rzero,\rtimesOp,\rone,\rminusOp}$, + such that $\tup{\noneut\rbase,\rtimesOp,\rone}$ is a monoid and + $\tup{\rbase,\rplusOp,\rzero,\rminusOp}$ is a commutative group. +\end{definition} +\end{module} +\end{omgroup} +\end{omgroup} + +\begin{omgroup}[id=concl]{Conclusion} + In this note we have given an example of standard mathematical markup and shown how a a + {\sTeX} collection can be set up for automation. +\end{omgroup} +\bibliographystyle{alpha} +\bibliography{kwarc} +\end{document} + +%%% Local Variables: +%%% mode: LaTeX +%%% TeX-master: t +%%% End: + +% LocalWords: miko Makefiles tex contfuncs modf sms pdflatex latexml Makefile +% LocalWords: latexmlpost omdoc STEXDIR BUTFILES DIRS diff --git a/Master/texmf-dist/doc/latex/stex/example/test/Makefile b/Master/texmf-dist/doc/latex/stex/example/test/Makefile new file mode 100644 index 00000000000..3634c7ddcff --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/example/test/Makefile @@ -0,0 +1,7 @@ +STEXDIR = ../.. +TARGET = glotest.tex +MODSLIBDIR = background + +include $(STEXDIR)/make/Makefile.vars +all: omdoc mods pdf +include $(STEXDIR)/make/Makefile.in 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..767ab735c4f 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..7d6de432ea0 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 new file mode 100644 index 00000000000..822e74a199a --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/mikoslides/README @@ -0,0 +1,11 @@ +mikoslides.cls: A Document class for Semantic Slides + +The mikoslides class provides a practical basis for marking up slides semantically in sTeX. + +Copyright (c) 2008 Michael Kohlhase +The package is distributed under the terms of the LaTeX Project Public License (LPPL) + +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 new file mode 100644 index 00000000000..39e6935573f Binary files /dev/null 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 new file mode 100644 index 00000000000..bc64ed35416 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/modules/README @@ -0,0 +1,21 @@ +modules.sty: An Infrastructure for Semantic Macros and Module Scoping + +The modules package supplies an infrastructure that allows mark up semantic macros +and to reuse them efficiently in multiple environments. + +This packge is a central part of the sTeX collection, a version of TeX/LaTeX that allows +to markup TeX/LaTeX documents semantically without leaving the document format, +essentially turning it into a document format for mathematical knowledge management +(MKM). + +This package supplies a definition mechanism for semantic macros and a non-standard +scoping construct for them, which is oriented at the semantic depency relation rather +than the document structure. This structure can be used by MKM systems for +added-value services, either directly from the sTeX sources, or after translation. + +Copyright (c) 2008 Michael Kohlhase +The package is distributed under the terms of the LaTeX Project Public License (LPPL) + +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 new file mode 100644 index 00000000000..7293781d655 Binary files /dev/null and b/Master/texmf-dist/doc/latex/stex/modules/modules.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/omdoc/README b/Master/texmf-dist/doc/latex/stex/omdoc/README new file mode 100644 index 00000000000..2a5111f8d38 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/omdoc/README @@ -0,0 +1,12 @@ +omdoc.cls: A LaTeX Class for OMDoc Documents +omdoc.sty: A LaTeX Package for OMDoc Document structures + +This package and class supplies a the infrastructure for writing OMDoc documents +(see http://www.omdoc.org) in LaTeX. + +Copyright (c) 2008 Michael Kohlhase +The package is distributed under the terms of the LaTeX Project Public License (LPPL) + +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 new file mode 100644 index 00000000000..614932300a4 Binary files /dev/null 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 new file mode 100644 index 00000000000..579f02789b3 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/omtext/README @@ -0,0 +1,12 @@ +omtext.sty: A LaTeX Package for OMDoc Text environments + +This package supplies a the infrastructure for writing OMDoc text fragments. +(see http://www.omdoc.org) in LaTeX. + +Copyright (c) 2010 Michael Kohlhase +The package is distributed under the terms of the LaTeX Project Public License (LPPL) + +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 new file mode 100644 index 00000000000..45919bf27ea Binary files /dev/null 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 new file mode 100644 index 00000000000..6fd953f20d1 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/presentation/README @@ -0,0 +1,16 @@ +presentation.sty: An Infrastructure for Presenting Semantic Macros + +This package supplies an infrastructure that allows to specify the presentation of +semantic macros, including preference-based bracket elision. This allows to markup the +functional structure of mathematical formulae without having to lose high-quality +human-oriented presentation in {\LaTeX}. Moreover, the notation definitions can be used by +MKM systems for added-value services, either directly from the {\sTeX} sources, or after +translation. + +Copyright (c) 2008 Michael Kohlhase +The package is distributed under the terms of the LaTeX Project Public License (LPPL) + +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 new file mode 100644 index 00000000000..2825ea285b1 Binary files /dev/null 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 new file mode 100644 index 00000000000..77b9314109e --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/problem/README @@ -0,0 +1,10 @@ +problem.sty: An Infrastructure for marking up Problems + +The problem package supplies an infrastructure that allows mark up problems and to reuse +them efficiently in multiple environments. + +Copyright (c) 2008 Michael Kohlhase +The package is distributed under the terms of the LaTeX Project Public License (LPPL) + +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 new file mode 100644 index 00000000000..1fe8cadc1c2 Binary files /dev/null and b/Master/texmf-dist/doc/latex/stex/problem/problem.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/rdfmeta/README b/Master/texmf-dist/doc/latex/stex/rdfmeta/README new file mode 100644 index 00000000000..0e113125f72 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/rdfmeta/README @@ -0,0 +1,11 @@ +rdfmeta.sty: An Infrastructure for RDFa metadata in arbitrary {\LaTeX} documents + +The rdfmeta packge allows mark up Ontology-based Metadata in LaTeX documents that can be +harvested by automated tools or exported to PDF. + +Copyright (c) 2010 Michael Kohlhase +The package is distributed under the terms of the LaTeX Project Public License (LPPL) + +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/rdfmeta + diff --git a/Master/texmf-dist/doc/latex/stex/rdfmeta/certification.pdf b/Master/texmf-dist/doc/latex/stex/rdfmeta/certification.pdf new file mode 100644 index 00000000000..b6562066e13 Binary files /dev/null and b/Master/texmf-dist/doc/latex/stex/rdfmeta/certification.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/rdfmeta/certification.tex b/Master/texmf-dist/doc/latex/stex/rdfmeta/certification.tex new file mode 100644 index 00000000000..5e4582833af --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/rdfmeta/certification.tex @@ -0,0 +1,26 @@ +\documentclass{omdoc} +\usepackage{stex,rdfmeta,amstext} +\begin{document} +\begin{module}[id=certification] +% \metalanguage[../owl2onto/owl2]{OWL2} + \keydef{omtext}{hasState} + \keydef{omgroup}{hasState} + \symdef{hasState}{\text{hasState}} + \symdef{statedocrd}[1]{rd. #1} + \symdef{tuev}{\text{T\"UV}} + \begin{omgroup}[id=foo,hasState=test]{Definitions} + \begin{definition}[for=hasState] + A document {\definiendum[hasState]{has state}} $x$, iff + the project manager decrees it so. + \end{definition} + \begin{definition}[for=statedocrd,hasState=$\statedocrd\tuev$] + A document has state \definiendum[statedocrd]{rd. $x$}, + iff it has been submitted to $x$ for certification. + \end{definition} + \begin{definition}[for=tuev,hasState=$\statedocrd\tuev$] + The $\tuev$ (Technischer \"Uberwachungs Verein) is a national + certification agency in Germany. + \end{definition} +\end{omgroup} +\end{module} +\end{document} diff --git a/Master/texmf-dist/doc/latex/stex/rdfmeta/rdfmeta.pdf b/Master/texmf-dist/doc/latex/stex/rdfmeta/rdfmeta.pdf new file mode 100644 index 00000000000..b99a36071f2 Binary files /dev/null and b/Master/texmf-dist/doc/latex/stex/rdfmeta/rdfmeta.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/reqdoc/README b/Master/texmf-dist/doc/latex/stex/reqdoc/README new file mode 100644 index 00000000000..adc3131dbbd --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/reqdoc/README @@ -0,0 +1,12 @@ +reqdoc.sty: Semantic Markup for Requirement Specification Documents + +This package supplies a the infrastructure for writing requirement +specification documents with embedded semantic markup, and to generate +XML-based documents from them via the LaTeXML system. + +Copyright (c) 2008 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/reqdoc diff --git a/Master/texmf-dist/doc/latex/stex/reqdoc/reqdoc.pdf b/Master/texmf-dist/doc/latex/stex/reqdoc/reqdoc.pdf new file mode 100644 index 00000000000..1aa4d8127f0 Binary files /dev/null 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 new file mode 100644 index 00000000000..e3edea34302 Binary files /dev/null and b/Master/texmf-dist/doc/latex/stex/reqdoc/requirements.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/reqdoc/requirements.tex b/Master/texmf-dist/doc/latex/stex/reqdoc/requirements.tex new file mode 100644 index 00000000000..0288bfdd402 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/reqdoc/requirements.tex @@ -0,0 +1,136 @@ +\documentclass[twoside]{omdoc} +\usepackage{stex} +\usepackage[recorddeps]{reqdoc} +\usepackage{VMeta} +\usepackage[pdftex, colorlinks=true, linkcolor=blue, citecolor=blue, filecolor=blue, pagecolor=blue, urlcolor=blue, pdftitle=V 1.0, pdfauthor=Administrator, pdfsubject=, pdfkeywords=20.10.97]{hyperref} + + +\WAperson[id=jdoe,affiliation=dfki,department=skss, + url=http://dfki.de/jdoe] + {John Doe} +\WAperson[id=miko,affiliation=jacu,department=case, + url=http://kwarc.info/kohlhase] + {Michael Kohlhase} +\WAinstitution[id=case,acronym=CASE,shortname=Center for Adv. Sys. Engineering, + url=http://jacobs-university.de/ses/case,partof=jacu] + {Center for Advanced Systems Engineering} +\WAinstitution[id=jacu,url=http://jacobs-university.de] + {Jacobs University Bremen} +\WAinstitution[id=skss,url=http://dfki.de/sks,partof=dfki,shortname=Safe\&Secure Cognitive +Systems,acronym=SKS] + {Safe and Secure Cognitive Systems} +\WAinstitution[id=dfki,url=http://dfki.de,shortname=DFKI,acronym=DFKI] + {German Research Center for Artificial Intelligence} +\begin{document} +\svnInfo $Id: requirements.tex 1968 2012-01-03 07:56:56Z kohlhase $ +\svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/reqdoc/requirements.tex $ +\begin{DCmetadata}[maketitle] + \DCMtitle{Requirements for Semantic Requirements Documents} + \DCMcreators{miko,jdoe} + \DCMdate{\today} + \DCMabstract{An example of a requirements document marked up with the {\texttt{reqdoc}} + and {\texttt{VMeta}} from {\stex}} + \VMversion{1.5} + \VMdocstate{current} + \VMcreated{28.01.2008} + \VMresponsible{miko} +\end{DCmetadata} + +\begin{VMchangelist} + \begin{VMchange}{07.02.08}{1.0}{miko} + made initiale version 1.0 (empty skeleton file) + \end{VMchange} + \begin{VMchange}{07.03.08}{1.1}{miko} + added two requirements + \end{VMchange} + \begin{VMchange}{12.05.08}{1.2}{miko} + simplified some formulations + \end{VMchange} + \begin{VMchange}{17.05.08}{1.3}{miko} + added third requirement that depends on the first two. + \end{VMchange} +\end{VMchangelist} + +\begin{VMcertification} + \begin{VMcertified}{12.02.08}{1.1}{miko}{needs work} + some formulations still unclear, but correct in principle + \end{VMcertified} + \begin{VMcertified}{15.05.08}{1.2}{jdoe}{at DFKI} + may need another requirement. + \end{VMcertified} + \begin{VMcertified}{19.02.08}{1.3}{jdoe}{at DFKI} + certified: this is what DFKI wants. + \end{VMcertified} +\end{VMcertification} +\clearpage + +\begin{omgroup}{Introduction} +\begin{omtext} +In this document we show how to use the {\texttt{reqdoc}} package, unfortauntely, the +requirements themselves are quite phony, since they are only for introductory purposes. +\end{omtext} +\end{omgroup} + + +\begin{module}[id=user-general-reqs] +\importmodule[cds/background]{background} + +\begin{omgroup}{Some Requirements} + +\begin{requirements}[numbering=yes,prefix=U] + \begin{requirement}[id=acceptdata,prio=2] + {Accept {\termref[cd=background,name=data]{data}} from heterogeneous + {\termref[cd=background,name=source]{data sources}}} + \reqnote{in particular: $\data$} + \end{requirement} + + \begin{requirement}[id=reftest,prio=1] + {do something with the data to test the reference} + \reqnote{not really, this is just a test} + \end{requirement} + + \begin{requirement}[id=areftest,prio=1,refs={acceptdata,reftest}] + {do something with the data to test the reference} + \reqnote{not really, this is just a test} + \end{requirement} +\end{requirements} +\end{omgroup} + +\begin{omgroup}{Requirements as tables} + +\begin{omtext} + We can also format requirements as tables +\end{omtext} + +\begin{reqtable}[prefix=U] + \reqline[id=tabacceptdata,prio=2] + {Accept {\termref[cd=background,name=data]{data}} from heterogeneous + {\termref[cd=background,name=source]{data sources}}} + {in particular: $\data$} + + \reqline[id=tabreftest,prio=1] + {do something with the data to test the reference + + do something with the data to test the reference} + {not really, this is just a test} + + \reqline[id=tabareftest,prio=1,refs={tabacceptdata,tabreftest}] + {do something with the data to test the reference} + {not really, this is just a test} +\end{reqtable} +\end{omgroup} +\end{module} + +\begin{omgroup}{Conclusion} + \begin{omtext} + See, it was quite simple + \end{omtext} +\end{omgroup} +\end{document} +\input{rest} + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: + diff --git a/Master/texmf-dist/doc/latex/stex/sproof/README b/Master/texmf-dist/doc/latex/stex/sproof/README new file mode 100644 index 00000000000..0b2a9844ec0 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/sproof/README @@ -0,0 +1,11 @@ +sproof.sty: An Infrastructure for Structural Markup for Proofs + +This package supplies macros and environment that allow to annotate the structure of +mathematical proofs. This structure can be used by MKM systems for added-value services, +either directly from the sTeX sources, or after translation via the LaTeXML system. + +Copyright (c) 2008 Michael Kohlhase +The package is distributed under the terms of the LaTeX Project Public License (LPPL) + +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 new file mode 100644 index 00000000000..fa048efe2f9 Binary files /dev/null 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 new file mode 100644 index 00000000000..457691747cd --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/sref/README @@ -0,0 +1,10 @@ +sref.sty: A LaTeX Package for semantic crossreferences + +This package and class supplies a the infrastructure for crossreferencing across multiple files + +Copyright (c) 2009 Michael Kohlhase +The package is distributed under the terms of the LaTeX Project Public License (LPPL) + +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 new file mode 100644 index 00000000000..e370c68d861 Binary files /dev/null and b/Master/texmf-dist/doc/latex/stex/sref/book.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/sref/book.tex b/Master/texmf-dist/doc/latex/stex/sref/book.tex new file mode 100644 index 00000000000..f2f6d5d0c0d --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/sref/book.tex @@ -0,0 +1,18 @@ +\documentclass{book} +\usepackage{omtext,omdoc} +\title{Advanced Crossreferencing in {\LaTeX}} +\author{Elder Researcher (ed.)} +\usepackage{hyperref} +\begin{document} +\maketitle +\tableofcontents +\newpage +\chapter{Semantic Crossreferencing (Jane Doe, ...)} +\input{idcmain}\newpage +\chapter{Inter-Document Crossreferencing (John Bull, ...)} +\input{scrmain} +\end{document} +%%% Local Variables: +%%% mode: LaTeX +%%% TeX-master: t +%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/sref/idc.pdf b/Master/texmf-dist/doc/latex/stex/sref/idc.pdf new file mode 100644 index 00000000000..8d6f66392cb Binary files /dev/null and b/Master/texmf-dist/doc/latex/stex/sref/idc.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/sref/idc.tex b/Master/texmf-dist/doc/latex/stex/sref/idc.tex new file mode 100644 index 00000000000..f85a3413758 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/sref/idc.tex @@ -0,0 +1,21 @@ +\documentclass[extrefs]{omdoc} +\usepackage{omtext} +\makeextrefs{idc} +\inputrefs{scr}{scr} +\extrefstyle{scr}{\cite[\protect{\theextref}]{scrcit}} +\title{Inter-Document Crossreferencing} +\author{John Bull} +\usepackage{hyperref} +\begin{document} +\maketitle\newpage +\input{idcmain}\newpage +\begin{thebibliography}{SCR} +\bibitem[SCR]{scrcit} +Jane Doe\newblock \href{scr.pdf}{Semantic Crossreferencing}\newblock Personal communication. +\end{thebibliography} +\end{document} + +%%% Local Variables: +%%% mode: LaTeX +%%% TeX-master: t +%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/sref/idcmain.tex b/Master/texmf-dist/doc/latex/stex/sref/idcmain.tex new file mode 100644 index 00000000000..7afdfcaaaef --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/sref/idcmain.tex @@ -0,0 +1,23 @@ +\begin{omgroup}[id=mcr]{Making Crossreferences} +\begin{omtext} + in the omgroup +\end{omtext} +\end{omgroup} +\newpage +\begin{omgroup}[id=rad]{Referencing across Documents} + Now, we test the referencing mechanism + \begin{omtext}[title=Internal Referencing] + First single refrences: \sref{mcr} (on page \spageref{mcr}) and \sref{rad} (on page + \spageref{rad}), and then compound ones: \srefs{mcr}{rad} +\end{omtext} + +\begin{omtext}[title=External Referencing] + First single references: \extref{scr}{setup} (on page \extpageref{scr}{setup}) and + \extref{src}{testing} (on page \extpageref{src}{testing}) +% external referencing two: \extrefs{tast}{foo}{bar} +\end{omtext} +\end{omgroup} +%%% Local Variables: +%%% mode: LaTeX +%%% TeX-master: "idc" +%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/sref/scr.pdf b/Master/texmf-dist/doc/latex/stex/sref/scr.pdf new file mode 100644 index 00000000000..58bf11840fc Binary files /dev/null and b/Master/texmf-dist/doc/latex/stex/sref/scr.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/sref/scr.tex b/Master/texmf-dist/doc/latex/stex/sref/scr.tex new file mode 100644 index 00000000000..16b35003027 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/sref/scr.tex @@ -0,0 +1,20 @@ +\documentclass[extrefs]{omdoc} +\usepackage{omtext} +\makeextrefs{scr} +\inputrefs{idc}{idc} +\extrefstyle{idc}{\cite[\protect{\theextref}]{idccit}} +\title{Semantic Crossreferencing} +\author{Jane Doe} +\usepackage{hyperref} +\begin{document} +\maketitle +\input{scrmain} +\begin{thebibliography}{IDC} +\bibitem[IDC]{idccit} +John Bull\newblock \href{scr.pdf}{Inter-Document Crossreferencing}\newblock Personal communication +\end{thebibliography} +\end{document} +%%% Local Variables: +%%% mode: LaTeX +%%% TeX-master: t +%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/sref/scrmain.tex b/Master/texmf-dist/doc/latex/stex/sref/scrmain.tex new file mode 100644 index 00000000000..044810a103b --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/sref/scrmain.tex @@ -0,0 +1,23 @@ +\begin{omgroup}[id=setup]{Setting up Semantic References} +\begin{omtext}[title=In a nutshell] + How to set up semantic references? Easy, just use the \texttt{omgroup} environment from + the \texttt{omdoc} package. +\end{omtext} +\end{omgroup} +\newpage +\begin{omgroup}[id=testing]{Testing the References} +Now, we test the referencing mechanism +\begin{omtext}[title=Internal Referencing] + First single refrences: \sref{setup} and \sref{testing}, and then compound ones: + \srefs{setup}{testing} +\end{omtext} + +\begin{omtext}[title=External Referencing] + First single references: \extref{idc}{mcr} and \extref{idc}{rad} +% external referencing two: \extrefs{tast}{foo}{bar} +\end{omtext} +\end{omgroup} +%%% Local Variables: +%%% mode: LaTeX +%%% TeX-master: "scr" +%%% End: diff --git a/Master/texmf-dist/doc/latex/stex/sref/sref.pdf b/Master/texmf-dist/doc/latex/stex/sref/sref.pdf new file mode 100644 index 00000000000..961abc7cbab Binary files /dev/null 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 new file mode 100644 index 00000000000..fe5c2dbbe9c --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/statements/README @@ -0,0 +1,10 @@ +statements.sty: A LaTeX Package for mathematical Statements + +This package and class supplies a the infrastructure for writing OMDoc statements +(see http://www.omdoc.org) in LaTeX. + +Copyright (c) 2008 Michael Kohlhase +The package is distributed under the terms of the LaTeX Project Public License (LPPL) + +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 new file mode 100644 index 00000000000..193da815504 Binary files /dev/null and b/Master/texmf-dist/doc/latex/stex/statements/statements.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/stex.pdf b/Master/texmf-dist/doc/latex/stex/stex.pdf new file mode 100644 index 00000000000..8e8b19b4844 Binary files /dev/null and b/Master/texmf-dist/doc/latex/stex/stex.pdf differ diff --git a/Master/texmf-dist/doc/latex/stex/workaddress/README b/Master/texmf-dist/doc/latex/stex/workaddress/README new file mode 100644 index 00000000000..5a0ebfe9fb4 --- /dev/null +++ b/Master/texmf-dist/doc/latex/stex/workaddress/README @@ -0,0 +1,12 @@ +workaddress.sty: An Infrastructure for marking up Affiliation Metadata in LaTeX documents + +The workaddress packge allows Affiliation and Address Metadata in LaTeX documents that can be +harvested by automated tools or exported to PDF. + +Copyright (c) 2011 Michael Kohlhase +The package is distributed under the terms of the LaTeX Project Public License (LPPL) + +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/workaddress + diff --git a/Master/texmf-dist/doc/latex/stex/workaddress/workaddress.pdf b/Master/texmf-dist/doc/latex/stex/workaddress/workaddress.pdf new file mode 100644 index 00000000000..97cfdfc7402 Binary files /dev/null and b/Master/texmf-dist/doc/latex/stex/workaddress/workaddress.pdf differ diff --git a/Master/texmf-dist/source/latex/stex/bin/Makefile b/Master/texmf-dist/source/latex/stex/bin/Makefile new file mode 100644 index 00000000000..c603315a964 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/Makefile @@ -0,0 +1,5 @@ +all: + +clean: + rm -f *~ + diff --git a/Master/texmf-dist/source/latex/stex/bin/Modparse.pm b/Master/texmf-dist/source/latex/stex/bin/Modparse.pm new file mode 100644 index 00000000000..2fd732b063d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/Modparse.pm @@ -0,0 +1,189 @@ +####################################################################################### +# A module for loading .tex files and feeding the data to the various applications. # +# Copyright (c) 2005, Ioan Sucan, 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/Modparse.pm$ # +# $Date: 2005-09-26 12:44:28 -0500 (Mon, 26 Sep 2005) $ $Rev: 4243 $ # +####################################################################################### + +package Modparse; + +use File::Basename; +use File::Path; + +# if both snippath and snippathList are specified, +# snippathList is ignored ! + +# if a default snippath definition file is found +# (snippath.def) it is used if no snippath is given +# as argument; +sub new { + my ($class, %options) = @_; + + $options{recursion} = 1 unless defined $options{recursion}; + $options{requireStatus} = 'include|exclude' unless defined $options{requireStatus}; + $options{loadInputs} = 1 unless defined $options{loadInputs}; + $options{onlyModuleLines} = 0 unless defined $options{onlyModuleLines}; + + if ( !(%{$options{snippath}}) && (-e "snippath.def") ) { + open(SNIPPATHDEF, 'snippath.def'); + my @snlist = ; + close(SNIPPATHDEF); + for (my $i = 0 ; $i <= $#snlist; $i++) { chomp($snlist[$i]); } + %{$options{snippath}} = @snlist; } + @{$options{snippathList}} = keys(%{$options{snippath}}) + if ($options{snippath} && %{$options{snippath}}); + $options{debug} = 0; + + bless(\%options, $class); } + +sub execute{ + my ($self, $file) = @_; + + local *run_event = sub { + my ($event, $arg) = @_; + if ($self->{$event}) { $self->{$event}($arg); } + }; + + local *go = sub { + my ($location, %param) = @_; + my ($tex, $path, @tex_data) = $self->readLocation($location); + return unless @tex_data; + my $NL = $#tex_data+1; + + $param{filename} = $tex; + $param{depth}++; + $param{filecount}++; + my $i = 0; + + $param{nextline} = sub { $tex_data[++$i]; }; + $param{prevline} = sub { $tex_data[--$i]; }; + $param{rewriteline}= sub { $tex_data[$i] = $_[0]; }; + + print "Processing $tex...\n" if $self->{verbose}; + run_event('onBeginFile', \%param); + + while ($i<$NL){ + $param{original} = $tex_data[$i]; + $_ = $tex_data[$i]; chomp; /([^%]*)((%.*)?)/; + ($param{tex}, $param{comment}) = ($1, $2); $_ = $1; + s/\s+//g; $param{simple_tex} = $_; + + if (/\\begin\{module\}(\[([^\]]*)\])?/) { + if ($param{in_module}) { + push(@{$param{module_stack}}, [$param{module_id}, $param{module_arg}]); } + $param{in_module} = 1; + $param{module_args} = $1 ? $2 : undef; + $param{module_id} = ($param{module_args} && + $param{module_args} =~ /id=([^\],]+)/) ? $1 : undef; + $param{module_nesting}++; + run_event('onBeginModule', \%param); } + + if (/\\end\{module\}/) { + run_event('onEndModule', \%param); + if ($#{$param{module_stack}} >= 0) { + ($param{module_id}, $param{module_args}) = @{pop(@{$param{module_stack}})}; + } else { + $param{in_module} = 0; + ($param{module_id}, $param{module_args}) = (undef, undef); } + $param{module_nesting}--; + } + + foreach my $srch_snippath(@{$self->{snippathList}}){ + $self->{snippath}{$srch_snippath} = $1 + if (/\\def\\$srch_snippath\#1\{([^\#]+)\#1\}$/); } + + if ($self->{follow} && (/\\((requiremodules(\[($self->{requireStatus})\])?)|input|include)\{([^\}]+)\}/)){ + my $req_filename = $5; my $req_spath = ''; my $command = $1; + my $is_require = ($command =~ /requiremodules/) ? 1 : 0; + if ($is_require || $self->{loadInputs}) { + foreach my $srch_snippath(@{$self->{snippathList}}){ + if ($req_filename =~ /\\$srch_snippath\{(.+)/){ + ($req_spath, $req_filename) = ($self->{snippath}{$srch_snippath}, $1); + last; }} + run_event('onRecurse', \%param); + if ($self->{recursion} || !$is_require) { + go($self->makeLocation($req_filename, $path, $req_spath), %param); } + } + } + run_event('onEveryLine', \%param) if ($param{in_module} || !$self->{onlyModuleLines}); + + last if (/\\end\{document\}/ && $self->{stopAtEnd}); + $i++; + } + run_event('onEndFile', \%param); + $param{depth}--; return; + }; + + my %param = (pack=>$self, perm=>$self->{_AUX_DATA}, depth=>0, filecount=>0, + in_module=>0, module_nesting=>0); + run_event('onBegin', \%param); + go($self->makeLocation($file), %param); + run_event('onEnd', \%param); + return; +} + + +# add a [.tex] extension to the filename +sub add_ext{ + my ($self, $fn, $ext) = @_; + $ext = '.tex' unless $ext; + $fn.=$ext if $fn !~ /\Q$ext\E$/; + $fn; } + +# as long as the extension is .tex, drop it +sub drop_ext{ + my ($self, $filename) = @_; + while ($filename =~ /\.tex$/){ + while ($filename !~ /\.$/ ) { chop($filename); } + chop($filename); } + $filename; } + +sub new_ext{ + my ($self, $filename, $ext) = @_; + $self->add_ext($self->drop_ext($filename), $ext); } + +# location = pointer to array of strings +# first element is filename; next are possible paths +sub makeLocation{ my $self = shift; return \@_; } + +# read a location into an array of strings +# aslo return filename and path to it (just in +# case some changes were made to it, like adding +# extension and/or relative paths) +sub readLocation{ + my ($self, $location) = @_; + + my ($filename, @paths) = @{$location}; + # try to add proper extension; + my $filename_ext = $self->new_ext($filename) unless -e $filename; + $filename = $filename_ext if $filename_ext && -e $filename_ext; + + # try search paths + if (! -e $filename){ + my $all_p = ''; + foreach my $p(@paths){ + $all_p .= $p; + $filename = $all_p.$filename and last if -e $all_p.$filename; + $filename = $p.$filename and last if -e $p.$filename; + if ($filename_ext){ + $filename = $all_p.$filename_ext and last if -e $all_p.$filename_ext; + $filename = $p.$filename_ext and last if -e $p.$filename_ext; } + }} + # don't do the same work too many times + foreach my $file(@{$self->{loadedFiles}}) + { return undef if $file eq $filename; } + + push(@{$self->{loadedFiles}}, $filename); + open(FIN, $filename) or die "Cannot open '$filename'\n"; + my @data = ; + close(FIN); + + # find path of current file + my $path = dirname($filename); + $path.='/' if ($path ne ''); + + return ($filename, $path, @data); +} + +1; diff --git a/Master/texmf-dist/source/latex/stex/bin/README b/Master/texmf-dist/source/latex/stex/bin/README new file mode 100644 index 00000000000..6af84e42bab --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/README @@ -0,0 +1,151 @@ +msplit +"Module Split" + +Usage: + msplit [options] + +Options: + --output filename of new main .tex file; default stdout + --path path where to write the module files; + --header filename of header file to be included in all new .tex files + --verbose verbose on + --stop stop when \end{document} is found, not at EOF + --help show help screen + + +NOTE: All options '--xoption' can be replaced by '-x' as long as there is only one option starting with 'x' + +This program splits the .tex file given at input into: + one main .tex file, that includes + more .tex files, each containing one module + +The name of the new main .tex file is specified by output option. The path to the inputted +files can be specified by path. The name of one generated input file is "name of the +module it contains".tex Running on one already split file will just make a copy. Example +usage: ./msplit slides.tex -o sl.tex -p ./modules -s + +Interpretation: "Split the file slides.tex; wite the new main file as sl.tex and the +inputted files should be placed in ./modules; if path does not exist, it is automatically +created; stop when (uncommented) \end{document} is found." + + + +rf +"Reuse Factor" + +Usage: + rf [options] + +Options: + --input .tex input file. stdin by default + --stop stop when \end{document} is found, not at EOF + --verbose verbose on + --help show help screen + + +This program computes the reuse factor for the .tex document given at input. This number +represents the ratio of latex processed lines of code to actual lines contained in file +given at input. This number will always be 1 for files that have no \input or \include. + +Example usage: +./rf -v -i slides.tex +Interpretation: "Compute the reuse factor of slides.tex and show all processed files(verbose mode)." + + + +sgraph +"Slides graph [representation]" + +Usage: + sgraph [options] + +Options: + --input .tex input file; stdin by default + --output output file; out.dot by default + --format output format; .ps by default; for available formats, see dot --help + --nodot do not generate .dot file, just target format + --root the 'root' of the graph. (name of course) + --theory generate a subgraph for the theory + --sliderange only look at the given slide range; (2:16 for example) + --stop stop reading data when \end{document} is found, not at EOF + --verbose verbose on + --help show help screen + +This program generates a .dot file readable by graphviz, containing a graph of the module +usage in the .tex file given at input, optionally looking at a specific theory and/or +slide range; it also adds a dummy 'root' for the graph, so one can see where everything +starts. It then converts the .dot file to a given format (.ps by default) using graphviz +and optionally deletes the intermediary .dot file. + +Example usage: +./sgraph -i slides.tex -o graph -f ps -n -t TCN --sliderange 20:10000 -r GenCS -v + +Interpretation: "Generate the graph of slides.tex in .ps format, write it in graph.ps, do +not keep the .dot file; include only the part needed for the theory 'TCN' and in the slide +range 20 to 10000; use as root for the graph the string 'GenCS' and show all processed +files." + + +sms +?? + +Usage: + sms [options] + +Options: + --input .tex file to split; default stdin + --verbose verbose on + --stop stop when \end{document} is found, not at EOF + --help show help screen + +Generate .sms file from .tex file given at input; .sms files contain only the modules and +the macros defined within, no other text. + +Example usage: +./sms -i slides.tex -s + +Interpretation: "Generate the slides.sms file for slides.tex; Stop when \end{document} is found." + + + + +bms +"Build Module Structure" + +Usage: + bms [options] + +Options: + --input .tex file to read from + --graph if mentioned, produce the suggested module structure as + a graphviz digraph (.dot file) + --path if mentioned, produce same input file/s (including + dependencies) in specified path with suggested + module structure. + --output the new name of the main .tex file in specified path + --root if mentioned, a father module is included, so that all + other modules descend from it. generally the course name + --stop stop when \end{document} is found; default is to go on + --definitions show a list of all definitions + --verbose verbose on + --help show help screen + + +This program has the purpose of computing a default module structure, such that a module +uses another module if and only if it needs that module and does not need another +descendant of it. First, the prgram reads all necessary data from the input .tex file, +computes the minimal strictly required module usage structure, and writes it as a graphviz +digraph, and/or writes a copy of the input .tex file (and maybe inputted files by the .tex +file) with the new module structure in the given path. All paths are created if not +existing. + +Example usage: +./bms -i slides.tex -s -g - | dot -Tps > out.ps; ggv out.ps +./bms -i slides.tex -g out.dot -p ./new + +Interpretation: "Build default module structure for slides.tex and write it to out.dot; +also use the obtained module structure and copy the input file to given path with changed +module usage." + +rng2dot +Convert Relax NG Compact form to Graphviz dot file diff --git a/Master/texmf-dist/source/latex/stex/bin/TexId.pm b/Master/texmf-dist/source/latex/stex/bin/TexId.pm new file mode 100644 index 00000000000..d0f28ccbce5 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/TexId.pm @@ -0,0 +1,464 @@ +# package for handling .tex IDs + +package TexId; + +use File::Basename; +use strict; + +# error messages markers + +use constant ERR => '[X]'; # error can't be fixed + +################### 'public' members ################### + +sub new{ + my ($class, %options) = @_; + my $self = {}; + + @{$self->{ENVIRONMENTS}} = qw(module note omtext example + definition problem proof + solution program); # the environments to look at + + @{$self->{ENV_PREFIXES}} = qw(mod not txt ex def prob pf sol prg); # the prefixes for environments + + + @{$self->{ENV_DEF}} = qw(id); # environment arguments that define new environments + @{$self->{ENV_USAGE}} = qw(use uses for from); # environment arguments that + # specify usage of other environments + + # options for the class + %{$self->{OPTIONS}} = %options; + + # in case \snippath{} is encountered, prepend this to the filename + $self->{OPTIONS}{snippath} = 'snippets/' unless defined $self->{OPTIONS}{snippath}; + + + # show progress while reading data + $self->{OPTIONS}{progress} = 1 unless defined $self->{OPTIONS}{progress}; + + bless ($self, $class); +} + +# check/set list of environments to look at +sub environments{ + my ($self, $new_environments, $new_prefixes) = @_; + if (defined $new_environments and defined $new_prefixes){ + @{$self->{ENVIRONMENTS}} = split(/,/, $new_environments); + @{$self->{ENV_PREFIXES}} = split(/,/, $new_prefixes); + die "Invalid argument combination (both arguments must have same number of elements)" + if $#{$self->ENVIRONMENTS} != $#{$self->ENV_PREFIXES}; + } + else { + return (join(',', @{$self->{ENVIRONMENTS}}), join(',', @{$self->{ENV_PREFIXES}})); + } +} + +# define/read environment definition arguments +sub env_def{ + my ($self, $new_env_def) = @_; + if (defined $new_env_def){ + @{$self->{ENV_DEF}} = split(/,/, $new_env_def); + } + else { + return join(',', @{$self->{ENV_DEF}}); + } +} + +# define/read the environment usage arguments +sub env_usage{ + my ($self, $new_env_usage) = @_; + if (defined $new_env_usage){ + @{$self->{ENV_USAGE}} = split(/,/, $new_env_usage); + } + else { + return join(',', @{$self->{ENV_USAGE}}); + } +} + +# define/read the snippets path +sub snippath{ + my ($self, $new_snippath) = @_; + if (defined $new_snippath){ + $new_snippath.='/' if ($new_snippath !~ /\/$/); + $self->{OPTIONS}{snippath} = $new_snippath; + } + else { + return $self->{OPTIONS}{snippath}; + } +} + + +# check all the definitions and module usages +# in all files referenced by base file +sub parse{ + + my ($self, $basefile) = @_; + + # recursive local function to go through each file + local *run_parse = sub + { + my ($filename) = @_; + + # read current .tex file + print STDERR "Loading $filename...\n" if ($self->{OPTIONS}{progress} == 1); + $filename = $self->load_file_data($filename); + my @text = @{$self->{FILEDATA}}; + my $line_no = 0; + + # go through every line of the read file + # depends on: \requiremodules, \snippath + # ignores \end{document} + + foreach (@text){ + # delete newline character, comments and redundant white space + + $line_no++; + /([^%]*)((%.*)?)/; + $_ = $1; + s/\s+//g; + + # see if an environment that has some arguments is defined + my ($possible_env, $env_args) = (undef, undef); + ($possible_env, $env_args) = ($1, $2) if (/\\begin\{([^\}]+)\}\[([^\]]+)\]/); + + # if it is, search it through the list of environments we want to look at + if (defined $possible_env){ + foreach my $environment(@{$self->{ENVIRONMENTS}}){ + next unless ($environment eq $possible_env); + + # if we found an anvironment we want to look at, + # go through the list of arguments + $env_args = $self->swap_exterior_char(',', ';', $env_args); + foreach (split(/;/, $env_args)){ + # we want arguments of type name=value + next unless /([^=]+)=(.+)/; + my ($arg_name, $arg_value) = ($1, $2); + + # see if the argument defines an environment + foreach my $current_env_arg(@{$self->{ENV_DEF}}){ + next unless ($arg_name eq $current_env_arg); + my @to_add = split(/,/, $arg_value); + push(@{$self->{'DEF'}->{$environment}}, @to_add); + foreach my $added_element(@to_add){ + $self->{'DEF'}->{LOCATION}{$added_element}.=$line_no.':'.$filename."\n"; + } + last; + } + + # see if the argument uses an environment + foreach my $current_env_arg(@{$self->{ENV_USAGE}}){ + next unless ($arg_name eq $current_env_arg); + my @to_add = split(/,/, $arg_value); + push(@{$self->{'USE'}->{$environment}}, @to_add); + foreach my $added_element(@to_add){ + $self->{'USE'}->{LOCATION}{$added_element}.=$line_no.':'.$filename."\n"; + } + last; + } + } + last; + } + } + # reference to another file + if (/\\requiremodules(\[(include|exclude)\])?\{([^\}]+)\}/){ + if (defined $2 && $2 eq 'include'){ + $_ = $3; + $_ = $self->{OPTIONS}{snippath}.$1 if (/\\snippath\{(.+)/); + $_ = $self->{path}.$_; + run_parse($_); + } + } + + # see definition of snippath + $self->snippath($1) if (/\\def\\snippath\#1\{([^\#]+)\#1\}$/); + } + }; + + run_parse($basefile); + +} + +# this is the first checking step to be done +sub check_uniq{ + + my ($self) = @_; + + my $error = 0; + + # sort environment definitions and see whether they are uniquely defined + foreach my $environment(@{$self->{ENVIRONMENTS}}){ + next unless defined $self->{'USE'}->{$environment}; + + my @list1 = sort @{$self->{'DEF'}->{$environment}}; + my @list2 = $self->uniq(@list1); + @{$self->{'DEF'}->{$environment}} = @list2; + + # some environments are defined multiple times + if ($#list1 != $#list2){ + my $j = 0; + for (my $i = 0; $i<=$#list2; $i++){ + my $start_j = $j; + while ($j<=$#list1 && $list1[$j] eq $list2[$i]){ + $j++; + } + if ($j - $start_j != 1){ + print STDERR ERR, " Environment '$list2[$i]' is defined multiple times ", + "within same environment type: \n"; + print STDERR $self->{'DEF'}->{LOCATION}{$list2[$i]}, "\n"; + $error = 1; + } + } + } + } + + # see that all environment references are unique (and sort them) + foreach my $environment(@{$self->{ENVIRONMENTS}}){ + next unless defined $self->{'USE'}->{$environment}; + @{$self->{'USE'}->{$environment}} = sort $self->uniq(@{$self->{'USE'}->{$environment}}); + } + + return $error; +} + +sub check_prefix{ + + my ($self) = @_; + + my $count = $#{$self->{ENVIRONMENTS}}+1; + + for (my $i = 0; $i < $count; $i++){ + my $environment = ${$self->{ENVIRONMENTS}}[$i]; + my $envprefix = ${$self->{ENV_PREFIXES}}[$i]; + next unless defined $self->{'DEF'}->{$environment}; + + foreach my $elem (@{$self->{'DEF'}->{$environment}}){ + + my $proper = undef; + if ($elem =~ /^([^:]+):(.+)/){ + $proper = $envprefix.':'.$2 if $1 ne $envprefix; + } else { + $proper = $envprefix.':'.$elem; + } + + if (defined $proper){ + print STDERR ERR, " $environment '$elem' has no prefix ($envprefix). Add it? [ , n ]"; + my $answer = ; + chomp($answer); + if ($answer eq 'y' or $answer eq ''){ + $self->add_change('DEF', $elem, $proper); + } + } + } + } +} + + +sub check_defs{ + my ($self) = @_; + + my $error = 0; + + # combine all definitions + my @defs; + map {push(@defs, @{$self->{'DEF'}->{$_}}) if defined @{$self->{'DEF'}->{$_}}} @{$self->{ENVIRONMENTS}}; + @defs = sort @defs; + + # combine all used environments + my @uses; + map {push(@uses, @{$self->{'USE'}->{$_}}) if defined @{$self->{'USE'}->{$_}}} @{$self->{ENVIRONMENTS}}; + @uses = sort @uses; + + + # for all environments + + foreach my $used_env(@uses){ + # if used environment is not defined + if ($self->find_elem($used_env, @defs) < 0){ + # maybe it is a typo + print STDERR ERR, " '$used_env' was not found. Replace options:\n"; + foreach my $definition(@defs){ + print STDERR "\t$definition\n" if $self->edit_dist($used_env,$definition)<4; + $error = 1; + } + } + } + + return $error; +} + + +sub add_change{ + my ($self, $location, $from, $to) = @_; + if ($self->{$location}->{LOCATION}{$from} =~ /([^:]+):([^\n]+)\n/){ + push(@{$self->{CHANGE}->{$2}}, ($1, $from, $to)); + } +} + +# write the stored changes +sub apply_changes{ + my ($self) = @_; + while (my ($filename, $changes) = each %{$self->{CHANGE}}){ + $filename = $self->load_file_data($filename); + my $count = int(($#{$changes}+1)/3); + for (my $i = 0; $i<$count ; $i++){ + my ($line, $from, $to) = (${$changes}[$i*3]-1, + ${$changes}[$i*3+1], ${$changes}[$i*3+2]); + ${$self->{FILEDATA}}[$line] =~ s/\Q$from/$to/; + } + print STDERR "Writing $filename\n" if ($self->{OPTIONS}{progress} == 1); + $self->write_file_data($filename); + } +} + +sub load_file_data{ + my ($self, $filename) = @_; + + # try to give proper file extension if file is not found + $filename = $self->add_ext($self->drop_ext($filename)) unless -e $filename; + + open(FIN, $filename) or die "Cannot open $filename\n"; + @{$self->{FILEDATA}} = ; + close(FIN); + + $self->{path} = dirname($filename).'/' unless defined $self->{path}; + + return $filename; +} + +sub write_file_data{ + my ($self, $filename) = @_; + + open(FOUT, ">$filename") or die "Cannot write $filename\n"; + print FOUT @{$self->{FILEDATA}}; + close(FOUT); +} + + +################### 'protected' members ################### + +sub def_env_list{ + my ($self, $env_name) = @_; + return @{$self->{'DEF'}->{$env_name}}; +} + +sub use_env_list{ + my ($self, $env_name) = @_; + return @{$self->{'USE'}->{$env_name}}; +} + + +################### 'private' members ################### + +sub drop_ext{ + my ($self, $filename) = @_; + while ($filename =~ /\.tex$/){ + while ($filename !~ /\.$/ ) { chop($filename); } + chop($filename); + } + return $filename; +} + +sub add_ext{ + my ($self, $filename) = @_; + $filename.='.tex' if $filename !~ /\.tex$/; + return $filename; +} + +# look at $word, and swap all occurances of $char_find with +# $new_char if they are not in a {...} environment + +sub swap_exterior_char{ + my ($self, $char_find, $new_char, $word) = @_; + my @new_word = (); + my $exterior = 0; + foreach (split('', $word)){ + if ($_ eq '{'){ + $exterior++; + next; + } + + if ($_ eq '}'){ + $exterior--; + next; + } + + if ($exterior == 0 && $_ eq $char_find){ + push(@new_word, $new_char); + } + else{ + push(@new_word, $_); + } + } + return join('',@new_word); +} + +# return unique elements from a list +sub uniq{ + my ($self, @list) = @_; + my %seen = (); + my @uniqu = grep { ! $seen{$_} ++ } @list; + return @uniqu; +} + + +# binary search +sub find_elem{ + my ($self, $elem, @list) = @_; + + local *search_elem = sub + { + my ($a, $b) = @_; + my $m = int(($a + $b)/2); + return $m if $list[$m] eq $elem; + return -1 if ($a >= $b); + return ($list[$m] le $elem)?search_elem($m+1,$b):search_elem($a,$m-1); + }; + + return search_elem(0, $#list); +} + +# edit distance between two strings +# insertions, deletions, replacement, transposition +sub edit_dist{ + my ($self, $s1, $s2) = @_; + my $m = length($s1); + my $n = length($s2); + my @w1 = split(//, $s1); + my @w2 = split(//, $s2); + + # add dummy char so we can have nicer indeces + unshift(@w1, '*'); + unshift(@w2, '*'); + + # distances matrix + my @d; + + # initialize + $d[0][0] = 0; + for (my $i = 1; $i <= $m ; $i++) { $d[$i][0] = $i;} + for (my $i = 1; $i <= $n ; $i++) { $d[0][$i] = $i;} + + # compute + for (my $i = 1; $i <= $m ; $i++){ + for (my $j = 1; $j <= $n ; $j++){ + my @possibilities = ($d[$i-1][$j-1] + ($w1[$i] ne $w2[$j]), + $d[$i-1][$j] + 1, $d[$i][$j-1] + 1); + + push(@possibilities, $d[$i-2][$j-2] + 1) + if ($i>1 && $j>1 && $w1[$i] eq $w2[$j-1] && $w1[$i-1] eq $w2[$j]); + + $d[$i][$j] = $self->minimum(@possibilities); + } + } + return $d[$m][$n]; +} + +sub minimum{ + my ($self, @list) = @_; + my $result = shift(@list); + map {$result = $_ if $result ge $_} @list; + return $result; +} + + +1; diff --git a/Master/texmf-dist/source/latex/stex/bin/allgen b/Master/texmf-dist/source/latex/stex/bin/allgen new file mode 100755 index 00000000000..4728d89ee56 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/allgen @@ -0,0 +1,30 @@ +#!/bin/bash + +if [[ -z $STEX_CONTENT_HOME ]] +then + echo "STEX_CONTENT_HOME is not set; please set it in your ~/.bashrc" + exit 1 +fi + +LIB="$STEX_CONTENT_HOME/slides/lib" +cat <<'EOF' +% this file is automatically generated by allgen +% Note: This hack is needed to make mikoslides and problems work together. +\PassOptionsToPackage{solutions,notes,pts,min}{problems} +EOF + +sed -e '/\\begin{document}/ i\ +\\usepackage{problems} +' $LIB/pre.tex | \ + grep -v '^\\def\\snippets' + +cat <<'EOF' +EOF + +for file in *.tex +do + prefix=${file%.tex} # file name without .tex suffix + [[ $prefix != "all" ]] && echo -e "\\subsection{${prefix//_/\\\\_}} \n \\input{$prefix}" # in subsection replace "_" by "\_" +done + +cat $LIB/post.tex diff --git a/Master/texmf-dist/source/latex/stex/bin/bms b/Master/texmf-dist/source/latex/stex/bin/bms new file mode 100755 index 00000000000..52f1002c0d9 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/bms @@ -0,0 +1,340 @@ +#!/usr/bin/perl -w + +####################################################################################### +# A tool for building a default module usage structure. # +# Copyright (c) 2005, Ioan Sucan, 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/bms$ # +# $Date: 2005-10-04 10:47:41 -0500 (Tue, 04 Oct 2005) $ $Rev: 4371 $ # +####################################################################################### + +use strict; + +use Getopt::Long; +use File::Path; +use Pod::Usage; +use Modparse; + + +########################################## +# Command Line processing +########################################## + +my $input="-", my $graph_output='', my $graph_root='', +my $verbose=0, my $stop_at_end=0; +my $show_definitions=0, my $show_modules = 0; +my %arg_snippath; my @snippathList; + +$main::path_new=''; +$main::new_name=''; + +GetOptions("path=s" => \%arg_snippath, + "defpath=s" => \@snippathList, + "graph=s" => \$graph_output, + "opath=s" => \$main::path_new, + "output=s" => \$main::new_name, + "root=s" => \$graph_root, + "definitions" => sub {$show_definitions = 1;}, + "modules" => sub {$show_modules = 1;}, + "stop" => sub {$stop_at_end = 1;}, + "verbose" => sub {$verbose = 1;}, + "help" => sub {pod2usage(2);}); + +$input = $ARGV[0] if ($#ARGV>=0); + +########################################## +# .tex data reading +########################################## + +$main::no_name_modules = 0; +%main::definition_module = (); +@main::definitions_list = (); + +%main::module_definitions = (); +%main::used_modules = (); +@main::modules_list = (); + +my $mp = Modparse->new(snippathList=>\@snippathList, + snippath=>\%arg_snippath, + stopAtEnd=>$stop_at_end, + verbose=>$verbose, + requireStatus=>'exclude', + onlyModuleLines=>1, + onBeginModule=>sub { + if (!defined $_[0]->{module_id}) { + $_[0]->{module_id} = "MOD".$main::no_name_modules; + $main::no_name_modules++; } + $_[0]->{defines} = ''; + }, + onEveryLine=>sub { + if ($_[0]->{simple_tex} =~ /\\(sym|abbr|ell)def\{\\([^\}]+)\}/) { + my $data = $2; + $_[0]->{defines} .= "$data;"; + $main::definition_module{$data} = $_[0]->{module_id}; + push(@main::definitions_list, $data); + } elsif ($_[0]->{simple_tex} =~ /\\STRlabel\{([^\}]*)\}/){ + my $data = "L:$1"; + $_[0]->{defines} .= "$data;"; + $main::definition_module{$data} = $_[0]->{module_id}; + push(@main::definitions_list, $data); + } + $_[0]->{module_content} .= $_[0]->{simple_tex}; + }, + onEndModule=>sub { + chop($_[0]->{defines}) if $_[0]->{defines}; + $main::module_definitions{$_[0]->{module_id}} = $_[0]->{defines}; + push(@main::modules_list, $_[0]->{module_id}); + my $module_refs = ''; + foreach my $def(@main::definitions_list){ + next if $main::definition_module{$def} eq $_[0]->{module_id}; + next unless $module_refs !~ /$main::definition_module{$def}/; + if ($def =~ /^L\:(.*)/){ + $module_refs .= "$main::definition_module{$def};" + if ($_[0]->{module_content} =~ /\\STRcopy\{$1\}/); + } else { + $module_refs .= "$main::definition_module{$def};" + if ($_[0]->{module_content} =~ /\\$def/); + } + } + chop($module_refs) if $module_refs; + $main::used_modules{$_[0]->{module_id}} = $module_refs; + }); + +################################################################## +# Internal routines for BMS +################################################################## + +%main::bms = (); + +# add a dummy module that uses nothig, such that any other module uses at least something +sub addroot { + foreach my $module(@main::modules_list){ + next if $main::used_modules{$module}; + $main::used_modules{$module} = $graph_root; + } + push(@main::modules_list, $graph_root); + $main::module_definitions{$graph_root}=''; + $main::used_modules{$graph_root}=''; +} +# end addroot + +sub included { + my ($a1_ref, $a2_ref) = @_; + my $ok; + foreach my $elem (@$a1_ref){ + $ok = 0; + foreach (@$a2_ref){ + if ($elem eq $_){ + $ok=1; + last; }} + return 0 unless $ok;} + return 1; +} + +# find if a module uses another module +sub can_go{ + my ($src,$dest) = @_; + return 1 if $src eq $dest; + foreach (split(/;/, $main::bms{$src})){ + return 1 if can_go($_,$dest); + } + return 0; +} +# end can_go + +# find the actual module structure +sub find_bms{ + my @added_modules, my @can_add, my @to_look, my @next_step; + + %main::bms=(); + @to_look = @main::modules_list; + @added_modules = (); + + while($#main::modules_list != $#added_modules){ + + @can_add=(); @next_step=(); + + foreach my $module(@to_look){ + my @temp = split(/;/, $main::used_modules{$module}); + included(\@temp,\@added_modules)?push(@can_add,$module):push(@next_step,$module); + } + @to_look = @next_step; + + foreach my $module(@can_add){ + + my @uses = split(/;/,$main::used_modules{$module}); + my $change = 1; + while ($change){ + $change = 0; + foreach my $f1(@uses){ + foreach my $f2(@uses){ + next if $f1 eq $f2; + if (can_go($f1,$f2)){ # i.e. f2 used by f1 => can remove f2 + my @new_uses; + foreach (@uses){ + push(@new_uses,$_) unless ($_ eq $f2); + } + @uses = @new_uses; + $change = 1; + last; + } + } + last if $change; + } + } + $main::bms{$module} = join(";",@uses); + push(@added_modules,$module); + } + } +} +# end find_bms + +# print the content of %bms in a .dot file; note: may change %bms by adding dummy root +sub printgraph { + my $out = shift; + + addroot if $graph_root; + + open(FOUT,">$out") or die "Can't write $out\n"; + print FOUT "digraph MS {\n"; + while (my ($module, $uses) = each %main::bms){ + $uses =~ s/-/_/g; + $module =~ s/-/_/g; + if ($uses){ + if ($uses =~ /;/){ + print FOUT "$module -> {$uses};\n"; + } else { + print FOUT "$module -> $uses;\n"; + } + } else { + print FOUT "$module [shape=box color=red];\n"; + } + } + print FOUT "}\n"; + close(FOUT); +} +# end printgraph + +# print the list of definitions +sub printdefinitions{ + while (my ($module,$def) = each %main::module_definitions){ + print "$module:\n" if $def; + foreach (split(/;/,$def)){ + print "\t$_\n"; + } + }} +# end printdefinitions + +#print the list of modules +sub printmodules{ + while (my ($module,$uses) = each %main::used_modules){ + print "'$module' uses:\n $uses\n\n\n"; + }} +#end printmodules + + +# wite the new .tex file, with found module usage, in given path +sub writenew { + my ($filename) = @_; + $main::no_name_modules = 0; + my $wmp = Modparse->new(snippathList=>\@snippathList, + snippath=>\%arg_snippath, + stopAtEnd=>$stop_at_end, + verbose=>$verbose, + requireStatus=>'exclude', + onlyModuleLines=>0, + onBeginFile=> sub { + $_[0]->{'new_content'.$_[0]->{depth}} = ''; + }, + onBeginModule=>sub { + if (!defined $_[0]->{module_id}) { + $_[0]->{module_id} = "MOD".$main::no_name_modules; + $main::no_name_modules++; } + my $new_uses = $main::bms{$_[0]->{module_id}}; + if (defined $new_uses) { + $new_uses =~ s/;/,/g; + $new_uses="{$new_uses}" if $new_uses =~ /,/; + my $arg = $_[0]->{module_args}; + my @new_arg=(); + my $done = 0; + while ($arg =~ /^([\w-]+)=(([\w-]+)|(\{[\w,-]+\}))/){ + if ($1 eq 'uses'){ + push(@new_arg,"$1=$new_uses")if $new_uses; + $done = 1; + } else { + push(@new_arg,"$1=$2"); + } + $arg=substr($arg,length($1)+length($2)+1); + $arg=substr($arg,1) if ($arg =~ /^,/); + } + if ($new_uses) { + push(@new_arg,"uses=$new_uses") unless $done; } + $_[0]->{original} = "\\begin{module}\[".join(',',@new_arg)."\] ". $_[0]->{comment}. "\n"; + } + }, + onEveryLine=>sub { + $_[0]->{'new_content'.$_[0]->{depth}} .= $_[0]->{original}; + }, + onEndFile=> sub { + my $filename = ($main::path_new).'/'.$_[0]->{filename}; + my $path = $filename; + while ($path !~ m!\/$!) { chop($path); } + mkpath($path); + $filename = $path.'/'.$main::new_name if ($main::new_name && $_[0]->{depth} == 1); + print "Writing $filename\n" if $_[0]->{pack}->{verbose}; + open(FS, ">$filename") or die "Cannot write $filename\n"; + print FS $_[0]->{'new_content'.$_[0]->{depth}}; + close(FS); + }); + + $wmp->execute($filename); +} + + +############################################################# +# Start program +############################################################# + +$mp->execute($input); + +printdefinitions if $show_definitions; +printmodules if $show_modules; + +if ($graph_output || $main::path_new){ + find_bms; + writenew($input) if $main::path_new; + printgraph($graph_output) if $graph_output; +} + +__END__ + + +=head1 SYNOPSIS + +bms [options] + +Options: + + --path XXX specify the value of \XXX (some snippath) in case it is + = somePath not defined in the processed .tex file + --defpath XXX specify which \XXX (snippath definitions) to look for + --graph if mentioned, produce the suggested module structure as + a graphviz digraph. (.dot file) + --opath if mentioned, produce same input file/s (including + dependencies) in specified path with suggested + module structure. + --output the new name of the main .tex file in specified path. + --root if mentioned, a father module is included, so that all + other modules descend from it. generally the course name. + --stop stop when \end{document} is found; default is to go on. + --definitions show a list of all definitions. + --modules show a list of all modules. + --verbose verbose on. + --help this screen. + + + This program has the purpose of computing a default module structure, according +to actual necessities. + Example: + ./bms -i slides.tex -g out.dot + ./bms -i slides.tex -s -g - | dot -Tps > out.ps; ggv out.ps diff --git a/Master/texmf-dist/source/latex/stex/bin/checksum b/Master/texmf-dist/source/latex/stex/bin/checksum new file mode 100755 index 00000000000..9f0e533a8d4 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/checksum @@ -0,0 +1,71 @@ +#!/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/checksum$ # +####################################################################################### + +use strict; + +use Getopt::Long; +use Modparse; +use Pod::Usage; +use Cwd qw(abs_path); + +####### start of program ####### +my $mode = "update"; #Default is update +my $action = { "update" => \&update, "disable" => \&disable, "enable"=>\&enable }; +GetOptions("disable" => sub { $mode="disable"; }, + "enable" => sub { $mode="enable"; }, + "update" => sub { $mode="update"; }); + + +my ($path) = @ARGV; +$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 () { + push @lines, &{$$action{$mode}}($_,$checksum); +} +close(IN); +open(OUT,">$path") or die "Cannot write to DTX target: $path\n"; +print OUT join("",@lines); +close(OUT); +######### Subroutines ############ +sub update { + my $checksum=$_[1]; + $_[0]=~s/\\CheckSum\{\d*\}/\\CheckSum{$checksum}/ if $checksum; + $_[0]; +} + +sub disable { + $_[0]=~s/\\CheckSum\{(\d*)\}/\\iffalse\\CheckSum\{$1}\\fi/ unless $_[0]=~/\\iffalse\\CheckSum\{(\d*)\}\\fi/; + $_[0]; +} + +sub enable { + $_[0]=~s/\\iffalse\\CheckSum\{(\d*)\}\\fi/\\CheckSum{$1}/; + $_[0]; +} + + +__END__ + + +=head1 SYNOPSIS + +checksum --update|enable|disable + +Purpose: + Update, enable or disable the \CheckSum macro for a given .dtx source + +Example: + checksum omd.dtx --update diff --git a/Master/texmf-dist/source/latex/stex/bin/convert-paths b/Master/texmf-dist/source/latex/stex/bin/convert-paths new file mode 100755 index 00000000000..55ee72a2370 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/convert-paths @@ -0,0 +1,56 @@ +#!/usr/bin/perl -w +# +# A script that converts paths in sTeX files from the old \Foosnipppath{bar} +# to \snippets{foo/bar}, according to the definition of those path macros in +# paths.sty. +# +# Syntax: convert-paths path/to/paths.sty FILES +# +# © 2008 Christoph Lange, KWARC, Jacobs University + +use File::Copy; + +my %map; + +my $SNIPPATHRE = '\\\\[[:alnum:]]+(?i:snip|pic)path'; + +if (open(P, shift(@ARGV))) { + print STDERR "Mapping:\n"; + while (

) { + if (/^\\def($SNIPPATHRE)#1\{(\\KWARCslides\{[^#]+)#1\}/o) { + printf STDERR "\t%s -> %s\n", $1, $2; + $map{$1} = $2; + } + } + close(P); +} +else { + die "Could not open paths.sty"; +} + +print STDERR "Processing files:\n"; +while ($#ARGV >= 0) { + my $filename = shift(@ARGV); + print STDERR "\t$filename\n"; + copy($filename, "$filename~") || print STDERR "\t\tWARN: could not create backup\n"; + if (open(T, $filename)) { + # slurp the file into a string + local $/; + $data = ; + $data =~ s/($SNIPPATHRE)\{([^}]+)\}/ + $map{$1} ? "$map{$1}$2\}" + : ((print STDERR "\t\tWARN: could not replace $1\n"), "$1\{$2}") + /oxge; + close T; + if (open(T, ">$filename")) { + print T $data; + close T; + } + else { + print STDERR "\t\tWARN: could not save replacement\n"; + } + } + else { + print STDERR "\t\tWARN: could not open file\n"; + } +} diff --git a/Master/texmf-dist/source/latex/stex/bin/filedate b/Master/texmf-dist/source/latex/stex/bin/filedate new file mode 100755 index 00000000000..6ea1a5d6870 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/filedate @@ -0,0 +1,45 @@ +#!/usr/bin/perl -w +####################################################################################### +# A tool for updating .dtx files with a given package date. # +# 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/filedate$ # +####################################################################################### + +use strict; + +use Getopt::Long; +use Modparse; +use Pod::Usage; +use Cwd qw(abs_path); + +my ($file) = @ARGV; +my $date = `svn info $file`; +$date =~ /Last Changed Date: (\d+)-(\d+)-(\d+)/; +$date = $1.'/'.$2.'/'.$3; +$file = abs_path($file); +open(IN,"<$file"); +my @lines = (); +while () { + if ($_ =~ /\\Provides(Package|Class)/) { + $_ =~ s/\[(.*?)\s/\[$date /; + } + push @lines, $_; +} +close(IN); +open(OUT,">$file"); +print OUT join("",@lines); +close(OUT); + +__END__ + + +=head1 SYNOPSIS + +filedate + +Purpose: + Update the dates for a \ProvidePackage invocation in a given .dtx source + +Example: + filedate omdoc.dtx diff --git a/Master/texmf-dist/source/latex/stex/bin/gen-symdef-table.pl b/Master/texmf-dist/source/latex/stex/bin/gen-symdef-table.pl new file mode 100755 index 00000000000..cd6da0dc06a --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/gen-symdef-table.pl @@ -0,0 +1,85 @@ +#!/usr/bin/perl +use Cwd; + +die 'Set your environment variable "KWARC_HOME" and try again.' if !($ENV{KWARC_HOME}); + +open(PATH_STY,"$ENV{KWARC_HOME}/projects/stex/sty/paths.sty") || die "can't open path.sty"; +while ($line=) { + $line =~ m/\\def\\(\w*).*\/([\w-]*)\/#1/; + $macros{$2}=$1; # dir -> macro +} +close(PATH_STY); + +print <) { + $dir = substr($dir,0,-1); + if (@ARGV){ # take all dirs listet in @ARGV + next if !(grep(/$dir/,@ARGV)) + } else { # take all dirs but those listed here + # next if $dir lt "b"; #test break + # next if $dir gt "comb"; #test break + next if grep(/$dir/,qw(PIC activemath admin eLearning lib kwarc mathweb mbase old.assignments omdoc openmath physml quantumcomputing sTex search semweb setthy spl1 term-indexing trs varia xml)); #skip these + next if grep(/$dir/,qw(ai codeml fa graphs-trees kr mws nlfrags pl0 pl1 prolog regexp)); #broken dirs + } + print "\\begin{omgroup}{$dir}\n"; + foreach $file (<${dir}/en/*.sms>) { + $file =~ m/([^\/]*).sms/; + $prefix = $1; + next if grep(/$prefix/,qw(all admin)); + print "\\begin{omgroup}{$prefix}\n"; + print "\\requiremodules[exclude]{\\$macros{$dir}\{en/$prefix}\}\n"; + open (FILE,"./$file") || die "can't open $file"; + while ($line=) { + $line =~ s/%.*//; + if ($line =~ m/begin{module}/) { # many "begin{module}" in one line yields invalid stex!!! + $uses = ($line =~ m/id=([\w-]*)/) ? "[uses=$1]" : ""; + print "\\begin{module}$uses\n"; # symbols after inner modules yields stex errors!!! + print "\\begin{verbatim}\n"; + print "\\requiremodules[exclude]{\\$macros{$dir}\{en/$prefix}\}\n"; + print "\\begin{module}$uses\n"; + print "\\end{verbatim}\n"; +# print "\\begin{multicols}{2}\n"; + } + if ($line =~ m/\\symdef{([^}]*)}(?:\[(\d)\])?({\\assoc\[)?/) { + $symb = $1; + $arity = $2; + $isAssoc = $3 ne ""; + $defArity = $isAssoc ? 4 : $arity; + $exampleArity = $arity eq "" ? 0 : $defArity; + $arityOrAssoc = $isAssoc ? "assoc" : $arity; + $dummy_args = join("",map {"{$_}"} (qw(a b c d e f g h m)[0..$exampleArity-1])); + $dummy_args = "{a,b,c,d}" if $isAssoc; + $escaped_dummy_args = $dummy_args; + $escaped_dummy_args =~ s/{/\\{/g; + $escaped_dummy_args =~ s/}/\\}/g; +# print "{\\tt{$symb\[$arityOrAssoc\]}} $escaped_dummy_args\\hfill"; + print "{\\tt{$symb$escaped_dummy_args}} \\hfill "; + print "\$\\$symb$dummy_args\$\\\\\n"; + } + if ($line =~ m/end{module}/) { # several "end{mdoule}" allowed!!! +# print "\\end{multicols}\n"; + print $line; + } + } + close(FILE); + print "\\end{omgroup}\n"; + } + print "\\end{omgroup}\n"; +} + +print "\\end{document}"; 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/idcheck b/Master/texmf-dist/source/latex/stex/bin/idcheck new file mode 100755 index 00000000000..d832ac7788e --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/idcheck @@ -0,0 +1,29 @@ +#!/usr/bin/perl -w +use strict; + +use Getopt::Long; +use File::Path; +use Pod::Usage; +use TexId; + + + +my $tex = TexId->new(progress => 1); + + + +$tex->load_file_data('../GenCS/notes.tex'); + +my ($a, $b) = $tex->environments(); +print $b, "\n"; + +print $tex->snippath(), "\n"; + +$tex->parse('../GenCS/notes.tex'); +#print join(', ', $tex->use_env_list('omtext')), "\n"; + +#print $tex->edit_dist('anaIU', 'aanUI'), "\n"; + +$tex->check_uniq; +$tex->check_prefix; +$tex->apply_changes; diff --git a/Master/texmf-dist/source/latex/stex/bin/msplit b/Master/texmf-dist/source/latex/stex/bin/msplit new file mode 100755 index 00000000000..cf178ce9b5f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/msplit @@ -0,0 +1,140 @@ +#!/usr/bin/perl -w +############################################################################################## +# Program: msplit (a utility for splitting STeX documents along module boundaries) +############################################################################################## +# $URL: svn://kwarc.faculty.iu-bremen.de/kohlhase/kwarc/projects/content/bin/msplit$ +# $Rev: 3722 $; last modified by $Author: $ +# $Date: 2005-07-27 03:22:19 +0200 (Wed, 27 Jul 2005) $ +# Copyright (c) 2005 Ioan Sucan +############################################################################################## +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License [http://www.gnu.org/copyleft/gpl.html] +# for more details. +############################################################################################## +use strict; +use Getopt::Long; +use File::Path; +use Pod::Usage; + +my $input='-', my $output='-', my $path='', my $verbose=0, my $stop_at_end=0; +my $flag = "include"; +my $header='', my @hdr_data; + +sub texf { + my $fn = shift; + $fn.='.tex' if $fn !~ /\.tex$/; + return $fn; } + +sub write_file_data{ + my $filename = shift; + open(FS,$filename) or die "Cannot write $filename\n"; + print FS @_; + close(FS); } + +# remove the last component in a path +sub justpath{ + my $arg = shift; + return '' if ($arg !~ m!\/!); + while ($arg !~ m!\/$!) {chop($arg);} + return $arg; } +# end justpath + + +sub go { + my ($input, $output) = @_; + my $path = justpath($output); + + my @module_file=(); + my @out_data=(); + + print "Splitting $input...\n" if $verbose; + `mv $output $output~` if (-e $output); + $input="$input~" if ($input eq $output); + + open(FIN,$input) or die "Can't open $input\n"; + my $in_module=0; my $path_name; + foreach (){ + chomp; + /([^%]*)((%.*)?)/; + ($_,my $comment)=($1,$2); + if (/\\begin\s*\{module\}/){ + $_ =~ s/\s//g; + /id=([\w-]*)/; + my $module_name = $1; + $path_name = "$path$module_name.tex"; + print "$path_name\n" if $verbose; + `mv $path_name $path_name~` if (-e $path_name); + push(@module_file,@hdr_data) if $header; + push(@module_file,"\n$_$comment\n"); + push(@out_data,"\\requiremodules[$flag]{$module_name}\n"); + $in_module=1; + next; } + if (/\\end\s*\{module\}/){ + $_ =~ s/\s//g; + push(@module_file,"$_$comment\n"); + mkpath(justpath($path_name)); + write_file_data(">$path_name",@module_file); + $in_module=0; + next; } + if ($stop_at_end && /\\end\s*\{document\}/){ + $_ =~ s/\s//g; + push(@out_data,"$_$comment\n"); + last; } + $_="$_$comment\n"; + if ($in_module) {push(@module_file,$_);} + else {push(@out_data,$_); }} + close(FIN); + mkpath($path) if $path; + write_file_data(">$output",@out_data); } + +GetOptions("output=s" => \$output, + "path=s" => \$path, + "header=s" => \$header, + "exclude" => sub { $flag = "exclude"; }, + "verbose" => sub { $verbose=1; }, + "stop" => sub { $stop_at_end=1; }, + "help" => sub { pod2usage(2)}); + +$input = $ARGV[0] if ($#ARGV>=0); +die "Input file does not exist\n" if (! defined $input || ! -e $input); +$output = $input if (! defined $output); + +if ($header && -e $header) { + open(HDR,$header); + @hdr_data = ; + close(HDR); } + +$path.='/' if $path && $path !~ m!\/$!; +go($input,$path.$output); +print "Done.\n" if $verbose; + +__END__ + + +=head1 SYNOPSIS + +msplit [options] + +Options: + + --output filename of new main .tex file; default: same as input + --path path where to generate the new documents; '.' by default + --header file to be copied at beginning of all new module files + --exclude modules exluded by default; if not mentioned, modules + are included by default + --verbose verbose on + --stop stop when \end{document} is found; default is to go on + --help this screen + + + + This program splits a .tex file into more files, each containing a module. + Example usage: + ./msplit slides.tex -o sl.tex -p ./modules -s diff --git a/Master/texmf-dist/source/latex/stex/bin/old/Makefile b/Master/texmf-dist/source/latex/stex/bin/old/Makefile new file mode 100644 index 00000000000..d2ae41c6401 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/old/Makefile @@ -0,0 +1,28 @@ +all: src exec + +src: idcheck.l defcon.l modstr.l + flex -ft idcheck.l > idcheck.yy.c + flex -ft defcon.l > defcon.yy.c + flex -f+t modstr.l > modstr.yy.cc + +idcheck: idcheck.l + flex -f $< + gcc lex.yy.c -lfl -o idcheck + +defcon: defcon.l + flex -f $< + gcc lex.yy.c -lfl -o defcon + +modstr: modstr.l + flex -f+ $< + g++ lex.yy.cc -lfl -o modstr + +exec: idcheck.yy.c defcon.yy.c modstr.yy.cc + gcc idcheck.yy.c -lfl -o idcheck + gcc defcon.yy.c -lfl -o defcon + g++ modstr.yy.cc -lfl -o modstr + +clean: + rm -f *.yy.c *.yy.cc *~ + +distclean: clean diff --git a/Master/texmf-dist/source/latex/stex/bin/old/defcon.l b/Master/texmf-dist/source/latex/stex/bin/old/defcon.l new file mode 100644 index 00000000000..ad758086145 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/old/defcon.l @@ -0,0 +1,91 @@ +%{ + +#include + +char ltxml[100]; +char fext[6] = ".ltxml"; + +char symstr[200]; +char ltxmlstr[200]; + +int i,t,c,tmp,q; +FILE *lt; + +%} + +ID [a-zA-Z0-9._:\|-]* +NR [0-9]* + +%s idenv env sym + +%% + +"\\begin{module}"(" ")*"[" BEGIN(idenv); +"]" BEGIN(INITIAL); + +"id="{ID} { + for (i=3; i"symdef{\\"{ID}"}"(.)* { +i=7; +while (yytext[i]!='}'){ + symstr[i-7]=yytext[i]; + i++; +} +symstr[i-7]=0; +BEGIN(sym); +} + +"latexmldef{"(.)* { +i=11; +while (i"\\end{module}" { +fclose(lt); +BEGIN(INITIAL); +} + +\n c++; +. c++; + +%% + +main(argc, argv) + int argc; + char **argv; +{ + if (argc==1) { + printf("arguments expected: [-q] filename(s)\n"); + } else { + q=0; + i=1; + if (argv[1][0]=='-'){ + i++; + if (argv[1][1]=='q') q=1; + } + while (i +int ur,ok,a,lin,i,j,c,n,m,d,s,q,fe,f,for_ok,curr_lin; +typedef char idstr[50]; +idstr l[5000], r[5000]; +%} + +ID [a-zA-Z0-9._:\|-]* +WS [\n\t ]* + +%s env inenv fid foc + +%% + +"\\begin"{WS}"{"("proof"|"example")"}"{WS}"[" { +fe=1; +for_ok=0; +curr_lin=lin; +BEGIN(env); // stuff that "for" keyval is recommended for +} + +"\\begin"{WS}"{"("proof"|"example")"}" if (f) printf("Missing 'for' at line %d\n",lin); + +("\\begin"{WS}"{"("definition"|"assertion"|"proof"|"omtext"|"example"|"step"|"pfcase"|"module")"}"{WS}"[")|("\\justification"{WS}"[") { +fe=0; +BEGIN(env); +} + +"]" { +if (fe && !for_ok && f) printf("Missing 'for' at line %d\n",curr_lin); +BEGIN(INITIAL); +} + +"id"{WS}"="{WS} BEGIN(fid); + +{ID} { +for (i=0; i("for"){WS}"="{WS} { +for_ok=1; +BEGIN(foc); +} +("continues"|"for"|"uses"|"premises"){WS}"="{WS} BEGIN(foc); + +{ID} { +for (j=0; j("premises"|"uses"){WS}"="{WS}"{" BEGIN(inenv); + +{ID} { +strncpy(r[m],yytext,yyleng); +r[m][yyleng]=0; +m++; +} + +"}" BEGIN(env); + +\n {c++;lin++;} +. c++; + +%% + +main(argc, argv) + int argc; + char **argv; +{ + if (argc==1) { + printf("Usage: idcheck [-q | -s | -f] filename(s)\n"); + printf("Option -s shows all detected IDs. \n"); + printf("Option -f shows line numbers for examples and proofs\n that have 'for' keyval missing. \n"); + printf("Option -q for quiet mode.\n"); + } else{ + s=0; q=0; + a=1; + if (argv[1][0]=='-') { + a++; + for (j=1; j +#include +#include +#include +using namespace std; + + +const int indent = 4; +const char start_char = '*'; + +typedef struct { + vector defs,list; + int father; +} nodetype; + +map g; + +string vertex, data; +int d, miss, skip; + +int max(int, int); + +%} + +ID [a-zA-Z0-9._:\|-]* +SEP [,;]* +WS [\n\t ]* +M [^}]* + +%x in_module found_vertex in_module_cont mdef +%x found_one_child found_more_children + +%% + +"\\begin"{WS}"{module}"{WS}"[" BEGIN(in_module); + +"id"{WS}"=" BEGIN(found_vertex); +{ID} { +vertex = YYText(); +g[vertex].father=0; +if (miss) cout << endl << "<-------- Module '" << vertex + << "' -------->" << endl << endl; +BEGIN(in_module); +} +"uses"{WS}"=" BEGIN(found_one_child); +"{" BEGIN(found_more_children); +"}" BEGIN(in_module); +{ID} { +data=YYText(); +if (g[data].list.empty()) + g[vertex].father=g[data].father+1; +else + g[vertex].father=max(g[data].father+1,g[vertex].father); +g[data].list.push_back(vertex); +BEGIN(in_module); +} +{ID} { +data=YYText(); +if (g[data].list.empty()) + g[vertex].father=g[data].father+1; +else + g[vertex].father=max(g[data].father+1,g[vertex].father); +g[data].list.push_back(vertex); +} + +{SEP}|{WS} + +"]" BEGIN(in_module_cont); + +(.|\n) + +"\\"("symdef"|"abbrdef"|"elldef"|"aliasdef"){WS}"{"{WS} BEGIN(mdef); +{M} { +data = YYText(); +g[vertex].defs.push_back(data); +} +"}" BEGIN(in_module_cont); +"\\end"{WS}"{module}" BEGIN(INITIAL); + +(.|\n) if (miss) cout << YYText(); + +<*>{WS}(%)(.)*(\n)* + +%% + +void spc(int n){ + for(int i=0; ib?a:b; +} + +void go(map ::iterator node, int depth){ +if (skip && node->second.father!=depth) return; +spc(d); +cout << start_char << " " << node->first << "{"; +int tmp = node->second.defs.size()-1; +for (int j=0; j<=tmp; j++){ + cout << node->second.defs[j]; + if (j!=tmp) cout << ","; +} +cout << "}" << endl; +d+=indent; +for (int i=0; isecond.list.size(); i++) + go(g.find(node->second.list[i]),depth+1); +d-=indent; +} + +int main(int argc, char** argv){ +miss=0; +skip=0; +if (argc==2) + if (argv[1][0]=='-') + for (int z=1; argv[1][z]!=0; z++) + if (argv[1][z]=='m') miss=1; else + if (argv[1][z]=='s') skip=1; else + if (argv[1][z]=='h') { + cout << " Usage: modstr [-s|m|h]\n Input: stdin\n Output: stdout\n"; + cout << " Options: -s Show module usage only at the deepest level\n"; + cout << " -m Show text not within a module\n"; + cout << " -h This help screen\n"; + return 0; + } +if (miss) cout << "Text NOT within a module:\n" << endl; +FlexLexer* lex = new yyFlexLexer; +lex->yylex(); +d=0; +map ::iterator start = g.begin(); +map ::iterator stop = g.end(); +cout << endl; +for(;stop!=start;start++) + if (!start->second.father) go(start,0); +cout << endl; +return 0; +} diff --git a/Master/texmf-dist/source/latex/stex/bin/old/symdef b/Master/texmf-dist/source/latex/stex/bin/old/symdef new file mode 100755 index 00000000000..b5c789a1c72 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/old/symdef @@ -0,0 +1,46 @@ +#!/usr/bin/perl -w + +use strict; +use Getopt::Long; +use Pod::Usage; + +my $output = "-"; +my $input = "-"; + +GetOptions("output=s",\$output); + +$input = $ARGV[0] if @ARGV; + +open(FIN,$input) or die "Can't open input file."; +open(FOUT,">$output"); + +my $line; + +while ($line=){ + if ($line !~ m/symdef/ && $line !~ m/elldef/ && $line !~ m/abbrdef/){ + print FOUT $line; + next; + } + if ($line =~ m/\}\[\d,/){ + print FOUT $line; + next; + } + + if ($line =~ m/\\(sym|abbr|ell)def\{\\([^\}]+)\}\[(\d)\]([^\n\%]+)(.*)/){ + print FOUT "\\$1def{\\$2}[$3,name=$2]$4$5\n"; + } else { + if ($line =~ m/\\(sym|ell|abbr)def\{\\([^\}]+)\}([^\n\%]+)(.*)/){ + print FOUT "\\$1def{\\$2}[0,name=$2]$3$4\n"; + } + } +} + +close(FIN); +close(FOUT); + + +__END__ + +=head1 SYNOPSIS + +symdef [--output=outputfile] [texfile] diff --git a/Master/texmf-dist/source/latex/stex/bin/rf b/Master/texmf-dist/source/latex/stex/bin/rf new file mode 100755 index 00000000000..7de36042620 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/rf @@ -0,0 +1,63 @@ +#!/usr/bin/perl -w + +####################################################################################### +# A tool for computing the module reuse factor for TEX files. # +# Copyright (c) 2005, Ioan Sucan, 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/rf$ # +# $Date: 2005-06-29 23:08:10 +0200 (Wed, 29 Jun 2005) $ $Rev: 3147 $ # +####################################################################################### + +use strict; +use Getopt::Long; +use Modparse; +use Pod::Usage; + +my $input = "-", my $verbose=0, my $stop_at_end=0; +my %arg_snippath; my @snippathList; + +GetOptions("path=s" => \%arg_snippath, + "defpath=s" => \@snippathList, + "verbose" => sub { $verbose=1; }, + "stop" => sub { $stop_at_end=1; }, + "help" => sub { pod2usage(2)}); + +$input = $ARGV[0] if ($#ARGV>=0); + +$main::lc1 = 0; $main::lc2 = 0; +my $mp = Modparse->new(snippathList=>\@snippathList, + snippath=>\%arg_snippath, + stopAtEnd=>$stop_at_end, + verbose=>$verbose, + onEveryLine=>sub { + $main::lc1++; + $main::lc2++ if $_[0]->{depth}==1; }); + +$mp->execute($input); +my $f = ($main::lc2>0)?$main::lc1/$main::lc2:0; +print "Reuse factor: $f\n"; + +__END__ + + +=head1 SYNOPSIS + +rf [options] + + This program computes the reuse factor for a .tex document + + Options: + --path XXX specify the value of \XXX (some snippath) in case it is + = somePath not defined in the processed .tex file + --defpath XXX specify which \XXX (snippath definitions) to look for + --stop stop when \end{document} is found; default is to go on + --verbose verbose on + --help this screen + + + Example usage: + ./rf slides.tex -d snippath -v + + Interpretation: + compute the reuse factor for the file slides.tex, look for definitions + of \snippath, in verbose mode diff --git a/Master/texmf-dist/source/latex/stex/bin/rng2dot/ModelRNC.pm b/Master/texmf-dist/source/latex/stex/bin/rng2dot/ModelRNC.pm new file mode 100644 index 00000000000..53673e37dc8 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/rng2dot/ModelRNC.pm @@ -0,0 +1,770 @@ +# anything that starts with # is removed until \n (considered as a comment) +# except in literals; +# +# NCName is limited to a-zA-Z0-9.-_ +# +# no proper support for except nameClass +# no support for exceptPatterns + +package ModelRNC; + +use strict; +use File::Basename; + +my $DOCUMENT = '_Document_'; + +sub new{ + my ($class) = @_; + my $self = {}; + $self->{literalCount} = 0; + bless($self, $class); +} + +# this is the main method of the package +# it should be called right after new +sub process{ + my ($self, $filename) = @_; + $self->readfile($filename); + $self->clean_rnc; + $self->read_topLevel; + $self->build_info; + # free some memory + $self->{DATA} = ''; $self->{FILEPATH} = ''; $self->{GRAPH} = ''; +} + +sub Error{ + my ($self, $msg) = @_; + print "'$self->{DATA}'\n"; + die $msg."\n"; +} + +# read a file into $storage; +# or $self->{DATA} if $storage not given +sub readfile{ + my ($self, $filename, $storage) = @_; + + # NOTE: this is not exactly perfect + if ($self->{FILEPATH}){ + $filename = $self->{FILEPATH}.$filename unless -e $filename; } + my $basepath = dirname($filename); + $basepath .= '/' if ($basepath && $basepath !~ m|/$|); + $self->{FILEPATH} = $basepath; + + open(FIN, $filename) or $self->Error("Cout not open '$filename'"); + my @data = ; + close(FIN); + + # for use in namespace set selection + push(@{$self->{LOADEDFILES}}, $filename); + + if (defined $storage){ $$storage = join('',@data); } + else { $self->{DATA} = join('',@data); } +} + +# remove lines after ## +sub remove_annotations{ + my ($self, $data) = @_; + $data = \$self->{DATA} unless $data; + do {} while ($$data =~ s/\[[^\]\[]*\]//g); + $$data =~ s/\#\#[^\n]*//g; +} + +# remove all lines that start with # except +# the ones that start with ## +sub remove_comments{ + my ($self, $data) =@_; + $data = \$self->{DATA} unless $data; + $$data =~ s/\#[^\#\n][^\n]*//g; + $$data =~ s/\#\n/\n/g; +} + +sub scan_literals{ + my ($self, $data) = @_; + my @litseg; my $seg = 0; + $data = \$self->{DATA} unless $data; + while ($$data =~ s/\"\"\"((\"{0,2}[^\"])*)\"\"\"/_LITSEG$seg/) { $litseg[$seg++] = $1; } + while ($$data =~ s/\'\'\'((\'{0,2}[^\'])*)\'\'\'/_LITSEG$seg/) { $litseg[$seg++] = $1; } + while ($$data =~ s/\"([^\"\n]*)\"/_LITSEG$seg/) { $litseg[$seg++] = $1; } + while ($$data =~ s/\'([^\'\n]*)\'/_LITSEG$seg/) { $litseg[$seg++] = $1; } + + while ($$data =~ s/_LITSEG(\d+)\s*~\s*_LITSEG(\d+)/_LITSEG$seg/) + { $litseg[$seg++] = $litseg[$1].$litseg[$2]; } + + while ($$data =~ s/_LITSEG(\d+)/!LIT$self->{literalCount}/) + { $self->{literals}[$self->{literalCount}++] = $litseg[$1]; } +} + +# remove \x{N} sections +sub special_chars{ + my ($self, $data) = @_; + $data = \$self->{DATA} unless $data; + while ($$data =~ m/\\x\{([a-fA-F0-9x]+)\}/g){ + my $lng = length($&); my $p = pos($$data) - $lng; + substr($$data, $p, $lng) = chr(hex($1)); + pos($$data) = $p + 1; + } +} + +# remove redundant data from loaded file +sub clean_rnc{ + my ($self, $data) = @_; + $data = \$self->{DATA} unless $data; + $self->scan_literals($data); + $self->special_chars($data); + $self->remove_annotations($data); + $self->remove_comments($data); + # add a newline, just in case the last word is a keyword + # and for nice printing; + $$data.="\n"; +} + +# in the processing of the data, the data is destroyed +# provide two methods for resolving that +sub backup{ + my ($self) = @_; + $self->{BACKUP_DATA} = $self->{DATA}; +} + +sub restore{ + my ($self) = @_; + $self->{DATA} = $self->{BACKUP_DATA} if defined $self->{BACKUP_DATA}; +} + +# set or retrieve stored data +sub data{ + my ($self, $newdata) = @_; + if (defined $newdata){ $self->{DATA} = $newdata; } + else { return $self->{DATA}; } +} + +# put back some extracted string from DATA +sub put_back{ + my ($self, $back) = @_; + substr($self->{DATA}, 0, 0) = $back; +} + +# try to match a keyword; return 1 on success; 0 on failure +# NOTE: this implies that the used keywords should be followed by +# some non alphanumeric or space character +sub read_keyword{ + my ($self, $keyword) = @_; + return 0 if ($self->{DATA} !~ /^\s*\Q$keyword\E\s*[^a-zA-Z0-9_\-\.]/); + substr($self->{DATA}, 0, length($&)-1) = ''; + return 1; +} + +# same as read_keyword, except it dies not expect a non-word character +# after the word it searches +sub read_controlword{ + my ($self, $controlword) = @_; + return 0 if ($self->{DATA} !~ /^\s*\Q$controlword\E\s*/); + substr($self->{DATA},0,length($&)) = ''; + return 1; +} + +# expect a keyword; if the word is found, it is extracted +# otherwise, the program dies (the grammar is incorrect) +sub expect_keyword{ + my ($self, $keyword) = @_; + $self->Error("Expected keyword '$keyword' was not found") + if ($self->{DATA} !~ /^\s*\Q$keyword\E\s*/); + substr($self->{DATA}, 0, length($&)) = ''; +} + + +# Does not include Extender and CombiningChar +# (as in XML Namespaces: http://www.w3.org/TR/REC-xml/) +sub read_NCName{ + my ($self, $terminators) = @_; + my $termin_exists = 1; + if (defined $terminators) { $terminators = "[$terminators]"; } + else { $terminators = ''; $termin_exists = 0; } + if ($self->{DATA} =~ /^\s*([_a-zA-Z][_a-zA-Z0-9\.\-]*)\s*$terminators/){ + substr($self->{DATA}, 0, length($&)-$termin_exists) = ''; + return $1; + } + return undef; +} + +# try to match an identifierOrKeyword; return it in case +# of success; return undef in case of failure; +sub read_identifierOrKeyword{ + my ($self, $terminators) = @_; + $self->read_controlword('\\'); + return $self->read_NCName($terminators); +} + +# see if the argument is in the set of defined keyword of RelaxNG +sub isRNCKeyword{ + my ($word) = @_; + return ($word =~ /^\s*(attribute|default|datatypes|div|element|empty|external|grammar|include|inherit|list|mixed|namespace|notAllowed|parent|start|string|text|token)\s*$/); +} + +# read an identifier; return undef if no identifier can be read +sub read_identifier{ + my ($self, $terminators) = @_; + my $quote = $self->read_controlword('\\'); + my $ident = $self->read_NCName($terminators); + if (!$quote && $ident && isRNCKeyword($ident)){ + $self->put_back($ident); + return undef; + } + return $ident; +} + +# read a literal in any form given; +# segments are taken into account +sub read_literal{ + my ($self) = @_; + if ($self->{DATA} =~ /^\s*!LIT(\d+)\s*/){ + substr($self->{DATA}, 0, length($&)) = ''; + return $self->{literals}[$1]; + } + return undef; +} + +# read a namespace URI literal +sub read_namespaceURILiteral{ + my ($self, $inherited_namespace) = @_; + return $inherited_namespace if $self->read_keyword('inherit'); + return $self->read_literal; +} + +# read any URI literal +sub read_anyURILiteral{ + my ($self) = @_; + $self->read_literal; } + +sub getNS{ + my ($self, $nspref) = @_; + $self->{${$self->{LOADEDFILES}}[$#{$self->{LOADEDFILES}}]}->{NAMESPACE}{$nspref}; } + +sub setNS{ + my ($self, $nspref, $nsval) = @_; + $self->{${$self->{LOADEDFILES}}[$#{$self->{LOADEDFILES}}]}->{NAMESPACE}{$nspref} = $nsval; } + +# read all declarations, until none can be read +sub read_decl{ + my ($self, $inherited_namespace) = @_; + $inherited_namespace = '' unless defined $inherited_namespace; + $self->setNS('default',$inherited_namespace) unless $self->getNS('default'); + my $found = 1; + while ($found){ + if ($self->read_keyword('namespace')){ + my $namespace_name = $self->read_identifierOrKeyword('='); + $self->Error('Undefined namespace name') unless $namespace_name; + $self->expect_keyword('='); + my $namespace_value = + $self->read_namespaceURILiteral($inherited_namespace); + $self->Error('Undefined namespace URI') + unless defined $namespace_value; + $self->setNS($namespace_name, $namespace_value); + } + elsif ($self->read_keyword('default') && + $self->read_keyword('namespace')){ + my $namespace_name = undef; + if (!$self->read_controlword('=')){ + $namespace_name = $self->read_identifierOrKeyword('='); + $self->Error('Undefined namespace name') + unless $namespace_name; + $self->expect_keyword('='); + } + my $namespace_value = + $self->read_namespaceURILiteral($inherited_namespace); + $self->Error('Undefined namespace URI') + unless defined $namespace_value; + $self->setNS('default', $namespace_value); + $self->setNS($namespace_name, $namespace_value) + if $namespace_name; + } + elsif ($self->read_keyword('datatypes')){ + my $datatype_name = $self->read_identifierOrKeyword('='); + $self->Error('Undefined datatype name') unless $datatype_name; + $self->expect_keyword('='); + my $datatype_value = $self->read_literal; + $self->Error('Undefined datatype value') + unless defined $datatype_value; + } + else { $found = 0; } + } +} + +# ignore an annotation definition; +# (assumes annotation content does not exist) +# (it has been removed by clean_rnc) +sub ignore_annotation{ + my ($self) = @_; + $self->read_CName; } + +# read a name (CName) of the form NCName:NCName +sub read_CName{ + my ($self, $terminators) = @_; + $terminators = '\s' unless defined $terminators; + my $name = $self->read_NCName(':'); + if ($name){ + $self->expect_keyword(':'); + my $part2 = $self->read_NCName($terminators); + $self->Error('Incomplete CName definition') unless $part2; + $name .= ":$part2"; + } + return $name; +} + +# read a datatype name +sub read_datatypeName{ + my ($self, $terminators) = @_; + $terminators = '\s' unless defined $terminators; + if ($self->{DATA} =~ /^\s*string\s*[$terminators]/){ + substr($self->{DATA},0,length($&)-1) = ''; + return 'string'; + } + elsif ($self->{DATA} =~ /^\s*token\s*[$terminators]/){ + substr($self->{DATA},0,length($&)-1) = ''; + return 'token'; + } else { + return $self->read_CName($terminators); + } +} + +# read a datatype value +sub read_datatypeValue{ + my ($self) = @_; + return $self->read_literal; +} + +# return the set of names an element or an attribute can have +# this does not work well on complicated name classes +sub read_nameClassEx{ + my ($self, $terminators) = @_; + + my @result; + + if ($self->read_controlword('(')){ + @result = $self->read_nameClassEx($terminators.'\)'); + $self->expect_keyword(')'); + } else { + + #anyName + if ($self->read_controlword('*')){ + push(@result, '*'); + if ($self->read_controlword('-')){ + print STDERR "Warning: USE OF EXCEPT NAMECLASS NOT IMPLEMENTED\n"; + push(@result, $self->read_nameClassEx($terminators)); + } + } + # nsName or name(CName) + elsif (my $part1 = $self->read_NCName(':')){ + $self->expect_keyword(':'); + if ($self->read_controlword('*')){ + push(@result, "$part1:*"); + if ($self->read_controlword('-')){ + print STDERR + "Warning: USE OF EXCEPT NAMECLASS NOT IMPLEMENTED\n"; + push(@result, '-', + $self->read_nameClassEx($terminators)); + } + } else { + push(@result, $part1.':'.$self->read_NCName($terminators.'\|')); + } + } + # name(identifierOrKeyword) + else { + my $name = $self->read_identifierOrKeyword($terminators.'\|'); + $self->Error('Incomplete name class given') unless $name; + push(@result, $name); + } + } + + $self->Error('No name class provided') unless @result; + + # see if we have more possible names: + push(@result, $self->read_nameClassEx($terminators)) + if ($self->read_controlword('|')); + + return @result; +} + +sub read_nameClass{ + my ($self, $terminators, @parents) = @_; + $terminators = '\s' unless defined $terminators; + my @result = $self->read_nameClassEx($terminators); + my @finalRes; + + if (@parents && @result){ + + my @nsList, my %saw = (); + foreach (@parents){ + if (/\{(.*)\}:.+/){ + next if $saw{$1}; + push(@nsList, $1); $saw{$1} = 1; } + else { + next if $saw{'default'}; + push(@nsList, $self->getNS('default')); $saw{'default'} = 1; } + } + + foreach my $res(@result){ + if ($res =~ /(.+):(.+)/){ + push(@finalRes, $self->ns_prepend($2, $1)); } + else { + map(push(@finalRes, "{$_}:$res"), @nsList); } + } + } else { + map(push(@finalRes, (/(.+):(.+)/)? + $self->ns_prepend($2, $1):$self->ns_prepend($_)), @result); + } + return @finalRes; +} + + +# read a parameter declaration, if one exists +sub read_param{ + my ($self) = @_; + my $id = $self->read_identifierOrKeyword('='); + return (undef, undef) unless $id; + $self->expect_keyword('='); + my $val = $self->read_literal; + $self->Error('No parameter value specified') unless defined $val; + return ($id, $val); +} + +sub begin_read_newfile{ + my ($self) = @_; + my $file = $self->read_anyURILiteral; + my $inherit = 'default'; + if ($self->read_keyword('inherit')){ + $self->expect_keyword('='); + $inherit = $self->read_identifierOrKeyword; } + $inherit = $self->getNS($inherit); + my $newdata = ''; + $self->readfile($file, \$newdata); + $self->clean_rnc(\$newdata); + $self->put_back($newdata.'#'); + $self->read_decl($inherit); } + +sub end_read_newfile{ + my ($self) = @_; + pop(@{$self->{LOADEDFILES}}); + $self->expect_keyword('#'); } + +# read a pattern +sub read_pattern{ + my ($self, $grammarPath, $grammarIdent, @parentElements) = @_; + my $found = 1; my $grammarCount = 0; + my $DEF = $grammarPath.':'.$grammarIdent; + + if ($self->read_keyword('element')){ + my @elementNames = $self->read_nameClass('{', @parentElements); + $self->Error('Unspecified element name') unless @elementNames; + map(push(@{$self->{GRAPH}->{$DEF}->{$_}{ELEMENTS}}, + @elementNames), @parentElements); + $self->expect_keyword('{'); + $self->read_pattern($grammarPath, $grammarIdent, @elementNames); + $self->expect_keyword('}'); + } + elsif ($self->read_keyword('attribute')){ + my @attributeNames = $self->read_nameClass('{'); + $self->Error('Unspecified attribute name') unless @attributeNames; + map(push(@{$self->{GRAPH}->{$DEF}->{$_}{ATTRIBUTES}}, + @attributeNames), @parentElements); + $self->expect_keyword('{'); + $self->read_pattern($grammarPath, $grammarIdent, @parentElements); + $self->expect_keyword('}'); + } + elsif ($self->read_keyword('list') || $self->read_keyword('mixed')){ + $self->expect_keyword('{'); + $self->read_pattern($grammarPath, $grammarIdent, @parentElements); + $self->expect_keyword('}'); + } + elsif ($self->read_controlword('(')){ + $self->read_pattern($grammarPath, $grammarIdent, @parentElements); + $self->expect_keyword(')'); + } + elsif (my $datatypeValue = + $self->read_datatypeValue){ + # do nothing + } + elsif (my $datatypeName = + $self->read_datatypeName('\s\{\}\-!')){ + my $datatypeValue = $self->read_datatypeValue; + + # read parameters; ignore them for now + if ($self->read_controlword('{')){ + my ($ident, $val); + do{ + ($ident, $val) = $self->read_param; + } while ($ident && $val); + $self->expect_keyword('}'); + } + # read possible exceptPattern + if ($self->read_controlword('-')){ + print STDERR "Warning: USE OF EXCEPT PATTERN NOT IMPLEMENTED\n"; + $self->Error('exceptPattern expected but not found') + unless $self->read_pattern($grammarPath, $grammarIdent, + @parentElements); + } + } + elsif ($self->read_keyword('external')){ + $self->begin_read_newfile; + $self->read_pattern($grammarPath, $grammarIdent, @parentElements); + $self->end_read_newfile; + } + elsif ($self->read_keyword('grammar')){ + my $ident = $DEF.$grammarCount++; + $self->expect_keyword('{'); + $self->read_grammarContent($ident, @parentElements); + $ident .= ':start'; + map(push(@{$self->{GRAPH}->{$DEF}->{$_}{REFS}}, + $ident), @parentElements); + $self->expect_keyword('}'); + } + elsif ($self->read_keyword('parent')){ + my $ident = $self->read_identifier; + if ($grammarPath =~ /^([.]+:)[^:]+$/){ + $ident = $1.$ident; + map(push(@{$self->{GRAPH}->{$DEF}->{$_}{REFS}}, + $ident), @parentElements); + } + } + elsif ($self->read_keyword('empty') || $self->read_keyword('text') + || $self->read_keyword('notAllowed')){ + # do nothing + } + elsif (my $ident = $self->read_identifier){ + # check if we did not enter a grammar by mistake: + my $asg = $self->read_assignMethod(1); + if ($ident && $asg){ + $self->put_back($ident.$asg); + } else { + $ident = $grammarPath.':'.$ident; + map(push(@{$self->{GRAPH}->{$DEF}->{$_}{REFS}}, + $ident), @parentElements); + } + + } else { $found = 0; } + + if ($self->read_controlword('?') || $self->read_controlword('*') + || $self->read_controlword('+')){ + # ignore + } + + if ($self->read_controlword(',') || $self->read_controlword('|') + || $self->read_controlword('&')){ + Error('Pattern expected') unless + $self->read_pattern($grammarPath, $grammarIdent, @parentElements); + } + + return $found; +} + +sub read_assignMethod{ + my ($self, $asString) = @_; + if ($asString){ + return '&=' if ($self->read_controlword('&=')); + return '|=' if ($self->read_controlword('|=')); + return '=' if ($self->read_controlword('=')); + return undef; + } + return 3 if ($self->read_controlword('&=')); + return 2 if ($self->read_controlword('|=')); + return 1 if ($self->read_controlword('=')); + return 0; +} + +# read a grammar pattern +sub read_grammarPattern{ + my ($self, $DEF, @parentElements) = @_; + if ($self->read_keyword('grammar')){ + $self->expect_keyword('{'); + $self->read_grammarContent($DEF, @parentElements); + $self->expect_keyword('}'); } + else{ + $self->read_grammarContent($DEF, @parentElements);} +} + +# read all possible grammar contents +sub read_grammarContent{ + my ($self, $DEF, @parentElements) = @_; + my ($div, $found) = (0, 1); + + while ($found){ + if ($self->read_keyword('div')){ + $div++; + $self->expect_keyword('{'); + $self->read_grammarContent($DEF.':_G'.$div, @parentElements); + $self->expect_keyword('}'); + } + elsif ($self->read_keyword('include')){ + $self->begin_read_newfile; + $self->read_grammarPattern($DEF, @parentElements); + $self->end_read_newfile; + if ($self->read_controlword('{')){ + $self->read_grammarContent($DEF, @parentElements); + $self->expect_keyword('}'); } + } + elsif ($self->read_keyword('start')){ + my $asg = $self->read_assignMethod; + $self->Error('Invalid assign method') unless $asg; + @{$self->{GRAPH}->{$DEF.':start'}->{PARENTS}} = @parentElements; + $self->read_pattern($DEF, 'start', @parentElements); + } + elsif (my $ident = $self->read_identifier('=\|\&')){ + my $asg = $self->read_assignMethod; + $self->Error('Invalid assign method') unless $asg; + my $ref = $DEF.':'.$ident; + %{$self->{GRAPH}->{$ref}} = () if $asg == 1; + @{$self->{GRAPH}->{$ref}->{PARENTS}} = @parentElements; + $self->read_pattern($DEF, $ident, @parentElements); + } + elsif ($self->ignore_annotation) {} + else { $found = 0; } + } +} + +sub ns_prepend{ + my ($self, $tag, $ns_pref) = @_; + my $ns = $ns_pref?$self->getNS($ns_pref):undef; + $ns = $self->getNS('default') unless $ns; + return "{$ns}:$tag"; +} + +# this should match the whole file +sub read_topLevel{ + my ($self) = @_; + $self->read_decl; + $self->read_pattern($DOCUMENT, 'start', $DOCUMENT); + + my ($after, $before) = (0, 1); + while ($before != $after){ + $before = length($self->{DATA}); + $self->read_grammarContent($DOCUMENT, $DOCUMENT); + $after = length($self->{DATA}); + } + $self->{DATA} = trim($self->{DATA}); + $self->Error('Unable to completely process data') + unless $self->{DATA} eq ''; +} + +# remove leading and trailing white space +sub trim{ + my ($arg) = @_; + $arg =~ s/^\s+//; + $arg =~ s/\s+$//; + return $arg; +} + +sub build_info{ + my ($self) = @_; + + my %seen = (); + local *go = sub { + my ($reference, $node) = @_; + + my $ident = $reference.'#'.$node; + return if defined $seen{$ident}; + $seen{$ident} = 1; + + map($self->{ATTR}->{$node}{$_} = 1, + @{$self->{GRAPH}->{$reference}->{$node}{ATTRIBUTES}}) + if defined $self->{GRAPH}->{$reference}->{$node}{ATTRIBUTES}; + + my @sons; + map(push(@sons, ($reference, $_)), + @{$self->{GRAPH}->{$reference}->{$node}{ELEMENTS}}) + if defined $self->{GRAPH}->{$reference}->{$node}{ELEMENTS}; + + if (defined $self->{GRAPH}->{$reference}->{$node}{REFS}){ + my @refs = @{$self->{GRAPH}->{$reference}->{$node}{REFS}}; + foreach my $ref(@refs){ + next unless $self->{GRAPH}->{$ref}->{PARENTS}; + foreach my $son(@{$self->{GRAPH}->{$ref}->{PARENTS}}){ + map(push(@sons, ($ref, $_)), + @{$self->{GRAPH}->{$ref}->{$son}{ELEMENTS}}) + if defined $self->{GRAPH}->{$ref}->{$son}{ELEMENTS}; + push(@refs, @{$self->{GRAPH}->{$ref}->{$son}{REFS}}) + if defined $self->{GRAPH}->{$ref}->{$son}{REFS}; + # if a reference has attributes defined, + # they will appear as attributes to $DOCUMENT + # if the reference is not defined within some element + map($self->{ATTR}->{$node}{$_} = 1, + @{$self->{GRAPH}->{$ref}->{$son}{ATTRIBUTES}}) + if ($self->{GRAPH}->{$ref}->{$son}{ATTRIBUTES} && + ($son eq $DOCUMENT)); + } + } + } + my $sonCount = ($#sons+1)/2; + for (my $i = 0; $i < $sonCount; $i++){ + my ($ref, $son) = ($sons[2*$i], $sons[2*$i+1]); + go($sons[2*$i], $sons[2*$i+1]); + $self->{NODES}->{$node}{$son} = 1; + } + }; + + go($DOCUMENT.':start', $DOCUMENT); + + %seen = (); + local *gnodes = sub { + my ($node) = @_; + return if $seen{$node}; + $seen{$node} = 1; + foreach my $son(keys %{$self->{NODES}->{$node}}){ + map($self->{GNODES}->{$node}{$_} = $son, + keys %{$self->{NODES}->{$son}}); + gnodes($son); } + }; + + gnodes($DOCUMENT); + @{$self->{TAGLIST}} = keys %seen; +} + +sub getTagList { + my ($self) = @_; + return @{$self->{TAGLIST}}; +} + +sub tagChildren { + my ($self, $tag) = @_; + keys %{$self->{NODES}->{$tag}}; } + +# given a tag and a childtag, return whether +# tag can contain childtag +sub canContain() +{ + my ($self, $tag, $childtag) = @_; + return ($self->{NODES}->{$tag}{$childtag} || + $self->{NODES}->{$tag}{'*'})?1:0; +} + +# there can be more results: list ? +# there can be no result, but a class of results.. like a nsName +# choose representative? +sub canContainIndirect() +{ + my ($self, $tag, $childtag) = @_; + return $self->{GNODES}->{$tag}{$childtag} if + $self->{GNODES}->{$tag}{$childtag}; + + if ($self->{NODES}->{$tag}{'*'}){ + foreach (@{$self->{TAGLIST}}){ + return $_ if $self->{NODES}->{$_}{$childtag}; + } + } +} + +# given a tag and an attribute return whether +# the tag can have that attribute +sub canHaveAttribute() +{ + my ($self, $tag, $attr) = @_; + return ($self->{ATTR}->{$tag}{$attr} || + $self->{ATTR}->{$tag}{'*'})?1:0; +} + +sub canContainSomehow() +{ + my ($self, $tag, $childtag) = @_; + return ($self->canContain($tag, $childtag) || + $self->canContainIndirect($tag, $childtag)); +} + +1; diff --git a/Master/texmf-dist/source/latex/stex/bin/rng2dot/rng2dot b/Master/texmf-dist/source/latex/stex/bin/rng2dot/rng2dot new file mode 100755 index 00000000000..588b8827c63 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/rng2dot/rng2dot @@ -0,0 +1,37 @@ +#!/usr/bin/perl -w + +use ModelRNC; + +die "No input file\n" unless $ARGV[0]; +my $opt = $ARGV[1] || ''; + +my $rnc = ModelRNC->new(); +$rnc->process($ARGV[0]); +print STDERR 'Unable to properly parse ('.$rnc->data.")\n" if $rnc->data; + +my %seen = (); +sub make_graph { + my ($node) = @_; + my @children = $rnc->tagChildren($node); + my $pnode = $node; + $pnode =~ s/^\{[^\}]*\}://; $pnode =~ s/\-|\+|\*|\s/_/g; + my @pchildren = @children; + for (my $i = 0 ; $i < @pchildren; $i++) { + $pchildren[$i] =~ s/^\{[^\}]*\}://; + $pchildren[$i] =~ s/\-|\+|\*|\s/_/g; } + if ($opt eq 'txt') { + print "$pnode: ".join(', ', @pchildren)."\n\n"; } + else { + for (my $i = 0 ; $i < @pchildren; $i++) { + print "$pnode -> ".$pchildren[$i].";\n"; }} + return 0 if $seen{$node}; + $seen{$node} = 1; + foreach my $child(@children) { + make_graph($child); } + 1; } + +print "digraph RNC {\n" unless $opt eq 'txt'; +make_graph('_Document_'); +print "}\n" unless $opt eq 'txt'; + +__END__ diff --git a/Master/texmf-dist/source/latex/stex/bin/sgraph b/Master/texmf-dist/source/latex/stex/bin/sgraph new file mode 100755 index 00000000000..c4e709db476 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/sgraph @@ -0,0 +1,173 @@ +#!/usr/bin/perl -w +####################################################################################### +# A tool for creating graphs of module usage patterns based on graphviz. # +# Copyright (c) 2005, Ioan Sucan, 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/sgraph$ # +# $Date: 2005-10-04 19:31:43 +0200 (Tue, 04 Oct 2005) $ $Rev: 4376 $ # +####################################################################################### + +use strict; + +use Getopt::Long; +use Modparse; +use Pod::Usage; + +my $input = "-", my $output = "out", my $format = "ps"; +my $root, my $stop_at_end=0, my $use_grouping = 0; +my $rmdot = 0, my $verbose=0, my $theory = '', my $srange = ''; +my %arg_snippath; my @snippathList; + +sub group_name{ + my ($st) = @_; + if ($st =~ /^(.*[\/\\])?([^\/\\]+)\.[^\.\/\\]*$/) { $st = $2; } + elsif ($st =~ /^(.*[\/\\])?([^\.\/\\]+)$/) { $st = $2; } + $st =~ s/-/_/g; + return $st; } + +GetOptions("output=s" => \$output, + "format=s" => \$format, + "nodot" => sub {$rmdot = 1;}, + "root=s" => \$root, + "theory=s" => \$theory, + "sliderange=s" => \$srange, + "path=s" => \%arg_snippath, + "defpath=s" => \@snippathList, + "verbose" => sub {$verbose = 1;}, + "grouping" => sub {$use_grouping = 1}, + "stop" => sub {$stop_at_end = 1}, + "help" => sub {pod2usage(2)}); + +$output = $1 if ($output =~ m/([^.]+)\..*/); +$input = $ARGV[0] if ($#ARGV>=0); +$root = group_name($input) unless $root; + + +my %data = (); my %group = (); +my $mp = Modparse->new(snippathList=>\@snippathList, + snippath=>\%arg_snippath, + stopAtEnd=>$stop_at_end, + verbose=>$verbose, + onBegin=>sub { $_[0]->{perm}->{slide} = 0; $_[0]->{perm}->{linecount} = 0; + if ($srange =~ /(\d+)\:(\d+)/){ + ($_[0]->{perm}->{sbegin}, $_[0]->{perm}->{send}) = ($1, $2); + $_[0]->{perm}->{in_sliderange} = ($_[0]->{perm}->{sbegin}<1); + } else { $_[0]->{perm}->{in_sliderange} = 1; }}, + onBeginFile=>sub { $_[0]->{grp} = group_name($_[0]->{filename}); }, + onBeginModule=>sub { + if ($_[0]->{perm}->{in_sliderange} && (my $id = $_[0]->{module_id})){ + $id =~ s/[:-]/_/g; + my $uses = ''; + if ($_[0]->{module_args} =~ /uses=(([\w-]+)|(\{[\w,-]+\}))/){ + $uses = $1; + $uses =~ s/,/;/g; $uses =~ s/[:-]/_/g; } + $data{$id}=$uses; + $group{$id}=$_[0]->{perm}->{grp}; + }}, + onEveryLine=>sub { + $_[0]->{perm}->{linecount}++; + print ". " if ($_[0]->{pack}->{verbose} && ($_[0]->{perm}->{linecount} % 1000==0)); + $_[0]->{perm}->{slide}++ if $_[0]->{simple_tex} =~ /\\begin\{slide\}/; + $_[0]->{perm}->{in_sliderange}=($_[0]->{perm}->{slide}<=$_[0]->{perm}->{send} && + $_[0]->{perm}->{slide}>=$_[0]->{perm}->{sbegin}) + if ($_[0]->{perm}->{sbegin} && $_[0]->{perm}->{send}); + }); + +print "\nGenerating graph...\n" if $verbose; + +$mp->execute($input); + +my @queue=(); + +if ($theory){ + $theory =~ s/-/_/g; + if ($data{$theory}){ + my $start = 0, my $end = 1, my %already_in; + $queue[0] = $theory; + $already_in{$theory} = 1; + while ($start<$end){ + my $idx, my $usesx; + $idx = $queue[$start]; + $usesx = $data{$queue[$start]}; + $start++; + if ($usesx){ + $usesx =~ s/\{//; + $usesx =~ s/\}//; + foreach (split(/;/,$usesx)){ + next if $already_in{$_}; + $queue[$end] = $_; + $already_in{$_} = 1; + $end++; + } + } + } + } +} else{ + @queue = keys %data; +} + +open(FOUT,">$output.dot") or die "Can't open output file\n"; +print FOUT "digraph TEX {\n"; +print FOUT "$root [shape=box];\n"; + +if ($use_grouping){ + my %subgraph = (); + foreach (@queue){ + $subgraph{$group{$_}}.="$_;"; + } + foreach my $subgr (keys %subgraph){ + print FOUT "subgraph cluster_$subgr {\n"; + print FOUT "color = blue;\n"; + print FOUT "label = $subgr;\n"; + print FOUT "$subgraph{$subgr}\n"; + print FOUT "}\n"; + } +} + +my $lk = 0; +for my $idx (@queue){ + my $usesx = $data{$idx}; + $lk=$lk+($usesx =~ tr/;//)+1; + if ($usesx){ + print FOUT "$idx -> $usesx;\n"; + } else { + print FOUT "$idx -> $root;\n"; + } +} + +print "Number of links: $lk\n" if $verbose; + + +print FOUT "}\n"; +close(FOUT); + +`dot -T$format -o $output.$format $output.dot`; +unlink "$output.dot" if ($rmdot==1); + +print "Done.\n" if $verbose; + +__END__ + +=head1 SYNOPSIS + +sgraph [options] + + .tex input file; stdin by default + + Options: + --output output file; out.dot by default + --format output format; .ps by default; for available formats, see dot --help + --nodot do not generate .dot file, just target format + --root the 'root' of the graph. (name of course) + --theory generate a subgraph for the theory + --sliderange only look at the given slide range; (2:16 for example) + --path XXX specify the value of \XXX (some snippath) in case it is + = somePath not defined in the processed .tex file + --defpath XXX specify which \XXX (snippath definitions) to look for + --stop stop reading data when \end{document} is found, not at EOF + --grouping group modules within sections. + --verbose verbose on + --help this screen + +Example: +./sgraph slides.tex -o graph -f ps -n -t TCN --sliderange 20:10000 -r GenCS -v diff --git a/Master/texmf-dist/source/latex/stex/bin/sms b/Master/texmf-dist/source/latex/stex/bin/sms new file mode 100755 index 00000000000..3d95e710180 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/sms @@ -0,0 +1,146 @@ +#!/usr/bin/perl -w +####################################################################################### +# A tool for creating STeX Module Signatures (SMS) files. # +# 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; + +my $input = "-", my $verbose=0, my $stop_at_end=0; my $follow=0; +my %arg_snippath; my @snippathList; + +# match {,} brackets that are not comments or special characters +sub match{ + my $data = shift; + my $b = 0, my $i = 0, my $ignore = 0 ; + foreach (split('',$data)){ + $i++; + if ($ignore == 1){ + $ignore = 0; + next; + } + if ($ignore == 2){ + next if $_ ne "\n"; + $ignore = 0; + next; + } + if ($_ eq "\\"){ + $ignore = 1; + next; + } + if ($_ eq '%'){ + $ignore = 2; + next; + } + $b++ if $_ eq '{'; + $b-- if $_ eq '}'; + return (substr($data,0,$i),substr($data,$i,length($data)-$i+1)) if !$b; + } + return ('',$data); +} + + +####### start of program ####### + +GetOptions("verbose" => sub { $verbose=1; }, + "stop" => sub { $stop_at_end=1; }, + "path=s" => \%arg_snippath, + "defpath=s" => \@snippathList, + "help" => sub { pod2usage(2)}, + "follow" => sub { $follow=1; }); + +$input = $ARGV[0] if ($#ARGV>=0); + +my $mp = Modparse->new(snippathList=>\@snippathList, + snippath=>\%arg_snippath, + stopAtEnd=>$stop_at_end, + verbose=>$verbose, + follow=>$follow, + recursion=>0, + onBeginFile=>sub { @{$_[0]->{'sms'.$_[0]->{depth}}}=(); }, + onBeginModule=>sub { push(@{$_[0]->{'sms'.$_[0]->{depth}}}, $_[0]->{original}); + @{$_[0]->{'sms'.$_[0]->{depth}}}[-1] =~ s/\n$/%\n/; }, + onEndModule=>sub { push(@{$_[0]->{'sms'.$_[0]->{depth}}}, $_[0]->{original}); + @{$_[0]->{'sms'.$_[0]->{depth}}}[-1] =~ s/\n$/%\n/ }, + onRecurse=>sub { + my $recurse = $_[0]->{original}; + $recurse =~ s/include/exclude/g; + push(@{$_[0]->{'sms'.$_[0]->{depth}}}, $recurse); }, + onEndFile=>sub { + my $file = $_[0]->{pack}->new_ext($_[0]->{filename},'.sms'); + open(FOUT, ">$file") or die "Cannot write $file\n"; + print FOUT @{$_[0]->{'sms'.$_[0]->{depth}}}; + close(FOUT); + `touch $file` unless @{$_[0]->{'sms'.$_[0]->{depth}}}; + print "Wrote $file\n" if $verbose; }, + onEveryLine=>sub { + my @lines = @{$_[0]->{'sms'.$_[0]->{depth}}}; + if ($_[0]->{in_module}){ + push(@{$_[0]->{'sms'.$_[0]->{depth}}}, $_[0]->{original}) + if ($_[0]->{simple_tex} =~ /\\(symvariant|(sym|abbr|ell|key|listkey)def)\{([^\}]+)\}/ || + $_[0]->{simple_tex} =~ /\\symdef\[([^\]]+)\]/); + push(@{$_[0]->{'sms'.$_[0]->{depth}}}, $_[0]->{original}) + if ($_[0]->{simple_tex} =~ /\\importmodule/); + if ($_[0]->{simple_tex} =~ /\\begin{importmodulevia}/) { + my $impvia = $_[0]->{original}; + $impvia =~ s/\\begin\{importmodulevia\}/\\importmodule/g; + push(@{$_[0]->{'sms'.$_[0]->{depth}}}, $impvia); + } + push(@{$_[0]->{'sms'.$_[0]->{depth}}}, $_[0]->{original}) + if ($_[0]->{simple_tex} =~ /\\importOMDocmodule/); + push(@{$_[0]->{'sms'.$_[0]->{depth}}}, $_[0]->{original}) + if ($_[0]->{simple_tex} =~ /\\requiremodules/); + push(@{$_[0]->{'sms'.$_[0]->{depth}}}, $_[0]->{original}) + if ($_[0]->{simple_tex} =~ /\\requirepackage/); + if ((/\\STRlabel\{([^\}]+)\}(\{.*)/) || (/\\STRsemantics\[([^\]]+)\](\{.*)/)){ + my ($label, $line) = ($1, "$2 $_[0]->{comment}"); + my ($matched, $rest) = (undef, undef); + while (1) { + ($matched, $rest) = match($line); + last if $matched; + $line.=$_[0]->{nextline}(); } + $_[0]->{rewriteline}($rest) if $rest; + $line = "\\STRlabeldef{$label}$matched"; chomp($line); + map(push(@{$_[0]->{'sms'.$_[0]->{depth}}},"$_\n"),split("\n",$line)); + } + @{$_[0]->{'sms'.$_[0]->{depth}}}[-1] =~ s/\n$/%\n/ + if (@lines < @{$_[0]->{'sms'.$_[0]->{depth}}}); + }} ); + +$mp->execute($input); + +print "Done.\n" if $verbose; + + +__END__ + + +=head1 SYNOPSIS + +sms [options] + +Options: + + --verbose verbose on + --stop stop when \end{document} is found; default is to go on + --follow demands following \input|include|require statements (default:off) + --path XXX=somePath specify the value of \XXX (some snippath) in case it is + not defined in the processed .tex file + --defpath XXX specify which \XXX (snippath definitions) to look for + --help this screen + +Purpose: + Generate .sms files (STeX Module Signatures) from .tex files + +Example: + sms slides.tex -v 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/bin/termin b/Master/texmf-dist/source/latex/stex/bin/termin new file mode 100755 index 00000000000..0589be09c2f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/bin/termin @@ -0,0 +1,279 @@ +#!/usr/bin/perl -w + +####################################################################################### +# A tool for automatized replacement of plain words with their \termin macros. # +# Copyright (c) 2005, Ioan Sucan, 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/termin$ # +# $Date: 2005-10-04 17:47:41 +0200 (Tue, 04 Oct 2005) $ $Rev: 4371 $ # +####################################################################################### + +use strict; + +use Getopt::Long; +use Term::ANSIColor; +use Pod::Usage; + +my $verbose = 0; +my $wordDefs={}, my $twinDefs={}, my $atwinDefs={}; + +use constant twin => 'T'; +use constant word => 'W'; +use constant atwin => 'A'; + +my $before_chars = 128; +my $after_chars = 128; + +sub loadDefs{ + my ($tex_file) = @_; + + # read file + open(FIN, $tex_file) or die "Cannot read $tex_file\n"; + my @contentLines = ; + close(FIN); + + my $content = join('',@contentLines); + $content =~ s/\s+//g; + $content =~ s/%[^\n]*\n//g; + pos($content) = 0; + + my %modules = (); + while ($content =~ m/\\begin\{module\}\[([^\]]+)\]/g){ + next unless $1 =~ /id=([^\],]+)/; + $modules{pos($content)} = $1; + } + my @posList = keys %modules; + my $modIndex, my $current_module; + + # see definiens of form \definiens[bar]{foobar} + # word 'foobar', concept 'bar', within module 'foo' + pos($content) = 0; $modIndex = 0; $current_module = $modules{$posList[0]}; + while ($content =~ m/\\definiens\[([^\]\-]+)\]\{([^\}]+)\}/g){ + my $p = pos($content); + while ($modIndex < $#posList && $p > $posList[$modIndex+1]) { + $modIndex++; $current_module = $modules{$posList[$modIndex]}; } + push(@{$wordDefs->{modules}}, $current_module); + push(@{$wordDefs->{concepts}}, $1); + push(@{$wordDefs->{words}}, $2); + print word, " ==> $current_module: $1: $2\n" if $verbose>=2; + } + + # see definiens of form \definiens[aaa-bbb]{\twin{ccc}{ddd}} + # words 'ccc ddd', concept 'aaa-bbb', within module 'foo' + pos($content) = 0; $modIndex = 0; $current_module = $modules{$posList[0]}; + while ($content =~ m/\\definiens\[([^\-\]]+)\-([^\]]+)\]\{\\twin\{([^\}]+)\}\{([^\}]+)\}\}/g){ + my $p = pos($content); + while ($modIndex < $#posList && $p > $posList[$modIndex+1]) { + $modIndex++; $current_module = $modules{$posList[$modIndex]}; } + push(@{$twinDefs->{modules}}, $current_module); + push(@{$twinDefs->{concepts}}, "$1-$2"); + push(@{$twinDefs->{words}}, $3); + push(@{$twinDefs->{twins}}, $4); + print twin, " ==> $current_module: $1-$2: $3 $4\n" if $verbose>=2; + } + + # \twindef{aaa}{bbb} + pos($content) = 0; $modIndex = 0; $current_module = $modules{$posList[0]}; + while ($content =~ m/\\twindef\{([^\}]+)\}\{([^\}]+)\}/g){ + my $p = pos($content); + while ($modIndex < $#posList && $p > $posList[$modIndex+1]) { + $modIndex++; $current_module = $modules{$posList[$modIndex]}; } + push(@{$twinDefs->{modules}}, $current_module); + push(@{$twinDefs->{concepts}}, "$1-$2"); + push(@{$twinDefs->{words}}, $1); + push(@{$twinDefs->{twins}}, $2); + print twin, " ==> $current_module: $1-$2: $1 $2\n" if $verbose>=2; + } + + # see definiens of form \definiens[aaa-bbb-ccc]{\twin{ddd}{eee}{fff}} + # words 'ddd eee fff', concept 'aaa-bbb-ccc', within module 'foo' + pos($content) = 0; $modIndex = 0; $current_module = $modules{$posList[0]}; + while ($content =~ m/\\definiens\[([^\-\]]+)\-([^\-\]]+)\-([^\]]+)\]\{\\atwin\{([^\}]+)\}\{([^\}]+)\}\{([^\}]+)\}\}/g){ + my $p = pos($content); + while ($modIndex < $#posList && $p > $posList[$modIndex+1]) { + $modIndex++; $current_module = $modules{$posList[$modIndex]}; } + push(@{$atwinDefs->{modules}}, $current_module); + push(@{$atwinDefs->{concepts}}, "$1-$2-$3"); + push(@{$atwinDefs->{words}}, $4); + push(@{$atwinDefs->{twins}}, $5); + push(@{$atwinDefs->{adjs}}, $6); + print atwin, " ==> $current_module: $1-$2-$3: $4 $5 $6\n" if $verbose>=2; + } + + # \atwindef{aaa}{bbb}{ccc} + pos($content) = 0; $modIndex = 0; $current_module = $modules{$posList[0]}; + while ($content =~ m/\\atwindef\{([^\}]+)\}\{([^\}]+)\}\{([^\}]+)\}/g){ + my $p = pos($content); + while ($modIndex < $#posList && $p > $posList[$modIndex+1]) { + $modIndex++; $current_module = $modules{$posList[$modIndex]}; } + push(@{$atwinDefs->{modules}}, $current_module); + push(@{$atwinDefs->{concepts}}, "$1-$2-$3"); + push(@{$atwinDefs->{words}}, $1); + push(@{$atwinDefs->{twins}}, $2); + push(@{$atwinDefs->{adjs}}, $3); + print atwin, " ==> $current_module: $1-$2-$3: $1 $2 $3\n" if $verbose>=2; + } + +} + +sub max{ + my ($max, @values) = @_; + foreach (@values) { $max = $_ if $_ gt $max;} + return $max; +} + +sub nospace{ + my ($str) = @_; + $str =~ s/\s+/ /g; + $str =~ s/^\s//; + $str =~ s/\s$//; + return $str; +} + +sub replaceDefs{ + my ($in_tex_file, $out_tex_file) = @_; + + open(FIN, $in_tex_file) or die "Cannot read $in_tex_file\n"; + my @content_lines = ; + close(FIN); + + my $content = join('',@content_lines); + my $lcont = length($content); + + local *go_word = sub { + + my ($word, $new_word1_ex, $new_word2_ex) = @_; + $new_word2_ex = $new_word1_ex unless defined $new_word2_ex; + + while ($content =~ m/([^\{\s]?)(\s*$word\s*)[^\}\s]?/gi){ + my $p = pos($content); + my $ahead_len = length($1); my $matched_word = $2; + my $wlen = length($matched_word); + my $trail_len = length($&) - $wlen - $ahead_len; + + if (($ahead_len != 0 || $trail_len != 0) || + ($ahead_len == 0 && $trail_len == 0 && ($p == $wlen || $p == $lcont))){ + my $start_pos = max(0, $p - $wlen - $trail_len - $before_chars); + my $new_word1 = $new_word1_ex; my $new_word2 = $new_word2_ex; + + my $word_count = 0; + while ($matched_word =~ /\s*([^\s]+)\s*/g){ + my $replace = $1; + $new_word1 =~ s/W%$word_count/$replace/g; + $new_word2 =~ s/W%$word_count/$replace/g; + $word_count++; + } + + print "\nAnnotate '"; + print color 'bold blue'; print nospace($matched_word); print color 'reset'; + print "' with \n Y = '"; print color 'red bold'; print $new_word2; + print color 'reset'; print "'\n y = '"; print color 'red bold'; + print $new_word1; print color 'reset'; print "'\n in: \n<<< "; + print color 'green'; + print substr($content, $start_pos, $before_chars); + print color 'bold blue'; + print substr($content, $start_pos + $before_chars, $wlen); + print color 'reset green'; + print substr($content, $start_pos + $before_chars + $wlen, $after_chars); + print color 'reset'; + print " >>> ?\n"; + print "Options: "; + + my $answer = ; + chomp($answer); + + if ($answer eq 'y'){ + substr($content, $p - $wlen - $trail_len, $wlen) = $new_word1; + $lcont = length($content); + pos($content) = $p + length($new_word1) - $wlen; + print "PROGRESS: Matched text was replaced with '$new_word1'\n" if $verbose; + } elsif ($answer eq 'Y'){ + substr($content, $p - $wlen - $trail_len, $wlen) = $new_word2; + $lcont = length($content); + pos($content) = $p + length($new_word2) - $wlen; + print "PROGRESS: Matched text was replaced with '$new_word2'\n" if $verbose; + } + + } + pos($content) = $p - $trail_len; + } + }; + + my $we = "(s|(ing))?"; # word endings + if (defined $wordDefs->{words}){ + my $wordDefsCount = $#{$wordDefs->{words}} + 1; + for (my $j = 0 ; $j < $wordDefsCount; $j++){ + my $word = "${$wordDefs->{words}}[$j]$we"; + my $new_word = " {\\termin[cd=${$wordDefs->{modules}}[$j],name=${$wordDefs->{concepts}}[$j]]". + "{W%0} "; + go_word($word, $new_word); + } + } + + if (defined $twinDefs->{words}){ + my $twinDefsCount = $#{$twinDefs->{words}} + 1; + for (my $j = 0 ; $j < $twinDefsCount; $j++){ + my $word = "${$twinDefs->{words}}[$j]$we\\s+${$twinDefs->{twins}}[$j]$we"; + my $new_word1 = " {\\termin[cd=${$twinDefs->{modules}}[$j],name=${$twinDefs->{concepts}}[$j]]". + "{W%0 W%1}} "; + my $new_word2 = " {\\termin[cd=${$twinDefs->{modules}}[$j],name=${$twinDefs->{concepts}}[$j]]". + "{\\twin{W%0}{W%1}}} "; + go_word($word, $new_word1, $new_word2); + } + } + + if (defined $atwinDefs->{words}){ + my $atwinDefsCount = $#{$atwinDefs->{words}} + 1; + for (my $j = 0 ; $j < $atwinDefsCount; $j++){ + my $word = "${$atwinDefs->{words}}[$j]$we\\s+${$atwinDefs->{twins}}[$j]$we\\s+${$atwinDefs->{adjs}}[$j]$we"; + my $new_word1 = " {\\termin[cd=${$atwinDefs->{modules}}[$j],name=${$atwinDefs->{concepts}}[$j]]". + "{W%0 W%1 W%2}} "; + my $new_word2 = " {\\termin[cd=${$atwinDefs->{modules}}[$j],name=${$atwinDefs->{concepts}}[$j]]". + "{\\atwin{W%0}{W%1}{W%2}}} "; + go_word($word, $new_word1, $new_word2); + } + } + + open(FOUT, ">$out_tex_file") or die "Cannot write $out_tex_file\n"; + print FOUT $content; + close(FOUT); + +} + +my @background, my @main, my @output; + +GetOptions("verbose" => sub {$verbose++;}, + "background=s" => \@background, + "main=s" => \@main, + "output=s" => \@output, + "help" => sub { pod2usage(2)}); + +foreach (@background) { loadDefs($_); } + +for (my $i = 0 ; $i <= $#main; $i++) { + replaceDefs($main[$i], $output[$i] || $main[$i]); +} + + +__END__ + +=head1 SYNOPSIS + +termin [options] + +Options: + + --verbose verbose on + --background background file to read \termin{} definitions from + --main main file to process + --output output file; the modified content of the main file will + be written here + --help this screen + +Purpose: + Read the \termin definitions from a background file and update a specific main file; + output will be written to the specified the output file. + Note: multiple background/main/output files may be specified. + +Example: + termin --background a.tex --background b.tex --main slides.tex --output new_slides.tex diff --git a/Master/texmf-dist/source/latex/stex/cmath/cmath.dtx b/Master/texmf-dist/source/latex/stex/cmath/cmath.dtx new file mode 100644 index 00000000000..413729e1c6f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/cmath/cmath.dtx @@ -0,0 +1,352 @@ +% \iffalse meta-comment +% An Infrastructure for Presenting Semantic Macros in sTeX +% Copyright (C) 2004-2007 Michael Kohlhase, all rights reserved +% This file is released under the LaTeX Project Public License (LPPL) +% +% The development version of this file can be found at +% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/cmath/cmath.dtx $ +% \fi +% +% \iffalse +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\ProvidesPackage{cmath}[2012/01/28 v0.1 inline content math] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{url,array,float,amstext,alltt} +\usepackage{modules,cmath,stex-logo} +\usepackage[show]{ed} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} +\usepackage{../ctansvn} +\usepackage{hyperref} +\usepackage[eso-foot,today]{svninfo} +\svnInfo $Id: cmath.dtx 1999 2012-01-28 07:32:11Z kohlhase $ +\svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/cmath/cmath.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{cmath.dtx}\end{document} +% +% \fi +% +% \CheckSum{83} +% +% \changes{v0.1}{2011/01/24}{First Version with Documentation, extracted variables stuff +% from \texttt{presentation.dtx}} +% \GetFileInfo{cmath.sty} +% +% \MakeShortVerb{\|} +%\def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} +% \def\xml{\scsys{Xml}} +% \def\mathml{\scsys{MathML}} +% \def\omdoc{\scsys{OMDoc}} +% \def\openmath{\scsys{OpenMath}} +% \def\latexml{\scsys{LaTeXML}} +% \def\perl{\scsys{Perl}} +% \def\cmathml{Content-{\sc MathML}\index{Content {\sc MathML}}\index{MathML@{\sc MathML}!content}} +% \def\activemath{\scsys{ActiveMath}} +% \def\twin#1#2{\index{#1!#2}\index{#2!#1}} +% \def\twintoo#1#2{{#1 #2}\twin{#1}{#2}} +% \def\atwin#1#2#3{\index{#1!#2!#3}\index{#3!#2 (#1)}} +% \def\atwintoo#1#2#3{{#1 #2 #3}\atwin{#1}{#2}{#3}} +% \title{{\texttt{cmath.sty}}: An Infrastructure for building Inline Content Math in +% {\stex}\thanks{Version {\fileversion} (last revised {\filedate})}} +% \author{Michael Kohlhase \& Deyan Ginev\\ +% Jacobs University, Bremen\\ +% \url{http://kwarc.info/kohlhase}} +% \date{\today} +% \maketitle +% +% \begin{abstract} +% The |cmath| package is a central part of the {\stex} collection, a version of +% {\TeX/\LaTeX} that allows to markup {\TeX/\LaTeX} documents semantically without +% leaving the document format, essentially turning {\TeX/\LaTeX} into a document format +% for mathematical knowledge management (MKM). +% +% This package supplies an infrastructure that allows to build content math expresions +% (strict content MathML or OpenMath objects) in the text. This is needed whenever the +% head symbols of expressions are variables and can thus not be treated via the +% |\symdef| mechanism in \stex. +% \end{abstract} +% +% \newpage\setcounter{tocdepth}{2}\tableofcontents\newpage +% +%\section{Introduction}\label{sec:intro} +% +% \stex allows to build content math expressions via the |\symdef| +% mechanism~\cite{KohAmb:smmssl:ctan} if their heads are constants. For instance, if we +% have defined |\symdef{lt}[2]{#1<#2}| in the module |relation1|, then an invocation of +% |\lt3a| will be transformed to +% \begin{verbatim} +% +% +% 3 +% +% +% \end{verbatim} +% If the head of the expression (i.e. the function symbol in this case) is a variable, +% then we cannot resort to a |\symdef|, since that would define the functional equivalent +% of a logical constant. Sometimes, {\latexml} can figure out that when we write $f(a,b)$ +% that $f$ is a function (especially, if we declare them to be via the |functions=| key in +% the dominating statement environment~\cite{Kohlhase:smmtf:ctan}). But sometimes, we want +% to be explicit, especially for $n$-ary functions and in the presence of elided elements +% in argument sequences. A related problem is markup for complex variable names, such as +% $x_{\text{left}}$ or $ST^*$. +% +% The |cmath| package supplies the {\LaTeX} bindings that allow us to +% achieve this. +% +% \section{The User Interface}\label{sec:user} +% +% \subsection{Variable Names}\label{sec:inter:vname} +% +% In mathematics we often use complex variable names like $x'$, $g_n$, $f^1$, +% $\widetilde\phi_i^j$ or even $foo$; for presentation-oriented {\LaTeX}, this is not a +% problem, but if we want to generate content markup, we must show +% explicitly that those are complex identifiers (otherwise the +% variable name $foo$ might be mistaken for the product $f\cdot +% o\cdot o$). In careful mathematical typesetting, |$sin$| is distinguished from |$\sin$|, +% but we cannot rely on this effect for variable names. +% +% \DescribeMacro{\vname} |\vname| identifies a token sequence as a name, and allows the +% user to provide an ASCII ({\xml}-compatible) identifier for it. The optional argument is +% the identifier, and the second one the LaTeX representation. The identifier can also be +% used with \DescribeMacro{\vname} |\vnref| for referencing. So, if we have used +% |\vnname[xi]{x_i}|, then we can later use |\vnref{xi}| as a short name for +% |\vname{x_i}|. Note that in output formats that are capable of generating structure +% sharing, |\vnref{xi}| would be represented as a +% cross-reference.\ednote{DG: Do we know whether using the same name +% in two vname invocations, would refer to two instances of the same variable? Presumably so, since the names are the same? We should make this explicit in the +% text. A different variable would e.g. have a name ``xi2'', but the same body} +% +% Since indexed variable names make a significant special case of complex identifiers, we +% provides the macros \DescribeMacro{\livar}|\livar| that allows to mark up variables with +% lower indices. If |\livar| is given an optional first argument, this is taken as a +% name. Thus |\livar[foo]{x}1| is ``short'' for |\vname[foo]{x_1}|. The macros +% \DescribeMacro{\livar}|\livar|, serve the analogous purpose for variables with upper +% indices, and \DescribeMacro{\ulivar}|\ulivar| for upper and lower indices. Finally, +% \DescribeMacro{\primvar}|\primvar| and \DescribeMacro{\pprimvar}|\pprimvar| do the same +% for variables with primes and double primes (triple primes are bad style). +% +% \subsection{Applications}\label{sec:user:appl} +% +% To construct a content math application of the form $f(a_1,\ldots,a_n)$ with concrete +% arrugments $a_i$ (i.e. without elisions), then we can use the +% \DescribeMacro{\nappa}|\nappa| maro. If we have elisions in the arguments, then we have +% to interpret the arguments as a sequence of argument constructors applied to the +% respective positional indexes. We can mark up this situation with the +% \DescribeMacro{\nappf}|\nappf| macro: +% |\nappf{|\meta{fun}|}{|\meta{const}|}{|\meta{first}|}{|\meta{last}|}| where \meta{const} +% is a macro for the constructor is presented as +% $\meta{fun}(\meta{const}\meta{first},\ldots,\meta{const}\meta{last})$; see +% Figure~\ref{fig:application} for a concrete example, and +% Figure~\ref{fig:application-result}.\ednote{MK@MK: we need a meta-cd |cmath| with the +% respective notation definition here. It is very frustrating that we cannot even really +% write down the axiomatization of } +% +% \begin{figure}\centering +% \begin{tabular}{|l|l|}\hline +% \verb|\nappa{f}{a_1,a_2,a_3}| & $\nappa{f}{a_1,a_2,a_3}$\\\hline +% \verb|\nappe{f}{a_1}{a_n}| & $\nappe{f}{a_1}{a_n}$\\\hline +% \verb|\symdef{eph}[1]{e_{#1}^{\varphi(#1)}}\nappf{g}\eph14| +% & $\def\foo#1{e_{#1}^{\varphi(#1)}}\nappf{g}\foo14$\\\hline +% \verb|\nappli{f}a1n| & $\nappli{f}a1n$\\\hline +% \end{tabular} +% \caption{Application Macros}\label{fig:application} +% \end{figure} +% +% For a simple elision in the argument list, we can use \DescribeMacro{\nappe}|\nappe| +% macro: |\nappe{|\meta{fun}|}{|\meta{firstarg}|}{|\meta{lastarg}|}| will be formatted as +% $\meta{fun}(\meta{firstarg},\ldots,\meta{lastarg})$. Note that this is quite unsemantic +% (we have to guess the sequence), so the use of |\nappe| is discouraged. +% +% \begin{exfig}\centering +% \begin{verbatim} +% \symdef{eph}[1]{e_{#1}^{\phi(#1)}} +% \nappf{g}\eph14 +% \end{verbatim} +% currently generates +% \begin{verbatim} +% +% +% +% +% +% +% +% +% 1 +% 4 +% +% \end{verbatim} +% \caption{Application Macros}\label{fig:application-result} +% \end{exfig} +% +% \subsection{Binders}\label{sec:user:bind} +% +% \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:implementation} +% +% The |cmath| package generates to 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 +% {\textsf{$\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. +% +% For {\latexml}, we initialize the package inclusions. +% \begin{macrocode} +%<*ltxml> +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +% +% \end{macrocode} +% +% \subsection{Package Options}\label{sec:impl:options} +% +% We declare some switches which will modify the behavior according to the package +% options. Generally, an option |xxx| will just set the appropriate switches to true +% (otherwise they stay false).\ednote{we have no options at the moment} +% +% \begin{macrocode} +%<*package> +\ProcessOptions +% +% \end{macrocode} +% + +% \subsection{Variable Names}\label{sec:impl:vname} +% +% \begin{macro}{\vname} +% a name macro; the first optional argument is an identifier \meta{id}, this is standard +% for {\LaTeX}, but for {\latexml}, we want to generate attributes +% |xml:id="cvar.|\meta{id}|"| and |name="|\meta{id}|"|. However, if no id was given in +% we default them to |xml:id="cvar.|\meta{count}|"| and +% |name="name.cvar.|\meta{count}|"|. +% \begin{macrocode} +%<*package> +\newcommand{\vname}[2][]{#2% +\def\@opt{#1}% +\ifx\@opt\@empty\else\expandafter\gdef\csname MOD@name@#1\endcsname{#2}\fi} +% +%<*ltxml> +# return: unique ID for variable +sub cvar_id { + my ($id) = @_; + $id = ToString($id); + if (!$id) { + $id=LookupValue('cvar_id') || 0; + AssignValue('cvar_id', $id + 1, 'global'); } + "cvar.$id"; }#$ +DefConstructor('\vname[]{}', + "#2", + requireMath=>1); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\vnref} +% \begin{macrocode} +%<*package> +\def\vnref#1{\csname MOD@name@#1\endcsname} +% +%<*ltxml> +# \vnref{} +DefMacro('\vnref{}','\@XMRef{cvar.#1}'); + +% +% \end{macrocode} +% \end{macro} +% \ednote{the following macros are just ideas, they need to be implemented and documented} +% \begin{macro}{\uivar} +% constructors for variables. +% \begin{macrocode} +%<*package> +\newcommand{\primvar}[2][]{\vname[#1]{#2^\prime}} +\newcommand{\pprimvar}[2][]{\vname[#1]{#2^{\prime\prime}}} +\newcommand{\uivar}[3][]{\vname[#1]{{#2}^{#3}}} +\newcommand{\livar}[3][]{\vname[#1]{{#2}_{#3}}} +\newcommand{\ulivar}[4][]{\vname[#1]{{#2}^{#3}_{#4}}} +% +%<*ltxml> +# variants for declaring variables +DefMacro('\uivar[]{}{}', '\vname[#1]{{#2}^{#3}}'); +DefMacro('\livar[]{}{}', '\vname[#1]{{#2}_{#3}}'); +DefMacro('\ulivar[]{}{}{}', '\vname[#1]{{#2}^{#3}_{#4}}'); +DefMacro('\primvar[]{}', '\vname[#1]{#2^\prime}'); +DefMacro('\pprimvar[]{}', '\vname[#1]{#2^{\prime\prime}}'); + +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Applications}\label{sec:impl:appl} +% +% \begin{macro}{\napp*} +% \begin{macrocode} +%<*package> +\newcommand\nappa[2]{#1\left(#2\right)} +\newcommand\nappe[3]{\nappa{#1}{#2,\ldots,#3}} +\newcommand\nappf[4]{\nappe{#1}{#2{#3}}{#2{#4}}} +\newcommand\nappli[4]{\nappe{#1}{#2_{#3}}{#2_{#4}}} +\newcommand\nappui[4]{\nappe{#1}{#2^{#3}}{#2^{#4}}} +% +%<*ltxml> +# \nappa{}{<(const)(,\1)*>} +# @#1(#2) +DefConstructor('\nappa{}{}', + "" + ."" + ."#2" + .""); + +# \@napp@seq{}{start }{end } +# @#1(@sequence(#2,sequencefromto,#3)) +DefConstructor('\@napp@seq{}{}{}', + "" + ."" + ."" + ."" + ."" + ."#2" + ."" + ."#3" + ."" + ."" + .""); + +DefMacro('\nappe{}{}{}', '\@napp@seq{#1}{#2}{#3}'); +DefMacro('\nappf{}{}{}{}', '\@napp@seq{#1}{#2{#3}}{#2{#4}}'); +DefMacro('\nappli{}{}{}{}', '\@napp@seq{#1}{#2_{#3}}{#2_{#4}}'); +DefMacro('\nappui{}{}{}{}', '\@napp@seq{#1}{#2^{#3}}{#2^{#4}}'); + +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Binders}\label{sec:impl:bind} +% +% \subsection{Finale} +% +% Finally, we need to terminate the file with a success mark for perl. +% \begin{macrocode} +%1; +% \end{macrocode} +% \Finale +\endinput +% diff --git a/Master/texmf-dist/source/latex/stex/cmath/cmath.ins b/Master/texmf-dist/source/latex/stex/cmath/cmath.ins new file mode 100644 index 00000000000..665c29b6cae --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/cmath/cmath.ins @@ -0,0 +1,38 @@ +%% +%% This file generates files required to use the ed package. +%% At your command prompt write +%% +%% latex cmath.ins +%% +%% Copyright(c) 2011 Michael Kohlhase +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{cmath.sty}{\from{cmath.dtx}{package}}} + +\Msg{*} +\Msg{* You probably need to move the generated style files into a directory searched by TeX.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\nopreamble\nopostamble +\generate{\file{cmath.sty.ltxml}{\from{cmath.dtx}{ltxml}}} + +\Msg{*} +\Msg{* You probably need to move the generated ltxml files into a directory searched by LaTeXML.} +\Msg{*} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/stex/cmathml/cmathml.dtx b/Master/texmf-dist/source/latex/stex/cmathml/cmathml.dtx new file mode 100644 index 00000000000..d00784d6c24 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/cmathml/cmathml.dtx @@ -0,0 +1,2503 @@ +% \iffalse meta-comment +% Semantic Macros for Content MathML in LaTeX +% Copyright (c) 2006 Michael Kohlhase, all rights reserved +% this file is released under the +% Gnu Library Public Licences (LGPL) +% +% The development version of this file can be found at +% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/cmathml/cmathml.dtx $ +% \fi +% +% \iffalse +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\ProvidesPackage{cmathml}[2012/01/28 v1.0 CMathML Bindings] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{url,array,float,amsfonts,a4wide} +\usepackage{stex-logo,cmathml,cmathmlx,presentation} +\usepackage[show]{ed} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} +\usepackage{../ctansvn} +\usepackage{hyperref} +\usepackage[eso-foot,today]{svninfo} +\svnInfo $Id: cmathml.dtx 1999 2012-01-28 07:32:11Z 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} +% +% \changes{v0.1}{2006/01/10}{Initial Version} +% \changes{v0.2}{2006/01/16}{Added big operators} +% \changes{v1.0}{2010/06/18}{Declared complete} +% +% \GetFileInfo{cmathml.sty} +% +% \MakeShortVerb{\|} +% +% \def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} +% \newenvironment{pcmtab}[1][5cm]{\begin{center}\begin{tabular}{|l|l|p{#1}|l|}\hline% +% macro & args & Example & Result\\\hline\hline}% +% {\end{tabular}\end{center}} +% \newenvironment{cmtab}{\begin{center}\begin{tabular}{|l|l|l|l|}\hline% +% macro & args & Example & Result\\\hline\hline}% +% {\end{tabular}\end{center}} +% +% \def\snippet#1{\hbox{\ttfamily{#1}}} +% \def\xml{{\scsys{Xml}}} +% \def\xslt{{\scsys{xslt}}} +% \def\element#1{{\ttfamily{#1}}} +% \def\mathml{{\scshape{MathML}}\index{MathML}} +% \def\latexml{\hbox{{\LaTeX}ML}\index{LaTexML}} +% \def\twin#1#2{\index{#1!#2}\index{#2!#1}} +% \def\twintoo#1#2{{#1 #2}\twin{#1}{#2}} +% \def\atwin#1#2#3{\index{#1!#2!#3}\index{#3!#2 (#1)}} +% \def\atwintoo#1#2#3{{#1 #2 #3}\atwin{#1}{#2}{#3}} +% +% \title{{\texttt{cmathml.sty}}: A {\TeX/\LaTeX}-based Syntax for Content +% {\mathml}\thanks{Version {\fileversion} (last revised {\filedate})}} +% \author{Michael Kohlhase\\ +% Jacobs University, Bremen\\ +% \url{http://kwarc.info/kohlhase}} +% \maketitle +% +% \begin{abstract} +% The |cmathml| package is part of the {\stex} collection, a version of {\TeX/\LaTeX} +% that allows to markup {\TeX/\LaTeX} documents semantically without leaving the +% document format, essentially turning {\TeX/\LaTeX} into a document format for +% mathematical knowledge management (MKM). +% +% This package provides a collection of semantic macros for content {\mathml} and their +% {\latexml} bindings. These macros form the basis of a naive translation from +% semantically preloaded {\LaTeX} formulae into the content {\mathml} formulae via the +% {\latexml} system. +% \end{abstract} +% +% \newpage\tableofcontents\newpage +% +%\section{Introduction}\label{sec:intro} +% +% This document describes the collection of semantic macros for content {\mathml} and +% their {\latexml} bindings. These macros can be used to mark up mathematical formulae, +% exposing their functional/logical structure. This structure can be used by MKM systems +% for added-value services, either directly from the {\sTeX} sources, or after +% translation. Even though it is part of the {\stex} collection, it can be used +% independently. Note that this documentation of the package presupposes the discussion of +% the {\stex} collection to be self-contained. +% +% \subsection{Encoding Content {\mathml} in {\TeX/\LaTeX}}\label{sec:encoding} +% +% The |cmathml| packge presented here addresses part of transformation problem: representing +% mathematical formulae in the {\LaTeX} workflow, so that content {\mathml} representations +% can be derived from them. The underlying problem is that run-of-the-mill {\TeX/\LaTeX} +% only specifies the presentation (i.e. what formulae look like) and not their content +% (their functional structure). Unfortunately, there are no good methods (yet) to infer the +% latter from the former, but there are ways to get presentation from content. +% +% The solution to this problem is to dump the extra work on the author (after all she knows +% what she is talking about) and give them the chance to specify the intended structure. The +% markup infrastructure supplied by the |cmathml| package lets the author do this without +% changing the visual appearance, so that the {\LaTeX} workflow is not disrupted. +% +% To use these |cmathml| macros in a {\LaTeX} document, you will have to include the +% |cmathml| package using |\usepackage{cmathml}| somewhere in the document preamble. Then +% you can use the macros +% \begin{verbatim} +% $\Ceq{\Cexp{\Ctimes{\Cimaginaryi,\Cpi}},\Cuminus{\Ccn{1}}}$ +% \end{verbatim} +% which will result in $e^{i\pi}=-1$ when the document is formatted in {\LaTeX}. If the +% document is converted to {\xml} using the {\latexml} conversion tool, then the result +% will be content {\mathml} representation: +% +%\begin{exfig} +% \begin{verbatim} +% +% +% +% +% +% +% +% 1 +% +% +% \end{verbatim}\vspace*{-.6cm} +% \caption{Content {\mathml} Form of $e^{i\pi}=-1$}\label{fig:cmathml-eip} +% \end{exfig} +% +% \subsection{Changing the {\TeX/\LaTeX} Presentation}\label{sec:changing} +% +% It is possible to change the default presentation (i.e. the result under {\LaTeX} +% formatting): The semantic macros only function as interface control sequences, which +% call an internal macro that does the actual presentation. Thus we simply have to +% redefine the internal macro to change the presentation. This is possible locally or +% globally in the following way: +% \begin{verbatim} +% \makeatletter +% \gdef\CMathML@exp#1{exp(#1)} +% \def\CMathML@pi{\varpi} +% \makeatother +% \end{verbatim} +% +% The first line is needed to lift the {\LaTeX} redefinition protection for internal +% macros (those that contain the $\snippet{\@}$ character), and the last line restores it +% for the rest of the document. The second line has a {\em{global}} (i.e. the presentation +% will be changed from this point on to the end of the document.) redefinition of the +% presentation of the exponential function in the {\LaTeX} output. The third line has a +% {\em{local}} redefinition of the presentation (i.e. in the local group induced by +% {\LaTeX}'s $\snippet{begin}/\snippet{end}$ grouping or by {\TeX}'s grouping induced by +% curly braces). Note that the argument structure has to be respected by the presentation +% redefinitions. Given the redefinitions above, our equation above would come out as +% $exp(i\varpi)=-1$. +% +% \subsection{The Future: Heuristic Parsing}\label{sec:future} +% +% The current implementation of content {\mathml} transformation from {\LaTeX} to +% {\mathml} lays a heavy burden on the content author: the {\LaTeX} source must be +% semantically preloaded --- the structure of the formulae must be fully annotated. In our +% example above, we had to write {|\Ceq{A,B}|} instead of the more conventional (and more +% legible) {|A=B|}.\ednote{come up with a good mixed example} +% +% The reason for this is that this keeps the transformation to content {\mathml} very +% simple, predictable and robust at the expense of authoring convenience. The +% implementation described in this module should be considered as a first step and +% fallback solution only. Future versions of the $\latexml$ tool will feature more +% intelligent solutions for determining the implicit structure of more conventional +% mathematical notations (and {\LaTeX} representations), so that writing content {\mathml} +% via {\LaTeX} will become less tedious. +% +% However, such more advanced techniques usually rely on linguistic, structural, and +% semantic information about the mathematical objects and their preferred +% representations. They tend to be less predictable to casual users and may lead to +% semantically unexpected results.\ednote{talk about sTeX and extensibility in +% MathML/OpenMath/OMDoc} +% +% \newpage +% \section{The User Interface}\label{sec:modules} +% +% We will now tabulate the semantic macros for the Content {\mathml} elements. We have +% divided them into modules based on the sectional structure of the {\mathml}2 +% recommendation ($2^{nd}$ edition). Before we go into the specific elements one-by-one, +% we will discuss some general properties of the |cmatml| macros and their {\latexml} +% bindings. +% +% \subsection{Generalities of the Encoding}\label{sec:generalities} +% +% The semantic macros provided by the |cmatml| package differ mainly in the way they treat +% their arguments. The simplest case are those for constants~\ref{sec:constants} that do +% not take any. Others take one, two, three, or even four arguments, which have to be +% {\TeX} tokens or have to be wrapped in curly braces. For operators that are associative +% {\twin{associative}{operator}} like addition the argument sequence is provided as a +% single {\TeX} argument (wrapped in curly braces) that contains a comma-separated +% sequence of arguments (wrapped in curly braces where necessary). +% +% \DescribeMacro{\Capply} The current setup of the |cmathml| infrastructure minimizes the +% need of specifying the {\mathml} {\element{apply}} element, since the macros are all in +% applied form: As we have seen in the example in the Introduction~\ref{sec:intro}, a +% macro call like {|\Cexp{A}|} corresponds to the application of the exponential function +% to some object, so the necessary {\element{apply}} elements in the {\mathml} +% representation are implicit in the {\LaTeX} formulation and are thus added by the +% transformation. Of course this only works, if the function is a content {\mathml} +% element. Often, in mathematics we will have situations, where the function is a variable +% (or ``arbitrary but fixed'') function. Then the formula $f(x)$ represented as |$f(x)$| +% in {\TeX} could (and sometimes will) be misunderstood by the Math parser as $f\cdot x$, +% i.e. a product of the number $f$ with the number $x$, where $x$ has brackets for some +% reason. In this case, we can disambiguate by using |\Capply{f}x|, which will also format +% as $f(x)$.\ednote{what about $n$-ary functions?} +% +% By the same token, we do not need to represent the qualifier elements +% {\element{condition}} and {\element{domainofapplication}}\footnote{We do not support the +% {\element{fn}} element as it is deprecated in {\mathml}2 and the {\element{declare}} +% and {\element{sep}} elements, since their semantic status is unclear (to the author, +% if you feel it is needed, please gripe to me).}, for +% {\twintoo{binding}{operator}s}. They are are folded into the special forms of the +% semantic macros for the binding operators below (the ones with the {|Cond|} and {|DA|} +% endings): +% +% For operators that are {\index*{associative}}, {\index*{commutative}}, and +% {\index*{idempotent}} ({\index*{ACI}} i.e. {\index*{bracketing}}, +% order\twin{argument}{order}, and {\index*{multiplicity}} of arguments does not matter) +% {\mathml} supplies the a special form of application as a binding operator (often called +% the corresponding ``{\twintoo{big}{operator}})'', which ranges over a whole set of +% arguments. For instance for the ACI operator $\cup$ for set union has the ``big'' +% operator for unions over collections of sets e.g. used in the power set +% $\bigcup_{S\subseteq T}S$ of a set $T$. In some cases, the ``big'' operators are +% provided independently by {\mathml}, e.g. the ACI addition operator has the sum operator +% as a corresponding ``big operator'': $\sum_{x\in\Cnaturalnumbers}{x^i}$ is the sum of +% the powers of $x$ for all natural numbers. Where they are not, we will supply extra +% macros in the |cmathml| package, e.g. the |\CUnion| macro as the big operator for +% |\Cunion|. +% +% Finally, some of the binding operators have multiple content models flagged by the +% existence of various modifier elements. In these cases, we have provided different +% semantic macros for the different cases. +% +% \subsection{The Token Elements}\label{sec:tokens} +% +% The {\mathml} token elements are very simple containers that wrap some presentation +% {\mathml} text. The {\element{csymbol}} element is the extension element in +% {\mathml}. It's content is the presentation of symbol, and it has a |definitionURL| +% attribute that allows to specify a URI that specifies the semantics of the symbol. This +% URL can be specified in an optional argument to the |\Ccsymbol| macro, in accordance +% with usual mathematical practice, the |definitionURL| is not presented. +% \DescribeMacro{\Ccn}\DescribeMacro{\Cci}\DescribeMacro{\Ccsymbol} +% \begin{cmtab} +% |\Ccn| & token & |\Ccn{t}| & $\Ccn{t}$\\\hline +% |\Cci| & token & |\Cci{t}| & $\Cci{t}$\\\hline +% |\Ccsymbol| & token, URI & |\Ccsymbol[http://w3.org]{t}| +% & $\Ccsymbol[http://w3.org]{t}$\\\hline +% \end{cmtab} +% Like the |\Ccsymbol| macro, all other macros in the |camthml| package take an optional +% argument\footnote{This may change into a KeyVaL argument in future versions of the +% |cmathml| package.} for the |definitionURL| attribute in the corresponding {\mathml} +% element. +% +%\newpage +% \subsection{The Basic Content Elements}\label{sec:basic} +% +% The basic elements comprise various pieces of the {\mathml} infrastructure. Most of the +% semantic macros in this section are relatively uneventful. +% +% \DescribeMacro{\Cinverse}\DescribeMacro{\Ccompose}\DescribeMacro{\Cident} +% \DescribeMacro{\Cdomain}\DescribeMacro{\Ccodomain}\DescribeMacro{\Cimage} +% \begin{cmtab} +% |\Cinverse| & 1 & |\Cinverse{f}| & $\Cinverse{f}$\\\hline +% |\Ccompose| & 1 & |\Ccompose{f,g,h}| & $\Ccompose{f,g,h}$\\\hline +% |\Cident| & 0 & |\Cident| & $\Cident$\\\hline +% |\Cdomain| & 1 & |\Cdomain{f}| & $\Cdomain{f}$\\\hline +% |\Ccodomain| & 1 & |\Ccodomain{f}| & $\Ccodomain{f}$\\\hline +% |\Cimage| & 1 & |\Cimage{f}| & $\Cimage{f}$\\\hline +% \end{cmtab} +% +% \DescribeMacro{\Clambda}\DescribeMacro{\ClambdaDA}\DescribeMacro{\Crestrict} For the +% {\element{lambda}} element, we only have the {\element{domainofapplication}} element, so +% that we have three forms a $\lambda$-construct can have. The first one is the simple one +% where the first element is a bound variable. The second one restricts the applicability +% of the bound variable via a {\element{domainofapplication}} element, while the third one +% does not have a bound variable, so it is just a function restriction +% operator.\ednote{need ClambdaCond} +% +% \begin{cmtab} +% |\Clambda| & 2 & |\Clambda{x,y}{A}| & $\Clambda{x,y}{A}$\\\hline +% |\ClambdaDA| & 3 & |\ClambdaDA{x}{C}{A}| & $\ClambdaDA{x,y}{C}{A}$\\\hline +% |\Crestrict| & 2 & |\Crestrict{f}{S}| & $\Crestrict{f}{S}$\\\hline +% \end{cmtab} +% +% \DescribeMacro{ccinterval}\DescribeMacro{cointerval} +% \DescribeMacro{ocinterval}\DescribeMacro{oointerval} +% The {\element{interval}} constructor actually represents four types of intervals in +% {\mathml}. Therefore we have four semantic macros, one for each combination of open and +% closed endings: +% \begin{cmtab} +% |\Cccinterval| & 2 & |\Cccinterval{1}{2}| & $\Cccinterval{1}{2}$\\\hline +% |\Ccointerval| & 2 & |\Ccointerval{1}{2}| & $\Ccointerval{1}{2}$\\\hline +% |\Cocinterval| & 2 & |\Cocinterval{1}{2}| & $\Cocinterval{1}{2}$\\\hline +% |\Coointerval| & 2 & |\Coointerval{1}{2}| & $\Coointerval{1}{2}$\\\hline +% \end{cmtab} +% +%\DescribeMacro{\Cpiecewise}\DescribeMacro{\Cpiece}\DescribeMacro{\Cotherwise} +% The final set of semantic macros are concerned with piecewise definition of functions. +% \begin{cmtab} +% |\Cpiecewise| & 1 & see below & see below\\\hline +% |\Cpiece| & 2 & |\Cpiece{A}{B}| & $\begin{array}{ll}\Cpiece{A}{B}\end{array}$\\\hline +% |\Cotherwise| & 1 & |\Cotherwise{B}| & $\begin{array}{ll}\Cotherwise{1}\end{array}$\\\hline +% \end{cmtab} +% +% For instance, we could define the abstract value function on the reals with the following +% markup +% +% \begin{center} +% \begin{tabular}{|l|l|}\hline +% Semantic Markup & Formatted\\\hline +% \begin{minipage}{8cm}\footnotesize +% \begin{verbatim} +% \Ceq{\Cabs{x}, +% \Cpiecewise{\Cpiece{\Cuminus{x}}{\Clt{x,0}} +% \Cpiece{0}{\Ceq{x,0}} +% \Cotherwise{x}}} +% \end{verbatim} +% \end{minipage} & +% $\Ceq{\Cabs{x},\Cpiecewise{\Cpiece{\Cuminus{x}}{\Clt{x,0}} +% \Cpiece{0}{\Ceq{x,0}} +% \Cotherwise{x}}}$ +% \\\hline +% \end{tabular} +% \end{center} +% +% \newpage +% \subsection{Elements for Arithmetic, Algebra, and Logic}\label{sec:arith} +% +% This section introduces the infrastructure for the basic arithmetic operators. The first +% set is very simple +% +% \DescribeMacro{\Cquotient}\DescribeMacro{\Cfactorial}\DescribeMacro{\Cdivide} +% \DescribeMacro{\Cminus}\DescribeMacro{\Cplus}\DescribeMacro{\Cpower} +% \DescribeMacro{\Crem}\DescribeMacro{\Ctimes}\DescribeMacro{\Croot} +% \begin{cmtab} +% |\Cquotient| & 2 & |\Cquotient{1}{2}| & $\Cquotient{1}{2}$\\\hline +% |\Cfactorial| & 1 & |\Cfactorial{7}| & $\Cfactorial{7}$\\\hline +% |\Cdivide| & 2 & |\Cdivide{1}{2}| & $\Cdivide{1}{2}$\\\hline +% |\Cminus| & 2 & |\Cminus{1}{2}| & $\Cminus{1}{2}$\\\hline +% |\Cplus| & 1 & |\Cplus{1}| & $\Cplus{1}$\\\hline +% |\Cpower| & 2 & |\Cpower{x}{2}| & $\Cpower{x}{2}$\\\hline +% |\Crem| & 2 & |\Crem{7}{2}| & $\Crem{7}{2}$\\\hline +% |\Ctimes| & 1 & |\Ctimes{1,2,3,4}| & $\Ctimes{1,2,3,4}$\\\hline +% |\Croot| & 2 & |\Croot{3}{2}| & $\Croot{3}{2}$\\\hline +% \end{cmtab} +% +% The second batch below is slightly more complicated, since they take a set of +% arguments. In the |cmathml| package, we treat them like {\index*{associative}} +% operators, i.e. they act on a single argument that contains a sequence of +% comma-separated arguments\ednote{implement this in the latexml side} +% +% \DescribeMacro{\Cmax}\DescribeMacro{\Cmin}\DescribeMacro{\Cgcd}\DescribeMacro{\Clcm} +% \begin{cmtab} +% |\Cmax| & 1 & |\Cmax{1,3,6}| & $\Cmax{1,3,6}$\\\hline +% |\Cmin| & 1 & |\Cmin{1,4,5}| & $\Cmin{1,4,7}$\\\hline +% |\Cgcd| & 1 & |\Cgcd{7,3,5}| & $\Cgcd{7,3,5}$\\\hline +% |\Clcm| & 1 & |\Clcm{3,5,4}| & $\Clcm{3,5,4}$\\\hline +% \end{cmtab} +% +% The operators for the logical connectives are associative as well\ednote{maybe add some +% precedences here.}. Here, conjunction, (exclusive) disjunction are $n$-ary associative +% operators, therefore their semantic macro only has one {\TeX} argument which contains a +% comma-separated list of subformulae. +% \DescribeMacro{\Cand}\DescribeMacro{\Cor}\DescribeMacro{\Cxor}\DescribeMacro{\Cnot} +% \DescribeMacro{\Cimplies} +% \begin{cmtab} +% |\Cand| & 1 & |\Cand{A,B,C}| & $\Cand{A,B,C}$\\\hline +% |\Cor| & 1 & |\Cor{A,B,C}| & $\Cor{A,B,C}$\\\hline +% |\Cxor| & 1 & |\Cxor{A,B,C}| & $\Cxor{A,B,C}$\\\hline +% |\Cnot| & 1 & |\Cnot{A}| & $\Cnot{A}$\\\hline +% |\Cimplies| & 2 & |\Cimplies{A}{B}| & $\Cimplies{A}{B}$\\\hline +% \end{cmtab} +% +% The following are the corresponding big operators, where appropriate. +% \DescribeMacro{\CAndDA}\DescribeMacro{\CAndCond} +% \DescribeMacro{\COrDA}\DescribeMacro{\COrCond} +% \DescribeMacro{\CXorDA}\DescribeMacro{\CXorCond} +% \begin{cmtab} +% |\CAndDA| & 2 & |\CAndDA\Cnaturalnumbers\phi| & $\CAndDA\Cnaturalnumbers\phi$\\\hline +% |\CAndCond| & 3 & |\CAndCond{x}{\Cgt{x}5}{\psi(x)}| +% & $\CAndCond{x}{\Cgt{x}5}{\psi(x)}$\\\hline +% |\COrDA| & 2 & |\COrDA\Cnaturalnumbers\phi| & $\COrDa\Cnaturalnumbers\phi$\\\hline +% |\COrCond| & 3 & |\COrCond{x}{\Cgt{x}5}{\psi(x)}| +% & $\COrCond{x}{\Cgt{x}5}{\psi(x)}$\\\hline +% |\CXorDA| & 2 & |\CXorDA\Cnaturalnumbers\phi| & $\CXorDA\Cnaturalnumbers\phi$\\\hline +% |\CXorCond| & 3 & |\CXorCond{x}{\Cgt{x}5}{\psi(x)}| +% & $\CXorCond{x}{\Cgt{x}5}{\psi(x)}$\\\hline +% \end{cmtab} +% +% The semantic macros for the quantifiers come in two forms: with- and without a condition +% qualifier. In a restricted quantification of the form $\forall x,C:A$, the bound variable +% $x$ ranges over all values, such that $C$ holds ($x$ will usually occur in the condition +% $C$). In an unrestricted quantification of the form $\forall x:A$, the bound variable +% ranges over all possible values for $x$. +% \DescribeMacro{\Cforall}\DescribeMacro{\CforallCond} +% \DescribeMacro{\Cexists}\DescribeMacro{\CexistsCond} +% \begin{cmtab} +% |\Cforall| & 2 & |\Cforall{x,y}{A}| & $\Cforall{x,y}{A}$\\\hline +% |\CforallCond| & 3 & |\CforallCond{x}{C}{A}| & $\CforallCond{x}{C}{A}$\\\hline +% |\Cexists| & 2 & |\Cexists{x,y}{A}| & $\Cexists{x,y}{A}$\\\hline +% |\CexistsCond| & 3 & |\CexistsCond{x}{C}{A}| & $\CexistsCond{x}{C}{A}$\\\hline +% \end{cmtab} +% +% The rest of the operators are very simple in structure. +% \DescribeMacro{\Cabs}\DescribeMacro{\Cconjugate}\DescribeMacro{\Carg} +% \DescribeMacro{\Creal}\DescribeMacro{\Cimaginary}\DescribeMacro{\Cfloor} +% \DescribeMacro{\Cceiling} +% \begin{cmtab} +% |\Cabs| & 1 & |\Cabs{x}| & $\Cabs{x}$\\\hline +% |\Cconjugate| & 1 & |\Cconjugate{x}| & $\Cconjugate{x}$\\\hline +% |\Carg| & 1 & |\Carg{x}| & $\Carg{x}$\\\hline +% |\Creal| & 1 & |\Creal{x}| & $\Creal{x}$\\\hline +% |\Cimaginary| & 1 & |\Cimaginary{x}| & $\Cimaginary{x}$\\\hline +% |\Cfloor| & 1 & |\Cfloor{1.3}| & $\Cfloor{1.3}$\\\hline +% |\Cceiling| & 1 & |\Cceiling{x}| & $\Cceiling{x}$\\\hline +% \end{cmtab} +% +% \subsection{Relations}\label{sec:rels} +% +% The relation symbols in {\mathml} are mostly $n$-ary associative operators (taking a +% comma-separated list as an argument). +% +% \DescribeMacro{\Ceq}\DescribeMacro{\Cneq}\DescribeMacro{\Cgt}\DescribeMacro{\Clt} +% \DescribeMacro{\Cgeq}\DescribeMacro{\Cleq}\DescribeMacro{\Cequivalent} +% \DescribeMacro{\Capprox}\DescribeMacro{\Cfactorof} +% \begin{cmtab} +% |\Ceq| & 1 & |\CeqA,B,C| & $\Ceq{A,B,C}$\\\hline +% |\Cneq| & 2 & |\Cneq{1}{2}| & $\Cneq{1}{2}$\\\hline +% |\Cgt| & 1 & |\Cgt{A,B,C}| & $\Cgt{A,B,C}$\\\hline +% |\Clt| & 1 & |\Clt{A,B,C}| & $\Clt{A,B,C}$\\\hline +% |\Cgeq| & 1 & |\Cgeq{A,B,C}| & $\Cgeq{A,B,C}$\\\hline +% |\Cleq| & 1 & |\Cleq{A,B,C}| & $\Cleq{A,B,C}$\\\hline +% |\Cequivalent| & 1 & |\Cequivalent{A,B,C}| & $\Cequivalent{A,B,C}$\\\hline +% |\Capprox| & 2 & |\Capprox{1}{2}| & $\Capprox{1}{1.1}$\\\hline +% |\Cfactorof| & 2 & |\Cfactorof{7}{21}| & $\Cfactorof{7}{21}$\\\hline +% \end{cmtab} +% +% \subsection{Elements for Calculus and Vector Calculus}\label{sec:calculus-vector-calculus} +% +% The elements for calculus and vector calculus have the most varied forms. +% +% The integrals come in four forms: the first one is just an indefinite integral over a +% function, the second one specifies the bound variables, upper and lower limits. The +% third one specifies a set instead of an interval, and finally the last specifies a +% bound variable that ranges over a set specified by a condition. +% +% \DescribeMacro{\Cint}\DescribeMacro{\CintLimits}\DescribeMacro{\CintDA}\DescribeMacro{\CintCond} +% \begin{cmtab} +% |\Cint| & 1 & |\Cint{f}| & $\Cint{f}$\\\hline +% |\CintLimits| & 4 & |\CintLimits{x}{0}{\Cinfinit}{f(x)}| +% & $\CintLimits{x}{0}{\infty}{f(x)}$\\\hline +% |\CintDA| & 2 & |\CintDA{\Creals}{f}| +% & $\CintDA{\mathbb{R}}{f}$\\\hline +% |\CintCond| & 3 & |\CintCond{x}{\Cin{x}{D}}{f(x)}| +% & $\CintCond{x}{x\in D}{f(x)}$\\\hline +% \end{cmtab} +% +% \DescribeMacro{\Cdiff}\DescribeMacro{\Cddiff} The differentiation operators are used in +% the usual way: simple differentiation is represented by the |\Cdiff| macro which takes +% the function to be differentiated as an argument, differentiation with the $d$-notation +% is possible by the |\Cddiff|, which takes the bound variable\ednote{really only one?} as +% the first argument and the function expression (in the bound variable) as a second +% argument. +% +% \DescribeMacro{\Cpartialdiff} Partial Differentiation is specified by the +% |\Cpartialdiff| macro. It takes the overall degree as the first argument (to leave it +% out, just pass the empty argument). The second argument is the list of bound variables +% (with their degrees; see below), and the last the function expression (in these bound +% variables). \DescribeMacro{\Cdegree} To specify the respective degrees of +% differentiation on the variables, we use the |\Cdegree| macro, which takes two arguments +% (but no optional argument), the first one is the degree (a natural number) and the +% second one takes the variable. Note that the overall degree has to be the sum of the +% degrees of the bound variables. +% +% \begin{pcmtab}[6cm] +% |\Cdiff| & 1 & |\Cdiff{f}| & $\Cdiff{f}$\\\hline +% |\Cddiff| & 2 & |\Cddiff{x}{f}| & $\Cddiff{x}{f}$\\\hline +% |\Cpartialdiff| & 3 & |\Cpartialdiff{3}{x,y,z}{f(x,y)}| +% & $\Cpartialdiff{3}{x,y,z}{f(x,y)}$\\\hline +% |\Cpartialdiff| & 3 & |\Cpartialdiff{7}| |{\Cdegree{2}{x},\Cdegree{4}{y},z}| |{f(x,y)}| +% & $\Cpartialdiff{7}{\Cdegree{2}{x},\Cdegree{4}{y},z}{f(x,y)}$\\\hline +% \end{pcmtab} +% +% \DescribeMacro{\Climit}\DescribeMacro{\ClimitCond} For content {\mathml}, there are two +% kinds of limit expressions: The simple one is specified by the |\Climit| macro, which +% takes three arguments: the bound variable, the target, and the limit expression. If we +% want to place additional conditions on the limit construction, then we use the +% |\ClimitCond| macro, which takes three arguments as well, the first one is a sequence of +% bound variables, the second one is the condition, and the third one is again the limit +% expression. +% +% \DescribeMacro{\Ctendsto}\DescribeMacro{\CtendstoAbove}\DescribeMacro{\CtendstoBelow} If +% we want to speak qualitatively about limit processes (e.g. in the condition of a +% |\ClimitCond| expression), then can use the {\mathml} {\element{tendsto}} element, which +% is represented by the |\Ctendsto| macro, wich takes two expressions arguments. In +% {\mathml}, the {\element{tendsto}} element can be further specialized by an attribute to +% indicate the direction from which a limit is approached. In the |cmathml| package, we +% supply two additional (specialized) macros for that: |\CtendstoAbove| and +% |\CtendstoBelow|. +% \begin{cmtab} +% |\Climit| & 3 & |\Climit{x}{0}{\Csin{x}}| & $\Climit{x}{0}{\Csin{x}}$\\\hline +% |\ClimitCond| & 3 & |\ClimitCond{x}{\Ctendsto{x}{0}}{\Ccos{x}}| +% & $\ClimitCond{x}{\Ctendsto{x}{0}}{\Ccos{x}}$\\\hline +% |\Ctendsto| & 2 & |\Ctendsto{f(x)}{2}| & $\Ctendsto{f(x)}{2}$\\\hline +% |\CtendstoAbove| & 2 & |\CtendstoAbove{x}{1}| & $\CtendstoAbove{x}{1}$\\\hline +% |\CtendstoBelow| & 2 & |\CtendstoBelow{x}{2}| & $\CtendstoBelow{x}{2}$\\\hline +% \end{cmtab} +% +% \DescribeMacro{\Cdivergence}\DescribeMacro{\Cgrad}\DescribeMacro{\Ccurl} +% \DescribeMacro{\Claplacian} +% \begin{cmtab} +% |\Cdivergence| & 1 & |\Cdivergence{A}| & $\Cdivergence{A}$\\\hline +% |\Cgrad| & 1 & |\Cgrad{\Phi}| & $\Cgrad{\Phi}$\\\hline +% |\Ccurl| & 1 & |\Ccurl{\Xi}| & $\Ccurl{\Xi}$\\\hline +% |\Claplacian| & 1 & |\Claplacian{A}| & $\Claplacian{A}$\\\hline +% \end{cmtab} +% +% \subsection{Sets and their Operations}\label{sec:sets} +% +% \DescribeMacro{\Cset}\DescribeMacro{\Clist} +% \DescribeMacro{\CsetDA}\DescribeMacro{\CsetRes}\DescribeMacro{\CsetCond} +% The |\Cset| macros is used as the simple finite set constructor, it takes one argument +% that is a comma-separated sequence of members of the set. |\CsetRes| allows to specify a +% set by restricting a set of variables, and |\CsetCond| is the general form of the set +% construction.\ednote{need to do this for lists as well? Probably} +% \begin{cmtab} +% |\Cset| & 1 & |\Cset{1,2,3}| & $\Cset{1,2,3}$\\\hline +% |\CsetRes| & 2 & |\CsetRes{x}{\Cgt{x}5}| +% & $\CsetRes{x}{\Cgt{x}5}$\\\hline +% |\CsetCond| & 3 & |\CsetCond{x}{\Cgt{x}5}{\Cpower{x}3}| +% & $\CsetCond{x}{\Cgt{x}5}{\Cpower{x}3}$\\\hline +% |\CsetDA| & 3 & |\CsetDA{x}{\Cgt{x}5}{S_x}}| +% & $\CsetDA{x}{\Cgt{x}5}{S_x}$\\\hline +% |\Clist| & 1 & |\Clist{3,2,1}| & $\Clist{3,2,1}$\\\hline +%\end{cmtab} +% +%\DescribeMacro{\Cunion}\DescribeMacro{\Cintersect}\DescribeMacro{\Ccartesianproduct} +% \DescribeMacro{\Csetdiff}\DescribeMacro{\Ccard}\DescribeMacro{\Cin}\DescribeMacro{\Cnotin} +% \begin{cmtab} +% |\Cunion| & 1 & |\Cunion{S,T,L}| & $\Cunion{S,T,L}$\\\hline +% |\Cintersect| & 1 & |\Cintersect{S,T,L}| & $\Cintersect{S,T,L}$\\\hline +% |\Ccartesianproduct| & 1 & |\Ccartesianproduct{A,B,C}| & $\Ccartesianproduct{A,B,C}$\\\hline +% |\Csetdiff| & 2 & |\Csetdiff{S}{L}| & $\Csetdiff{S}{L}$\\\hline +% |\Ccard| & 1 & |\Ccard{\Cnaturalnumbers}| & $\Ccard{\mathbb{N}}$\\\hline +% |\Cin| & 2 & |\Cin{a}{S}| & $\Cin{a}{S}$\\\hline +% |\Cnotin| & 2 & |\Cnotin{b}{S}| & $\Cnotin{b}{S}$\\\hline +%\end{cmtab} +% +% The following are the corresponding big operators for the first three binary ACI +% functions. \DescribeMacro{\CUnionDA}\DescribeMacro{\CUnionCond} +% \DescribeMacro{\CIntersectDA}\DescribeMacro{\CIntersectCond} +% \DescribeMacro{\CCartesianproductDA}\DescribeMacro{\CCartesianproductCond} +% \begin{cmtab} +% |\CUnionDA| & 2 & |\CUnionDA\Cnaturalnumbers{S_i}| +% & $\CUnionDA\Cnaturalnumbers{S_i}$\\\hline +% |\CUnionCond| & 3 & |\CUnionCond{x}{\Cgt{x}5}{S_x}}| +% & $\CUnionCond{x}{\Cgt{x}5}{S_x}$\\\hline +% |\CIntersectDA| & 2 & |\CIntersectDA\Cnaturalnumbers{S_i}| +% & $\CIntersectDa\Cnaturalnumbers{S_i}$\\\hline +% |\CIntersectCond| & 3 & |\CIntersectCond{x}{\Cgt{x}5}{S_x}| +% & $\CIntersectCond{x}{\Cgt{x}5}{S_x}$\\\hline +% |\CCartesianproductDA| & 2 & |\CCartesianproductDA\Cnaturalnumbers{S_i}| +% & $\CCartesianproductDA\Cnaturalnumbers{S_i}$\\\hline +% |\CCartesianproductCond| & 3 & |\CCartesianproductCond{x}{\Cgt{x}5}{S_x}| +% & $\CCartesianproductCond{x}{\Cgt{x}5}{S_x}$\\\hline +% \end{cmtab} +% +% \DescribeMacro{\Csubset}\DescribeMacro{\Cprsubset} +% \DescribeMacro{\Cnotsubset}\DescribeMacro{\Cnotprsubset} For the set containment +% relations, we are in a somewhat peculiar situation: content {\mathml} only supplies the +% subset side of the reations and leaves out the superset relations. Of course they are +% not strictly needed, since they can be expressed in terms of the subset relation with +% reversed argument order. But for the |cmathml| package, the macros have a presentational +% side (for the {\LaTeX} workflow) and a content side (for the {\latexml} converter) +% therefore we will need macros for both relations. +% +% \begin{cmtab} +% |\Csubset| & 1 & |\Csubset{S,T,K}| & $\Csubset{S,T,K}$\\\hline +% |\Cprsubset| & 1 & |\Cprsubset{S,T,K}| & $\Cprsubset{S,T,K}$\\\hline +% |\Cnotsubset| & 2 & |\Cnotsubset{S}{K}| & $\Cnotsubset{S}{K}$\\\hline +% |\Cnotprsubset| & 2 & |\Cnotprsubset{S}{L}| & $\Cnotprsubset{S}{L}$\\\hline +% \end{cmtab} +% \DescribeMacro{\Csupset}\DescribeMacro{\Cprsupset} +% \DescribeMacro{\Cnotsupset}\DescribeMacro{\Cnotprsupset} +% The following set of macros are presented in {\LaTeX} as their name suggests, but upon +% transformation will generate content markup with the {\mathml} elements (i.e. in terms +% of the subset relation). +% +% \begin{cmtab} +% |\Csupset| & 1 & |\Csupset{S,T,K}| & $\Csupset{S,T,K}$\\\hline +% |\Cprsupset| & 1 & |\Cprsupset{S,T,K}| & $\Cprsupset{S,T,K}$\\\hline +% |\Cnotsupset| & 2 & |\Cnotsupset{S}{K}| & $\Cnotsupset{S}{K}$\\\hline +% |\Cnotprsupset| & 2 & |\Cnotprsupset{S}{L}| & $\Cnotprsupset{S}{L}$\\\hline +% \end{cmtab} +% +% \subsection{Sequences and Series}\label{sec:sequences} +% +% \DescribeMacro{\CsumLimits}\DescribeMacro{\CsumCond}\DescribeMacro{\CsumDA} +% \DescribeMacro{\CprodLimist}\DescribeMacro{\CprodCond}\DescribeMacro{\CprodDA} +% \begin{cmtab} +% |\CsumLimits| & 4 & |\CsumLimits{i}{0}{50}{x^i}| & $\CsumLimits{i}{0}{50}{x^i}$\\\hline +% |\CsumCond| & 3 & |\CsumCond{i}{\Cintegers}{i}| & $\CsumCond{i}{\mathbb{Z}}{i}$\\\hline +% |\CsumDA| & 2 & |\CsumDA{\Cintegers}{f}| & $\CsumDA{\mathbb{Z}}{f}$\\\hline +% |\CprodLimits| & 4 & |\CprodLimits{i}{0}{20}{x^i}| & $\CprodLimits{i}{0}{20}{x^i}$\\\hline +% |\CprodCond| & 3 & |\CprodCond{i}{\Cintegers}{i}| & $\CprodCond{i}{\mathbb{Z}}{i}$\\\hline +% |\CprodDA| & 2 & |\CprodDA{\Cintegers}{f}| & $\CprodDA{\mathbb{Z}}{f}$\\\hline +% \end{cmtab} +% +% \subsection{Elementary Classical Functions}\label{sec:specfun} +% +% \DescribeMacro{\Csin}\DescribeMacro{\Ccos}\DescribeMacro{\Ctan} +% \DescribeMacro{\Csec}\DescribeMacro{\Ccsc}\DescribeMacro{\Ccot} +% \begin{cmtab} +% |\Csin| & 1 & |\Csin{x}| & $\Csin{x}$\\\hline +% |\Ccos| & 1 & |\Ccos{x}| & $\Ccos{x}$\\\hline +% |\Ctan| & 1 & |\Ctan{x}| & $\Ctan{x}$\\\hline +% |\Csec| & 1 & |\Csec{x}| & $\Csec{x}$\\\hline +% |\Ccsc| & 1 & |\Ccsc{x}| & $\Ccsc{x}$\\\hline +% |\Ccot| & 1 & |\Ccot{x}| & $\Ccot{x}$\\\hline +% \end{cmtab} +% +% \DescribeMacro{\Csinh}\DescribeMacro{\Ccosh}\DescribeMacro{\Ctanh} +% \DescribeMacro{\Csech}\DescribeMacro{\Ccsch}\DescribeMacro{\Ccoth} +% \begin{cmtab} +% |\Csinh| & 1 & |\Csinh{x}| & $\Csinh{x}$\\\hline +% |\Ccosh| & 1 & |\Ccosh{x}| & $\Ccosh{x}$\\\hline +% |\Ctanh| & 1 & |\Ctanh{x}| & $\Ctanh{x}$\\\hline +% |\Csech| & 1 & |\Csech{x}| & $\Csech{x}$\\\hline +% |\Ccsch| & 1 & |\Ccsch{x}| & $\Ccsch{x}$\\\hline +% |\Ccoth| & 1 & |\Ccoth{x}| & $\Ccoth{x}$\\\hline +% \end{cmtab} +% +% \DescribeMacro{\Carcsin}\DescribeMacro{\Carccos}\DescribeMacro{\Carctan} +% \DescribeMacro{\Carcsec}\DescribeMacro{\Carccsc}\DescribeMacro{\Carccot} +% \begin{cmtab} +% |\Carcsin| & 1 & |\Carcsin{x}| & $\Carcsin{x}$\\\hline +% |\Carccos| & 1 & |\Carccos{x}| & $\Carccos{x}$\\\hline +% |\Carctan| & 1 & |\Carctan{x}| & $\Carctan{x}$\\\hline +% |\Carccosh| & 1 & |\Carccosh{x}| & $\Carccosh{x}$\\\hline +% |\Carccot| & 1 & |\Carccot{x}| & $\Carccot{x}$\\\hline +% \end{cmtab} +% +% \DescribeMacro{\Carcsinh}\DescribeMacro{\Carccosh}\DescribeMacro{\Carctanh} +% \DescribeMacro{\Carcsech}\DescribeMacro{\Carccsch}\DescribeMacro{\Carccoth} +% \begin{cmtab} +% |\Carccoth| & 1 & |\Carccoth{x}| & $\Carccoth{x}$\\\hline +% |\Carccsc| & 1 & |\Carccsc{x}| & $\Carccsc{x}$\\\hline +% |\Carcsinh| & 1 & |\Carcsinh{x}| & $\Carcsinh{x}$\\\hline +% |\Carctanh| & 1 & |\Carctanh{x}| & $\Carctanh{x}$\\\hline +% |\Cexp| & 1 & |\Cexp{x}| & $\Cexp{x}$\\\hline +% |\Cln| & 1 & |\Cln{x}| & $\Cln{x}$\\\hline +% |\Clog| & 2 & |\Clog{5}{x}| & $\Clog{5}{x}$\\\hline +% \end{cmtab} +% +% \subsection{Statistics}\label{sec:statistics} +% +% The only semantic macro that is non-standard in this module is the one for the +% {\element{moment}} and {\element{momentabout}} elements in {\mathml}. They are combined +% into the semantic macro {|CmomentA|}; its first argument is the degree, its +% second one the point in the distribution, the moment is taken about, and the third is +% the distribution. +% +% \DescribeMacro{\Cmean}\DescribeMacro{\Csdev}\DescribeMacro{\Cvar}\DescribeMacro{\Cmedian} +% \DescribeMacro{\Cmode}\DescribeMacro{\Cmoment}\DescribeMacro{\CmomentA} +% \begin{cmtab} +% |\Cmean| & 1 & |\Cmean{X}| & $\Cmean{X}$\\\hline +% |\Csdev| & 1 & |\Csdev{X}| & $\Csdev{X}$\\\hline +% |\Cvar| & 1 & |\Cvar{X}| & $\Cvar{X}$\\\hline +% |\Cmedian| & 1 & |\Cmedian{X}| & $\Cmedian{X}$\\\hline +% |\Cmode| & 1 & |\Cmode{X}| & $\Cmode{X}$\\\hline +% |\Cmoment| & 3 & |\Cmoment{3}{X}| & $\Cmoment{3}{X}$\\\hline +% |\CmomentA| & 3 & |\CmomentA{3}{p}{X}| & $\CmomentA{3}{p}{X}$\\\hline +% \end{cmtab} +% +% \subsection{Linear Algebra}\label{sec:linalg} +% +% In these semantic macros, only the matrix constructor is unusual; instead of +% constructing a matrix from {\element{matrixrow}} elements like {\mathml} does, the macro +% follows the {\TeX/\LaTeX} tradition allows to give a matrix as an array. The first +% argument of the macro is the column specification (it will only be used for presentation +% purposes), and the second one the rows. +% +% \DescribeMacro{\Cvector}\DescribeMacro{\Cmatrix}\DescribeMacro{\Cdeterminant} +% \DescribeMacro{\Ctranspose}\DescribeMacro{\Cselector} +% \DescribeMacro{\Cvectorproduct}\DescribeMacro{\Cscalarproduct}\DescribeMacro{\Couterproduct} +% \begin{cmtab} +% |\Cvector| & 1 & |\Cvector{1,2,3}| & $\Cvector{1,2,3}$\\\hline +% |\Cmatrix| & 2 & |\Cmatrix{ll}{1 & 2\\ 3 & 4}| & $\Cmatrix{ll}{1 & 2\\3 & 4}$\\\hline +% |\Cdeterminant| & 1 & |\Cdeterminant{A}| & $\Cdeterminant{A}$\\\hline +% |\Ctranspose| & 1 & |\Ctranspose{A}| & $\Ctranspose{A}$\\\hline +% |\Cselector| & 2 & |\Cselector{A}{2}| & $\Cselector{A}{2}$\\\hline +% |\Cvectproduct| & 2 & |\Cvectproduct{\phi}{\psi}| & $\Cvectproduct{\phi}{\psi}$\\\hline +% |\Cscalarproduct| & 2 & |\Cscalarproduct{\phi}{\psi}| & $\Cscalarproduct{\phi}{\psi}$\\\hline +% |\Couterproduct| & 2 & |\Couterproduct{\phi}{\psi}| & $\Couterproduct{\phi}{\psi}$\\\hline +% \end{cmtab} +% +% \subsection{Constant and Symbol Elements}\label{sec:constants} +% +% The semantic macros for the {\mathml} constant and symbol elements are very simple, they +% do not take any arguments, and their name is just the {\mathml} element name prefixed by +% a capital C. +% +% \DescribeMacro{\Cintegers}\DescribeMacro{\Creals}\DescribeMacro{\Crationals} +% \DescribeMacro{\Ccomplexes}\DescribeMacro{\Cprimes} +% \begin{cmtab} +% |\Cintegers| & & |\Cintegers| & $\Cintegers$\\\hline +% |\Creals| & & |\Creals| & $\Creals$\\\hline +% |\Crationals| & & |\Crationals| & $\Crationals$\\\hline +% |\Cnaturalnumbers| & & |\Cnaturalnumbers| & $\Cnaturalnumbers$\\\hline +% |\Ccomplexes| & & |\Ccomplexes| & $\Ccomplexes$\\\hline +% |\Cprimes| & & |\Cprimes| & $\Cprimes$\\\hline +% \end{cmtab} +% +% \DescribeMacro{\Cexponentiale}\DescribeMacro{\Cimaginaryi} +% \DescribeMacro{\Ctrue}\DescribeMacro{\Cfalse} \DescribeMacro{\Cemptyset} +% \DescribeMacro{\Cpi}\DescribeMacro{\Ceulergamma}\DescribeMacro{\Cinfinit} +% \begin{cmtab} +% |\Cexponemtiale| & & |\Cexponemtiale| & $\Cexponemtiale$\\\hline +% |\Cimaginaryi| & & |\Cimaginaryi| & $\Cimaginaryi$\\\hline +% |\Cnotanumber| & & |\Cnotanumber| & $\Cnotanumber$\\\hline +% |\Ctrue| & & |\Ctrue| & $\Ctrue$\\\hline +% |\Cfalse| & & |\Cfalse| & $\Cfalse$\\\hline +% |\Cemptyset| & & |\Cemptyset| & $\Cemptyset$\\\hline +% |\Cpi| & & |\Cpi| & $\Cpi$\\\hline +% |\Ceulergamma| & & |\Ceulergamma| & $\Ceulergamma$\\\hline +% |\Cinfinit| & & |\Cinfinit| & $\Cinfinit$\\\hline +% \end{cmtab} +% +% \subsection{Extensions}\label{sec:cmathmlx} +% Content MathML does not (even though it claims to cover M-14 Math) symbols for all the +% common mathematical notions. The |cmathmlx| attempts to collect these and provide +% {\TeX/\LaTeX} and {\latexml} bindings. +% +%\DescribeMacro{\Ccomplement} +% \begin{cmtab} +% |\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} +% +% In this file we document both the implementation of the |cmathml| package, as well as +% the corresponding {\latexml} bindings. This keeps similar items close to each other, +% even though they eventually go into differing files and helps promote consistency. We +% specify which code fragment goes into which file by the {\xml}-like grouping commands: +% The code between {\textsf{$\langle$*sty$\rangle$}} and {\textsf{$\langle$/sty$\rangle$}} +% goes into the package file |cmathml.sty|, and the code between +% {\textsf{$\langle$*ltxml$\rangle$}} and {\textsf{$\langle$/ltxml$\rangle$}} goes into +% |cmathml.ltxml| +% +% \subsection{Initialization and auxiliary functions}\label{sec:impl:init} +% +% We first make sure that the {\sTeX} |presentation| package is loaded. +% \begin{macrocode} +%<*sty|styx> +\RequirePackage{presentation} +% +% \end{macrocode} +% +% Before we start im plementing the {\mathml} macros, we will need to set up the packages +% for perl in the {\latexml} bindings file. +% \begin{macrocode} +%<*ltxml|ltxmlx> +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +use LaTeXML::Document; +RequirePackage('LaTeX'); +% +% \end{macrocode} +% +% The next step is to itroduce two auxiliary functions, they are needed to work with +% $n$-ary function elements. The first one removes arbitrary tokens from a list, and the +% specializes that to commas. In particular |remove_tokens_from_list($List, $pattern, $math)| +% returns a new |List| (or |MathList| if |$math| is true) +% with all the tokens in |$List| except the ones which follow +% the pattern |$pattern|. +% +% \begin{macrocode} +%<*ltxml> +sub remove_tokens_from_list { + my ($list, $pattern, $math) = @_; + if (ref $list) { + my @toks = $list->unlist; + @toks = grep($_->toString !~ /$pattern/, @toks); + ($math ? (LaTeXML::MathList->new(@toks)) : (LaTeXML::List)->new(@toks)); } + else { undef; } } + +sub remove_math_commas { + my ($whatsit, $argno) = @_; + my @args = $whatsit ? $whatsit->getArgs() : undef; + $argno--; + if ($args[$argno]) { + $args[$argno] = remove_tokens_from_list($args[$argno], ',', 1); + $whatsit->setArgs(@args); + } + return; +} +% +% \end{macrocode} +% +% The structural macros are rather simple: +% +% \begin{macrocode} +%<*sty> +\newcommand{\Capply}[3][]{#2(#3)} +% +%<*ltxml> +DefConstructor('\Capply [] {} {}', + "#2 #3"); +% +% after this, the implementation will always have the same form. We will first +% implement a block of {\LaTeX} macros via a |\newcommand| and then specify the +% corresponding {\latexml} bindings for them. +% +% \subsection{The Token Elements}\label{impl:tokens} +% +% \begin{macrocode} +%<*sty> +\def\CMathML@cn#1{#1} +\newcommand{\Ccn}[2][]{\CMathML@cn{#2}} +\def\CMathML@ci#1{#1} +\newcommand{\Cci}[2][]{\CMathML@ci{#2}} +\def\CMathML@csymbol#1{#1} +\newcommand{\Ccsymbol}[2][]{\CMathML@csymbol{#2}} +% +%<*ltxml> +DefConstructor('\Ccn [] {}',"#2"); +DefConstructor('\Cci [] {}',"#2"); +DefConstructor('\Ccsymbol [] {}', + ""); +% +% \end{macrocode} +% +% \subsection{The Basic Elements}\label{impl:basic} +% +% \begin{macrocode} +%<*sty> +\def\CMathML@ccinterval#1#2{[#1,#2]} +\newcommand{\Cccinterval}[3][]{\CMathML@ccinterval{#2}{#3}} +\def\CMathML@cointerval#1#2{[#1,#2)} +\newcommand{\Ccointerval}[3][]{\CMathML@cointerval{#2}{#3}} +\def\CMathML@ocinterval#1#2{(#1,#2]} +\newcommand{\Cocinterval}[3][]{\CMathML@ocinterval{#2}{#3}} +\def\CMathML@oointerval#1#2{(#1,#2)} +\newcommand{\Coointerval}[3][]{\CMathML@oointerval{#2}{#3}} +% +%<*ltxml> +DefConstructor('\Cccinterval [] {}{}', + "" + . "" + . "#2" + . "#3"); +DefConstructor('\Ccointerval [] {}{}', + "" + . "" + . "#2" + . "#3"); +DefConstructor('\Cocinterval [] {}{}', + "" + . "" + . "#2" + . "#3"); +DefConstructor('\Coointerval [] {}{}', + "" + . "" + . "#2" + . "#3"); +% +% \end{macrocode} +% +% \begin{macrocode} +%<*sty> +\newcommand{\Cinverse}[2][]{#2^{-1}} +% what about separator +% +%<*ltxml> +DefConstructor('\Cinverse [] {}', + "" + . "" + . "#2" + . ""); +% +% \end{macrocode} +% +% \begin{macrocode} +%<*sty> +\def\CMathML@lambda#1#2{\lambda({#1},{#2})} +\newcommand{\Clambda}[3][]{\CMathML@lambda{#2}{#3}} +\def\CMathML@lambdaDA#1#2#3{\lambda({#1}\colon{#2},#3)} +\newcommand{\ClambdaDA}[4][]{\CMathML@lambdaDA{#2}{#3}{#4}} +\def\CMathML@restrict#1#2{\left.#1\right|_{#2}} +\newcommand{\Crestrict}[3][]{\CMathML@restrict{#2}{#3}} +% +%\ednote{need do deal with multiple variables!} +%<*ltxml> +DefConstructor('\Clambda [] {}{}', + "" + . "" + . "#2" + . "#2" + . ""); +DefConstructor('\ClambdaDA [] {}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\Crestrict [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +% +% \end{macrocode} +% +% \begin{macrocode} +%<*sty> + \def\CMathML@composeOp{\circ} + \newcommand{\CcomposeOp}{\CMathML@composeOp} +\def\CMathML@compose#1{\assoc[p=500,pi=500]{\CMathML@composeOp}{#1}} +\newcommand{\Ccompose}[2][]{\CMathML@compose{#2}} +\def\CMathML@ident#1{\mathrm{id}} +\newcommand{\Cident}[1][]{\CMathML@ident{#1}} +\def\CMathML@domain#1{\mbox{dom}(#1)} +\newcommand{\Cdomain}[2][]{\CMathML@domain{#2}} +\def\CMathML@codomain#1{\mbox{codom}(#1)} +\newcommand{\Ccodomain}[2][]{\CMathML@codomain{#2}} +\def\CMathML@image#1{{\mathbf{Im}}(#1)} +\newcommand{\Cimage}[2][]{\CMathML@image{#2}} +\def\CMathML@piecewise#1{\left\{\begin{array}{ll}#1\end{array}\right.} +\newcommand{\Cpiecewise}[2][]{\CMathML@piecewise{#2}} +\def\CMathML@piece#1#2{#1&{\mathrm{if}}\;{#2}\\} +\newcommand{\Cpiece}[3][]{\CMathML@piece{#2}{#3}} +\def\CMathML@otherwise#1{#1&else\\} +\newcommand{\Cotherwise}[2][]{\CMathML@otherwise{#2}} +% +%<*ltxml> +DefConstructor('\CcomposeOp []', + ""); +DefConstructor('\Ccompose [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\Cident []', + ""); +DefConstructor('\Cdomain [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ccodomain [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cimage [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cpiecewise [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cpiece [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\Cotherwise [] {}', + "" + . "" + . "#2" + . ""); +% +% \end{macrocode} +% +% \subsection{Elements for Arithmetic, Algebra, and Logic}\label{impl:arith} +% +% \begin{macrocode} +%<*sty> +\def\CMathML@quotient#1#2{\frac{#1}{#2}} +\newcommand{\Cquotient}[3][]{\CMathML@quotient{#2}{#3}} + \def\CMathML@factorialOp{!} + \newcommand{\CfactorialOp}{\CMathML@factorialOp} +\def\CMathML@factorial#1{#1{\CMathML@factorialOp}} +\newcommand{\Cfactorial}[2][]{\CMathML@factorial{#2}} + \def\CMathML@divideOp{\div} + \newcommand{\CdivideOp}{\CMathML@divideOp} +\def\CMathML@divide#1#2{\infix[p=400]{\CMathML@divideOp}{#1}{#2}} +\newcommand{\Cdivide}[3][]{\CMathML@divide{#2}{#3}} + \def\CMathML@maxOp{\mathrm{max}} + \newcommand{\CmaxOp}{\CMathML@maxOp} +\def\CMathML@max#1{{\CMathML@maxOp}(#1)} +\newcommand{\Cmax}[2][]{\CMathML@max{#2}} + \def\CMathML@minOp{\mathrm{min}} + \newcommand{\CminOp}{\CMathML@minOp} +\def\CMathML@min#1{{\CMathML@minOp}(#1)} +\newcommand{\Cmin}[2][]{\CMathML@min{#2}} + \def\CMathML@minusOp{-} + \newcommand{\CminusOp}{\CMathML@minusOp} +\def\CMathML@minus#1#2{\infix[p=500]{\CMathML@minusOp}{#1}{#2}} +\newcommand{\Cminus}[3][]{\CMathML@minus{#2}{#3}} +\def\CMathML@uminus#1{\prefix[p=200]{\CMathML@minusOp}{#1}} +\newcommand{\Cuminus}[2][]{\CMathML@uminus{#2}} + \def\CMathML@plusOp{+} + \newcommand{\CplusOp}{\CMathML@plusOp} +\def\CMathML@plus#1{\assoc[p=500]{\CMathML@plusOp}{#1}} +\newcommand{\Cplus}[2][]{\CMathML@plus{#2}} +\def\CMathML@power#1#2{\infix[p=200]{^}{#1}{#2}} +\newcommand{\Cpower}[3][]{\CMathML@power{#2}{#3}} + \def\CMathML@remOp{\bmod} + \newcommand{\CremOp}{\CMathML@remOp} +\def\CMathML@rem#1#2{#1 \CMathML@remOp #2} +\newcommand{\Crem}[3][]{\CMathML@rem{#2}{#3}} + \def\CMathML@timesOp{\cdot} + \newcommand{\CtimesOp}{\CMathML@timesOp} +\def\CMathML@times#1{\assoc[p=400]{\CMathML@timesOp}{#1}} +\newcommand{\Ctimes}[2][]{\CMathML@times{#2}} + \def\CMathML@rootOp{\sqrt} + \newcommand{\CrootOp}{\CMathML@rootOp{}} +\def\CMathML@root#1#2{\CMathML@rootOp[#1]{#2}} +\newcommand{\Croot}[3][]{\CMathML@root{#2}{#3}} +\def\CMathML@gcd#1{\gcd(#1)} +\newcommand{\Cgcd}[2][]{\CMathML@gcd{#2}} + \def\CMathML@andOp{\wedge} + \newcommand{\CandOp}{\CMathML@andOp} +\def\CMathML@and#1{\assoc[p=400]{\CMathML@andOp}{#1}} +\newcommand{\Cand}[2][]{\CMathML@and{#2}} + \def\CMathML@orOp{\vee} + \newcommand{\CorOp}{\CMathML@orOp} +\def\CMathML@or#1{\assoc[p=500]{\CMathML@orOp}{#1}} +\newcommand{\Cor}[2][]{\CMathML@or{#2}} + \def\CMathML@xorOp{\oplus} + \newcommand{\CxorOp}{\CMathML@xorOp} +\def\CMathML@xor#1{\assoc[p=400]{\CMathML@xorOp}{#1}} +\newcommand{\Cxor}[2][]{\CMathML@xor{#2}} + \def\CMathML@notOp{\neg} + \newcommand{\CnotOp}{\CMathML@notOp} +\def\CMathML@not#1{\CMathML@notOp{#1}} +\newcommand{\Cnot}[2][]{\CMathML@not{#2}} + \def\CMathML@impliesOp{\Longrightarrow} + \newcommand{\CimpliesOp}{\CMathML@impliesOp} +\def\CMathML@implies#1#2{#1\CMathML@impliesOp{#2}} +\newcommand{\Cimplies}[3][]{\CMathML@implies{#2}{#3}} +% +%<*ltxml> +DefConstructor('\Cquotient [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CfactorialOp []', + ""); +DefConstructor('\Cfactorial [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CdivideOp []', + ""); +DefConstructor('\Cdivide [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CmaxOp []', + ""); +DefConstructor('\Cmax [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CminOp []', + ""); +DefConstructor('\Cmin [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CminusOp []', + ""); +DefConstructor('\Cminus [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\Cuminus [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CplusOp []', + ""); +DefConstructor('\Cplus [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\Cpower [] {} {}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CremOp []', + ""); +DefConstructor('\Crem [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CtimesOp []', + ""); +DefConstructor('\Ctimes [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CrootOp []', + ""); +DefConstructor('\Croot [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\Cgcd [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CandOp []', + ""); +DefConstructor('\Cand [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CorOp []', + ""); +DefConstructor('\Cor [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CxorOp []', + ""); +DefConstructor('\Cxor [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CnotOp []', + ""); +DefConstructor('\Cnot [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CimpliesOp []', + ""); +DefConstructor('\Cimplies [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +% +% \end{macrocode} +% \ednote{need to do something about the associative things in ltxml} +% \begin{macrocode} +%<*sty> +\def\CMathML@AndDA#1#2{\bigwedge_{#1}{#2}} % set, scope +\newcommand{\CAndDA}[3][]{\CMathML@AndDA{#2}{#3}} +\def\CMathML@AndCond#1#2#3{\bigwedge_{#2}{#3}} % bvars,condition, scope +\newcommand{\CAndCond}[4][]{\CMathML@AndCond{#2}{#2}{#3}} +\def\CMathML@OrDA#1#2{\bigvee_{#1}{#2}} % set, scope +\newcommand{\COrDa}[3][]{\CMathML@OrDA{#2}{#3}} +\def\CMathML@OrCond#1#2#3{\bigvee_{#2}{#3}}% bvars,condition, scope +\newcommand{\COrCond}[4][]{\CMathML@OrCond{#2}{#3}{#4}} +\def\CMathML@XorDA#1#2{\bigoplus_{#1}{#2}} % set, scope +\newcommand{\CXorDA}[3][]{\CMathML@XorDA{#2}{#3}} +\def\CMathML@XorCond#1#2#3{\bigoplus_{#2}{#3}}% bvars,condition, scope +\newcommand{\CXorCond}[4][]{\CMathML@XorCond{#2}{#3}{#4}} +% +\def\CMathML@forall#1#2{\forall{#1}\colon{#2}} +\newcommand{\Cforall}[3][]{\CMathML@forall{#2}{#3}} +\def\CMathML@forallCond#1#2#3{\forall{#1},{#2}\colon{#3}} % list), condition, scope +\newcommand{\CforallCond}[4][]{\CMathML@forallCond{#2}{#3}{#4}} +% +%<*ltxml> +DefConstructor('\CAndDa [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CAndCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\COrDa [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\COrCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\CXorDa [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CXorCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\Cforall [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CforallCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +% +% \end{macrocode} +% +% \begin{macrocode} +%<*sty> +\def\CMathML@exists#1#2{\exists{#1}\colon{#2}} +\newcommand{\Cexists}[3][]{\CMathML@exists{#2}{#3}} +\def\CMathML@esistsCont#1#2#3{\exists{#1},{#2}\colon{#3}} +\newcommand{\CexistsCond}[4][]{\CMathML@esistsCont{#2}{#3}{#4}} +% +%<*ltxml> +DefConstructor('\Cexists [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CexistsCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +% +% \end{macrocode} +% +% \begin{macrocode} +%<*sty> +\def\CMathML@abs#1{\left|#1\right|} +\newcommand{\Cabs}[2][]{\CMathML@abs{#2}} +\def\CMathML@conjugate#1{\overline{#1}} +\newcommand{\Cconjugate}[2][]{\CMathML@conjugate{#2}} +\def\CMathML@arg#1{\angle #1} +\newcommand{\Carg}[2][]{\CMathML@arg{#2}} +\def\CMathML@real#1{\Re #1} +\newcommand{\Creal}[2][]{\CMathML@real{#2}} +\def\CMathML@imaginary#1{\Im #1} +\newcommand{\Cimaginary}[2][]{\CMathML@imaginary{#2}} +\def\CMathML@lcm#1{\mbox{lcm}(#1)} +\newcommand{\Clcm}[2][]{\CMathML@lcm{#2}} +\def\CMathML@floor#1{\left\lfloor{#1}\right\rfloor} +\newcommand{\Cfloor}[2][]{\CMathML@floor{#2}} +\def\CMathML@ceiling#1{\left\lceil{#1}\right\rceil} +\newcommand{\Cceiling}[2][]{\CMathML@ceiling{#2}} +% +%<*ltxml> +DefConstructor('\Cabs [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cconjugate [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carg [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Creal [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cimaginary [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Clcm [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cfloor [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cceiling [] {}', + "" + . "" + . "#2" + . ""); +% +% \end{macrocode} +% +% \subsection{Relations}\label{impl:rels} +% +% \begin{macrocode} +%<*sty> + \def\CMathML@eqOp{=} + \newcommand{\CeqOp}{\CMathML@eqOp} +\def\CMathML@eq#1{\assoc[p=700]{\CMathML@eqOp}{#1}} +\newcommand{\Ceq}[2][]{\CMathML@eq{#2}} + \def\CMathML@neqOp{\neq} + \newcommand{\CneqOp}{\CMathML@neqOp} +\def\CMathML@neq#1#2{\infix[p=700]{\CMathML@neqOp}{#1}{#2}} +\newcommand{\Cneq}[3][]{\CMathML@neq{#2}{#3}} + \def\CMathML@gtOp{>} + \newcommand{\CgtOp}{\CMathML@gtOp} +\def\CMathML@gt#1{\assoc[p=700]{\CMathML@gtOp}{#1}} +\newcommand{\Cgt}[2][]{\CMathML@gt{#2}} + \def\CMathML@ltOp{<} + \newcommand{\CltOp}{\CMathML@ltOp} +\def\CMathML@lt#1{\assoc[p=700]{\CMathML@ltOp}{#1}} +\newcommand{\Clt}[2][]{\CMathML@lt{#2}} + \def\CMathML@geqOp{\geq} + \newcommand{\CgeqOp}{\CMathML@geqOp} +\def\CMathML@geq#1{\assoc[p=700]{\CMathML@geqOp}{#1}} +\newcommand{\Cgeq}[2][]{\CMathML@geq{#2}} + \def\CMathML@leqOp{\leq} + \newcommand{\CleqOp}{\CMathML@leqOp} +\def\CMathML@leq#1{\assoc[p=700]{\CMathML@leqOp}{#1}} +\newcommand{\Cleq}[2][]{\CMathML@leq{#2}} + \def\CMathML@equivalentOp{\equiv} + \newcommand{\CequivalentOp}{\CMathML@equivalentOp} +\def\CMathML@equivalent#1{\assoc[p=700]{\CMathML@equivalentOp}{#1}} +\newcommand{\Cequivalent}[2][]{\CMathML@equivalent{#2}} + \def\CMathML@approxOp{\approx} + \newcommand{\CapproxOp}{\CMathML@approxOp} +\def\CMathML@approx#1#2{#1\CMathML@approxOp{#2}} +\newcommand{\Capprox}[3][]{\CMathML@approx{#2}{#3}} + \def\CMathML@factorofOp{\mid} + \newcommand{\CfactorofOp}{\CMathML@factorofOp} +\def\CMathML@factorof#1#2{#1\CMathML@factorofOp{#2}} +\newcommand{\Cfactorof}[3][]{\CMathML@factorof{#2}{#3}} +% +%<*ltxml> +DefConstructor('\CeqOp []', + ""); +DefConstructor('\Ceq [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CneqOp []', + ""); +DefConstructor('\Cneq [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CgtOp []', + ""); +DefConstructor('\Cgt [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CltOp []', + ""); +DefConstructor('\Clt [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CgeqOp []', + ""); +DefConstructor('\Cgeq [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CleqOp []', + ""); +DefConstructor('\Cleq [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CequivalentOp []', + ""); +DefConstructor('\Cequivalent [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CapproxOp []', + ""); +DefConstructor('\Capprox [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CfactorofOp []', + ""); +DefConstructor('\Cfactorof [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +% +% \end{macrocode} +% +% \begin{macrocode} +%<*sty> + + \def\CMathML@intOp{\int} + \newcommand{\CintOp}{\CMathML@intOp} +\def\CMathML@int#1{\CMathML@intOp{#1}} +\newcommand{\Cint}[2][]{\CMathML@int{#2}} +\def\CMathML@intLimits#1#2#3#4{\CMathML@intOp_{#2}^{#3}{#4}d{#1}} %bvars,llimit, ulimit,body +\newcommand{\CintLimits}[5][]{\CMathML@intLimits{#2}{#3}{#4}{#5}} +\def\CMathML@intSet#1#2{\CMathML@intOp_{#1}{#2}}% set,function +\newcommand{\CintDA}[3][]{\CMathML@intSet{#2}{#3}} +\def\CMathML@intCond#1#2#3{\CMathML@intOp_{#2}{#3}d{#1}} %bvars, condition, body +\newcommand{\CintCond}[4][]{\CMathML@intCond{#2}{#3}{#4}} + +% +%<*ltxml> +DefConstructor('\CintOp []', + ""); +DefConstructor('\Cint [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CintLimits [] {}{}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . "#5" + . ""); +DefConstructor('\CintDA [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CintCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +% +% \end{macrocode} +% +% \begin{macrocode} +%<*sty> +\def\CMathML@diff#1{#1'} +\newcommand{\Cdiff}[2][]{\CMathML@diff{#2}} +\def\CMathML@ddiff#1#2{{d{#2}(#1)\over{d{#1}}}} +\newcommand{\Cddiff}[3][]{\CMathML@ddiff{#2}{#3}} +\def\CMathML@partialdiff#1#2#3{{\partial^{#1}\over\partial{#2}}{#3}}% degree, bvars, body +\newcommand{\Cpartialdiff}[4][]{\CMathML@partialdiff{#2}{#3}{#4}} +\newcommand{\Cdegree}[2]{#1^{#2}} +% +%<*ltxml> +DefConstructor('\Cdiff [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cddiff [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\Cpartialdiff [] {}{}{}', + "" + . "" + . "#3" + . "?#2(#2)()" + . "#4" + . ""); +DefConstructor('\Cdegree {}{}', + "" + . "" + . "#2" + . "#1" + . ""); +% +% \end{macrocode} +% +% \begin{macrocode} +%<*sty> +\def\CMathML@limit#1#2#3{\lim_{#1\rightarrow{#2}}{#3}} +\newcommand{\Climit}[4][]{\CMathML@limit{#2}{#3}{#4}} % bvar, lowlimit, scope +\def\CMathML@limitCond#1#2#3{\lim_{#2}{#3}} +\newcommand{\ClimitCond}[4][]{\CMathML@limitCond{#2}{#3}{#4}} % bvars, condition, scope +% +%<*ltxml> +DefConstructor('\Climit [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\ClimitCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +% +% \end{macrocode} +% +% \begin{macrocode} +%<*sty> + \def\CMathML@tendstoOp{\rightarrow} + \newcommand{\CtendstoOp}{\CMathML@tendstoOp} +\def\CMathML@tendsto#1#2{#1\CMathML@tendstoOp{#2}} +\newcommand{\Ctendsto}[3][]{\CMathML@tendsto{#2}{#3}} + \def\CMathML@tendstoAboveOp{\searrow} + \newcommand{\CtendstoAboveOp}{\CMathML@tendstoAboveOp} +\def\CMathML@tendstoAbove#1#2{#1\searrow{#2}} +\newcommand{\CtendstoAbove}[3][]{\CMathML@tendstoAbove{#2}{#3}} + \def\CMathML@tendstoBelowOp{\nearrow} + \newcommand{\CtendstoBelowOp}{\CMathML@tendstoBelowOp} +\def\CMathML@tendstoBelow#1#2{#1\CMathML@tendstoBelowOp{#2}} +\newcommand{\CtendstoBelow}[3][]{\CMathML@tendstoBelow{#2}{#3}} +% +%<*ltxml> +DefConstructor('\CtendstoOp []', + ""); +DefConstructor('\Ctendsto [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CtendstoAboveOp []', + ""); +DefConstructor('\CtendstoAbove [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CtendstoBelowOp []', + ""); +DefConstructor('\CtendstoBelow [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +% +% \end{macrocode} +% +% \begin{macrocode} +%<*sty> +\def\CMathML@divergence#1{\nabla\cdot{#1}} +\newcommand{\Cdivergence}[2][]{\CMathML@divergence{#2}} +\def\CMathML@grad#1{\nabla{#1}} +\newcommand{\Cgrad}[2][]{\CMathML@grad{#2}} +\def\CMathML@curl#1{\nabla\times{#1}} +\newcommand{\Ccurl}[2][]{\CMathML@curl{#2}} +\def\CMathML@laplacian#1{\nabla^2#1} +\newcommand{\Claplacian}[2][]{\CMathML@laplacian{#2}} +% +%<*ltxml> +DefConstructor('\Cdivergence [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cgrad [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Curl [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Claplacian [] {}', + "" + . "" + . "#2" + . ""); +% +% \end{macrocode} +% +% \subsection{Sets and their Operations}\label{impl:sets} +% +% \begin{macrocode} +%<*sty> +\def\CMathML@set#1{\left\{#1\right\}} +\newcommand{\Cset}[2][]{\CMathML@set{#2}} +\def\CMathML@setRes#1#2{\{#1|#2\}} +\newcommand{\CsetRes}[3][]{\CMathML@setRes{#2}{#3}} +\def\CMathML@setCond#1#2#3{\{#2|#3\}} +\newcommand{\CsetCond}[4][]{\CMathML@setCond{#2}{#3}{#4}} +\def\CMathML@setDA#1#2#3{\{#1\in{#2}|#3\}} +\newcommand{\CsetDA}[4][]{\CMathML@setDA{#2}{#3}{#4}} + \def\CMathML@listOp{\mbox{list}} + \newcommand{\ClistOp}{\CMathML@listOp} +\def\CMathML@list#1{\CMathML@listOp({#1})} +\newcommand{\Clist}[2][]{\CMathML@list{#2}} + \def\CMathML@unionOp{\cup} + \newcommand{\CunionOp}{\CMathML@unionOp} +\def\CMathML@union#1{\assoc[p=500]{\CMathML@unionOp}{#1}} +\newcommand{\Cunion}[2][]{\CMathML@union{#2}} + \def\CMathML@intersectOp{\cap} + \newcommand{\CintersectOp}{\CMathML@intersectOp} +\def\CMathML@intersect#1{\assoc[p=400]{\CMathML@intersectOp}{#1}} +\newcommand{\Cintersect}[2][]{\CMathML@intersect{#2}} + \def\CMathML@inOp{\in} + \newcommand{\CinOp}{\CMathML@inOp} +\def\CMathML@in#1#2{#1\CMathML@inOp{#2}} +\newcommand{\Cin}[3][]{\CMathML@in{#2}{#3}} + \def\CMathML@notinOp{\notin} + \newcommand{\CnotinOp}{\CMathML@notinOp} +\def\CMathML@notin#1#2{#1\CMathML@notinOp{#2}} +\newcommand{\Cnotin}[3][]{\CMathML@notin{#2}{#3}} + \def\CMathML@setdiffOp{\setminus} + \newcommand{\CsetdiffOp}{\CMathML@setdiffOp} +\def\CMathML@setdiff#1#2{#1\CMathML@setdiffOp{#2}} +\newcommand{\Csetdiff}[3][]{\CMathML@setdiff{#2}{#3}} + \def\CMathML@cardOp{\#} + \newcommand{\CcardOp}{\CMathML@cardOp} +\def\CMathML@card#1{\CMathML@cardOp #1} +\newcommand{\Ccard}[2][]{\CMathML@card{#2}} + \def\CMathML@cartesianproductOp{\times} + \newcommand{\CcartesianproductOp}{\CMathML@cartesianproductOp} +\def\CMathML@cartesianproduct#1{\assoc[p=400]{\CMathML@cartesianproductOp}{#1}} +\newcommand{\Ccartesianproduct}[2][]{\CMathML@cartesianproduct{#2}} + \def\CMathML@subsetOp{\subseteq} + \newcommand{\CsubsetOp}{\CMathML@subsetOp} +\def\CMathML@subset#1{\assoc[p=700]{\CMathML@subsetOp}{#1}} +\newcommand{\Csubset}[2][]{\CMathML@subset{#2}} + \def\CMathML@prsubsetOp{\subset} + \newcommand{\CprsubsetOp}{\CMathML@prsubsetOp} +\def\CMathML@prsubset#1{\assoc[p=700]{\CMathML@prsubsetOp}{#1}} +\newcommand{\Cprsubset}[2][]{\CMathML@prsubset{#2}} + \def\CMathML@notsubsetOp{\not\subseteq} + \newcommand{\CnotsubsetOp}{\CMathML@notsubsetOp} +\def\CMathML@notsubset#1#2{#1\CMathML@notsubsetOp{#2}} +\newcommand{\Cnotsubset}[3][]{\CMathML@notsubset{#2}{#3}} + \def\CMathML@notprsubsetOp{\not\subset} + \newcommand{\CnotprsubsetOp}{\CMathML@notprsubsetOp} +\def\CMathML@notprsubset#1#2{#1\CMathML@notprsubsetOp{#2}} +\newcommand{\Cnotprsubset}[3][]{\CMathML@notprsubset{#2}{#3}} +% +%<*ltxml> +DefConstructor('\Cset [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CsetRes [] {}{}', + "" + . "" + . "#2" + . "#3" + . "#2" + . ""); +DefConstructor('\CsetCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\CsetDA [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\ClistOp []', + ""); +DefConstructor('\Clist [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CunionOp []', + ""); +DefConstructor('\Cunion [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CintersectOp []', + ""); +DefConstructor('\Cintersect [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CinOp []', + ""); +DefConstructor('\Cin [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CnotinOp []', + ""); +DefConstructor('\Cnotin [] {}{}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CsubsetOp []', + ""); +DefConstructor('\Csubset [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CprsubsetOp []', + ""); +DefConstructor('\Cprsubset [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CnotsubsetOp []', + ""); +DefConstructor('\Cnotsubset [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CnotprsubsetOp []', + ""); +DefConstructor('\Cnotprsubset [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CsetdiffOp []', + ""); +DefConstructor('\Csetdiff [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CcardOp []', + ""); +DefConstructor('\Ccard [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CcartesianproductOp []', + ""); +DefConstructor('\Ccartesianproduct [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +% +% \end{macrocode} +% The next set of macros are needed, since they are presentational. +% \begin{macrocode} +%<*sty> + \def\CMathML@supsetOp{\supseteq} + \newcommand{\CsupsetOp}{\CMathML@supsetOp} +\def\CMathML@supset#1{\assoc[p=700]{\CMathML@supsetOp}{#1}} +\newcommand{\Csupset}[2][]{\CMathML@supset{#2}} + \def\CMathML@prsupsetOp{\supset} + \newcommand{\CprsupsetOp}{\CMathML@prsupsetOp} +\def\CMathML@prsupset#1{\assoc[p=700]{\CMathML@prsupsetOp}{#1}} +\newcommand{\Cprsupset}[2][]{\CMathML@prsupset{#2}} + \def\CMathML@notsupsetOp{\not\supseteq} + \newcommand{\CnotsupsetOp}{\CMathML@notsupsetOp} +\def\CMathML@notsupset#1#2{#1\CMathML@notsupsetOp{#2}} +\newcommand{\Cnotsupset}[3][]{\CMathML@notsupset{#2}{#3}} + \def\CMathML@notprsupsetOp{\not\supset} + \newcommand{\CnotprsupsetOp}{\CMathML@notprsupsetOp} +\def\CMathML@notprsupset#1#2{#1\CMathML@notprsupsetOp{#2}} +\newcommand{\Cnotprsupset}[3][]{\CMathML@notprsupset{#2}{#3}} +% +% \end{macrocode} +% +% On the semantic side (in {\latexml}), we need to implement them in terms of the +% {\mathml} elements. Fortunately, we can just turn them around. \ednote{ooooops, this +% does not work for the associative ones.} +% +% \begin{macrocode} +%<*ltxml> +DefConstructor('\CsupsetOp []', + ""); +DefConstructor('\CprsupsetOp []', + ""); +DefConstructor('\CnotsupsetOp []', + ""); +DefConstructor('\CnotprsupsetOp []', + ""); +DefMacro('\Csupset[]{}','\Csubset[#1]{#2}'); +DefMacro('\Cprsupset[]{}','\Cprsubset[#1]{#2}'); +DefMacro('\Cnotsupset[]{}{}','\Cnotsubset[#1]{#3}{#2}'); +DefMacro('\Cnotprsupset[]{}{}','\Cnotprsubset[#1]{#3}{#2}'); +% +% \end{macrocode} +% +% \begin{macrocode} +%<*sty> + \def\CMathML@UnionDAOp{\bigwedge} + \newcommand{\CUnionDAOp}{\CMathML@UnionDAOp} +\def\CMathML@UnionDA#1#2{\CMathML@UnionDAOp_{#1}{#2}} % set, scope +\newcommand{\CUnionDA}[3][]{\CMathML@UnionDA{#2}{#3}} +\def\CMathML@UnionCond#1#2#3{\CMathML@UnionDAOp_{#2}{#3}} % bvars,condition, scope +\newcommand{\CUnionCond}[4][]{\CMathML@UnionCond{#2}{#2}{#3}} + \def\CMathML@IntersectDAOp{\bigvee} + \newcommand{\CIntersectDAOp}{\CMathML@IntersectDAOp} +\def\CMathML@IntersectDA#1#2{\CMathML@IntersectDAOp_{#1}{#2}} % set, scope +\newcommand{\CIntersectDa}[3][]{\CMathML@IntersectDA{#2}{#3}} +\def\CMathML@IntersectCond#1#2#3{\CMathML@IntersectDAOp_{#2}{#3}}% bvars,condition, scope +\newcommand{\CIntersectCond}[4][]{\CMathML@IntersectCond{#2}{#3}{#4}} + \def\CMathML@CartesianproductDAOp{\bigoplus} + \newcommand{\CCartesianproductDAOp}{\CMathML@CartesianproductDAOp} +\def\CMathML@CartesianproductDA#1#2{\CMathML@CartesianproductDAOp_{#1}{#2}} % set, scope +\newcommand{\CCartesianproductDA}[3][]{\CMathML@CartesianproductDA{#2}{#3}} +\def\CMathML@CartesianproductCond#1#2#3{\CMathML@CartesianproductDAOp_{#2}{#3}}% bvars,condition, scope +\newcommand{\CCartesianproductCond}[4][]{\CMathML@CartesianproductCond{#2}{#3}{#4}} +% +%<*ltxml> +DefConstructor('\CUnionDAOp []', + ""); +DefConstructor('\CUnionDA [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CUnionCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\CIntersectDaOp []', + ""); +DefConstructor('\CIntersectDa [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CIntersectCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\CCartesianproductDaOp []', + ""); +DefConstructor('\CCartesianproductDa [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CCartesianproductCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +% +% \end{macrocode} +% +% \subsection{Sequences and Series}\label{impl:sequences} +% +% \begin{macrocode} +%<*sty> + \def\CMathML@sumOp{\sum} + \newcommand{\CsumOp}{\CMathML@sumOp} +\def\CMathML@sumLimits#1#2#3#4{\CMathML@sumOp_{#1=#2}^{#3}#4}% bvar, llimit, ulimit, body +\newcommand{\CsumLimits}[5][]{\CMathML@sumLimits{#2}{#3}{#4}{#5}} +\def\CMathML@sumCond#1#2#3{\CMathML@sumOp_{#1\in{#2}}#3} % bvar, condition, body +\newcommand{\CsumCond}[4][]{\CMathML@sumCond{#2}{#3}{#4}} +\def\CMathML@sumDA#1#2{\CMathML@sumOp_{#1}#2} % set, body +\newcommand{\CsumDA}[3][]{\CMathML@sumDA{#2}{#3}} +% +%<*ltxml> +DefConstructor('\CsumOp []', + ""); +DefConstructor('\CsumLimits [] {}{}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . "#5"); +% +% \end{macrocode} +% \ednote{complete the other cases}\ednote{add a keyword argument to all newcommands} +% \begin{macrocode} +%<*sty> + \def\CMathML@prodOp{\prod} + \newcommand{\CprodOp}{\CMathML@prodOp} +\def\CMathML@prodLimits#1#2#3#4{\CMathML@prodOp_{#1=#32^{#3}#4}}% bvar, llimit, ulimit, body +\newcommand{\CprodLimits}[5][]{\CMathML@prodLimits{#2}{#3}{#4}{#5}} +\def\CMathML@prodCond#1#2#3{\CMathML@prodOp_{#1\in{#2}}#3} % bvar, condition, body +\newcommand{\CprodCond}[4][]{\CMathML@prodCond{#2}{#3}{#4}} +\def\CMathML@prodDA#1#2{\CMathML@prodOp_{#1}#2} % set, body +\newcommand{\CprodDA}[3]{\CMathML@prodDA{#2}{#3}} +% +%<*ltxml> +DefConstructor('\CprodOp []', + ""); +DefConstructor('\CprodLimits [] {}{}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . "#5"); +% +% \end{macrocode} +% \ednote{complete the other cases} +% \subsection{Elementary Classical Functions}\label{impl:specfun} +% +% \begin{macrocode} +%<*sty> +\def\CMathML@sin#1{\sin(#1)} +\newcommand{\Csin}[2][]{\CMathML@sin{#2}} +\def\CMathML@cos#1{\cos(#1)} +\newcommand{\Ccos}[2][]{\CMathML@cos{#2}} +\def\CMathML@tan#1{\tan(#1)} +\newcommand{\Ctan}[2][]{\CMathML@tan{#2}} +\def\CMathML@sec#1{\sec(#1)} +\newcommand{\Csec}[2][]{\CMathML@sec{#2}} +\def\CMathML@csc#1{\csc(#1)} +\newcommand{\Ccsc}[2][]{\CMathML@csc{#2}} +\def\CMathML@cot#1{\cot(#1)} +\newcommand{\Ccot}[2][]{\CMathML@cot{#2}} +\def\CMathML@sinh#1{\sinh(#1)} +\newcommand{\Csinh}[2][]{\CMathML@sinh{#2}} +\def\CMathML@cosh#1{\cosh(#1)} +\newcommand{\Ccosh}[2][]{\CMathML@cosh{#2}} +\def\CMathML@tanh#1{\tanh(#1)} +\newcommand{\Ctanh}[2][]{\CMathML@tanh{#2}} +\def\CMathML@sech#1{\mbox{sech}(#1)} +\newcommand{\Csech}[2][]{\CMathML@sech{#2}} +\def\CMathML@csch#1{\mbox{csch}(#1)} +\newcommand{\Ccsch}[2][]{\CMathML@csch{#2}} +\def\CMathML@coth#1{\mbox{coth}(#1)} +\newcommand{\Ccoth}[2][]{\CMathML@coth{#2}} +\def\CMathML@arcsin#1{\arcsin(#1)} +\newcommand{\Carcsin}[2][]{\CMathML@arcsin{#2}} +\def\CMathML@arccos#1{\arccos(#1)} +\newcommand{\Carccos}[2][]{\CMathML@arccos{#2}} +\def\CMathML@arctan#1{\arctan(#1)} +\newcommand{\Carctan}[2][]{\CMathML@arctan{#2}} +\def\CMathML@arccosh#1{\mbox{arccosh}(#1)} +\newcommand{\Carccosh}[2][]{\CMathML@arccosh{#2}} +\def\CMathML@arccot#1{\mbox{arccot}(#1)} +\newcommand{\Carccot}[2][]{\CMathML@arccot{#2}} +\def\CMathML@arccoth#1{\mbox{arccoth}(#1)} +\newcommand{\Carccoth}[2][]{\CMathML@arccoth{#2}} +\def\CMathML@arccsc#1{\mbox{arccsc}(#1)} +\newcommand{\Carccsc}[2][]{\CMathML@arccsc{#2}} +\def\CMathML@arcsinh#1{\mbox{arcsinh}(#1)} +\newcommand{\Carcsinh}[2][]{\CMathML@arcsinh{#2}} +\def\CMathML@arctanh#1{\mbox{arctanh}(#1)} +\newcommand{\Carctanh}[2][]{\CMathML@arctanh{#2}} + +\def\CMathML@exp#1{\exp(#1)} +\newcommand{\Cexp}[2][]{\CMathML@exp{#2}} +\def\CMathML@ln#1{\ln(#1)} +\newcommand{\Cln}[2][]{\CMathML@ln{#2}} +\def\CMathML@log#1#2{\log_{#1}(#2)} +\newcommand{\Clog}[3][]{\CMathML@log{#2}{#3}} +% +%<*ltxml> +DefConstructor('\Csin [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ccos [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ctan [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Csec [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ccsc [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ccot [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Csinh [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ccosh [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ctanh [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Csech [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ccsch [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ccoth [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carcsin [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carccos [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carctan [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carcsec [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carccsc [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carccot [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carcsinh [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carccosh [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carctanh [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carcsech [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carccsch [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carccoth [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cexp [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cln [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Clog [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +% +% \end{macrocode} +% +% \subsection{Statistics}\label{impl:statistics} +% +% \begin{macrocode} +%<*sty> +\def\CMathML@mean#1{\mbox{mean}(#1)} +\newcommand{\Cmean}[2][]{\CMathML@mean{#2}} +\def\CMathML@sdev#1{\mbox{std}(#1)} +\newcommand{\Csdev}[2][]{\CMathML@sdev{#2}} +\def\CMathML@var#1{\mbox{var}(#1)} +\newcommand{\Cvar}[2][]{\CMathML@var{#2}} +\def\CMathML@median#1{\mbox{median}(#1)} +\newcommand{\Cmedian}[2][]{\CMathML@median{#2}} +\def\CMathML@mode#1{\mbox{mode}(#1)} +\newcommand{\Cmode}[2][]{\CMathML@mode{#2}} +\def\CMathML@moment#1#2{\langle{#2}^{#1}\rangle}% degree, momentabout, scope +\newcommand{\Cmoment}[3][]{\CMathML@moment{#2}{#3}} +\def\CMathML@momentA#1#2{\langle{#2}^{#1}\rangle}% degree, momentabout, scope +\newcommand{\CmomentA}[4][]{\CMathML@momentA{#2}{#3}{#4}} +% +%<*ltxml> +DefConstructor('\Cmean [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Csdev [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cvar [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cmedian [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cmode [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cmoment [] {}', + "" + . "" + . "#2" + . ""); +% +% \end{macrocode} +% \ednote{we do not seem to need the momentabout.}\ednote{moment and momentA have funny +% elided arguments} +% +% \subsection{Linear Algebra}\label{impl:linalg} +% +% \begin{macrocode} +%<*sty> +\def\CMathML@vector#1{(#1)} +\newcommand{\Cvector}[2][]{\CMathML@vector{#2}} +\def\CMathML@matrix#1#2{\left(\begin{array}{#1}#2\end{array}\right)}% row pattern, body +\newcommand{\Cmatrix}[3][]{\CMathML@matrix{#2}{#3}} +\def\CMathML@determinant#1{\left|#1\right|} +\newcommand{\Cdeterminant}[2][]{\CMathML@determinant{#2}} +\def\CMathML@transpose#1{#1^\top} +\newcommand{\Ctranspose}[2][]{\CMathML@transpose{#2}} +\def\CMathML@selector#1#2{#1_{#2}} +\newcommand{\Cselector}[3][]{\CMathML@selector{#2}{#3}} + \def\CMathML@vectproductOp{\cdot} + \newcommand{\CvectproductOp}{\CMathML@vectproductOp} +\def\CMathML@vectproduct#1#2{#1\CMathML@vectproductOp{#2}} +\newcommand{\Cvectproduct}[3][]{\CMathML@vectproduct{#2}{#3}} +\def\CMathML@scalarproduct#1#2{{#1}#2} +\newcommand{\Cscalarproduct}[3][]{\CMathML@scalarproduct{#2}{#3}} + \def\CMathML@outerproductOp{\times} + \newcommand{\CouterproductOp}{\CMathML@outerproductOp} +\def\CMathML@outerproduct#1#2{#1\CMathML@outerproductOp{#2}} +\newcommand{\Couterproduct}[3][]{\CMathML@outerproduct{#2}{#3}} +% +%<*ltxml> +DefConstructor('\Cvector [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\Cmatrix [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\Cdeterminant [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ctranspose [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cselector [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CvectorproductOp []', + ""); +DefConstructor('\Cvectorproduct [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\Cscalarproduct [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CouterproductOp []', + ""); +DefConstructor('\Couterproduct [] {}{}', + "" + . "" + . "#2" + . "#3" + . "");#$ +% +% \end{macrocode} +% +% \subsection{Constant and Symbol Elements}\label{impl:constants} +% +% \begin{macrocode} +%<*sty> +\def\CMathML@integers{{\mathbb{Z}}} +\newcommand{\Cintegers}[1][]{\CMathML@integers} +\def\CMathML@reals{{\mathbb{R}}} +\newcommand{\Creals}[1][]{\CMathML@reals} +\def\CMathML@rationals{{\mathbb{Q}}} +\newcommand{\Crationals}[1][]{\CMathML@rationals} +\def\CMathML@naturalnumbers{{\mathbb{N}}} +\newcommand{\Cnaturalnumbers}[1][]{\CMathML@naturalnumbers} +\def\CMathML@complexes{{\mathbb{C}}} +\newcommand{\Ccomplexes}[1][]{\CMathML@complexes} +\def\CMathML@primes{{\mathbb{P}}} +\newcommand{\Cprimes}[1][]{\CMathML@primes} +\def\CMathML@exponemtiale{e} +\newcommand{\Cexponemtiale}[1][]{\CMathML@exponemtiale} +\def\CMathML@imaginaryi{i} +\newcommand{\Cimaginaryi}[1][]{\CMathML@imaginaryi} +\def\CMathML@notanumber{{\mathrm{NaN}}} +\newcommand{\Cnotanumber}[1][]{\CMathML@notanumber} +\def\CMathML@true{{\mathrm{true}}} +\newcommand{\Ctrue}[1][]{\CMathML@true} +\def\CMathML@false{{\mathrm{false}}} +\newcommand{\Cfalse}[1][]{\CMathML@false} +\def\CMathML@emptyset{\emptyset} +\newcommand{\Cemptyset}[1][]{\CMathML@emptyset} +\def\CMathML@pi{\pi} +\newcommand{\Cpi}[1][]{\CMathML@pi} +\def\CMathML@eulergamma{\gamma} +\newcommand{\Ceulergamma}[1][]{\CMathML@eulergamma} +\def\CMathML@infinit{\infty} +\newcommand{\Cinfinit}[1][]{\CMathML@infinit} +% +%<*ltxml> +DefConstructor('\Cintegers []', + ""); +DefConstructor('\Creals []', + ""); +DefConstructor('\Crationals []', + ""); +DefConstructor('\Cnaturalnumbers []', + ""); +DefConstructor('\Ccomplexes []', + ""); +DefConstructor('\Cprimes []', + ""); +DefConstructor('\Cexponentiale []', + ""); +DefConstructor('\Cimaginaryi []', + ""); +DefConstructor('\Cnotanumber []', + ""); +DefConstructor('\Ctrue []', + ""); +DefConstructor('\Cfalse []', + ""); +DefConstructor('\Cemptyset []', + ""); +DefConstructor('\Cpi []', + ""); +DefConstructor('\Ceulergamma []', + ""); +DefConstructor('\Cinfinit []', + ""); +% +% \end{macrocode} +% +% \subsection{Extensions}\label{sec:impl:cmathmlx} +% \begin{macro}{\Ccomplement} +% \begin{macrocode} +%<*styx> +\def\CMathML@complement#1{#1^c} +\newcommand{\Ccomplement}[2][]{\CMathML@complement{#2}} +% +%<*ltxmlx> +DefConstructor('\Ccomplement [] {}', + "" + . "" + . "#2" + . ""); +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Finale}\label{sec:impl: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: STeX cmathml symdefs CMathML dom codom Im ll reln fn bvar arith +% LocalWords: alg lcm rels Ceq llimit ulimit bvars lowlimit specfun sech csch +% LocalWords: coth arccosh arccot arccoth arccsc arcsinh arctanh logbase std +% LocalWords: var momentabout linalg matrixrow bruce NaN stex cnxml symdef sc +% LocalWords: DefinitionURLs domainofapplication CmomentA concl iffalse scsys +% LocalWords: cmathml.dtx sc newenvironment pcmtab hline cmtab hbox ttfamily +% LocalWords: xslt xslt mathml scshape latexml twintoo atwin atwintoo texttt +% LocalWords: fileversion maketitle newpage tableofcontents newpage exfig exp +% LocalWords: usepackage vspace cmathml-eip varpi ednote nd cmatml Capply Cexp +% LocalWords: cdot ary Cond bigcup subseteq Cnaturalnumbers Cunion csymbol Ccn +% LocalWords: Ccsymbol camthml Cinverse Ccompose Cident Cdomain Ccodomain Clt +% LocalWords: Cimage Clambda ClambdaDA Crestrict ccinterval cointerval Cpiece +% LocalWords: ocinterval oointerval Cccinterval Cccinterval Cccinterval Cminus +% LocalWords: Ccointerval Ccointerval Ccointerval Cocinterval Cocinterval Cmax +% LocalWords: Cocinterval Coointerval Coointerval Coointerval Cpiecewise Cplus +% LocalWords: Cotherwise footnotesize Cuminus Cquotient Cfactorial Cdivide Cgt +% LocalWords: Cpower Ctimes Croot Cmin Cgcd Cand Cxor Cnot Cimplies forall cn +% LocalWords: Cforall CforallCond Cexists CexistsCond Cconjugate Carg Creal eq +% LocalWords: Cimaginary Cfloor Cceiling Cneq Cgeq Cleq Cequivalent Capprox gt +% LocalWords: Cfactorof Cint CintLimits CintDA CintCond Cinfinit infty Creals +% LocalWords: mathbb Cdiff Cddiff varible Cpartialdiff Cdegree Climit Ctendsto +% LocalWords: ClimitCond CtendstoAbove CtendstoBelow tendsto Csin Csin Ccos ln +% LocalWords: Cdivergence Cgrad Ccurl Claplacian Cset Clist Cintersect Ccard +% LocalWords: Ccartesianproduct Csetdiff Cnotin CCartesianproductDA Csubset ln +% LocalWords: CCartesianproductCond Cprsubset Cnotsubset Cnotprsubset reations +% LocalWords: Csupset Cprsupset Cnotsupset Cnotprsupset CsumLimits CsumCond +% LocalWords: CsumDA CprodLimist CprodCond CprodDA Cintegers CprodLimits Ctan +% LocalWords: CprodLimits CprodLimits Csec Ccsc Ccot Csinh Ccosh Ctanh Csech +% LocalWords: Ccsch Ccoth Carcsin Carccos Carctan Carcsec Carccsc Carccot Cln +% LocalWords: Carccosh Carccosh Carccosh Carcsinh Carctanh Carcsech Carccsch +% LocalWords: Carccoth Cln Cln Cmean Csdev Cvar Cmedian Cmode Cmoment Cvector +% LocalWords: Cmatrix Cdeterminant Ctranspose Cselector Cvectorproduct Cprimes +% LocalWords: Cscalarproduct Couterproduct Cvectproduct Cvectproduct Ctrue Cpi +% LocalWords: Cvectproduct Crationals Ccomplexes Cexponentiale Cimaginaryi ltx +% LocalWords: Cfalse Cemptyset Ceulergamma Cexponemtiale Cexponemtiale impl +% LocalWords: Cexponemtiale Cnotanumber Cnotanumber Cnotanumber cmathmlx ltxml +% LocalWords: Ccomplement printbibliography textsf langle textsf langle ltxml +% LocalWords: plementing ltxmlx itroduce unlist whatsit argno newcommand circ +% LocalWords: OPFUNCTION assoc ident mathrm mbox mathbf uminus bmod sqrt oplus +% LocalWords: Longrightarrow bigwedge bigvee bigoplus esistsCont overline eqOp +% LocalWords: lfloor rfloor lceil rceil neqOp neq gtOp geqOp geq leqOp leq csc +% LocalWords: equiv approxOp approx factorofOp factorof ddiff partialdiff csc +% LocalWords: rightarrow searrow nearrow RELOP'meaning setdiffOp setdiff sinh +% LocalWords: cartesianproductOp cartesianproduct prsubsetOp prsubset supseteq +% LocalWords: notsubsetOp notsubset notprsubsetOp notprsubset prsupsetOp sinh +% LocalWords: prsupset notsupsetOp notsupset notprsupsetOp notprsupset ooooops +% LocalWords: CsumOp newcommands CprodOp tanh tanh arccos arccos TRIGFUNCTION +% LocalWords: arcsec arcsech arccsch sdev vectproductOp vectproduct imaginaryi +% LocalWords: scalarproduct outerproductOp outerproduct vectorproduct emptyset +% LocalWords: naturalnumbers exponemtiale notanumber emptyset eulergamma +% LocalWords: exponentiale doctex diff --git a/Master/texmf-dist/source/latex/stex/cmathml/cmathml.ins b/Master/texmf-dist/source/latex/stex/cmathml/cmathml.ins new file mode 100644 index 00000000000..36ec44c47e7 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/cmathml/cmathml.ins @@ -0,0 +1,37 @@ +%% +%% This file generates files required to use the ed package. +%% At your command prompt write +%% +%% latex cmathml.ins +%% +%% Copyright(c) 2005 Michael Kohlhase +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{cmathml.sty}{\from{cmathml.dtx}{sty}} +\generate{\file{cmathmlx.sty}{\from{cmathml.dtx}{styx}} +% generated the LaTeXML bindings +\nopreamble\nopostamble +\file{cmathml.sty.ltxml}{\from{cmathml.dtx}{ltxml}}} +\file{cmathmlx.sty.ltxml}{\from{cmathml.dtx}{ltxmlx}}} + +\Msg{*} +\Msg{* You probably need to move the generated style files into a directory} +\Msg{* searched by TeX and LaTeXML respectively.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/stex/cnx/cnx.dtx b/Master/texmf-dist/source/latex/stex/cnx/cnx.dtx new file mode 100644 index 00000000000..6bfc860eab4 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/cnx/cnx.dtx @@ -0,0 +1,1209 @@ +% \iffalse meta-comment +% A LaTeX Class for CNXML +% Copyright (c) 2006 Michael Kohlhase, all rights reserved +% this file is released under the +% Gnu Library Public Licences (LGPL) +% +% The development version of this file can be found at +% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/cnx/cnx.dtx $ +% \fi +% +% \iffalse +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\ProvidesClass{cnx}[2012/01/28 v1.0 LaTeX Bindings for CNXML] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{url,array,float,stex-logo} +\usepackage[show]{ed} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} +\usepackage{ctansvn} +\usepackage[eso-foot,today]{svninfo} +\svnInfo $Id: cnx.dtx 1999 2012-01-28 07:32:11Z 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{439} +% +% \changes{v0.1}{2005/12/06}{Initial Version} +% \changes{v0.2}{2006/01/11}{Namespaces now work} +% \changes{v1.0}{2006/01/11}{this is a good as it is every going to get} +% +% \GetFileInfo{cnx.cls} +% +% \MakeShortVerb{\|} +%\def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} +% \def\xml{\scshape{XML}} +% \def\cnxml{\scshape{CNXml}} +% \def\connexions{\scshape{Connexions}} +% \def\element#1{{\ttfamily{#1}}} +% \def\snippet#1{{\ttfamily{#1}}} +% \def\cnxlatex{CNX\LaTeX} +% \def\mathml{{\scshape{MathML}}} +% \def\latexml{\hbox{{\LaTeX}ML}} +% \title{{\cnxlatex}: A {\LaTeX}-based Syntax for Connexions Modules\thanks{Version {\fileversion} +% (last revised {\filedate})}} +% \author{Michael Kohlhase\\ +% Jacobs University, Bremen\\ +% \url{http://kwarc.info/kohlhase}} +% \maketitle +% +% \begin{abstract} +% We present {\cnxlatex}, a collection of {\LaTeX} macros that allow to write +% {\connexions} modules without leaving the {\LaTeX} workflow. Modules are authored in +% {\cnxlatex} using only a text editor, transformed to PDF and proofread as usual. In +% particular, the {\LaTeX} workflow is independent of having access to the {\connexions} +% system, which makes {\cnxlatex} attractive for the initial version of single-author +% modules. +% +% For publication, {\cnxlatex} modules are transformed to {\cnxml} via the {\latexml} +% translator and can be uploaded to the {\connexions} system. +% \end{abstract} +% +% \newpage\tableofcontents\newpage +% +%\section{Introduction} +% +% The Connexions project is a\ednote{continue; copy from somewhere...} +% +% The {\cnxml} format --- in particular the embedded content {\mathml} --- is hard to write +% by hand, so we provide a set of environments that allow to embed the {\cnxml} document +% model into {\LaTeX}. +% +%\section{The User Interface} +% +% This document is not a manual for the Connexions XML encoding, or a practical guide how +% to write Connexions modules. We only document the {\LaTeX} bindings for {\cnxml} and will +% presuppose experience with the format or familiarity with\ednote{cite the relevant stuff +% here}. Note that formatting {\cnxlatex} documents with the {\LaTeX} formatter does +% little to enforce the restrictions imposed by the {\cnxml} document model. You will need to +% run the {\latexml} converter for that (it includes DTD validation) and any CNX-specific +% quality assurance tools after that. \ednote{talk about Content {\mathml} and cmathml.sty +% somewhere} +% +% The {\cnxlatex} class makes heavy use of the |KeyVal| package, which is part of your +% {\LaTeX} distribution. This allows to add optional information to {\LaTeX} macros in the +% form of key-value pairs: A macro |\foo| that takes a KeyVal argument and a regular one, +% so a call might look like |\foo{bar}| (no KeyVal information given) or +% |\foo[key1=val1,...,keyn=valn]{bar}|, where |key1|,\dots,|keyn| are predefined keywords +% and values are {\LaTeX} token sequences that do not contain comma characters (though +% they may contain blank characters). If a value needs to contain commas, then it must be +% 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} +%\begin{verbatim} +% \documentclass{cnx} +% \begin{document} +% \begin{cnxmodule}[name=Hello World,id=m4711] +% \begin{ccontent} +% \begin{cpara}[id=p01] Hello World\end{cpara} +% \end{ccontent} +% \end{cnxmodule} +% \end{document} +% \end{verbatim} +% \caption{A Minimal {\cnxlatex} Document}\label{fig:minimal} +%\end{exfig} +% +% The first set of {\cnxlatex} environments concern the top-level structure of the +% modules. The minimal Connexions document in {\LaTeX} can be seen in +% Figure~\ref{fig:minimal}: we still need the {\LaTeX} document environment, then +% \DescribeEnv{cnxmodule} +% the |cnxmodule| environment contains the module-specific information as a KeyVal +% argument with the two keys: |id| for the module identifier supplied by the +% {\connexions} system) and |name| for the title of the module. +% +% \DescribeEnv{ccontent} +% The |content| environment delineates the module content from the metadata (see +% Section~\ref{sec:metadata}). It is needed to make the conversion to {\cnxml} simpler. +% +% \DescribeEnv{c*section} +% {\cnxml} knows three levels of sectioning, so the {\cnxlatex} class supplies three as +% well: |csection|, |csubsection| and |csubsubsection|. In contrast to regular +% {\LaTeX}, these are environments to keep the tight connection between the +% formats. These environments take an optional KeyVal argument with key |id| for the +% identifier and a regular argument for the title of the section (to be transformed into +% the {\cnxml} {\element{name}} element). +% +% \DescribeEnv{cpara, cnote} +% The lowest levels of the document structure are given by paragraphs and notes. The +% |cpara| and |cnote| environment take a KeyVal argument with the |id| key for +% identification, the latter also allows a |type| key for the note type (an unspecified +% string\ednote{what are good values?}). +% +% +% \subsection{Mathematics} +% +% Mathematical formulae are integrated into text via the {\LaTeX} math mode, i.e. wrapped +% in |$| characters or between |\(| and |\)| for inline mathematics and wrapped in |$$| or +% between |\[| and |\]| for display-style math. Note that {\cnxml} expects Content +% {\mathml} as the representation format for mathematical formulae, while run-of-the-mill +% {\LaTeX} only specifies the presentation (i.e. the two-dimensional layout of +% formulae). The {\latexml} converter can usually figure out some of the content {\mathml} +% from regular {\LaTeX}, in other cases, the author has to specify it e.g. using the +% infrastructure supplied by the |cmathml| package. +% +% \DescribeEnv{cequation} +% For numbered equations, {\cnxml} supplies the {\element{equation}} element, for which +% {\cnxlatex} provides the |cequation| environment. This environment takes a KeyVal +% argument with the |id| key for the (required) identifier. +% +% +% \subsection{Statements} +% +% {\cnxml} provides special elements that make various types of claims; we +% collectively call them statements. +% +% \DescribeEnv{cexample} +% The |cexample| environment and |definition| elements take a KeyVal argument with key +% |id| for identification. +% +% +% \DescribeEnv{crule, statement, proof} +% In {\cnxml}, the {\element{rule}} element is used to represent a general assertion +% about the state of the world. The {\cnxlatex} |rule|\ednote{we have called this +% ``crule'', since ``rule'' is already used by {\TeX}.} environment is its {\cnxlatex} +% counterpart. It takes a KeyVal attribute with the keys |id| for identification, |type| +% to specify the type of the assertion (e.g. ``Theorem'', ``Lemma'' or ``Conjecture''), +% and |name|, if the assertion has a title. The body of the |crule| environment contains +% the statement of assertion in the |statement| environment and (optionally) a proof in +% the |proof| environment. Both take a KeyVal argument with an |id| key for +% identification. +% +%\begin{exfig} +%\begin{verbatim} +% \begin{crule}[id=prop1,type=Proposition] +% \begin{statement}[id=prop1s] +% Sample statement +% \end{statement} +% \begin{proof}[id=prop1p] +% Your favourite proof +% \end{proof} +% \end{crule} +% \end{verbatim} +% \caption{A Basic crule Example}\label{fig:crule} +%\end{exfig} +% +% \DescribeEnv{definition, cmeaning} A definition defines a new technical term or concept +% for later use. The |definition| environment takes a KeyVal argument with the keys |id| +% for identification and |term| for the concept (definiendum) defined in this form. The +% definition text is given in the |cmeaning| environment\footnote{we have called this +% |cmeaning|, since |meaning| is already taken by {\TeX}}, which takes a KeyVal argument +% with key |id| for identification. After the |cmeaning| environment, a |definition| can +% contain arbitrarily many |cexample|s. +% +%\begin{exfig} +%\begin{verbatim} +% \begin{definition}{term=term-to-be-defined, id=termi-def] +% \begin{cmeaning}[id=termi-meaning] +% {\term{Term-to-be-defined}} is defined as: Sample meaning +% \end{cmeaning} +% \end{definition} +%\end{verbatim} +% \caption{A Basic {\tt{definition}} and {\tt{cmeaning}} Example}\label{fig:def-cmean} +%\end{exfig} +% +% \subsection{Connexions: Links and Cross-References} +% +% As the name {\connexions} already suggests, links and cross-references are very +% important for {\connexions} modules. {\cnxml} provides three kinds of them. Module +% links, hyperlinks, and concept references. +% +% \DescribeMacro{cnxn} +% Module links are specified by the |\cnxn| macro, which takes a keyval argument with +% the keys |document|, |target|, and |strength|. The |document| key allows to specify +% the module identifier of the desired module in the repository, if it is empty, then +% the current module is intended. The |target| key allows to specify the document +% fragment. Its value is the respective identifier (given by its |id| attribute in +% {\cnxml} or the |id| key of the corresponding environment in {\cnxlatex}). Finally, +% the |strength| key allows to specify the relevance of the link. +% +% The regular argument of the |\cnxn| macro is used to supply the link text. +% +% +% \DescribeMacro{link} +% Hyperlinks can be specified by the |\link| macro in {\cnxlatex}. It takes a KeyVal +% argument with the key |src| to specify the URL of the link. The regular argument of +% the |\link| macro is used to supply the link text. +% +% +% \DescribeMacro{term} +% The |\term| marco can be used to specify the\ednote{continue, pending Chuck's +% investigation. } +% +% +% \subsection{Metadata}\label{sec:metadata} +% +% Metadata is mostly managed by the system in {\connexions}, so we often do not need to +% care about it. On the other hand, it influences the system, so if we have work on the +% module extensively before converting it to {\cnxml}, it may be worth-wile specify some of +% the data in advance. +% +% \begin{exfig} +%\begin{verbatim} +% \begin{metadata}[version=2.19, +% created=2000/07/21,revised=2004/08/17 22:07:27.213 GMT-5] +% \begin{authorlist} +% \cnxauthor[id=miko,firstname=Michael,surname=Kohlhase, +% email=m.kohlhase@iu-bremen.de] +% \end{authorlist} +% \begin{keywordlist}\keyword{Hello}\end{keywordlist} +% \begin{cnxabstract} +% A Minimal CNXLaTeX Document +% \end{cnxabstract} +% \end{metadata} +% \end{verbatim} +% \caption{Typical {\cnxlatex} Metadata}\label{fig:metadata} +%\end{exfig} +% +% \DescribeEnv{metadata} +% The |metadata| environment takes a KeyVal argument with the keys |version|, |created|, +% and |revised| with the obvious meanings. The latter keys take ISO 8601 norm +% representations for dates and times. Concretely, the format is +% {\snippet{CCYY-MM-DDThh:mm:ss}} where ``{\snippet{CC}}'' represents the century, +% ``{\snippet{YY}}'' the year, ``{\snippet{MM}}'' the month, and ``{\snippet{DD}}'' the +% day, preceded by an optional leading ``{\snippet{-}}'' sign to indicate a negative +% number. If the sign is omitted, ``{\snippet{+}}'' is assumed. The letter +% ``{\snippet{T}}'' is the date/time separator and ``{\snippet{hh}}'', +% ``{\snippet{mm}}'', ``{\snippet{ss}}'' represent hour, minutes, and seconds +% respectively. +% +% +% \DescribeEnv{authorlist, maintainerlist} +% The lists of authors and maintainers can be specified in the |authorlist| and +% |maintainerlist| environments, which take no arguments. +% +% \DescribeMacro{cnxauthor,maintainer} +% The entries on this lists are specified by the |\cnxauthor| and |\maintainer| +% macros. Which take a KeyVal argument specifying the individual. The |id| key is the +% identifier for the person, the |honorific|, |firstname|, |other|, |surname|, and +% |lineage| keys are used to specify the various name parts, and the |email| key is used +% to specify the e-mail address of the person. +% +% +% \DescribeEnv{keywordlist, keyword} +% The keywords are specified with a list of |keyword| macros, which take the respective +% keyword in their only argument, inside a |keyword| environment. Neither take any +% KeyVal arguments. +% +% +% \DescribeEnv{cnxabstract} +% The abstract of a {\connexions} module is considered to be part of the metadata. It is +% specified using the |cnxabstract| environment. It does not take any arguments. +% +% +% \subsection{Exercises} +% +% \DescribeEnv{cexercise, cproblem, csolution} +% An exercise or problem in {\connexions} is specified by the |cexercise| environment, +% which takes an optional keyval argument with the keys |id| and |name|. It must contain +% a |cproblem| environment for the problem statement and a (possibly) empty set of +% |csolution| environments. Both of these take an optional keyval argument with the key +% |id|. +% +% \subsection{Graphics, etc.} +% +% \DescribeMacro{cfigure} For graphics we will use the |cfigure|\ednote{probably better +% call it {\tt{cgraphics}}} macro, which provides a non-floating environment for +% including graphics into {\cnxml} files. |cfigure| takes three arguments first an +% optional {\cnxml} keys, then the keys of the |graphicx| package in a regular argument +% (leave that empty if you don't have any) and finally a path. So +% \begin{center} +% |\cfigure[id=foo,type=image/jpeg,caption=The first FOO]{width=7cm,height=2cm}{../images/foo}| +% \end{center} +% Would include a graphic from the file at the path |../images/foo|, equip this image with +% 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} +% +% The |cnx| package generates to 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 +% {\textsf{$\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> +\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} +%<*cls> +\RequirePackage{sref} +\RequirePackage{graphicx} +% \end{macrocode} +% +% The next step is to declare (a few) class options that handle the paper size; this is +% useful for printing. +% \begin{macrocode} +\DeclareOption{letterpaper} + {\setlength\paperheight {11in}% + \setlength\paperwidth {8.5in}} +\DeclareOption{a4paper} + {\setlength\paperheight {297mm}% + \setlength\paperwidth {210mm}} +\ExecuteOptions{letterpaper} +\ProcessOptions +% \end{macrocode} +% Finally, we input all the usual size settings. There is no sense to use something else, +% and we initialize the page numbering counter and tell it to output the numbers in arabic +% numerals (otherwise label and reference do not work). +% \begin{macrocode} +\input{size10.clo} +\pagenumbering{roman} +% +% \end{macrocode} +% Now comes the equivalent for {\latexml}: this is something that we will have throughout +% this document. Every part of the {\TeX/\LaTeX} implementation has a {\latexml} +% equivalent. We keep them together to ensure that they do not get out of sync. +% \begin{macrocode} +%<*ltxml> +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +RequirePackage('metakeys'); +% \end{macrocode} +% We set up the necessary namespaces, the first one is the default one for {\cnxml} +% \begin{macrocode} +RegisterNamespace('cnx'=>"http://cnx.rice.edu/cnxml"); +RegisterNamespace('md'=>"http://cnx.rice.edu/mdml/0.4"); +RegisterNamespace('bib'=>"http://bibtexml.sf.net/"); +RegisterNamespace('m'=>"http://www.w3.org/1998/Math/MathML"); +% \end{macrocode} +% For {\latexml} we also have to set up the correct document type information. The first line +% gives the root element. The second gives the public identifier for the CNX DTD, then we +% have its URL, and finally the CNX namespace. +% \begin{macrocode} +DocType("cnx:document", + "-//CNX//DTD CNXML 0.5 plus LaTeXML//EN", + "../dtd/cnxml+ltxml.dtd", + '#default'=>"http://cnx.rice.edu/cnxml", + 'md'=>"http://cnx.rice.edu/mdml/0.4", + 'bib'=>"http://bibtexml.sf.net/", + 'm'=>"http://www.w3.org/1998/Math/MathML", + 'ltx'=>"http://dlmf.nist.gov/LaTeXML"); +% \end{macrocode} +% +% And finally, we need to set up the counters for itemization, since we are defining a +% class file from scratch.\ednote{this will have to change, when Bruce updates to the next +% version (0.6?)} +% +% \begin{macrocode} +NewCounter('@itemizei', 'document', idprefix=>'I'); +NewCounter('@itemizeii', '@itemizei', idprefix=>'I'); +NewCounter('@itemizeiii', '@itemizeii', idprefix=>'I'); +NewCounter('@itemizeiv', '@itemizeiii',idprefix=>'I'); +NewCounter('@itemizev', '@itemizeiv', idprefix=>'I'); +NewCounter('@itemizevi', '@itemizev', idprefix=>'I'); + +NewCounter('enumi', '@itemizei', idprefix=>'i'); +NewCounter('enumii', '@itemizeii', idprefix=>'i'); +NewCounter('enumiii','@itemizeiii', idprefix=>'i'); +NewCounter('enumiv', '@itemizeiv', idprefix=>'i'); +# A couple of more levels, since we use these for ID's! +NewCounter('enumv', '@itemizev', idprefix=>'i'); +NewCounter('enumvi', '@itemizevi', idprefix=>'i'); + +DefMacro('\theenumi', '\arabic{enumi}'); +DefMacro('\theenumii', '\alph{enumii}'); +DefMacro('\theenumiii', '\roman{enumiii}'); +DefMacro('\theenumiv', '\Alph{enumiv}'); + +NewCounter('equation', 'document', idprefix=>'E'); +DefMacro('\theequation', '\arabic{equation}'); +DefMacro('\textwidth','16cm'); +% \end{macrocode} +% +% And another thing that is now needed: +% +% \begin{macrocode} +Let('\thedocument@ID','\@empty'); +% +% \end{macrocode} +% +% \subsection{Document Structure} +% +% Now, we start with the document structure markup. The |cnxmodule| environment does not +% add anything to the {\LaTeX} output, it's attributes only show up in the {\xml}. There +% we have a slight complication: we have to put an |id| attribute on the |document| +% element in {\cnxml}, but we cannot redefine the |document| environment in +% {\LaTeX}. Therefore we specify the information in the |cnxmodule| environment. This +% means however that we have to put in on the |document| element when we are already past +% this. The solution here is that when we parse the |cnxmodule| environement, we store the +% value and put it on the |document| element when we leave the |document| environment +% (thanks for Ioan Sucan for the code). +% +% \begin{environment}{cnxmodule} +% \begin{macrocode} +%<*cls> +\addmetakey{cnxmodule}{name} +\srefaddidkey{cnxmodule}{id} +\newenvironment{cnxmodule}[1][]{\metasetkeys{cnxmodule}{#1}}{} +% +%<*ltxml> +DefKeyVal('cnxmodule','name','Semiverbatim'); +DefKeyVal('cnxmodule','id','Semiverbatim'); +DefEnvironment('{document}','#body', + beforeDigest=> sub { AssignValue(inPreamble=>0); }, + afterDigest=> sub { $_[0]->getGullet->flush; return; }); +DefEnvironment('{cnxmodule} OptionalKeyVals:cnxmodule', + "&KeyVal('#1','name')\n#body\n", + afterDigestBegin => sub { + AssignValue('cnxmodule_id', + KeyVal($_[1]->getArg(1), 'id')->toString, + 'global'); + });#$ +Tag('cnx:document', afterClose => sub { + $_[1]->setAttribute('id', LookupValue('cnxmodule_id')); + }); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{ccontent} +% The |ccontent| environment is only used for transformation. Its optional |id| attribute +% is not taken up in the {\LaTeX} bindings. +% \begin{macrocode} +%<*cls> +\newenvironment{ccontent}{}{} +% +%<*ltxml> +DefEnvironment('{ccontent}',"#body"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{c*section} +% The sectioning environments employ the obvious nested set of counters. +% \begin{macrocode} +%<*cls> +\newcounter{section} +\srefaddidkey{sectioning}{id} +\newenvironment{csection}[2][]% +{\stepcounter{section}\strut\\[1.5ex]\noindent% +{\Large\bfseries\arabic{section}.~{#2}}\\[1.5ex] +\metasetkeys{sectioning}{#1}} +{} +\newcounter{subsection}[section] +\newenvironment{csubsection}[2][] +{\refstepcounter{subsection}\strut\\[1ex]\noindent% +{\large\bfseries{\arabic{section}.\arabic{subsection}.~#2\\[1ex]}}% +\metasetkeys{sectioning}{#1}}% +{} +\newcounter{subsubsection}[subsection] +\newenvironment{csubsubsection}[2][] +{\refstepcounter{subsubsection}\strut\\[.5ex]\noindent +{\bfseries\arabic{section}.\arabic{subsection}.\arabic{subsubsecction}~#2\\[.5ex]}% +\metasetkeys{sectioning}{#1}}{} +% +%<*ltxml> +DefKeyVal('sectioning','id','Semiverbatim'); +DefEnvironment('{csection}OptionalKeyVals:sectioning{}', + "\n" + . "?#2(#2\n)()" + . "#body\n\n"); +DefEnvironment('{csubsection}OptionalKeyVals:sectioning{}', + "\n" + . "?#2(#2\n)()" + . "#body\n\n"); +DefEnvironment('{csubsubsection}OptionalKeyVals:sectioning{}', + "\n" + . "?#2(#2\n)()" + . "#body\n\n"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{cpara} +% For the || element we have to do some work, since we want them to be +% numbered. This handling is adapted from Bruce Miller's |LaTeX.ltxml| +% numbered. +% \begin{macrocode} +%<*cls> +\srefaddidkey{para}{id} +\newenvironment{cpara}[1][]{\metasetkeys{para}{#1}}{\par} +% +%<*ltxml> +DefKeyVal('para','id','Semiverbatim'); +DefEnvironment('{cpara} OptionalKeyVals:para','#body'); +sub number_para { + my($document,$node,$whatsit)=@_; + # Get prefix from first parent with an id. + my(@parents)=$document->findnodes('ancestor::*[@id]',$node); # find 1st id'd parent. + my $prefix= (@parents ? $parents[$#parents]->getAttribute('id')."." : ''); + # Get the previous number within parent; Worried about intervening elements around para's, but... + my(@siblings)=$document->findnodes("preceding-sibling::cnx:para",$node); + my $n=1; + $n = $1+1 if(@siblings && $siblings[$#siblings]->getAttribute('id')=~/(\d+)$/); + $node->setAttribute(id=>$prefix."p$n"); } +Tag('cnx:para',afterOpen=>\&number_para); +DefConstructor('\par',sub { $_[0]->maybeCloseElement('cnx:para'); },alias=>"\\par\n"); +Tag('cnx:para', autoClose=>1, autoOpen=>1); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{cnote} +% \begin{macrocode} +%<*cls> +\srefaddidkey{note} +\addmetakey{note}{type} +\newenvironment{cnote}[1][]% +{\metasetkeys{note}{#1}\par\noindent\strut\hfill\begin{minipage}{10cm}{\bfseries\note@type}:~}% +{\end{minipage}\hfill\strut\par} +% +%<*ltxml> +DefKeyVal('note','id','Semiverbatim'); +DefKeyVal('note','type','Semiverbatim'); +DefEnvironment('{cnote}OptionalKeyVals:note','#body'); +% +% \end{macrocode} +% \end{environment} +% +% \subsection{Mathematics} +% +% \begin{environment}{cequation} +% \begin{macrocode} +%<*cls> +\srefaddidkey{equation}{id} +\newenvironment{cequation}[1][]% +{\metasetkeys{equation}{#1}\begin{displaymath}} +{\end{displaymath}} +% +%<*ltxml> +DefKeyVal('equation','id','Semiverbatim'); +DefEnvironment('{cequation} OptionalKeyVals:equation', + "" + . "" + . "#body" + . "", + mode=>'display_math'); +% +% \end{macrocode} +% \end{environment} +% +% \subsection{Rich Text} +% +% In this section, we redefine some of {\LaTeX} commands that have their counterparts in +% {\cnxml}. +% +% \begin{environment}{quote} +% \begin{macrocode} +%<*cls> +\srefaddidkey{cquote} +\addmetakey{cquote}{type} +\addmetakey{cquote}{src} +\newenvironment{cquote}[1][]{% +\metasetkeys{cquote}{#1}\begin{center}\begin{minipage}{.8\textwidth}}{\end{minipage}\end{center}} +% +%<*ltxml> +DefKeyVal('cquote','id','Semiverbatim'); +DefKeyVal('cquote','type','Semiverbatim'); +DefKeyVal('cquote','src','Semiverbatim'); +DefEnvironment('{cquote} OptionalKeyVals:cquote', + "#body"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{footnote} +% \begin{macrocode} +%<*ltxml> +DefConstructor('\footnote[]{}',"#2"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{emph} +% \begin{macrocode} +%<*ltxml> +DefConstructor('\emph{}',"#1"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{displaymath, eqnarray} +% We redefine the abbreviate display math envionment and the |eqnarray| and |eqnarray*| +% environments to use the {\cnxml} equation tags, everything else stays the same. +% +% \begin{macrocode} +%<*ltxml> +DefConstructor('\[', + "" + . "" + . "" + . "#body" + . "" + . "" + ."", + beforeDigest=> sub{ $_[0]->beginMode('display_math'); }, + captureBody=>1, + properties=> sub { RefStepID('equation') }); +DefConstructor('\]' ,"",beforeDigest=> sub{ $_[0]->endMode('display_math'); }); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{displaymath} +% We redefine the abbreviate display math envionment to use the {\cnxml} equation tags, +% everything else stays the same.\ednote{check {\tt{LaTeX.ltxml}} frequently and try to +% keep in sync, it would be good, if the code in LaTeXML.ltxml could be modularized, +% so that the {\tt{cnx}}/{\tt{ltx}} namespace differences could be relegated to +% config options} +% +% \begin{macrocode} +%<*ltxml> +DefConstructor('\[', + "" + . "" + . "" + . "#body" + . "" + . "" + ."", + beforeDigest=> sub{ $_[0]->beginMode('display_math'); }, + captureBody=>1, + properties=> sub { RefStepID('equation') }); +DefConstructor('\]' ,"",beforeDigest=> sub{ $_[0]->endMode('display_math'); }); + +DefMacro('\eqnarray', '\@@eqnarray\@start@alignment'); +DefMacro('\endeqnarray', '\@finish@alignment\end@eqnarray'); +DefMacro('\csname eqnarray*\endcsname', '\@@eqnarray*\@start@alignment'); +DefMacro('\csname endeqnarray*\endcsname', '\@finish@alignment\end@eqnarray'); +DefConstructor('\@@eqnarray OptionalMatch:* AlignmentBody:\end@eqnarray', + sub { + my($document,$star,$body,%props)=@_; + $document->openElement('cnx:equation',refnum=>$props{refnum},id=>$props{id}); + $document->openElement('ltx:Math',mode=>'display'); + $document->openElement('ltx:XMath'); + constructAlignment($document,$body,attributes=>{name=>'eqnarray'}); + $document->closeElement('ltx:XMath'); + $document->closeElement('ltx:Math'); + $document->closeElement('cnx:equation'); }, + mode=>'display_math', + beforeDigest=>sub { alignmentBindings('rcl'); }, + properties=> sub { ($_[1] ? RefStepID('equation') : RefStepCounter('equation')); }, + afterDigest=>sub { + $_[1]->setProperty(body=>$_[1]->getArg(2));}, # So we get TeX + reversion=>'\begin{eqnarray#1}#2\end{eqnarray#1}'); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{displaymath} +% We redefine the abbreviate display math envionment to use the {\cnxml} equation tags, +% everything else stays the same.\ednote{check {\tt{LaTeX.ltxml}} frequently and try to +% keep in sync, it would be good, if the code in LaTeXML.ltxml could be modularized, +% so that the {\tt{cnx}}/{\tt{ltx}} namespace differences could be relegated to +% config options} +% +% \begin{macrocode} +%<*cls> +\newcommand{\litem}[2][]{\item[#1]\label{#2}} +% +%<*ltxml> +Tag('cnx:item', autoClose=>1); +DefConstructor('\item[]',"?#1(#1)"); +DefConstructor('\litem[]{}',"?#1(#1)"); +DefConstructor('\itemize@item[]', + "?#1(#1)", + properties=>sub{ RefStepItemCounter(); }); +DefConstructor('\enumerate@item[]', + "?#1(#1)", + properties=>sub{ RefStepItemCounter(); }); +DefConstructor('\description@item[]', + "?#1(#1)", + properties=>sub{ RefStepItemCounter(); }); +AssignValue(itemlevel=>0); +DefEnvironment('{itemize}', + "#body", + properties=>sub { beginItemize('itemize'); }); +DefEnvironment('{enumerate}', + "#body", + properties=>sub { beginItemize('enumerate'); }); +DefEnvironment('{description}', + "#body", + properties=>sub { beginItemize('description'); }); +% +% \end{macrocode} +% \end{environment} +% +% The next set of commands and environments are largely presentational, so we just skip +% them. +% +% \begin{macrocode} +%<*ltxml> +DefEnvironment('{center}','#body'); +DefEnvironment('{minipage}{}','#body'); +DefEnvironment('{small}','#body'); +DefEnvironment('{footnotesize}','#body'); +DefEnvironment('{tiny}','#body'); +DefEnvironment('{scriptsize}','#body'); +% +% \end{macrocode} +% +% \begin{macrocode} +%<*ltxml> +DefConstructor('\ref Semiverbatim', "&LookupValue('LABEL@#1')"); +% +% \end{macrocode} +% +% \subsection{Statements} +% +% \begin{environment}{cexample} +% \begin{macrocode} +%<*cls> +\srefaddidkey{example} +\addmetakey{example}{name} +\newenvironment{cexample}[1][]{\metasetkeys{example}{#1} +{\ifx\example@name\@empty\else\noindent\bfseries{\example@name}\fi}} +{} +% +%<*ltxml> +DefKeyVal('example','id','Semiverbatim'); +DefEnvironment('{cexample}OptionalKeyVals:example', + "#body"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{cexercise} +% The |cexercise|, |cproblem| and |csolution| environments are very simple to set up for +% {\LaTeX}. For the {\latexml} side, we simplify matters considerably for the moment by +% restricting the possibilities we have on the {\cnxml} side: We assume that the content +% is just one || element for the || and || +% elements.\ednote{relax this when we have automated the generation of {\tt{cnx:para}} +% elements} +% \begin{macrocode} +%<*cls> +\newcounter{cexercise} +\srefaddidkey{cexercise} +\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][]{\metasetkeys{cproblem}{#1}}{}{} +\srefaddidkey{csolution} +\newenvironment{csolution}[1][]{\metasetkeys{csolution}{#1}}{\par\noindent\bfseries{Solution}}{} +% +%<*ltxml> +DefKeyVal('cexercise','id','Semiverbatim'); +DefKeyVal('cexercise','name','Semiverbatim'); +DefEnvironment('{cexercise}OptionalKeyVals:exercise', + "" + . "#body" + . ""); +DefKeyVal('cproblem','id','Semiverbatim'); +DefKeyVal('cproblem','name','Semiverbatim'); +DefEnvironment('{cproblem}OptionalKeyVals:cproblem', + "" + . "?&defined(&KeyVal(#1,'name'))(&KeyVal(#1,'name')\n)()" + . "#body" + . ""); +DefKeyVal('csolution','id','Semiverbatim'); +DefKeyVal('csolution','name','Semiverbatim'); +DefEnvironment('{csolution}OptionalKeyVals:cproblem', + "" + . "?&defined(&KeyVal(#1,'name'))(&KeyVal(#1,'name')\n)()" + . "#body" + . ""); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{crule} +% \begin{macrocode} +%<*cls> +\srefaddidkey{rule} +\addmetakey{rule}{name} +\addmetakey{rule}{type} +\newenvironment{crule}[1][]{\metasetkeys{rule}{#1}% +{\noindent\bfseries{\rule@type:}\ifx\rule@name\@empty\else~(\rule@name)\fi}}% +{} +% +%<*ltxml> +DefKeyVal('rule','id','Semiverbatim'); +DefKeyVal('rule','name','Semiverbatim'); +DefKeyVal('rule','type','Semiverbatim'); +DefEnvironment('{crule}OptionalKeyVals:rule', + "\n" + . "?&defined(&KeyVal(#1,'name'))(&KeyVal(#1,'name')\n)()" + . "\n#body\n" + . "\n"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{statement} +% \begin{macrocode} +%<*cls> +\srefaddidkey{statement} +\newenvironment{statement}[1][]{\metasetkeys{statement}{#1}}{} +% +%<*ltxml> +DefKeyVal('statement','id','Semiverbatim'); +DefEnvironment('{statement} OptionalKeyVals:statement','#body'); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{proof} +% \begin{macrocode} +%<*cls> +\srefaddidkey{proof} +\newenvironment{proof}[1][]{\metasetkeys{proof}{#1}}{} +% +%<*ltxml> +DefKeyVal('proof','id','Semiverbatim'); +DefEnvironment('{proof}OptionalKeyVals:proof','#body'); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{definition} +% \begin{macrocode} +%<*cls> +\srefaddidkey{definition} +\addmetakey{definition}{term} +\addmetakey{definition}{seealso} +\newenvironment{definition}[1][]{\metasetkeys{definition}{#1}{\noindent\bfseries{Definition:}}}{} +% +%<*ltxml> +DefKeyVal('definition','id','Semiverbatim'); +DefKeyVal('definition','term','Semiverbatim'); +DefKeyVal('definition','seealso','Semiverbatim'); +DefEnvironment('{definition}OptionalKeyVals:definition', + "\n" + . "?&defined(&KeyVal(#1,'term'))(&KeyVal(#1,'term')\n)()" + . "\n#body\n" + . "?&defined(&KeyVal(#1,'seealso'))(&KeyVal(#1,'term')\n)()" + . "\n"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{cmeaning} +% \begin{macrocode} +%<*cls> +\srefaddidkey{meaning} +\newenvironment{cmeaning}[1][]{\metasetkeys{meaning}{#1}}{} +% +%<*ltxml> +DefKeyVal('meaning','id','Semiverbatim'); +DefEnvironment('{cmeaning}OptionalKeyVals:meaning','#body'); +% +% \end{macrocode} +% \end{environment} +% +% \subsection{Conexxions} +% +% \begin{macro}{cnxn} +% \begin{macrocode} +%<*cls> +\addmetakey{cnxn}{document} +\addmetakey{cnxn}{target} +\addmetakey{cnxn}{strength} +\newcommand{\cnxn}[2][]% keys, link text +{\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> +DefKeyVal('cnxn','document','Semiverbatim'); +DefKeyVal('cnxn','target','Semiverbatim'); +DefKeyVal('cnxn','strength','Semiverbatim'); +DefConstructor('\cnxn OptionalKeyVals:cnxn {}','#1'); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{link} +% \begin{macrocode} +%<*cls> +\addmetakey{link}{src} +\newcommand{\link}[2][]{\metasetkeys{link}{#1}\underline{#2}} +% +%<*ltxml> +DefKeyVal('link','src','Semiverbatim'); +DefConstructor('\link OptionalKeyVals:link {}','#2'); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{cfigure} +% The |cfigure| only gives us one of the possible instances of the |

| +% element\ednote{extend that}.\ednote{do more about required and optional keys in +% arguments.} In {\LaTeX}, we just pipe the size information through to +% |includegraphics|, in {\latexml}, we construct the {\cnxml} structure\ednote{what do +% we do with the graphicx information about size,... CSS?} +% \begin{macrocode} +%<*cls> +\srefaddidkey{cfigure} +\addmetakey{cfigure}{type} +\addmetakey{cfigure}{caption} +\newcounter{figure} +\newcommand{\cfigure}[3][]{% cnx_keys, graphicx_keys, path +\begin{center}% +\includegraphics[#2]{#3}% +\metasetkeys{cfigure}{#1}\sref@target% +\ifx\cfigure@caption\@empty\else +\par\noindent Figure\refstepcounter{figure} {\arabic{figure}}: \cfigure@caption% +\protected@edef\@currentlabel{\arabic{figure}}% +\sref@label@id{Figure \thefigure}\fi +\end{center}} +% +%<*ltxml> +DefKeyVal('cfigure','id','Semiverbatim'); +DefKeyVal('cfigure','name','Semiverbatim'); +DefKeyVal('cfigure','type','Semiverbatim'); +DefKeyVal('cfigure','caption','Semiverbatim'); +DefConstructor('\cfigure OptionalKeyVals:cfigure Semiverbatim Semiverbatim', + "" + . "?&defined(&KeyVal(#1,'name'))(&KeyVal(#1,'name')\n)()" + . "" + . "?&defined(&KeyVal(#1,'caption'))(&KeyVal(#1,'caption')\n)()" + . ""); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{ccite} +% \begin{macrocode} +%<*cls> +\addmetakey{ccite}{src} +\newcommand{\ccite}[2][]{\metasetkeys{ccite}{#1}\emph{#2}} +% +%<*ltxml> +DefKeyVal('ccite','src','Semiverbatim'); +DefConstructor('\ccite OptionalKeyVals:ccite {}','#2'); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{term} +% \begin{macrocode} +%<*cls> +\newcommand{\term}[1]{{\bfseries\underline{#1}}} +% +%<*ltxml> +DefConstructor('\term[]{}',"#2"); +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Metadata} +% +% \begin{environment}{metadata} +% \begin{macrocode} +%<*cls> +\addmetakey{metadata}{version} +\addmetakey{metadata}{created} +\addmetakey{metadata}{revised} +\newsavebox{\metadatabox} +\newenvironment{metadata}[1][]% +{\noindent\hfill\begin{lrbox}{\metadatabox} +\begin{minipage}{.8\textwidth}% +{\Large\bfseries CNX Module: \cnx@name\hfill\strut}\\[2ex]}% +{\end{minipage}\end{lrbox}\fbox{\usebox\metadatabox}\hfill} +% \newenvironment{metadata}[1][]% +% {\noindent\strut\hfill\begin{lrbox}{\metadatabox}\begin{minipage}{10cm}% +% {\strut\hfill\Large\bfseries CNX Module: \cnx@name\hfill\strut}\\[2ex]}% +% {\end{minipage}\end{lrbox}\fbox{\usebox\metadatabox}\hfill\strut\\[3ex]} +% +%<*ltxml> +DefKeyVal('metadata','version','Semiverbatim'); +DefKeyVal('metadata','created','Semiverbatim'); +DefKeyVal('metadata','revised','Semiverbatim'); +DefEnvironment('{metadata}OptionalKeyVals:metadata', + "\n" + . "&KeyVal('#1','version')\n" + . "&KeyVal('#1','created')\n" + . "&KeyVal('#1','revised')\n" + . "#body\n" + . ""); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{authorlist} +% \begin{macrocode} +%<*cls> +\newenvironment{authorlist}{{\bfseries{Authors}:~}}{\\[1ex]} +% +%<*ltxml> +DefEnvironment('{authorlist}',"#body"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{maintainerlist} +% \begin{macrocode} +%<*cls> +\newenvironment{maintainerlist}{{\bfseries{Maintainers}:~}}{\\[1ex]} +% +%<*ltxml> +DefEnvironment('{maintainerlist}',"#body"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{cnxauthor} +% \begin{macrocode} +%<*cls> +\srefaddidkey{auth} +\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'); +DefKeyVal('auth','firstname','Semiverbatim'); +DefKeyVal('auth','surname','Semiverbatim'); +DefKeyVal('auth','email','Semiverbatim'); +DefConstructor('\cnxauthor OptionalKeyVals:auth', + "\n" + . "?&defined(&KeyVal(#1,'honorific'))(&KeyVal('#1','honorific')\n)()" + . "?&defined(&KeyVal(#1,'firstname'))(&KeyVal('#1','firstname')\n)()" + . "?&defined(&KeyVal(#1,'other'))(&KeyVal('#1','other')\n)()" + . "?&defined(&KeyVal(#1,'surname'))(&KeyVal('#1','surname')\n)()" + . "?&defined(&KeyVal(#1,'lineage'))(&KeyVal('#1','lineage')\n)()" + . "?&defined(&KeyVal(#1,'email'))(&KeyVal('#1','email')\n)()" + . "\n"); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{maintainer} +% \begin{macrocode} +%<*cls> +\newcommand{\maintainer}[1][]{\metasetkeys{auth}{#1}\auth@first~\auth@sur,} +% +%<*ltxml> +DefConstructor('\maintainer OptionalKeyVals:auth', + "\n" + . "?&defined(&KeyVal(#1,'honorific'))(&KeyVal('#1','honorific')\n)()" + . "?&defined(&KeyVal(#1,'firstname'))(&KeyVal('#1','firstname')\n)()" + . "?&defined(&KeyVal(#1,'other'))(&KeyVal('#1','other')\n)()" + . "?&defined(&KeyVal(#1,'surname'))(&KeyVal('#1','surname')\n)()" + . "?&defined(&KeyVal(#1,'lineage'))(&KeyVal('#1','lineage')\n)()" + . "?&defined(&KeyVal(#1,'email'))(&KeyVal('#1','email')\n)()" + . "\n"); +% +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{keywordlist} +% \begin{macrocode} +%<*cls> +\newenvironment{keywordlist}{\bfseries{Keywords}:~}{\\[1ex]} +% +%<*ltxml> +DefEnvironment('{keywordlist}',"\n#body\n"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{keyword} +% \begin{macrocode} +%<*cls> +\newcommand{\keyword}[1]{#1,} +% +%<*ltxml> +DefConstructor('\keyword {}',"#1"); +% +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{cnxabstract} +% \begin{macrocode} +%<*cls> +\newenvironment{cnxabstract}% +{\par\noindent\strut\hfill\begin{minipage}{10cm}{\bfseries{Abstract}:~}}% +{\end{minipage}\hfill} +% +%<*ltxml> +DefEnvironment('{cnxabstract} OptionalKeyVals:cnxabstract', + "\n#body\n\n"); +1; +% +% \end{macrocode} +% \end{environment} +% \Finale +\endinput + +% \iffalse +%%% Local Variables: +%%% mode: doctex +%%% TeX-master: t +%%% End: +% \fi + +% LocalWords: iffalse cnx cnx.dtx cnx.cls scsys sc sc scshape cnxml ttfamily +% LocalWords: cnxlatex mathml latexml hbox fileversion maketitle newpage foo +% LocalWords: tableofcontents newpage ednote cmathml.sty keyn valn keyn exfig +% LocalWords: DescribeEnv cnxmodule ccontent csection csubsection cpara cnote +% LocalWords: csubsubsection cmathml cequation cexample crule cmeaning tt tt +% 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 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 +% 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 +% LocalWords: endcsname refnum refnum rcl newcommand itemlevel +% LocalWords: footnotesize scriptsize ifx Conexxions makefntext parindent hss +% LocalWords: makefnmark includegraphics currentlabel thefigure ccite lrbox +% LocalWords: newsavebox metadatabox fbox usebox auth doctex diff --git a/Master/texmf-dist/source/latex/stex/cnx/cnx.ins b/Master/texmf-dist/source/latex/stex/cnx/cnx.ins new file mode 100644 index 00000000000..37b12071964 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/cnx/cnx.ins @@ -0,0 +1,35 @@ +%% +%% This file generates files required to use the ed package. +%% At your command prompt write +%% +%% latex cnx.ins +%% +%% Copyright(c) 2005 Michael Kohlhase +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{cnx.cls}{\from{cnx.dtx}{cls}} +% generated the LaTeXML bindings +\nopreamble\nopostamble + \file{cnx.cls.ltxml}{\from{cnx.dtx}{ltxml}}} + +\Msg{*} +\Msg{* You probably need to move the generated style files into a directory} +\Msg{* searched by TeX and LaTeXML respectively.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/stex/dcm/dcm.dtx b/Master/texmf-dist/source/latex/stex/dcm/dcm.dtx new file mode 100644 index 00000000000..279530cd17c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/dcm/dcm.dtx @@ -0,0 +1,696 @@ +% \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: 1999 $; last modified by $Author: kohlhase $ +% $Date: 2012-01-28 08:32:11 +0100 (Sat, 28 Jan 2012) $ +% Copyright (c) 2007-2011 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{dcm}[2012/01/28 v0.3 Dublin Core Metadata] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{dcm,modules,stex-logo,url,array,float} +\usepackage[show]{ed} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} +\usepackage{../ctansvn} +\usepackage{hyperref} +\importmodule[dcmi]{dcmi} +\usepackage[eso-foot,today]{svninfo} +\svnInfo $Id: dcm.dtx 1999 2012-01-28 07:32:11Z kohlhase $ +\svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/dcm/dcm.dtx $ +\makeindex +\floatstyle{boxed} +\newfloat{exfig}{thp}{lop} +\floatname{exfig}{Example} +\WAperson[id=jdoe,affiliation=dfki,department=skss, + url=http://dfki.de/jdoe] + {John Doe} +\WAperson[id=miko,affiliation=jacu,department=case, + url=http://kwarc.info/kohlhase] + {Michael Kohlhase} +\WAinstitution[id=case,acronym=CASE,shortname=Center for Adv. Sys. Engineering, + url=http://jacobs-university.de/ses/case,partof=jacu] + {Center for Advanced Systems Engineering} +\WAinstitution[id=jacu,url=http://jacobs-university.de] + {Jacobs University Bremen} +\WAinstitution[id=skss,url=http://dfki.de/sks,partof=dfki,shortname=Safe\&Secure Cognitive +Systems,acronym=SKS] + {Safe and Secure Cognitive Systems} +\WAinstitution[id=dfki,url=http://dfki.de,shortname=DFKI,acronym=DFKI] + {German Research Center for Artificial Intelligence} +\def\tracissue#1{\cite{sTeX:online}, \hyperlink{http://trac.kwarc.info/sTeX/ticket/#1}{issue #1}} +\begin{document}\DocInput{dcm.dtx}\end{document} +% +% \fi +% +%\CheckSum{337} +% +% \changes{v0.1}{2007/01/02}{First Hack for OMDoc spec} +% \changes{v0.2}{2008/06/17}{First Version with Documentation} +% \changes{v0.2}{2008/07/02}{Renamed to dcm} +% \changes{v0.3}{2009/09/21}{much more documentation of the user interface} +% \changes{v0.3}{2009/09/21}{Adding sref support and made generated headings configurable} +% \changes{v0.3}{2010/01/11}{Eliminating stub author index that never worked anyways} +% \changes{v0.4}{2011/11/05}{moving DCMperson and friends to the \texttt{workaddress} package} +% +% \GetFileInfo{dcm.sty} +% +% \MakeShortVerb{\|} +% \def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} +% \def\latexml{\scsys{LaTeXML}} +% +% \begin{DCmetadata}[maketitle] +% \DCMtitle{{\texttt{dcm.sty}}: An Infrastructure for marking up Dublin Core Metadata in {\LaTeX} +% documents\thanks{Version {\fileversion} (last revised {\filedate})}} +% \DCMcreators{miko,jdoe} +% \DCMabstract{The |dcm| package allows mark up Dublin +% Core Metadata in {\LaTeX} documents that can be harvested by automated tools or +% exported to PDF, while at the same time generating conventional title information.} +% \end{DCmetadata} +% +% \setcounter{tocdepth}{2}\tableofcontents\newpage +% +%\section[id=intro,creator=miko]{Introduction} +% +% The |dcm| package allows mark up Dublin Core Metadata~\cite{DCMI:dmt03} in {\LaTeX} +% documents so that it can be harvested by automated tools or exported to PDF\ednote{This +% still needs to be implemented, see \texttt{http://www.wlug.org.nz/PdfLatexNotes} for +% details}. This package allows to attribute authorship to arbitrary text +% fragments.\ednote{continue} +% +% \section[id=user,creator={miko,jdoe}]{The User Interface} +% +% \subsection[id=user.options]{Package Options} +% +% The |dcm| package takes a single option: \DescribeMacro{showmeta}|showmeta|. If this is +% set, then the metadata keys are shown (see~\cite{Kohlhase:metakeys:ctan} for details and +% customization options). +% +% \subsection[id=user.dcm.mdblock]{The DC Metadata Block} +% +% \DescribeEnv{DCmetadata} The |dcm| provides the environment |DCmetadata| for Dublin Core +% Metadata Blocks. |DCmetadata| defines local macros for the specifying the relevant +% Dublin Core metadata fields and takes an optional argument that specifies the +% presentation of the metadata block, see Figure~\ref{fig:dcmblock} for an example which +% would generate the title block for the |dcm| package. Let us now come to the macros themselves +% +% \DescribeMacro{\DCMcreators}\DescribeMacro{\DCMcontributors} The |\DCMcreators| and +% |\DCMcontributors| macros are used to specify the authors and contributors to a text +% fragments. These macros take one argument, the authorship of a document specified in +% terms of |id|s of persons specified via |\WAperson| before. They can occur multiply in +% a metadata block. +% +% \DescribeMacro{\DCMtitle} The |\DCMtitle| macro takes one argument, the +% +% \DescribeMacro{\DCMshorttitle} The |\DCMshorttitle| macro takes one argument, the +% +% \DescribeMacro{\DCMsubject} The |\DCMsubject| macro takes one argument, the +% +% \DescribeMacro{\DCMdescription} The |\DCMdescription| macro takes one argument, the +% +% \DescribeMacro{\DCMpublisher} The |\DCMpublisher| macro takes one argument, the +% +% \DescribeMacro{\DCMdate} The |\DCMdate| macro takes one argument, the +% +% \DescribeMacro{\DCMtype} The |\DCMtype| macro takes one argument, the +% +% \DescribeMacro{\DCMidentifier} The |\DCMidentifier| macro takes two arguments, the first one +% is the identification system, and the second one the identifier string itself. +% +% \DescribeMacro{\DCMsource} The |\DCMsource| macro takes one argument, the +% +% \DescribeMacro{\DCMlanguage} The |\DCMlanguage| macro takes one argument, the +% +% \DescribeMacro{\DCMrelation} The |\DCMrelation| macro takes one argument, the +% +% \DescribeMacro{\DCMrights} The |\DCMrights| macro takes one argument, the +% +% \DescribeMacro{\DCMlicense} The |\DCMlicense| macro takes one argument, the +% +% \DescribeMacro{\DCMabstract} The |\DCMabstract| macro takes one argument, the +% +% \DescribeMacro{\DCMlicensenotice} The |\DCMlicensenotice| macro takes one argument, the +% +% \DescribeMacro{\DCMcopyrightnotice} The |\DCMcopyrightnotice| macro takes one argument, the +% +% \DescribeMacro{\DCMcclicense} The |\DCMcclicense| macro +% +% \DescribeMacro{\attribution} +% +% \DescribeMacro{\noncommercial} +% +% \DescribeMacro{\sharealike} +% +% \DescribeMacro{\noderivativeworks} +% +% \begin{exfig}[ht] +% \begin{verbatim} +% \begin{DCmetadata}[maketitle] +% \DCMtitle{An Infrastructure for marking up Dublin Core Metadata in +% {\LaTeX} documents\thanks{Version {\fileversion} +% (last revised {\filedate})}} +% \DCMcreators{miko,jdoe} +% \DCMdate{\today} +% \DCMcopyrightnotice{2008}{Michael Kohlhase} +% \DCMlicensenotice{Copyright (c) 2008 Michael Kohlhase, all rights +% reserved. This file is released under the LaTeX Project Public +% License (LPPL)} +% \DCMabstract{The {\texttt{dcm}} packge allows mark up Dublin +% Core Metadata in {\LaTeX} documents that can be harvested by +% automated tools or exported to PDF, while at the same time +% generating conventional title information.} +% \end{DCmetadata} +% \end{verbatim} +% \caption{The DC Metadata block for the {\texttt{dcm}} package documentation} +% \label{fig:dcmblock} +% \end{exfig} +% +% \subsection[creator=jdoe,id=user.blockstyles]{DCM Metadata Block Styles} +% +% The |DCmetadata| environment takes an optional argument that specifies the style the +% metadata block is rendered in. The |dcm| package supplies two styles: +% \DescribeMacro{maketitle}|maketitle| and \DescribeMacro{titlepage}|titlepage|. The +% former uses the |\maketitle| macro from the calling class to assemble a title, whereas +% the latter builds a title page from scratch. The title block of this documentation has +% been created by the |maketitle| style. +% +% To add a further metadata block style \meta{sty}, we simply have to supply a +% \DescribeMacro{\dcm@*@block}|\dcm@|\meta{sty}|@block| macro that expands to the intended +% presentation. This macro does not take any arguments, but can use the internal token +% registers defined by the |DCmetadata| environment. Generally, for any of the metadata +% commands |\DCM|\meta{md} defined in {\sref{user.dcm.mdblock}} there is a token register +% |\dcm@|\meta{md} that contains the value specified in the key. +% +% \subsection[id=user.conig]{Configuration} +% +% The |dcm| package provides a set of macros that customize (e.g. for multiple languages) +% the generated +% content. +% \DescribeMacro{\dcm@abstract@heading} +% \DescribeMacro{\dcm@creators@heading} +% \DescribeMacro{\dcm@contributors@connector} +% \DescribeMacro{\dcm@chapter@heading} +% \DescribeMacro{\dcm@section@heading} +% \DescribeMacro{\dcm@subsection@heading} +% \DescribeMacro{\dcm@subsubsection@heading} +% \begin{center}\makeatletter +% \begin{tabular}{|l|l|}\hline +% Macro & Default\\\hline\hline +% |\dcm@abstract@heading| & \dcm@abstract@heading \\\hline +% |\dcm@creators@heading| & \dcm@creators@heading \\\hline +% |\dcm@contributors@connector| & \dcm@contributors@connector \\\hline\hline +% |\dcm@chapter@heading| & \dcm@chapter@heading \\\hline +% |\dcm@section@heading| & \dcm@section@heading \\\hline +% |\dcm@subsection@heading| & \dcm@subsection@heading \\\hline +% |\dcm@subsubsection@heading| & \dcm@subsubsection@heading \\\hline +% \end{tabular} +% \end{center} +% +% +% \section{Limitations}\label{sec:limitations} +% +% In this section we document known limitations. If you want to help alleviate them, +% please feel free to contact the package author. Some of them are currently discussed in +% the \sTeX TRAC~\cite{sTeX:online}. +% \begin{compactenum} +% \item none reported yet +% \end{compactenum} +% +% \StopEventually{\printbibliography} +% +% \section[creator=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. +% +% \subsection[id=impl.options]{Package Options} +% The first step is to declare (a few) package options that handle whether certain +% information is printed or not. They all come with their own conditionals that are set by +% the options. +% +% \begin{macrocode} +%<*package> +\DeclareOption{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} +%<*package> +\RequirePackage{workaddress} +\RequirePackage[sectioning]{rdfmeta} +% +%<*ltxml> +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Global; +use LaTeXML::Package; +RequirePackage('rdfmeta'); +RequirePackage('workaddress'); +% +% \end{macrocode} +% +% Furthermore, we need a couple of helper functions for the +% +% \begin{macrocode} +%<*ltxml> +sub FishOutMetadata { + my ($document,$keyvals)=@_; + foreach my $role(qw(creators contributors)) { + my $idlist_string=getKeyValue_noDelim($keyvals,$role); + my @ids = split(/,\s*/, $idlist_string); + foreach my $id(@ids) { + my $name = LookupValue('DCM_'.$id.'_name'); + if ($name) { + my $prop_role = $role; + chop $prop_role if $prop_role; + $document->insertElement("dc:$prop_role",$name) if $role; + } else {print STDERR "Warning: no $role with 'id' $id !\n";} + } + } + return;}#$ +% +% \end{macrocode} +% +% \subsection{The DC Metadata Block} +% +% Then we make an environment for defining the metadata. Note that since we have defined +% the |omdoc:metadata| element to auto-open and auto-close, we do not have to (and should +% not for that matter) supply it in the |DCmetadata| element. +% +% \begin{environment}{DCmetadata} +% \begin{macrocode} +%<*package> +\newenvironment{DCmetadata}[1][]% +{\def\@style{#1}}% to set the way things are presented. +{\@ifundefined{dcm@\@style @block}% +{\message{style {\@style} not defined}}% +{\csname dcm@\@style @block\endcsname}} +% +%<*ltxml> +DefEnvironment('{DCmetadata}[]', "#body"); +% +% \end{macrocode} +% \end{environment} +% +% Here come the constructors, most of them are relatively straightforward +% +% \begin{macro}{\DCMcreators} +% the |\DCMcreators| macro checks whether all ids are defined. +% \begin{macrocode} +%<*package> +\def\DCMcreators#1{\@for\@I:=#1\do{\wa@ref@test{person}\@I{id}} +\gdef\dcm@creators{#1}} +% +%<*ltxml> +DefConstructor('\DCMcreators{}',sub{ + my ($document,$args,%properties) = @_; + my $keyval = LaTeXML::KeyVals->new('wa@person',T_BEGIN,T_END,('creators'=>$args)); + FishOutMetadata($document,$keyval); + return;}); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMcontributors} +% the |\DCMcontributors| macro also checks whether all ids are defined. +% \begin{macrocode} +%<*package> +\def\DCMcontributors#1{\@for\@I:=#1\do{\wa@ref@test{person}\@I{id}}% +\def\dcm@contributors{#1}} +% +%<*ltxml> +DefConstructor('\DCMcontributors{}',sub{ + my ($document,$args,%properties) = @_; + my $keyval = LaTeXML::KeyVals->new('wa@person',T_BEGIN,T_END,('contributors'=>$args)); + FishOutMetadata($document,$keyval); + return;}); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMtitle} +% \begin{macrocode} +%<*package> +\def\DCMtitle#1{\def\dcm@title{#1}\providecommand{\dcm@shorttitle}{#1}} +% +%<*ltxml> +DefConstructor('\DCMtitle{}',"#1"); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMsubtitle} +% \begin{macrocode} +%<*package> +\def\dcm@subtitle{} +\def\DCMsubtitle#1{\def\dcm@subtitle{#1}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMshorttitle} +% \begin{macrocode} +%<*package> +\def\dcm@shorttitle{} +\def\DCMshorttitle#1{\def\dcm@shorttitle{#1}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMsubject} +% \begin{macrocode} +%<*package> +\def\DCMsubject#1{\def\dcm@subject{#1}} +% +%<*ltxml> +DefConstructor('\DCMsubject{}',"#1"); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMdescription} +% \begin{macrocode} +%<*package> +\long\def\DCMdescription#1{\long\def\dcm@description{#1}} +% +%<*ltxml> +DefConstructor('\DCMdescription{}',"#1"); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMpublisher} +% \begin{macrocode} +%<*package> +\def\DCMpublisher#1{\def\dcm@publisher{#1}} +% +%<*ltxml> +DefConstructor('\DCMpublisher{}',"#1"); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMdate} +% the |\DCMdate| uses |\today| as a default\ednote{@DEYAN: do that in latexml} +% \begin{macrocode} +%<*package> +\def\dcm@date{\today} +\def\DCMdate#1{\def\dcm@date{#1}} +% +%<*ltxml> +DefConstructor('\DCMdate{}',"#1"); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMtype} +% \begin{macrocode} +%<*package> +\def\DCMtype#1{\def\dcm@type{#1}} +% +%<*ltxml> +DefConstructor('\DCMtype{}',"#1"); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMidentifier} +% \begin{macrocode} +%<*package> +\def\DCMidentifier#1#2{\def\dcm@scheme{#1}\def\dcm@identifier{#2}} +% +%<*ltxml> +DefConstructor('\DCMidentifier{}{}',"#2"); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMsource} +% \begin{macrocode} +%<*package> +\def\DCMsource#1{\def\dcm@source{#1}} +% +%<*ltxml> +DefConstructor('\DCMsource{}',"#1"); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMlanguage} +% \begin{macrocode} +%<*package> +\def\DCMlanguage#1{\def\dcm@language{#1}} +% +%<*ltxml> +DefConstructor('\DCMlanguage{}',"#1"); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMrelation} +% \begin{macrocode} +%<*package> +\def\DCMrelation#1{\def\dcm@relation{#1}} +% +%<*ltxml> +DefConstructor('\DCMrelation{}',"#1"); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMrights} +% \begin{macrocode} +%<*package> +\def\DCMrights#1{\long\def\dcm@rights{#1}} +% +%<*ltxml> +DefConstructor('\DCMrights{}',"#1"); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMlicense} +% \begin{macrocode} +%<*package> +\def\DCMlicense#1{\def\dcm@license{#1}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMlicensenotice} +% here we have a default +% \begin{macrocode} +%<*package> +\def\dcm@license{All rights reserved} +\def\DCMlicensenotice#1{\long\def\dcm@license{\\[1ex]License: #1}} +% +%<*ltxml> +DefMacro('\DCMlicensenotice{}','\DCMrights{#1}'); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMcopyrightnotice} +% \begin{macrocode} +%<*package> +\def\DCMcopyrightnotice#1#2{\DCMrights{Copyright {\copyright} #1: #2}} +% +%<*ltxml> +DefMacro('\DCMcopyrightnotice{}{}','\DCMrights{Copyright {\copyright} #1: #2}'); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\cclicense} +% \begin{macrocode} +%<*package> +\def\cclicense#1{\def\attribution{\def\dcm@by{yes}} + \def\noncommercial{\def\dcm@nc{yes}} + \def\sharealike{\defdcm@sharealike{yes}} + \def\noderivativeworks{\def\dcm@derivatives{no}}} +% +%<*ltxml> +DefConstructor('\cclicense{}',"#1"); +DefConstructor('\attribution',""); +DefConstructor('\noncommercial',""); +DefConstructor('\sharealike',""); +DefConstructor('\noderivativeworks',""); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\DCMabstract} +% \begin{macrocode} +%<*package> +\long\def\DCMabstract#1{\long\def\dcm@abstract{#1}} +% +%<*ltxml> +DefConstructor('\DCMabstract{}',"#1"); +% +% \end{macrocode} +% \end{macro} +% +% \subsection[creator=jdoe,id=impl.blockstyles]{DCM Block Styles} +% +% We now define various commonly used styles. +% +% \begin{macro}{\dcm@titlepage@block} +% This style builds up a title page from scratch +% \begin{macrocode} +%<*package> +\def\dcm@titlepage@block{\begin{titlepage} + \null\vfil\vskip 60\p@ + \begin{center} + \ifx\dcm@title\@empty + \PackageWarning{dcm}{No title specified}{\LARGE Add title here\par} + \else\LARGE \dcm@title \par\fi + \ifx\dcm@subtitle\@empty + \vskip 3em\Large \dcm@subtitle \par\vskip 3em + \else\large\lineskip .75em\WAauthorblock\dcm@creators\vskip 1.5em\fi + \ifx\dcm@date\@empty + \PackageWarning{dcm}{No date specified}{\large\today\par} + \else{\large\dcm@date\par}\vskip 2em\fi + \end{center}\vskip2em + \ifx\dcm@abstract\@empty + \PackageWarning{dcm}{No Abstract specified}\else + \begin{quote}\textbf\dcm@abstract@heading:\dcm@abstract\end{quote}\fi + \vskip 2em\par\vfil\noindent + {\small\noindent\dcm@rights\dcm@license} + \end{titlepage}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\dcm@maketitle@block} +% This style makes use of the title facility of the document class. +% \begin{macrocode} +%<*package> +\def\dcm@maketitle@block{\def\@title{\dcm@title\ifx\dcm@subtitle\empty\else\newline\dcm@subtitle\fi}% +\def\@author{\WAauthorblock\dcm@creators}% +\def\@date{\dcm@date}\maketitle} +% +% \end{macrocode} +% \end{macro} +% +% We have to make sure that the DCM metadata commands have IDs, so that we doc not get +% duplicates. +% +% \begin{macrocode} +%<*ltxml> +Tag('dc:description',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:date',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:creator',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:contributor',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:title',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:subject',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:publisher',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:type',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:identifier',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:language',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:rights',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +% +% \end{macrocode} +% +% \subsection{Dealing with ISO Dates} +% +% The first step is to build a macro for making ISO dates.\ednote{make better ltxml} +% +% \begin{macrocode} +%RawTeX(' +%<*package|ltxml> +\def\ISOtimestamp{\count1=\time\divide\count1 by 60 % hours +\count2=\count1\multiply\count2 by 60% minutes in \count1 hours +\count3=\time\advance\count3 by -\count2 % minutes +\the\year -\ifnum\month>9\else0\fi\the\month-\ifnum\day>9\else0\fi\the\day +T\ifnum\count1>9\else0\fi\the\count1:\ifnum\count3>9\else0\fi\the\count3:00Z} +% +%'); +% \end{macrocode} +% +%\subsection{Configuration} +% +% \begin{macrocode} +%<*package> +\def\dcm@abstract@heading{Abstract} +\def\dcm@creators@heading{Author(s)} +\def\dcm@contributors@connector{with contributions from} +\def\dcm@chapter@heading{Chapter} +\def\dcm@section@heading{Section} +\def\dcm@subsection@heading{Subsection} +\def\dcm@subsubsection@heading{Subsubsection} +\def\dcm@paragraph@heading{Paragraph} +% +% \end{macrocode} +% +% \subsection[id=sec:impl:ids]{Providing IDs for {\omdoc} Elements} +% +% To provide default identifiers, we tag all {\omdoc} elements that allow |xml:id| +% attributes by executing the |numberIt| procedure below. +% +% \begin{macrocode} +%<*ltxml> +Tag('dc:title',afterOpen=>\&numberIt,afterClose=>\&locateIt); +% +% \end{macrocode} +% +%\subsection{Finale} +% +% 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 LaTeX dcm dtx keyval sref CPERL url qw +%%% Local Variables: +%%% mode: doctex +%%% TeX-master: t +%%% End: +% \fi + +% LocalWords: RequirePackage birthdate personaltitle academictitle workaddress +% LocalWords: privaddress worktel privtel workfax privfax worktelfax noDelim +% LocalWords: privtelfax getKeyValue valuelist ToString getValue affill STDERR +% LocalWords: ExportMetadata AssignValue DCMperson DefConstructor afterDigest +% LocalWords: getArg setValue FishOutMetadata keyvals foreach idlist tabline +% LocalWords: LookupValue insertElement atabline bitabline shorttitle nc args +% LocalWords: sharealike noderivativeworks DefMacro authorblock subsubsection +% LocalWords: contribs OptionalKeyVals omgroup omdoc srcref xml RawTeX partof +% LocalWords: openElement iffalse kohlhase Thu scsys sc sc latexml DCmetadata +% LocalWords: maketitle DCMtitle texttt fileversion DCMcreators miko jdoe impl +% LocalWords: DCMabstract setcounter tocdepth tableofcontents newpage dmt03 +% LocalWords: DCMsection ednote DCMsubsection exfig hline dcmblock Patashnik +% LocalWords: DescribeEnv DCMcontributors DCMshorttitle DCMshorttitle DCMdate +% LocalWords: DCMsubject DCMsubject DCMdescription DCMdescription DCMpublisher +% LocalWords: DCMpublisher DCMdate DCMtype DCMtype DCMidentifier DCMidentifier +% LocalWords: DCMsource DCMsource DCMlanguage DCMlanguage DCMrelation ctancite +% LocalWords: DCMrelation DCMrights DCMrights DCMlicense DCMlicense titlepage +% LocalWords: DCMlicensenotice DCMlicensenotice DCMcopyrightnotice titlepage +% LocalWords: DCMcopyrightnotice DCMcclicense DCMcclicense user.blockstyles +% LocalWords: DCMchapter DCMchatper DCMsubsubsection DCMsubsubsection ltxml +% LocalWords: user.conig makeatletter printbibliography expandafter showmeta +% LocalWords: xdef csname endcsname newcommand ifx ifundefined affs showmeta +% LocalWords: Semiverbatim whatsit newenvironment mtabline providecommand vfil +% LocalWords: DCMsubtitle cclicense defdcm impl.blockstyles newcounter vskip +% LocalWords: stepcounter tabularnewline theauthors lineskip textbf noindent +% LocalWords: omd omd srefaddidkey thechapter autoclose thesection ifnum ifnum +% LocalWords: thesubsection thesubsubsection DCMparagraph ISOtimestamp doctex +% LocalWords: DCMinstitution DCMinstitution compactenum textsf langle textsf +% LocalWords: langle metakeys addmetakey metasetkeys countryshort townzip aff +% LocalWords: streetaddress depts diff --git a/Master/texmf-dist/source/latex/stex/dcm/dcm.ins b/Master/texmf-dist/source/latex/stex/dcm/dcm.ins new file mode 100644 index 00000000000..506de6c2821 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/dcm/dcm.ins @@ -0,0 +1,40 @@ +%% +%% This file generates files required to use the ed package. +%% At your command prompt write +%% +%% latex dcm.ins +%% +%% Copyright(c) 2008 Michael Kohlhase +%% The development version of this file can be found at +%% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/dcm/dcm.ins $ +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{dcm.sty}{\from{dcm.dtx}{package}}} + +\Msg{*} +\Msg{* You probably need to move the file dcm.sty into a directory searched by TeX.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\nopreamble\nopostamble +\generate{\file{dcm.sty.ltxml}{\from{dcm.dtx}{ltxml}}} + +\Msg{*} +\Msg{* You probably need to move the generated file dcm.sty.ltxml into a directory searched by LaTeXML.} +\Msg{*} + +\endbatchfile 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..f31807d13e5 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/hwexam/hwexam.dtx @@ -0,0 +1,578 @@ +% \iffalse meta-comment +% An Infrastructure for marking up Assignments +% $URL: https://svn.kwarc.info/repos/stex/trunk/sty/hwexam/hwexam.dtx $ +% $Rev: 1999 $; last modified by $Author: kohlhase $ +% $Date: 2012-01-28 08:32:11 +0100 (Sat, 28 Jan 2012) $ +% 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}[2012/01/28 v0.9b homework assignments and exams] +%\ProvidesClass{hwexam}[2012/01/28 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 1999 2012-01-28 07:32:11Z 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 +%\CheckSum{432} +% +% \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} +% +% This package supplies the \DescribeEnv{assignment}|assignment| environment that groups +% problems into assignment sheets. It takes an optional KeyVal argument with the keys +% \DescribeMacro{number}|number| (for the assignment number; if none is given, 1 is +% assumed as the default or --- in multi-assignment documents --- the ordinal of the +% |assignment| environment), \DescribeMacro{title}|title| (for the assignment title; this +% is referenced in the title of the assignment sheet), \DescribeMacro{type}|type| (for the +% assignment type; e.g. ``quiz'', or ``homework''), \DescribeMacro{given}|given| (for the +% date the assignment was given), and \DescribeMacro{due}|due| (for the date the +% assignment is due). +% +% \subsection{Typesetting Exams} +% +% Furthermore, the |hwexam| package takes the option +% \DescribeMacro{multiple}|multiple| that allows to combine multiple 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*{\protect\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", + afterDigest=> sub { + my ($stomach, $kv) = @_; + my $kvi = LookupValue('inclassig'); + my @keys = qw(id num title pts given due); + my @vals = $kvi && map($kvi->getValue($_), @keys); + foreach my $i(0..$#vals) { + $kv->setValue($keys[$i],$vals[$i]) if $vals[$i]; + }});#$ +% +% \end{macrocode} +% \end{environment} +% +% \begin{macrocode} +%<*package> +\def\assig@default@type{Assignment} +\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 [] {}', sub { + my ($stomach, $arg1, $arg2) = @_; + AssignValue('inclassig',$arg1) if $arg1; + (Invocation(T_CS('\input'),$arg2)->unlist); +}); +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 TA: \@for\@I:=\@tas\do{{\Large$\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/hwexam/hwexam.ins b/Master/texmf-dist/source/latex/stex/hwexam/hwexam.ins new file mode 100644 index 00000000000..fc8f40b0953 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/hwexam/hwexam.ins @@ -0,0 +1,43 @@ +%% +%% This file generates files required to use the hwexam class. +%% At your command prompt write +%% +%% latex hwexam.ins +%% +%% Copyright(c) 2010 Michael Kohlhase +%% The development version of this file can be found at +%% $HeadURL: https://svn.kwarc.info/repos/stex-content/sty/hwexam/hwexam.ins $ +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{hwexam.sty}{\from{hwexam.dtx}{package}}} +% and the class +\generate{\file{hwexam.cls}{\from{hwexam.dtx}{cls}}} + +\Msg{*} +\Msg{* You probably need to move the files hwexam.{sty,cls} into a directory searched by TeX.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\nopreamble\nopostamble +\generate{\file{hwexam.sty.ltxml}{\from{hwexam.dtx}{ltxml}}} +\generate{\file{hwexam.cls.ltxml}{\from{hwexam.dtx}{ltxml.cls}}} + +\Msg{*} +\Msg{* You probably need to move the generated files hwexam.{sty,cls}.ltxml into a directory searched by LaTeXML.} +\Msg{*} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/stex/make/Makefile b/Master/texmf-dist/source/latex/stex/make/Makefile new file mode 100644 index 00000000000..0aaad6a8d8d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/make/Makefile @@ -0,0 +1,3 @@ +all: +clean: +distclean: diff --git a/Master/texmf-dist/source/latex/stex/make/Makefile.base.in b/Master/texmf-dist/source/latex/stex/make/Makefile.base.in new file mode 100644 index 00000000000..35834efbb00 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/make/Makefile.base.in @@ -0,0 +1,28 @@ +sms: $(MODS.sms) + +####################### sTeX utilities ############################## + +$(MODS.sms): %.sms: %.tex $(STEXBINDIR)/sms + $(SMSPROG) $< + +graph: + $(GRAPHPROG) -o graph -f pdf $(SNIPPATHS) all.tex + +idtest: $(TARGET) + $(STEXBINDIR)/idcheck -q slides.tex + +struct: $(TARGET) + $(STEXBINDIR)/modstr < slides.tex + +ccheck: $(TARGET) + latex slides.tex + $(STEXBINDIR)/idcheck slides.tex + $(STEXBINDIR)/modstr -s < slides.tex > sstruct + cat sstruct + +############################# cleaning ################################# +clean: + rm -Rf $(CLEAN) + +distclean: clean + rm -Rf $(DISTCLEAN) diff --git a/Master/texmf-dist/source/latex/stex/make/Makefile.base.vars b/Master/texmf-dist/source/latex/stex/make/Makefile.base.vars new file mode 100644 index 00000000000..bc112e3f55c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/make/Makefile.base.vars @@ -0,0 +1,26 @@ +#################################### PATHS ############################### +# the paths can be customized by setting the shell variable STEXDIR appropriately +STEXSTYDIR = $(STEXDIR)/sty +STEXBINDIR = $(STEXDIR)/bin + +################################# Programs ############################### +SMSPROG = PERL5LIB=$(STEXDIR)/bin $(STEXDIR)/bin/sms +GRAPHPROG = PERL5LIB=$(STEXDIR)/bin $(STEXDIR)/bin/sgraph + +########################## Conversion and Formatting Targets ########### +# the TARGET is the set of top-level TeX files that should be formatted or converted. +# TARGET.parts are separate parts of the target (e.g. included via \input). The TARGET +# files usually depend on them and they are not Modules (see below). +# Modules (MODS) are sTeX files without head and tail, so that they can be included +# into other sTeX files. TARGET can be set by the including Makefile, MODS are +# computed as as the remaining *.tex files. + +MODS ?= $(filter-out $(BUTFILES) $(TARGET.parts) $(TARGET), $(shell ls *.tex)) $(MODS.extra) +MODS.sms ?= $(MODS:%.tex=%.sms) $(MODS.sms.extra) + +# the prefix files or the MODSLIBDIR variable must be specified by the calling Makefile +MODS.pre ?= $(MODSLIBDIR)/pre.tex +MODS.post ?= $(MODSLIBDIR)/post.tex + +########################### for cleaning ###################################### +DISTCLEAN += $(MODS.sms) diff --git a/Master/texmf-dist/source/latex/stex/make/Makefile.in b/Master/texmf-dist/source/latex/stex/make/Makefile.in new file mode 100644 index 00000000000..1d7f1fb368d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/make/Makefile.in @@ -0,0 +1,3 @@ +include $(STEXDIR)/make/Makefile.base.in +include $(STEXDIR)/make/Makefile.latex.in +include $(STEXDIR)/make/Makefile.latexml.in diff --git a/Master/texmf-dist/source/latex/stex/make/Makefile.latex.in b/Master/texmf-dist/source/latex/stex/make/Makefile.latex.in new file mode 100644 index 00000000000..65bf6227b87 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/make/Makefile.latex.in @@ -0,0 +1,31 @@ +pdf: sms $(TARGET.pdf) +mpdf: sms $(MODS.pdf) +# LaTeX build rules: +# +# use non-interactive PDFLATEX (see above) +# +# _always_ delete pdf on error (otherwise, we end up with a corrupt +# pdf file and make saying "nothing to do" on the next run ) +# +# make will delete temporary files (toc,sms,aux) afterwards +# (FIXME: why? should this be disabled or kept like that?) +# +# make pdf depend on its own .toc and .aux and global aux/sms files +$(TARGET.pdf): %.pdf: %.tex $(MODS) $(TARGET.parts) $(IMG) + $(PDFLATEX) $< || $(RM) $@ + @echo + @if (test -e $(patsubst %.tex, %.idx, $<));\ + then makeindex $(patsubst %.tex, %.idx, $<); fi + @echo + @if (grep "No file$(patsubst %.tex, %.bbl, $<)" $(patsubst %.tex, %.log, $<)> /dev/null);\ + then bibtex $(patsubst %.tex, %, $<); fi + @echo + $(PDFLATEX) $< || $(RM) $@ + @echo + @if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\ + then $(PDFLATEX) $< || $(RM) $@; fi + @if (grep Rerun $(patsubst %.tex, %.log, $<) > /dev/null);\ + then $(PDFLATEX) $< || $(RM) $@; fi + +$(MODS.pdf): %.pdf: %.tex + $(PDFLATEX) -jobname=$(basename $<) "\nonstopmode\input{$(MODS.pre)}\begin{document}\input{$<}\end{document}" || $(RM) $@ diff --git a/Master/texmf-dist/source/latex/stex/make/Makefile.latex.vars b/Master/texmf-dist/source/latex/stex/make/Makefile.latex.vars new file mode 100644 index 00000000000..f894cf7262b --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/make/Makefile.latex.vars @@ -0,0 +1,16 @@ +TARGET.pdf = $(TARGET:%.tex=%.pdf) +MODS.pdf = $(MODS:%.tex=%.pdf) + +####################### Programs ####################### +# pdflatex: use non-interactive switches + +PDFLATEX = pdflatex -interaction batchmode -file-line-error +#PDFLATEX = pdflatex + +########################### environment ############################# +TEXINPUTS := $(TEXINPUTS)$(STEXSTYDIR)//: + +########################### cleaning ############################# + +CLEAN += *~ *.log *.blg *.idx *.ilg *.out +DISTCLEAN += *.dvi *.aux *.toc *.bbl *.ind $(TARGET.pdf) diff --git a/Master/texmf-dist/source/latex/stex/make/Makefile.latexml.in b/Master/texmf-dist/source/latex/stex/make/Makefile.latexml.in new file mode 100644 index 00000000000..f0e1731df4c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/make/Makefile.latexml.in @@ -0,0 +1,43 @@ +omdoc: sms $(filter-out all.omdoc,$(TARGET.omdoc)) +mods: sms $(MODS.omdoc) + +############################ Running LaTeXML ############################# +$(TARGET.tex.xml): %.tex.xml: %.tex $(TARGET.parts) + latexmlc $< $(LTXPATHS) --mode=standard --local --destination=$@ --log=$@.log\ + +$(TARGET.xml): %.xml: %.tex.xml + $(LATEXMLPOST) --destination=$@ $< >& $@.log\ + || echo "FATAL: latexmlpost crashed with fatal error on $<" > $@.log + +$(TARGET.sdomdoc): %.sdomdoc: %.xml $(STEXOXSL) + $(STEXXSLT) -o $@ $(STEXOXSL) $< + +$(TARGET.omdoc): %.omdoc: %.tex $(TARGET.parts) $(LTSTY) $(STEXOXSL) + latexmlc $< $(LTXPATHS) --local --mode=standard\ + --postdest=$(basename $<).omdoc\ + --log=$(basename $<).ltxlog --includestyles\ + --stylesheet=$(STEXOXSL) --nodefaultcss\ + --stylesheetparam=math-format:$(MATHFORMAT)\ + --post --openmath --pmml --summary + +$(MODS.tex.xml): %.tex.xml: %.tex $(LTSTY) + latexmlc --preamble=$(MODS.pre) $< $(LTXPATHS) --local --mode=fragment --destination=$@ --log=$@.log --includestyles + +$(MODS.xml): %.xml: %.tex.xml + $(LATEXMLPOST) --destination=$@ $< >& $@.log + +$(MODS.sdomdoc): %.sdomdoc: %.xml $(STEXOXSL) + xsltproc -o $@ $(STEXOXSL) $< >& $@.log + +$(MODS.omdoc): %.omdoc: %.tex $(LTSTY) $(STEXOXSL) + latexmlc --preamble=$(MODS.pre) $< $(LTXPATHS)\ + --local --mode=fragment\ + --postdest=$(basename $<).omdoc\ + --log=$(basename $<).ltxlog --includestyles\ + --stylesheet=$(STEXOXSL) --nodefaultcss\ + --post --openmath --pmml --summary + +errlog: latexml.errlog + +latexml.errlog: $(MODS.log) + grep -i -e error -e Fatal $(MODS.log) > $@ || echo "No errors found" > $@ diff --git a/Master/texmf-dist/source/latex/stex/make/Makefile.latexml.vars b/Master/texmf-dist/source/latex/stex/make/Makefile.latexml.vars new file mode 100644 index 00000000000..4dfb6848ce2 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/make/Makefile.latexml.vars @@ -0,0 +1,48 @@ +#################################### PATHS ############################### +# the paths can be customized by setting the shell variable STEXDIR appropriately +STEXXSLDIR = $(STEXDIR)/xsl +STEXRNCDIR = $(STEXDIR)/rnc + +###################### Conversion Programs ############################### +STEXLTXDIRS = modules statements sproof omtext omdoc sref presentation dcm reqdoc metakeys\ + mikoslides problem hwexam cmath etc + +LTXPATHS = --path=$(STEXSTYDIR) --path=$(STEXDIR)/schema/rng \ + $(STEXLTXDIRS:%=--path=$(STEXSTYDIR)/%) + +LATEXML = latexmlc $(LTXPATHS) +LATEXMLPOST = latexmlpost --openmath --pmml --nocrossref --noscan --novalidate + +MATHFORMAT = om +STEXXSLT = xsltproc --stringparam math-format $(MATHFORMAT) + +STEXOXSL = $(STEXXSLDIR)/omdocpost.xsl + +STEXRNG = $(shell ls $(STEXDIR)/rnc/*.rng) + +########################## Conversion and Formatting Targets ########### +# the TARGET is the set of top-level TeX files that should be formatted or converted +# Modules (MODS) are sTeX files without head and tail, so that they can be included +# into other sTeX files. TARGET can be set by the including Makefile, MODS are +# computed as as the remaining *.tex files. + +TARGET.tex.xml = $(TARGET:%.tex=%.tex.xml) +TARGET.xml = $(TARGET:%.tex=%.xml) +TARGET.omdoc = $(TARGET:%.tex=%.omdoc) +TARGET.sdomdoc = $(TARGET:%.tex=%.sdomdoc) + +MODS.tex.xml = $(MODS:%.tex=%.tex.xml) +MODS.xml = $(MODS:%.tex=%.xml) +MODS.omdoc = $(MODS:%.tex=%.omdoc) +MODS.sdomdoc = $(MODS:%.tex=%.sdomdoc) +MODS.log = $(shell ls *.ltxlog) + +# the prefix files or the MODSLIBDIR variable must be specified by the calling Makefile +MODS.pre ?= $(MODSLIBDIR)/pre.tex +MODS.post ?= $(MODSLIBDIR)/post.tex + +########################### environment ############################# +TEXINPUTS := $(TEXINPUTS)$(STEXSTYDIR)//: + +CLEAN += $(TARGET.xml) $(TARGET.tex.xml) $(MODS.tex.xml) $(MODS.xml) +DISTCLEAN += $(TARGET.omdoc) $(MODS.omdoc) diff --git a/Master/texmf-dist/source/latex/stex/make/Makefile.subdirs b/Master/texmf-dist/source/latex/stex/make/Makefile.subdirs new file mode 100644 index 00000000000..ccbf95cd3ba --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/make/Makefile.subdirs @@ -0,0 +1,6 @@ +all errlog:: + @for d in $(MAKEDIRS); do (cd $$d && $(MAKE) -$(MAKEFLAGS) $@) done + +clean distclean:: + @for d in $(CLEANDIRS); do (cd $$d && $(MAKE) -$(MAKEFLAGS) $@) done + diff --git a/Master/texmf-dist/source/latex/stex/make/Makefile.vars b/Master/texmf-dist/source/latex/stex/make/Makefile.vars new file mode 100644 index 00000000000..d59db56a4f7 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/make/Makefile.vars @@ -0,0 +1,3 @@ +include $(STEXDIR)/make/Makefile.base.vars +include $(STEXDIR)/make/Makefile.latex.vars +include $(STEXDIR)/make/Makefile.latexml.vars diff --git a/Master/texmf-dist/source/latex/stex/make/README b/Master/texmf-dist/source/latex/stex/make/README new file mode 100644 index 00000000000..78419320a69 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/make/README @@ -0,0 +1,23 @@ +This directory contains two Makefiles for inclusion into Makefile-based build systems. + +file contains +-------------------------------------------------------------------------------------- +Makefile.base.vars general variable declarations (include before all others) +Makefile.base.in general rules (include before all others) +Makefile.latexml.vars variable declarations for the LaTeXML conversion +Makefile.latexml.in rules for producing OMDoc via LaTeXML +Makefile.latex.vars variable declarations for LaTeX formatting +Makefile.latex.in rules for LaTeX formatting +Makefile.vars combines all *.vars above +Makefile.in combines all *.in above + +The usual setup for this will be to create SVN externals +- the deployed instance of sTeX (i.e. https://svn.kwarc.info/repos/sTeX/trunk or /latest) +- to this directory +and use the lines + +STEXDIR = +include $(STEXDIR)/make/Makefile.vars +include $(STEXDIR)/make/Makefile.in + +at appropriate places in the calling Makefile. It is crucial to set STEXDIR variable to make this setup work. 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..0222eb14161 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/metakeys/metakeys.dtx @@ -0,0 +1,435 @@ +% \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: 1999 $; last modified by $Author: kohlhase $ +% $Date: 2012-01-28 08:32:11 +0100 (Sat, 28 Jan 2012) $ +% 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}[2012/01/28 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 1999 2012-01-28 07:32:11Z 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 +% +%\CheckSum{176} +% +% \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} +% +% Many of the {\stex} macros and environments take an optional first argument which uses +% key/value pairs to specify metadata relations of the marked up objects. The |metakeys| +% package supplies the infrastructure managing these key/value pairs. It also forms the +% basis for the |rdfmeta| package which allows to use these for flexible, user-extensible +% metadata relations (see~\ctancite{Kohlhase:rdfmeta} for details). +% +% \subsection{Package Options}\label{sec:user:options} +% +% The |metakeys| package takes a single option: \DescribeMacro{showmeta}|showmeta|. If +% this is set, then the metadata keys defined by the |\addmetakey| are shown +% (see~\ref{sec:user:showmeta}) +% +% \subsection{Adding Metadata Keys to Commands}\label{sec:user:keys} +% +% Key/value pairs in \stex are organized in \textbf{key groups}: every {\stex} macro and +% environment that takes a key/value argument has an associtated key group, and only keys +% that are registered in this group can be utilized. The |metakeys| package supplies the +% \DescribeMacro{\addmetakey}|\addmetakey| macro to add a new key to a key group: If +% \meta{group} is the name of a key group \meta{key} is a metadata keyword name, then +% \begin{quote} +% |\addmetakey[|\meta{default}|]{|\meta{group}|}{|\meta{key}|}[|\meta{dval}|]| +% \end{quote} +% registers \meta{key} in the metadata group \meta{group}, with an optional values +% \meta{default} and \meta{dval} for \meta{key}. The \meta{default} is the default value +% for \meta{key}, if it is not specified, and \meta{dval} the value it gets, if \meta{key} +% is given without specifying a value. These two defaults are often used as +% \begin{quote} +% |\addmetakey[false]{|\meta{group}|}{|\meta{key}|}[true]| +% \end{quote} +% Then, the value of \meta{key} is |false| if \meta{key} is not given and |true|, if +% \meta{key} is specified without value. This is often the best way if we want to use +% \meta{key} as an indicator to have a feature of name \meta{key} (we can test that with +% |\ifx\|\meta{group}|@|\meta{key}|\@true|, if we prepared the macro |\def\@true{true}| +% earlier). +% +% The keys registered for a metadata group can be used for defining macros with a +% key/value arguments via the \DescribeMacro{\metasetkeys}|\metasetkeys| macro, see for +% instance the the definition in Figure~\ref{fig:foo}. +% +% The \DescribeMacro{\addmetalistkey}|\addmetalistkey| macro is a variant of |\addmetakey| +% that adds a list-valued metadata key. The |\addmetalistkey{foo}{val}| in +% Figure~\ref{fig:foo} would allows to use multiple occurrences of teh |val| keys in the +% metadata argument of |\foo|, the values of the |val| keys are collected as a +% comma-separated list in the token register |\foo@vals|. Note that the |val| key can also +% deal with comma-separated lists for convenience. +% +% With these definitions in a used package\footnote{\makeatletter Recall that the +% \texttt{@} character is only allowed in packages, where comma-separated lists can be +% iterated over e.g. by the \texttt{\textbackslash{@}for} macro.} an invocation of +% \begin{quote} +% |\foo[type=bar,id=f4711,val=4,val=7,val={1,1}]| +% \end{quote} +% is formatted to +% \begin{quote} +% \addmetakey{foo}{id}\addmetakey{foo}{type}\addmetalistkey{foo}{val}\makeatletter +% \newcommand\foo[1][]{\metasetkeys{foo}{#1} I have seen a \emph{foo} of type \texttt{\foo@type} +% with identifier \texttt{\foo@id} and values +% \let\@join=\relax\def\@thejoin{, and } +% \@for\@I:=\foo@vals\do{\@join\@I\let\@join=\@thejoin}!}\makeatother +% \foo[type=bar,id=f4711,val=4,val=7,val=1,val=1] +% \end{quote} +% +% \begin{exfig}[ht] +% \begin{verbatim} +% \addmetakey{foo}{id} +% \addmetakey{foo}{type} +% \addmetakey[yes]{foo}{visible} +% \addmetalistkey{foo}{val} +% \def\@yes{yes} +% \newcommand\foo[1][]{\metasetkeys{foo}{#1} +% \ifx\foo@visible\@yes % testing for visibility +% I have seen a \emph{foo} of type \texttt{\foo@type} with identifier +% \texttt\foo@id and values \texttt\foo@vals. +% \let\@join=\relax\def\@thejoin{, and } +% \@for\@I:=\foo@vals\do{\@join\@I\let\@join=\@thejoin}! +% \fi} +% \end{verbatim} +% \vspace*{-2em} +% \caption{Defining a macro with metadata} +% \label{fig:foo} +% \end{exfig} +% +% \subsection{Showing Metadata Keys/Values}\label{sec:user:showmeta} +% +% If the |showmeta| package option is set, the |metakeys| package sets an internal switch that +% shows the values of all keys specified with the |\addmetakey| macro. The default behavior +% is to write the key/value pairs into the margin as \meta{key}|:|\meta{value}. Package +% designers can customize this behavior by redefining the |\metakeys@show@key| and +% |\metakeys@show@keys| macro. +% +% \DescribeMacro{\metakeys@show@key}|\metakeys@show@key{|\meta{key}|}{|\meta{value}|}| shows the a +% single key value pair, and +% \DescribeMacro{\metakeys@show@keys}|\metakeys@show@keys{|\meta{group}|}{|\meta{keys}|}| shows the +% a list of keys metadata, by default we disregard the \meta{group} and show \meta{keys} +% in a marginpar. +% +% For keys that should not be shown in this manner, the |\addmetakey| macro has a variant +% \DescribeMacro{\addmetakey*}|\addmetakey*|. Its behavior is exactly the same, only that +% it keeps the key from being shown by the |showmeta| option. +% +% Note that setting the |showmeta| option will enable metadata presentation on the whole +% document. But sometimes we want to disable that, e.g. inside figures, where |\marginpar| +% is not allowed. Therefore the |metakeys| package provides the +% \DescribeMacro{\hidemetakeys}|\hidemetakeys| macro that reverses this. The +% \DescribeMacro{\showmetakeys}|\showmetakeys| macro re-enables metadata presentation. +% +% +% \section{Limitations}\label{sec:limitations} +% +% In this section we document known limitations. If you want to help alleviate them, +% please feel free to contact the package author. Some of them are currently discussed in +% the \sTeX 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][]% +{\@ifnextchar[{\addmetakey@star@aux[#1]{#2}{#3}}{\addmetakey@star@aux[#1]{#2}{#3}[]}} +\def\addmetakey@star@aux[#1]#2#3[#4]{\metakeys@ext@clear@keys{#2}{#3}{#1}% +\metakeys@initialize@showkeys{#2}% +\define@key{#2}{#3}[#4]{\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\gdef\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} +% +% \begin{macro}{\addmetalistkey} +% \begin{macrocode} +%<*package> +\newcommand\addmetalistkey{\@ifstar\addmetalistkey@star\addmetalistkey@nostar} +\newcommand\addmetalistkey@star[3][]{\metakeys@ext@clear@keys{#2}{#3}{#1}% +\metakeys@initialize@showkeys{#2}% +\expandafter\gdef\csname #2@#3s\endcsname{} +\define@key{#2}{#3}[#1]{% +\expandafter\ifx\csname #2@#3s\endcsname\@empty\expandafter\gdef\csname #2@#3s\endcsname{##1}% +\else\expandafter\xdef\csname #2@#3s\endcsname{\csname #2@#3s\endcsname,##1}% +\fi}} +\newcommand\addmetalistkey@nostar[3][]% +{\metakeys@ext@showkeys{#2}{#3}\addmetalistkey@star[#1]{#2}{#3}} +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Showing Metadata Keys/Values}\label{sec:impl:showmeta} +% +% \begin{macro}{\metakeys@initialize@showkeys} +% |\metakeys@initialize@showkeys{|\meta{group}|}| sets up the |\|\meta{group}|@showkeys| +% macro which is is used to store the keys to be shown of the metadata in in the generic +% |\setmetakeys| macro below. +% \begin{macrocode} +%<*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} +%<*package> +\newcommand\showmetakeys{\metakeys@showmetatrue} +% +%<*ltxml> +DefConstructor('\showmetakeys',''); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\hidemetakeys} +% \begin{macrocode} +%<*package> +\newcommand\hidemetakeys{\metakeys@showmetafalse} +% +%<*ltxml> +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/metakeys/metakeys.ins b/Master/texmf-dist/source/latex/stex/metakeys/metakeys.ins new file mode 100644 index 00000000000..7e3dda621a3 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/metakeys/metakeys.ins @@ -0,0 +1,40 @@ +%% +%% This file generates files required to use the ed package. +%% At your command prompt write +%% +%% latex metakeys.ins +%% +%% Copyright(c) 2010 Michael Kohlhase +%% The development version of this file can be found at +%% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/metakeys/metakeys.ins $ +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{metakeys.sty}{\from{metakeys.dtx}{package}}} + +\Msg{*} +\Msg{* You probably need to move the file metakeys.sty into a directory searched by TeX.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\nopreamble\nopostamble +\generate{\file{metakeys.sty.ltxml}{\from{metakeys.dtx}{ltxml}}} + +\Msg{*} +\Msg{* You may need to move the generated file metakeys.sty.ltxml into a directory searched by LaTeXML.} +\Msg{*} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.dtx b/Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.dtx new file mode 100644 index 00000000000..0384b64b182 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.dtx @@ -0,0 +1,576 @@ +% \iffalse meta-comment +% A LaTeX Class for Jacobs University Slides +% Copyright (c) 2007 Michael Kohlhase, all rights reserved +% this file is released under the +% Gnu Library Public Licences (LGPL) +% +% The development version of this file can be found at +% https://svn.kwarc.info/repos/kwarc/projects/stex/sty/mikoslides.dtx +% \fi +% +% \iffalse +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\ProvidesClass{mikoslides}[2012/01/28 v0.9 Jacobs slides] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{url,array,float} +\usepackage[show]{ed} +\usepackage{graphicx} +\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}} +\usepackage{hyperref} +\begin{document}\DocInput{mikoslides.dtx}\end{document} +% +% \fi +% +% \CheckSum{364} +% +% \changes{v0.1}{2005/12/06}{Initial Version} +% \changes{v0.2}{2006/01/11}{course notes back on seminar} +% \changes{v0.3}{2007/05/16}{changing to jacobs logo} +% \changes{v0.4}{2007/10/16}{re-basing the whole thing on beamer} +% \changes{v0.4}{2008/09/06}{moving line-end-comment to \texttt{omdoc.dtx}} +% \changes{v0.5}{2009/06/17}{eliminating mytwocolumns, this is better done by \texttt{beamer.cls}} +% \changes{v0.9}{2010/06/18}{this is almost done} +% +% \GetFileInfo{mikoslides.cls} +% \MakeShortVerb{\|} +% +% \def\twin#1#2{\index{#1!#2}\index{#2!#1}} +% \def\twintoo#1#2{{#1 #2}\twin{#1}{#2}} +% \def\atwin#1#2#3{\index{#1!#2!#3}\index{#3!#2 (#1)}} +% \def\atwintoo#1#2#3{{#1 #2 #3}\atwin{#1}{#2}{#3}} +% +%\def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} +% \def\stex{\hbox{\raisebox{-.5ex}S\kern-.5ex\TeX}} +% \def\sTeX{\stex} +% \def\cnxml{\scshape{CNXml}} +% \def\connexions{\scshape{Connexions}} +% \def\element#1{{\ttfamily{#1}}} +% \def\snippet#1{{\ttfamily{#1}}} +% \def\cnxlatex{CNX\LaTeX} +% \def\mathml{{\scshape{MathML}}} +% \def\latexml{\hbox{{\LaTeX}ML}} +% \def\omdoc{OMDoc} +% \def\activemath{{\scshape{ActiveMath}}} +% +% \title{Slides and Course Notes for Jacobs University\thanks{Version {\fileversion} +% (last revised {\filedate})}} +% \author{Michael Kohlhase\\ +% Jacobs University, Bremen\\ +% \url{http://kwarc.info/kohlhase}} +% \maketitle +% +% \begin{abstract} +% We present a document class from which we can generate both course slides and course +% notes in a transparent way. Furthermore, we present a set of {\latexml} bindings for +% these, so that we can also generate {\omdoc}-based course materials, e.g. for +% inclusion in the {\activemath} system. +% \end{abstract} +% \tableofcontents\newpage +%\section{Introduction} +% This Document class is derived from |beamer.cls|, specializes it with Jacobs stuff and +% adds a notes version that is more suited to printing than the one supplied by +% |beamer.cls|. +% +%\section{The User Interface}\label{sec:user} +% +% \subsection{Package Options}\label{sec:user:options} +% +% The |mikoslides| class takes a variety of class options:\ednote{leaving out noproblems +% for the momeent until we decide what to do with it.} +% \begin{compactitem} +% \item q\DescribeMacro{showmeta}|showmeta|. If this is set, then the metadata keys are shown +% (see~\cite{Kohlhase:metakeys:ctan} for details and customization options). +% \item The options \DescribeMacro{slides}|slides|\DescribeMacro and {notes}|notes| switch +% between slides mode and notes mode (see Section~\ref{sec:user:notesslides}). +% \item If the option \DescribeMacro{sectocframes}|sectocframes| is given, then special +% frames with section table of contents are producedheaders \ednote{document the functionality} +% \end{compactitem} +% +% \subsection{Notes and Slides}\label{sec:user:notesslides} +% +% \subsection{Header and Footer Lines}\label{sec:user:headfootlines} +% +% \subsection{Colors and Highlighting}\label{sec:user:highlighting} +% The \DescribeMacro{\textwarning}|\textwarning| macro generates a warning sign: \includegraphics[width=1.2em]{dangerous-bend} +% \subsection{Front Matter, Titles, etc}\label{sec:user:matter} +% +% \subsection{Miscellaneous}\label{sec:user:misc} +% +% \section{Limitations}\label{sec:limitations} +% +% In this section we document known limitations. If you want to help alleviate them, +% please feel free to contact the package author. Some of them are currently discussed in +% the \sTeX TRAC~\cite{sTeX:online}. +% \begin{compactenum} +% \item the class should be divided into concerns. \tracissue{1684} +% \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. +% +% \begin{macrocode} +%<*ltxml> +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +% +% \end{macrocode} +% +% For {\LaTeX} we define some Package Options and switches for the |mikoslides| class and activate +% them by passing them on to |beamer.cls| the appropriate packages. +% +% \begin{macrocode} +%<*cls> +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\newif\ifnotes\notesfalse +\newif\ifsectocframes\sectocframesfalse +\newif\ifproblems\problemstrue +\DeclareOption{notes}{\notestrue} +\DeclareOption{slides}{\notesfalse} +\DeclareOption{noproblems}{\problemsfalse} +\DeclareOption{sectocframes}{\sectocframestrue} +\ifnotes +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{omdoc}} +\else +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{beamer}} +\fi +\ProcessOptions +% +%<*ltxml> +RawTeX('\newif\ifnotes\notesfalse'); +RawTeX('\newif\ifproblems\problemsfalse'); +% +% \end{macrocode} +% +% Depending on the options, we either load the |article|-based |omdoc| or the |beamer| class. In the first +% case, we also have to make the |beamer|-specific things available to |article| via the +% |beamerarticle| package. We use options to avoid loading theorem-like environments, +% since we want to use our own from the $\sTeX$ packages. +% \begin{macrocode} +%<*cls> +\ifnotes +\LoadClass{omdoc} +\RequirePackage{a4wide} +\RequirePackage{marginnote} +\RequirePackage[notheorems,noamsthm]{beamerarticle} +\else +\LoadClass[notheorems,noamsthm,10pt]{beamer} +\newcounter{Item} +\newcounter{paragraph} +\newcounter{subparagraph} +\newcounter{Hfootnote} +\usetheme{Jacobs} +\fi +% +%<*ltxml> +LoadClass('omdoc'); +DefConstructor('\usetheme{}',''); +% +% \end{macrocode} +% +% now, we load the remaining packages for both versions. \ednote{MK: eventually (when tikz +% support is fully realized in \latexml) get rid of the standalone package} +% +% \begin{macrocode} +%<*cls> +\RequirePackage{stex} +\RequirePackage{latexml} +\RequirePackage{amssymb} +\RequirePackage{tikz} +\usepgflibrary{shapes}\usetikzlibrary{arrows} +\RequirePackage{url} +\RequirePackage{amsmath} +\RequirePackage{comment} +\RequirePackage{standalone} +% +%<*ltxml> +RequirePackage('stex'); +RequirePackage('latexml'); +RequirePackage('amssymb'); +RequirePackage('graphicx'); +RequirePackage('tikz'); +RequirePackage('amsmath'); +% +% \end{macrocode} +% +% \subsection{Notes and Slides}\label{sec:impl:noteslides} +% +% We define the sizes of slides in the notes. Somehow, we cannot get by with the same +% here. +% +% \begin{macrocode} +%<*cls> +\newcounter{slide} +\newlength{\slidewidth}\setlength{\slidewidth}{13.5cm} +\newlength{\slideheight}\setlength{\slideheight}{9cm} +% +%<*ltxml> +DefRegister('\slidewidth' => Dimension('13.5cm')); +DefRegister('\slideheight' => Dimension('9cm')); +% +% \end{macrocode} +% +% For course notes, we define the |note| environment to be a no-operation otherwise we declare the |note| environment as +% a comment via the |comment| package. +% +% \begin{environment}{note} +% \begin{macrocode} +%<*cls> +\ifnotes\renewenvironment{note}{}{}\else\excludecomment{note}\fi +% +%<*ltxml> +DefEnvironment('{note}','#body'); +% +% \end{macrocode} +% \end{environment} +% +% +% the next step is to set up the slide boxes in |article| mode. We set up sizes and +% provide a box register for the frames and a counter for the slides. +% +% \begin{macrocode} +%<*cls> +\ifnotes +\newlength{\slideframewidth}\setlength{\slideframewidth}{2pt} +\newsavebox{\myframebox} +% +% \end{macrocode} +% +% \begin{environment}{frame} +% For the |frame| environment we construct a |lrbox| in the |\myframebox| register that +% we can later put into an |\fbox| so that it looks like a slide. Furthermore, we +% redefine the |itenize| environment so that it looks more like the one in |beamer| with +% |Jacobs| theme. +% \begin{macrocode} +%<*cls> +\renewenvironment{frame}[1][]% +{\stepcounter{slide} +\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 + \begin{list} + {\itemize@label} + {\setlength{\labelsep}{.3em}\setlength{\labelwidth}{.5em}\setlength{\leftmargin}{1.5em}} + \edef\itemize@level{\itemize@inner}} +{\end{list}} + \noindent\hfill\begin{lrbox}{\myframebox} + \begin{minipage}{\slidewidth}\sf}% + {\miko@slidelabel\end{minipage}\end{lrbox}% + \begin{center}\fbox{\usebox\myframebox}\end{center}\hfill} +% +%<*ltxml> +DefEnvironment('{frame}[]', + "" + . "#body\n" + ."\n\n", + afterDigestBegin=>sub { + $_[1]->setProperty(theory=>LookupValue('current_module')); }); +%#$ +% \end{macrocode} +% \end{environment} +% +% the next step is to set up the slide boxes in |article| mode. +% +% \begin{macrocode} +%<*cls> +\renewcommand{\frametitle}[1]{{\Large\bf\sf\color{blue}{#1}}} +\fi +\makeindex +% +%<*ltxml> +DefConstructor('\frametitle{}', + "\n#1"); +% +% \end{macrocode} +% +% We start by giving the {\latexml} binding for the |frame| environment from the |beamer| +% class. The |note| environment is used to blend out text in the |slides| mode. It does +% not have a counterpart in OMDoc. +% +% \begin{macrocode} +%<*cls> +\ifproblems\newenvironment{problems}{}{}\else\excludecomment{problems}\fi +% +%<*ltxml> +DefEnvironment('{problems}','#body'); +% +% \end{macrocode} +%\ednote{subtitle is difficult to model in DC metadata. I guess that we want to collect +%the subtitle into dc:title} +% +% \subsection{Header and Footer Lines}\label{sec:impl:headfootlines} +% +% Now, we set up the infrastructure for the footer line of the slides, we use boxes for +% the logos, so that they are only loaded once, that considerably speeds up processing. +% \begin{macrocode} +%<*cls> +\newlength{\slidelogoheight} +\ifnotes\setlength{\slidelogoheight}{.4cm}\else\setlength{\slidelogoheight}{1cm}\fi +\newsavebox{\slidelogo}\sbox{\slidelogo}{\includegraphics[height=\slidelogoheight]{jacobs-logo}} +% \end{macrocode} +% +% Now, we set up the copyright and licensing, the copyright remains with the author, but +% we use the Creative Commons Attribuition-ShareAlike license to strengthen den public +% domain. Here the problem is that we want a hyperref on the CC logo, if hyperref is +% loaded, and otherwise not. As hyperref is always loaded, we have to find out at the +% beginning of the document whether it is, set up a switch, and later in the footer line +% decide what to do. +% +% \begin{macrocode} +\def\source{Michael Kohlhase}% customize locally +\def\copyrightnotice{\footnotesize\copyright:\hspace{.3ex}{\source}} +\newsavebox{\cclogo}\sbox{\cclogo}{\includegraphics[height=\slidelogoheight]{cc_somerights}} +\newif\ifcchref\cchreffalse +\AtBeginDocument{\@ifpackageloaded{hyperref}{\cchreftrue}{\cchreffalse}} +\def\licensing{\ifcchref\href{http://creativecommons.org/licenses/by-sa/2.5/}{\usebox{\cclogo}}\else{\usebox{\cclogo}}\fi} +% \end{macrocode} +% +% Now, we set up the slide label for the |article| mode\ednote{see that we can use the +% themes for the slides some day. This is all fake.} +% +% \begin{macro}{\slidelabel} +% \begin{macrocode} +\newcommand{\miko@slidelabel}% +{\vbox to \slidelogoheight{\vss\hbox to \slidewidth% +{\licensing\hfill\copyrightnotice\hfill\arabic{slide}\hfill\usebox{\slidelogo}}}} +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Colors and Highlighting}\label{sec:impl:highlighting} +% +% Now, we set up an infrastructure for highlighting phrases in slides. Note that we use +% content-oriented macros for highlighting rather than directly using color markup. +% The first thing to to is to adapt the green so that it is dark enough for most beamers +% \begin{macrocode} +%<*cls> +\AtBeginDocument{\definecolor{green}{rgb}{0,.5,0}\definecolor{purple}{cmyk}{.3,1,0,.17}} +% \end{macrocode} +% +% We customize the |\defemph|, |\notemph|, and |\stDMemph| macros with colors for the use +% in the |statements| package. Furthermore we customize the |\@@lec| macro for the +% appearance of line end comments in |\lec|. +% +% \begin{macrocode} +% \def\STpresent#1{\textcolor{blue}{#1}} +\def\defemph#1{{\textcolor{magenta}{#1}}} +\def\notemph#1{{\textcolor{magenta}{#1}}} +\def\stDMemph#1{{\textcolor{blue}{#1}}} +\def\@@lec#1{(\textcolor{green}{#1})} +% +%<*ltxml> +#DefMacro('\defemph{}','{\textcolor{magenta}{#1}}'); +#DefMacro('\notemph{}','{\textcolor{magenta}{#1}}'); +% +% \end{macrocode} +% +% I like to use the dangerous bend symbol for warnings, so we provide it here. +% \begin{macro}{\textwarigrening} +% as the macro can be used quite often we put it into a box register, so that it is only +% loaded once. +% \begin{macrocode} +%<*cls> +\pgfdeclareimage[width=1.5em]{miko@dbend}{dangerous-bend} +\def\textwarning{\raisebox{-.05cm}{\pgfuseimage{miko@dbend}}\xspace} +%b +%<*ltxml> +DefMacro('\textwarning',""); +% +% \end{macrocode} +% \end{macro} +% +% \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]% +{\newbox\boxwith\setbox\boxwith\hbox{\begin{tabular}{c}{\em joint work with}\\#1\end{tabular}}% +\begin{center}\LARGE\begin{tabular}{c}\color{red}}% +{\\\box\boxwith\end{tabular}\end{center}% +\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"); +% +% \end{macrocode} +% +% \begin{macrocode} +% Must be first command on slide to make positioning work. +%<*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}} +% +%<*ltxml> +% +% \end{macrocode} +% \begin{macrocode} +%<*cls> +\ifsectocframes +%\AtBeginChapter[]{\begin{frame}\frametitle{Chapter Outline}\tableofcontents[currentsection]\end{frame}} +%\AtBeginSection[]{\begin{frame}\frametitle{Section Outline}\tableofcontents[currentsection]\end{frame}} +%\AtBeginSubsection[]{\begin{frame}\frametitle{Subsection Outline}\tableofcontents[currentsubsection]\end{frame}} +%\AtBeginSubsubsection[]{\begin{frame}\frametitle{Subsubsection Outline}\tableofcontents[currentsubsubsection]\end{frame}} +\def\at@begin@omgroup#1{\message{atbeginomgroup}\begin{frame}\frametitle{Outline}\tableofcontents[section]\end{frame}} +\fi +% +% +% \subsection{Miscellaneous} +% +% the following macro is only to work around problems in the |tikz| support in \latexml. +% \begin{macrocode} +%<*cls> +\newcommand\tikzinput[2][]{\input{#2}} +% +%<*ltxml> +DefMacro('\tikzinput[] {}','\includegraphics[#1]{#2}'); +% +% \end{macrocode} + +% We need to disregard the columns macros introduced by the |beamer| class +% \begin{macrocode} +%<*ltxml> +DefEnvironment('{columns}','#body'); +DefEnvironment('{column}{}','#body'); +% +% \end{macrocode} +% +% We also need to deal with overlay specifications introduced by the |beamer| +% class.\ednote{this is just to keep latexml quiet, no real functionality here.} +% +% \ednote{Deyan: We reuse the CMP itemizations defined in the omdoc.cls.ltxml binding, +% adjusting the parameters to be overlay-sensitive } +% \begin{macrocode} +%<*ltxml> +DefConstructor('\uncover','#1'); +#Define a Beamer Overlay Parameter type + DefParameterType('BeamerOverlay', sub { + my ($gullet) = @_; + my $tok = $gullet->readXToken; + if (ref $tok && ToString($tok) eq '<') { + $gullet->readUntil(T_OTHER('>')); + } else { + $gullet->unread($tok) if ref $tok; + undef; }}, + reversion=> sub { + (T_OTHER('<'), $_[0]->revert, T_OTHER('>')); + }); + +#Take the "from" field of the overlay range +sub overlayFrom { + return "" unless defined $_[0]; + my $overlay=ToString($_[0]); $overlay =~ /^(\d+)/; $1;} + +#Reuse the CMP itemizations, only adjust the \item constructors. +DefMacro('\beamer@group@item[] OptionalBeamerOverlay IfBeginFollows', sub { + my($gullet,$tag,$overlay,$needwrapper)=@_; + $overlay=$overlay||T_OTHER(""); + ( T_CS('\group@item@maybe@unwrap'), + ($needwrapper ? (Invocation(T_CS('\beamer@group@item@wrap'),$tag,$overlay)->unlist) : ()) ); }); +DefConstructor('\beamer@group@item@wrap {} OptionalBeamerOverlay', + "" + . "?#1(#1)()" + . "", + beforeDigest=>sub { + Let('\group@item@maybe@unwrap','\group@item@unwrap'); + #$_[0]->bgroup; +return; }, + properties=>sub{ RefStepItemCounter(); }); + + +#DefConstructor('\beamer@itemize@item[] OptionalBeamerOverlay', +# "" +# . "?#1(#1)()", +# properties=>sub{ RefStepItemCounter(); }); +DefConstructor('\beamer@enumerate@item[] OptionalBeamerOverlay', + "" + . "?#1(#1)()", + properties=>sub{ RefStepItemCounter(); }); +DefConstructor('\beamer@description@item[] OptionalBeamerOverlay', + "" + . "?#1(#1)()", # trust di and dt to autoclose + properties=>sub{ RefStepItemCounter(); }); +%#$ +% \end{macrocode} +% Now, some things that are imported from the |pgf| and |beamer| packages: +% \begin{macrocode} +%<*ltxml> +DefMacro('\putgraphicsat{}{}{}','\mygraphics[#2]{#3}'); +DefMacro('\putat{}{}','#2'); +% +% \end{macrocode} +% +% \subsection{Finale} +% +% Finally, we set the slide body font to the sans serife, and we terminate the {\latexml} +% bindings file with a success mark for perl. +% \begin{macrocode} +%\ifnotes\else\sf\fi +%1; +% \end{macrocode} +% \Finale +\endinput + +% \iffalse +%%% Local Variables: +%%% mode: doctex +%%% TeX-master: t +%%% End: +% \fi + +% LocalWords: mikoslides dtx beamer omdoc notheorems noamsthm beamerarticle +% LocalWords: graphicx slidelabel stex latexml amssymb tikz url CPERL amsmath +% LocalWords: LoadClass RequirePackage DefRegister DefEnvironment omgroup rgb +% LocalWords: afterDigestBegin setProperty LookupValue DefConstructor hyperref +% LocalWords: cmyk lec DefMacro titleslide ttitle RawTeX metadata etoolbox +% LocalWords: noproblems linkcolor bookmarksopen citecolor urlcolor colorlinks +% LocalWords: breaklinks plainpages pdfpagelabels srcref diff --git a/Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.ins b/Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.ins new file mode 100644 index 00000000000..106c7fba3ce --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/mikoslides/mikoslides.ins @@ -0,0 +1,40 @@ +%% +%% This file generates files required to use the mikoslides class. +%% At your command prompt write +%% +%% latex mikoslides.ins +%% +%% Copyright(c) 2007 Michael Kohlhase +%% The development version of this file can be found at +%% $HeadURL: https://svn.kwarc.info/repos/stex-content/sty/mikoslides/mikoslides.ins $ +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{mikoslides.cls}{\from{mikoslides.dtx}{cls}}} + +\Msg{*} +\Msg{* You probably need to move the file mikolides.cls into a directory searched by TeX.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\nopreamble\nopostamble +\generate{\file{mikoslides.cls.ltxml}{\from{mikoslides.dtx}{ltxml}}} + +\Msg{*} +\Msg{* You probably need to move the generated file mikoslides.cls.ltxml into a directory searched by LaTeXML.} +\Msg{*} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/stex/modules/modules.dtx b/Master/texmf-dist/source/latex/stex/modules/modules.dtx new file mode 100644 index 00000000000..8f155971333 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/modules/modules.dtx @@ -0,0 +1,2235 @@ +% \iffalse meta-comment +% An Infrastructure for Semantic Macros and Module Scoping +% Copyright (C) 2004-2010 Michael Kohlhase, all rights reserved +% this file is released under the +% LaTeX Project Public License (LPPL) +% +% The development version of this file can be found at +% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/modules/modules.dtx $ +% \fi +% +% \iffalse +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\ProvidesPackage{modules}[2012/01/28 v1.1 Semantic Markup] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{stex-logo,modules} +\usepackage{url,array,float,textcomp} +\usepackage[show]{ed} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\usepackage{listings} +\usepackage{amsfonts} +\bibliography{kwarc} +\usepackage[eso-foot,today]{svninfo} +\svnInfo $Id: modules.dtx 1999 2012-01-28 07:32:11Z kohlhase $ +\svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/modules/modules.dtx $ +\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{modules.dtx}\end{document} +% +% \fi +% +% \CheckSum{941} +% +% \changes{v0.9}{2005/06/14}{First Version with Documentation} +% \changes{v0.9a}{2005/07/01}{Completed Documentation} +% \changes{v0.9b}{2005/08/06}{Complete functionality and Updated Documentation} +% \changes{v0.9c}{2006/01/13}{more packaging} +% \changes{v0.9d}{2007/12/12}{fixing double loading of .tex and .sms} +% \changes{v0.9e}{2008/06/17}{fixing LaTeXML} +% \changes{v0.9f}{2008/06/17}{remove unused options uses and usesqualified} +% \changes{v0.9g}{2009/05/02}{adding resymdef functionality} +% \changes{v0.9g}{2009/08/12}{adding importOMDocmodule} +% \changes{v0.9h}{2010/01/19}{using {\texttt{\textbackslash mod@newcommand}} instead of +% {\texttt{\textbackslash providecommand}} for more intuitive inheritance.} +% \changes{v0.9h}{2010/03/05}{adding {\texttt{\textbackslash metalanguage}}} +% \changes{v1.0}{2010/06/18}{minor fixes} +% \changes{v1.1}{2010/12/30}{adding optional arguments to semantic macros for display +% variants. The resymdef functionality introduced in 0.9g is now deprecated. It was hardly +% used.} +% +% \GetFileInfo{modules.sty} +% +% \MakeShortVerb{\|} +%\def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} +% \def\xml{\scsys{Xml}} +% \def\mathml{\scsys{MathML}} +% \def\omdoc{\scsys{OMDoc}} +% \def\openmath{\scsys{OpenMath}} +% \def\latexml{\scsys{LaTeXML}} +% \def\perl{\scsys{Perl}} +% \def\cmathml{Content-{\sc MathML}\index{Content {\sc MathML}}\index{MathML@{\sc MathML}!content}} +% \def\activemath{\scsys{ActiveMath}} +% \def\twin#1#2{\index{#1!#2}\index{#2!#1}} +% \def\twintoo#1#2{{#1 #2}\twin{#1}{#2}} +% \def\atwin#1#2#3{\index{#1!#2!#3}\index{#3!#2 (#1)}} +% \def\atwintoo#1#2#3{{#1 #2 #3}\atwin{#1}{#2}{#3}} +% \def\cT{\mathcal{T}}\def\cD{\mathcal{D}} +% \title{{\texttt{modules.sty}}: Semantic Macros and Module Scoping in {\stex}\thanks{Version {\fileversion} (last revised +% {\filedate})}} +% \author{Michael Kohlhase \& Deyan Ginev \& Rares Ambrus\\ +% Jacobs University, Bremen\\ +% \url{http://kwarc.info/kohlhase}} +% \maketitle +% +% \begin{abstract} +% The |modules| package is a central part of the {\stex} collection, a version of +% {\TeX/\LaTeX} that allows to markup {\TeX/\LaTeX} documents semantically without +% leaving the document format, essentially turning {\TeX/\LaTeX} into a document format +% for mathematical knowledge management (MKM). +% +% This package supplies a definition mechanism for semantic macros and a non-standard +% scoping construct for them, which is oriented at the semantic dependency relation +% rather than the document structure. This structure can be used by MKM systems for +% added-value services, either directly from the {\sTeX} sources, or after translation. +% \end{abstract} +% +% \newpage\setcounter{tocdepth}{2}\tableofcontents\newpage +% +% \section{Introduction}\label{sec:intro} +% +% Following general practice in the {\TeX/\LaTeX} community, we use the term ``semantic +% macro'' for a macro whose expansion stands for a mathematical object, and whose name +% (the command sequence) is inspired by the name of the mathematical object. This can +% range from simple definitions like |\def\Reals{\mathbb{R}}| for individual mathematical +% objects to more complex (functional) ones object constructors like +% |\def\SmoothFunctionsOn#1{\mathcal{C}^\infty(#1,#1)}|. Semantic macros are traditionally +% used to make {\TeX/\LaTeX} code more portable. However, the {\TeX/\LaTeX} scoping model +% (macro definitions are scoped either in the local group or until the rest of the +% document), does not mirror mathematical practice, where notations are scoped by +% mathematical environments like statements, theories, or such. For an in-depth discussion +% of semantic macros and scoping we refer the reader~\cite{Kohlhase:ulsmf08}. +% +% The |modules| package provides a {\LaTeX}-based markup infrastructure for defining +% module-scoped semantic macros and {\latexml} bindings~\cite{Miller:latexml:online} to +% create {\omdoc}~\cite{Kohlhase:omdoc1.2} from {\stex} documents. In the {\stex} world +% semantic macros have a special status, since they allow the transformation of +% {\TeX/\LaTeX} formulae into a content-oriented markup format like +% {\openmath}~\cite{BusCapCar:2oms04} and (strict) content +% {\mathml}~\cite{CarlisleEd:MathML3}; see Figure~\ref{fig:omsemmac} for an example, where +% the semantic macros above have been defined by the |\symdef| macros (see +% Section~\ref{sec:symdef}) in the scope of a |\begin{module}[id=calculus]| (see +% Section~\ref{sec:modules}). +% +% \begin{exfig}\lstset{basicstyle=\scriptsize,aboveskip=-.5em,belowskip=-1.5em} +% \begin{tabular}{l|p{9.7cm}} +% \LaTeX & \verb|\SmoothFunctionsOn\Reals| \\\hline +% PDF/DVI & ${\mathcal{C}^\infty(\mathbb{R},\mathbb{R})}$\\\hline +% {\openmath} & \lstset{morekeywords={OMA,OMS}} +% \begin{lstlisting} +% +% +% +% \end{lstlisting}\\\hline +% {\mathml} & \lstset{morekeywords={apply,csymbol}} +% \begin{lstlisting} +% +% SmoothFunctionsOn +% Reals +% \end{lstlisting}\\ +% \end{tabular} +% \caption{{\openmath} and {\mathml} generated from Semantic Macros}\label{fig:omsemmac} +% \end{exfig} +% +% \section{The User Interface} +% +% The main contributions of the |modules| package are the |module| environment, which +% allows for lexical scoping of semantic macros with inheritance and the |\symdef| macro +% for declaration of semantic macros that underly the |module| scoping. +% +% \subsection{Package Options}\label{sec:options} +% +% The |modules| package takes two options: If we set \DescribeMacro{showviews}|showviews|, +% then the views (see Section~\ref{sec:user:views}) are shown. If we set the +% \DescribeMacro{qualifiedimports}|qualifiedimports| option, then qualified imports are +% enabled. Qualified imports give more flexibility in module inheritance, but consume more +% internal memory. As qualified imports are not fully implemented at the moment, they are +% turned off by default see Limitation~\ref{sec:limitations:qualified-imports}. +% +% If the \DescribeMacro{showmeta}|showmeta| is set, then the metadata keys are shown +% (see~\cite{Kohlhase:metakeys:ctan} for details and customization options). +% +% \subsection{Semantic Macros}\label{sec:symdef} +% +% The \DescribeMacro{\symdef} is the main constructor for semantic macros in {\sTeX}. A +% call to the |\symdef| macro has the general form +% \begin{quote} +% |\symdef[|\meta{keys}|]{|\meta{cseq}|}[|\meta{args}|]{|\meta{definiens}|}| +% \end{quote} +% where {\meta{cseq}} is a control sequence (the name of the semantic macro) {\meta{args}} +% is a number between 0 and 9 for the number of arguments {\meta{definiens}} is the token +% sequence used in macro expansion for {\meta{cseq}}. Finally {\meta{keys}} is a keyword +% list that further specifies the semantic status of the defined macro. +% +% The two semantic macros in Figure~\ref{fig:omsemmac} would have been declared by +% invocations of the |\symdef| macro of the form: +% \begin{verbatim} +% \symdef{Reals}{\mathbb{R}} +% \symdef{SmoothFunctionsOn}[1]{\mathcal{C}^\infty(#1,#1)} +% \end{verbatim} +% +% Note that both semantic macros correspond to {\openmath} or {\mathml} ``symbols'', +% i.e. named representations of mathematical concepts (the real numbers and the +% constructor for the space of smooth functions over a set); we call these names the +% {\textbf{symbol name}} of a semantic macro. Normally, the symbol name of a semantic +% macro declared by a |\symdef| directive is just \meta{cseq}. The key-value pair +% \DescribeMacro{name}|name=|\meta{symname} can be used to override this behavior and +% specify a differing name. There are two main use cases for this. +% +% The first one is shown in Example~\ref{fig:symvariant}, where we define semantic macros +% for the ``exclusive or'' operator. Note that we define two semantic macros: |\xorOp| and +% |\xor| for the applied form and the operator. As both relate to the same mathematical +% concept, their symbol names should be the same, so we specify |name=xor| on the +% definition of |\xorOp|. +% +% A key \DescribeMacro{local}|local| can be added to {\meta{keys}} to specify that the +% symbol is local to the module and is invisible outside. Note that even though |\symdef| +% has no advantage over |\def| for defining local semantic macros, it is still considered +% good style to use |\symdef| and |\abbrdef|, if only to make switching between local and +% exported semantic macros easier. +% +% \DescribeMacro{\abbrdef}The |\abbrdef| macro is a variant of |\symdef| that is only +% different in semantics, not in presentation. An abbreviative macro is like a semantic +% macro, and underlies the same scoping and inheritance rules, but it is just an +% abbreviation that is meant to be expanded, it does not stand for an atomic mathematical +% object. +% +% We will use a simple module for natural number arithmetics as a running example. It +% defines exponentiation and summation as new concepts while drawing on the basic +% operations like $+$ and $-$ from {\LaTeX}. In our example, we will define a semantic +% macro for summation |\Sumfromto|, which will allow us to express an expression like +% $\sum{i=1}^nx^i$ as |\Sumfromto{i}1n{2i-1}| (see Example~\ref{fig:semmodule} for an +% example). In this example we have also made use of a local semantic symbol for $n$, +% which is treated as an arbitrary (but fixed) symbol. +% +%\begin{exfig} +% \begin{verbatim} +% \begin{module}[id=arith] +% \symdef{Sumfromto}[4]{\sum_{#1=#2}^{#3}{#4}} +% \symdef[local]{arbitraryn}{n} +% What is the sum of the first $\arbitraryn$ odd numbers, i.e. +% $\Sumfromto{i}1\arbitraryn{2i-1}?$ +% \end{module} +% \end{verbatim} +% \vspace*{-3.5ex}\hrule\vspace*{1ex} +% \begin{module}[id=arith] +% \symdef{Sumfromto}[4]{\sum_{#1=#2}^{#3}{#4}} +% \symdef[local]{arbitraryn}{n} +% What is the sum of the first $\arbitraryn$ odd numbers, i.e. +% $\Sumfromto{i}1\arbitraryn{2i-1}?$ +% \end{module} +% \caption{Semantic Markup in a {\texttt{module}} Context}\label{fig:semmodule} +% \end{exfig} +% +% The \DescribeMacro{\symvariant}|\symvariant| macro can be used to define presentation +% variants for semantic macros previously defined via the |\symdef| directive. In an +% invocation +% \begin{quote} +% |\symdef[|\meta{keys}|]{|\meta{cseq}|}[|\meta{args}|]{|\meta{pres}|}|\\ +% |\symvariant{|\meta{cseq}|}[|\meta{args}|]{|\meta{var}|}{|\meta{varpres}|}| +% \end{quote} +% the first line defines the semantic macro |\|\meta{cseq} that when applied to +% \meta{args} arguments is presented as \meta{pres}. The second line allows the semantic +% macro to be called with an optional argument \meta{var}: |\|\meta{cseq}|[var]| (applied +% to \meta{args} arguments) is then presented as \meta{varpres}. We can define a variant +% presentation for |\xor|; see Figure~\ref{fig:symvariant} for an example. +% +%\begin{exfig} +% \begin{verbatim} +% \begin{module}[id=xbool] +% \symdef[name=xor]{xorOp}{\oplus} +% \symvariant{xorOp}{uvee}{\underline{\vee}} +% \symdef{xor}[2]{#1\xorOp #2} +% \symvariant{xor}[2]{uvee}{#1\xorOp[uvee] #2} +% Exclusive disjunction is commutative: $\xor{p}q=\xor{q}p$\\ +% Some authors also write exclusive or with the $\xorOp[uvee]$ operator, +% then the formula above is $\xor[uvee]{p}q=\xor[uvee]{q}p$ +% \end{module} +% \end{verbatim} +% \vspace*{-3.5ex}\hrule\vspace*{1ex} +% \begin{module}[id=xbool] +% \symdef[name=xor]{xorOp}{\oplus} +% \symvariant{xorOp}{uvee}{\underline{\vee}} +% \symdef{xor}[2]{#1\xorOp #2} +% \symvariant{xor}[2]{uvee}{#1\xorOp[uvee] #2} +% Exclusive disjunction is commutative: $\xor{p}q=\xor{q}p$\\ +% Some authors also write exclusive or with the $\xorOp[uvee]$ operator, +% then the formula above is $\xor[uvee]{p}q=\xor[uvee]{q}p$ +% \end{module} +% \caption{Presentation Variants of a Semantic Macro}\label{fig:symvariant} +% \end{exfig} +% +% Version 1.0 of the |modules| package had the \DescribeMacro{\resymdef}|\resymdef| macro +% that allowed to locally redefine the presentation of a macro. But this did not interact +% well with the |beamer| package and was less useful than the |\symvariant| +% functionality. Therefore it is deprecated now and leads to an according error message. +% +% \subsection{Symbol and Concept Names}\label{sec:user:termdef} +% +% Just as the |\symdef| declarations define semantic macros for mathematical symbols, the +% |modules| package provides an infrastructure for {\emph{mathematical concepts}} that are +% expressed in mathematical vernacular. The key observation here is that concept names +% like ``finite symplectic group'' follow the same scoping rules as mathematical symbols, +% i.e. they are module-scoped. The \DescribeMacro{\termdef}|\termdef| macro is an analogue +% to |\symdef| that supports this: use +% |\termdef[|\meta{keys}|]{|\meta{cseq}|}{|\meta{concept}|}| to declare the macro +% |\|\meta{cseq} that expands to \meta{concept}. See Figure~\ref{fig:termref} for an +% example, where we use the \DescribeMacro{\capitalize}|\captitalize| macro to adapt +% \meta{concept} to the sentence beginning.\ednote{continue, describe \meta{keys}, they +% will have to to with plurals,\ldots once implemented}. The main use of the +% |\termdef|-defined concepts lies in automatic cross-referencing facilities via the +% \DescribeMacro{\termref}|\termref| and \DescribeMacro{\symref}|\symref| macros provided +% by the |statements| package~\ctancite{Kohlhase:smms}. Together with the |hyperref| +% package~\cite{RahObe:hmlmh10}, this provide cross-referencing to the definitions of the +% symbols and concepts. As discussed in section~\ref{sec:limitations:crossref}, the +% |\symdef| and |\termdef| declarations must be on top-level in a module, so the +% infrastructure provided in the |modules| package alone cannot be used to locate the +% definitions, so we use the infrastructure for mathematical statements for that. +% +%\begin{exfig} +% \begin{verbatim} +% \termdef[name=xor]{xdisjunction}{exclusive disjunction} +% \captitalize\xdisjunction is commutative: $\xor{p}q=\xor{q}p$ +% \end{verbatim} +% \vspace*{-3.5ex} +% \caption{Extending Example~\ref{fig:symvariant} with Term References}\label{fig:termref} +% \end{exfig} +% +% \subsection{Modules and Inheritance}\label{sec:modules} +% +% The\DescribeEnv{module}|module| environment takes an optional |KeyVal| +% argument. Currently, only the |id| key is supported for specifying the identifier of a +% module (also called the {\twintoo{module}{name}}). A module introduced by +% |\begin{module}[id=foo]| restricts the scope the semantic macros defined by the +% |\symdef| form to the end of this module given by the corresponding |\end{module}|, +% and to any other |module| environments that import them by a |\importmodule{foo}| +% directive. If the module |foo| contains |\importmodule| directives of its own, these are +% also exported to the importing module. +% +% Thus the \DescribeMacro{\importmodule}|\importmodule| declarations induce the +% {\atwintoo{semantic}{inheritance}{relation}}. Figure~\ref{exf:importmodule} shows a +% module that imports the semantic macros from three others. In the simplest form, +% |\importmodule{|\meta{mod}|}| will activate the semantic macros and concepts declared by +% |\symdef| and |\termdef| in module \meta{mod} in the current module\footnote{Actually, +% in the current {\TeX} group, therefore \texttt{\textbackslash importmodule} should be +% placed directly after the \texttt{\textbackslash begin\{module\}}.}. To understand the +% mechanics of this, we need to understand a bit of the internals. The |module| +% environment sets up an internal macro pool, to which all the macros defined by the +% |\symdef| and |\termdef| declarations are added; |\importmodule| only activates this +% macro pool. Therefore |\importmodule{|\meta{mod}|}| can only work, if the {\TeX} parser +% --- which linearly goes through the {\sTeX} sources --- already came across the module +% \meta{mod}. In many situations, this is not obtainable; e.g. for ``semantic forward +% references'', where symbols or concepts are previewed or motivated to knowledgeable +% readers before they are formally introduced or for modularizations of documents into +% multiple files. To enable situations like these, the |module| package uses auxiliary +% files called {\textbf{\sTeX module signatures}}. For any file, \meta{file}|.tex|, we +% generate a corresponding \sTeX module signature \meta{file}|.sms| with the |sms| utility +% (see also Limitation~\ref{sec:limitations:sms}), which contains (copies of) all +% |\begin|/|\end{module}|, |\importmodule|, |\symdef|, and |\termdef| invocations in +% \meta{file}|.tex|. The value of an \sTeX module signature is that it can be loaded +% instead its corresponding \sTeX document, if we are only interested in the semantic +% macros. So |\importmodule[|\meta{filepath}|]{|\meta{mod}|}| will load the \sTeX module +% signature \meta{filepath}|.sms| (if it exists and has not been loaded before) and +% activate the semantic macros from module \meta{mod} (which was supposedly defined in +% \meta{filepath}|.tex|). Note that since \meta{filepath}|.sms| contains all +% |\importmodule| statements that \meta{filepath}|.tex| does, an |\importmodule| +% recursively loads all necessary files to supply the semantic macros inherited by the +% current module. +% +% The |\importmodule| macro has a variant +% \DescribeMacro{importmodulevia}|\importmodulevia| that allows the specification of a +% theory morphism to be applied. |\importmodulevia{|\meta{thyid}|}{|\meta{assignments}|}| +% specifies the ``source theory'' via its identifier \meta{thyid} and the morphism by +% \meta{assignments}. There are three kinds: +% \begin{compactdesc} +% \item[symbol assignments] via +% \DescribeMacro{\vassign}|\vassign{|\meta{sym}|}{|\meta{exp}|}|, which defines the +% symbol \meta{sym} introduced in the current theory by an expression \meta{exp} in the +% source theory. +% \item[term assignments] via +% \DescribeMacro{\tassign}|\tassign[||\meta{source-cd}]{|\meta{tname}|}{|\meta{source-tname}|}|, +% which defines the term with name \meta{tname} in the current via a term with +% name\meta{source-tname} in the theory \meta{source-cd} whose default value is the +% source theory. +% \item[term text assignments] via +% \DescribeMacro{\ttassign}|\tassign{|\meta{tname}|}{|\meta{text}|}|, which defines a +% term with name \meta{tname} in the current theory via a definitional text. +% \end{compactdesc} +% +%\begin{exfig} +% \begin{verbatim} +% \begin{module}[id=ring] +% \begin{importmodulevia}{monoid} +% \vassign{rbase}\magbase +% \vassign{rtimesOp}\magmaop +% \vassign{rone}\monunit +% \end{importmodulevia} +% \symdef{rbase}{G} +% \symdef[name=rtimes]{rtimesOp}{\cdot} +% \symdef{rtimes}[2]{\infix\rtimesOp{#1}{#2}} +% \symdef{rone}{1} +% \begin{importmodulevia}{cgroup} +% \vassign{rplus}\magmaop +% \vassign{rzero}\monunit +% \vassign{rinvOp}\cginvOp +% \end{importmodulevia} +% \symdef[name=rplus]{rplusOp}{+} +% \symdef{rplus}[2]{\infix\rplusOp{#1}{#2}} +% \symdef[name=rminus]{rminusOp}{-} +% \symdef{rminus}[1]{\infix\rminusOp{#1}{#2}} +% ... +% \end{module} +% \end{verbatim} +% \caption{A Module for Rings with inheritance from monoids and commutative groups}\label{fig:ring} +% \end{exfig} +% +% The \DescribeMacro{\metalanguage} |metalanguage| macro is a variant of +% \lstinline|importmodule| that imports the meta language, i.e. the language in which the +% meaning of the new symbols is expressed. For mathematics this is often first-order logic +% with some set theory; see~\cite{RabKoh:WSMSML10} for discussion. +% +% \subsection{Dealing with multiple Files}\label{sec:user:multiple} +% +% The infrastructure presented above works well if we are dealing with small files or +% small collections of modules. In reality, collections of modules tend to grow, get +% re-used, etc, making it much more difficult to keep everything in one file. This general +% trend towards increasing entropy is aggravated by the fact that modules are very +% self-contained objects that are ideal for re-used. Therefore in the absence of a +% content management system for {\LaTeX} document (fragments), module collections tend to +% develop towards the ``one module one file'' rule, which leads to situations with lots +% and lots of little files. +% +% Moreover, most mathematical documents are not self-contained, i.e. they do not build up +% the theory from scratch, but pre-suppose the knowledge (and notation) from other +% documents. In this case we want to make use of the semantic macros from these +% prerequisite documents without including their text into the current document. One way +% to do this would be to have {\LaTeX} read the prerequisite documents without producing +% output. For efficiency reasons, {\stex} chooses a different route. It comes with a +% utility |sms| (see Section~\ref{sec:utilities}) that exports the modules and macros +% defined inside them from a particular document and stores them inside |.sms| files. This +% way we can avoid overloading LaTeX with useless information, while retaining the +% important information which can then be imported in a more efficient way. +% +% \DescribeMacro{\importmodule} For such situations, the |\importmodule| macro can be +% given an optional first argument that is a path to a file that contains a path to the +% module file, whose module definition (the |.sms| file) is read. Note that the +% |\importmodule| macro can be used to make module files truly self-contained. To arrive +% at a file-based content management system, it is good practice to reuse the module +% identifiers as module names and to prefix module files with corresponding +% |\importmodule| statements that pre-load the corresponding module files. +% +%\begin{exfig} +% \begin{verbatim} +% \begin{module}[id=foo] +% \importmodule[../other/bar]{bar} +% \importmodule[../mycolleaguesmodules]{baz} +% \importmodule[../other/bar]{foobar} +% ... +% \end{module} +% \end{verbatim} +% \vspace{-1.7em} +% \caption{Self-contained Modules via {\texttt{importmodule}}}\label{exf:importmodule} +% \end{exfig} +% +% In Example~\ref{exf:importmodule}, we have shown the typical setup of a module +% file. The |\importmodule| macro takes great care that files are only read once, as +% {\sTeX} allows multiple inheritance and this setup would lead to an exponential (in the +% module inheritance depth) number of file loads. +% +% Sometimes we want to import an existing {\omdoc} theory\footnote{{\omdoc} theories are +% the counterpart of {\stex} modules.} $\widehat\cT$ into (the {\omdoc} document +% $\widehat\cD$ generated from) a {\stex} document $\cD$. Naturally, we have to provide an +% {\stex} stub module $\cT$ that provides |\symdef| declarations for all symbols we use in +% $\cD$. In this situation, we use\DescribeMacro{\importOMDocmodule} +% |\importOMDocmodule[|\meta{spath}|]{|\meta{OURI}|}{|\meta{name}|}|, where \meta{spath} +% is the file system path to $\cT$ (as in |\importmodule|, this argument must not contain +% the file extension), \meta{OURI} is the URI to the {\omdoc} module (this time with +% extension), and \meta{name} is the name of the theory $\widehat\cT$ and the module in +% $\cT$ (they have to be identical for this to work). Note that since the \meta{spath} +% argument is optional, we can make ``local imports'', where the stub $\cT$ is in $\cD$ +% and only contains the |\symdef|s needed there. +% +% Note that the recursive (depth-first) nature of the file loads induced by this setup is +% very natural, but can lead to problems with the depth of the file stack in the {\TeX} +% formatter (it is usually set to something like 15\footnote{If you have sufficient rights +% to change your {\TeX} installation, you can also increase the variable +% {\texttt{max\_in\_open}} in the relevant {\texttt{texmf.cnf}} file. Setting it to 50 +% usually suffices}). Therefore, it may be necessary to circumvent the recursive load +% pattern providing (logically spurious) |\importmodule| commands. Consider for instance +% module |bar| in Example~\ref{exf:importmodule}, say that |bar| already has load depth +% 15, then we cannot naively import it in this way. If module |bar| depended say on a +% module |base| on the critical load path, then we could add a statement +% \DescribeMacro{\requiremodules} |\requiremodules{../base}| in the second line. This +% would load the modules from |../base.sms| in advance (uncritical, since it has load +% depth 10) without activating them, so that it would not have to be re-loaded in the +% critical path of the module |foo|. Solving the load depth problem. +% +% \DescribeMacro{\sinput} In all of the above, we do not want to load an |sms| file, if +% the corresponding file has already been loaded, since the semantic macros are already in +% memory. Therefore the |modules| package supplies a semantic variant of the |\input| +% macro, which records in an internal register that the modules in the file have already +% been loaded. Thus if we consistently use |\sinput| instead of |\input| or |\include| for +% files that contain modules\footnote{files without modules should be treated by the +% regular {\LaTeX} input mechanism, since they do not need to be registered.}, we can +% prevent double loading of files and therefore gain efficiency. The +% \DescribeMacro{\sinputref} |\sinputref| macro behaves just like |\sinput| in the +% {\LaTeX} workflow, but in the {\latexml} conversion process creates a reference to the +% transformed version of the input file instead. +% +% Finally, the separation of documents into multiple modules often profits from a symbolic +% management of file paths. To simplify this, the |modules| package supplies the +% \DescribeMacro{\defpath}|\defpath| macro: |\defpath{|\meta{cname}|}{|\meta{path}|}| +% defines a command, so that |\|\meta{csname}|{|\meta{name}|}| expands to +% \meta{path}|/|\meta{name}. So we could have used +% \begin{lstlisting} +% \defpath{OPaths}{../other} +% \importmodule[\OPhats{bar}]{bar} +% \end{lstlisting} +% instead of the second line in Example~\ref{exf:importmodule}. The variant |\OPaths| has +% the big advantage that we can get around the fact that {\TeX/\LaTeX} does not set the +% current directory in |\input|, so that we can use systematically deployed +% |\defpath|-defined path macros to make modules relocatable by defining the path macros +% locally. +% +% \subsection{Including Externally Defined Semantic Macros } +% +% In some cases, we use an existing {\LaTeX} macro package for typesetting objects that +% have a conventionalized mathematical meaning. In this case, the macros are ``semantic'' +% even though they have not been defined by a |\symdef|. This is no problem, if we are +% only interested in the {\LaTeX} workflow. But if we want to e.g. transform them to +% {\omdoc} via {\latexml}, the {\latexml} bindings will need to contain references to an +% {\omdoc} theory that semantically corresponds to the {\LaTeX} package. In particular, +% this theory will have to be imported in the generated {\omdoc} file to make it +% {\omdoc}-valid. +% +% \DescribeMacro{\requirepackage} To deal with this situation, the |modules| package +% provides the |\requirepackage| macro. It takes two arguments: a package name, and a URI +% of the corresponding {\omdoc} theory. In the {\LaTeX} workflow this macro behaves like a +% |\usepackage| on the first argument, except that it can --- and should --- be used +% outside the {\LaTeX} preamble. In the {\latexml} workflow, this loads the {\latexml} +% bindings of the package specified in the first argument and generates an appropriate +% |imports| element using the URI in the second argument. +% +% \subsection{Views}\label{sec:user:views} +% +% A view is a mapping between modules, such that all model assumptions (axioms) of the +% source module are satisfied in the target module. \ednote{Document and make Examples} +% +% \section{Limitations \& Extensions}\label{sec:limitations} +% +% In this section we will discuss limitations and possible extensions of the |modules| +% package. Any contributions and extension ideas are welcome; please discuss ideas, +% requests, fixes, etc on the {\sTeX} TRAC~\cite{sTeX:online}. +% +% \subsection{Perl Utility \texttt{sms}}\label{sec:limitations:sms} +% +% Currently we have to use an external perl utility |sms| to extract \sTeX module +% signatures from \sTeX files. This considerably adds to the complexity of the \sTeX +% installation and workflow. If we can solve security setting problems that allows us to +% write to \sTeX module signatures outside the current directory, writing them from \sTeX +% may be an avenue of future development see~\cite[issue \#1522]{sTeX:online} for a +% discussion. +% +% \subsection{Qualified Imports}\label{sec:limitations:qualified-imports} +% +% In an earlier version of the \texttt{modules} package we used the \texttt{usesqualified} +% for importing macros with a disambiguating prefix (this is used whenever we have +% conflicting names for macros inherited from different modules). This is not accessible +% from the current interface. We need something like a |\importqualified| macro for this; +% see~\cite[issue \#1505]{sTeX:online}. Until this is implemented the infrastructure is +% turned off by default, but we have already introduced the +% \DescribeMacro{qualifiedimports}|qualifiedimports| option for the future. +% +% \subsection{Error Messages}\label{sec:limitations:errormsg} +% +% The error messages generated by the |modules| package are still quite bad. For instance +% if |thyA| does note exists we get the cryptic error message +% \begin{verbatim} +% ! Undefined control sequence. +% \module@defs@thyA ...hy +% \expandafter \mod@newcomma... +% l.490 ...ortmodule{thyA} +% \end{verbatim} +% This should definitely be improved. +% +% \subsection{Crossreferencing}\label{sec:limitations:crossref} +% +% Note that the macros defined by |\symdef| are still subject to the normal {\TeX} scoping +% rules. Thus they have to be at the top level of a module to be visible throughout the +% module as intended. As a consequence, the location of the |\symdef| elements cannot be +% used as targets for crossreferencing, which is currently supplied by the |statement| +% package~\ctancite{Kohlhase:smms}. A way around this limitation would be to import +% the current module from the \sTeX module signature (see Section~\ref{sec:modules}) via +% the |\importmodule| declaration. +% +% \subsection{No Forward Imports}\label{sec:limitations:forward-imports} +% +% {\sTeX} allows imports in the same file via |\importmodule{|\meta{mod}|}|, but due to +% the single-pass linear processing model of {\TeX}, \meta{mod} must be the name of a +% module declared {\emph{before}} the current point. So we cannot have forward imports as +% in +% \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. +% +% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\newpage\printbibliography}\newpage +% +% \section{The Implementation} +% +% The |modules| package generates two files: the {\LaTeX} package (all the code between +% {\textlangle\textsf{*package}\textrangle} and {\textsf{\textlangle/package\textrangle}}) +% and the {\latexml} bindings (between {\textsf{\textlangle*ltxml\textrangle}} and +% {\textsf{\textlangle/ltxml\textrangle}}). We keep the corresponding code fragments +% together, since the documentation applies to both of them and to prevent them from +% getting out of sync. +% +% \subsection{Package Options}\label{sec:impl:options} +% +% We declare some switches which will modify the behavior according to the package +% options. Generally, an option |xxx| will just set the appropriate switches to true +% (otherwise they stay false). +% \begin{macrocode} +%<*package> +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\newif\ifmod@show\mod@showfalse +\DeclareOption{showmods}{\mod@showtrue} +\newif\ifmod@qualified\mod@qualifiedfalse +\DeclareOption{qualifiedimports}{\mod@qualifiedtrue} +% \end{macrocode} +% Finally, we need to declare the end of the option declaration section to {\LaTeX}. +% \begin{macrocode} +\ProcessOptions +% +% \end{macrocode} +% +% {\latexml} does not support module options yet, so we do not have to do anything here +% for the {\latexml} bindings. We only set up the {\perl} packages (and tell {\texttt{emacs}} +% about the appropriate mode for convenience +% +% The next measure is to ensure that the |sref| and |xcomment| packages are loaded (in the +% right version). For {\latexml}, we also initialize the package inclusions. +% \begin{macrocode} +%<*package> +\RequirePackage{sref} +\RequirePackage{xspace} +\RequirePackage{xcomment} +% +%<*ltxml> +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Global; +use LaTeXML::Package; +% +% \end{macrocode} +% +% \subsection{Modules and Inheritance}\label{sec:impl:modules} +% +% We define the keys for the |module| environment and the actions that are undertaken, +% when the keys are encountered. +% +% \begin{macro}{module:cd} +% This |KeyVal| key is only needed for {\latexml} at the moment; use this to specify a +% content dictionary name that is different from the module name. +% \begin{macrocode} +%<*package> +\addmetakey{module}{cd} +\addmetakey{module}{title} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{module:id} +% For a module with |[id=|\meta{name}|]|, we have a macro |\module@defs@|\meta{name} +% that acts as a repository for semantic macros of the current module. I will be called +% by |\importmodule| to activate them. We will add the internal forms of the semantic +% macros whenever |\symdef| is invoked. To do this, we will need an unexpended form +% |\this@module| that expands to |\module@defs@|\meta{name}; we define it first and then +% initialize |\module@defs@|\meta{name} as empty. Then we do the same for qualified +% imports as well (if the |qualifiedimports| option was specified). Furthermore, we save +% the module name in |\mod@id| and the module path in |\|\meta{name}|@cd@file@base| +% which we add to |\module@defs@|\meta{name}, so that we can use it in the importing +% module. +% \begin{macrocode} +%<*package> +\define@key{module}{id}{% +\edef\this@module{\expandafter\noexpand\csname module@defs@#1\endcsname}% +\global\@namedef{module@defs@#1}{}% +\ifmod@qualified +\edef\this@qualified@module{\expandafter\noexpand\csname module@defs@qualified@#1\endcsname}% +\global\@namedef{module@defs@qualified@#1}{}% +\fi +\def\mod@id{#1}% +\expandafter\edef\csname #1@cd@file@base\endcsname{\mod@path}% +\expandafter\g@addto@macro\csname module@defs@#1\expandafter\endcsname\expandafter% +{\expandafter\def\csname #1@cd@file@base\expandafter\endcsname\expandafter{\mod@path}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{module@heading} +% Then we make a convenience macro for the module heading. This can be customized. +% \begin{macrocode} +\newcounter{module}[section] +\newcommand\module@heading{\stepcounter{module}% +\noindent{\textbf{Module} \thesection.\themodule [\mod@id]}% +\sref@label@id{Module \thesection.\themodule [\mod@id]}% +\ifx\module@title\@empty :\quad\else\quad(\module@title)\hfill\\\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{module@footer} +% Then we make a convenience macro for the module heading. This can be customized. +% \begin{macrocode} +\newcommand\module@footer{\noindent{\textbf{EndModule} \thesection.\themodule}} +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{module} +% Finally, we define the begin module command for the module environment. All the work +% has already been done in the keyval bindings, so this is very simple. +% \begin{macrocode} +\newenvironment{module}[1][]% +{\metasetkeys{module}{#1}\ifmod@show\module@heading\fi} +{\ifmod@show\module@footer\fi} +% +% \end{macrocode} +% for the {\latexml} bindings, we have to do the work all at once. +% \begin{macrocode} +%<*ltxml> +DefKeyVal('Module','id','Semiverbatim'); +DefKeyVal('Module','cd','Semiverbatim'); +DefEnvironment('{module} OptionalKeyVals:Module', + "?#excluded()(#body)", +# beforeDigest=>\&useTheoryItemizations, + afterDigestBegin=>sub { + my($stomach, $whatsit)=@_; + $whatsit->setProperty(excluded=>LookupValue('excluding_modules')); + + my $keys = $whatsit->getArg(1); + my($id, $cd)=$keys + && map(ToString($keys->getValue($_)),qw(id cd)); + #make sure we have an id or give a stub one otherwise: + if (not $id) { + #do magic to get a unique id for this theory + #$whatsit->setProperties(beginItemize('theory')); + #$id = ToString($whatsit->getProperty('id')); + # changed: beginItemize returns the hash returned by RefStepCounter. + # RefStepCounter deactivates any scopes for the current value of the + # counter which causes the stored prop. of the env. not to be + # visible anymore. + $id = LookupValue('stex:theory:id') || 0; + AssignValue('stex:theory:id', $id+1); + $id = "I$id"; + } + $cd = $id unless $cd; + # update the catalog with paths for modules + my $module_paths = LookupValue('module_paths') || {}; + $module_paths->{$id} = LookupValue('last_module_path'); + AssignValue('module_paths', $module_paths, 'global'); + + #Update the current module position + AssignValue(current_module => $id); + AssignValue(module_cd => $cd) if $cd; + + #activate the module in our current scope + $STATE->activateScope("module:".$id); + + #Activate parent scope, if present + my $parentmod = LookupValue('parent_module'); + use_module($parentmod) if $parentmod; + #Update the current parent module + AssignValue("parent_of_$id"=>$parentmod,'global'); + AssignValue("parent_module" => $id); + return; }, + afterDigest => sub { + #Move a step up on the module ancestry + AssignValue("parent_module" => LookupValue("parent_of_".LookupValue("parent_module"))); + return; + }); +% +% \end{macrocode} +% \end{environment} +% +% +% \begin{macro}{usemodule} +% The |use_module| subroutine performs depth-first load of definitions of the used +% modules +% \begin{macrocode} +%<*ltxml> +sub use_module { + my($module,%ancestors)=@_; + $module = ToString($module); + if (defined $ancestors{$module}) { + Fatal(":module \"$module\" leads to import cycle!"); + } + $ancestors{$module}=1; + # Depth-first load definitions from used modules, disregarding cycles + foreach my $used_module (@{ LookupValue("module_${module}_uses") || []}){ + use_module($used_module,%ancestors); + } + # then load definitions for this module + $STATE->activateScope("module:$module"); }#$ +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\activate@defs} +% To activate the |\symdef|s from a given module \meta{mod}, we call the macro +% |\module@defs@|\meta{mod}. +% \begin{macrocode} +%<*package> +\def\activate@defs#1{\csname module@defs@#1\endcsname} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\export@defs} +% To export a the |\symdef|s from the current module, we all the macros +% |\module@defs@|\meta{mod} to |\module@defs@|\meta{mod} (if the current module has a +% name and it is \meta{mod}) +% \begin{macrocode} +%<*package> +\def\export@defs#1{\@ifundefined{mod@id}{}% +{\expandafter\expandafter\expandafter\g@addto@macro\expandafter% +\this@module\expandafter{\csname module@defs@#1\endcsname}}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\coolurion/off} +% \ednote{@DG: this needs to be documented somewhere in section 1} +% \begin{macrocode} +%<*package> +\def\coolurion{} +\def\coolurioff{} +% +%<*ltxml> +DefMacro('\coolurion',sub {AssignValue('cooluri'=>1);}); +DefMacro('\coolurioff',sub {AssignValue('cooluri'=>0);}); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\importmodule} +% The |\importmodule[|\meta{file}|]{|\meta{mod}|}| macro is an interface macro that +% loads \meta{file} and activates and re-exports the |\symdef|s from module +% \meta{mod}. It also remembers the file name in |\mod@path|. +% \begin{macrocode} +%<*package> +\newcommand{\importmodule}[2][]{{\def\mod@path{#1}% +\ifx\mod@path\@empty\else\requiremodules{#1}\fi}% +\activate@defs{#2}\export@defs{#2}} +% +%<*ltxml> +sub omext { + my ($mod)=@_; my $dest=''; + $mod = ToString($mod); + if ($mod) { + #We need a constellation of abs_path invocations + # to make sure that all symbolic links get resolved + if ($mod=~/^(\w)+:\/\//) { $dest=$mod; } else { + my ($d,$f,$t) = pathname_split(abs_path($mod)); + $d = pathname_relative(abs_path($d),abs_path(cwd())); + $dest=$d."/".$f; + } + } + $dest.=".omdoc" if (ToString($mod) && !LookupValue('cooluri')); + return Tokenize($dest);} +sub importmoduleI { + my($stomach,$whatsit)=@_; + my $file = ToString($whatsit->getArg(1)); + my $omdocmod = $file.".omdoc" if $file; + my $module = ToString($whatsit->getArg(2)); + my $containing_module = LookupValue('current_module'); + AssignValue('last_import_module',$module); + #set the relation between the current module and the one to be imported + PushValue("module_".$containing_module."_uses"=>$module) if $containing_module; + #check if we've already loaded this module file or no file path given + if((!$file) || (LookupValue('file_'.$module.'_loaded'))) {use_module($module);} #if so activate it! + else { + #if not: + my $gullet = $stomach->getGullet; + #1) mark as loaded + AssignValue('file_'.$module.'_loaded' => 1, 'global'); + #open a group for its definitions so that they are localized + $stomach->bgroup; + #update the last module path + AssignValue('last_module_path', $file); + #queue the closing tag for this module in the gullet where it will be executed + #after all other definitions of the imported module have been taken care of + $gullet->unread(Invocation(T_CS('\end@requiredmodule'), Tokens(Explode($module)))->unlist); + #we only need to load the sms definitions without generating any xml output, so we set the flag to 1 + AssignValue('excluding_modules' => 1); + #queue this module's sms file in the gullet so that its definitions are imported + $gullet->input($file,['sms']); + } + return;} +DefConstructor('\importmodule OptionalSemiverbatim {}', + "", + afterDigest=>sub{ importmoduleI(@_)}); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\importmodulevia} +% The |importmodulevia| environment just calls |\importmodule|, but to get around the +% group, we first define a local macro |\@@doit|, which does that and can be called with +% an |\aftergroup| to escape the environment groupling introduced by +% |importmodulevia|. For {\latexml}, we have to\ednote{MK@DG: needs implementation} +% \begin{macrocode} +%<*package> +\newenvironment{importmodulevia}[2][]{\gdef\@@doit{\importmodule[#1]{#2}}% +\ifmod@show\par\noindent importing module #2 via \@@doit\fi} +{\aftergroup\@@doit\ifmod@show end import\fi} +% +%<*ltxml> +DefMacro('\importmodulevia OptionalSemiverbatim {}','\endgroup\importmoduleI[#1]{#2}\begin{importmoduleenv}[#1]{#2}'); +DefMacroI('\end{importmodulevia}',undef,'\end{importmoduleenv}'); +DefEnvironment('{importmoduleenv} OptionalSemiverbatim {}', + "" + . "#body" + .""); +DefConstructor('\importmoduleI OptionalSemiverbatim {}', '', + afterDigest=>sub{ importmoduleI(@_)}); +% +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{vassign} +% \begin{macrocode} +%<*package> +\newcommand\vassign[2]{\ifmod@show\ensuremath{#1\mapsto #2}, \fi} +% +%<*ltxml> +DefConstructor('\vassign{}{}', + "" + . "#1" + . "#2" + .""); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{tassign} +% \begin{macrocode} +%<*package> +\newcommand\tassign[3][]{\ifmod@show #2\ensuremath{\mapsto} #3, \fi} +% +%<*ltxml> +DefConstructor('\tassign[]{}{}', + "" + . "" + . "" + ."", + afterDigest=> sub { + my ($stomach,$whatsit) = @_; + $whatsit->setProperty('currentModule',LookupValue("current_module")); + $whatsit->setProperty('lastImportModule',LookupValue("last_import_module")); + }); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{ttassign} +% \begin{macrocode} +%<*package> +\newcommand\ttassign[3][]{\ifmod@show #1\ensuremath{\mapsto} ``#2'', \fi} +% +%<*ltxml> +DefConstructor('\ttassign{}{}', + "" + . "#1" + . "#2" + .""); +% +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\importOMDocmodule} +% for the {\LaTeX} side we can just re-use |\importmodule|, for the {\latexml} side we +% have a full URI anyways. So things are easy. +% \begin{macrocode} +%<*package> +\newcommand{\importOMDocmodule}[3][]{\importmodule[#1]{#3}} +% +%<*ltxml> +DefConstructor('\importOMDocmodule OptionalSemiverbatim {}{}',"", +afterDigest=>sub{ + #Same as \importmodule, just switch second and third argument. + my ($stomach,$whatsit) = @_; + my $path = $whatsit->getArg(1); + my $ouri = $whatsit->getArg(2); + my $module = $whatsit->getArg(3); + $whatsit->setArgs(($path, $module,$ouri)); + importmoduleI($stomach,$whatsit); + return; +}); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\metalanguage} +% |\metalanguage| behaves exactly like |\importmodule| for formatting. For {\latexml}, +% we only add the |type| attribute. +% \begin{macrocode} +%<*package> +\let\metalanguage=\importmodule +% +%<*ltxml> +DefConstructor('\metalanguage OptionalSemiverbatim {}', + "", + afterDigest=>sub{ importmoduleI(@_)}); +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Semantic Macros}\label{sec:impl:symdef} +% +% \begin{macro}{\mod@newcommand} +% We first hack the {\LaTeX} kernel macros to obtain a version of the |\newcommand| +% macro that does not check for definedness. This is just a copy of the code from +% |latex.ltx| where I have removed the |\@ifdefinable| check.\footnote{Someone must have +% done this before, I would be very happy to hear about a package that provides this.} +% \begin{macrocode} +%<*package> +\def\mod@newcommand{\@star@or@long\mod@new@command} +\def\mod@new@command#1{\@testopt{\@mod@newcommand#1}0} +\def\@mod@newcommand#1[#2]{\kernel@ifnextchar [{\mod@xargdef#1[#2]}{\mod@argdef#1[#2]}} +\long\def\mod@argdef#1[#2]#3{\@yargdef#1\@ne{#2}{#3}} +\long\def\mod@xargdef#1[#2][#3]#4{\expandafter\def\expandafter#1\expandafter{% +\expandafter\@protected@testopt\expandafter #1\csname\string#1\endcsname{#3}}% +\expandafter\@yargdef\csname\string#1\endcsname\tw@{#2}{#4}} +% +% \end{macrocode} +% \end{macro} +% +% Now we define the optional KeyVal arguments for the |\symdef| form and the actions that +% are taken when they are encountered. +% +% \begin{macro}{symdef:keys} +% The optional argument local specifies the scope of the function to be defined. If +% local is not present as an optional argument then |\symdef| assumes the scope of the +% function is global and it will include it in the pool of macros of the current +% module. Otherwise, if local is present then the function will be defined only locally +% and it will not be added to the current module (i.e. we cannot inherit a local +% function). Note, the optional key local does not need a value: we write +% |\symdef[local]{somefunction}[0]{some expansion}|. The other keys are not used in the +% {\LaTeX} part. +% \begin{macrocode} +%<*package> +\newif\if@symdeflocal +\define@key{symdef}{local}[true]{\@symdeflocaltrue} +\define@key{symdef}{name}{} +\define@key{symdef}{assocarg}{} +\define@key{symdef}{bvars}{} +\define@key{symdef}{bvar}{} +\define@key{symdef}{bindargs}{} +% +% \end{macrocode} +% \end{macro} +% \ednote{MK@MK: we need to document the binder keys above.} +% \begin{macro}{\symdef} +% The the |\symdef|, and |\@symdef| macros just handle optional arguments. +% \begin{macrocode} +%<*package> +\def\symdef{\@ifnextchar[{\@symdef}{\@symdef[]}} +\def\@symdef[#1]#2{\@ifnextchar[{\@@symdef[#1]{#2}}{\@@symdef[#1]{#2}[0]}} +% \end{macrocode} +% next we locally abbreviate |\mod@newcommand| to simplify argument passing. +% \begin{macrocode} +\def\@mod@nc#1{\mod@newcommand{#1}[1]} +% \end{macrocode} +% now comes the real meat: the |\@@symdef| macro does two things, it adds the macro +% definition to the macro definition pool of the current module and also provides it. +% \begin{macrocode} +\def\@@symdef[#1]#2[#3]#4{% +% \end{macrocode} +% We use a switch to keep track of the local optional argument. We initialize the switch +% to false and set all the keys that have been provided as arguments: |name|, |local|. +% \begin{macrocode} +\@symdeflocalfalse\setkeys{symdef}{#1}% +% \end{macrocode} +% First, using |\mod@newcommand| we initialize the intermediate macro +% |\module@|\meta{sym}|@pres@|, the one that can be extended with |\symvariant| +% \begin{macrocode} +\expandafter\mod@newcommand\csname modules@#2@pres@\endcsname[#3]{#4}% +% \end{macrocode} +% and then we define the actual semantic macro. Note that this can take an optional +% argument, for which we provide with |\@ifnextchar| and an internal macro |\@|\meta{sym}, +% which when invoked with an optional argument \meta{opt} calls +% |\modules@|\meta{sym}|@pres@|\meta{opt}. +% \begin{macrocode} +\expandafter\def\csname #2\endcsname% +{\@ifnextchar[{\csname modules@#2\endcsname}{\csname modules@#2\endcsname[]}}% +\expandafter\def\csname modules@#2\endcsname[##1]% +{\csname modules@#2@pres@##1\endcsname}% +% \end{macrocode} +% Finally, we prepare the internal macro to be used in the |\symref| call. +% \begin{macrocode} +\expandafter\@mod@nc\csname mod@symref@#2\expandafter\endcsname\expandafter% +{\expandafter\mod@termref\expandafter{\mod@id}{#2}{##1}}% +% \end{macrocode} +% We check if the switch for the local scope is set: if it is we are done, since this +% function has a local scope. Similarly, if we are not inside a module, which we could +% export from. +% \begin{macrocode} +\if@symdeflocal\else% +\@ifundefined{mod@id}{}{% +% \end{macrocode} +% Otherwise, we add three functions to the module's pool of defined macros using +% |\g@addto@macro|. We first add the definition of the intermediate function +% |\modules@|\meta{sym}|@pres@|. +% \begin{macrocode} +\expandafter\g@addto@macro\this@module% +{\expandafter\mod@newcommand\csname modules@#2@pres@\endcsname[#3]{#4}}% +% \end{macrocode} +% Then we add add the definition of |\|\meta{sym} in terms of the function |\@|\meta{sym} +% to handle the optional argument. +% \begin{macrocode} +\expandafter\g@addto@macro\this@module% +{\expandafter\def\csname#2\endcsname% +{\@ifnextchar[{\csname modules@#2\endcsname}{\csname modules@#2\endcsname[]}}}% +% \end{macrocode} +% Finally, we add add the definition of |\@|\meta{sym}, which calls the intermediate +% function. +% \begin{macrocode} +\expandafter\g@addto@macro\this@module% +{\expandafter\def\csname modules@#2\endcsname[##1]% +{\csname modules@#2@pres@##1\endcsname}}% +% \end{macrocode} +% We also add |\mod@symref@|\meta{sym} macro to the macro pool so that the |\symref| macro +% can pick it up. +% \begin{macrocode} +\expandafter\g@addto@macro\csname module@defs@\mod@id\expandafter\endcsname\expandafter% +{\expandafter\@mod@nc\csname mod@symref@#2\expandafter\endcsname\expandafter% +{\expandafter\mod@termref\expandafter{\mod@id}{#2}{##1}}}% +% \end{macrocode} +% Finally, using |\g@addto@macro| we add the two functions to the qualified version of the +% module if the |qualifiedimports| option was set. +% \begin{macrocode} +\ifmod@qualified% +\expandafter\g@addto@macro\this@qualified@module% +{\expandafter\mod@newcommand\csname modules@#2@pres@qualified\endcsname[#3]{#4}}% +\expandafter\g@addto@macro\this@qualified@module% +{\expandafter\def\csname#2atqualified\endcsname{\csname modules@#2@pres@qualified\endcsname}}% +\fi% +% \end{macrocode} +% So now we only need to close all brackets and the macro is done. +% \begin{macrocode} +}\fi} +% +% \end{macrocode} +% In the {\latexml} bindings, we have a top-level macro that delegates the work to two +% internal macros: |\@symdef|, which defines the content macro and |\@symdef@pres|, which +% 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 { + my($self,$keyval,$pres)=@_; + my $name = KeyVal($keyval,'name') if $keyval; + #Rewrite this token + my $scopes = $STATE->getActiveScopes; + 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,$pres)->unlist); + }); +DefMacro('\symdef OptionalKeyVals:symdef {}[]{}', + sub { + my($self,@args)=@_; + ((Invocation(T_CS('\@symdef'),@args)->unlist), + (LookupValue('excluding_modules') ? () + : (Invocation(T_CS('\@symdef@pres'), @args)->unlist))); }); + +#Current list of recognized formatter command sequences: +our @PresFormatters = qw (infix prefix postfix assoc mixfixi mixfixa mixfixii mixfixia mixfixai mixfixaii mixfixiii); +DefPrimitive('\@symdef OptionalKeyVals:symdef {}[]{}', sub { + my($stomach,$keys,$cs,$nargs,$presentation)=@_; + my($name,$cd,$role,$bvars,$bvar)=$keys + && map($_ && $_->toString,map($keys->getValue($_), qw(name cd role + bvars bvar))); + $cd = LookupValue('module_cd') unless $cd; + $name = $cs unless $name; + #Store for later lookup + AssignValue("symdef.".ToString($cs).".cd"=>ToString($cd),'global'); + AssignValue("symdef.".ToString($cs).".name"=>ToString($name),'global'); + $nargs = (ref $nargs ? $nargs->toString : $nargs || 0); + my $module = LookupValue('current_module'); + my $scope = (($keys && ($keys->getValue('local') || '' eq 'true')) ? 'module_local' : 'module').":".$module; + #The DefConstructorI Factory is responsible for creating the \symbol command sequences as dictated by the \symdef + DefConstructorI("\\".$cs->toString,convertLaTeXArgs($nargs+1,'default'), sub { + my ($document,@args) = @_; + my $icvariant = shift @args; + my @props = @args; + #Lookup the presentation from the State, if a variant: + @args = splice(@props,0,$nargs); + my %prs = @props; + my $localpres = $prs{presentation}; + $prs{isbound} = "BINDER" if ($bvars || $bvar); + my $wrapped; + my $parent=$document->getNode; + if(! defined $parent->lookupNamespacePrefix("http://omdoc.org/ns")){ # namespace not already declared? + $document->getDocument->documentElement->setNamespace("http://omdoc.org/ns","omdoc",0); } + my $symdef_scope=$parent->exists('ancestor::omdoc:rendering'); #Are we in a \symdef rendering? + if (($localpres =~/^LaTeXML::Token/) && $symdef_scope) { + #Note: We should probably ask Bruce whether this maneuver makes sense + # We jump back to digestion, at a processing stage where it has been already completed + # Hence need to reinitialize all scopes and make a new group. This is probably expensive to do. + + my @toks = $localpres->unlist; + while(@toks && $toks[0]->equals(T_SPACE)){ shift(@toks); } # Remove leading space + my $formatters = join("|",@PresFormatters); + $formatters = qr/$formatters/; + $wrapped = (@toks && ($toks[0]->toString =~ /^\\($formatters)$/)); + $localpres = Invocation(T_CS('\@use'),$localpres) unless $wrapped; + # Plug in the provided arguments, doing a nasty reversion: + my @sargs = map (Tokens($_->revert), @args); + $localpres = Tokens(LaTeXML::Expandable::substituteTokens($localpres,@sargs)) if $nargs>0; + #Digest: + my $stomach = $STATE->getStomach; + $stomach->beginMode('inline-math'); + $STATE->activateScope($scope); + use_module($module); + use_module(LookupValue("parent_of_".$module)) if LookupValue("parent_of_".$module); + $localpres=$stomach->digest($localpres); + $stomach->endMode('inline-math'); + } + else { #Some are already digested to Whatsit, usually when dropped from a wrapping constructor + } + if ($nargs == 0) { + if (!$symdef_scope) { #Simple case - discourse flow, only a single XMTok + #Referencing XMTok when not in \symdefs: + $document->insertElement('ltx:XMTok',undef,(name=>$cs->toString, meaning=>$name,omcd=>$cd,role => $role,scriptpos=>$prs{'scriptpos'})); + } + else { + if ($symdef_scope && ($localpres =~/^LaTeXML::Whatsit/) && (!$wrapped)) {#1. Simple case: converts to a single token + $localpres->setProperties((name=>$cs->toString, meaning=>$name,omcd=>$cd,role => $role,scriptpos=>$prs{'scriptpos'})); + } + else { + #Experimental treatment - COMPLEXTOKEN + #$role=$role||'COMPLEXTOKEN'; + #$document->openElement('ltx:XMApp',role=>'COMPLEXTOKEN'); + #$document->insertElement('ltx:XMTok',undef,(name=>$cs->toString, meaning=>$name, omcd=>$cd, role=>$role, scriptpos=>$prs{'scriptpos'})); + #$document->openElement('ltx:XMWrap'); + #$document->absorb($localpres); + #$document->closeElement('ltx:XMWrap'); + #$document->closeElement('ltx:XMApp'); + } + #We need expanded presentation when invoked in \symdef scope: + + #Suppress errors from rendering attributes when absorbing. + #This is bad style, but we have no way around it due to the digestion acrobatics. + my $verbosity = $LaTeXML::Global::STATE->lookupValue('VERBOSITY'); + my $errors = $LaTeXML::Global::STATE->getStatus('error'); + $LaTeXML::Global::STATE->assignValue('VERBOSITY',-5); + + #Absorb presentation: + $document->absorb($localpres); + + #Return to original verbosity and error state: + $LaTeXML::Global::STATE->assignValue('VERBOSITY',$verbosity); + $LaTeXML::Global::STATE->setStatus('error',$errors); + + #Strip all/any wrappers: + #TODO: Ugly LibXML work, possibly do something smarter + my $parent = $document->getNode; + my @renderings=$parent->findnodes(".//omdoc:rendering"); + foreach my $render(@renderings) { + my $content=$render; + while ($content && $content->localname =~/^rendering|[X]?Math/) { + $content = $content->firstChild; + } + my $sibling = $content->parentNode->lastChild; + my $localp = $render->parentNode; + while ((defined $sibling) && (!$sibling->isSameNode($content))) { + my $clone = $sibling->cloneNode(1); + $localp->insertAfter($clone,$render); + $sibling = $sibling->previousSibling; + } + $render->replaceNode($content); + } + } + } + else {#2. Constructors with arguments + if (!$symdef_scope) { #2.1 Simple case, outside of \symdef declarations: + #Referencing XMTok when not in \symdefs: + my %ic = ($icvariant ne 'default') ? (ic=>'variant:'.$icvariant) : (); + $document->openElement('ltx:XMApp',%ic,scriptpos=>$prs{'scriptpos'},role=>$prs{'isbound'}); + $document->insertElement('ltx:XMTok',undef,(name=>$cs->toString, meaning=>$name, omcd=>$cd, role=>$role, scriptpos=>$prs{'operator_scriptpos'})); + foreach my $carg (@args) { + if ($carg =~/^LaTeXML::Token/) { + my $stomach = $STATE->getStomach; + $stomach->beginMode('inline-math'); + $carg=$stomach->digest($carg); + $stomach->endMode('inline-math'); + } + $document->openElement('ltx:XMArg'); + $document->absorb($carg); + $document->closeElement('ltx:XMArg'); + } + $document->closeElement('ltx:XMApp'); + } + else { #2.2 Complex case, inside a \symdef declaration + #We need expanded presentation when invoked in \symdef scope: + + #Suppress errors from rendering attributes when absorbing. + #This is bad style, but we have no way around it due to the digestion acrobatics. + my $verbosity = $LaTeXML::Global::STATE->lookupValue('VERBOSITY'); + my $errors = $LaTeXML::Global::STATE->getStatus('error'); + $LaTeXML::Global::STATE->assignValue('VERBOSITY',-5); + + #Absorb presentation: + $document->absorb($localpres); + + #Return to original verbosity and error state: + $LaTeXML::Global::STATE->assignValue('VERBOSITY',$verbosity); + $LaTeXML::Global::STATE->setStatus('error',$errors); + + #Strip all/any wrappers: + #TODO: Ugly LibXML work, possibly do something smarter? + my $parent = $document->getNode; + if(! defined $parent->lookupNamespacePrefix("http://omdoc.org/ns")){ # namespace not already declared? + $document->getDocument->documentElement->setNamespace("http://omdoc.org/ns","omdoc",0); } + my @renderings=$parent->findnodes(".//omdoc:rendering"); + foreach my $render(@renderings) { + my $content=$render; + while ($content && $content->localname =~/^rendering|[X]?Math/) { + $content = $content->firstChild; + } + my $sibling = $content->parentNode->lastChild; + my $localp = $render->parentNode; + while ((defined $sibling) && (!$sibling->isSameNode($content))) { + my $clone = $sibling->cloneNode(1); + $localp->insertAfter($clone,$render); + $sibling = $sibling->previousSibling; + } + $render->replaceNode($content); + } + } + }}, + properties => {name=>$cs->toString, meaning=>$name,omcd=>$cd,role => $role}, + scope=>$scope, + beforeDigest => sub{ + my ($gullet, $variant) = @_; + my $icvariant = ToString($variant); + my $localpres = $presentation; + if ($icvariant && $icvariant ne 'default') { + $localpres = LookupValue($cs->toString."$icvariant:pres"); + if (!$localpres) { + Error("No variant named '$icvariant' found! Falling back to ". + "default.\n Please consider introducing \\symvariant{". + $cs->toString."}[$nargs]{$icvariant}{... your presentation ...}"); + $localpres = $presentation; + } + } + my $count = LookupValue(ToString($cs).'_counter') || 0; + AssignValue(ToString($cs).":pres:$count",$localpres); + AssignValue(ToString($cs).'_counter',$count+1); + return; + }, + afterDigest => sub{ + my ($stomach,$whatsit) = @_; + my $count = LookupValue(ToString($cs).'_aftercounter') || 0; + $whatsit->setProperty('presentation',LookupValue(ToString($cs).":pres:$count")); + AssignValue(ToString($cs).'_aftercounter',$count+1); + }); + return; }); +%%$ +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\symvariant} +% |\symvariant{|\meta{sym}|}[|\meta{args}|]{|\meta{var}|}{|\meta{cseq}|}| just extends +% the internal macro |\modules@|\meta{sym}|@pres@| defined by +% |\symdef{|\meta{sym}|}[|\meta{args}|]{|\ldots|}| with a variant +% |\modules@|\meta{sym}|@pres@|\meta{var} which expands to \meta{cseq}. Recall that this +% is called by the macro |\|\meta{sym}|[|\meta{var}|]| induced by the +% |\symdef|.\ednote{MK@DG: this needs to +% be implemented in LaTeXML} +% \begin{macrocode} +%<*package> +\def\symvariant#1{\@ifnextchar[{\@symvariant{#1}}{\@symvariant{#1}[0]}} +\def\@symvariant#1[#2]#3#4{% +\expandafter\mod@newcommand\csname modules@#1@pres@#3\endcsname[#2]{#4}% +% \end{macrocode} +% and if we are in a named module, then we need to export the function +% |\modules@|\meta{sym}|@pres@|\meta{opt} just as we have done that in |\symdef|. +% \begin{macrocode} +\@ifundefined{mod@id}{}{% +\expandafter\g@addto@macro\this@module% +{\expandafter\mod@newcommand\csname modules@#1@pres@#3\endcsname[#2]{#4}}}}% +% +%<*ltxml> + DefMacro('\symvariant{}[]{}{}', sub { + my($self,@args)=@_; + my $prestok = Invocation(T_CS('\@symvariant@pres'), @args); + pop @args; push @args, $prestok; + Invocation(T_CS('\@symvariant@construct'),@args)->unlist; +}); + DefMacro('\@symvariant@pres{}[]{}{}', sub { + my($self,$cs,$nargs,$ic,$presentation)=@_; + symdef_presentation_pmml($cs,ToString($nargs)||0,$presentation); + }); + DefConstructor('\@symvariant@construct{}[]{}{}', sub { + my($document,$cs,$nargs,$icvariant,$presentation)=@_; + $cs = ToString($cs); + $nargs = ToString($nargs); + $icvariant = ToString($icvariant); + # Save presentation for future reference: + #Notation created by \symdef + #Create the rendering at the right place: + my $cnode = $document->getNode; + my $root = $document->getDocument->documentElement; + my $name = LookupValue("symdef.".ToString($cs).".name") || $cs; + # Fix namespace (the LibXML XPath problems...) + $root->setNamespace("http://omdoc.org/ns","omdoc",0); + my ($notation) = $root->findnodes(".//omdoc:notation[\@name='$name' and ". + "preceding-sibling::omdoc:symbol[1]/\@name + = '$name']"); + if (!$notation) { + #No symdef found, raise error: + Error("No \\symdef found for \\$cs! Please define symbol prior to introducing variants!"); + return; + } + $document->setNode($notation); + $document->absorb($presentation); + $notation->lastChild->setAttribute("ic","variant:$icvariant"); + $document->setNode($cnode); + return; + }, + beforeDigest => sub { + my($gullet,$cs,$nargs,$icvariant,$presentation)=@_; + $cs = ToString($cs); + $icvariant = ToString($icvariant); + AssignValue("$cs:$icvariant:pres",Digest($presentation),'module:'.LookupValue('current_module')); + }); + #mode=>'math' +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\resymdef} +% This is now deprecated. +% \begin{macrocode} +%<*package> +\def\resymdef{\@ifnextchar[{\@resymdef}{\@resymdef[]}} +\def\@resymdef[#1]#2{\@ifnextchar[{\@@resymdef[#1]{#2}}{\@@resymdef[#1]{#2}[0]}} +\def\@@resymdef[#1]#2[#3]#4{\PackageError{modules} + {The \protect\resymdef macro is deprecated,\MessageBreak + use the \protect\symvariant instead!}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\abbrdef} +% The |\abbrdef| macro is a variant of |\symdef| that does the same on the {\LaTeX} +% level. +% \begin{macrocode} +%<*package> +\let\abbrdef\symdef +% +%<*ltxml> +DefPrimitive('\abbrdef OptionalKeyVals:symdef {}[]{}', sub { + my($stomach,$keys,$cs,$nargs,$presentation)=@_; + my $module = LookupValue('current_module'); + my $scope = (($keys && ($keys->getValue('local') || '' eq 'true')) ? 'module_local' : 'module').":$module"; + DefMacroI("\\".$cs->toString,convertLaTeXArgs($nargs,''),$presentation, + scope=>$scope); + return; }); +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Symbol and Concept Names}\label{sec:impl:concepts} +% +% \begin{macro}{\mod@path} +% the |\mod@path| macro is used to remember the local path, so that the |module| +% environment can set it for later cross-referencing of the modules. If |\mod@path| is +% empty, then it signifies the local file. +% \begin{macrocode} +%<*package> +\def\mod@path{} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\termdef} +% \begin{macrocode} +%<*package> +\def\mod@true{true} +\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% +{\expandafter\mod@newcommand\csname#2\endcsname[0]{#3\xspace}}}% +\fi} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\capitalize} +% \begin{macrocode} +%<*package> +\def\@captitalize#1{\uppercase{#1}} +\newcommand\capitalize[1]{\expandafter\@captitalize #1} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mod@termref} +% |\mod@termref{|\meta{module}|}{|\meta{name}|}{|\meta{nl}|}| determines whether the +% macro |\|\meta{module}|@cd@file@base| is defined. If it is, we make it the prefix of a +% URI reference in the local macro |\@uri|, which we compose to the hyper-reference, +% otherwise we give a warning. +% \begin{macrocode} +%<*package> +\def\mod@termref#1#2#3{\def\@test{#3} +\@ifundefined{#1@cd@file@base} + {\protect\G@refundefinedtrue + \@latex@warning{\protect\termref with unidentified cd "#1": the cd key must + reference an active module} + \def\@label{sref@#2 @target}} + {\def\@label{sref@#2@#1@target}}% +\expandafter\ifx\csname #1@cd@file@base\endcsname\@empty% local reference +\sref@hlink@ifh{\@label}{\ifx\@test\@empty #2\else #3\fi}\else% +\def\@uri{\csname #1@cd@file@base\endcsname.pdf\#\@label}% +\sref@href@ifh{\@uri}{\ifx\@test\@empty #2\else #3\fi}\fi} +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Dealing with Multiple Files}\label{sec:impl:multiple} +% +% Before we can come to the functionality we want to offer, we need some auxiliary +% functions that deal with path names. +% +% \subsubsection{Simplifying Path Names} +% +% The |\mod@simplify| macro is used for simplifying +% path names by removing \meta{xxx}|/..| from a string. eg: +% \meta{aaa}|/|\meta{bbb}|/../|\meta{ddd} goes to \meta{aaa}|/|\meta{ddd} unless +% \meta{bbb} is |..|. This is used to normalize relative path names below. +% +% \begin{macro}{\mod@simplify} +% The macro |\mod@simplify| recursively runs over the path collecting the result in the +% internal |\mod@savedprefix| macro. +% \begin{macrocode} +%<*package> +\def\mod@simplify#1{\expandafter\mod@simpl#1/\relax} +% \end{macrocode} +% It is based on the |\mod@simpl| macro\ednote{what does the mod@blaaa do?} +% \begin{macrocode} +\def\mod@simpl#1/#2\relax{\def\@second{#2}% +\ifx\mod@blaaaa\@empty\edef\mod@savedprefix{}\def\mod@blaaaa{aaa}\else\fi% +\ifx\@second\@empty\edef\mod@savedprefix{\mod@savedprefix#1}% +\else\mod@simplhelp#1/#2\relax\fi} +% \end{macrocode} +% which in turn is based on a helper macro +% \begin{macrocode} +\def\mod@updir{..} +\def\mod@simplhelp#1/#2/#3\relax{\def\@first{#1}\def\@second{#2}\def\@third{#3}% +%\message{mod@simplhelp: first=\@first, second=\@second, third=\@third, result=\mod@savedprefix.} +\ifx\@third\@empty% base case +\ifx\@second\mod@updir\else% + +\ifx\mod@second\@empty\edef\mod@savedprefix{\mod@savedprefix#1}% +\else\edef\mod@savedprefix{\mod@savedprefix#1/#2}% +\fi% +\fi% +\else% +\ifx\@first\mod@updir% +\edef\mod@savedprefix{\mod@savedprefix#1/}\mod@simplhelp#2/#3\relax% +\else% +\ifx\@second\mod@updir\mod@simpl#3\relax% +\else\edef\mod@savedprefix{\mod@savedprefix#1/}\mod@simplhelp#2/#3\relax% +\fi% +\fi% +\fi}% +% +% \end{macrocode} +% \end{macro} +% +% We directly test the simplification: \makeatletter +% \def\mod@simpl@test#1{\def\mod@savedprefix{}\mod@simplify{#1}\mod@savedprefix} +% \begin{center} +% \begin{tabular}{|l|l|l|}\hline +% source & result & should be \\\hline\hline +% ../../aaa & \mod@simpl@test{../../aaa} & ../../aaa\\\hline +% aaa/bbb & \mod@simpl@test{aaa/bbb} & aaa/bbb\\\hline +% aaa/.. & \mod@simpl@test{aaa/..} & \\\hline +% ../../aaa/bbb & \mod@simpl@test{../../aaa/bbb} & ../../aaa/bbb\\\hline +% ../aaa/../bbb & \mod@simpl@test{../aaa/../bbb} & ../bbb\\\hline +% ../aaa/bbb & \mod@simpl@test{../aaa/bbb} & ../aaa/bbb\\\hline +% aaa/bbb/../ddd & \mod@simpl@test{aaa/bbb/../ddd} & aaa/ddd\\\hline +% \end{tabular} +% \end{center} +% \makeatother +% +% \begin{macro}{\defpath} +% \begin{macrocode} +%<*package> +\newcommand{\defpath}[2]{\expandafter\newcommand\csname #1\endcsname[1]{#2/##1}} +% +%<*ltxml> +DefMacro('\defpath{}{}', sub { + my ($gullet,$arg1,$arg2)=@_; + $arg1 = ToString($arg1); + $arg2 = ToString($arg2); + my $paths = LookupValue('defpath')||{}; + $$paths{"$arg1"}=$arg2; + AssignValue('defpath'=>$paths,'global'); + DefMacro('\\'.$arg1.' Semiverbatim',$arg2."/#1"); + });#$ +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Loading Module Signatures} +% +% We will need a switch\ednote{explain why?} +% \begin{macrocode} +%<*package> +\newif\ifmodules +% \end{macrocode} +% and a ``registry'' macro whose expansion represents the list of added macros (or files) +% \begin{macro}{\mod@reg} +% We initialize the |\mod@reg| macro with the empty string. +% \begin{macrocode} +\gdef\mod@reg{} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mod@update} +% This macro provides special append functionality. It takes a string and appends it +% to the expansion of the |\mod@reg| macro in the following way: |string@\mod@reg|. +% \begin{macrocode} +\def\mod@update#1{\ifx\mod@reg\@empty\xdef\mod@reg{#1}\else\xdef\mod@reg{#1@\mod@reg}\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mod@check} +% The |\mod@check| takes as input a file path (arg 3), and searches the registry. If the +% file path is not in the registry it means it means it has not been already added, so +% we make |\ifmodules| true, otherwise make |\ifmodules| false. The macro |\mod@search| +% will look at |\ifmodules| and update the registry for |\modulestrue| or do nothing for +% |\modulesfalse|. +% \begin{macrocode} +\def\mod@check#1@#2///#3\relax{% +\def\mod@one{#1}\def\mod@two{#2}\def\mod@three{#3}% +% \end{macrocode} +% Define a few intermediate macros so that we can split the registry into separate file +% paths and compare to the new one +% \begin{macrocode} +\expandafter% +\ifx\mod@three\mod@one\modulestrue% +\else% +\ifx\mod@two\@empty\modulesfalse\else\mod@check#2///#3\relax\fi% +\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mod@search} +% Macro for updating the registry after the execution of |\mod@check| +% \begin{macrocode} +\def\mod@search#1{% +% \end{macrocode} +% We put the registry as the first argument for |\mod@check| and the other +% argument is the new file path. +% \begin{macrocode} +\modulesfalse\expandafter\mod@check\mod@reg @///#1\relax% +% \end{macrocode} +% We run |\mod@check| with these arguments and the check |\ifmodules| for +% the result +% \begin{macrocode} +\ifmodules\else\mod@update{#1}\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mod@reguse} +% The macro operates almost as the |mod@search| function, but it does not update the +% registry. Its purpose is to check whether some file is or not inside the registry but +% without updating it. Will be used before deciding on a new sms file +% \begin{macrocode} +\def\mod@reguse#1{\modulesfalse\expandafter\mod@check\mod@reg @///#1\relax} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mod@prefix} +% This is a local macro for storing the path prefix, we initialize it as the empty +% string. +% \begin{macrocode} +\def\mod@prefix{} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mod@updatedpre} +% This macro updates the path prefix |\mod@prefix| with the last word in the path given +% in its argument. +% \begin{macrocode} +\def\mod@updatedpre#1{% +\edef\mod@prefix{\mod@prefix\mod@pathprefix@check#1/\relax}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mod@pathprefix@check} +% |\mod@pathprefix@check| returns the last word in a string composed of words separated +% by slashes +% \begin{macrocode} +\def\mod@pathprefix@check#1/#2\relax{% +\ifx\\#2\\% no slash in string +\else\mod@ReturnAfterFi{#1/\mod@pathprefix@help#2\relax}% +\fi} +% \end{macrocode} +% It needs two helper macros: +% \begin{macrocode} +\def\mod@pathprefix@help#1/#2\relax{% +\ifx\\#2\\% end of recursion +\else\mod@ReturnAfterFi{#1/\mod@pathprefix@help#2\relax}% +\fi} +\long\def\mod@ReturnAfterFi#1\fi{\fi#1} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mod@pathpostfix@check} +% |\mod@pathpostfix@check| takes a string composed of words separated by slashes and +% returns the part of the string until the last slash +% \begin{macrocode} +\def\mod@pathpostfix@check#1/#2\relax{% slash +\ifx\\#2\\%no slash in string +#1\else\mod@ReturnAfterFi{\mod@pathpostfix@help#2\relax}% +\fi} +% \end{macrocode} +% Helper function for the |\pathpostfix@check| macro defined above +% \begin{macrocode} +\def\mod@pathpostfix@help#1/#2\relax{% +\ifx\\#2\\% +#1\else\mod@ReturnAfterFi{\mod@pathpostfix@help#2\relax}% +\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mod@updatedpost} +% This macro updates |\mod@savedprefix| with leading path (all but the last word) in the path given +% in its argument. +% \begin{macrocode} +\def\mod@updatedpost#1{% +\edef\mod@savedprefix{\mod@savedprefix\mod@pathpostfix@check#1/\relax}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mod@updatedsms} +% Finally: A macro that will add a |.sms| extension to a path. Will be used when adding a |.sms| file +% \begin{macrocode} +\def\mod@updatesms{\edef\mod@savedprefix{\mod@savedprefix.sms}} +% +% \end{macrocode} +% \end{macro} +% +% \subsubsection{Selective Inclusion} +% +% \begin{macro}{\requiremodules} +% \begin{macrocode} +%<*package> +\newcommand\requiremodules[1]{% +{\mod@showfalse% save state and ensure silence while reading sms +\mod@updatedpre{#1}% add the new file to the already existing path +\let\mod@savedprefix\mod@prefix% add the path to the new file to the prefix +\mod@updatedpost{#1}% +\def\mod@blaaaa{}% macro used in the simplify function (remove .. from the prefix) +\mod@simplify{\mod@savedprefix}% remove |xxx/..| from the path (in case it exists) +\mod@reguse{\mod@savedprefix}% +\ifmodules\else% +\mod@updatesms% update the file to contain the .sms extension +\let\newreg\mod@reg% use to compare, in case the .sms file was loaded before +\mod@search{\mod@savedprefix}% update registry +\ifx\newreg\mod@reg\else\input{\mod@savedprefix}\fi% check if the registry was updated and load if necessary +\fi}} +% +%<*ltxml> +DefPrimitive('\requiremodules{}', sub { + my($stomach,$module)=@_; + my $GULLET = $stomach->getGullet; + $module = Digest($module)->toString; + if(LookupValue('file_'.$module.'_loaded')) {} + else { + AssignValue('file_'.$module.'_loaded' => 1, 'global'); + $stomach->bgroup; + AssignValue('last_module_path', $module); + $GULLET->unread(T_CS('\end@requiredmodule')); + AssignValue('excluding_modules' => 1); + $GULLET->input($module,['sms']); + } + return;}); + +DefPrimitive('\end@requiredmodule{}',sub { + #close the group + $_[0]->egroup; + #print STDERR "END: ".ToString(Digest($_[1])->toString); + #Take care of any imported elements in this current module by activating it and all its dependencies + #print STDERR "Important: ".ToString(Digest($_[1])->toString)."\n"; + use_module(ToString(Digest($_[1])->toString)); + return; });#$ +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\sinput} +% \begin{macrocode} +%<*package> +\def\sinput#1{ +{\mod@updatedpre{#1}% add the new file to the already existing path +\let\mod@savedprefix\mod@prefix% add the path to the new file to the prefix +\mod@updatedpost{#1}% +\def\mod@blaaaa{}% macro used in the simplify function (remove .. from the prefix) +\mod@simplify{\mod@savedprefix}% remove |xxx/..| from the path (in case it exists) +\mod@reguse{\mod@savedprefix}% +\let\newreg\mod@reg% use to compare, in case the .sms file was loaded before +\mod@search{\mod@savedprefix}% update registry +\ifx\newreg\mod@reg%\message{This file has been previously introduced} +\else\input{\mod@savedprefix}% +\fi}} +% +%<*ltxml> +DefPrimitive('\sinput Semiverbatim', sub { + my($stomach,$module)=@_; + my $GULLET = $stomach->getGullet; + $module = Digest($module)->toString; + AssignValue('file_'.$module.'_loaded' => 1, 'global'); + $stomach->bgroup; + AssignValue('last_module_path', $module); + $GULLET->unread(Invocation(T_CS('\end@requiredmodule'),Tokens(Explode($module)))->unlist); + $GULLET->input($module,['tex']); + return;});#$ +% +% \end{macrocode} +% \end{macro} +% \ednote{the sinput macro is just faked, it should be more like requiremodules, except +% that the tex file is inputted; I wonder if this can be simplified.} +% +% \begin{macrocode} +%<*package> +\let\sinputref=\sinput +\let\inputref=\input +% +%<*ltxml> +DefConstructor('\sinputref{}',""); +DefConstructor('\inputref{}',""); +% +% \end{macrocode} +% +% \subsubsection{Generating {\texorpdfstring\omdoc{OMDoc}} Presentation Elements}\label{sec:impl:presentation} +% +% Additional bundle of code to generate presentation encodings. Redefined to an expandable +% (macro) so that we can add conversions. +% +% \begin{macrocode} +%<*ltxml> +DefMacro('\@symdef@pres OptionalKeyVals:symdef {}[]{}', sub { + my($self,$keys, $cs,$nargs,$presentation)=@_; + + my($name,$cd,$role)=$keys + && map($_ && $_->toString,map($keys->getValue($_), qw(name cd role))); + $cd = LookupValue('module_cd') unless $cd; + $name = $cs unless $name; + AssignValue('module_name'=>$name) if $name; + $nargs = 0 unless ($nargs); + my $nargkey = ToString($name).'_args'; + AssignValue($nargkey=>ToString($nargs)) if $nargs; + $name=ToString($name); + + Invocation(T_CS('\@symdef@pres@aux'), + $cs, + ($nargs || Tokens(T_OTHER(0))), + symdef_presentation_pmml($cs,ToString($nargs)||0,$presentation), + (Tokens(Explode($name))), + (Tokens(Explode($cd))), + $keys)->unlist; });#$ +% \end{macrocode} +% Generate the expansion of a symdef's macro using special arguments. +% +% Note that the |symdef_presentation_pmml| subroutine is responsible for preserving the +% rendering structure of the original definition. Hence, we keep a +% collection of all known formatters in the |@PresFormatters| array, +% which should be updated whenever the list of allowed formatters has +% been altered. +% +% \begin{macrocode} +sub symdef_presentation_pmml { + my($cs,$nargs,$presentation)=@_; + my @toks = $presentation->unlist; + while(@toks && $toks[0]->equals(T_SPACE)){ shift(@toks); } # Remove leading space + $presentation = Tokens(@toks); + # Wrap with \@use, unless already has a recognized formatter. + my $formatters = join("|",@PresFormatters); + $formatters = qr/$formatters/; + $presentation = Invocation(T_CS('\@use'),$presentation) + unless (@toks && ($toks[0]->toString =~ /^\\($formatters)$/)); + # Low level substitution. + my @args = + map(Invocation(T_CS('\@SYMBOL'),T_OTHER("arg:".($_))),1..$nargs); + $presentation = Tokens(LaTeXML::Expandable::substituteTokens($presentation,@args)); + $presentation; }#$ +% \end{macrocode} +% The |\@use| macro just generates the contents of the notation element +% \begin{macrocode} +sub getSymmdefProperties { + my $cd = LookupValue('module_cd'); + my $name = LookupValue('module_name'); + my $nargkey = ToString($name).'_args'; + my $nargs = LookupValue($nargkey); + $nargs = 0 unless ($nargs); + my %props = ('cd'=>$cd,'name'=>$name,'nargs'=>$nargs); + return %props;} +DefConstructor('\@use{}', sub{ + my ($document,$args,%properties) = @_; + #Notation created at \@symdef@pres@aux + #Create the rendering: + $document->openElement('omdoc:rendering'); + $document->openElement('ltx:Math'); + $document->openElement('ltx:XMath'); + if ($args->isMath) {$document->absorb($args);} + else { $document->insertElement('ltx:XMText',$args);} + $document->closeElement('ltx:XMath'); + $document->closeElement('ltx:Math'); + $document->closeElement('omdoc:rendering'); +}, +properties=>sub { getSymmdefProperties($_[1]);}, + mode=>'inline_math'); +% \end{macrocode} +% The |get_cd| procedure reads of the cd from our list of keys. +% \begin{macrocode} +sub get_cd { + my($name,$cd,$role)=@_; + return $cd;} +% \end{macrocode} +% The |\@symdef@pres@aux| creates the |symbol| element and the outer layer of the of the +% |notation| element. The content of the latter is generated by applying the {\latexml} to +% the definiens of the |\symdef| form. +% \begin{macrocode} +DefConstructor('\@symdef@pres@aux{}{}{}{}{} OptionalKeyVals:symdef', sub { + my ($document,$cs,$nargs,$pmml,$name,$cd,$keys)=@_; + my $assocarg = ToString($keys->getValue('assocarg')) if $keys; + $assocarg = $assocarg||"0"; + my $bvars = ToString($keys->getValue('bvars')) if $keys; + $bvars = $bvars||"0"; + my $bvar = ToString($keys->getValue('bvar')) if $keys; + $bvar = $bvar||"0"; + my $appElement = 'om:OMA'; $appElement = 'om:OMBIND' if ($bvars || $bvar); + my $root = $document->getDocument->documentElement; + my $name_str = ToString($name); + my ($notation) = $root->findnodes(".//omdoc:notation[\@name='$name_str' and ". + "preceding-sibling::omdoc:symbol[1]/\@name + = '$name_str']"); + if (!$notation) { + $document->insertElement("omdoc:symbol",undef,(name=>$name,"xml:id"=>$name_str.".sym")); + } + $document->openElement("omdoc:notation",(name=>$name,cd=>$cd)); + #First, generate prototype: + $nargs = ToString($nargs)||0; + $document->openElement('omdoc:prototype'); + $document->openElement($appElement) if $nargs; + my $cr="fun" if $nargs; + $document->insertElement('om:OMS',undef, + (cd=>$cd, + name=>$name, + "cr"=>$cr)); + if ($bvar || $bvars) { + $document->openElement('om:OMBVAR'); + if ($bvar) { + $document->insertElement('omdoc:expr',undef,(name=>"arg$bvar")); + } else { + $document->openElement('omdoc:exprlist',(name=>"args")); + $document->insertElement('omdoc:expr',undef,(name=>"arg")); + $document->closeElement('omdoc:exprlist'); + } + $document->closeElement('om:OMBVAR'); + } + for my $id(1..$nargs) { + next if ($id==$bvars || $id==$bvar); + if ($id!=$assocarg) { + my $argname="arg$id"; + $document->insertElement('omdoc:expr',undef,(name=>"$argname")); + } + else { + $document->openElement('omdoc:exprlist',(name=>"args")); + $document->insertElement('omdoc:expr',undef,(name=>"arg")); + $document->closeElement('omdoc:exprlist'); + } + } + $document->closeElement($appElement) if $nargs; + $document->closeElement('omdoc:prototype'); + #Next, absorb rendering: + $document->absorb($pmml); + $document->closeElement("omdoc:notation"); + }, afterDigest=>sub { my ($stomach, $whatsit) = @_; + my $keys = $whatsit->getArg(6); + my $module = LookupValue('current_module'); + $whatsit->setProperties(for=>ToString($whatsit->getArg(1))); + $whatsit->setProperty(role=>($keys ? $keys->getValue('role') + : (ToString($whatsit->getArg(2)) ? 'applied' + : undef))); }); +% \end{macrocode} +% Convert a macro body (tokens with parameters |#1|,..) into a Presentation |style=TeX| form. +% walk through the tokens, breaking into chunks of neutralized (|T_OTHER|) tokens and +% parameter specs. +% \begin{macrocode} +sub symdef_presentation_TeX { + my($presentation)=@_; + my @tokens = $presentation->unlist; + my(@frag,@frags) = (); + while(my $tok = shift(@tokens)){ + if($tok->equals(T_PARAM)){ + push(@frags,Invocation(T_CS('\@symdef@pres@text'),Tokens(@frag))) if @frag; + @frag=(); + my $n = shift(@tokens)->getString; + push(@frags,Invocation(T_CS('\@symdef@pres@arg'),T_OTHER($n+1))); } + else { + push(@frag,T_OTHER($tok->getString)); }} # IMPORTANT! Neutralize the tokens! + push(@frags,Invocation(T_CS('\@symdef@pres@text'),Tokens(@frag))) if @frag; + Tokens(map($_->unlist,@frags)); } +DefConstructor('\@symdef@pres@arg{}', "", + afterDigest=>sub { my ($stomach, $whatsit) = @_; + my $select = $whatsit->getArg(1); + $select = ref $select ? $select->toString : ''; + $whatsit->setProperty(select=>"*[".$select."]"); }); +DefConstructor('\@symdef@pres@text{}', "#1"); +%#$ +% \end{macrocode} +% +% +% \subsection{Including Externally Defined Semantic Macros }\label{sec:impl:packages} +% +% \begin{macro}{\requirepackage} +% \begin{macrocode} +%<*package> +\def\requirepackage#1#2{\makeatletter\input{#1.sty}\makeatother} +% +%<*ltxml> +DefConstructor('\requirepackage{} Semiverbatim',"", + afterDigest=>sub { my ($stomach, $whatsit) = @_; + my $select = $whatsit->getArg(1); + RequirePackage($select->toString); });#$ +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Views}\label{sec:impl:views} +% +% We first prepare the ground by defining the keys for the |view| environment. +% \begin{macrocode} +%<*package> +\srefaddidkey{view} +\addmetakey*{view}{title} +\define@key{view}{load}{\requiremodules{#1}} +% \end{macrocode} +% +% \begin{macro}{\view@heading} +% Then we make a convenience macro for the view heading. This can be customized. +% \begin{macrocode} +\newcounter{view}[section] +\newcommand\view@heading[2]{\stepcounter{view}% +{\textbf{View} \thesection.\theview: from #1 to #2}% +\sref@label@id{View \thesection.\theview}% +\ifx\view@title\@empty :\quad\else\quad(\view@title)\hfill\\\fi} +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{view} +% The |view| environment only has an effect if the |showmods| option is set. +% \begin{macrocode} +\ifmod@show\newsavebox{\viewbox} +\newenvironment{view}[3][]{\metasetkeys{view}{#1}\sref@target\stepcounter{view} +\begin{lrbox}{\viewbox}\begin{minipage}{.9\textwidth} +\importmodule{#1}\importmodule{#2}\gdef\view@@heading{\view@heading{#2}{#3}}} +{\end{minipage}\end{lrbox} +\setbox0=\hbox{\begin{minipage}{.9\textwidth}% +\noindent\view@@heading\rm% +\end{minipage}} +\smallskip\noindent\fbox{\vbox{\box0\vspace*{.2em}\usebox\viewbox}}\smallskip} +\else\newxcomment[]{view}\fi%ifmod@show +% +%<*ltxml> +DefKeyVal('view','id','Semiverbatim'); +DefEnvironment('{view} OptionalKeyVals:view {}{}', + "" + . "#body" + .""); +% +% \end{macrocode} +% \end{environment} +% +% \subsection{Deprecated Functionality}\label{sec:impl:deprecated} +% +% In this section we centralize old interfaces that are only partially supported any more. +% \begin{macro}{module:uses} +% For each the module name |xxx| specified in the |uses| key, we activate their symdefs +% and we export the local symdefs.\ednote{this issue is deprecated, it will be removed +% before 1.0.} +% \begin{macrocode} +%<*package> +\define@key{module}{uses}{% +\@for\module@tmp:=#1\do{\activate@defs\module@tmp\export@defs\module@tmp}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{module:usesqualified} +% This option operates similarly to the module:uses option defined above. The only +% difference is that here we import modules with a prefix. This is useful when two +% modules provide a macro with the same name. +% \begin{macrocode} +%<*package> +\define@key{module}{usesqualified}{% +\@for\module@tmp:=#1\do{\activate@defs{qualified@\module@tmp}\export@defs\module@tmp}} +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Providing IDs for {\omdoc} Elements}\label{sec:impl:ids} +% +% To provide default identifiers, we tag all {\omdoc} elements that allow |xml:id| +% attributes by executing the |numberIt| procedure below. +% +% \begin{macrocode} +%<*ltxml> +Tag('omdoc:recurse',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:imports',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:theory',afterOpen=>\&numberIt,afterClose=>\&locateIt); +% +% \end{macrocode} +% +% \subsection{Experiments} +% In this section we develop experimental functionality. Currently support for complex +% expressions, see +% \url{https://svn.kwarc.info/repos/stex/doc/blue/comlex_semmacros/note.pdf} for details. +% +% \begin{macro}{\csymdef} +% For the {\LaTeX} we use |\symdef| and forget the last argument. The code here is just +% needed for parsing the (non-standard) argument structure. +% \begin{macrocode} +%<*package> +\def\csymdef{\@ifnextchar[{\@csymdef}{\@csymdef[]}} +\def\@csymdef[#1]#2{\@ifnextchar[{\@@csymdef[#1]{#2}}{\@@csymdef[#1]{#2}[0]}} +\def\@@csymdef[#1]#2[#3]#4#5{\@@symdef[#1]{#2}[#3]{#4}} +% +%<*ltxml> +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\notationdef} +% For the {\LaTeX} side, we just make |\notationdef| invisible. +% \begin{macrocode} +%<*package> +\def\notationdef[#1]#2#3{} +% +%<*ltxml> +% +% \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 +%%% Local Variables: +%%% mode: doctex +%%% TeX-master: t +%%% End: +% LocalWords: GPL structuresharing STR dtx env envfalse idfalse displayfalse +% LocalWords: usesfalse usesqualified usesqualifiedfalse envtrue idtrue CPERL +% LocalWords: usestrue displaytrue usesqualifiedtrue RequirePackage keyval tmp +% LocalWords: defs foreach LookupValue activateScope DefEnvironment keyvals cd +% LocalWords: OptionalKeyVals getValue toString AssignValue openElement omdoc +% LocalWords: closeElement beforeDigest useTheoryItemizations afterDigestBegin +% LocalWords: whatsit setProperty getArg qw symdef iffalse importOMDocmodule +% LocalWords: DefKeyVal Semiverbatim symdeflocal atqualified DefMacro STDERR +% LocalWords: args unlist DefPrimitive nargs Stringify eq attr omcd ltx XMTok +% LocalWords: DefConstructorI convertLaTeXArgs scriptpos XMApp OMA XMArg simpl +% LocalWords: DefMacroI blaaaa savedprefix aaa simplhelp tust tist tost reguse +% LocalWords: updatedpre ReturnAfterFi updateall updatedpost updatesms bgroup +% LocalWords: texclude tinclude getGullet requiredmodule tex sms egroup pmml +% LocalWords: toks mixfixi mixfixa mixfixii mixfixia mixfixai mixfixiii arg cr +% LocalWords: DefConstructor afterDigest setProperties undef tok PARAM thyid +% LocalWords: getString showfalse showtrue xcomment stex srcref KeyVal omext +% LocalWords: beginItemize getProperty introdcue afterOpen numberIt Tokenize +% LocalWords: OptionalSemiverbatim omdocmod PushValue assocarg getStomach prs +% LocalWords: begingroup beginMode endMode endgroup insertElement resymdef sym +% LocalWords: updir nargkey PresFormatters mixfixaii formatters argname expr +% LocalWords: getSymmdefProperties XMath mcdcr exprlist recurse texttt scsys +% LocalWords: textbackslash newcommand providecommand sc sc mathml openmath nx +% LocalWords: latexml cmathml activemath twintoo atwin atwintoo mathcal Deyan +% LocalWords: mathcal fileversion Ginev maketitle newpage infty ulsmf08 exfig +% LocalWords: omsemmac lstset basicstyle scriptsize aboveskip belowskip hline +% LocalWords: morekeywords lstlisting csymbol showviews showviews foo exf cseq +% LocalWords: qualifiedimports qualifiedimports termdef textbf filepath RabKoh +% LocalWords: symname varSmoothfunctionsOn ednote abbrdef Sumfromto semmodule +% LocalWords: vspace hrule vspace arith arbitraryn xbool oplus xdisjunction tw +% LocalWords: emph captitalize ldots termref termref symref symref ctancite nc +% LocalWords: smms hyperref RahObe hmlmh10 widehat texmf.cnf requiremodules cs +% LocalWords: sinput sinputref sinputref defpath defpath defpath cname csname +% LocalWords: OPhats usepackage importqualified Crossreferencing jobname ltxml +% LocalWords: jobname printbibliography textsf langle textsf langle textlangle +% LocalWords: textrangle textlangle newif ifmod qualifiedfalse qualifiedtrue +% LocalWords: sref xspace expandafter noexpand endcsname namedef setkeys ifx +% LocalWords: newenvironment parentmod usemodule ifundefined coolurion cooluri +% LocalWords: coolurioff cwd ouri ifdefinable testopt ifnextchar xargdef bvars +% LocalWords: argdef yargdef somefunction symdeflocaltrue bvar xpath assoc qr +% LocalWords: symdeflocalfalse localpres isbound symdefs COMPLEXTOKEN localp +% LocalWords: findnodes localname carg renewcommand bbb showmeta showmeta exp +% LocalWords: refundefinedtrue subsubsection blaaa makeatletter makeatother rm +% LocalWords: ifmodules gdef xdef xdef modulestrue modulesfalse pathpostfix +% LocalWords: updatedsms newreg xref texorpdfstring srefaddidkey newsavebox +% LocalWords: viewbox newcounter thesection theview theproblem hfill lrbox +% LocalWords: stepcounter textwidth hbox noindent smallskip fbox vbox usebox +% LocalWords: smallskip newxcomment vassign ensuremath mapsto doctex tocdepth +% LocalWords: setcounter tableofcontents mathbb symvariant importmodulevia +% LocalWords: importmodulevia compactdesc tassign tassign tname source-tname +% LocalWords: ttassign metakeys addmetakey themodule metasetkeys aftergroup +% LocalWords: groupling requation IMPORTCD CURRENTCD bindargs defmathop cnode +% LocalWords: icvariant aftercounter prestok inputref oref loadfrom loadto +% LocalWords: csymdef notationdef diff --git a/Master/texmf-dist/source/latex/stex/modules/modules.ins b/Master/texmf-dist/source/latex/stex/modules/modules.ins new file mode 100644 index 00000000000..52aa57ce4b2 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/modules/modules.ins @@ -0,0 +1,38 @@ + %% +%% This file generates files required to use the ed package. +%% At your command prompt write +%% +%% latex modules.ins +%% +%% Copyright(c) 2005 Michael Kohlhase +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{modules.sty}{\from{modules.dtx}{package}}} + +\Msg{*} +\Msg{* You probably need to move the generated style files into a directory searched by TeX.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\nopreamble\nopostamble +\generate{\file{modules.sty.ltxml}{\from{modules.dtx}{ltxml}}} + +\Msg{*} +\Msg{* You probably need to move the generated ltxml files into a directory searched by LaTeXML.} +\Msg{*} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/stex/omdoc/omdoc.dtx b/Master/texmf-dist/source/latex/stex/omdoc/omdoc.dtx new file mode 100644 index 00000000000..cc6166803db --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/omdoc/omdoc.dtx @@ -0,0 +1,751 @@ +% \iffalse meta-comment +% A LaTeX Class and Package for OMDoc Document Structures +% Copyright (c) 2009 Michael Kohlhase, all rights reserved +% this file is released under the +% LaTeX Project Public License (LPPL) +% +% The development version of this file can be found at +% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/omdoc/omdoc.dtx $ +% \fi +% +% \iffalse +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\ProvidesPackage{omdoc}[2012/01/28 v1.0 OMDoc document Structure] +%\ProvidesClass{omdoc}[2012/01/28 v1.0 OMDoc Documents] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{url,array,omdoc,omtext,float} +\usepackage[show]{ed} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} +\usepackage[eso-foot,today]{svninfo} +\svnInfo $Id: omdoc.dtx 1999 2012-01-28 07:32:11Z kohlhase $ +\svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/omdoc/omdoc.dtx $ +\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{omdoc.dtx}\end{document} +% +% \fi +% +%\CheckSum{364} +% +% \changes{v0.1}{2006/1/17}{First Version} +% \changes{v0.2}{2006/7/11}{added OMDoc class} +% \changes{v0.3}{2007/09/09}{moved omtext and friends here from the statements package} +% \changes{v0.4}{2008/09/06}{added quotes} +% \changes{v0.5}{2008/03/28}{more package/class options} +% \changes{v0.7}{2009/11/24}{giving keyval arguments to the document environment} +% \changes{v1.0}{2010/05/25}{separated out \texttt{omtext.dtx}} +% +% +% \GetFileInfo{omdoc.sty} +% +% \MakeShortVerb{\|} +% +% \def\omdoc{OMDoc} +% \def\latexml{{\LaTeX}ML} +% \title{{\texttt{omdoc.sty/cls}}: Semantic Markup for Open Mathematical Documents in {\LaTeX}\thanks{Version {\fileversion} (last revised +% {\filedate})}} +% \author{Michael Kohlhase\\ +% Jacobs University, Bremen\\ +% \url{http://kwarc.info/kohlhase}} +% \maketitle +% +% \begin{abstract} +% The |omdoc| package is part of the {\sTeX} collection, a version of {\TeX/\LaTeX} that +% allows to markup {\TeX/\LaTeX} documents semantically without leaving the document +% format, essentially turning {\TeX/\LaTeX} into a document format for mathematical +% knowledge management (MKM). +% +% This package supplies an infrastructure for writing {\omdoc} documents in {\LaTeX}. +% This includes a simple structure sharing mechanism for {\sTeX} that allows to to move +% from a copy-and-paste document development model to a copy-and-reference model, which +% conserves space and simplifies document management. The augmented structure can be +% used by MKM systems for added-value services, either directly from the {\sTeX} +% sources, or after translation. +% \end{abstract} +% +%\newpage\tableofcontents\newpage +% +%\begin{omgroup}[id=sec:STR]{Introduction} +% +% The |omdoc| package supplies macros and environment that allow to label document +% fragments and to reference them later in the same document or in other documents. In +% essence, this enhances the document-as-trees model to +% documents-as-directed-acyclic-graphs (DAG) model. This structure can be used by MKM +% systems for added-value services, either directly from the {\sTeX} sources, or after +% translation. Currently, trans-document referencing provided by this package can only +% be used in the {\sTeX} collection. +% +% {\sTeX} is a version of {\TeX/\LaTeX} that allows to markup {\TeX/\LaTeX} documents +% semantically without leaving the document format, essentially turning {\TeX/\LaTeX} +% into a document format for mathematical knowledge management (MKM). The package +% supports direct translation to the {\omdoc} format~\cite{Kohlhase:omdoc1.2} +% +% DAG models of documents allow to replace the ``Copy and Paste'' in the source document +% with a label-and-reference model where document are shared in the document source and +% the formatter does the copying during document formatting/presentation.\ednote{talk +% about the advantages and give an example.}\ednote{is there a way to load documents at +% URIs in LaTeX?}\ednote{integrate with latexml's XMRef in the Math mode.} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:user]{The User Interface}\ +% +% The |omdoc| package generates four files: |omdoc.cls|, |omdoc.sty| and their {\latexml} +% bindings |omdoc.cls.ltxml| and |omdoc.sty.ltxml|. We keep the corresponding code +% fragments together, since the documentation applies to both of them and to prevent them +% from getting out of sync. The {\omdoc} class is a minimally changed variant of the +% standard |article| class that includes the functionality provided by |omdoc.sty|. Most +% importantly, |omdoc.cls| sets up the {\latexml} infrastructure and thus should be used +% if {\omdoc} is to be generated from the {\sTeX} sources. The rest of the documentation +% pertains to the functionality introduced by |omdoc.sty|. +% +% \begin{omgroup}[id=sec:user:options]{Package and Class Options} +% +% |omdoc.sty| has the \DescribeMacro{noindex}|noindex| package option, which allows to +% suppress the creation of index entries. The \DescribeMacro{extrefs} option can be set +% to activate multifile support, see~\ctancite{Kohlhase:sref} for details. +% +% |omdoc.cls| accepts all options of the |omdoc.sty| (see~\sref{sec:user:options}) and +% |article.cls| and just passes them on to these. \ednote{describe them} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:user:struct]{Document Structure} +% +% The top-level \DescribeEnv{document}|document| environment is augmented with an +% optional key/value argument that can be used to give metadata about the document. For +% the moment only the \DescribeMacro{id}|id| key is used to give an identifier to the +% \texttt{omdoc} element resulting from the {\latexml} transformation. +% +% \DescribeEnv{omgroup} The structure of the document is given by the |omgroup| +% environment just like in {\omdoc}. In the {\LaTeX} route, the |omgroup| environment is +% flexibly mapped to sectioning commands, inducing the proper sectioning level from the +% nesting of |omgroup| environments. Correspondingly, the |omgroup| environment takes an +% optional key/value argument for metadata followed by a regular argument for the +% (section) title of the omgroup. The optional metadata argument has the keys +% \DescribeMacro{id}|id| for an identifier, \DescribeMacro{creators}|creators| and +% \DescribeMacro{contributors}|contributors| for the Dublin Core +% metadata~\cite{DCMI:dmt03}; see~\ctancite{Kohlhase:dcm} for details of the format. The +% \DescribeMacro{short}|short| allows to give a short title for the generated section. +% +% The \DescribeMacro{currentsectionlevel}|\currentsectionlevel| macro supplies the name +% of the current sectioning level, e.g. ``chapter'', or +% ``subsection''. \DescribeMacro{CurrentSectionLevel}|\CurrentSectionLevel| is the +% capitalized variant. They are useful to write something like ``In this +% |\currentsectionlevel|, we will\ldots'' in an |omgroup| environment, where we do not +% know which sectioning level we will end up. +% \end{omgroup} +% +% \begin{omgroup}[id=sec:user:ignore]{Ignoring Inputs} +% +% The \DescribeEnv{ignore}|ignore| environment can be used for hiding text parts from the +% document structure. The body of the environment is not PDF or DVI output unless the +% \DescribeMacro{showignores}|showignores| option is given to the |omdoc| class or +% |package|. But in the generated {\omdoc} result, the body is marked up with a |ignore| +% element. This is useful in two situations. For +% \begin{description} +% \item[editing] One may want to hide unfinished or obsolete parts of a document +% \item[narrative/content markup] In {\stex} we mark up narrative-structured documents. In +% the generated {\omdoc} documents we want to be able to cache content objects that are +% not directly visible. For instance in the |statements| +% package~\ctancite{Kohlhase:smms} we use the |\inlinedef| macro to mark up phrase-level +% definitions, which verbalize more formal definitions. The latter can be hidden by an +% ignore and referenced by the |verbalizes| key in |\inlinedef|. +% \end{description} +% +% \end{omgroup} +% +% \begin{omgroup}[id=sec:user:sharing]{Structure Sharing} +% +% The \DescribeMacro{\STRlabel}|\STRlabel| macro takes two arguments: a label and the +% content and stores the the content for later use by +% \DescribeMacro{\STRcopy}|\STRcopy{label}|, which expands to the previously stored +% content. +% +% \DescribeMacro{\STRsemantics} The |\STRlabel| macro has a variant |\STRsemantics|, where +% the label argument is optional, and which takes a third argument, which is ignored in +% {\LaTeX}. This allows to specify the meaning of the content (whatever that may mean) in +% cases, where the source document is not formatted for presentation, but is transformed +% into some content markup format. \ednote{make an example} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:user:colors]{Colors} +% +% For convenience, the |omdoc| package defines a couple of color macros for the |color| +% package: For instance \DescribeMacro{\blue}|\blue| abbreviates |\textcolor{blue}|, so +% that |\blue{|\meta{something}|}| writes \meta{something} in blue. The macros +% \DescribeMacro{\red}|\red| \DescribeMacro{...}|\green|, |\cyan|, |\magenta|, |\brown|, +% |\yellow|, |\orange|, |\gray|, and finally \DescribeMacro{\black}|\black| are +% analogous. +% \end{omgroup} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:user:misc]{Miscellaneous} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:limitations]{Limitations} +% +% In this section we document known limitations. If you want to help alleviate them, +% please feel free to contact the package author. Some of them are currently discussed in +% the \sTeX TRAC~\cite{sTeX:online}. +% \begin{compactenum} +% \item none reported yet +% \end{compactenum} +% \end{omgroup} +% +% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography}\newpage +% +% \begin{omgroup}[id=sec:impl:cls]{Implementation: The OMDoc Class} +% +% The functionality is spread over the |omdoc| class and package. The class provides the +% |document| environment and the |omdoc| element corresponds to it, whereas the +% package provides the concrete functionality. +% +% |omdoc.dtx| generates four files: |omdoc.cls| (all the code between +% {\textsf{$\langle$*cls$\rangle$}} and {\textsf{$\langle$/cls$\rangle$}}), |omdoc.sty| +% (between {\textsf{$\langle$*package$\rangle$}} and +% {\textsf{$\langle$/package$\rangle$}}) and their {\latexml} bindings (between +% {\textsf{$\langle$*ltxml.cls$\rangle$}} and {\textsf{$\langle$/ltxml.cls$\rangle$}} and +% {\textsf{$\langle$*ltxml.sty$\rangle$}} and {\textsf{$\langle$/ltxml.sty$\rangle$ +% respetively}}). We keep the corresponding code fragments together, since the +% documentation applies to both of them and to prevent them from getting out of sync. +% +% \begin{omgroup}[id=sec:impl:cls:options]{Class Options} +% To initialize the |omdoc| class, we declare and process the necessary options. +% +% \begin{macrocode} +%<*cls> +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\def\omdoc@class{article} +\DeclareOption{report}{\def\omdoc@class{report}\PassOptionsToPackage{\CurrentOption}{omdoc}} +\DeclareOption{book}{\def\omdoc@class{book}\PassOptionsToPackage{\CurrentOption}{omdoc}} +\DeclareOption{chapter}{\PassOptionsToPackage{\CurrentOption}{omdoc}} +\DeclareOption{part}{\PassOptionsToPackage{\CurrentOption}{omdoc}} +\DeclareOption{showignores}{\PassOptionsToPackage{\CurrentOption}{omdoc}} +\DeclareOption{extrefs}{\PassOptionsToPackage{\CurrentOption}{sref}} +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} +\ProcessOptions +% +%<*ltxml.cls> +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +use LaTeXML::Util::Pathname; +use Cwd qw(cwd abs_path); +DeclareOption('report',sub {PassOptions('omdoc','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('book',sub {PassOptions('omdoc','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('chapter',sub {PassOptions('omdoc','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('part',sub {PassOptions('omdoc','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('showignores',sub {PassOptions('omdoc','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('extrefs',sub {PassOptions('sref','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption(undef,sub {PassOptions('article','cls',ToString(Digest(T_CS('\CurrentOption')))); }); +ProcessOptions(); +% +% \end{macrocode} +% +% We load |article.cls|, and the desired packages. For the {\latexml} bindings, we make +% sure the right packages are loaded. +% +% \begin{macrocode} +%<*cls> +\LoadClass{\omdoc@class} +\RequirePackage{omdoc} +% +%<*ltxml.cls> +LoadClass('article'); +RequirePackage('sref'); +% +% \end{macrocode} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:impl:cls:namespaces]{Setting up Namespaces and Schemata for LaTeXML} +% +% Now, we also need to register the namespace prefixes for {\latexml} to use. +% \begin{macrocode} +%<*ltxml.cls> +RegisterNamespace('omdoc'=>"http://omdoc.org/ns"); +RegisterNamespace('om'=>"http://www.openmath.org/OpenMath"); +RegisterNamespace('m'=>"http://www.w3.org/1998/Math/MathML"); +RegisterNamespace('dc'=>"http://purl.org/dc/elements/1.1/"); +RegisterNamespace('cc'=>"http://creativecommons.org/ns"); +RegisterNamespace('stex'=>"http://kwarc.info/ns/sTeX"); +RegisterNamespace('ltx'=>"http://dlmf.nist.gov/LaTeXML"); +% +% \end{macrocode} +% Since we are dealing with a class, we need to set up the document type in the {\latexml} +% bindings. +% \begin{macrocode} +%<*ltxml.cls> +RelaxNGSchema('omdoc+ltxml', + '#default'=>"http://omdoc.org/ns", + 'om'=>"http://www.openmath.org/OpenMath", + 'm'=>"http://www.w3.org/1998/Math/MathML", + 'dc'=>"http://purl.org/dc/elements/1.1/", + 'cc'=>"http://creativecommons.org/ns", + 'stex'=>"http://kwarc.info/ns/sTeX", + 'ltx'=>"http://dlmf.nist.gov/LaTeXML"); +% +% \end{macrocode} +% Then we load the |omdoc| package, which we define separately in the next section so that +% it can be loaded separately\ednote{reword} +% \begin{macrocode} +%<*ltxml.cls> +RequirePackage('omdoc'); +% +% \end{macrocode} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:impl:cls:document]{Beefing up the \texttt{document} environment} +% +% Now, we will define the environments we need. The top-level one is the |document| +% environment, which we redefined so that we can provide keyval arguments. +% +% \begin{environment}{document} +% For the moment we do not use them on the {\LaTeX} level, but the document identifier +% is picked up by {\latexml}. +% \begin{macrocode} +%<*cls> +\let\orig@document=\document +\srefaddidkey{document} +\renewcommand{\document}[1][]{\metasetkeys{document}{#1}\orig@document} +% +%<*ltxml.cls> +sub xmlBase { + my $baseuri = LookupValue('baseuri'); + my $baselocal = LookupValue('baselocal'); + my $cdir = abs_path(cwd()); + $cdir =~ s/^$baselocal// if $baselocal; + #DG: Make this more robust! + my ($d,$f,$t); + my $srcf = LookupValue('SOURCEFILE'); + if ( $srcf =~ /^(\w+):\/\//) { + $srcf =~ s/^(\w+):\///; + } # TODO: Hacky, do something better + ($d, $f,$t) = pathname_split(LookupValue('SOURCEFILE')); + $t = '' if LookupValue('cooluri'); + Tokenize($baseuri.$cdir.'/'.$f.$t); } +DefEnvironment('{document} OptionalKeyVals:omdoc', + "" + . "#body" + ."", + beforeDigest=> sub { AssignValue(inPreamble=>0); }, + afterDigest=> sub { $_[0]->getGullet->flush; return; });#$ +% +% \end{macrocode} +% \end{environment} +% \end{omgroup} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:impl:sty]{Implementation: OMDoc Package} +% +% \begin{omgroup}[id=sec:impl:options]{Package Options} +% +% The initial setup for {\latexml}: +% +% \begin{macrocode} +%<*ltxml.sty> +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +use Cwd qw(cwd abs_path); +% +% \end{macrocode} +% +% We declare some switches which will modify the behavior according to the package +% options. Generally, an option |xxx| will just set the appropriate switches to true +% (otherwise they stay false).\ednote{need an implementation for {\latexml}} +% +% \begin{macrocode} +%<*package> +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\newif\if@chapter\@chapterfalse +\newif\if@part\@partfalse +\newcount\section@level\section@level=3 +\newif\ifshow@ignores\show@ignoresfalse +\def\omdoc@class{article} +\DeclareOption{report}{\def\omdoc@class{report}\section@level=2} +\DeclareOption{book}{\def\omdoc@class{book}\section@level=1} +\DeclareOption{chapter}{\section@level=2\@chaptertrue} +\DeclareOption{part}{\section@level=1\@chaptertrue\@parttrue} +\DeclareOption{showignores}{\show@ignorestrue} +\DeclareOption{extrefs}{\PassOptionsToPackage{\CurrentOption}{sref}} +\ProcessOptions +% +%<*ltxml.sty> +DeclareOption('report',''); +DeclareOption('book',''); +DeclareOption('chapter',''); +DeclareOption('part',''); +DeclareOption('showignores',''); +DeclareOption('extrefs',''); +% +% \end{macrocode} +% +% Then we need to set up the packages by requiring the |sref| package to be loaded. +% +% \begin{macrocode} +%<*package> +\RequirePackage{sref} +\RequirePackage{xspace} +\RequirePackage{comment} +% +%<*ltxml.sty> +RequirePackage('sref'); +RequirePackage('xspace'); +RequirePackage('omtext'); +% +% \end{macrocode} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:impl:struct]{Document Structure} +% +% The structure of the document is given by the |omgroup| environment just like in +% OMDoc. The hierarchy is adjusted automatically\ednote{maybe define the toplevel +% according to a param, need to know how to detect that the chapter macro exists.} +% \begin{macro}{\currentsectionlevel} +% \begin{macrocode} +%<*package> +\def\level@section#1{\ifcase#1\or{part}\or{chapter}\or{section}\or{subsection}\or{subsubsection}\or{paragraph}\or{subparagraph}\fi} +\def\Level@Section#1{\ifcase#1\or{Part}\or{Chapter}\or{Section}\or{Subsection}\or{Subsubsection}\or{Paragraph}\or{Subparagraph}\fi} +\def\in@level@section#1{\ifcase#1\or{this document}\or{part}\or{chapter}\or{section}\or{subsection}\or{subsubsection}\or{paragraph}\or{subparagraph}\fi} +\def\In@Level@Section#1{\ifcase#1\or{This document}\or{Part}\or{Chapter}\or{Section}\or{Subsection}\or{Subsubsection}\or{Paragraph}\or{Subparagraph}\fi} +\def\currentsectionlevel{\in@level@section\section@level\xspace} +\def\CurrentSectionLevel{\In@Level@Section\section@level\xspace} +% +%<*ltxml.sty> +% +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{omgroup} +% The \DescribeMacro{\at@begin@omgroup}|\at@begin@omgroup| macro allows +% customization. It is run at the beginning of the |omgroup|, i.e. after the section +% heading. +% \begin{macrocode} +%<*package> +\srefaddidkey{omgroup} +\addmetakey{omgroup}{creators} +\addmetakey{omgroup}{date} +\addmetakey{omgroup}{contributors} +\addmetakey{omgroup}{type} +\addmetakey*{omgroup}{short} +\addmetakey*{omgroup}{display} +\def\at@begin@omgroup#1{} +\newenvironment{omgroup}[2][]% keys, title +{\metasetkeys{omgroup}{#1}\sref@target% +\ifx\omgroup@display\st@flow\noindent{\Large\textbf{#2}\\[.3ex]\noindent\ignorespaces}% +\else% +\if@part\ifnum\section@level=1\part{#2}\sref@label@id{Part \thepart}\fi\fi% +\if@chapter\ifnum\section@level=2\chapter{#2}\sref@label@id{Chapter \thechapter}\fi\fi% +\ifnum\section@level=3\section{#2}\sref@label@id{Section \thesection}\fi% +\ifnum\section@level=4\subsection{#2}\sref@label@id{Subsection \thesubsection}\fi% +\ifnum\section@level=5\subsubsection{#2}\sref@label@id{Subsubsection \thesubsubsection}\fi% +\ifnum\section@level=6\paragraph{#2}\sref@label@id{this paragraph}\fi% +\ifnum\section@level=7\subparagraph{#2}\sref@label@id{this subparagraph}\fi% +\at@begin@omgroup\section@level% for customization +\advance\section@level by 1% +\fi}{\advance\section@level by -1} +% +%<*ltxml.sty> +DefEnvironment('{omgroup} OptionalKeyVals:omgroup {}', + "\n" + . "#2\n" + . "#body\n" + . ""); +% +% \end{macrocode} +% \end{environment} +% +% \end{omgroup} +% +% \begin{omgroup}[id=sec:user:docmatter]{Front and Backmatter} +% +% Index markup is provided by the |omtext| package~\cite{Kohlhase:smmtf:ctan}, so in the +% |omdoc| package we only need to supply the corresponding |\printindex| command, if it +% is not already defined +% \begin{macro}{\printindex} +% \begin{macrocode} +%<*package> +\providecommand\printindex{\IfFileExists{\jobname.ind}{\input{\jobname.ind}}{}} +% +%<*ltxml.sty> +DefConstructor('\printindex',''); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tableofcontents} +% The table of contents already exists in {\LaTeX}, so we only need to provide a +% {\latexml} binding for it. +% \begin{macrocode} +%<*ltxml.sty> +DefConstructor('\tableofcontents',""); +% +% \end{macrocode} +% \end{macro} +% +% The case of the |\bibliography| command is similar +% +% \begin{macro}{\bibliography} +% \begin{macrocode} +%<*ltxml.sty> +DefConstructor('\bibliography{}',""); +% +% \end{macrocode} +% \end{macro} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:impl:ignore]{Ignoring Inputs} +% \begin{environment}{ignore} +% \begin{macrocode} +%<*package> +\ifshow@ignores +\addmetakey{ignore}{type} +\addmetakey{ignore}{comment} +\newenvironment{ignore}[1][] +{\metasetkeys{ignore}{#1}\textless\ignore@type\textgreater\bgroup\itshape} +{\egroup\textless/\ignore@type\textgreater} +\renewenvironment{ignore}{}{}\else\excludecomment{ignore}\fi +% +%<*ltxml.sty> +DefKeyVal('ignore','type','Semiverbatim'); +DefKeyVal('ignore','comment','Semiverbatim'); +DefEnvironment('{ignore} OptionalKeyVals:ignore', + "#body"); +% +% \end{macrocode} +% \end{environment} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:impl:share]{Structure Sharing} +% +% \begin{macro}{\STRlabel} +% The main macro, it it used to attach a label to some text expansion. Later on, using the +% |\STRcopy| macro, the author can use this label to get the expansion originally assigned. +% \begin{macrocode} +%<*package> +\long\def\STRlabel#1#2{\STRlabeldef{#1}{#2}{#2}} +% +%<*ltxml.sty> +DefConstructor('\STRlabel{}{}', sub { + my($document,$label,$object)=@_; + $document->absorb($object); + $document->addAttribute('xml:id'=>ToString($label)) if $label; }); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\STRcopy} +% The |\STRcopy| macro is used to call the expansion of a given label. In case the label is +% not defined it will issue a warning. +% \begin{macrocode} +%<*package> +\def\STRcopy#1{\expandafter\ifx\csname STR@#1\endcsname\relax +\message{STR warning: reference #1 undefined!} +\else\csname STR@#1\endcsname\fi} +% +%<*ltxml.sty> +DefConstructor('\STRcopy{}',""); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\STRsemantics} +% if we have a presentation form and a semantic form, then we can use +% \begin{macrocode} +%<*package> +\newcommand{\STRsemantics}[3][]{#2\def\@test{#1}\ifx\@test\@empty\STRlabeldef{#1}{#2}\fi} +% +%<*ltxml.sty> +DefConstructor('\STRsemantics[]{}{}', sub { + my($document,$label,$ignore,$object)=@_; + $document->absorb($object); + $document->addAttribute('xml:id'=>ToString($label)) if $label; }); +%#$ +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\STRlabeldef} +% This is the macro that does the actual labeling. Is it called inside |\STRlabel| +% \begin{macrocode} +%<*package> +\def\STRlabeldef#1{\expandafter\gdef\csname STR@#1\endcsname} +% +%<*ltxml.sty> +DefMacro('\STRlabeldef{}{}', ""); +% +% \end{macrocode} +% \end{macro} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:impl:colors]{Colors} +% +% \begin{environment}{blue, red, green, magenta} +% We will use the following abbreviations for colors from |color.sty| +% \begin{macrocode} +%<*package> +\def\black#1{\textcolor{black}{#1}} +\def\gray#1{\textcolor{gray}{#1}} +\def\blue#1{\textcolor{blue}{#1}} +\def\red#1{\textcolor{red}{#1}} +\def\green#1{\textcolor{green}{#1}} +\def\cyan#1{\textcolor{cyan}{#1}} +\def\magenta#1{\textcolor{magenta}{#1}} +\def\brown#1{\textcolor{brown}{#1}} +\def\yellow#1{\textcolor{yellow}{#1}} +\def\orange#1{\textcolor{orange}{#1}} +% +% \end{macrocode} +% For the {\latexml} bindings, we go a generic route, we replace |\blue{#1}| by +% |{\@omdoc@color{blue}\@omdoc@color@content{#1}}|. +% \begin{macrocode} +%<*ltxml.sty> +sub omdocColorMacro { + my ($color, @args) = @_; + my $tok_color = TokenizeInternal($color); + (T_BEGIN, T_CS('\@omdoc@color'), T_BEGIN, $tok_color->unlist, + T_END, T_CS('\@omdoc@color@content'), T_OTHER('['), $tok_color->unlist, T_OTHER(']'), + T_BEGIN, $args[1]->unlist, T_END, T_END); } +DefMacro('\@omdoc@color{}', sub { MergeFont(color=>$_[1]->toString); return; });#$ +% +% \end{macrocode} +% Ideally, here we will remove the optional argument and have a conversion module +% add the attribute at the end (or maybe add it just for math?) +% or, we can take the attributes for style from the current font ? +% \begin{macrocode} +%<*ltxml.sty> +DefConstructor('\@omdoc@color@content[]{}', + "?#isMath(#2)(#2)"); +foreach my $color(qw(black gray blue red green cyan magenta brown yellow orange)) { + DefMacro("\\".$color.'{}', sub { omdocColorMacro($color, @_); }); }#$ +% +% \end{macrocode} +% \end{environment} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:impl:commands]{{\LaTeX} Commands we interpret differently} +% +% The reinterpretations are quite simple, we either disregard presentational markup or +% we re-interpret it in terms of {\omdoc}. +% \begin{macrocode} +%<*ltxml.sty> +DefConstructor('\newpage',''); +% +% \end{macrocode} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:impl:ids]{Providing IDs for {\omdoc} Elements} +% +% To provide default identifiers, we tag all {\omdoc} elements that allow |xml:id| +% attributes by executing the |numberIt| procedure below. +% +% \begin{macrocode} +%<*ltxml.sty> +Tag('omdoc:ignore',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:ref',afterOpen=>\&numberIt,afterClose=>\&locateIt); +% +% \end{macrocode} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:impl:misc]{Miscellaneous} +% Some shortcuts that use math symbols but are not mathematical at all; in particular, +% they should not be translated by {\latexml}. +% +% \begin{macrocode} +%<*package> +\newcommand\hateq{\ensuremath{\hat=}\xspace} +\newcommand\hatequiv{\ensuremath{\hat\equiv}\xspace} +\newcommand\textleadsto{\ensuremath{\leadsto}\xspace} +% +%<*ltxml.sty> +DefConstructor('\hateq',"\x{2259}"); +DefConstructor('\hatequiv',"\x{2A6F}"); +DefConstructor('\textleadsto',"\x{219D}"); +% +% \end{macrocode} +% +% \end{omgroup} +% +% \begin{omgroup}{Leftovers} +% +% \begin{macrocode} +%<*package> +\newcommand{\baseURI}[2][]{} +% +%<*ltxml.sty> +DefMacro('\baseURI []Semiverbatim', sub { + if (LookupValue('SOURCEFILE')!~/^(\w+):\/\//) { + my $baselocal = ToString(Expand($_[1])); + $baselocal = abs_path($baselocal) unless $baselocal=~/^(\w+):\/\//; + AssignValue('baselocal'=>$baselocal); + AssignValue('baseuri'=>ToString(Expand($_[2])));} + else { + AssignValue('baselocal'=>undef); + AssignValue('baseuri'=>ToString(Expand($_[2]))); + }}); +DefConstructor('\url Semiverbatim',"#1"); +DefConstructor('\href Semiverbatim {}',"#2"); +% +% \end{macrocode} +% \ednote{this should be handled differently, omdoc.sty should include url and give a new +% macro for it, which we then use in omdoc} +% and finally, we need to terminate the file with a success mark for perl. +% \begin{macrocode} +%1; +% \end{macrocode} +% \end{omgroup} +% \end{omgroup} +% \Finale +\endinput +% \iffalse +% LocalWords: GPL structuresharing STR omdoc dtx stex CPERL LoadClass url dc +%%% Local Variables: +%%% mode: doctex +%%% TeX-master: t +%%% End: +% \fi +% LocalWords: RequirePackage RegisterNamespace namespace xsl DocType ltxml dtd +% LocalWords: ltx DefEnvironment beforeDigest AssignValue inPreamble getGullet +% LocalWords: afterDigest keyval omgroup DefKeyVal Semiverbatim KeyVal srcf +% LocalWords: OptionalKeyVals DefParameterType IfBeginFollows skipSpaces CMP +% LocalWords: ifNext DefMacro needwrapper unlist DefConstructor omtext bgroup +% LocalWords: useCMPItemizations RefStepItemCounter egroup beginItemize li di +% LocalWords: beforeDigestEnd dt autoclose ul ol dl env showignores srcref Cwd +% LocalWords: afterOpen LastSeenCMP autoClose DefCMPEnvironment proto ToString +% LocalWords: addAttribute nlex nlcex omdocColorMacro args tok MergeFont qw +% LocalWords: TokenizeInternal toString isMath foreach maybeCloseElement id'd +% LocalWords: autoOpen minipage footnotesize scriptsize numberIt whatsit href +% LocalWords: getAttribute setAttribute OMDoc RelaxNGSchema noindex xml lec +% LocalWords: Subsubsection useDefaultItemizations refundefinedtrue sblockquote +% LocalWords: DefCMPConstructor sinlinequote idx idt ide idp emph extrefs sref +% LocalWords: flushleft flushright DeclareOption PassOptions undef cls iffalse +% LocalWords: ProcessOptions subparagraph ignoresfalse ignorestrue texttt ttin +% LocalWords: texttt latexml fileversion maketitle newpage tableofcontents cwd +% LocalWords: newpage ednote ctancite dmt03 smms inlinedef STRlabel STRcopy +% LocalWords: STRlabel STRsemantics STRsemantics textcolor printbibliography +% LocalWords: textsf langle textsf langle respetively orig renewcommand cdir +% LocalWords: baseuri baseuri baselocal baselocal SOURCEFILE cooluri newif ifx +% LocalWords: SOURCEBASE chapterfalse partfalse newcount ifshow chaptertrue +% LocalWords: parttrue srefaddidkey newenvironment textbf compactenum showmeta +% LocalWords: noindent noindent ignorespaces ifnum thepart thechapter regexp +% LocalWords: thesection thesubsection thesubsubsection needswrapper itshape +% LocalWords: textgreater renewenvironment excludecomment STRlabeldef csname +% LocalWords: expandafter endcsname xref newcommand gdef doctex metakeys Hacky +% LocalWords: metasetkeys addmetakey printindex providecommand jobname.ind +% LocalWords: jobname.ind tocdepth hateq ensuremath xspace hatequiv equiv +% LocalWords: textleadsto leadsto diff --git a/Master/texmf-dist/source/latex/stex/omdoc/omdoc.ins b/Master/texmf-dist/source/latex/stex/omdoc/omdoc.ins new file mode 100644 index 00000000000..41de5776ed6 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/omdoc/omdoc.ins @@ -0,0 +1,40 @@ +%% +%% This file generates files required to use the ed package. +%% At your command prompt write +%% +%% latex omdoc.ins +%% +%% Copyright(c) 2005 Michael Kohlhase +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{omdoc.sty}{\from{omdoc.dtx}{package}}} +\generate{\file{omdoc.cls}{\from{omdoc.dtx}{cls}}} + +\Msg{*} +\Msg{* You probably need to move the generated style files into a directory searched by TeX.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\nopreamble\nopostamble +\generate{\file{omdoc.sty.ltxml}{\from{omdoc.dtx}{ltxml.sty}}} +\generate{\file{omdoc.cls.ltxml}{\from{omdoc.dtx}{ltxml.cls}}} + +\Msg{*} +\Msg{* You may need to move the generated ltxml files into a directory searched by LaTeXML.} +\Msg{*} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/stex/omtext/omtext.dtx b/Master/texmf-dist/source/latex/stex/omtext/omtext.dtx new file mode 100644 index 00000000000..032d8190a8c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/omtext/omtext.dtx @@ -0,0 +1,850 @@ +% \iffalse meta-comment +% A LaTeX Class and Package for OMDoc Text Fragments +% Copyright (c) 2010 Michael Kohlhase, all rights reserved +% this file is released under the +% LaTeX Project Public License (LPPL) +% +% The development version of this file can be found at +% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/omtext/omtext.dtx $ +% \fi +% +% \iffalse +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\ProvidesPackage{omtext}[2012/01/28 v1.0 OMDoc Text Fragments] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{url,array,omdoc,float} +\usepackage{omtext} +\usepackage[show]{ed} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} +\usepackage[eso-foot,today]{svninfo} +\svnInfo $Id: omtext.dtx 1999 2012-01-28 07:32:11Z kohlhase $ +\svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/omtext/omtext.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{omtext.dtx}\end{document} +% +% \fi +% +%\CheckSum{375} +% +% \changes{v0.4}{2008/07/22}{added index markup} +% \changes{v0.4}{2008/09/29}{augmenting the index macros with optional values} +% \changes{v0.6}{2009/07/08}{removing {\texttt{ttin}} {\texttt{{emin}}} and friends, +% they were almost never used.} +% \changes{v0.6}{2009/07/08}{renmanig {\texttt{myindex}} to {\texttt{omdoc\@ index}}, +% {\texttt{twin}} to {\texttt{\@ twin}}, and {\texttt{atwin}} to {\texttt{\@ atwin}} to +% make them packge-local} +% \changes{v0.7}{2010/02/11}{changing blockquote to sblockquote and inlinequote similarly} +% \changes{v0.9}{2010/05/25}{separated out from \texttt{omdoc.dtx}} +% \changes{v1.0}{2010/06/18}{fixing typos} +% +% \GetFileInfo{omtext.sty} +% +% \MakeShortVerb{\|} +% +% \def\omdoc{OMDoc} +% \def\latexml{{\LaTeX}ML} +% \title{{\texttt{omtext}}: Semantic Markup for Mathematical Text Fragments in {\LaTeX}\thanks{Version {\fileversion} (last revised +% {\filedate})}} +% \author{Michael Kohlhase\\ +% Jacobs University, Bremen\\ +% \url{http://kwarc.info/kohlhase}} +% \maketitle +% +% \begin{abstract} +% The |omtext| package is part of the {\sTeX} collection, a version of {\TeX/\LaTeX} that +% allows to markup {\TeX/\LaTeX} documents semantically without leaving the document +% format, essentially turning {\TeX/\LaTeX} into a document format for mathematical +% knowledge management (MKM). +% +% This package supplies an infrastructure for writing {\omdoc} text fragments in +% {\LaTeX}. +% \end{abstract} +% +%\newpage\tableofcontents\newpage +% +%\begin{omgroup}[id=sec:STR]{Introduction} +% +% The |omtext| package supplies macros and environment that allow to mark up mathematical +% texts in {\sTeX}, a version of {\TeX/\LaTeX} that allows to markup {\TeX/\LaTeX} +% documents semantically without leaving the document format, essentially turning +% {\TeX/\LaTeX} into a document format for mathematical knowledge management (MKM). The +% package supports direct translation to the {\omdoc} format~\cite{Kohlhase:omdoc1.2} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:user]{The User Interface} +% +% \begin{omgroup}[id=sec:user:options]{Package Options} +% +% The |omtext| package takes a single option: \DescribeMacro{showmeta}|showmeta|. If +% this is set, then the metadata keys are shown (see~\cite{Kohlhase:metakeys:ctan} for +% details and customization options). +% \end{omgroup} +% +% \begin{omgroup}[id=sec:user:omtext]{Mathematical Text} +% +% The \DescribeEnv{omtext}|omtext| environment is used for any text fragment that has a +% contribution to a text that needs to be marked up. It can have a title, which can be +% specified via the \DescribeMacro{title=}|title| key. Often it is also helpful to +% annotate the \DescribeMacro{type=}|type| key. The standard relations from rhetorical +% structure theory |abstract|, |introduction|, |conclusion|, |thesis|, |comment|, +% |antithesis|, |elaboration|, |motivation|, |evidence|, |transition|, | note|, |annote| +% are recommended as values. Note that some of them are unary relations like +% |introduction|, which calls for a target. In this case, a target using the +% \DescribeMacro{for=}|for| key should be specified. The |transition| relation is +% special in that it is binary (a ``transition between two statements''), so +% additionally, a source should be specified using the \DescribeMacro{from=}|from| key. +% +% Note that the values of the |title| and |type| keys are often displayed in the +% text. This can be turned off by setting the \DescribeMacro{display=}|display| key to +% the value |flow|. Sometimes we want to specify that a text is a continuation of +% another, this can be done by giving the identifier of this in the +% \DescribeMacro{continues=}|continues| key. +% +% Finally, there is a set of keys that pertain to the mathematical formulae in the +% text. The \DescribeMacro{functions=}|functions| key allows to specify a list of +% identifiers that are to be interpreted as functions in the generate content +% markup. The \DescribeMacro{theory=}|theory| specifies a module +% (see~\cite{KohAmb:smmssl:svn}) that is to be pre-loaded in this one\ednote{this is not +% implemented yet.} Finally, \DescribeMacro{verbalizes=}|verbalizes| specifies a (more) +% formal statement (see~\cite{Kohlhase:smms:svn}) that this text verbalizes. +% \end{omgroup} +% +% \begin{omgroup}[id=sec:user:phrase]{Phrase-Level Markup} +% +% \DescribeEnv{phrase} The |phrase| environment allows to mark up phrases with semantic +% information. It takes an optional |KeyVal| argument with the keys +% \DescribeMacro{verbalizes=}|verbalizes| and \DescribeMacro{type=}|type| as above and +% \DescribeMacro{style}|style,| \DescribeMacro{class}|class|, +% \DescribeMacro{index}|index| that are disregarded in the {\LaTeX}, but copied into the +% generated content markup. +% +% \DescribeMacro{\sinlinequote} The |sinlinequote| macro allows to mark up quotes inline and +% attribute them. The quote itself is given as the argument, possibly preceded by the a +% specification of the source in a an optional argument. For instance, we would quote +% Hamlet with +% \begin{verbatim} +% \sinlinequote[Hamlet, \cite{Shak:1603:Hamlet}]{To be or not to be} +% \end{verbatim} +% which would appear as \sinlinequote[Hamlet, (Shakespeare 1603)]{To be or not to be} in +% the text. The style in which inline quotations appear in the text can be adapted by +% specializing the macros \DescribeMacro{\@sinlinequote}|\@sinlinequote| --- for quotations +% without source and \DescribeMacro{\@@sinlinequote}|\@@sinlinequote| --- for quotations with +% source. +% \end{omgroup} +% +% \begin{omgroup}[id=sec:user:block]{Block-Level Markup} +% +% \DescribeEnv{sblockquote} The |sblockquote| environment is the big brother of the +% |\sinlinequote| macro. It also takes an optional argument to specify the source. Here +% the four internal macros \DescribeMacro{\begin@sblockquote}|\begin@sblockquote| to +% \DescribeMacro{\end@@sblockquote}|\end@@sblockquote| are used for styling and can be +% adapted by package integrators. Here a quote of Hamlet would marked up as +% \begin{verbatim} +% \begin{sblockquote}[Hamlet, \cite{Shak:1603:Hamlet}]\obeylines +% To be, or not to be: that is the question: +% Whether 'tis nobler in the mind to suffer +% \end{sblockquote} +% \end{verbatim} +% and would render as +% \begin{sblockquote}[Hamlet, (Shakespeare 1603)]\obeylines +% To be, or not to be: that is the question: +% Whether 'tis nobler in the mind to suffer +% \end{sblockquote} +% +% \DescribeMacro{\lec}The |\lec| macro takes one argument and sets it as a comment at the +% end of the line, making sure that if the content is too long it is pushed into a new +% line. We use it internally for placing the of source of the |sblockquote| environment +% above. The actual appearance of the line end comment is determined by the +% \DescribeMacro{\@@lec}|\@@lec| macro, which can be customized in the document class. +% \end{omgroup} +% +% \begin{omgroup}[id=sec:user:index]{Index Markup} +% +% The |omtext| package provides some extensions for the well-known indexing macros of +% {\LaTeX}. The main reason for introducing these macros is that index markup in +% {\omdoc} wraps the indexed terms rather than just marking the spot for +% cross-referencing. Furthermore the index commands only indexes words unless +% the\DescribeMacro{noindex} |noindex| option is set in the |\usepackage|. The |omtext| +% package and class make the usual |\index| macro undefined\ednote{implement this and +% issue the respective error message}. +% +% The \DescribeMacro{\indextoo}|\indextoo| macro renders a word and marks it for the +% index. Sometimes, we want to index a slightly different form of the word, e.g. for +% non-standard plurals: while |\indextoo{word}s| works fine, we cannot use this for the +% word ``datum'', which has the plural ``data''. For this we have the macro +% \DescribeMacro{\indexalt}|\indexalt|, which takes another argument for the displayed +% text, allowing us to use |\indexalt{data}{datum}|, which prints ``data'' but puts +% ``datum'' into the index. +% +% The second set of macros adds an infrastructure for two-word compounds. Take for +% instance the compound ``OMDoc document'', which we usually want to add into the index +% under ``OMDoc'' and ``document''. \DescribeMacro{\twintoo}|\twintoo{OMDoc}{document}| +% is a variant of |\indextoo| that will do just this. Again, we have a version that +% prints a variant: This is useful for situations like this the one in +% Figure~\ref{fig:index-markup}: +% \begin{exfig} +% \begin{verbatim} +% We call group \twinalt{Abelian}{Abelian}{group}, iff \ldots +% \end{verbatim} +% \vspace*{-1em}will result in the following +% \begin{quote} +% We call group \twinalt{Abelian}{Abelian}{group}, iff \ldots +% \end{quote} +% and put ``Abelian Group'' into the index. +% \caption{Index markup}\label{fig:index-markup} +% \end{exfig} +% +% The third set of macros does the same for two-word compounds with adjectives, +% e.g. ``wonderful OMDoc +% document''. \DescribeMacro{\atwintoo}|\atwin{wonderful}{OMdoc}{document}| will make the +% necessary index entries under ``wonderful'' and ``document''. Again, we have a variant +% \DescribeMacro{\atwinalt}|\atwinalt| whose first argument is the alternative text. +% +% All index macros take an optional first argument that is used for ordering the +% respective entries in the index. +% \end{omgroup} +% \end{omgroup} +% +% +% \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 +% +% \begin{omgroup}[id=sec:impl]{Implementation} +% +% The |omtext| 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. +% +% \begin{omgroup}[id=sec:impl:options]{Package Options} +% +% The initial setup for {\latexml}: +% +% \begin{macrocode} +%<*ltxml> +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +use Cwd qw(cwd abs_path); +% +% \end{macrocode} +% +% We declare some switches which will modify the behavior according to the package +% options. Generally, an option |xxx| will just set the appropriate switches to true +% (otherwise they stay false).\ednote{need an implementation for {\latexml}} +% +% \begin{macrocode} +%<*package> +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\newif\ifindex\indextrue +\DeclareOption{noindex}{\indexfalse} +\ProcessOptions +\ifindex\makeindex\fi +% +%<*ltxml> +DeclareOption('noindex',''); +% +% \end{macrocode} +% +% Then we need to set up the packages by requiring the |sref| package to be loaded. +% +% \begin{macrocode} +%<*package> +\RequirePackage{sref} +\RequirePackage{comment} +% +%<*ltxml> +RequirePackage('sref'); +% +% \end{macrocode} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:impl:metadata]{Metadata} +% +% All the {\omdoc} elements allow to specify metadata in them, which is modeled by the +% |omdoc:metadata| element. Since the content of this element is precisely controlled +% by the Schema, we can afford to auto-open and auto-close it. Thus metadata elements +% from various sources will just be included into one |omdoc:metadata| element, even if +% they are supplied by different {\sTeX} bindings. Also we add numbering and location +% facilities. +% +% \begin{macrocode} +%<*ltxml> +Tag('omdoc:metadata',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1,autoOpen=>1); +% +% \end{macrocode} +% +% the |itemize|, |description|, and |enumerate| environments generate |omdoc:li|, +% |omdoc:di| with |autoclose| inside a CMP. This behavior will be overwritten later, so we +% remember that we are in a |CMP| by assigning |_LastSeenCMP|. +% +% \begin{macrocode} +%<*ltxml> +sub declareFunctions{ + my ($stomach,$whatsit) = @_; + my $keyval = $whatsit->getArg(1); + my $funval = KeyVal($keyval,'functions') if KeyVal($keyval,'functions'); + my @funsymbs = ParseKeyValList($funval); + #Unread the function declarations at the Gullet + foreach (@funsymbs) { + $stomach->getGullet->unread(Tokenize('\lxDeclare[role=FUNCTION]{$'.$_.'$}')->unlist); + } + return; +} +Tag('omdoc:CMP', afterOpen => sub {AssignValue('_LastSeenCMP', $_[1], 'global');return;});#$ +% +% \end{macrocode} +% +% the |itemize|, |description|, and |enumerate| environments originally introduced in the +% |omtext| package do double duty in OMDoc, outside a |CMP| they are transformed into a +% ||, where the text after the macros +% |\item| come to be the children. If that is only text, then it is enclosed in an +% ||, otherwise it is left as it is. The optional argument of the |\item| +% is transformed into the || of the generated |\item| element. +% \begin{macrocode} +%<*ltxml> +DefParameterType('IfBeginFollows', sub { + my ($gullet) = @_; + $gullet->skipSpaces; + my $next = $gullet->readToken; + $gullet->unread($next); + $next = ToString($next); + #Hm, falling back to regexp handling, the $gullet->ifNext approach didn't work properly + return 1 unless ($next=~/^\\begin/); + return; + }, + reversion=>'', optional=>1); +% +% \end{macrocode} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:impl:mtxt]{Mathematical Text} +% +% We define the actions that are undertaken, when the keys are encountered. Here this is +% very simple, we just define an internal macro with the value, so that we can use it +% later. Note that we allow math in the |title| field, so we do not declare it to be +% |Semiverbatim| (indeed not at all, which allows it by default). +% +% \begin{macrocode} +%<*package> +\srefaddidkey{omtext} +\addmetakey[]{omtext}{functions} +\addmetakey*{omtext}{display} +\addmetakey{omtext}{for} +\addmetakey{omtext}{from} +\addmetakey{omtext}{type} +\addmetakey*{omtext}{title} +\addmetakey*{omtext}{start} +\addmetakey{omtext}{theory} +\addmetakey{omtext}{continues} +\addmetakey{omtext}{verbalizes} +\addmetakey{omtext}{subject} +% +%<*ltxml> +DefKeyVal('omtext','functions','Undigested'); +DefKeyVal('omtext','display','Semiverbatim'); +DefKeyVal('omtext','for','Semiverbatim'); +DefKeyVal('omtext','from','Semiverbatim'); +DefKeyVal('omtext','type','Semiverbatim'); +DefKeyVal('omtext','title','Plain'); #Math mode in titles. +DefKeyVal('omtext','start','Plain'); #Math mode in start phrases +DefKeyVal('omtext','theory','Semiverbatim'); +DefKeyVal('omtext','continues','Semiverbatim'); +DefKeyVal('omtext','verbalizes','Semiverbatim'); +% +% \end{macrocode} +% +% \begin{macro}{\st@flow} +% We define this macro, so that we can test whether the |display| key has the value |flow| +% \begin{macrocode} +%<*package> +\def\st@flow{flow} +% +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{omtext} +% The |omtext| environment is different, it does not have a keyword that marks +% it. Instead, it can have a title, which is used in a similar way. We redefine the +% |\lec| macro so the trailing |\par| does not get into the way. +% \begin{macrocode} +%<*package> +\def\omtext@pre@skip{\smallskip} +\def\omtext@post@skip{} +\providecommand{\stDMemph}[1]{\textbf{#1}} +\newenvironment{omtext}[1][]{\bgroup\metasetkeys{omtext}{#1}\sref@label@id{this paragraph}% +\def\lec##1{\@lec{##1}} +\ifx\omtext@display\st@flow\else\omtext@pre@skip\par\noindent% +\ifx\omtext@title\@empty\else\stDMemph{\omtext@title}: \fi\fi\ignorespaces} +{\egroup\omtext@post@skip} +% +%<*ltxml> +DefEnvironment('{omtext} OptionalKeyVals:omtext', + "" + . "?&KeyVal(#1,'title')(&KeyVal(#1,'title'))()" + . "" + . "?&KeyVal(#1,'start')(&KeyVal(#1,'start'))()" + . "#body" + .""); +% +% \end{macrocode} +% \end{environment} +% +% We also make our life easier If defining an environment that is +% turned into something that contains ||\meta{body}||, use this method instead +% \begin{macrocode} +%<*ltxml> +sub DefCMPEnvironment { + my ($proto, $replacement, %options) = @_; + my @before = $options{beforeDigest} ? ($options{beforeDigest}) : (); + push(@before, \&useCMPItemizations); + $options{beforeDigest} = \@before; + my @after = $options{afterDigestBegin} ? ($options{afterDigestBegin}) : (); + push(@after, \&declareFunctions); + $options{afterDigestBegin} = \@after; + DefEnvironment($proto, $replacement, %options); +} +sub DefCMPConstructor { + my ($proto, $replacement, %options) = @_; + my @before = $options{beforeDigest} ? ($options{beforeDigest}) : (); + push(@before, \&useCMPItemizations); + $options{beforeDigest} = \@before; + DefConstructor($proto, $replacement, %options); +}#$ +% +% \end{macrocode} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:impl:phrase]{Phrase-level Markup} +% +% \begin{environment}{phrase} +% For the moment, we do disregard the most of the keys +% \begin{macrocode} +%<*package> +\srefaddidkey{phrase} +\addmetakey{phrase}{style} +\addmetakey{phrase}{class} +\addmetakey{phrase}{index} +\addmetakey{phrase}{verbalizes} +\addmetakey{phrase}{type} +\newenvironment{phrase}[1][]{\metasetkeys{phrase}{#1}}{} +% +%<*ltxml> +DefKeyVal('phrase','id','Semiverbatim'); +DefKeyVal('phrase','style','Semiverbatim'); +DefKeyVal('phrase','class','Semiverbatim'); +DefKeyVal('phrase','index','Semiverbatim'); +DefKeyVal('phrase','verbalizes','Semiverbatim'); +DefKeyVal('phrase','type','Semiverbatim'); +DefConstructor('\phrase OptionalKeyVals:phrase {}', + "#2"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{nlex} +% For the moment, we do disregard the most of the keys +% \begin{macrocode} +%<*package> +\def\nlex#1{\green{\sl{#1}}} +\def\nlcex#1{*\green{\sl{#1}}} +% +%<*ltxml> +DefConstructor('\nlex{}', + "#1"); +DefConstructor('\nlcex{}', + "#1"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{sinlinequote} +% \begin{macrocode} +%<*package> +\def\@sinlinequote#1{``{\sl{#1}}''} +\def\@@sinlinequote#1#2{\@sinlinequote{#2}~#1} +\newcommand{\sinlinequote}[2][] +{\def\@opt{#1}\ifx\@opt\@empty\@sinlinequote{#2}\else\@@sinlinequote\@opt{#2}\fi} +% +%<*ltxml> +DefConstructor('\sinlinequote [] {}', + "" + . "?#1(#1\n)()" + . "#2" + . ""); +% +% \end{macrocode} +% \end{macro} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:impl:block]{Block-Level Markup} +% +% \begin{environment}{sblockquote} +% \ednote{describe above} +% \begin{macrocode} +%<*package> +\def\begin@sblockquote{\begin{quote}\sl} +\def\end@sblockquote{\end{quote}} +\def\begin@@sblockquote#1{\begin@sblockquote} +\def\end@@sblockquote#1{\def\@@lec##1{{\rm ##1}}\@lec{#1}\end@sblockquote} +\newenvironment{sblockquote}[1][] + {\def\@opt{#1}\ifx\@opt\@empty\begin@sblockquote\else\begin@@sblockquote\@opt\fi} + {\ifx\@opt\@empty\end@sblockquote\else\end@@sblockquote\@opt\fi} +% +%<*ltxml> +DefEnvironment('{sblockquote} []', + "?#1(" + . "#1" + . "#body" + . " )" + . "(#body)"); +% +% \end{macrocode} +% \end{environment} +% +% The line end comment macro makes sure that it will not be forced on the next line unless +% necessary. +% \begin{macro}{\lec} +% The actual appearance of the line end comment is determined by the |\@@lec| macro, +% which can be customized in the document class. The basic one here is provided so that +% it is not missing. +% \begin{macrocode} +%<*package> +\providecommand{\@@lec}[1]{(#1)} +\def\@lec#1{\strut\hfil\strut\null\nobreak\hfill\hbox{\@@lec{#1}}} +\def\lec#1{\@lec{#1}\par} +% +%<*ltxml> +DefConstructor('\lec{}', + "\n#1"); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\my*graphics} +% We set up a special treatment for including graphics to respect the intended {\omdoc} +% document structure. The main work is done in the transformation stylesheet though. +% +% \begin{macrocode} +%RawTeX(' +%<*ltxml|package> +\newcommand\mygraphics[2][]{\includegraphics[#1]{#2}} +\newcommand\mycgraphics[2][]{\begin{center}\includegraphics[#1]{#2}\end{center}} +\newcommand\mybgraphics[2][]{\fbox{\includegraphics[#1]{#2}\end{center}}} +% +%'); +% \end{macrocode} +% \end{macro} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:impl:index]{Index Markup} +% +% \begin{macrocode} +% this is the main internal indexing comman. It makes sure that the modules necessary for +% interpreting the math in the index entries are loaded. +%<*package> +\newcommand{\omdoc@index}[2][]{\ifindex\def\@test{#1}%% +\ifx\@test\@empty\def\@@idx{#2}\else\def\@@idx{#1}\fi% +\@ifundefined{mod@id}{\index{\@@idx @#2}}% +{\index{\@@idx @{\importmodule{\mod@id} #2}}\fi}} +\newcommand{\indexalt}[3][]{{#2}\omdoc@index[#1]{#3}} % word in text and index +\newcommand{\indextoo}[2][]{{#2}\omdoc@index[#1]{#2}} % word in text and index +% +% \end{macrocode} +% +% this puts two-compound words into the index in various permutations +% +% \begin{macrocode} +%<*package> +\newcommand{\@twin}[3][]{\ifindex\def\@test{#1}%% +\ifx\@test\@empty\def\@@idx{#2}\else\def\@@idx{#1}\fi% +\@ifundefined{mod@id} +{\index{\@@idx @#2!#3}% +\ifx\@test\@empty\def\@@idx{#3}\else\def\@@idx{#1}\fi% +\index{\@@idx @#2!#3}}% +{\index{\@@idx @{\importmodule{\mod@id} #2}!{\importmodule{\mod@id} #3}}% +\ifx\@test\@empty\def\@@idx{#3}\else\def\@@idx{#1}\fi% +\index{\@@idx @{\importmodule{\mod@id} #3}!{\importmodule{\mod@id} #2}}\fi}} +\newcommand{\twinalt}[4][]{#2\@twin[#1]{#3}{#4}} +\newcommand{\twintoo}[3][]{{#2 #3}\@twin[#1]{#2}{#3}} % and use the word compound too +% +% \end{macrocode} +% +% this puts adjectivized two-compound words into the index in various +% permutations\ednote{what to do with the optional argument here and below?} +% +% \begin{macrocode} +%<*package> +\newcommand{\@atwin}[4][]{\ifindex\def\@test{#1}%% +\ifx\@test\@empty\def\@@idx{#2}\else\def\@@idx{#1}\fi% +\@ifundefined{mod@id}% +{\index{\@@idx @#2!#3!#4}% +\ifx\@test\@empty\def\@@idx{#3}\else\def\@@idx{#1}\fi +\index{\@@idx @#3!#2 (#4)}}% +{\index{\@@idx @{\importmodule{\mod@id} #2}!{\importmodule{\mod@id} #3}!{\importmodule{\mod@id} #4}} +\ifx\@test\@empty\def\@@idx{#3}\else\def\@@idx{#1}\fi% +\index{\@@idx @{\importmodule{\mod@id} #3}!{\importmodule{\mod@id} #2} ({\importmodule{\mod@id} #4})}\fi}} +\newcommand{\atwinalt}[5][]{#2\@atwin[#1]{#3}{#4}{#4}} +\newcommand{\atwintoo}[4][]{{#2 #3 #4}\@atwin[#1]{#2}{#3}{#4}} % and use it too +% +%<*ltxml> +DefConstructor('\indextoo[]{}', + "" + . "#2" + . "" + . "#2" + . "" + .""); +DefConstructor('\indexalt[]{}{}', + "" + . "#2" + . "" + . "#3" + . "" + .""); +% +% \end{macrocode} +% +% \begin{macrocode} +%<*ltxml> +DefConstructor('\twintoo[]{}{}', + "" + . "#2 #3" + . "" + . "#2" + . "#3" + . "" + .""); +DefConstructor('\twinalt[]{}{}{}', + "" + . "#2" + . "" + . "#2" + . "#3" + . "" + .""); +% +% \end{macrocode} +% +% \begin{macrocode} +%<*ltxml> +DefConstructor('\atwintoo[]{}{}{}', + "" + . "#2 #3" + . "" + . "#2" + . "#3" + . "#4" + . "" + .""); + +DefConstructor('\atwinalt[]{}{}{}{}', + "" + . "#2" + . "" + . "#2" + . "#3" + . "#4" + . "" + .""); +% +% \end{macrocode} +% \end{omgroup} +% +% \begin{omgroup}{{\LaTeX} Commands we interpret differently} +% +% The first think we have to take care of are the paragraphs, we want to generate {\omdoc} +% that uses the |ltx:p| element for paragraphs inside |CMP|s. For that we have modified +% the DTD only to allowed |ltx:p| elements in |omdoc:CMP| (in particular no text). Then +% we instruct the |\par| macro to close a |ltx:p| element if possible. The next +% |ltx:p| element is then opened automatically, since we make |ltx:p| and |omdoc:CMP| +% autoclose and autoopen. +% +% \begin{macrocode} +%<*ltxml> +# needed? DefConstructor('\par',sub { $_[0]->maybeCloseElement('ltx:p'); },alias=>"\\par\n"); +Tag('omdoc:CMP', autoClose=>1, autoOpen=>1); +Tag('omdoc:omtext', autoClose=>1, autoOpen=>1); +%#$ +% \end{macrocode} +% the rest of the reinterpretations is quite simple, we either disregard presentational +% markup or we re-interpret it in terms of {\omdoc}.\ednote{MK: we should probably let +% LaTeXML deal with these and allow more text in the omdoc+ltml.xsl} +% \begin{macrocode} +%\def\omspace#1{\hspace*{#1}} +%<*ltxml> +DefConstructor('\footnote[]{}', + "#2"); +DefConstructor('\footnotemark[]',""); +DefConstructor('\footnotetext[]{}', + "#2"); +% +% \end{macrocode} +% \end{omgroup} +% +% \begin{omgroup}[id=sec:impl:ids]{Providing IDs for {\omdoc} Elements} +% +% To provide default identifiers, we tag all {\omdoc} elements that allow |xml:id| +% attributes by executing the |numberIt| procedure below. Furthermore, we use the +% |locateIt| procedure to give source links. +% +% \begin{macrocode} +%<*ltxml> +Tag('omdoc:omtext',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:omgroup',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:CMP',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:idx',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:ide',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:idt',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:note',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:metadata',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:meta',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:resource',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('ltx:p',afterOpen=>\&numberIt,afterClose=>\&locateIt); +% +% \end{macrocode} +% We also have to number some {\latexml} tags, so that we do not get into trouble with the +% \omdoc tags inside them. +% \begin{macrocode} +%<*ltxml> +Tag('ltx:tabular',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('ltx:thead',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('ltx:td',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('ltx:tr',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('ltx:caption',afterOpen=>\&numberIt,afterClose=>\&locateIt); +% +% \end{macrocode} +% The |numberIt| procedure gets the prefix from first parent with an |xml:id| attribute and then +% extends it with a label that reflects the number of preceding siblings, provided that +% there is not already an identifier. Additionally, it estimates an XPointer position in the original document +% of the command sequence which produced the tag. +% The |locateIt| subroutine is a sibling of |numberIt| as it is required as an |afterClose| handle for tags +% produced by {\LaTeX} environments, as opposed to commands. |locateIt| estimates an XPointer end position of +% the LaTeX environment, allowing to meaningfully locate the entire environment at the source. +% \begin{macrocode} +%<*ltxml> +sub numberIt { + my($document,$node,$whatsit)=@_; + my(@parents)=$document->findnodes('ancestor::*[@xml:id]',$node); + my $prefix= (@parents ? $parents[$#parents]->getAttribute('xml:id')."." : ''); + my(@siblings)=$document->findnodes('preceding-sibling::*[@xml:id]',$node); + my $n = scalar(@siblings)+1; + my $id = ($node -> getAttribute('xml:id')); + my $localname = $node->localname; + $node->setAttribute('xml:id'=>$prefix."$localname$n") unless $id; + my $about = $node -> getAttribute('about'); + $node->setAttribute('about'=>'#'.$node->getAttribute('xml:id')) unless $about; + #Also, provide locators: + my $locator = $whatsit->getProperty('locator'); + #Need to inherit locators if missing: + $locator = (@parents ? $parents[$#parents]->getAttribute('stex:srcref') : '') unless $locator; + if ($locator) { + # There is a BUG with namespace declarations (or am I using the API wrongly??) which + # does not recognize the stex namespace. Hence, I need to redeclare it... + my $parent=$document->getNode; + if(! defined $parent->lookupNamespacePrefix("http://kwarc.info/ns/sTeX")) + { # namespace not already declared? + $document->getDocument->documentElement->setNamespace("http://kwarc.info/ns/sTeX","stex",0); + } + $node->setAttribute('stex:srcref'=>$locator); + }return;} + +sub locateIt { + my($document,$node,$whatsit)=@_; + #Estimate trailer locator: + my $trailer = $whatsit->getProperty('trailer'); + return unless $trailer; #Nothing we can do if the trailer isn't defined + $trailer = $trailer->getLocator; + return unless ($trailer && $trailer!~/^\s*$/); #Useless if broken + my $locator = $node->getAttribute('stex:srcref'); + if ($locator) { + $locator =~ /^(.+from=\d+;\d+)/; + my $from = $1; + $trailer =~ /(,to=\d+;\d+.+)$/; + my $to = $1; + $locator = $from.$to; + } else { + $locator = $trailer; #This should never happen + } + my $parent = $document->getNode; + if(! defined $parent->lookupNamespacePrefix("http://kwarc.info/ns/sTeX")) + { # namespace not already declared? + $document->getDocument->documentElement->setNamespace("http://kwarc.info/ns/sTeX","stex",0); + } + $node->setAttribute('stex:srcref' => $locator); + return; +} +%#$ +% \end{macrocode} +% \end{omgroup} +% +% \begin{omgroup}{Finale} +% +% We need to terminate the file with a success mark for perl. +% \begin{macrocode} +%1; +% \end{macrocode} +% \end{omgroup} +%\end{omgroup} +% \Finale +\endinput +% \iffalse +% LocalWords: GPL structuresharing STR omdoc dtx stex CPERL LoadClass url dc +%%% Local Variables: +%%% mode: doctex +%%% TeX-master: t +%%% End: +% \fi +% LocalWords: RequirePackage RegisterNamespace namespace xsl DocType ltxml dtd +% LocalWords: ltx DefEnvironment beforeDigest AssignValue inPreamble getGullet +% LocalWords: afterDigest keyval omgroup DefKeyVal Semiverbatim KeyVal +% LocalWords: OptionalKeyVals DefParameterType IfBeginFollows skipSpaces CMP +% LocalWords: ifNext DefMacro needwrapper unlist DefConstructor omtext bgroup +% LocalWords: useCMPItemizations RefStepItemCounter egroup beginItemize li di +% LocalWords: beforeDigestEnd dt autoclose ul ol dl env showignores srcref def +% LocalWords: afterOpen LastSeenCMP autoClose DefCMPEnvironment proto ToString +% LocalWords: addAttribute nlex nlcex omdocColorMacro args tok MergeFont qw rm +% LocalWords: TokenizeInternal toString isMath foreach maybeCloseElement id'd +% LocalWords: autoOpen minipage footnotesize scriptsize numberIt whatsit href +% LocalWords: getAttribute setAttribute OMDoc RelaxNGSchema noindex xml lec sc +% LocalWords: Subsubsection useDefaultItemizations refundefinedtrue sblockquote +% LocalWords: DefCMPConstructor sinlinequote idx idt ide idp emph extrefs sref +% LocalWords: flushleft flushright DeclareOption PassOptions undef cls iffalse +% LocalWords: ProcessOptions subparagraph ignoresfalse ignorestrue raisebox tr +% LocalWords: texorpdfstring latexml texttt fileversion maketitle newpage iff +% LocalWords: tableofcontents newpage ednote obeylines usepackage indextoo Cwd +% LocalWords: indextoo twintoo twintoo exfig vspace twinalt ldots ttin emin +% LocalWords: renmanig myindex atwin atwin packge-local blockquote inlinequote +% LocalWords: atwintoo atwinalt atwinalt printbibliography impl cwd newif ifx +% LocalWords: ifindex indextrue indexfalse srefaddidkey smallskip showmeta +% LocalWords: providecommand stDMemph textbf newenvironment hfil showmeta +% LocalWords: noindent ignorespaces newcommand nobreak hfill hbox mygraphics +% LocalWords: includegraphics mycgraphics mybgraphics fbox adjectivized hspace +% LocalWords: printindex jobname.ind jobname.ind omspace footnotemark thead +% LocalWords: footnotetext findnodes doctex textsf langle textsf langle funval +% LocalWords: metakeys funsymbs addmetakey metasetkeys startemph textsl textit +% LocalWords: compactenum diff --git a/Master/texmf-dist/source/latex/stex/omtext/omtext.ins b/Master/texmf-dist/source/latex/stex/omtext/omtext.ins new file mode 100644 index 00000000000..beb6e0bb89e --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/omtext/omtext.ins @@ -0,0 +1,40 @@ +%% +%% This file generates files required to use the ed package. +%% At your command prompt write +%% +%% latex omtext.ins +%% +%% Copyright(c) 2008 Michael Kohlhase +%% The development version of this file can be found at +%% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/omtext/omtext.ins $ +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{omtext.sty}{\from{omtext.dtx}{package}}} + +\Msg{*} +\Msg{* You probably need to move the file omtext.sty into a directory searched by TeX.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\nopreamble\nopostamble +\generate{\file{omtext.sty.ltxml}{\from{omtext.dtx}{ltxml}}} + +\Msg{*} +\Msg{* You may need to move the generated file omtext.sty.ltxml into a directory searched by LaTeXML.} +\Msg{*} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/stex/presentation/presentation.dtx b/Master/texmf-dist/source/latex/stex/presentation/presentation.dtx new file mode 100644 index 00000000000..11343b7322f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/presentation/presentation.dtx @@ -0,0 +1,1438 @@ +% \iffalse meta-comment +% An Infrastructure for Presenting Semantic Macros in sTeX +% Copyright (C) 2004-2007 Michael Kohlhase, all rights reserved +% This file is released under the LaTeX Project Public License (LPPL) +% +% The development version of this file can be found at +% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/presentation/presentation.dtx $ +% \fi +% +% \iffalse +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\ProvidesPackage{presentation}[2012/01/28 v1.0 presentation for semantic macros] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{url,array,float,amstext,alltt} +\usepackage{modules,presentation,stex-logo} +\usepackage[show]{ed} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} +\usepackage{../ctansvn} +\usepackage{hyperref} +\usepackage[eso-foot,today]{svninfo} +\svnInfo $Id: presentation.dtx 1999 2012-01-28 07:32:11Z kohlhase $ +\svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/presentation/presentation.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{presentation.dtx}\end{document} +% +% \fi +% +% \CheckSum{598} +% +% \changes{v0.9}{2005/06/14}{First Version with Documentation} +% \changes{v0.9a}{2005/07/01}{Completed Documentation} +% \changes{v0.9b}{2005/08/06}{Complete functionality and Updated Documentation} +% \changes{v0.9c}{2006/01/13}{more packaging} +% \changes{v0.9d}{2006/10/13}{adding mixfix declarations} +% \changes{v0.9d}{2006/10/13}{dealing with precedences in keyword arguments} +% \changes{v0.9e}{2007/09/03}{fixing argument precedences, adding LaTeXML bindings} +% \changes{v0.9f}{2007/12/09}{adding general elision} +% \changes{v0.9g}{2008/06/17}{getting the LaTeXML right} +% \changes{v0.9h}{2009/02/27}{turning the precedence order around to make this compatible +% with the latest OMDoc, change all precedences $n$ to $1000-n$} +% \changes{v0.9h}{2009/07/30}{adding brackets to the generated notation elements} +% \changes{v0.9h}{2010/06/18}{considering done now} +% \changes{v1.0}{2010/12/27}{adding \texttt{\textbackslash funapp}} +% \changes{v1.0}{2011/01/28}{moving \texttt{\textbackslash funapp} and +% \texttt{\textbackslash vname} (and friends) to new package {\texttt{cmath}}} +% \GetFileInfo{presentation.sty} +% +% \MakeShortVerb{\|} +%\def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} +% \def\xml{\scsys{Xml}} +% \def\mathml{\scsys{MathML}} +% \def\omdoc{\scsys{OMDoc}} +% \def\openmath{\scsys{OpenMath}} +% \def\latexml{\scsys{LaTeXML}} +% \def\perl{\scsys{Perl}} +% \def\cmathml{Content-{\sc MathML}\index{Content {\sc MathML}}\index{MathML@{\sc MathML}!content}} +% \def\activemath{\scsys{ActiveMath}} +% \def\twin#1#2{\index{#1!#2}\index{#2!#1}} +% \def\twintoo#1#2{{#1 #2}\twin{#1}{#2}} +% \def\atwin#1#2#3{\index{#1!#2!#3}\index{#3!#2 (#1)}} +% \def\atwintoo#1#2#3{{#1 #2 #3}\atwin{#1}{#2}{#3}} +% \title{{\texttt{presentation.sty}}: An Infrastructure for Presenting Semantic +% Macros in {\stex}\thanks{Version {\fileversion} (last revised {\filedate})}} +% \author{Michael Kohlhase \& Deyan Ginev\\ +% Jacobs University, Bremen\\ +% \url{http://kwarc.info/kohlhase}} +% \date{\today} +% \maketitle +% +% \begin{abstract} +% The |presentation| package is a central part of the {\stex} collection, a version of +% {\TeX/\LaTeX} that allows to markup {\TeX/\LaTeX} documents semantically without +% leaving the document format, essentially turning {\TeX/\LaTeX} into a document format +% for mathematical knowledge management (MKM). +% +% This package supplies an infrastructure that allows to specify the presentation of +% semantic macros, including preference-based bracket elision. This allows to markup the +% functional structure of mathematical formulae without having to lose high-quality +% human-oriented presentation in {\LaTeX}. Moreover, the notation definitions can be +% used by MKM systems for added-value services, either directly from the {\sTeX} +% sources, or after translation. +% \end{abstract} +% +% \newpage\setcounter{tocdepth}{2}\tableofcontents\newpage +% +%\section{Introduction}\label{sec:presentation} +% +% The |presentation| package supplies an infrastructure that allows to specify the +% presentation of semantic macros, including preference-based bracket elision. This allows +% to markup the functional structure of mathematical formulae without having to lose +% high-quality human-oriented presentation in {\LaTeX}. Moreover, the notation definitions +% can be used by MKM systems for added-value services, either directly from the {\sTeX} +% sources, or after translation. +% +% {\stex} is a version of {\TeX/\LaTeX} that allows to markup {\TeX/\LaTeX} documents +% semantically without leaving the document format, essentially turning {\TeX/\LaTeX} into +% a document format for mathematical knowledge management (MKM). +% +% The setup for semantic macros described in the {\stex} |modules| package works well for +% simple mathematical functions: we make use of the macro application syntax in {\TeX} to +% express function application. For a simple function called ``foo'', we would just +% declare |\symdef{foo}[1]{foo(#1)}| and have the concise and intuitive syntax |\foo{x}| +% for $foo(x)$. But mathematical notation is much more varied and interesting than just +% this. +% +% \section{The User Interface}\label{sec:user} +% +% In this package we will follow the {\sTeX} approach and assume that there are four basic +% types of mathematical expressions: symbols, variables, applications and +% binders. Presentation of the variables is relatively straightforward, so we will not +% concern ourselves with that. The application of functions in mathematics is mostly +% presented in the form $f(a_1,\ldots,a_n)$, where $f$ is the function and the $a_i$ are +% the arguments. However, many commonly-used functions from this presentational scheme: +% for instance binomial coefficients: $\bigl({n\atop k}\bigr)$, pairs: $\langle +% a,b\rangle$, sets: $\{x\in S\,\vert\, x^2\ne0\}$, or even simple addition: $3+5+7$. Note +% that in all these cases, the presentation is determined by the (functional) head of the +% expression, so we will bind the presentational infrastructure to the operator. +% +% \subsection{Prefix \& Postfix Notations}\label{sec:prepostfix} +% +% The default notation for an object that is obtained by applying a function $f$ to +% arguments $a_1$ to $a_n$ is $f(a_1,\ldots,a_n)$. The \DescribeMacro{\prefix}|\prefix| +% macro allows to specify a prefix presentation for a function (the usual presentation in +% mathematics). Note that it is better to specify |\symdef{uminus}[1]{\prefix{-}{#1}}| +% than just |\symdef{uminus}[1]{-#1}|, since we can specify the bracketing behavior in the +% former (see Section~\ref{sec:elision}). +% +% The \DescribeMacro{\postfix}|\postfix| macro is similar, only that the function is +% presented after the argument as for e.g. the factorial function: $5!$ stands for the +% result of applying the factorial function to the number 5. Note that the function is +% still the first argument to the |\postfix| macro: we would specify the presentation for +% the factorial function with |\symdef{factorial}[1]{\postfix{!}{#1}}|. +% +% |\prefix| and |\postfix| have $n$-ary variants \DescribeMacro{\prefixa}|\prefixa| and +% \DescribeMacro{\postfixa}|\postfixa| that take an arbitrary number of arguments +% (mathematically; syntactically grouped into one {\TeX} argument). These take an extra +% separator argument.\ednote{think of a good example!} +% +% Note that in \stex the |\prefix| and |\postfix| macros should primarily be used in +% |\symdef| declarations. For marking up applications of symbolic functions in text we +% should use the |\symdef|-defined semantic macros direct. For applications of function +% variables we have two options: +% \begin{compactenum}[\em i)] +% \item direct prefix markup of the form |f(x)|, where we have declared the symbol |f| to +% be a function via the |function| key of the enclosing environment --- e.g. |omtext| +% (see~\cite{Kohlhase:smmtf*:svn}). +% \item using the \DescribeMacro{\funapp}|\funapp| macro as in |\funapp{f}{x}|, which +% leads to the same effect and is more general (e.g. for complex function variables, +% such as $f_1^\prime$). Note that the default prefix rendering of the function is +% sufficient here, since we can otherwise make use of a user-defined application +% operator. +% \end{compactenum} +% +% \subsection{Mixfix Notations}\label{sec:mixfix} +% +% For the presentation of more complex operators, we will follow the approach used by the +% Isabelle theorem prover. There, the presentation of an $n$-ary function (i.e. one that +% takes $n$ arguments) is specified as +% \meta{pre}\meta{arg$_0$}\meta{mid$_1$}$\cdots$\meta{mid$_n$}\meta{arg$_n$}\meta{post}, +% where the \meta{arg$_i$} are the arguments and \meta{pre}, \meta{post}, and the +% \meta{mid$_i$} are presentational material. For instance, in infix operators like the +% binary subset operator, \meta{pre} and $\meta{post}$ are empty, and \meta{mid$_1$} is +% $\subseteq$. For the ternary conditional operator in a programming language, we might +% have the presentation pattern +% |if|\meta{arg$_1$}|then|\meta{arg$_2$}|else|\meta{arg$_3$}|fi| that utilizes all +% presentation positions. +% +% \DescribeMacro{\mixfix*}The |presentation| package provides mixfix declaration macros +% |\mixfixi|, |\mixfixii|, and |\mixfixiii| for unary, binary, and ternary functions. This +% covers most of the cases, larger arities would need a different argument +% pattern.\footnote{If you really need larger arities, contact the author!} The call +% pattern of these macros is just the presentation pattern above. In general, the mixfix +% declaration of arity $i$ has $2n+1$ arguments, where the even-numbered ones are for the +% arguments of the functions and the odd-numbered ones are for presentation material. For +% instance, to define a semantic macro for the subset relation and the conditional, we +% would use the markup in Figure~\ref{fig:mixfix}. +% \begin{exfig} +% \begin{verbatim} +% \symdef{sseteq}[2]{\mixfixii{}{#1}{\subseteq}{#2}{}} +% \symdef{sseteq}[2]{\infix\subseteq{#1}{#2}} +% \symdef{ite}[2]{\mixfixiii{{\tt{if}}\;}{#1} +% {\;{\tt{then}}\;}{#2} +% {\;{\tt{else}}\;}{#3}{\;{\tt{fi}}}} +% \end{verbatim} +% \vspace*{-1.5em} +% \begin{center} +% \begin{tabular}{|l|l|}\hline +% source & presentation \\\hline +% |\sseteq{S}T| & $(S\subseteq T)$\\\hline +% |\ite{x<0}{-x}x| & ${\tt{if}}\,x<0\,{\tt{then}}\,-x\,{\tt{else}}\,x\,{\tt{fi}}$\\\hline +% \end{tabular} +% \end{center} +% \caption{Declaration of mixfix operators}\label{fig:mixfix} +% \end{exfig} +% +% For certain common cases, the |presentation| package provides shortcuts for the mixfix +% declarations. For instance, we provide the \DescribeMacro{\infix}|\infix| macro for +% binary operators that are written between their arguments (see Figure~\ref{fig:mixfix}).\ednote{really?} +% +% \subsection{\texorpdfstring{$n$}{n}-ary Associative Operators}\label{sec:assoc} +% +% Take for instance the operator for set union: formally, it is a binary function on +% sets that is associative (i.e. $(S_1\cup S_2)\cup S_3=S_1\cup (S_2\cup S_3)$), therefore +% the brackets are often elided, and we write $S_1\cup S_2\cup S_3$ instead (once we have +% proven associativity). Some authors even go so far to introduce set union as a $n$-ary +% operator, i.e. a function that takes an arbitrary (positive) number of arguments. We will +% call such operators {\bf{$n$-ary +% associative}\atwin{n-ary}{associative}{operator}}. +% +% Specifying the presentation\ednote{introduce the notion of presentation above} of +% $n$-ary associative operators in |\symdef| forms is not straightforward, so we provide +% some infrastructure for that. As we cannot predict the number of arguments for $n$-ary +% operators, we have to give them all at once, if we want to maintain our use of {\TeX} +% macro application to specify function application. So a semantic macro for an $n$-ary +% operator will be applied as |\nunion{|\meta{$a_1$}|,|\ldots|,|\meta{$a_n$}|}|, where the +% sequence of $n$ logical arguments \meta{$a_i$} are supplied as one {\TeX} argument which +% contains a comma-separated list. We provide variants of the mixfix declarations +% presented in section~\ref{sec:mixfix} which deal with associative arguments. For +% instance, the variant \DescribeMacro{\mixfixa}|\mixfixa| allows to specify $n$-ary +% associative operators. +% |\mixfixa{|\meta{pre}|}{|\meta{arg}|}{|\meta{post}|}{|\meta{op}|}| specifies a +% presentation, where \meta{arg} is the associative argument and \meta{op} is the +% corresponding operator that is mapped over the argument list; as above, {\meta{pre}}, +% \meta{post}, are prefix and postfix presentational material. For instance, the finite +% set constructor could be constructed as +% \begin{verbatim} +% \newcommand{\fset}[1]{\mixfixa[p=1000]{\{}{#1}{\}}{,}} +% \end{verbatim} +% +% The \DescribeMacro{\assoc}|\assoc| macro is a convenient abbreviation of a |\mixfixa| +% that can be used in cases, where \meta{pre} and \meta{post} are empty (i.e. in the +% majority of cases). It takes two arguments: the presentation of a binary operator, and a +% comma-separated list of arguments, it replaces the commas in the second argument with +% the operator in the first one. For instance |\assoc\cup{S_1,S_2,S_3}| will be formatted +% to $S_1\cup S_2\cup S_3$. Thus we can use |\def\nunion#1{\assoc\cup{#1}}| or even +% |\def\nunion{\assoc\cup}|, to define the $n$-ary operator for set union in {\TeX}. For +% the definition of a semantic macro in {\stex}, we use the second form, since we are more +% conscious of the right number of arguments and would declare +% |\symdef{nunion}[1]{\assoc\cup{#1}}|.\ednote{think about big operators for ACI +% functions} +% +% The |\mixfixii| macro has variants \DescribeMacro{\mixfixia}|\mixfixia| and +% \DescribeMacro{\mixfixai}|\mixfixai| which allow to make one or two arguments in a +% binary function associative. A use case for the second macro is an nary function type +% operator |\fntype|, which can be defined via +% \begin{verbatim} +% \def\fntype#1#2{\mixfixai{}{#1}\rightarrow{#2}{}\times} +% \end{verbatim} +% \def\fntype#1#2{\mixfixai{}{#1}\rightarrow{#2}{}\times} +% and which will format |\fntype{\alpha,\beta,\gamma}\delta| as +% $\fntype{\alpha,\beta,\gamma}\delta$ +% +% Finally, the |\mixfixiii| macro has the variants |\mixfixaii|, |\mixfixiai|, and +% |\mixfixiia| as above\footnote{If you really need larger arities with associative +% arguments, contact the package author!}. For instance we can use the first variant for +% a typing judgment using +% \begin{verbatim} +% \def\typej#1#2#3{\mixfixaii{}{#1}{\vdash_{\Sigma}}{#2}\colon{#3}{}{,}} +% \end{verbatim} +% \def\typej#1#2#3{\mixfixaii{}{#1}{\vdash_{\Sigma}}{#2}\colon{#3}{}{,}} +% which formats |\typej{\Gamma,[x:\alpha],[y:\beta]}{f(x,y)}{\beta}| as +% \[\typej{\Gamma,[x:\alpha],[y:\beta]}{f(x,y)}{\beta}.\] +% +% \subsection{Precedence-Based Bracket Elision}\label{sec:elision} +% +% In the infrastructure discussed above, we have completely ignored the fact that we use +% brackets to disambiguate the formula structure. The general baseline rule here is that +% we enclose any presented subformula with (round) brackets to mark it as a logical unit. +% If we applied this to the following formula that combines set union and set intersection +% \begin{equation}\label{cupcap} +% |\nunion{\ninters{a,b},\ninters{c,d}}| +% \end{equation} +% this would yield $((a\cap b)\cup (c\cap d))$, and not $a\cap b\cup c\cap d$ as we are +% used to. In mathematics, brackets are elided, whenever the author anticipates that the +% reader can understand the formula without them, and would be overwhelmed with them. To +% achieve this, there are set of common conventions that govern bracket elision --- +% ``$\cap$ binds stronger than $\cup$'' in (\ref{cupcap}). The most common is to assign +% precedences to all operators, and elide brackets, if the {\index*{precedence}} of the +% operator is larger than that of the context it is presented in (or equivalently: we only +% write brackets, if the operator precedence is smaller or equal to the context +% precedence). Note that this is more selective that simply dropping outer brackets which +% would yield $a\cap b\cup c\cap d$ for (\ref{capcup}), where we would have liked $(a\cup +% b)\cap(c\cup d)$ +% \begin{equation}\label{capcup} +% |\ninters{\nunion{a,b},\nunion{c,d}}| +% \end{equation} +% In our example above, we would assign $\cap$ a larger precedence than $\cup$ (and both a +% larger precedence than the initial precedence to avoid outer brackets). To compute the +% presentation of (\ref{capcup}) we start out with the |\ninters|, elide its brackets +% (since the precedence $n$ of $\cup$ is larger than the initial precedence $i$), and set +% the context precedence for the arguments to $n$. When we present the arguments, we +% present the brackets, since the precedence of |nunion| is larger than the context +% precedence $n$. +% +% This algorithm --- which we call {\textbf{precedence-based bracket elision}} --- goes a +% long way towards approximating mathematical practice. Note that full bracket elision in +% mathematical practice is a reader-oriented process, it cannot be fully mechanical, +% e.g. in $(a\cap b\cap c\cap d\cap e\cap f\cap g)\cup h$ we better put the brackets +% around the septary intersection to help the reader even though they could have been +% elided by our algorithm. Therefore, the author has to retain full control\ednote{think +% about how to implement that. We need a way to override precedences locally} over +% bracketing in a bracket elision architecture. Otherwise it would become impossible to +% explain the concept of associativity in $(a\circ b)\circ c =a\circ(b\circ c)$, where we +% need the brackets for this one time on an otherwise associative operation $\circ$. +% +% \begin{figure}[htb] +% \begin{center} +% \begin{tabular}{|l|l|l|}\hline +% Precedence & Operators & Comment\\\hline\hline +% 800 & +,- & unary \\\hline +% 800 & $\hat{}$ & exponentiation \\\hline +% 600 & $*,\land,\cap$ & multiplicative \\\hline +% 500 & $+,-,\lor,\cup$ & additive\\\hline +% 400 & / & fraction \\\hline +% 300 & $=, \ne, \leq, <, >, \geq$ & relation\\\hline +% \end{tabular} +% \end{center}\vspace*{-1em} +% \caption{Common Operator Precedences}\label{fig:precedence} +% \end{figure} +% +% Furthermore, we supply an optional keyval arguments to the mixfix declarations and their +% abbreviations that allow to specify precedences: The key \DescribeMacro{p}|p| key is +% used to specify the {\bf{operator precedence}}, and the keys +% \DescribeMacro{pi}\DescribeMacro{pii}\DescribeMacro{piii}|p|\meta{i} can be used to +% specify the {\bf{argument precedence}s}. The latter will set the precedence level while +% processing the arguments, while the operator precedence invokes brackets, if it is +% smaller than the current precedence level --- which is set by the appropriate argument +% precedence by the dominating operators or the outer precedence. The values of the +% precedence keys can be integers or \DescribeMacro{\iprec}|\iprec| for the infinitely +% large precedence or \DescribeMacro{\niprec}|\niprec| for the infinitely small +% precedence. +% +% If none of the precedences is specified, then the defaults are assumed. The operator +% precedence is set to the default operator precedence, which defaults to 0. The argument +% precedences default to the operator precedence. +% +% Figure~\ref{fig:precedence} gives an overview over commonly used precedences. Note that +% most operators have precedences higher than the default precedence of 0, otherwise the +% brackets would not be elided. For our examples above, we would define +% \begin{verbatim} +% \newcommand{\nunion}[1]{\assoc[p=500]{\cup}{#1}} +% \newcommand{\ninters}[1]{\assoc[p=600]{\cap}{#1}} +% \end{verbatim} +% to get the desired behavior. +% +% Note that the presentation macros uses round brackets for grouping by default. We can +% specify other brackets via two more keywords: \DescribeMacro{lbrack}|lbrack| and +% \DescribeMacro{rbrack}|rbrack|. +% +% Note that formula parts that look like brackets usually are not. For instance, we should +% not define the finite set constructor via +% \begin{equation}\label{wrongset} +% |\newcommand{\fset}[1]{\assoc[lbrack=\{,rbrack=\}]{,}{#1}}| +% \end{equation} +% where the curly braces are used as brackets, but as presented in section~\ref{sec:assoc} +% even though both would format |\fset{a,b,c}| as $\{a,b,c\}$. In the encoding here, an +% operator with suitably high operator precedence (it is the best practice u)would be able +% to make the brackets disappear. Thus the correct version of (\ref{wrongset}) is +% \begin{equation}\label{goodset} +% |\newcommand{\fset}[1]{\mixfixa[p=\iprec,pi=0]{\{}{#1}{\}}{,}}| +% \end{equation} +% Note that |\prefix| and |\postfix| and their variants declared in +% section~\ref{sec:prepostfix} have brackets that do not participate (actively) in the +% precedence-based elision: function application brackets are not subject to elision. But +% the operator precedence |p| is still taken into account for outer brackets. The argument +% precedence |pi| has negative infinity as a default to avoid spurious brackets for +% arguments. +% +% \subsection{Flexible Elision}\label{sec:flexible-elision} +% +% There are several situations in which it is desirable to display only some parts of the +% presentation: +% \begin{itemize} +% \item We have already seen the case of redundant brackets above +% \item Arguments that are strictly necessary are omitted to simplify the notation, and the +% reader is trusted to fill them in from the context. +% \item Arguments are omitted because they have default values. For example $\log_{10}x$ +% is often written as $\log x$. +% \item Arguments whose values can be inferred from the other arguments are usually +% omitted. For example, matrix multiplication formally takes five arguments, namely the +% dimensions of the multiplied matrices and the matrices themselves, but only the latter +% two are displayed. +% \end{itemize} +% +% Typically, these elisions are confusing for readers who are getting acquainted with a +% topic, but become more and more helpful as the reader advances. For experienced readers +% more is elided to focus on relevant material, for beginners representations are more +% explicit. In the process of writing a mathematical document for traditional (print) +% media, an author has to decide on the intended audience and design the level of elision +% (which need not be constant over the document though). With electronic media we have new +% possibilities: we can make elisions flexible. The author still chooses the elision level +% for the initial presentation, but the reader can adapt it to her level of competence and +% comfort, making details more or less explicit. +% +% To provide this functionality, the |presentation| package provides the +% \DescribeMacro{\elide}|\elide| macro allows to associate a text with an integer +% {\textbf{visibility level}} and group them into {\textbf{elision groups}}. High levels +% mean high elidability. +% +% Elision can take various forms in print and digital media. In static media like +% traditional print on paper or the PostScript format, we have to fix the elision level, +% and can decide at presentation time which elidable tokens will be printed and which will +% not. In this case, the presentation algorithm will take visibility thresholds $T_g$ for +% every elidability group $g$ as a user parameter and then elide (i.e. not print) all +% tokens in visibility group $g$ with level $l>T_g$. We specify this threshold for via the +% \DescribeMacro{\setegroup}|\setegroup| macro. For instance in the example below, we have +% a two type annotations |par| for type parameters and |typ| for type annotations +% themselves. +% +% \begin{exfig}[ht] +% \begin{verbatim} +% $\mathbf{I}\elide{par}{500}{^\alpha}\elide{typ}{100}{_{\alpha\to\alpha}} +% :=\lambda{X\elide{typ}{500}{_\alpha}}.X$ +% \end{verbatim}\vspace*{-2em} +% \caption{Elision with Elision Groups}\label{ex:elision} +% \end{exfig} +% +% The visibility levels in the example encode how redundant the author thinks the elided +% parts of the formula are: low values show high redundancy. In our example the intuition +% is that the type parameter on the $\mathbf{I}$ combinator and the type annotation on the +% bound variable $X$ in the $\lambda$ expression are of the same obviousness to the +% reader. So in a document that contains |\setegroup{typ}{0}| and |\setegroup{par}{0}| +% Figure~\ref{ex:elision} will show $\mathbf{I}:=\lambda{X}.X$ eliding all redundant +% information. If we have both values at 600, then we will see +% $\mathbf{I}^\alpha:=\lambda{X_\alpha}.X$ and only if the threshold for |typ| rises above +% 900, then we see the full information: +% $\mathbf{I}^\alpha_{\alpha\to\alpha}:=\lambda{X_\alpha}.X$. +% +% In an output format that is capable of interactively changing its appearance, e.g. +% dynamic XHTML+MathML (i.e. XHTML with embedded Presentation {\mathml} formulas, which +% can be manipulated via JavaScript in browsers), an application can export the +% information about elision groups and levels to the target format, and can then +% dynamically change the visibility thresholds by user interaction. Here the visibility +% threshold would also be used, but here it only determines the default rendering; a user +% can then fine-tune the document dynamically to reveal elided material to support +% understanding or to elide more to increase conciseness. +% +% The price the author has to pay for this enhanced user experience is that she has to +% specify elided parts of a formula that would have been left out in conventional +% {\LaTeX}. Some of this can be alleviated by good coding practices. Let us consider the +% log base case. This is elided in mathematics, since the reader is expected to pick it up +% from context. Using semantic macros, we can mimic this behavior: defining two semantic +% macros: |\logC| which picks up the log base from the context via the |\logbase| macro +% and |\logB| which takes it as a (first) argument. +% +% \begin{verbatim} +% \provideEdefault{logbase}{10} +% \symdef{logB}[2]{\prefix{\mathrm{log}\elide{base}{100}{_{#1}}}{#2}} +% \abbrdef{logC}[1]{\logB{\fromEcontext{logbase}}{#1}} +% \end{verbatim} +% +% \DescribeMacro{\provideEdefault} Here we use the |\provideEdefault| macro to initialize +% a {\LaTeX} token register for the |logbase| default, which we can pick up from the +% elision context using \DescribeMacro{\fromEcontext}|\fromEcontext| in the definition of +% |\logC|. Thus |\logC{x}| would render as $\mathrm{log}_{10}(x)$ with a threshold of 50 +% for |base| and as $\mathrm{log}_2$, if the local {\TeX} group e.g. given by the +% |assertion| environment contains a +% \DescribeMacro{setEdefault}|\setEdefault{logbase}{2}|. +% +% \subsection{Other Layout Primitives}\label{sec:inter:primitives} +% +% Not all mathematical layouts are producible with mixfix notations. A prime example are +% grid layouts which are marked up using the |array| element in {\TeX/\LaTeX}, e.g. for +% definition by cases as the (somewhat contrived) definition of the absolute value +% function in the upper part of Figure~\ref{fig:piece}. We will now motivate the need of +% special layout primitives with this example. +% \begin{exfig} +% \begin{module}[id=foo] +% \symdef{piece}[2]{\arrayline{\arraycell{#1}}{\text{if}\;#2}} +% \symdef{otherwise}[1]{\arrayline{\arraycell{#1}}{\text{else}}} +% \symdef{piecewise}[1]{\left\{\begin{array}{rl}#1\end{array}\right.} +% \qquad\begin{minipage}[c]{5cm} +% $\vert x\vert\colon=\piecewise{\piece{x}{x>0}\piece{-x}{x<0}\otherwise{0}}$ +% \end{minipage} +% \qquad +% \begin{minipage}[c]{7cm} +% \begin{verbatim} +% |x|\colon=\left\{ +% \begin{array}{rl} +% x & x>0\\ +% -x & x<0\\ +% 0 & \text{else} +% \end{array} +% \right. +% \end{verbatim} +% \end{minipage} +% \end{module} +% \hrule +% \begin{verbatim} +% \symdef{piece}[2]{\arrayline{\arraycell{#1}}{\text{if}\;#2}} +% \symdef{otherwise}[1]{\arrayline{\arraycell{#1}}{\text{else}}} +% \symdef{piecewise}[1]{\left\{\begin{array}{rl}#1\end{array}\right.} +% $|x|\colon=\piecewise{\piece{x}{x>0}\piece{-x}{x<0}\otherwise{0}}$ +% \end{verbatim} +% \vspace*{-1.5em} +% \caption{A piecewise definition of the absolute value function}\label{fig:piece} +% \end{exfig} +% But this does not work for content markup via semantic macros~\cite{KohAmb:smmssl:ctan}, +% which wants to group formula parts by function. For definition by cases, we may want to +% follow the OpenMath |piece1| content dictionary~\cite{CD:piece1:on}, which groups +% ``piecewise'' definitions into a constructor |piecewise|, whose children are a list of +% |piece| constructors optionally followed by an |otherwise|. If we want to mimic this by +% semantic macros in \stex (these are defined via |\symdef|; see~\cite{KohAmb:smmssl:ctan} +% for details), we would naturally define |\piecewise| by wrapping an |array| environment +% (see the last line in Figure~\ref{fig:piece}). Then we would naturally be tempted to +% define |\piece| via |\symdef{piece}[2]{#1&\text{if}\;{#2}\\}| and |\otherwise| via +% |\symdef{otherwise}[1]{#1&\text{else}}|. But this does not support the generation of +% separate notation definitions for |\piece| and |\otherwise|: here \latexml has to +% generate presentational information outside of the |array| context that provides the |&| +% and |\\| command sequences\footnote{Note that this is not a problem when we only run +% |latex| if we assume that \texttt{\textbackslash piece} and \texttt{\textbackslash +% otherwise} are only used in arguments of \texttt{\textbackslash piecewise}.}. Therefore +% the |presentation| package provides the macros |\arrayline| and |\arraycell| that +% refactor this functionality. +% +% \DescribeMacro{\arrayline}|\arrayline{|\meta{cells}|}{|\meta{cell}|}| is +% {\LaTeX}-equivalent to \meta{cells}|&|\meta{cell}|\\| and can thus be used to create +% array lines with one or more array cells: \meta{cell} is the last array cell, and the +% previous ones are each marked up as +% \DescribeMacro{\arraycell}|\arraycell{|\meta{cell}|}|, where \meta{cell} is the cell +% content. In last lines of Figure~\ref{fig:piece} we have used them to create the array +% lines for |\piece| and |\otherwise|. Note that the array cell specifications in +% |\arrayline| must coincide with the array specification in the main constructor (here +% |rl| in |\piecewise|). +% +% \section{Limitations}\label{sec:limitations} +% +% In this section we document known limitations. If you want to help alleviate them, +% please feel free to contact the package author. Some of them are currently discussed in +% the \sTeX TRAC~\cite{sTeX:online}. +% \begin{compactenum} +% \item none reported yet +% \end{compactenum} +% +% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography} +% +% \section{The Implementation}\label{sec:implementation} +% +% The |presentation| package generates to 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 +% {\textsf{$\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. +% +% For {\latexml}, we initialize the package inclusions. +% \begin{macrocode} +%<*ltxml> +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +% +% \end{macrocode} +% +% \subsection{Package Options}\label{sec:impl:options} +% +% We declare some switches which will modify the behavior according to the package +% options. Generally, an option |xxx| will just set the appropriate switches to true +% (otherwise they stay false).\ednote{we have no options at the moment} +% +% \begin{macrocode} +%<*package> +\ProcessOptions +% +% \end{macrocode} +% +% We first make sure that the KeyVal package is loaded (in the right +% version). For {\latexml}, we also initialize the package inclusions. +% \begin{macrocode} +%\RequirePackage{keyval}[1997/11/10] +% \end{macrocode} +% We will first specify the default precedences and brackets, together with the macros +% that allow to set them. +% \begin{macrocode} +%<*package> +\def\pres@default@precedence{0} +\def\pres@infty{1000000} +\def\iprec{\pres@infty} +\def\niprec{-\pres@infty} +\def\pres@initial@precedence{0} +\def\pres@current@precedence{\pres@initial@precedence} +\def\pres@default@lbrack{(}\def\pres@lbrack{\pres@default@lbrack} +\def\pres@default@rbrack{)}\def\pres@rbrack{\pres@default@rbrack} +% +%<*ltxml> +DefMacro('\iprec','1000000'); +DefMacro('\niprec','-1000000'); +% +% \end{macrocode} +% +% \subsection{The System Commands}\label{sec:impl:syscommands} +% +% \begin{macro}{\PrecSet} +% |\PrecSet| will set the default precedence.\ednote{need to implement this in {\latexml}?} +% \begin{macrocode} +%<*package> +\def\PrecSet#1{\def\pres@default@precedence{#1}} +% +%<*ltxml> +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\PrecWrite} +% |\PrecWrite| will write a bracket, if the precedence mandates it, i.e. if |\pres@p| is +% greater than the current precedence specified by |\pres@current@precedence| +% \begin{macrocode} +%<*package> +\def\PrecWrite#1{\ifnum\pres@p>\pres@current@precedence\else{#1}\fi} +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Prefix \& Postfix Notations}\label{sec:impl:prepostfix} +% +% We first define the keys for the keyval arguments for |\prefix| and |\postfix|. +% +% \begin{macrocode} +%<*package> +\def\prepost@clearkeys{\def\pres@p@key{\pres@default@precedence}\def\pres@pi@key{\niprec} +\def\pres@lbrack{\pres@default@lbrack}\def\pres@rbrack{\pres@default@rbrack}} +\define@key{prepost}{lbrack}{\def\pres@lbrack{#1}} +\define@key{prepost}{rbrack}{\def\pres@lbrack{#1}} +\define@key{prepost}{p}{\def\pres@p@key{#1}} +\define@key{prepost}{pi}{\def\pres@pi@key{#1}} +% +% \end{macrocode} +% +% \begin{macro}{\prefix} +% In prefix we always write the brackets. +% \begin{macrocode} +%<*package> +\newcommand{\prefix}[3][]%key, fn, arg +{\prepost@clearkeys\setkeys{prepost}{#1} +{#2}\pres@lbrack{\edef\pres@current@precedence{\pres@pi@key}#3}\pres@rbrack} +% +%<*ltxml> +DefConstructor('\crossrefOp[]{}', + "?#2(" + . "" + . "#2" + .")()", + requireMath=>1); + +DefMacro('\prefix[]{}{}','\@prefix[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}'); +DefConstructor('\@prefix OptionalKeyVals:mi {}{}', + "" + . "" + . "#2" + . "" + . "(" + . "#3" + . ")" + . "" + . "" + ."", + afterDigest=>sub { + #Default argument precedence is -\infty + my $keyval = $_[1]->getArg(1); + $keyval->setValue('pi',-1000000) unless ($keyval && defined($keyval->getValue('pi'))); + applyPrecedencePreferences(@_); + }, + properties=>sub { getSymmdefProperties($_[1]); }); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\postfix} +% \begin{macrocode} +%<*package> +\newcommand{\postfix}[3][]%key, fn, arg +{\prepost@clearkeys\setkeys{prepost}{#1} +\pres@lbrack{\edef\pres@current@precedence{\pres@pi@key}#3}\pres@rbrack{#2}} +% +%<*ltxml> +DefMacro('\postfix []{}{}','\@postfix[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}'); +DefConstructor('\@postfix OptionalKeyVals:mi {}{}', + "" + . "" + . "" + . "(" + . "#3" + . ")" + . "" + . "#2" + . "" + ."", + afterDigest=>sub { + #Default argument precedence is -\infty + my $keyval = $_[1]->getArg(1); + $keyval->setValue('pi',-1000000) unless ($keyval && defined($keyval->getValue('pi'))); + applyPrecedencePreferences(@_); + }, + properties=>sub { getSymmdefProperties($_[1]); }); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\funapp} +% Finally the |\funapp| macro is very simple: +% \begin{macrocode} +%<*package> +\newcommand{\funapp}[2]{\prefix{#1}{#2}} +% +%<*ltxml> +DefConstructor('\funapp{}{}','#1#2'); +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Mixfix Operators}\label{sec:impl:mixfix} +% +% We need to enable notation definitions of the operators that have +% argument- and precedence-aware renderings. To this end, we +% circumvent {\latexml}'s limitations induced by its internal +% processing stages, by pulling most of the argument rendering +% functionality to the XSLT which produces the final {\omdoc} result. +% +% In the {\latexml} bindings, the internal structure of the mixfix +% operators is generically preserved, via the |symdef_presentation_pmml| subroutine +% in the Modules package. Nevertheless, in the current module we add the promised syntactic +% enhancements to each element of the mixfix family. Also, we use the +% |argument_precedence| subroutine to store the precedences given by +% the 'pi', 'pii', etc. keys as a temporary |argprec| +% attribute of the rendering, to be abolished during the final {\omdoc} generation. +% This setup is finally utilized by the XSLT stylesheet which combines +% the operator structure with the preserved precedences to produce the +% proper form of the argument render elements. +% +% \begin{macrocode} +%<*package> +\def\clearkeys{\let\pres@p@key=\relax +\let\pres@pi@key=\relax% +\let\pres@pi@key=\relax% +\let\pres@pii@key=\relax% +\let\pres@piii@key=\relax} +\define@key{mi}{nobrackets}[yes]{\def\pres@p@key{\pres@infty}% +\def\pres@pi@key{-\pres@infty}} +\define@key{mi}{lbrack}{\def\pres@lbrack@key{#1}} +\define@key{mi}{rbrack}{\def\pres@lbrack@key{#1}} +\define@key{mi}{p}{\def\pres@p@key{#1}} +\define@key{mi}{pi}{\def\pres@pi@key{#1}} +\def\prep@keys@mi% +{\edef\pres@lbrack{\@ifundefined{pres@lbrack@key}\pres@default@lbrack\pres@lbrack@key} +\edef\pres@rbrack{\@ifundefined{pres@rbrack@key}\pres@default@rbrack\pres@rbrack@key} +\edef\pres@p{\@ifundefined{pres@p@key}\pres@default@precedence\pres@p@key} +\edef\pres@pi{\@ifundefined{pres@pi@key}\pres@p\pres@pi@key}} +% +%<*ltxml> +our $max_arguments = 10; #Currently max 10 arguments to \symdef. +DefKeyVal('mi','lbrack','Semiverbatim'); +DefKeyVal('mi','rbrack','Semiverbatim'); +DefKeyVal('mi','p','Semiverbatim'); +DefKeyVal('mi','pi','Semiverbatim'); +DefKeyVal('mi','pii','Semiverbatim'); #Why are we using this at mixfixai ? +DefKeyVal('mi','cd','Semiverbatim'); +DefKeyVal('mi','name','Semiverbatim'); +DefKeyVal('mi','nobrackets','Semiverbatim'); +sub argument_precedence { + my ($keyval) = @_; + my $attr = 'pi'; + my @precs = (); + foreach (1..$max_arguments) { + if (defined KeyVal($keyval,$attr)) { + push @precs, ToString(KeyVal($keyval,$attr)) + } else { + push @precs, ""; + } + $attr = $attr.'i'; + } + return join(" ",@precs)." "; +} +sub applyPrecedencePreferences { + my ($stomach,$whatsit) = @_; + my @args = $whatsit->getArgs; + my $keyvals = shift @args; + return unless (defined $keyvals); + my %kvhash = %{$keyvals->getKeyVals}; + #Default p (operator precedence) if not set: + my $default_precedence = LookupValue('default_precedence'); + $keyvals->setValue('p',$default_precedence) unless defined($keyvals->getValue('p')); + return unless (exists $kvhash{'nobrackets'}); + $keyvals->setValue('p',1000000); + $keyvals->setValue('pi',-1000000); + $keyvals->setValue('pii',-1000000); + $keyvals->setValue('piii',-1000000); + return; +}#$ +% +% \end{macrocode} +% +% \begin{macro}{\mixfixi} +% \begin{macrocode} +%<*package> +\newcommand{\mixfixi}[4][]%key, pre, arg, post +{\clearkeys\setkeys{mi}{#1}\prep@keys@mi% +\PrecWrite\pres@lbrack% +#2{\edef\pres@current@precedence{\pres@pi}#3}#4% +\PrecWrite\pres@rbrack} +% +%<*ltxml> +DefMacro('\mixfixi[]{}{}{}', + '\@mixfixi[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + . '{\ensuremath{\crossrefOp[fun]{#4}}}'); +DefConstructor('\@mixfixi OptionalKeyVals:mi {}{}{}', + "" + . "" + . "(" + . "#2 #3 #4" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@assoc} +% We are using functionality from the {\LaTeX} core packages here to iterate over the +% arguments. +% \begin{macrocode} +%<*package> +\def\@assoc#1#2#3{% precedence, function, argv +\let\@tmpop=\relax% do not print the function the first time round +\@for\@I:=#3\do{\@tmpop% print the function +% write the i-th argument with locally updated precedence +{\edef\pres@current@precedence{#1}\@I}% +\let\@tmpop=#2}}%update the function +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mixfixa} +% \begin{macrocode} +%<*package> +\newcommand{\mixfixa}[5][]%key, pre, arg, post, assocop +{\clearkeys\setkeys{mi}{#1}\prep@keys@mi% +\PrecWrite\pres@lbrack{#2}{\@assoc\pres@pi{#5}{#3}}{#4}\PrecWrite\pres@rbrack} +% +%<*ltxml> +DefMacro('\mixfixa[]{}{}{}{}', + '\@mixfixa[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + . '{\ensuremath{\crossrefOp[fun]{#4}}}' + . '{\ensuremath{\crossrefOp[fun]{\ensuremath{#5 }}}}'); +DefConstructor('\@mixfixa OptionalKeyVals:mi {}{}{}{}', + "" + . "" + . "(" + . "#2" + . "" + . "#5" + . "" + . "" + . "#4" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +%<*package> +\define@key{mii}{nobrackets}[yes]{\def\pres@p@key{\pres@infty}% +\def\pres@pi@key{-\pres@infty}\def\pres@pii@key{-\pres@infty}} +\define@key{mii}{lbrack}{\def\pres@lbrack@key{#1}} +\define@key{mii}{rbrack}{\def\pres@lbrack@key{#1}} +\define@key{mii}{p}{\def\pres@p@key{#1}} +\define@key{mii}{pi}{\def\pres@pi@key{#1}} +\define@key{mii}{pii}{\def\pres@pii@key{#1}} +\def\prep@keys@mii{\prep@keys@mi% +\edef\pres@pii{\@ifundefined{pres@pii@key}\pres@p\pres@pii@key}} +% +%<*ltxml> +DefKeyVal('mii','lbrack','Semiverbatim'); +DefKeyVal('mii','rbrack','Semiverbatim'); +DefKeyVal('mii','p','Semiverbatim'); +DefKeyVal('mii','pi','Semiverbatim'); +DefKeyVal('mii','pii','Semiverbatim'); +DefKeyVal('mii','cd','Semiverbatim'); +DefKeyVal('mii','name','Semiverbatim'); +DefKeyVal('mii','nobrackets','Semiverbatim'); +% +% \end{macrocode} +% +% \begin{macro}{\mixfixii} +% \begin{macrocode} +%<*package> +\newcommand{\mixfixii}[6][]%key, pre, arg1, mid, arg2, post +{\clearkeys\setkeys{mii}{#1}\prep@keys@mii% +\PrecWrite\pres@lbrack% write bracket if necessary +#2{\edef\pres@current@precedence{\pres@pi}#3}% +#4{\edef\pres@current@precedence{\pres@pii}#5}#6% +\PrecWrite\pres@rbrack} +% +%<*ltxml> +DefMacro('\mixfixii[]{}{}{}{}{}', + '\@mixfixii[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' + . '{\ensuremath{\crossrefOp[fun]{#6}}}'); +DefConstructor('\@mixfixii OptionalKeyVals:mi {}{}{}{}{}', + "" + . "" + . "(" + . "#2 #3 #4 #5 #6" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mixfixia} +% \begin{macrocode} +%<*package> +\newcommand{\mixfixia}[7][]%key, pre, arg1, mid, arg2, post, assocop +{\clearkeys\setkeys{mii}{#1}\prep@keys@mii% +\PrecWrite\pres@lbrack% write bracket if necessary +#2{\edef\pres@current@precedence{\pres@pi}#3}% +#4{\@assoc\pres@pii{#7}{#5}}#6% +\PrecWrite\pres@rbrack} +% +%<*ltxml> +DefMacro('\mixfixia[]{}{}{}{}{}{}', + '\@mixfixia[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' + . '{\ensuremath{\crossrefOp[fun]{#6}}}' + . '{\ensuremath{\crossrefOp[fun]{#7}}}'); +DefConstructor('\@mixfixia OptionalKeyVals:mii {}{}{}{}{}{}', + "" + . "" + . "(" + . "#2 #3 #4" + . "" + . "#7" + . "" + . "" + . "#6" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mixfixai} +% \begin{macrocode} +%<*package> +\newcommand{\mixfixai}[7][]%key, pre, arg1, mid, arg2, post, assocop +{\clearkeys\setkeys{mii}{#1}\prep@keys@mii% +\PrecWrite\pres@lbrack% write bracket if necessary +#2{\@assoc\pres@pi{#7}{#3}}% +#4{\edef\pres@current@precedence{\pres@pii}#5}#6% +\PrecWrite\pres@rbrack} +% +%<*ltxml> +DefMacro('\mixfixai[]{}{}{}{}{}{}', + '\@mixfixai[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + .'{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' + .'{\ensuremath{\crossrefOp[fun]{#6}}}' + .'{\ensuremath{\crossrefOp[fun]{#7}}}'); +DefConstructor('\@mixfixai OptionalKeyVals:mi {}{}{}{}{}{}', + "" + . "" + . "(" + . "#2" + . "" + . "#7" + . "" + . "" + . "#4 #5 #6" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +%<*package> +\define@key{miii}{nobrackets}[yes]{\def\pres@p@key{\pres@infty}% +\def\pres@pi@key{-\pres@infty} +\def\pres@pii@key{-\pres@infty} +\def\pres@pii@key{-\pres@infty}} +\define@key{miii}{lbrack}{\def\pres@lbrack@key{#1}} +\define@key{miii}{rbrack}{\def\pres@lbrack@key{#1}} +\define@key{miii}{p}{\def\pres@p@key{#1}} +\define@key{miii}{pi}{\def\pres@pi@key{#1}} +\define@key{miii}{pii}{\def\pres@pii@key{#1}} +\define@key{miii}{piii}{\def\pres@piii@key{#1}} +\def\prep@keys@miii{\prep@keys@mii% +\edef\pres@piii{\@ifundefined{pres@piii@key}{\pres@p}{\pres@piii@key}}} +% +%<*ltxml> +DefKeyVal('miii','lbrack','Semiverbatim'); +DefKeyVal('miii','rbrack','Semiverbatim'); +DefKeyVal('miii','p','Semiverbatim'); +DefKeyVal('miii','pi','Semiverbatim'); +DefKeyVal('miii','pii','Semiverbatim'); +DefKeyVal('miii','piii','Semiverbatim'); +DefKeyVal('miii','cd','Semiverbatim'); +DefKeyVal('miii','name','Semiverbatim'); +DefKeyVal('miii','nobrackets','Semiverbatim'); +% +% \end{macrocode} +% +% \begin{macro}{\mixfixiii} +% \begin{macrocode} +%<*package> +\newcommand{\mixfixiii}[8][]%key, pre, arg1, mid1, arg2, mid2, arg3, post +{\clearkeys\setkeys{miii}{#1}\prep@keys@miii% +\PrecWrite\pres@lbrack% write bracket if necessary +#2{\edef\pres@current@precedence{\pres@pi}#3}% +#4{\edef\pres@current@precedence{\pres@pii}#5}% +#6{\edef\pres@current@precedence{\pres@pii}#7}#8% +\PrecWrite\pres@rbrack} +% +%<*ltxml> +DefMacro('\mixfixiii[]{}{}{}{}{}{}{}', + '\@mixfixiii[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' + . '{\ensuremath{\crossrefOp[fun]{#6}}}{\ensuremath{#7 }}' + . '{\ensuremath{\crossrefOp[fun]{#8}}}'); +DefConstructor('\@mixfixiii OptionalKeyVals:mi {}{}{}{}{}{}{}', + "" + . "" + . "(" + . "#2 #3 #4 #5 #6 #7 #8" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mixfixaii} +% \begin{macrocode} +%<*package> +\newcommand{\mixfixaii}[9][]%key, pre, arg1, mid1, arg2, mid2, arg3, post, sep +{\clearkeys\setkeys{miii}{#1}\prep@keys@miii% +\PrecWrite\pres@lbrack% write bracket if necessary +#2{\@assoc\pres@pi{#9}{#3}}% +#4{\edef\pres@current@precedence{\pres@pii}#5}% +#6{\edef\pres@current@precedence{\pres@pii}#7}#8% +\PrecWrite\pres@rbrack} +% +%<*ltxml> +DefMacro('\mixfixaii[]{}{}{}{}{}{}{}{}', + '\@mixfixaii[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' + . '{\ensuremath{\crossrefOp[fun]{#6}}}{\ensuremath{#7 }}' + . '{\ensuremath{\crossrefOp[fun]{#8}}}' + . '{\ensuremath{\crossrefOp[fun]{#9}}}'); +DefConstructor('\@mixfixaii OptionalKeyVals:mi {}{}{}{}{}{}{}{}', + "" + . "" + . "(" + . "#2" + . "" + . "#9" + . "" + . "" + . "#4 #5 #6 #7 #8" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mixfixiai} +% \begin{macrocode} +%<*package> +\newcommand{\mixfixiai}[9][]%key, pre, arg1, mid1, arg2, mid2, arg3, post, assocop +{\clearkeys\setkeys{miii}{#1}\prep@keys@miii% +\PrecWrite\pres@lbrack% write bracket if necessary +#2{\edef\pres@current@precedence{\pres@pi}#3}% +#4{\@assoc\pres@pi{#9}{#5}}% +#6{\edef\pres@current@precedence{\pres@pii}#7}#8% +\PrecWrite\pres@rbrack} +% +%<*ltxml> +DefMacro('\mixfixiai[]{}{}{}{}{}{}{}{}', + '\@mixfixiai[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' + . '{\ensuremath{\crossrefOp[fun]{#6}}}{\ensuremath{#7 }}' + . '{\ensuremath{\crossrefOp[fun]{#8}}}' + . '{\ensuremath{\crossrefOp[fun]{#9}}}'); +DefConstructor('\@mixfixiai OptionalKeyVals:mi {}{}{}{}{}{}{}', + "" + . "" + . "(" + . "#2 #3 #4" + . "" + . "#9" + . "" + . "" + . "#6 #7 #8" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\mixfixiia} +% \begin{macrocode} +%<*package> +\newcommand{\mixfixiia}[9][]%key, pre, arg1, mid1, arg2, mid2, arg3, post,assocop +{\clearkeys\setkeys{miii}{#1}\prep@keys@miii% +\PrecWrite\pres@lbrack% write bracket if necessary +#2{\edef\pres@current@precedence{\pres@pi}#3}% +#4{\edef\pres@current@precedence{\pres@pii}#5}% +#6{\@assoc\pres@pi{#9}{#7}}#8% +\PrecWrite\pres@rbrack} +% +%<*ltxml> +DefMacro('\mixfixiia[]{}{}{}{}{}{}{}{}', + '\@mixfixiia[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' + . '{\ensuremath{\crossrefOp[fun]{#6}}}{\ensuremath{#7 }}' + . '{\ensuremath{\crossrefOp[fun]{#8}}}' + . '{\ensuremath{\crossrefOp[fun]{#9}}}'); +DefConstructor('\@mixfixiia OptionalKeyVals:mi {}{}{}{}{}{}{}', + "" + . "" + . "(" + . "#2 #3 #4 #5 #6" + . "" + . "#9" + . "" + . "" + . "#8" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\prefixa} +% In prefix we always write the brackets. +% \begin{macrocode} +%<*package> +\newcommand{\prefixa}[4][]%keys, fn, arg, sep +{\prepost@clearkeys\setkeys{prepost}{#1} +{#2}\pres@lbrack{\@assoc\pres@pi@key{#3}{#4}}\pres@rbrack} +% +%<*ltxml> +DefMacro('\prefixa[]{}{}{}','\@prefixa[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}{\ensuremath{#4 }}'); +DefConstructor('\@prefixa OptionalKeyVals:mi {}{}{}', + "" + . "" + . "#2" + . "" + . "(" + . "" + . "#4" + . "" + . "" + . ")" + . "" + . "" + ."", + afterDigest=>sub { + #Default argument precedence is -\infty + my $keyval = $_[1]->getArg(1); + $keyval->setValue('pi',-1000000) unless ($keyval && defined($keyval->getValue('pi'))); + applyPrecedencePreferences(@_); + }, + properties=>sub { getSymmdefProperties($_[1]); }); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\postfixa} +% \begin{macrocode} +%<*package> +\newcommand{\postfixa}[4][]%keys, fn, arg, sep +{\prepost@clearkeys\setkeys{prepost}{#1} +\pres@lbrack{\@assoc\pres@pi@key{#3}{#4}}\pres@rbrack{#2}} +% +%<*ltxml> +DefMacro('\postfixa []{}{}{}','\@postfixa[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}{\ensuremath{#4 }}'); +DefConstructor('\@postfixa OptionalKeyVals:mi {}{}{}', + "" + . "" + . "" + . "(" + . "" + . "#4" + . "" + . "" + . ")" + . "" + . "#2" + . "" + ."", + afterDigest=>sub { + #Default argument precedence is -\infty + my $keyval = $_[1]->getArg(1); + $keyval->setValue('pi',-1000000) unless ($keyval && defined($keyval->getValue('pi'))); + applyPrecedencePreferences(@_); + }, + properties=>sub { getSymmdefProperties($_[1]); }); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\infix} +% |\infix|\ednote{need infixl as well, use counters for precedences here.} is a simple +% special case of |\mixfixii|. +% \begin{macrocode} +%RawTeX(' +%<*package|ltxml> +\newcommand{\infix}[4][]{\mixfixii[#1]{}{#3}{#2}{#4}{}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\assoc} +% \begin{macrocode} +\newcommand{\assoc}[3][]{\mixfixa[#1]{}{#3}{}{#2}} +% +%'); +% \end{macrocode} +% \end{macro} +% +% \subsection{General Elision}\label{sec:impl:elision} +% +% \ednote{all of these still need to be tested and implemented in LaTeXML.} +% \begin{macro}{\setegroup} +% The elision macros are quite simple, a group |foo| is internally represented by a +% macro |foo@egroup|, which we set by a |\gdef|. +% \begin{macrocode} +%<*package> +\def\setegroup#1#2{\expandafter\def\csname #1@egroup\endcsname{#2}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\elide} +% Then the elision command is picks up on this (flags an error) if the internal macro +% does not exist and prints the third argument, if the elision value threshold is above +% the elision group threshold in the paper.\ednote{do we need to turn this around as +% well?} We test the implementation with Figure~\ref{ex:elision-test}. +% \begin{macrocode} +%<*package> +\def\elide#1#2#3{\@ifundefined{#1@egroup}% +{\def\@elevel{0} +\PackageError{presentation}{undefined egroup #1, assuming value 0}% +{When calling \protect\elide{#1}... the elision group #1 has be have\MessageBreak +been set by \protect\setegroup before, e.g. by \protect\setegroup{an}{0}.}}% +{\edef\@elevel{\csname #1@egroup\endcsname}}% +\ifnum\@elevel>#2\else{#3}\fi} +% +%<*ltxml> +% +% \end{macrocode} +% \end{macro} +% +% \begin{figure}[ht]\centering +% \begin{tabular}{|l|l|l|l|}\hline +% {\texttt{par}} & {\texttt{typ}} & result & expected \\\hline\hline +% 0 & 0 & \setegroup{par}{0}\setegroup{typ}{0} +% $\mathbf{I}\elide{par}{500}{^\alpha}\elide{typ}{100}{_{\alpha\to\alpha}} +% :=\lambda{X\elide{typ}{500}{_\alpha}}.X$ +% & $\mathbf{I}:=\lambda{X}.X$\\\hline +% 600 & 600 & \setegroup{par}{600}\setegroup{typ}{600} +% $\mathbf{I}\elide{par}{500}{^\alpha}\elide{typ}{100}{_{\alpha\to\alpha}} +% :=\lambda{X\elide{typ}{500}{_\alpha}}.X$ +% & $\mathbf{I}^\alpha:=\lambda{X_\alpha}.X$\\\hline +% 600 & 1000 & \setegroup{par}{600}\setegroup{typ}{1000} +% $\mathbf{I}\elide{par}{500}{^\alpha}\elide{typ}{100}{_{\alpha\to\alpha}} +% :=\lambda{X\elide{typ}{500}{_\alpha}}.X$ +% & $\mathbf{I}^\alpha_{\alpha\to\alpha}:=\lambda{X_\alpha}.X$\\\hline +% \end{tabular} +% \caption{Testing Elision with the example in Figure~\protect\ref{ex:elision}}\label{ex:elision-test} +% \end{figure} +% +% \begin{macro}{\provideEdefault} +% The |\provideEdefault| macro sets up the context for an elision default by locally +% defining the internal macro \meta{default}|@edefault| and (if necessary) exporting it +% from the module. +% \begin{macrocode} +%<*package> +\def\provideEdefault#1#2{\expandafter\def\csname#1@edefault\endcsname{#2} +\@ifundefined{this@module}{}% +{\expandafter\g@addto@macro\this@module{\expandafter\def\csname#1@edefault\endcsname{#2}}}} +% +%<*ltxml> +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\setEdefault} +% The |\setEdefault| macro just redefines the internal \meta{default}|@edefault| in the +% local group +% \begin{macrocode} +%<*package> +\def\setEdefault#1#2{\expandafter\def\csname #1@edfault\endcsname{#2}} +% +%<*ltxml> +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\fromEcontext} +% The |\fromEcontext| macro just calls internal \meta{default}|@edefault| macro. +% \begin{macrocode} +%<*package> +\def\fromEcontext#1{\csname #1@edefault\endcsname} +% +%<*ltxml> +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Other Layout Primitives}\label{sec:impl:primitives} +% +% The |\arrayline| and |\arraycell| macros are simple refactorings of the |array| +% functionality on the {\LaTeX} side\ednote{@Deyan, implement and describe them on the +% latexml side} +% +% \begin{macro}{\arrayline} +% \begin{macrocode} +%\newcommand{\arrayline}[2]{#1#2\\} +%<*ltxml> +DefConstructor('\arrayline{}{}','#1#2'); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\arraycell} +% \begin{macrocode} +%\newcommand{\arraycell}[1]{#1&} +%<*ltxml> +DefConstructor('\arraycell{}','#1'); +% +% \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 +% +% LocalWords: dtx CPERL RequirePackage keyval lbrack rbrack DefKeyVal omdoc cd +% LocalWords: Semiverbatim DefConstructor OptionalKeyVals pmml ltx XMath mii +% LocalWords: pii miii piii KeyVal egroup namedef attr precs foreach ToString +% LocalWords: DefMacro stex srcref argprec mrow getSymmdefProperties +% LocalWords: args arg LaTeX cvar iffalse scsys sc sc mathml openmath latexml +% LocalWords: cmathml activemath twintoo atwin atwintoo texttt fileversion foo +% LocalWords: Deyan Ginev maketitle setcounter tocdepth tableofcontents symdef +% LocalWords: newpage ldots bigl bigr langle ary cdots subseteq mixfixi exfig +% LocalWords: mixfixii mixfixiii vspace hline sseteq ite tt tt tt tt uminus rb +% LocalWords: texorpdfstring assoc ednote nunion mixfixa mixfixa postfixa leq +% LocalWords: postfixa mixfixia mixfixia mixfixai mixfixai fntype rightarrow +% LocalWords: mixfixaii mixfixiai mixfixiia typej vdash cupcap ninters ninters +% LocalWords: capcup geq prec fset textbf textbf setegroup setegroup mathbf fn +% LocalWords: provideEdefault provideEdefault fromEcontext fromEcontext mathrm +% LocalWords: setEdefault setEdefault widetilde cdot vname vname vnref vnname +% LocalWords: ulivar ulivar primvar primvar pprimvar pprimvar textsf textsf rl +% LocalWords: printbibliography ltxml infty ifnum clearkeys nobrackets whatsit +% LocalWords: ifundefined keyvals kvhash newcommand setkeys crossrefOp argv +% LocalWords: tmpop i-th assocop textbackslash infixl gdef expandafter csname +% LocalWords: endcsname edefault edfault ifx prepostfix circ circ circ circ +% LocalWords: iprec iprec niprec niprec wrongset goodset prepost prepkeys +% LocalWords: arrayline arraycell qquad hrule diff --git a/Master/texmf-dist/source/latex/stex/presentation/presentation.ins b/Master/texmf-dist/source/latex/stex/presentation/presentation.ins new file mode 100644 index 00000000000..8816bef3454 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/presentation/presentation.ins @@ -0,0 +1,38 @@ +%% +%% This file generates files required to use the ed package. +%% At your command prompt write +%% +%% latex presentation.ins +%% +%% Copyright(c) 2005 Michael Kohlhase +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{presentation.sty}{\from{presentation.dtx}{package}}} + +\Msg{*} +\Msg{* You probably need to move the generated style files into a directory searched by TeX.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\nopreamble\nopostamble +\generate{\file{presentation.sty.ltxml}{\from{presentation.dtx}{ltxml}}} + +\Msg{*} +\Msg{* You probably need to move the generated ltxml files into a directory searched by LaTeXML.} +\Msg{*} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/stex/problem/problem.dtx b/Master/texmf-dist/source/latex/stex/problem/problem.dtx new file mode 100644 index 00000000000..b498c90c04e --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/problem/problem.dtx @@ -0,0 +1,603 @@ +% \iffalse meta-comment +% An Infrastructure for Problems +% $URL: https://svn.kwarc.info/repos/stex/trunk/sty/problem/problem.dtx $ +% $Rev: 1999 $; last modified by $Author: kohlhase $ +% $Date: 2012-01-28 08:32:11 +0100 (Sat, 28 Jan 2012) $ +% Copyright (c) 2006-2008 Michael Kohlhase, all rights reserved +% this file is released under the +% LaTeX Project Public License (LPPL) +% \fi +% +% \iffalse +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\ProvidesPackage{problem}[2012/01/28 v0.9c Semantic Markup for Problems] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{url,float,latexml} +\usepackage[solutions,hints,notes]{problem} +\usepackage[show]{ed} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} +\usepackage[eso-foot,today]{svninfo} +\svnInfo $Id: problem.dtx 1999 2012-01-28 07:32:11Z kohlhase $ +\svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/problem/problem.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{problem.dtx}\end{document} +% +% \fi +% +% \CheckSum{396} +% +% \changes{v0.9}{2006/09/18}{First Version with Documentation} +% \changes{v0.9a}{2007/01/02}{Renamed to \texttt{problem.sty}} +% \changes{v0.9b}{2008/10/01}{added extraction} +% \changes{v0.9c}{2010/01/03}{based on \texttt{omd.sty} now} +% +% \GetFileInfo{problem.sty} +% +% \MakeShortVerb{\|} +% +% \title{\texttt{problem.sty}: An Infrastructure for formatting Problems\thanks{Version {\fileversion} (last revised +% {\filedate})}} +% \author{Michael Kohlhase\\ +% Jacobs University, Bremen\\ +% \url{http://kwarc.info/kohlhase}} +% \maketitle +% +% \begin{abstract} +% The |problem| package supplies an infrastructure that allows specify problems and to +% reuse them efficiently in multiple environments. +% \end{abstract} +% \setcounter{tocdepth}{2}\tableofcontents\newpage +% +%\section{Introduction}\label{sec:intro} +% +% The |problem| package supplies an infrastructure that allows specify problem. Problems +% are text fragments that come with auxiliary functions: hints, notes, and +% solutions\footnote{for the momenet multiple choice problems are not supported, but may +% well be in a future version}. Furthermore, we can specify how long the solution to a +% given problem is estimated to take and how many points will be awarded for a perfect +% solution. +% +% Finally, the |problem| package facilitates the management of problems in small files, +% so that problems can be re-used in multiple environment. +% +% \section{The User Interface}\label{sec:ui} +% +% \subsection{Package Options} +% The |problem| package takes the options \DescribeMacro{solutions}|solutions| (should +% solutions be output?), \DescribeMacro{notes}|notes| (should the problem notes be +% presented?), \DescribeMacro{hints}|hints| (do we give the hints?), +% \DescribeMacro{pts}|pts| (do we display the points awarded for solving the problem?), +% \DescribeMacro{min}|min| (do we display the estimated minutes for problem soling). If +% theses are specified, then the corresponding auxiliary parts of the problems are output, +% otherwise, they remain invisible. +% +% The \DescribeMacro{boxed}|boxed| option specifies that problems should be formatted in +% framed boxes so that they are more visible in the text. Finally, the +% \DescribeMacro{test}|test| option signifies that we are in a test sitution, so this +% option does not show the solutions (of course), but leaves space for the students to +% solve them. +% +% The \DescribeMacro{extract}|extract| option can be set if we want to extract a problems +% file, e.g. to display the solutions, see Section~\ref{sec:user:includeproblem} for a +% discussion. +% +% Finally, if the \DescribeMacro{showmeta}|showmeta| is set, then the metadata keys are +% shown (see~\cite{Kohlhase:metakeys:ctan} for details and customization options). +% +% \subsection{Problems and Solutions}\label{sec:user:probsols} +% +% \DescribeEnv{problem} The main enviornment provided by the |problem| package is +% (surprise surprise) the |problem| environment. It is used to mark up problems and +% excercises. The environment takes an optional KeyVal argument with the keys +% \DescribeMacro{id}|id| as an identifier that can be reference later, +% \DescribeMacro{pts}|pts| for the points to be gained from this exercise in homework or +% quiz situations, \DescribeMacro{min}|min| for the estimated minutes needed to solve the +% problem, and finally \DescribeMacro{title}|title| for an informative title of the +% problem. For an example of a marked up problem see Figure~\ref{fig:problem} and the +% resulting markup see Figure~\ref{fig:result}. +% +%\begin{exfig} +% \begin{verbatim} +% \usepackage[solutions,hints,pts,min]{problem} +% \begin{document} +% \begin{problem}[id=elefants,pts=10,min=2,title=Fitting Elefants] +% How many Elefants can you fit into a Volkswagen beetle? +% \begin{hint} Think positively, this is simple!\end{hint} +% \begin{exnote}Justify your answer\end{exnote} +% \begin{solution}[for=elefants,height=3cm] +% Four, two in the front seats, and two in the back. +% \end{solution} +% \end{problem} +% \end{document} +% \end{verbatim} +% \caption{A marked up Problem}\label{fig:problem} +% \end{exfig} +% +% \DescribeEnv{solution} The |solution| environment can be to specify a solution to a +% problem. If the \DescribeMacro{solutions}|solutions| option is set or |\solutionstrue| +% is set in the text, then the solution will be presented in the output. The |solution| +% environment takes an optional KeyVal argument with the keys \DescribeMacro{id}|id| for +% an identifier that can be reference \DescribeMacro{for}|for| to specify which problem +% this is a solution for, and \DescribeMacro{height}|height| that allows to specify the +% amount of space to be left in test situations (i.e. if the \DescribeMacro{test}|test| +% option is set in the |\usepackage| statement). +% +%\begin{exfig} +% \begin{minipage}{.9\linewidth} +% \begin{problem}[id=elefants.prob,title=Fitting Elefants] +% How many Elefants can you fit into a Volkswagen beetle? +% \begin{hint} Think positively, this is simple!\end{hint} +% \begin{exnote}Justify your answer\end{exnote} +% \begin{solution}%[for=elefants.prob,height=3cm] +% Four, two in the front seats, and two in the back. +% \end{solution} +% \end{problem} +% \end{minipage} +% \caption{The Formmatted Problem from Figure~\ref{fig:problem}}\label{fig:result} +% \end{exfig} +% +% \DescribeEnv{hint}\DescribeEnv{note}, the |hint| and |exnote| environments can be used +% in a |problem| enviroment to give hints and to make notes that elaborate certain aspects +% of the problem. +% +% \subsection{Including Problems}\label{sec:user:includeproblem} +% +% The \DescribeMacro{\includeproblem}|\includeproblem| macro can be used to include a +% problem from another file. It takes an optional KeyVal argument and a second argument +% which is a path to the file containing the problem (the macro assumes that there is only +% one problem in the include file). The keys \DescribeMacro{title}|title|, +% \DescribeMacro{min}|min|, and \DescribeMacro{pts}|pts| specify the problem title, the +% estimated minutes for solving the problem and the points to be gained, and their values +% (if given) overwrite the ones specified in the |problem| environment in the included +% file. +% +% Sometimes we want to collect all the included problems into a separate file that can be +% typeset independently. The main application is to have course notes into which the +% problems are included (usually in boxed form to distinguish them from the rest of the +% text and without solutions) and to have the problems with solutions in a separate file +% (to encourage students to try and solve the problems before looking up solutions). In +% this situation set the \DescribeMacro{extract}|extract| option on the notes file +% \meta{notes}|.tex|, which causes a file \meta{notes}|-solutions.tex| to be generated +% that has the |\includeproblem| statements with the respective numbers from the main +% document. This can then be imported into a document with the respective front and +% backmatter. In particular the frontmatter of the importing will ususlly specify the +% \DescribeMacro{solutions}|solutions| option to generate solutions. +% +% \subsection{Reporting Metadata}\label{sec:user:reporting} +% +% The sum of the points and estimated minutes (that we specified in the |pts| and |min| +% keys to the |problem| environment or the |\includeproblem| macro) to the log file and +% the screen after each run. This is useful in preparing exams, where we want to make sure +% that the students can indeed solve the problems in an alotted time period. +% +% The |\min| and |\pts| macros allow to specify (i.e. to print to the margin) the +% distribution of time and reward to parts of a problem, if the |pts| and |pts| package +% options are set. This allows to give students hints about the estimated time and the +% points to be awarded. +% +% \section{Limitations}\label{sec:limitations} +% +% In this section we document known limitations. If you want to help alleviate them, +% please feel free to contact the package author. Some of them are currently discussed in +% the \sTeX TRAC~\cite{sTeX:online}. +% \begin{compactenum} +% \item none reported yet +% \end{compactenum} +% +% \StopEventually{\newpage\PrintChanges} +% \newpage +% +% \section{The Implementation}\label{sec:implementation} +% +% The |problem| 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} +% +% 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}} +\newif\ifexnotes\exnotesfalse\DeclareOption{notes}{\exnotestrue} +\newif\ifhints\hintsfalse\DeclareOption{hints}{\hintstrue} +\newif\ifsolutions\solutionsfalse\DeclareOption{solutions}{\solutionstrue} +\newif\ifpts\ptsfalse\DeclareOption{pts}{\ptstrue} +\newif\ifmin\minfalse\DeclareOption{min}{\mintrue} +\newif\ifboxed\boxedfalse\DeclareOption{boxed}{\boxedtrue} +\newif\ifextract\extractfalse\DeclareOption{extract}{\extracttrue} +\ProcessOptions +% +% \end{macrocode} +% +% On the {\LaTeXML} side we only make sure that the switches are defined +% \begin{macrocode} +%<*ltxml> +RawTeX(' +\newif\ifexnotes\exnotesfalse +\newif\ifhints\hintsfalse +\newif\ifsolutions\solutionsfalse +\newif\ifpts\ptsfalse +\newif\ifmin\minfalse +\newif\ifboxed\boxedfalse +\newif\ifextract\extractfalse +'); +% +% \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{xcomment} +\RequirePackage{sref} +% +% \end{macrocode} +% +% Here comes the equivalent header information for {\LaTeXML}, we also initialize the +% package inclusions. Since {\LaTeXML} currently does not process package options, we have +% nothing to do. +% \begin{macrocode} +%<*ltxml> +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +RequirePackage('sref'); +% +% \end{macrocode} +% +% Then we register the namespace of the requirements ontology +% \begin{macrocode} +%<*ltxml> +RegisterNamespace('prob'=>"http://omdoc.org/ontology/problems#"); +RegisterDocumentNamespace('prob'=>"http://omdoc.org/ontology/problems#"); +% +% \end{macrocode} +% +% \subsection{Problems and Solutions}\label{sec:impl:probsols} +% +% We now prepare the KeyVal support for problems. The key macros just set appropriate +% internal macros. +% +% \begin{macrocode} +%<*package> +\srefaddidkey[prefix=prob.]{problem} +\addmetakey{problem}{pts} +\addmetakey{problem}{min} +\addmetakey*{problem}{title} +\addmetakey{problem}{refnum} +% \end{macrocode} +% +% Then we set up a box and a counter for problems +% +% \begin{macrocode} +\newsavebox{\probbox} +\newcounter{problem}[section] +% \end{macrocode} +% +% \begin{macro}{\prob@number} +% We consolidate the problem number into a reusable internal macro +% \begin{macrocode} +\def\prob@number{\ifx\inclprob@refnum\@empty +\ifx\problem@refnum\@empty\thesection.\theproblem\else\problem@refnum\fi +\inclprob@refnum\fi} +% \end{macrocode} +% \end{macro} +% +% We consolidate the problem header line into a separate internal macro that can be reused +% in various settings. +% +% \begin{macro}{\prob@heading} +% We consolidate the problem header line into a separate internal macro that can be +% reused in various settings. +% \begin{macrocode} +\def\prob@heading{Problem \prob@number% +\ifx\sref@id\@empty\else{\sref@label@id{Problem \thesection.\theproblem}}\fi% +\ifx\inclprob@title\@empty% if there is no outside title +\ifx\problem@title\@empty{:\quad}\else{\quad(\problem@title)\hfill\\}\fi +\else\quad(\inclprob@title)\hfill\\\fi}% else show the outside title +% \end{macrocode} +% \end{macro} +% +% With this in place, we can now define the |problem| environment. It comes in two shapes, +% depending on whether we are in boxed mode or not. In both cases we increment the problem +% number and output the points and minutes (depending) on whehter the respective options +% are set. +% \begin{environment}{problem} +% \begin{macrocode} +\ifboxed +\newenvironment{problem}[1][]{\metasetkeys{problem}{#1}\sref@target% +\stepcounter{problem}\show@pts\show@min\record@problem% +\begin{lrbox}{\probbox}\begin{minipage}{.9\textwidth}\ignorespaces} +{\end{minipage}\end{lrbox} +\setbox0=\hbox{\begin{minipage}{.9\textwidth}% +\noindent\textbf\prob@heading\rm% +\end{minipage}} +\smallskip\noindent\fbox{\vbox{\box0\vspace*{.2em}\usebox\probbox}}\smallskip} +\else +\newenvironment{problem}[1][]{\metasetkeys{problem}{#1}\sref@target% +\stepcounter{problem}\show@pts\show@min\record@problem% +\par\noindent\textbf\prob@heading\rm\ignorespaces} +{\smallskip} +\fi%boxed +% +% \end{macrocode} +% \end{environment} +% +% Note that we allow hints and solutions in the body of a |problem| environment so we have +% to allow the |omdoc:CMP| and |ltx:p| elements to autoclose. +% +% \begin{macrocode} +%<*ltxml> +DefEnvironment('{problem} OptionalKeyVals:problem', + "" + . "?&KeyVal(#1,'title')(&KeyVal(#1,'title'))()" + . "?&KeyVal(#1,'min')(" + . "" + . "&KeyVal(#1,'min')" + . ")()" + . "?&KeyVal(#1,'pts')(" + . "" + . "&KeyVal(#1,'pts')" + . ")()" + . "#body" + ."", + afterDigest => sub { + my ($stomach,$kv)=@_; + my $kvi = LookupValue('inclprob'); + my @keys = qw(id title min pts); + my @vals = $kvi && map($kvi->getValue($_), @keys); + foreach my $i(0..$#vals) { + $kv->setValue($keys[$i],$vals[$i]) if $vals[$i]; + } + return;});#$ +% +% \end{macrocode} +% +% \begin{macro}{\record@problem} +% This macro records information about the problems in the |*.aux| file. +% \begin{macrocode} +%<*package> +\def\record@problem{\protected@write\@auxout{}% +{\string\@problem{\prob@number}% +{\ifx\inclprob@pts\@empty\problem@pts\else\inclprob@pts\fi}% +{\ifx\inclprob@min\@empty\problem@min\else\inclprob@min\fi}}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\@problem} +% This macro acts on a problem's record in the |*.aux| file. It does not have any +% functionality here, but can be redefined elsewhere (e.g. in the |assignment| +% package). +% \begin{macrocode} +%<*package> +\def\@problem#1#2#3{} +% +% \end{macrocode} +% \end{macro} +% +% The |solution| environment is similar to the |problem| environment, only that it is +% independent of the boxed mode. It also has it's own keys that we need to define first. +% +% \begin{macrocode} +%<*package> +\define@key{soln}{id}{\def\soln@id{#1}} +\define@key{soln}{for}{\def\soln@for{#1}} +\define@key{soln}{height}{\def\soln@height{#1}} +\ifsolutions +\newenvironment{solution}[1][]% +{\hrule\smallskip{\bf Solution: }\begin{small}}% +{\hrule\end{small}} +\else\newxcomment[]{solution}\fi +% \newsavebox{\solution@box} +% \newlength{\solution@width} +% \setlength{\solution@width}{14cm} +% \newenvironment{solution}[1][]% +% {\begin{lrbox}{\solution@box}\begin{minipage}{\solution@width} +% \hrule\smallskip{\bf Solution: }\small} +% {\smallskip\hrule\end{minipage}\end{lrbox} +% \ifsolutions\begin{center}\usebox{\solution@box}\end{center}\fi} +% +%<*ltxml> +DefKeyVal('soln','id','Semiverbatim'); +DefKeyVal('soln','height','Semiverbatim'); +DefKeyVal('soln','for','Semiverbatim'); +DefEnvironment('{solution} OptionalKeyVals:soln', + "" + . "#body" + . ""); +% +% \end{macrocode} +% +% \begin{macrocode} +%<*package> +\ifexnotes +\newenvironment{exnote}[1][]% +{\par\noindent\hrule\smallskip{\bf Note: }\small} +{\smallskip\hrule} +\else%ifexnotes +\newxcomment[]{exnote} +\fi%ifexnotes +\ifhints +\newenvironment{hint}[1][]% +{\par\noindent\hrule\smallskip{\bf Hint: }\small} +{\smallskip\hrule} +\else%ifhints +\newxcomment[]{hint} +\fi%ifhints +% +%<*ltxml> +DefEnvironment('{exnote}',"#body"); +DefEnvironment('{hint}',"#body"); +DefConstructor('\pts{}',""); +DefConstructor('\min{}',""); +% +% \end{macrocode} +% +% \subsection{Including Problems}\label{sec:impl:includeproblem} +% +% The first action is to make a \meta{jobname}|-problems.tex| file, if the |extract| +% option is set. +% +% \begin{macrocode} +%<*package> +\ifextract +\newwrite\problem@file +\immediate\openout\problem@file=\jobname-problems.tex +\AtEndDocument{\closeout\problem@file} +\fi +% +% \end{macrocode} +% +% \begin{macro}{\includeproblem} +% The |\includeproblem| command is essentially a glorified |\input| statement, it sets +% some internal macros first that overwrite the local points. After that (so that the +% included problem had time to step the problem number) it writes the |\includeproblem| +% statement to the problems file, if the |extract| option is set. Here we add a key +% |refnum=\prob@num| to the inlcudeproblem, so that we can remember the number from the +% main document.\ednote{do something about the overwriting of problem metadata in the +% {\LaTeXML} binding.} +% +% \begin{macrocode} +%<*package> +\addmetakey{inclprob}{pts} +\addmetakey{inclprob}{min} +\addmetakey*{inclprob}{title} +\addmetakey{inclprob}{refnum} +\clear@inclprob@keys +\newcommand{\includeproblem}[2][]{% +\bgroup\metasetkeys{inclprob}{#1}\input{#2}\ifsolutions\newpage\fi\egroup +\ifextract\def\@test{#1} +\def\prob@num{\ifx\inclprob@refnum\@empty\thesection.\theproblem\else\inclprob@refnum\fi} +\def\inclprob@keys{#1\ifx\@test\@empty\else,\fi refnum=\prob@num} +\protected@write\problem@file{}{\string\includeproblem[\inclprob@keys]{#2}} +\fi} +% +%<*ltxml> +DefKeyVal('prob','pts','Semiverbatim'); +DefKeyVal('prob','min','Semiverbatim'); +DefKeyVal('prob','title','Semiverbatim'); +DefConstructor('\includeproblem OptionalKeyVals:prob Semiverbatim', + "" + . "?&KeyVal(#1,'title')(&KeyVal(#1,'title'))()" + . "?&KeyVal(#1,'min')(" + . "" + . "&KeyVal(#1,'min')" + . ")()" + . "?&KeyVal(#1,'pts')(" + . "" + . "&KeyVal(#1,'pts')" + . ")()" + ."", + afterDigest => sub{ + my ($stomach,$kv) = @_; + AssignValue('inclprob',$kv) if $kv; + }); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macrocode} +%<*ltxml> +Tag('omdoc:exercise',afterOpen=>\&numberIt); +Tag('omdoc:solution',afterOpen=>\&numberIt); +Tag('omdoc:hint',afterOpen=>\&numberIt); +% +% \end{macrocode} +% +% \subsection{Reporting Metadata} +% +% \begin{macrocode} +%<*package> +\def\pts#1{\ifpts\marginpar{#1 pt}\fi} +\def\min#1{\ifmin\marginpar{#1 min}\fi} +% +%<*ltxml> +% +% \end{macrocode} +% +% \begin{macrocode} +%<*package> +\AtEndDocument{\ifpts\message{Total: \arabic{pts} points}\fi +\ifmin\message{Total: \arabic{min} minutes}\fi} +% +%<*ltxml> +% +% \end{macrocode} +% +% \begin{macro}{\show@pts} +% The |\show@pts| shows the points: if no points are given from the outside and also no +% points are given locally do nothing, else show and add. If there are outside points +% then we show them in the margin. +% \begin{macrocode} +%<*package> +\newcounter{pts} +\def\show@pts{\ifx\inclprob@pts\@empty% +\ifx\problem@pts\@empty\else% +\ifpts\marginpar{\problem@pts pt\smallskip}\addtocounter{pts}{\problem@pts}\fi% +\fi\else% +\ifpts\marginpar{\inclprob@pts pt\smallskip}\addtocounter{pts}{\inclprob@pts}\fi% +\fi} +% \end{macrocode} +% \end{macro} +% and now the same for the minutes +% \begin{macro}{\show@min} +% \begin{macrocode} +\newcounter{min} +\def\show@min{\ifx\inclprob@min\@empty% +\ifx\problem@min\@empty\else% +\ifmin\marginpar{\problem@min min}\addtocounter{min}{\problem@min}\fi% +\fi\else% +\ifmin\marginpar{\inclprob@min min}\addtocounter{min}{\inclprob@min}\fi +\fi} +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Providing IDs Elements}\label{sec:impl:ids} +% +% To provide default identifiers, we tag all elements that allow |xml:id| attributes by +% executing the |numberIt| procedure from |omdoc.sty.ltxml|. +% +% \begin{macrocode} +%<*ltxml> +Tag('omdoc:exercise',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:solution',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:hint',afterOpen=>\&numberIt,afterClose=>\&locateIt); +% +% \end{macrocode} +% +% \subsection{Finale} +% 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 dtx pts keyval xcomment CPERL DefKeyVal +%%% Local Variables: +%%% mode: doctex +%%% TeX-master: t +%%% End: +% \fi +% LocalWords: RequirePackage Semiverbatim DefEnvironment OptionalKeyVals soln +% LocalWords: exnote DefConstructor inclprob diff --git a/Master/texmf-dist/source/latex/stex/problem/problem.ins b/Master/texmf-dist/source/latex/stex/problem/problem.ins new file mode 100644 index 00000000000..1ed30cedb91 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/problem/problem.ins @@ -0,0 +1,40 @@ +%% +%% This file generates files required to use the problem package. +%% At your command prompt write +%% +%% latex problem.ins +%% +%% Copyright(c) 2007 Michael Kohlhase +%% The development version of this file can be found at +%% $HeadURL: https://svn.kwarc.info/repos/stex-content/sty/problem/problem.ins $ +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{problem.sty}{\from{problem.dtx}{package}}} + +\Msg{*} +\Msg{* You probably need to move the file problem.sty into a directory searched by TeX.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\nopreamble\nopostamble +\generate{\file{problem.sty.ltxml}{\from{problem.dtx}{ltxml}}} + +\Msg{*} +\Msg{* You probably need to move the generated file problem.sty.ltxml into a directory searched by LaTeXML.} +\Msg{*} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/stex/rdfmeta/rdfmeta.dtx b/Master/texmf-dist/source/latex/stex/rdfmeta/rdfmeta.dtx new file mode 100644 index 00000000000..08cf2b5c5b2 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/rdfmeta/rdfmeta.dtx @@ -0,0 +1,483 @@ +% \iffalse meta-comment +% An Infrastructure for extending macros by general metadata keys +% $URL: https://svn.kwarc.info/repos/stex/trunk/sty/rdfmeta/rdfmeta.dtx $ +% $Rev: 1999 $; last modified by $Author: kohlhase $ +% $Date: 2012-01-28 08:32:11 +0100 (Sat, 28 Jan 2012) $ +% Copyright (c) 2007 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{rdfmeta}[2012/01/28 v0.2 Metadata key upgrades] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage[sectioning]{rdfmeta} +\usepackage{url,array,float,stex-logo} +\usepackage[show]{ed} +\usepackage{listings} +\lstset{basicstyle=\small\tt,columns=flexible} +\lstset{frame=none,numbers=none,lineskip=-.7ex,aboveskip=-.5ex,belowskip=-.5ex} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} +\usepackage{../ctansvn} +\usepackage{hyperref} +\usepackage[eso-foot,today]{svninfo} +\svnInfo $Id: rdfmeta.dtx 1999 2012-01-28 07:32:11Z kohlhase $ +\svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/rdfmeta/rdfmeta.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}} +\def\omdoc{OMDoc\xspace} +\def\omdocv#1{OMDoc{#1}\xspace} +\begin{document}\DocInput{rdfmeta.dtx}\end{document} +% +% \fi +% +%\CheckSum{168} +% +% \changes{v0.1}{2010/03/05}{new} +% \changes{v0.2}{2010/09/01}{starred forms work now, more documentation} +% +% \GetFileInfo{rdfmeta.sty} +% +% \MakeShortVerb{\|} +% \def\latexml{{\LaTeX}ML} +% +% \title{RDFa Metadata in {\LaTeX}\thanks{Version {\fileversion} (last revised +% {\filedate})}} +% \author{Michael Kohlhase \\ +% Jacobs University, Bremen\\ +% \url{http://kwarc.info/kohlhase}} +% \maketitle +% \begin{abstract} +% The |rdfmeta| package allows mark up Ontology-based Metadata in {\LaTeX} documents +% that can be harvested by automated tools or exported to PDF. +% \end{abstract} +%\tableofcontents +%\begin{center}\bf\Huge +% Experimental!\\ +% do not use! +%\end{center}\newpage +% +% \section[id=intro]{Introduction} +% +% The |rdfmeta| package allows mark up extensible metadata in \stex documents, so that +% that it can be harvested by automated tools or exported to PDF. It is also intended to +% support the new metadata infrastructure for the {\omdoc} format~\cite{Kohlhase:omdoc1.2} +% introduced in {\omdocv{1.3}}~\cite{Kohlhase:OMDoc1.3} (see~\cite{LK:MathOntoAuthDoc09} +% for the relevant ideas and and~\cite{KohKohLan:ssffld10:biblatex} for an application). +% +% Metadata are annotated as key value pairs in the semantic environments provided by +% \stex. In most markup formats, the metadata vocabularies are fixed by the language +% designer. In \stex, the |rdfmeta| package allows the user to extend the metadata +% vocabulary. +% +% \begin{exfig}[ht] +% \begin{verbatim} +% \importmodule[../ontologies/cert]{certification} +% ... +% \section[id=userreq,hasState=$\statedocrd{\tuev}$]{User Requirements} +% ... +% \end{verbatim} +% \vspace*{-1.5em}\hrule +% \lstinputlisting[language=XMl,morekeywords={imports,metadata,resource,link,omgroup},aboveskip=.5ex]{hasstate.omdoc} +% \caption{Metadata for Certification}\label{fig:hasState} +% \end{exfig} +% +% Take, for instance, the case where we want to use metadata for the certification status +% of document fragments. In Figure~\ref{fig:hasState} we use the |hasState| key to say +% that a section has been approved by the T\"UV, a specific certification agency. There +% are two concerns here. First, the |hasState| key has to be introduced and given a +% meaning, and same for the (complex) value |\statedocrd{\tuev}|. This meaning is given in +% the |certifiation| ontology which we imported via the |\importmodule| command. The +% ontology can be marked up in \stex (see Figure~\ref{fig:certification}), with the +% exception that we use the |\keydef| macro for the definition of the |hasState| relation +% so that it also defines the key. For the details of this see the next section. +% +% \section[id=user]{User Interface} +% +% We now document the specifics of the environments and macros provided by the |rdfmeta| +% package from a user perspective. +% +% \subsection[id=sec:user:options]{Package Options} +% +% The |rdfmeta| package takes the option: \DescribeMacro{showmeta}|showmeta|. If this is +% set, then the metadata keys are shown (see~\cite{Kohlhase:metakeys:ctan} for details and +% customization options). +% +% The remaining options can be used to specify metadata upgrades of standard keys. The +% \DescribeMacro{sectioning}|sectioning| option upgrades the |\part|, |\chapter|, +% |\section|, |\subsection|, |\subsubsection|, |\paragraph| macros (and of course their +% starred variants). +% +% \subsection[id=sec:user:keydef]{Extending Macros and Environments by Metadata Keys} +% +% The main user-visible feature of the |rdfmeta| package is the +% \DescribeMacro{\keydef}|keydef| macro. It takes two arguments, a ``key group +% identifier'' and a key name. In a nutshell, every \stex command that takes metadata keys +% comes with a ``key group identifier'' that identifies the set of admissible keys; +% see~\cite{Kohlhase:metakeys:ctan} for details on this concept. Figure~\ref{fig:keygroups} +% gives an overview over the key groups and their identifiers in \stex. +% \begin{figure} +% \begin{tabular}{|>{\tt}l|>{\tt}p{5.5cm}|>{\tt}p{2.4cm}|}\hline +% \rm\textbf{Key Group Identifier} & \rm\textbf{Macros} & \rm\textbf{Package/Class} \\\hline\hline +% dcm@person & DCMPerson & dcm.sty\\\hline +% dcm@institution & DCMInstitution & dcm.sty\\\hline +% dcm@sect & section & dcm.sty\\\hline +% assig & assignment & hwexam.cls\\\hline +% inclassig & includeassignment & hwexam.cls\\\hline +% quizheading & quizheading & hwexam.cls\\\hline +% testheading & quizheading & hwexam.cls\\\hline +% module & module & modules.sty\\\hline +% termdef & termdef & modules.sty \\\hline +% view & view & modules.sty\\\hline +% omgroup & omgroup & omdoc.sty\\\hline +% ignore & ignore & omdoc.sty\\\hline +% omtext & omtext, definition, axiom, assertion, example, inlinedef & omtext.sty, statements.sty\\\hline +% phrase & phrase & omtext.sty\\\hline +% problem & problem & problem.sty\\\hline +% inclprob & includeproblem & problem.sty\\\hline +% req & requirement & reqdoc.sty\\\hline +% spf & sproof, spfcases, spfcase, spfstep, spfcomment & sproof.sty\\\hline +% termref & termref & statements.sty \\\hline +% symboldec & symboldec & statements.sty\\\hline +% \end{tabular} +% \caption{Key Group Identifiers in \protect\stex}\label{fig:keygroups} +% \end{figure} +% +% Semantically, |\keydef{|\meta{keygroup}|}{|\meta{key}|}| defines a symbol just like the +% |\symdef| macro from the |modules| package~\cite{KohAmb:smmssl:ctan}. But it also +% extends the syntax of \stex itself: it adds a key \meta{key} to \meta{keygroup}, which +% allows to state the corresponding metadata as a key/value pair in the \stex macro or +% environment. Following the ideas from~\cite{LK:MathOntoAuthDoc09}, the metadata is +% transformed to RDFa metadata~\cite{w3c:WD-rdfa-core-20100803} in {\omdoc}, where the +% identifiers of relations are exactly the symbols introduced by the corresponding +% |\keydef|. +% +% \begin{exfig}[ht] +% \lstinputlisting[language=TeX,morekeywords={metalanguage}]{certification} +% \caption{A simple Ontology on Certification}\label{fig:certification} +% \end{exfig} +% +% In our example in Figure~\ref{fig:certification} we have defined a key |hasstate| in the +% |omtext| key group\footnote{For the \texttt{\textbackslash omtext} environment and key group +% see~\cite{Kohlhase:smmtf:ctan}} and a symbol |hasstate| via +% |\addkey{omtext}{hasstate}|. Furthermore, we have defined the meaning of the relation +% expressed by the |hasstate| symbol informally and specified some possible objects for +% the relation (that could of course have been done in other modules as well). We have +% made use of this metadata ontology and the new key |hasState| in the example in +% Figure~\ref{fig:hasState}. +% +% \subsection{Redefinitions of Common {\LaTeX} Macros and Environments} +% +% The |rdfmeta| package redefines common {\LaTeX} commands (e.\,g.\ the sectioning macros) +% so that they include optional KeyVal arguments that can be extended by |\keydef| +% commands. With this extension, we can add RDFa metadata to any existing {\LaTeX} +% document and generate linked data (XHTML+RDFa documents) via the {\latexml} +% translator. +% +% \subsection[id=redefining]{Extending Packages with \texttt{rdfmeta}} +% +% The |rdfameta| package also exposes its internal infrastructure for extending the +% redefinitions. Note that the upgrade macros can only be used in {\LaTeX} packages, as +% the macro names contain |@|. Consequently, this section is only addressed at package +% developers who want to extend existing (i.e. not written by them) packages with flexible +% metadata functionality. +% +% \DescribeMacro{\rdfmeta@upgrade}|\rdfmeta@upgrade| is the basic upgrade macro. It takes +% an optional keyval argument an a command sequence \meta{cseq} as a proper argument and +% (if that is defined), redefines |\|\meta{cseq} to take a keyval argument. There is a +% variant \DescribeMacro{\rdfmeta@upgrade*}|\rdfmeta@upgrade*| that has to be used to +% upgrade macros that have a starred form (e.g. |\section| and friends). Note that +% |\rdfmeta@upgrade*| upgrades both forms (e.g. |\section| and |\section*|). +% +% |\rdfmeta@upgrade| uses four keys to specify the behavior in the case the the macro to +% be upgraded already has an optional argument. For concreteness, we introduce them using +% the |\section| macro from standard {\LaTeX} as an example. |\section| has an optional +% argument for the ``short title'', which will appear in the table of contents. The +% \DescribeMacro{optarg}|optarg| key can be used to specify a key for the existing +% optional argument. Thus, after upgrading it via +% |\rdfmeta@upgrade*[optarg=short]{section}|, we can use the updated form +% |\section[short=|\meta{toctitle}|]{|\meta{title}|}| instead of the old +% |\section[|\meta{toctitle}|]{|\meta{title}|}|. Actually, this still has a problem: the +% |\section*| would also be given the |short| key and would be passed an optional argument +% (which it does not accept). To remedy this we can set the +% \DescribeMacro{optargstar}|optargstar| key to |no|. In summary, the correct upgrade +% command for |\section| and |\section*| would be +% \begin{verbatim} +% \rdfmeta@upgrade*[optarg=short,optargstar=no]{section} +% \end{verbatim} +% The |\rdfmeta@upgrade*| macro also initializes a metadata key-group (a named set of +% keys and their handlers; see~\cite{Kohlhase:metakeys:svn} for details) for the section +% macro with an |id| key for identification (see~\cite{Kohlhase:sref*} for +% details). Often, the name of the key-group is the same as the command sequence, so we +% take this as the default, if we want to specify a different metadata key-group name, we +% can do so with the \DescribeMacro{keygroup}|keygroup| key in |\rdfmeta@upgrade*|. +% +% If \DescribeMacro{idlabel}|idlabel| is set to \meta{prefix}, then the {\LaTeX} label is +% set to the value \meta{prefix}|.|\meta{id}, where \meta{id} is the value given in the +% RDFa |id| key. This allows to use the normal {\LaTeX} referencing mechanism in addition +% to the semantic referencing mechanism provided by the |sref| +% package~\ctancite{Kohlhase:sref}. +% +% \subsection[id=limitations]{Limitations} +% +% In this section we document known limitations. If you want to help alleviate them, +% please feel free to contact the package author. Some of them are currently discussed in +% the \sTeX TRAC~\cite{sTeX:online}. +% +% \begin{compactenum} +% \item Currently the coverage of the redefinitions of standard commands in the +% \url{rdfmeta} package is minimal; we will extend this in the future. +% \item The |\rdfmeta@upgrade| macro only works with single arguments, this should be easy +% to fix with |\case| for the argument string. +% \item I am not sure |\rdfmeta@upgrade| works with environments. +% \item it would be convenient, if we had a macro |\keydefs|, which takes a list of +% keygroups, so that we can define keys in multiple groups in one go, +% e.g. |\keydefs{omtext,omgroup}{hasState}| in Figure~\ref{fig:certification}. But the +% obvious ``solution'' +% \begin{verbatim} +% \newcommand\keydefs[2]{\@for\@I:=#1\do{\keydef{#1}{#2}}} +% \end{verbatim} +% does not work for me. +% \end{compactenum} +% +% \StopEventually{\printbibliography} +% +% \section[id=impl]{The Implementation} +% +% The |sref| 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. +% +% We first set up header information for the {\latexml} binding file. +% \begin{macrocode} +%<*ltxml> +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +% +% \end{macrocode} +% +% \subsection{Package Options}\label{sec:impl:options} +% +% We declare some switches which will modify the behavior according to the package +% options. Generally, an option |xxx| will just set the appropriate switches to true +% (otherwise they stay false).\ednote{need an implementation for {\latexml}} +% +% \begin{macrocode} +%<*package> +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\newif\if@rdfmeta@sectioning\@rdfmeta@sectioningfalse +\DeclareOption{sectioning}{\@rdfmeta@sectioningtrue} +\ProcessOptions +% +%<*ltxml> +DeclareOption('showmeta',''); +DeclareOption('sectioning',''); +% +% \end{macrocode} +% +% The first measure is to ensure that the right packages are loaded. From the from {\stex} +% collection, we need the |sref| package (see~\ctancite{Kohlhase:sref}) for handling keys, +% the |modules| package for exporting the |\keydef| (see~\ctancite{KohAmb:smmssl}). +% \begin{macrocode} +%<*package> +\RequirePackage{sref,modules} +% +% \end{macrocode} +% +% \subsection[id=impl:keydef]{Key Definitions} +% +% \begin{macro}{\keydef} +% The |\keydef| macro is rather simple, we just add a key to the respective environment +% and extend the export token register for the current module by an |\addmetakey| +% instruction. +% \begin{macrocode} +%<*package> +\newcommand\keydef[2]{\addmetakey{#1}{#2}% +\expandafter\g@addto@macro\this@module{\addmetakey{#1}{#2}}} +% +%<*ltxml> +DefConstructor('\keydef',''); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\listkeydef} +% The |\listkeydef| macro is analogous, but uses |\addmetalistkey| instead. +% instruction. +% \begin{macrocode} +%<*package> +\newcommand\listkeydef[2]{\addmetalistkey{#1}{#2}% +\expandafter\g@addto@macro\this@module{\addmetalistkey{#1}{#2}}} +% +%<*ltxml> +DefConstructor('\listkeydef',''); +% +% \end{macrocode} +% \end{macro} +% +% \subsection[id=impl:upgrade]{RDFa upgrade Facilities} +% +% We first define the keys for the |\rdfmeta@upgrade| macro. +% \begin{macrocode} +%<*package> +\def\@yes@{yes} +\addmetakey*{upgrade}{idlabel} +\addmetakey*{upgrade}{optarg} +\addmetakey*[yes]{upgrade}{optargstar} +\addmetakey*{upgrade}{keygroup} +% \end{macrocode} +% +% \begin{macro}{\rdfmeta@upgrade} +% This upgrade macro gives extended functionality according to the optional keys. The +% top-level invocation just differentiates on whether a star is following: +% \begin{macrocode} +\def\rdfmeta@upgrade{\@ifstar\rdfmeta@upgrade@star\rdfmeta@upgrade@nostar} +% \end{macrocode} +% Both cases are almost the same, they only differ in the third line where they call +% |\rdfmeta@upgrade@base| or |\rdfmeta@upgrade@base@star| defined above. In particular, +% both take the arguments originally intended for |\rdfmeta@upgrade|. +% \begin{macrocode} +\newcommand\rdfmeta@upgrade@nostar[2][]{\metasetkeys{upgrade}{#1}% +\ifx\upgrade@keygroup\@empty\def\@@group{#2}\else\def\@@group{\upgrade@keygroup}\fi +\rdfmeta@upgrade@base{#2}{\@nameuse{\@@group @\upgrade@optarg}}} +% \end{macrocode} +% They set the metakeys from the second argument, then set |\@@group| to be the intended +% group (if the |keygroup| key was specified, it takes precedence over the default +% |#2|). +% \begin{macrocode} +\newcommand\rdfmeta@upgrade@star[2][]{\metasetkeys{upgrade}{#1}% +\ifx\upgrade@keygroup\@empty\def\@@group{#2}\else\def\@@group{\upgrade@keygroup}\fi +\rdfmeta@upgrade@base@star{#2}{\@nameuse{\@@group @\upgrade@optarg}}} +% +%<*ltxml> +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\rdfmeta@upgrade@base} +% This auxiliary macro and is invoked as +% |\rdfmeta@upgrade@base{|\meta{cseq}|}{|\meta{optarg}|}|, where \meta{cseq} is a +% command sequence name. It checks if |\|\meta{cseq} is defined (if not it does +% nothing), saves the old behavior of |\|\meta{cseq} as |\rdfmeta@|\meta{cseq}|@old|, +% and then redefines |\|\meta{cseq} to take a keyval argument and passes \meta{optarg} +% as the optional argument. +% \begin{macrocode} +%<*package> +\newcommand{\rdfmeta@upgrade@base}[2]{\@ifundefined{#1}{}% +{\message{redefining macro #1,} +\ifx\upgrade@idlabel\@empty\srefaddidkey{#1}\else\srefaddidkey[prefix=\upgrade@idlabel]{#1}\fi% +\expandafter\let\csname rdfmeta@#1@old\expandafter\endcsname\csname #1\endcsname% +\expandafter\renewcommand\csname #1\endcsname[2][]% +{\metasetkeys{#1}{##1}\@nameuse{rdfmeta@#1@old}[#2]{##2}} +\addmetakey*\@@group{\upgrade@optarg}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\rdfmeta@upgrade@base@star} +% This is a variant of |\rdfmeta@upgrade@base|, which also takes care of the starred +% variants of a macro. +% \begin{macrocode} +\newcommand\rdfmeta@upgrade@base@star[2]{\@ifundefined{#1}{}% +{\message{redefining macros #1 and #1*,} +\ifx\upgrade@idlabel\@empty\srefaddidkey{#1}\else\srefaddidkey[prefix=\upgrade@idlabel]{#1}\fi% +\expandafter\let\csname rdfmeta@#1@old\expandafter\endcsname\csname #1\endcsname% +% \end{macrocode} +% In this case, we cannot just use |\newcommand| for dealing with the optional argument +% because the star is between the command sequence and the arguments. So we make a case +% distinction on the presence of the star. +% |\rdfmeta@|\meta{cseq}|@old|. +% \begin{macrocode} +\expandafter\renewcommand\csname #1\endcsname% +{\@ifstar{\@nameuse{rdfmeta@#1@star}}{\@nameuse{rdfmeta@#1@nostar}}}% +% \end{macrocode} +% the macros |\rdfmeta@|\meta{cseq}|@star| and |\rdfmeta@|\meta{cseq}|@nostar| that are +% defined in terms of |\rdfmeta@|\meta{cseq}|@old| handle the necessary cases. The second +% one is simple: +% \begin{macrocode} +\expandafter\newcommand\csname rdfmeta@#1@nostar\endcsname[2][]% +{\metasetkeys{#1}{##1}\edef\@test{#2}% +\ifx\@test\@empty\@nameuse{rdfmeta@#1@old}{##2}% +\else\@nameuse{rdfmeta@#1@old}[#2]{##2}\fi}% +% \end{macrocode} +% For |\rdfmeta@|\meta{cseq}|@star| we have to take care of the optional argument of the +% old macro: if the |optargstar| key was set, then we pass the second argument of +% |\rdfmeta@upgrade@base| as an optional argument to it as above. +% \begin{macrocode} +\ifx\upgrade@optargstar\@yes@% +\expandafter\newcommand\csname rdfmeta@#1@star\endcsname[2][]% +{\metasetkeys{#1}{##1}\@nameuse{rdfmeta@#1@old}*[#2]{##2}}% +\else% +\expandafter\newcommand\csname rdfmeta@#1@star\endcsname[2][]% +{\metasetkeys{#1}{##1}\@nameuse{rdfmeta@#1@old}*{##2}}% +\fi% +\addmetakey*\@@group{\upgrade@optarg}}} +% +% \end{macrocode} +% \end{macro} +% +% \subsection[id=impl:redef]{Redefinitions} +% +% If the |sectioning| macro is set, we redefine the respective commands +% +% \begin{macrocode} +%<*package> +\if@rdfmeta@sectioning +\message{redefining sectioning commands!} +\rdfmeta@upgrade*[optarg=short,optargstar=no]{part} +\rdfmeta@upgrade*[optarg=short,optargstar=no]{chapter} +\rdfmeta@upgrade*[optarg=short,optargstar=no]{section} +\rdfmeta@upgrade*[optarg=short,optargstar=no]{subsection} +\rdfmeta@upgrade*[optarg=short,optargstar=no]{subsubsection} +\rdfmeta@upgrade*[optarg=short,optargstar=no]{paragraph} +\fi +% +%<*ltxml> +% +% \end{macrocode} +% \subsection{Finale} +% +% 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 LaTeX dcm dtx keyval sref CPERL url qw +%%% Local Variables: +%%% mode: doctex +%%% TeX-master: t +%%% End: +% \fi +% LocalWords: RequirePackage birthdate personaltitle academictitle workaddress +% LocalWords: privaddress worktel privtel workfax privfax worktelfax noDelim +% LocalWords: privtelfax getKeyValue valuelist ToString getValue affill STDERR +% LocalWords: ExportMetadata AssignValue DCMperson DefConstructor afterDigest +% LocalWords: getArg setValue FishOutMetadata keyvals foreach idlist tabline +% LocalWords: LookupValue insertElement atabline bitabline shorttitle nc args +% LocalWords: sharealike noderivativeworks DefMacro authorblock subsubsection +% LocalWords: contribs OptionalKeyVals omgroup omdoc srcref xml RawTeX +% LocalWords: openElement iffalse kohlhase Thu rdfmeta latexml fileversion omd +% LocalWords: maketitle setcounter tocdepth tableofcontents newpage section +% LocalWords: stex exfig vspace hrule lstinputlisting morekeywords aboveskip +% LocalWords: hasstate.omdoc statedocrd tuev certifiation keydef ednote texttt +% LocalWords: keysets rdfameta cseq idlabel ctancite ifundefined impl ltxml +% LocalWords: printbibliography newcommand srefaddidkey expandafter csname ifx +% LocalWords: expandafter endcsname csname endcsname renewcommand showmeta +% LocalWords: symdef redef doctex showmeta metakeys keyset textbackslash cert +% LocalWords: MathOntoAuthDoc09 WD-rdfa-core-20100803 hasstate omtext omtext +% LocalWords: addkey optarg optarg toctitle optargstar optargstar keygroup +% LocalWords: oldpart textsf langle textsf langle newif sectioningfalse ifstar +% LocalWords: sectioningtrue metasetkeys nameuse addmetakey nostar diff --git a/Master/texmf-dist/source/latex/stex/rdfmeta/rdfmeta.ins b/Master/texmf-dist/source/latex/stex/rdfmeta/rdfmeta.ins new file mode 100644 index 00000000000..a653fa0ed4b --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/rdfmeta/rdfmeta.ins @@ -0,0 +1,40 @@ +%% +%% This file generates files required to use the ed package. +%% At your command prompt write +%% +%% latex rdfmeta.ins +%% +%% Copyright(c) 2008 Michael Kohlhase +%% The development version of this file can be found at +%% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/rdfmeta/rdfmeta.ins $ +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{rdfmeta.sty}{\from{rdfmeta.dtx}{package}}} + +\Msg{*} +\Msg{* You probably need to move the file rdfmeta.sty into a directory searched by TeX.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\nopreamble\nopostamble +\generate{\file{rdfmeta.sty.ltxml}{\from{rdfmeta.dtx}{ltxml}}} + +\Msg{*} +\Msg{* You probably need to move the generated file rdfmeta.sty.ltxml into a directory searched by LaTeXML.} +\Msg{*} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/stex/reqdoc/reqdoc.dtx b/Master/texmf-dist/source/latex/stex/reqdoc/reqdoc.dtx new file mode 100644 index 00000000000..ffb9569a037 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/reqdoc/reqdoc.dtx @@ -0,0 +1,387 @@ +% \iffalse meta-comment +% Semantic Markup for Requirement Specification Documents +% Copyright (c) 2008 Michael Kohlhase, all rights reserved +% +% This file is distributed under the terms of the LaTeX Project Public +% License from CTAN archives in directory macros/latex/base/lppl.txt. +% Either version 1.0 or, at your option, any later version. +% +% The development version of this file can be found at +% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/reqdoc/reqdoc.dtx $ +% \fi +% +% \iffalse +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\ProvidesPackage{reqdoc}[2012/01/28 v0.3 Semantic Requirement Documents] +% +%<*driver> +\documentclass[twoside]{ltxdoc} +\EnableCrossrefs +%\CodelineIndex +%\OnlyDescription +\RecordChanges +\usepackage{reqdoc} +\usepackage{textcomp,url,a4wide} +\usepackage[show]{ed} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} +\usepackage[eso-foot,today,draft]{svninfo} +\svnInfo $Id: reqdoc.dtx 1999 2012-01-28 07:32:11Z kohlhase $ +\svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/reqdoc/reqdoc.dtx $ +\usepackage{stex-logo} +\usepackage{../ctansvn} +\usepackage{hyperref} +\makeindex +\def\tracissue#1{\cite{sTeX:online}, \hyperlink{http://trac.kwarc.info/sTeX/ticket/#1}{issue #1}} +\begin{document}\DocInput{reqdoc.dtx}\end{document} +% +% \fi +% +%\CheckSum{198} +% +% \changes{v0.3}{2008/06/26}{Integrated LaTeXML bindings} +% \changes{v0.2}{2008/02/04}{First Version with Documentation} +% \changes{v0.1}{2008/01/18}{First Version} +% +% \GetFileInfo{reqdoc.sty} +% +% \MakeShortVerb{\|} +% \def\latexml{{\LaTeX}ML} +% +% \title{{\texttt{reqdoc.sty}}: Semantic Markup for Requirements Specification Documents\thanks{Version +% {\fileversion} (last revised {\filedate})}} +% \author{Michael Kohlhase\\ +% Computer Science, Jacobs University\\ +% \url{http://kwarc.info/kohlhase}} +% \maketitle +% +% \begin{abstract} +% This package provides an infrastructure for semantically enhanced requirements +% specifications used in software engineering. This allows to embed structural +% information into documents that can be used by semantic document management systems +% e.g. for management of change and requirements tracing. +% \end{abstract} +% +% \newpage\tableofcontents\newpage +% +% \section{Introduction}\label{sec:intro} +% +% In software engineering, the development process is accompanied with a trail of +% structured documents, user specifications, architecture specifications, test reports, +% etc. All of these documents\ednote{continue} +% +% For an example of a requirement document see the file |requirements.tex| provided in +% this package. \ednote{need to bring this in line with the \texttt{sref} package} +% +% \section{The User Interface}\label{sec:interface} +% +% \subsection{Package Options} +% +% The |reqdoc| package takes the package option \DescribeMacro{recorddeps}|recorddeps|. If +% this is given, then the package generates an external file with dependencies that can be +% used by external systems like the {\texttt{locutor}} system\ednote{add citation here}, +% see Section~\ref{sec:moc-deps}. If the \DescribeMacro{showmeta}|showmeta| is set, then +% the metadata keys are shown (see~\cite{Kohlhase:metakeys:ctan} for details and customization +% options). +% +% \subsection{Requirements} +% The |reqdoc| package supplies two forms of writing down requirements that mainly differ +% in their presentation. We can have requirement lists and requirement tables. +% +% \DescribeEnv{requirements} The |requirements| environment marks up a list of +% requirements. It takes an optional key/value list as an argument: if |numbering| is set +% to |yes| (the default), then the requirements are numbered for referencing it visually; +% the label is created using the prefix specified in the key |prefix|. +% +% \DescribeEnv{requirement} The individual requirements are specified by the |requirement| +% environment, which takes an optional key/value list as an argument: the |id| key allows +% to specify a symbolic label for cross-referencing, the |prio| key allows to specify a +% priority of the requirement, the |reqs| key allows to specify a comma-separated list of +% labels of requibments this one depends on or refines. Finally, the visual label of the +% requirement can be fixed by the |num| key\ednote{this is not implemented yet}. +% +% \DescribeEnv{reqtable} The |reqtable| environment is a varian of the |\requirements| +% environment that shows the requirements in a tabular form that gives a better overview; +% its optional key/value argument works the same. \DescribeMacro{\reqline}The respective +% requirements are marked up with the |\reqline| macro, which takes three arguments. The +% first one is an optional key/value specification and corresponds to be one on the +% |requirement| environment. The second one contains the actual text of the requirements +% and the third one a comment. +% +% \DescribeMacro{\importreqs}Note that if we want to refer to requirements from a document +% \meta{doc}, then we will need to know about their representations and can import the +% necessary information via |\importreqs{|\meta{doc}|}|. +% +% +% \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} +% +% The |reqdoc| package generates to 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 +% {\textsf{$\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).\ednote{need an implementation for {\latexml}} +% +% \begin{macrocode} +%<*package> +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\newif\if@deps\@depsfalse +\DeclareOption{recorddeps}{\@depstrue} +\ProcessOptions +% \end{macrocode} +% Then we load a couple of packages +% \begin{macrocode} +\RequirePackage{sref} +\RequirePackage{longtable} +% +%<*ltxml> +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +% +% \end{macrocode} +% +% Then we register the namespace of the requirements ontology +% \begin{macrocode} +%<*ltxml> +RegisterNamespace('r'=>"http://omdoc.org/ontology/requirements#"); +RegisterDocumentNamespace('r'=>"http://omdoc.org/ontology/requirements#"); +% +% \end{macrocode} +% +% \subsection{Requirements}\label{sec.impl.requirements} +% +% \begin{environment}{requirements} +% and now the |requirements| environment, it is empty at the moment\ednote{think about +% this again!} +% \begin{macrocode} +%<*package> +\newif\ifreqsnum\reqsnumfalse +\addmetakey{reqs}{numbering} +\addmetakey[R]{reqs}{prefix} +\def\reqs@no{no} +\newenvironment{requirements}[1][]% +{\metasetkeys{reqs}{#1}\ifx\reqs@numbering\reqs@no\reqsnumfalse\else\reqsnumtrue\fi}{} +% +%<*ltxml> +DefEnvironment('{requirements} OptionalKeyVals:reqs', + "#body"); +% +% \end{macrocode} +% \end{environment} +% +% We define a group of keywords using the |\addmetakey| command from the |metakeys| +% package~\ctancite{Kohlhase:metakeys}. The group below, named as |req|, consists of three +% keywords |id|, |prio| and |refs|. +% \begin{macrocode} +%<*package> +\addmetakey{req}{id} +\addmetakey{req}{prio} +\addmetakey{req}{refs} +\addmetakey{req}{num} +\newcounter{reqnum}[section] +% \end{macrocode} +% This function cycles over a comma-separated list and does the references +% \begin{macrocode} +\def\req@do@refs#1#2{\let\@tmpop=\relax\@for\@I:=#1\do{\@tmpop\req@do@ref{\@I}\let\@tmpop=#2}} +% \end{macrocode} +% The |\req@do@ref| command creates a hyperlink from \ednote{What is req at ref? It has +% appeared for the first time.} +% \begin{macrocode} +\def\req@do@ref#1{\sref@hlink@ifh{#1}{\req@ref{#1}{number}}} +% \end{macrocode} +% this function defines a requirement aspect +% the first arg is the label, the second one the aspect to be defined and the third one the value +% expand |csname| before |xdef| +% +% The command |\req@def@aux| creates the name of a command, +% which is determined by the text given between |\csname| and |\endcsname|, +% and defines this command globally to function as |#3|. +% We use the command |\expandafter| in the definition of |\req@def@aux| +% to execute the command |\xdef| after |\csname| is executed. +% \begin{macrocode} +\def\req@def@aux#1#2#3{\expandafter\xdef\csname req@#1@#2\endcsname{#3}} +% \end{macrocode} +% this function takes the same arguments and writes the command to the aux file +% \begin{macrocode} +\def\req@write@aux#1#2#3{\protected@write\@auxout{}{\string\req@def@aux{#1}{#2}{\thesection.#3}}} +% \end{macrocode} +% and finally this function does both +% \begin{macrocode} +\def\req@def#1#2#3{\req@def@aux{#1}{#2}{#3}\req@write@aux{#1}{#2}{#3}} +% \end{macrocode} +% this function references an aspect of a requirement. +% \begin{macrocode} +\def\req@ref#1#2{\csname req@#1@#2\endcsname} +% \end{macrocode} +% these functions print the priority, label, and references (if specified) +% \begin{macrocode} +\def\print@req@prio{\ifx\req@prio\@empty\else(Priority: \req@prio)\fi} +\def\print@req@label{\sref@target@ifh\req@id{\reqs@prefix\arabic{reqnum}: }} +\def\print@req@refs{\ifx\req@refs\@empty\else\hfill [from~\req@do@refs{\req@refs}{,}]\fi} +% \end{macrocode} +% \ednote{What are |number| and |\thereqnum|?} +% First argument is a list of key-value pairs which are assigned to req. +% Increase the counter reqnum, i.e., increase the requirement number. +% Remember the number for reference. +% Print the requirement label (with the requirement number) +% Print the priority? +% Print the requirement (given as arg 2) +% Print the references +% We define a new command |\reqnote| to annotate the notes given for a requirement. +% The command |\reqnote| simply prints the note, which is given by the user as a text, +% in the form |Note: |. +% \begin{environment}{requirement} +% \begin{macrocode} +\newenvironment{requirement}[1][]% +{\metasetkeys{req}{#1}\stepcounter{reqnum} +\ifreqsnum\ifx\req@id\@empty\else\req@def\req@id{number}\thereqnum\fi +\noindent\textbf{\print@req@label}\fi +\newcommand{\reqnote}[1]{\par\noindent Note: ##1} +\print@req@prio} +{\medskip\print@req@refs} +% +%<*ltxml> +DefEnvironment('{requirement} OptionalKeyVals:req', + "" + . "" + . "?&KeyVal(#1,'refs')()()" + . "#body" + .""); +DefConstructor('\reqnote{}', + "#1"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{reqtable} +% \begin{macrocode} +%<*package> +\newenvironment{reqtable}[1][]{\metasetkeys{reqs}{#1} +\begin{center}\begin{longtable}{|l|l|p{6cm}|p{5cm}|l|}\hline +\# & Prio & Requirement & Notes & Refs\\\hline\hline} +{\end{longtable}\end{center}} +% +%<*ltxml> +DefEnvironment('{reqtable} OptionalKeyVals:reqs', + "#body"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\reqline} +% \begin{macrocode} +%<*package> +\newcommand{\reqline}[3][]% +{\metasetkeys{req}{#1}\stepcounter{reqnum} +\req@def\req@id{number}\thereqnum% remember the number for reference +\textbf{\sref@target@ifh\req@id{\reqs@prefix\arabic{reqnum}}}& +\req@prio &\req@do@refs\req@refs{,}\tabularnewline\hline} +% +%<*ltxml> +DefConstructor('\reqline OptionalKeyVals:req{}{}', + "#2" + ."#3"); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\importreqs} +% The |\importreqs| macro reports a dependency to the dependencies file. and then reads +% the |aux| file specified in the argument. +% \begin{macrocode} +%<*package> +\newcommand{\importreqs}[1]{\req@dep@write{"#1.tex"}{IMPORTREQS}\makeatletter\input{#1.aux}\makeatother} +% +%<*ltxml> +DefConstructor('\importreqs {}',""); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\rinput} +% The |\rinput| macro\ednote{this should go somewhere up; probably merge with sinput; +% which should also go into the stex package.} inputs the file and protocols this in +% the dependencies file. Note that this only takes place on the top level; i.e. the +% |\@ifdeps| switch is set to false. +% \begin{macrocode} +%<*package> +\newcommand{\rinput}[1]{\req@dep@write{"#1.tex"}{[dt="input"]}\bgroup\@depsfalse\input{#1}\egroup} +% +%<*ltxml> +DefMacro('\rinput','\input'); +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Recording the dependencies for Change Management}\label{sec:moc-deps} +% +% The macros in this section record dependencies in a special file to be used in change +% management by the {\texttt{locutor}} system. This is still not optimal, since we do not +% know the actual path. +% +% \begin{macrocode} +%<*package> +\if@deps\newwrite\req@depfile +\immediate\openout\req@depfile=\jobname.deps +\AtEndDocument{\closeout\req@depfile} +% +% \end{macrocode} +% we redefine the |\importmodule| command, so that it does the reporting. +% \begin{macrocode} +%<*package> +\renewcommand{\importmodule}[2][]{\req@dep@write{"#1.tex"}{[dt="importmodule"]}\def\@test{#1}% +\ifx\@test\@empty\else\requiremodules{#1}\fi +\expandafter\gdef\csname#2@cd@file@base\endcsname{#1} +\activate@defs{#2}\export@defs{#2}} +\fi +% +% \end{macrocode} +% +% \begin{macrocode} +%<*package> +\def\req@dep@write#1#2{\if@deps\protected@write\req@depfile{}{#1 #2}\fi} +% +% \end{macrocode} +% \subsection{Finale} +% +% Finally, we need to terminate the file with a success mark for perl. +% \begin{macrocode} +%1; +% \end{macrocode} +% \Finale +\endinput + + + +% LocalWords: iffalse reqdoc reqdoc.dtx kohlhase latexml texttt fileversion +% LocalWords: maketitle newpage tableofcontents newpage ednote sref recorddeps +% LocalWords: recorddeps moc-deps DescribeEnv prio reqs reqtable reqtable deps +% LocalWords: reqline importreqs printbibliography sec.impl textsf langle ifx +% LocalWords: textsf langle ltxml newif depsfalse depstrue longtable ifreqsnum +% LocalWords: reqsnumfalse newenvironment reqsnumtrue omd +% LocalWords: OptionalKeyVals omdoc omgroup ctancite req newcounter reqnum +% LocalWords: tmpop tmpop csname xdef endcsname expandafter auxout thesection +% LocalWords: hfill thereqnum reqnote stepcounter noindent textbf newcommand +% LocalWords: medskip omtext texttype hline tabularnewline makeatletter rinput +% LocalWords: makeatother sinput stex ifdeps bgroup egroup newwrite depfile +% LocalWords: openout jobname.deps renewcommand requiremodules gdef defs defs +% LocalWords: showmeta showmeta metakeys addmetakey metasetkeys diff --git a/Master/texmf-dist/source/latex/stex/reqdoc/reqdoc.ins b/Master/texmf-dist/source/latex/stex/reqdoc/reqdoc.ins new file mode 100644 index 00000000000..35b644474ed --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/reqdoc/reqdoc.ins @@ -0,0 +1,40 @@ +%% +%% This file generates files required to use the ed package. +%% At your command prompt write +%% +%% latex reqdoc.ins +%% +%% Copyright(c) 2007 Michael Kohlhase +%% The development version of this file can be found at +%% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/reqdoc/reqdoc.ins $ +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{reqdoc.sty}{\from{reqdoc.dtx}{package}}} + +\Msg{*} +\Msg{* You probably need to move the file reqdoc.sty into a directory searched by TeX.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\nopreamble\nopostamble +\generate{\file{reqdoc.sty.ltxml}{\from{reqdoc.dtx}{ltxml}}} + +\Msg{*} +\Msg{* You probably need to move the generated ltxml files into a directory searched by LaTeXML.} +\Msg{*} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/stex/schema/Makefile b/Master/texmf-dist/source/latex/stex/schema/Makefile new file mode 100644 index 00000000000..87995e15659 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/Makefile @@ -0,0 +1,11 @@ +MAKEDIRS = rnc rng +CLEANDIRS = rnc rng + +all:: + @for d in $(MAKEDIRS);\ + do (cd $$d && $(MAKE) -$(MAKEFLAGS) $@); done; + +clean distclean:: + @for d in $(CLEANDIRS);\ + do (cd $$d && $(MAKE) -$(MAKEFLAGS) $@); done; + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-bib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-bib.rnc new file mode 100644 index 00000000000..effee37dec8 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-bib.rnc @@ -0,0 +1,491 @@ +# /=====================================================================\ +# | LaTeXML-bib.rnc | +# | RelaxNG model for LaTeXML generated documents | +# |=====================================================================| +# | Part of LaTeXML: | +# | Public domain software, produced as part of work done by the | +# | United States Government & not subject to copyright in the US. | +# |=====================================================================| +# | Bruce Miller #_# | +# | http://dlmf.nist.gov/LaTeXML/ (o o) | +# \=========================================================ooo==U==ooo=/ + +default namespace = "http://dlmf.nist.gov/LaTeXML" + +# Would be nice to use somebody elses already-developed DTD... + +# Some notes: +# There're two classes of things here: +# bibentry : which would be the translation of a .bib file +# bibitem : which would be the formatted items in a latex bibliography environment. +# This latter has typically lost much information during formatting. + +biblist = +## A list of bibliographic \elementref{bibentry} or \elementref{bibitem}. +element biblist { biblist_attributes & biblist_model } + +## Attributes for \elementref{biblist}. +biblist_attributes = Common.attributes + +## Content model for \elementref{biblist}. +biblist_model = bibentry* & bibitem* + +# ====================================================================== +# bibitem is the formatted, presentation, form, typically information has been lost; +# it basically contains a biblabel and several bibblock's +# ====================================================================== + +bibitem = +## A formatted bibliographic item, typically as written explicit +## in a LaTeX article. This has generally lost most of the semantics +## present in the BibTeX data. +element bibitem { bibitem_attributes & bibitem_model } + +## Attributes for \elementref{bibitem}. +bibitem_attributes = + Common.attributes & + ID.attributes & + ## The unique key for this object; this key is referenced by the + ## \attr{bibrefs} attribute of \elementref{bibref}. + attribute key { text }? + +## Content model for \elementref{bibitem}. +bibitem_model = bibtag*, bibblock* + +#---------------------------------------------------------------------- + +bibtag = +## Various formatted tags for bibliographic items. +## Typically @role refnum is shown in the displayed bibliography, +## as the beginning of the item. Other roles +## (eg. number, authors, fullauthors, year, title) record formatted +## info to be used for filling in citations (\elementref{bibref}). +element bibtag { bibtag_attributes & bibtag_model } + +## Attributes for \elementref{bibtag}. +bibtag_attributes = + attribute role { ("number"|"authors"|"fullauthors"|"key"|"year"|"bibtype"|"title"|text) }? & + ## A delimiter for formatting the refnum in the bibliography + attribute open { text }? & + ## A delimiter for formatting the refnum in the bibliography + attribute close { text }? + +## Content model for \elementref{bibtag}. +bibtag_model = Inline.model + +#---------------------------------------------------------------------- + +bibblock = +## A block of data appearing within a \elementref{bibitem}. +element bibblock { bibblock_attributes & bibblock_model } + +## Attributes for \elementref{bibblock}. +bibblock_attributes = empty + +## Content model for \elementref{bibblock}. +bibblock_model = Flow.model + +# bibblock's model was this: +# Inline.model } + +# ====================================================================== +# bibentry is the (more) semantic form, typically extracted from bibtex. +# ====================================================================== + +bibentry = +## Semantic representation of a bibliography entry, +## typically resulting from parsing BibTeX +element bibentry { bibentry_attributes & bibentry_model } + +bibentry.type = "article" | "book" | "booklet" | "conference" | "inbook" + | "incollection" | "inproceedings" | "manual" | "mastersthesis" + | "misc" | "phdthesis" | "proceedings" | "techreport" | "unpublished" + | "report" | "thesis" | "website" | "software" | "periodical" + | "collection" | "collection.article" | "proceedings.article" + | text + +## Attributes for \elementref{bibentry}. +bibentry_attributes = + Common.attributes & + ID.attributes & + + ## The unique key for this object; this key is referenced by the + ## \attr{bibrefs} attribute of \elementref{bibref}. + attribute key { text } & + + ## The type of the referenced object. The values are a superset of + ## those types recognized by BibTeX, but is also open-ended for extensibility. + attribute type { bibentry.type } + +## Content model for \elementref{bibentry}. +bibentry_model = Bibentry.class + +#====================================================================== + +# Name related information +bib-name = +## Name of some participant in creating a bibliographic entry. +element bib-name { bib-name_attributes & bib-name_model } + +## Attributes for \elementref{bib-name}. +bib-name_attributes = + Common.attributes & + ## The role that this participant played in creating the entry. + attribute role { ("author" | "editor" | "translator" | text) }? + +## Content model for \elementref{bib-name}. +bib-name_model = Bibname.model + +## The content model of the bibliographic name fields (\elementref{bib-name}) +Bibname.model = surname & givenname? & lineage? + +#---------------------------------------------------------------------- + +surname = +## Surname of a participant (\elementref{bib-name}). +element surname { surname_attributes & surname_model } + +## Attributes for \elementref{surname}. +surname_attributes = empty + +## Content model for \elementref{surname}. +surname_model = Inline.model + +#---------------------------------------------------------------------- + +givenname = +## Given name of a participant (\elementref{bib-name}). +element givenname { givenname_attributes & givenname_model } + +## Attributes for \elementref{givenname}. +givenname_attributes = empty + +## Content model for \elementref{givenname}. +givenname_model = Inline.model + +#---------------------------------------------------------------------- + +lineage = +## Lineage of a participant (\elementref{bib-name}), eg. Jr. or similar. +element lineage { lineage_attributes & lineage_model } + +## Attributes for \elementref{lineage}. +lineage_attributes = empty + +## Content model for \elementref{lineage}. +lineage_model = Inline.model + +#====================================================================== + +# Title related information +bib-title = +## Title of a bibliographic entry. +element bib-title { bib-title_attributes & bib-title_model } + +## Attributes for \elementref{bib-title}. +bib-title_attributes = Common.attributes + +## Content model for \elementref{bib-title}. +bib-title_model = Inline.model +#---------------------------------------------------------------------- + +bib-subtitle = +## Subtitle of a bibliographic entry. +element bib-subtitle { bib-subtitle_attributes & bib-subtitle_model } + +## Attributes for \elementref{bib-subtitle}. +bib-subtitle_attributes = Common.attributes + +## Content model for \elementref{bib-subtitle}. +bib-subtitle_model = Inline.model + +#---------------------------------------------------------------------- + +bib-key = +## Unique key of a bibliographic entry. +element bib-key { bib-key_attributes & bib-key_model } + +## Attributes for \elementref{bib-key}. +bib-key_attributes = Common.attributes + +## Content model for \elementref{bib-key}. +bib-key_model = Inline.model + +#---------------------------------------------------------------------- + +bib-type = +## Type of a bibliographic entry. +element bib-type { bib-type_attributes & bib-type_model } + +## Attributes for \elementref{bib-type}. +bib-type_attributes = Common.attributes + +## Content model for \elementref{bib-type}. +bib-type_model = Inline.model + +#---------------------------------------------------------------------- + +bib-date = +## Date of a bibliographic entry. +element bib-date { bib-date_attributes & bib-date_model } + +## Attributes for \elementref{bib-date}. +bib-date_attributes = + Common.attributes & + ## characterizes what happened on the given date + attribute role { ("publication" | "copyright" | text) }? + +## Content model for \elementref{bib-date}. +bib-date_model = Inline.model + +#---------------------------------------------------------------------- + +bib-publisher = +## Publisher of a bibliographic entry. +element bib-publisher { bib-publisher_attributes & bib-publisher_model } + +## Attributes for \elementref{bib-publisher}. +bib-publisher_attributes = Common.attributes + +## Content model for \elementref{bib-publisher}. +bib-publisher_model = Inline.model + +#---------------------------------------------------------------------- + +bib-organization = +## Organization responsible for a bibliographic entry. +element bib-organization { bib-organization_attributes & bib-organization_model } + +## Attributes for \elementref{bib-organization}. +bib-organization_attributes = Common.attributes + +## Content model for \elementref{bib-organization}. +bib-organization_model = Inline.model + +#---------------------------------------------------------------------- + +bib-place = +## Location of publisher or event +element bib-place { bib-place_attributes & bib-place_model } + +## Attributes for \elementref{bib-place}. +bib-place_attributes = Common.attributes + +## Content model for \elementref{bib-place}. +bib-place_model = Inline.model + +# --------------------------------------------------------------------- +bib-related = +## A Related bibliographic object, such as the book or journal +## that the current item is related to. +element bib-related { bib-related_attributes & bib-related_model } + +## Attributes for \elementref{bib-related}. +bib-related_attributes = + Common.attributes & + ## The type of this related entry. + attribute type { bibentry.type }? & + ## How this object relates to the containing object. + ## Particularly important is \attrval{host} which indicates that + ## the outer object is a part of this object. + attribute role { ("host" | "event" | "original" | text) }? & + ## If the bibrefs attribute is given, it is the key of another object in the bibliography, + ## and this element should be empty; otherwise the object should be described by + ## the content of the element. + attribute bibrefs { text }? + +## Content model for \elementref{bib-related}. +bib-related_model = Bibentry.class + +# --------------------------------------------------------------------- + +bib-part = +## Describes how the current object is related to a related (\elementref{bib-related}) +## object, in particular page, part, volume numbers and similar. +element bib-part { bib-part_attributes & bib-part_model } + +## Attributes for \elementref{bib-part}. +bib-part_attributes = + Common.attributes & + ## indicates how the value partitions the containing object. + attribute role { ("pages" | "part" | "volume" | "issue" | "number" + | "chapter" | "section" | "paragraph" | text) }? + +## Content model for \elementref{bib-part}. +bib-part_model = Inline.model + +# --------------------------------------------------------------------- +# + +bib-edition = +## Edition of a bibliographic entry. +element bib-edition { bib-edition_attributes & bib-edition_model } + +## Attributes for \elementref{bib-edition}. +bib-edition_attributes = Common.attributes + +## Content model for \elementref{bib-edition}. +bib-edition_model = Inline.model + +#---------------------------------------------------------------------- + +bib-status = +## Status of a bibliographic entry. +element bib-status { bib-status_attributes & bib-status_model } + +## Attributes for \elementref{bib-status}. +bib-status_attributes = Common.attributes + +## Content model for \elementref{bib-status}. +bib-status_model = Inline.model + +#---------------------------------------------------------------------- + +bib-identifier = +## Some form of document identfier. The content is descriptive. +element bib-identifier { bib-identifier_attributes & bib-identifier_model } + +## Attributes for \elementref{bib-identifier}. +bib-identifier_attributes = + Common.attributes & + ## indicates what sort of identifier it is; it is open-ended for extensibility. + attribute scheme { "doi" | "issn" | "isbn" | "mr" | text }? & + ## the identifier. + attribute id { text}? & + ## a url to the document, if available + attribute href { text}? + +## Content model for \elementref{bib-identifier}. +bib-identifier_model = Inline.model + +#---------------------------------------------------------------------- + +bib-review = +## Review of a bibliographic entry. The content is descriptive. +element bib-review { bib-review_attributes & bib-review_model } + +## Attributes for \elementref{bib-review}. +bib-review_attributes = + Common.attributes & + ## indicates what sort of identifier it is; it is open-ended for extensibility. + attribute scheme { "doi" | "issn" | "isbn" | "mr" | text }? & + ## the identifier. + attribute id { text}? & + ## a url to the review, if available + attribute href { text}? + +## Content model for \elementref{bib-review}. +bib-review_model = Inline.model + +#---------------------------------------------------------------------- + +bib-links = +## Links to other things like preprints, source code, etc. +element bib-links { bib-links_attributes & bib-links_model } + +## Attributes for \elementref{bib-links}. +bib-links_attributes = Common.attributes + +## Content model for \elementref{bib-links}. +bib-links_model = Inline.model + +#---------------------------------------------------------------------- + +bib-language = +## Language of a bibliographic entry. +element bib-language { bib-language_attributes & bib-language_model } + +## Attributes for \elementref{bib-language}. +bib-language_attributes = Common.attributes + +## Content model for \elementref{bib-language}. +bib-language_model = Inline.model + +#---------------------------------------------------------------------- + +bib-url = +## A URL for a bibliographic entry. The content is descriptive +element bib-url { bib-url_attributes & bib-url_model } + +## Attributes for \elementref{bib-url}. +bib-url_attributes = + Common.attributes & + attribute href { text }? + +## Content model for \elementref{bib-url}. +bib-url_model = Inline.model + +#---------------------------------------------------------------------- + +bib-extract = +## An extract from the referenced object. +element bib-extract { bib-extract_attributes & bib-extract_model } + +## Attributes for \elementref{bib-extract}. +bib-extract_attributes = + Common.attributes & + ## Classify what kind of extract + attribute role { ("keywords" | "abstract" | "contents" | text) }? + +## Content model for \elementref{bib-extract}. +bib-extract_model = Inline.model + +#---------------------------------------------------------------------- + +bib-note = +## Notes about a bibliographic entry. +element bib-note { bib-note_attributes & bib-note_model } + +## Attributes for \elementref{bib-note}. +bib-note_attributes = + Common.attributes & + ## Classify the kind of note + attribute role { ("annotation" | "publication" | text) }? + +## Content model for \elementref{bib-note}. +bib-note_model = Inline.model + +#---------------------------------------------------------------------- + +bib-data = +## Random data, not necessarily even text. +## (future questions: should model be text or ANY? maybe should have encoding attribute?). +element bib-data { bib-data_attributes & bib-data_model } + +## Attributes for \elementref{bib-data}. +bib-data_attributes = + Common.attributes & + ## Classify the relationship of the data to the entry. + attribute role { text }? & + ## Classify the type of the data. + attribute type { text }? + +## Content model for \elementref{bib-data}. +bib-data_model = Inline.model + +#====================================================================== + +Bibentry.class = + bib-name* + & bib-title* + & bib-subtitle* + & bib-key* + & bib-type* + & bib-date* + & bib-publisher* + & bib-organization* + & bib-place* + & bib-part* + & bib-related* + & bib-edition* + & bib-status* + & bib-language* + & bib-url* + & bib-note* + & bib-extract* + & bib-identifier* + & bib-review* + & bib-links* + & bib-data* + +#====================================================================== diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-bib.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-bib.rng new file mode 100644 index 00000000000..83f70a1c76d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-bib.rng @@ -0,0 +1,774 @@ + + + + + + + + A list of bibliographic \elementref{bibentry} or \elementref{bibitem}. + + + + + + Attributes for \elementref{biblist}. + + + + Content model for \elementref{biblist}. + + + + + + + + + + + A formatted bibliographic item, typically as written explicit +in a LaTeX article. This has generally lost most of the semantics +present in the BibTeX data. + + + + + + Attributes for \elementref{bibitem}. + + + + + The unique key for this object; this key is referenced by the +\attr{bibrefs} attribute of \elementref{bibref}. + + + + + Content model for \elementref{bibitem}. + + + + + + + + + + + Various formatted tags for bibliographic items. +Typically @role refnum is shown in the displayed bibliography, +as the beginning of the item. Other roles +(eg. number, authors, fullauthors, year, title) record formatted +info to be used for filling in citations (\elementref{bibref}). + + + + + + Attributes for \elementref{bibtag}. + + + + number + authors + fullauthors + key + year + bibtype + title + + + + + + + A delimiter for formatting the refnum in the bibliography + + + + + A delimiter for formatting the refnum in the bibliography + + + + + Content model for \elementref{bibtag}. + + + + + + A block of data appearing within a \elementref{bibitem}. + + + + + + Attributes for \elementref{bibblock}. + + + + Content model for \elementref{bibblock}. + + + + + + + Semantic representation of a bibliography entry, +typically resulting from parsing BibTeX + + + + + + + article + book + booklet + conference + inbook + incollection + inproceedings + manual + mastersthesis + misc + phdthesis + proceedings + techreport + unpublished + report + thesis + website + software + periodical + collection + collection.article + proceedings.article + + + + + Attributes for \elementref{bibentry}. + + + + The unique key for this object; this key is referenced by the +\attr{bibrefs} attribute of \elementref{bibref}. + + + The type of the referenced object. The values are a superset of +those types recognized by BibTeX, but is also open-ended for extensibility. + + + + + Content model for \elementref{bibentry}. + + + + + + + + + Name of some participant in creating a bibliographic entry. + + + + + + Attributes for \elementref{bib-name}. + + + + The role that this participant played in creating the entry. + + author + editor + translator + + + + + + + Content model for \elementref{bib-name}. + + + + The content model of the bibliographic name fields (\elementref{bib-name}) + + + + + + + + + + + + Surname of a participant (\elementref{bib-name}). + + + + + + Attributes for \elementref{surname}. + + + + Content model for \elementref{surname}. + + + + + + Given name of a participant (\elementref{bib-name}). + + + + + + Attributes for \elementref{givenname}. + + + + Content model for \elementref{givenname}. + + + + + + Lineage of a participant (\elementref{bib-name}), eg. Jr. or similar. + + + + + + Attributes for \elementref{lineage}. + + + + Content model for \elementref{lineage}. + + + + + + + Title of a bibliographic entry. + + + + + + Attributes for \elementref{bib-title}. + + + + Content model for \elementref{bib-title}. + + + + + + Subtitle of a bibliographic entry. + + + + + + Attributes for \elementref{bib-subtitle}. + + + + Content model for \elementref{bib-subtitle}. + + + + + + Unique key of a bibliographic entry. + + + + + + Attributes for \elementref{bib-key}. + + + + Content model for \elementref{bib-key}. + + + + + + Type of a bibliographic entry. + + + + + + Attributes for \elementref{bib-type}. + + + + Content model for \elementref{bib-type}. + + + + + + Date of a bibliographic entry. + + + + + + Attributes for \elementref{bib-date}. + + + + characterizes what happened on the given date + + publication + copyright + + + + + + + Content model for \elementref{bib-date}. + + + + + + Publisher of a bibliographic entry. + + + + + + Attributes for \elementref{bib-publisher}. + + + + Content model for \elementref{bib-publisher}. + + + + + + Organization responsible for a bibliographic entry. + + + + + + Attributes for \elementref{bib-organization}. + + + + Content model for \elementref{bib-organization}. + + + + + + Location of publisher or event + + + + + + Attributes for \elementref{bib-place}. + + + + Content model for \elementref{bib-place}. + + + + + + A Related bibliographic object, such as the book or journal +that the current item is related to. + + + + + + Attributes for \elementref{bib-related}. + + + + The type of this related entry. + + + + + + How this object relates to the containing object. +Particularly important is \attrval{host} which indicates that +the outer object is a part of this object. + + host + event + original + + + + + + + If the bibrefs attribute is given, it is the key of another object in the bibliography, +and this element should be empty; otherwise the object should be described by +the content of the element. + + + + + Content model for \elementref{bib-related}. + + + + + + + + Describes how the current object is related to a related (\elementref{bib-related}) +object, in particular page, part, volume numbers and similar. + + + + + + Attributes for \elementref{bib-part}. + + + + indicates how the value partitions the containing object. + + pages + part + volume + issue + number + chapter + section + paragraph + + + + + + + Content model for \elementref{bib-part}. + + + + + + Edition of a bibliographic entry. + + + + + + Attributes for \elementref{bib-edition}. + + + + Content model for \elementref{bib-edition}. + + + + + + Status of a bibliographic entry. + + + + + + Attributes for \elementref{bib-status}. + + + + Content model for \elementref{bib-status}. + + + + + + Some form of document identfier. The content is descriptive. + + + + + + Attributes for \elementref{bib-identifier}. + + + + indicates what sort of identifier it is; it is open-ended for extensibility. + + doi + issn + isbn + mr + + + + + + + the identifier. + + + + + a url to the document, if available + + + + + Content model for \elementref{bib-identifier}. + + + + + + Review of a bibliographic entry. The content is descriptive. + + + + + + Attributes for \elementref{bib-review}. + + + + indicates what sort of identifier it is; it is open-ended for extensibility. + + doi + issn + isbn + mr + + + + + + + the identifier. + + + + + a url to the review, if available + + + + + Content model for \elementref{bib-review}. + + + + + + Links to other things like preprints, source code, etc. + + + + + + Attributes for \elementref{bib-links}. + + + + Content model for \elementref{bib-links}. + + + + + + Language of a bibliographic entry. + + + + + + Attributes for \elementref{bib-language}. + + + + Content model for \elementref{bib-language}. + + + + + + A URL for a bibliographic entry. The content is descriptive + + + + + + Attributes for \elementref{bib-url}. + + + + + + + Content model for \elementref{bib-url}. + + + + + + An extract from the referenced object. + + + + + + Attributes for \elementref{bib-extract}. + + + + Classify what kind of extract + + keywords + abstract + contents + + + + + + + Content model for \elementref{bib-extract}. + + + + + + Notes about a bibliographic entry. + + + + + + Attributes for \elementref{bib-note}. + + + + Classify the kind of note + + annotation + publication + + + + + + + Content model for \elementref{bib-note}. + + + + + + Random data, not necessarily even text. +(future questions: should model be text or ANY? maybe should have encoding attribute?). + + + + + + Attributes for \elementref{bib-data}. + + + + Classify the relationship of the data to the entry. + + + + + Classify the type of the data. + + + + + Content model for \elementref{bib-data}. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-block.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-block.rnc new file mode 100644 index 00000000000..a8ccd452b7b --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-block.rnc @@ -0,0 +1,305 @@ +# /=====================================================================\ +# | LaTeXML-block.rnc | +# | RelaxNG model for LaTeXML generated documents | +# |=====================================================================| +# | Part of LaTeXML: | +# | Public domain software, produced as part of work done by the | +# | United States Government & not subject to copyright in the US. | +# |=====================================================================| +# | Bruce Miller #_# | +# | http://dlmf.nist.gov/LaTeXML/ (o o) | +# \=========================================================ooo==U==ooo=/ + +default namespace = "http://dlmf.nist.gov/LaTeXML" + +## The block module defines the following `physical' block elements. +Block.class &= + p* & equation* & equationgroup* & quote* & block* & listingblock* + & itemize* & enumerate* & description* + + +## Additionally, it defines these miscellaneous elements that can appear +## in both inline and block contexts. +Misc.class &= inline-block* & verbatim* & break* & graphics* & svg* + +## Additional Metadata that can be present in equations. +EquationMeta.class = constraint + +#====================================================================== + +p = +## A physical paragraph. +element p { p_attributes & p_model } + +## Attributes for \elementref{p}. +p_attributes = Common.attributes & ID.attributes & Positionable.attributes + +## Content model for \elementref{p}. +p_model = Inline.model + +#====================================================================== + +constraint = +## A constraint upon an equation. +element constraint { constraint_attributes & constraint_model } + +## Attributes for \elementref{constraint}. +constraint_attributes = + attribute hidden { xsd:boolean }? + +## Content model for \elementref{constraint}. +constraint_model = Inline.model + +#====================================================================== + +equation = +## An Equation. The model is just Inline which includes \elementref{Math}, +## the main expected ingredient. +## However, other things can end up in display math, too, so we use Inline. +## Note that tabular is here only because it's a common, if misguided, idiom; +## the processor will lift such elements out of math, when possible +element equation { equation_attributes & equation_model } + +## Attributes for \elementref{equation}. +equation_attributes = Common.attributes & Labelled.attributes + +## Content model for \elementref{equation}. +equation_model = Math* & MathFork* & \text* & tabular* & Meta.class & EquationMeta.class + +#====================================================================== + +equationgroup = +## A group of equations, perhaps aligned (Though this is nowhere recorded). +element equationgroup { equationgroup_attributes & equationgroup_model } + +## Attributes for \elementref{equationgroup}. +equationgroup_attributes = Common.attributes & Labelled.attributes + +## Content model for \elementref{equationgroup}. +equationgroup_model = equationgroup* & equation* & p* & Meta.class & EquationMeta.class + +#====================================================================== + +MathFork = +## A wrapper for Math that provides alternative, +## but typically less semantically meaningful, +## formatted representations. +## The first child is the meaningful form, +## the extra children provide formatted forms, +## for example being table rows or cells arising from an eqnarray. +element MathFork { MathFork_attributes & MathFork_model } + +## Attributes for \elementref{MathFork}. +MathFork_attributes = Common.attributes + +## Content model for \elementref{MathFork}. +MathFork_model = Math, MathBranch* + +#====================================================================== + +MathBranch = +## A container for an alternatively formatted math representation. +element MathBranch { MathBranch_attributes & MathBranch_model } + +## Attributes for \elementref{MathBranch}. +MathBranch_attributes = + Common.attributes & + attribute format { text }? + +## Content model for \elementref{MathBranch}. +MathBranch_model = Math* & tr* & td* + +#====================================================================== + +quote = +## A quotation. +element quote { quote_attributes & quote_model } + +## Attributes for \elementref{quote}. +quote_attributes = Common.attributes & ID.attributes + +## Content model for \elementref{quote}. +quote_model = Block.model +# This was Inline.model, but since quotes can be arbitrarily complex +# including equations, etc, not just verse, should be Block.model, perhaps even Para.model? + +#====================================================================== + +block = +## A generic block (fallback). +element block { block_attributes & block_model } + +## Attributes for \elementref{block}. +block_attributes = Common.attributes & ID.attributes & Positionable.attributes + +## Content model for \elementref{block}. +block_model = Inline.model + +#====================================================================== + +listingblock = +## An in-block Listing, without caption +element listingblock { listingblock_attributes & listingblock_model } + +## Attributes for \elementref{listingblock}. +listingblock_attributes = Common.attributes & Labelled.attributes + +## Content model for \elementref{listingblock}. +listingblock_model = Block.model* + +#====================================================================== + +break = +## A forced line break. +element break { break_attributes & break_model } + +## Attributes for \elementref{break}. +break_attributes = Common.attributes + +## Content model for \elementref{break}. +break_model = empty + +#====================================================================== + +inline-block = +## An inline block. Actually, can appear in inline or block mode, but +## typesets its contents as a block. +element inline-block { inline-block_attributes & inline-block_model } + +## Attributes for \elementref{inline-block}. +inline-block_attributes = Common.attributes & ID.attributes & Positionable.attributes + +## Content model for \elementref{inline-block}. +inline-block_model = Block.model + +#====================================================================== + +verbatim = +## Verbatim content +element verbatim { verbatim_attributes & verbatim_model } + +## Attributes for \elementref{verbatim}. +verbatim_attributes = + Common.attributes & + ID.attributes & + ## the font to use; generally typewriter. + attribute font { text }? & + + ## Indicates the text size to use. (See \elementref{text}) + attribute size { "Huge" | "huge" | "LARGE" | "Large" | "large" | "normal" + | "small" | "footnote" | "tiny" | text }? & + + ## the color to use; any CSS compatible color specification. + attribute color { text }? + +## Content model for \elementref{verbatim}. +verbatim_model = Inline.model + +#====================================================================== + +itemize = +## An itemized list. +element itemize { itemize_attributes & itemize_model } + +## Attributes for \elementref{itemize}. +itemize_attributes = Common.attributes & ID.attributes + +## Content model for \elementref{itemize}. +itemize_model = item* + +#====================================================================== + +enumerate = +## An enumerated list. +element enumerate { enumerate_attributes & enumerate_model } + +## Attributes for \elementref{enumerate}. +enumerate_attributes = Common.attributes & ID.attributes + +## Content model for \elementref{enumerate}. +enumerate_model = item* + +#====================================================================== + +description = +## A description list. The \elementref{item}s within are expected to have a \elementref{tag} +## which represents the term being described in each \elementref{item}. +element description { description_attributes & description_model } + +## Attributes for \elementref{description}. +description_attributes = Common.attributes & ID.attributes + +## Content model for \elementref{description}. +description_model = item* + +#====================================================================== + +item = +## An item within a list. +element item { item_attributes & item_model } + +## Attributes for \elementref{item}. +item_attributes = Common.attributes & Labelled.attributes + +## Content model for \elementref{item}. +item_model = tag? & Para.model + +#====================================================================== + +tag = +## A tag within an item indicating the term or bullet for a given item. +element tag { tag_attributes & tag_model } + +## Attributes for \elementref{tag}. +tag_attributes = + Common.attributes & + + ## specifies an open delimiters used to display the tag. + attribute open { text }? & + + ## specifies an close delimiters used to display the tag. + attribute close { text }? + +## Content model for \elementref{tag}. +tag_model = Inline.model + +#====================================================================== + +graphics = +## A graphical insertion of an external file. +element graphics { graphics_attributes & graphics_model } + +## Attributes for \elementref{graphics}. +graphics_attributes = + Common.attributes & + ID.attributes & + Imageable.attributes & + + ## the path to the graphics file. This is the (often minimally specified) path + ## to a graphics file omitting the type extension. Once resolved to a specific + ## image file, the \attr{imagesrc} (from Imageable.attributes) is used. + attribute graphic { text }? & + + ## a comma separated list of candidate graphics files that could be used to + ## for \attr{graphic}. A post-processor or application may choose from these, + ## or may make its own selection or synthesis to implement the graphic for a given target. + attribute candidates { text }? & + + ## an encoding of the scaling and positioning options + ## to be used in processing the graphic. + attribute options { text }? + + +## Content model for \elementref{graphics}. +graphics_model = empty + +#====================================================================== + +svg = +## An SVG (Scalable Vector Graphics) object +## [eventually must adapt to put LaTeXML objects in foreignObject] +grammar { + include "svg11.rnc" + { SVG.foreignObject.content = parent Flow.model } +} +#====================================================================== diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-block.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-block.rng new file mode 100644 index 00000000000..52721622c6b --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-block.rng @@ -0,0 +1,479 @@ + + + + + The block module defines the following `physical' block elements. + + + + + + + + + + + + + + Additionally, it defines these miscellaneous elements that can appear +in both inline and block contexts. + + + + + + + + + + Additional Metadata that can be present in equations. + + + + + + A physical paragraph. + + + + + + Attributes for \elementref{p}. + + + + + + Content model for \elementref{p}. + + + + + + A constraint upon an equation. + + + + + + Attributes for \elementref{constraint}. + + + + + + + + Content model for \elementref{constraint}. + + + + + + An Equation. The model is just Inline which includes \elementref{Math}, +the main expected ingredient. +However, other things can end up in display math, too, so we use Inline. +Note that tabular is here only because it's a common, if misguided, idiom; +the processor will lift such elements out of math, when possible + + + + + + Attributes for \elementref{equation}. + + + + + Content model for \elementref{equation}. + + + + + + + + + + + + + + + A group of equations, perhaps aligned (Though this is nowhere recorded). + + + + + + Attributes for \elementref{equationgroup}. + + + + + Content model for \elementref{equationgroup}. + + + + + + + + + + + + + + A wrapper for Math that provides alternative, +but typically less semantically meaningful, +formatted representations. +The first child is the meaningful form, +the extra children provide formatted forms, +for example being table rows or cells arising from an eqnarray. + + + + + + Attributes for \elementref{MathFork}. + + + + Content model for \elementref{MathFork}. + + + + + + + + + A container for an alternatively formatted math representation. + + + + + + Attributes for \elementref{MathBranch}. + + + + + + + Content model for \elementref{MathBranch}. + + + + + + + + + + + + A quotation. + + + + + + Attributes for \elementref{quote}. + + + + + Content model for \elementref{quote}. + + + + + + + A generic block (fallback). + + + + + + Attributes for \elementref{block}. + + + + + + Content model for \elementref{block}. + + + + + + An in-block Listing, without caption + + + + + + Attributes for \elementref{listingblock}. + + + + + Content model for \elementref{listingblock}. + + + + + + + + A forced line break. + + + + + + Attributes for \elementref{break}. + + + + Content model for \elementref{break}. + + + + + + An inline block. Actually, can appear in inline or block mode, but +typesets its contents as a block. + + + + + + Attributes for \elementref{inline-block}. + + + + + + Content model for \elementref{inline-block}. + + + + + + Verbatim content + + + + + + Attributes for \elementref{verbatim}. + + + + + the font to use; generally typewriter. + + + + + Indicates the text size to use. (See \elementref{text}) + + Huge + huge + LARGE + Large + large + normal + small + footnote + tiny + + + + + + + the color to use; any CSS compatible color specification. + + + + + Content model for \elementref{verbatim}. + + + + + + An itemized list. + + + + + + Attributes for \elementref{itemize}. + + + + + Content model for \elementref{itemize}. + + + + + + + + An enumerated list. + + + + + + Attributes for \elementref{enumerate}. + + + + + Content model for \elementref{enumerate}. + + + + + + + + A description list. The \elementref{item}s within are expected to have a \elementref{tag} +which represents the term being described in each \elementref{item}. + + + + + + Attributes for \elementref{description}. + + + + + Content model for \elementref{description}. + + + + + + + + An item within a list. + + + + + + Attributes for \elementref{item}. + + + + + Content model for \elementref{item}. + + + + + + + + + A tag within an item indicating the term or bullet for a given item. + + + + + + Attributes for \elementref{tag}. + + + + specifies an open delimiters used to display the tag. + + + + + specifies an close delimiters used to display the tag. + + + + + Content model for \elementref{tag}. + + + + + + A graphical insertion of an external file. + + + + + + Attributes for \elementref{graphics}. + + + + + + the path to the graphics file. This is the (often minimally specified) path +to a graphics file omitting the type extension. Once resolved to a specific +image file, the \attr{imagesrc} (from Imageable.attributes) is used. + + + + + a comma separated list of candidate graphics files that could be used to +for \attr{graphic}. A post-processor or application may choose from these, +or may make its own selection or synthesis to implement the graphic for a given target. + + + + + an encoding of the scaling and positioning options +to be used in processing the graphic. + + + + + Content model for \elementref{graphics}. + + + + + + An SVG (Scalable Vector Graphics) object +[eventually must adapt to put LaTeXML objects in foreignObject] + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-common.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-common.rnc new file mode 100644 index 00000000000..6beb53b14b6 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-common.rnc @@ -0,0 +1,150 @@ +# /=====================================================================\ +# | LaTeXML-classes.rnc | +# | Document Type for LaTeXML generated documents | +# |=====================================================================| +# | Part of LaTeXML: | +# | Public domain software, produced as part of work done by the | +# | United States Government & not subject to copyright in the US. | +# |=====================================================================| +# | Bruce Miller #_# | +# | http://dlmf.nist.gov/LaTeXML/ (o o) | +# \=========================================================ooo==U==ooo=/ + +default namespace = "http://dlmf.nist.gov/LaTeXML" + + +# Basic element classes: + +## All strictly inline elements. +Inline.class = empty + +## All `physical' block elements. +## A physical block is typically displayed as a block, but +## may not constitute a complete logical unit. +Block.class = empty + +## Additional miscellaneous elements that can appear in +## both inline and block contexts. +Misc.class = empty + +## All logical block level elements. +## A logical block typically contains one or more physical block elements. +## For example, a common situation might be \elementref{p},\elementref{equation},\elementref{p}, +## where the entire sequence comprises a single sentence. +Para.class = empty + +## All metadata elements, typically representing hidden data. +Meta.class = empty + +# ====================================================================== +# Attribute types + +## The type for attributes specifying a length. +## Should be a number followed by a length, typically px. +## NOTE: To be narrowed later. +Length.type = text + +## The type for attributes specifying a color. +## NOTE: To be narrowed later. +Color.type = text + +# ====================================================================== +## Attributes shared by ALL elements. +Common.attributes = + +# ## provides for namespace declaration. +# attribute xmlns { text }? & + + ## a space separated list of tokens, as in CSS. + ## The \attr{class} can be used to add differentiate different instances of elements + ## without introducing new element declarations. + ## However, this generally shouldn't be used for deep semantic distinctions. + ## This attribute is carried over to HTML and can be used for CSS selection. + ## [Note that the default XSLT stylesheets for html and xhtml + ## add the latexml element names to the class of html elements + ## for more convenience in using CSS.] + attribute class { xsd:NMTOKENS }? + +## Attributes for elements that can be cross-referenced +## from inside or outside the document. +ID.attributes = + + ## the unique identifier of the element, + ## usually generated automatically by the latexml. + attribute xml:id { xsd:ID }? + +## Attributes for elements that can cross-reference other elements. +IDREF.attributes = + + ## the identifier of the referred-to element. + attribute idref { xsd:IDREF }? + +## Attributes for elements that can be labelled from within LaTeX. +## These attributes deal with assigning a label and generating cross references. +Labelled.attributes = + ID.attributes & + + ## Records the various labels that LaTeX uses for crossreferencing. + ## (note that \cs{label} can associate more than one label with an object!) + ## It consists of space separated labels for the element. + ## The \cs{label} macro provides the label prefixed by \texttt{LABEL:}; + ## Spaces in a label are replaced by underscore. + ## Other mechanisms (like acro?) might use other prefixes (but \texttt{ID:} is reserved!) + attribute labels { text }? & + + ## the reference number (ie. section number, equation number, etc) of the object. + attribute refnum { text }? & + + ## the formatted reference number of the object, typically this is the refnum with + ## the object type prepended, such as "Chapter 2" + attribute frefnum { text }? + +## Attributes shared by low-level, generic inline and block elements +## that can be sized or shifted. +Positionable.attributes = + + ## the desired width of the box + attribute width { Length.type }? & + + ## the desired height of the box + attribute height { Length.type }? & + + ## the desired depth of the box + attribute depth { Length.type }? & + + ## extra width beyond the boxes natural size. + attribute pad-width { Length.type }? & + + ## extra height beyond the boxes natural size. + attribute pad-height { Length.type }? & + + ## horizontal shift the position of the box. + attribute xoffset { Length.type }? & + + ## vertical shift the position of the box. + attribute yoffset { Length.type }? & + + ## alignment of material within the box. + attribute align { "left" | "center" | "right" | "justified" }? & + + ## specifies which line of the box is aligned to the baseline of the containing object. + attribute vattach { "top" | "middle" | "bottom" }? & + + ## the horizontal floating placement parameter that determines where the object is displayed. + attribute float { ( "right" | "left" | text) }? + +## Attributes for elements that may be converted to image form +## during postprocessing, such as math, graphics, pictures, etc. +Imageable.attributes = + + ## the file, possibly generated from other data. + attribute imagesrc { xsd:anyURI }? & + + ## the width in pixels of \attr{imagesrc}. + attribute imagewidth { xsd:nonNegativeInteger}? & + + ## the height in pixels of \attr{imagesrc}. + attribute imageheight { xsd:nonNegativeInteger }? & + + ## a description of the image + attribute description { text }? diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-common.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-common.rng new file mode 100644 index 00000000000..850da7753e7 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-common.rng @@ -0,0 +1,229 @@ + + + + + + All strictly inline elements. + + + + All `physical' block elements. +A physical block is typically displayed as a block, but +may not constitute a complete logical unit. + + + + Additional miscellaneous elements that can appear in +both inline and block contexts. + + + + All logical block level elements. +A logical block typically contains one or more physical block elements. +For example, a common situation might be \elementref{p},\elementref{equation},\elementref{p}, +where the entire sequence comprises a single sentence. + + + + All metadata elements, typically representing hidden data. + + + + + The type for attributes specifying a length. +Should be a number followed by a length, typically px. +NOTE: To be narrowed later. + + + + The type for attributes specifying a color. +NOTE: To be narrowed later. + + + + + Attributes shared by ALL elements. + + + + a space separated list of tokens, as in CSS. +The \attr{class} can be used to add differentiate different instances of elements +without introducing new element declarations. +However, this generally shouldn't be used for deep semantic distinctions. +This attribute is carried over to HTML and can be used for CSS selection. +[Note that the default XSLT stylesheets for html and xhtml +add the latexml element names to the class of html elements +for more convenience in using CSS.] + + + + + + Attributes for elements that can be cross-referenced +from inside or outside the document. + + + the unique identifier of the element, +usually generated automatically by the latexml. + + + + + + Attributes for elements that can cross-reference other elements. + + + the identifier of the referred-to element. + + + + + + Attributes for elements that can be labelled from within LaTeX. +These attributes deal with assigning a label and generating cross references. + + + + Records the various labels that LaTeX uses for crossreferencing. +(note that \cs{label} can associate more than one label with an object!) +It consists of space separated labels for the element. +The \cs{label} macro provides the label prefixed by \texttt{LABEL:}; +Spaces in a label are replaced by underscore. +Other mechanisms (like acro?) might use other prefixes (but \texttt{ID:} is reserved!) + + + + + the reference number (ie. section number, equation number, etc) of the object. + + + + + the formatted reference number of the object, typically this is the refnum with +the object type prepended, such as "Chapter 2" + + + + + Attributes shared by low-level, generic inline and block elements +that can be sized or shifted. + + + the desired width of the box + + + + + + the desired height of the box + + + + + + the desired depth of the box + + + + + + extra width beyond the boxes natural size. + + + + + + extra height beyond the boxes natural size. + + + + + + horizontal shift the position of the box. + + + + + + vertical shift the position of the box. + + + + + + alignment of material within the box. + + left + center + right + justified + + + + + + specifies which line of the box is aligned to the baseline of the containing object. + + top + middle + bottom + + + + + + the horizontal floating placement parameter that determines where the object is displayed. + + right + left + + + + + + + Attributes for elements that may be converted to image form +during postprocessing, such as math, graphics, pictures, etc. + + + the file, possibly generated from other data. + + + + + + the width in pixels of \attr{imagesrc}. + + + + + + the height in pixels of \attr{imagesrc}. + + + + + + a description of the image + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-inline.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-inline.rnc new file mode 100644 index 00000000000..604cd5896ec --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-inline.rnc @@ -0,0 +1,308 @@ +# /=====================================================================\ +# | LaTeXML-inline.rnc | +# | RelaxNG model for LaTeXML generated documents | +# |=====================================================================| +# | Part of LaTeXML: | +# | Public domain software, produced as part of work done by the | +# | United States Government & not subject to copyright in the US. | +# |=====================================================================| +# | Bruce Miller #_# | +# | http://dlmf.nist.gov/LaTeXML/ (o o) | +# \=========================================================ooo==U==ooo=/ + + +default namespace = "http://dlmf.nist.gov/LaTeXML" + +## The inline module defines basic inline elements used throughout +Inline.class &= \text* & emph* & acronym* & rule* & anchor* & ref* & cite* & bibref* + +## Additionally, it defines these meta elements. These are generally hidden, +## and can appear in inline and block contexts. +Meta.class &= note* & indexmark* & ERROR* + +#====================================================================== + +\text = +## General container for styled text. +## Attributes cover a variety of styling and position shifting properties. +element text { text_attributes & text_model } + +## Attributes for \elementref{text}. +text_attributes = + Common.attributes & + Positionable.attributes & + + ## Indicates the font to use. It consists of a space separated sequence + ## of values representing the + ## family (\texttt{serif}, \texttt{sansserif}, \texttt{math}, \texttt{typewriter}, + ## \texttt{caligraphic}, \texttt{fraktur}, \texttt{script}, \ldots), + ## series (\texttt{medium}, \texttt{bold}, \ldots), + ## and shape (\texttt{upright}, \texttt{italic}, \texttt{slanted}, \texttt{smallcaps}, \ldots). + ## Only the values differing from the current context are given. + ## Each component is open-ended, for extensibility; it is thus unclear + ## whether unknown values specify family, series or shape. + ## In postprocessing, these values are carried to the \attr{class} attribute, + ## and can thus be effected by CSS. + attribute font { text }? & + + ## Indicates the text size to use. The values are modeled after the + ## more abstract \LaTeX\ font size switches, rather than point-sizes. + ## The values are open-ended for extensibility; + ## In postprocessing, these values are carried to the \attr{class} attribute, + ## and can thus be effected by CSS. + attribute size { "Huge" | "huge" | "LARGE" | "Large" | "large" | "normal" + | "small" | "footnote" | "tiny" | text }? & + + ## the color to use; any CSS compatible color specification. + ## In postprocessing, these values are carried to the \attr{class} attribute, + ## and can thus be effected by CSS. + attribute color { text }? & + + ## the kind of frame or outline for the text. + attribute framed { "rectangle" | "underline" | text }? + +## Content model for \elementref{text}. +text_model = Inline.model + +#====================================================================== + +emph = +## Emphasized text. +element emph { emph_attributes & emph_model } + +## Attributes for \elementref{emph}. +emph_attributes = Common.attributes + +## Content model for \elementref{emph}. +emph_model = Inline.model + +#====================================================================== + +acronym = +## Represents an acronym. +element acronym { acronym_attributes & acronym_model } + +## Attributes for \elementref{acronym}. +acronym_attributes = + Common.attributes & + ## should be used to indicate the expansion of the acronym. + attribute name { text }? + +## Content model for \elementref{acronym}. +acronym_model = Inline.model + +#====================================================================== + +rule = +## A Rule. +element rule { rule_attributes & rule_model } + +## Attributes for \elementref{rule}. +rule_attributes = Common.attributes & Positionable.attributes + +## Content model for \elementref{rule}. +rule_model = empty + +#====================================================================== + +ref = +## A hyperlink reference to some other object. +## When converted to HTML, the content would be the content of the anchor. +## The destination can be specified by one of the +## attributes \attr{labelref}, \attr{idref} or \attr{href}; +## Missing fields will usually be filled in during postprocessing, +## based on data extracted from the document(s). +element ref { ref_attributes & ref_model } + +## Attributes for \elementref{ref}. +ref_attributes = + Common.attributes & + + ## reference to an internal identifier. + IDREF.attributes & + + ## reference to a LaTeX labelled object; + ## See the \attr{labels} attribute of \patternref{Labelled.attributes}. + attribute labelref { text }? & + + ## reference to an arbitrary url. + attribute href { text }? & + + ## a pattern encoding how the text content should be filled in during + ## postprocessing, if it is empty. + ## It consists of the words + ## \texttt{type} (standing for the object type, eg. Ch.), + ## \texttt{refnum} and \texttt{title} + ## mixed with arbitrary characters. The + ## It can also be \texttt{fulltitle}, which indicates the title + ## with prefix and type if section numbering is enabled. + attribute show { text }? & + + ## gives a longer form description of the target, + ## this would typically appear as a tooltip in HTML. + ## Typically filled in by postprocessor. + attribute title { text }? + +## Content model for \elementref{ref}. +ref_model = Inline.model + +#====================================================================== + +anchor = +## Inline anchor. +element anchor { anchor_attributes & anchor_model } + +## Attributes for \elementref{anchor}. +anchor_attributes = Common.attributes & ID.attributes + +## Content model for \elementref{anchor}. +anchor_model = Inline.model + +#====================================================================== + +cite = +## A container for a bibliographic citation. The model is inline to +## allow arbitrary comments before and after the expected \elementref{bibref}(s) +## which are the specific citation. +element cite { cite_attributes & cite_model } + +## Attributes for \elementref{cite}. +cite_attributes = Common.attributes + +## Content model for \elementref{cite}. +cite_model = Inline.model + +#====================================================================== + +bibref = +## A bibliographic citation refering to a specific bibliographic item. +element bibref { bibref_attributes & bibref_model } + +## Attributes for \elementref{bibref}. +bibref_attributes = + Common.attributes & + IDREF.attributes & + + ## a comma separated list of bibliographic keys. + ## (See the \attr{key} attribute of \elementref{bibitem} and \elementref{bibentry}) + attribute bibrefs { text }? & + + ## a pattern encoding how the text content (of an empty bibref) will be filled in. + ## Consists of strings \texttt{author}, \texttt{fullauthor}, \texttt{year}, + ## \texttt{number} and \texttt{title} + ## (to be replaced by data from the bibliographic item) + ## mixed with arbitrary characters. + attribute show { text }? & + + ## separator between formatted references + attribute separator { text }? & + + ## separator between formatted years when duplicate authors are combined. + attribute yyseparator { text }? + +## Content model for \elementref{bibref}. +bibref_model = bibrefphrase* + +#====================================================================== + +bibrefphrase = +## A preceding or following phrase used in composing a bibliographic reference, +## such as listing pages or chapter. +element bibrefphrase { bibrefphrase_attributes & bibrefphrase_model } + +## Attributes for \elementref{bibrefphrase} +bibrefphrase_attributes = Common.attributes + +## Content model for \elementref{bibrefphrase} +bibrefphrase_model = Inline.model + +#====================================================================== + +note = +## Metadata that covers several `out of band' annotations. +## It's content allows both inline and block-level content. +element note { note_attributes & note_model } + +## Attributes for \elementref{note}. +note_attributes = + Common.attributes & + + ## indicates the desired visible marker to be linked to the note. + attribute mark { text }? & + + ## indicates the kind of note + attribute role { "footnote" | text }? + +## Content model for \elementref{note}. +note_model = Flow.model + +# should mark be more like label/refnum ? + +#====================================================================== + +ERROR = +## error object for undefined control sequences, or whatever +element ERROR { ERROR_attributes & ERROR_model } + +## Attributes for \elementref{ERROR}. +ERROR_attributes = Common.attributes + +## Content model for \elementref{ERROR}. +ERROR_model = text* + +#====================================================================== + +indexmark = +## Metadata to record an indexing position. The content is +## a sequence of \elementref{indexphrase}, each representing a level in +## a multilevel indexing entry. +element indexmark { indexmark_attributes & indexmark_model } + +## Attributes for \elementref{indexmark}. +indexmark_attributes = + Common.attributes & + ## a flattened form (like \attr{key}) of another \elementref{indexmark}, + ## used to crossreference. + attribute see_also { text }? & + + ## NOTE: describe this. + attribute style { text }? + +## Content model for \elementref{indexmark}. +indexmark_model = indexphrase*, indexsee* + +#====================================================================== + +indexphrase = +## A phrase within an \elementref{indexmark} +element indexphrase { indexphrase_attributes & indexphrase_model } + +## Attributes for \elementref{indexphrase}. +indexphrase_attributes = + Common.attributes & + + ## a flattened form of the phrase for generating an \attr{ID}. + attribute key { text }? + +## Content model for \elementref{indexphrase}. +indexphrase_model = Inline.model + +indexsee = +## A see-also phrase within an \elementref{indexmark} +element indexsee { indexsee_attributes & indexsee_model } + +## Attributes for \elementref{indexsee}. +indexsee_attributes = + Common.attributes & + + ## a flattened form of the phrase for generating an \attr{ID}. + attribute key { text }? & + + ## a name for the see phrase, such as "see also". + attribute name { text }? + + +## Content model for \elementref{indexsee}. +indexsee_model = Inline.model + +#====================================================================== diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-inline.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-inline.rng new file mode 100644 index 00000000000..8c1d793a966 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-inline.rng @@ -0,0 +1,444 @@ + + + + + The inline module defines basic inline elements used throughout + + + + + + + + + + + + + Additionally, it defines these meta elements. These are generally hidden, +and can appear in inline and block contexts. + + + + + + + + + + General container for styled text. +Attributes cover a variety of styling and position shifting properties. + + + + + + Attributes for \elementref{text}. + + + + + Indicates the font to use. It consists of a space separated sequence +of values representing the +family (\texttt{serif}, \texttt{sansserif}, \texttt{math}, \texttt{typewriter}, + \texttt{caligraphic}, \texttt{fraktur}, \texttt{script}, \ldots), +series (\texttt{medium}, \texttt{bold}, \ldots), +and shape (\texttt{upright}, \texttt{italic}, \texttt{slanted}, \texttt{smallcaps}, \ldots). +Only the values differing from the current context are given. +Each component is open-ended, for extensibility; it is thus unclear +whether unknown values specify family, series or shape. +In postprocessing, these values are carried to the \attr{class} attribute, +and can thus be effected by CSS. + + + + + Indicates the text size to use. The values are modeled after the +more abstract \LaTeX\ font size switches, rather than point-sizes. +The values are open-ended for extensibility; +In postprocessing, these values are carried to the \attr{class} attribute, +and can thus be effected by CSS. + + Huge + huge + LARGE + Large + large + normal + small + footnote + tiny + + + + + + + the color to use; any CSS compatible color specification. +In postprocessing, these values are carried to the \attr{class} attribute, +and can thus be effected by CSS. + + + + + the kind of frame or outline for the text. + + rectangle + underline + + + + + + + Content model for \elementref{text}. + + + + + + Emphasized text. + + + + + + Attributes for \elementref{emph}. + + + + Content model for \elementref{emph}. + + + + + + Represents an acronym. + + + + + + Attributes for \elementref{acronym}. + + + + should be used to indicate the expansion of the acronym. + + + + + Content model for \elementref{acronym}. + + + + + + A Rule. + + + + + + Attributes for \elementref{rule}. + + + + + Content model for \elementref{rule}. + + + + + + A hyperlink reference to some other object. +When converted to HTML, the content would be the content of the anchor. +The destination can be specified by one of the +attributes \attr{labelref}, \attr{idref} or \attr{href}; +Missing fields will usually be filled in during postprocessing, +based on data extracted from the document(s). + + + + + + Attributes for \elementref{ref}. + + + reference to an internal identifier. + + + + reference to a LaTeX labelled object; +See the \attr{labels} attribute of \patternref{Labelled.attributes}. + + + + + reference to an arbitrary url. + + + + + a pattern encoding how the text content should be filled in during +postprocessing, if it is empty. +It consists of the words + \texttt{type} (standing for the object type, eg. Ch.), + \texttt{refnum} and \texttt{title} +mixed with arbitrary characters. The +It can also be \texttt{fulltitle}, which indicates the title +with prefix and type if section numbering is enabled. + + + + + gives a longer form description of the target, +this would typically appear as a tooltip in HTML. +Typically filled in by postprocessor. + + + + + Content model for \elementref{ref}. + + + + + + Inline anchor. + + + + + + Attributes for \elementref{anchor}. + + + + + Content model for \elementref{anchor}. + + + + + + A container for a bibliographic citation. The model is inline to +allow arbitrary comments before and after the expected \elementref{bibref}(s) +which are the specific citation. + + + + + + Attributes for \elementref{cite}. + + + + Content model for \elementref{cite}. + + + + + + A bibliographic citation refering to a specific bibliographic item. + + + + + + Attributes for \elementref{bibref}. + + + + + a comma separated list of bibliographic keys. +(See the \attr{key} attribute of \elementref{bibitem} and \elementref{bibentry}) + + + + + a pattern encoding how the text content (of an empty bibref) will be filled in. +Consists of strings \texttt{author}, \texttt{fullauthor}, \texttt{year}, +\texttt{number} and \texttt{title} +(to be replaced by data from the bibliographic item) +mixed with arbitrary characters. + + + + + separator between formatted references + + + + + separator between formatted years when duplicate authors are combined. + + + + + Content model for \elementref{bibref}. + + + + + + + + A preceding or following phrase used in composing a bibliographic reference, +such as listing pages or chapter. + + + + + + Attributes for \elementref{bibrefphrase} + + + + Content model for \elementref{bibrefphrase} + + + + + + Metadata that covers several `out of band' annotations. +It's content allows both inline and block-level content. + + + + + + Attributes for \elementref{note}. + + + + indicates the desired visible marker to be linked to the note. + + + + + indicates the kind of note + + footnote + + + + + + + Content model for \elementref{note}. + + + + + + + error object for undefined control sequences, or whatever + + + + + + Attributes for \elementref{ERROR}. + + + + Content model for \elementref{ERROR}. + + + + + + + + Metadata to record an indexing position. The content is +a sequence of \elementref{indexphrase}, each representing a level in +a multilevel indexing entry. + + + + + + Attributes for \elementref{indexmark}. + + + + a flattened form (like \attr{key}) of another \elementref{indexmark}, +used to crossreference. + + + + + NOTE: describe this. + + + + + Content model for \elementref{indexmark}. + + + + + + + + + + + A phrase within an \elementref{indexmark} + + + + + + Attributes for \elementref{indexphrase}. + + + + a flattened form of the phrase for generating an \attr{ID}. + + + + + Content model for \elementref{indexphrase}. + + + + + A see-also phrase within an \elementref{indexmark} + + + + + + Attributes for \elementref{indexsee}. + + + + a flattened form of the phrase for generating an \attr{ID}. + + + + + a name for the see phrase, such as "see also". + + + + + Content model for \elementref{indexsee}. + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-math.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-math.rnc new file mode 100644 index 00000000000..d310c3df53b --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-math.rnc @@ -0,0 +1,374 @@ +# /=====================================================================\ +# | LaTeXML-math.rnc | +# | RelaxNG model for LaTeXML generated documents | +# |=====================================================================| +# | Part of LaTeXML: | +# | Public domain software, produced as part of work done by the | +# | United States Government & not subject to copyright in the US. | +# |=====================================================================| +# | Bruce Miller #_# | +# | http://dlmf.nist.gov/LaTeXML/ (o o) | +# \=========================================================ooo==U==ooo=/ + +default namespace = "http://dlmf.nist.gov/LaTeXML" + +## The math module defines LaTeXML's internal representation of mathematical +## content, including the basic math container \elementref{Math}. This element is +## considered inline, as it will be contained within some other block-level +## element, eg. \elementref{equation} for display-math. +Inline.class &= Math* + +## This class defines the content of the \elementref{Math} element. +## Additionally, it could contain MathML or OpenMath, after postprocessing. +Math.class = XMath + +## These elements comprise the internal math representation, being +## the content of the \elementref{XMath} element. +XMath.class = XMApp* & XMTok* & XMRef* & XMHint* & XMArg* & XMWrap* & XMDual* & XMText* & XMArray* + +#====================================================================== + +Math = +## Outer container for all math. This holds the internal +## \elementref{XMath} representation, as well as image data and other representations. +element Math { Math_attributes & Math_model } + +## Attributes for \elementref{Math}. +Math_attributes = + Common.attributes & + Imageable.attributes & + ID.attributes & + + ## display or inline mode. + attribute mode { "display" | "inline" }? & + + ## reconstruction of the \TeX\ that generated the math. + attribute tex { text }? & + + ## more semantic version of \attr{tex}. + attribute content-tex { text }? & + + ## a textified representation of the math. + attribute text { text }? + +## Content model for \elementref{Math}. +Math_model = Math.class + +#====================================================================== +XMath.attributes = + + ## The role that this item plays in the Grammar. + attribute role { text }? & + + ## an open delimiter to enclose the object; + attribute open { text }? & + + ## an close delimiter to enclose the object; + attribute close { text }? & + + ## an open delimiter to enclose the argument list, + ## when this token is applied to arguments with \elementref{XMApp}. + attribute argopen { text }? & + + ## a close delimiter to enclose the argument list, + ## when this token is applied to arguments with \elementref{XMApp}. + attribute argclose { text }? & + + ## characters to separate arguments, + ## when this token is applied to arguments with \elementref{XMApp}. + ## Can be multiple characters for different argument positions; + ## the last character is repeated if there aren't enough. + attribute separators { text }? & + + ## trailing (presumably non-semantic) punctuation. + attribute punctuation { text }? & + + ## an annotation placed by the parser when it suspects this token may be used as a function. + attribute possibleFunction { text }? + +#====================================================================== + +XMath = +## Internal representation of mathematics. +element XMath { XMath_attributes & XMath_model } + +## Attributes for \elementref{XMath}. +XMath_attributes = Common.attributes + +## Content model for \elementref{XMath}. +XMath_model = XMath.class + +#====================================================================== + +XMTok = +## General mathematical token. +element XMTok { XMTok_attributes & XMTok_model } + +## Attributes for \elementref{XMTok}. +XMTok_attributes = + Common.attributes & + XMath.attributes & + ID.attributes & + + ## The name of the token, typically the control sequence that created it. + attribute name { text }? & + + ## A more semantic name corresponding to the intended meaning, + ## such as the OpenMath name. + attribute meaning { text }? & + + ## The OpenMath CD for which \attr{meaning} is a symbol. + attribute omcd { text }? & + + ## Various random styling information. NOTE This needs to be made consistent. + attribute style { text }? & + + ## The font, size a used for the symbol. + attribute font { text }? & + + ## The size for the symbol, not presumed to be meaningful(?) + attribute size { text }? & + + ## The color (CSS format) for the symbol, not presumed to be meaningful(?) + attribute color { text }? & + + ## An encoding of the position of this token as a sub/superscript, used + ## to handle aligned and nested scripts, both pre and post. + ## It is a concatenation of (pre|mid|post), which indicates the horizontal + ## positioning of the script with relation to it's base, and a counter + ## indicating the level. These are used to position the scripts, + ## and to pair up aligned sub- and superscripts. + ## NOTE: Clarify where this appears: token, base, script operator, apply? + attribute scriptpos { text }? & + + ## NOTE: How is this used? + attribute thickness { text }? + +## Content model for \elementref{XMTok}. +XMTok_model = text* + + +#====================================================================== + +XMApp = +## Generalized application of a function, operator, whatever (the first child) +## to arguments (the remaining children). +## The attributes are a subset of those for \elementref{XMTok}. +element XMApp { XMApp_attributes & XMApp_model } + +## Attributes for \elementref{XMApp}. +XMApp_attributes = + Common.attributes & + XMath.attributes & + ID.attributes & + + ## The name of the token, typically the control sequence that created it. + attribute name { text }? & + + ## A more semantic name corresponding to the intended meaning, + ## such as the OpenMath name. + attribute meaning { text }? & + + ## An encoding of the position of this token as a sub/superscript, used + ## to handle aligned and nested scripts, both pre and post. + ## (See \elementref{XMTok} for details) + attribute scriptpos { text }? + +## Content model for \elementref{XMApp}. +XMApp_model = XMath.class + +#====================================================================== + +XMDual = +## Parallel markup of content (first child) and presentation (second child) +## of a mathematical object. +## Typically, the arguments are shared between the two branches: +## they appear in the content branch, with \attr{id}'s, +## and \elementref{XMRef} is used in the presentation branch +element XMDual { XMDual_attributes & XMDual_model } + +## Attributes for \elementref{XMDual}. +XMDual_attributes = + Common.attributes & + XMath.attributes & + ID.attributes + +## Content model for \elementref{XMDual}. +XMDual_model = XMath.class, XMath.class + +#====================================================================== + +XMHint = +## Various spacing items, generally ignored in parsing. +## The attributes are a subset of those for \elementref{XMTok}. +element XMHint { XMHint_attributes & XMHint_model } + +## Attributes for \elementref{XMHint}. +XMHint_attributes = + Common.attributes & + XMath.attributes & + ID.attributes & + attribute name { text }? & + attribute meaning { text }? & + attribute style { text }? + +## Content model for \elementref{XMHint}. +XMHint_model = empty + +#====================================================================== + +XMText = +## Text appearing within math. +element XMText { XMText_attributes & XMText_model } + +## Attributes for \elementref{XMText}. +XMText_attributes = + Common.attributes & + XMath.attributes & + ID.attributes & + + ## An encoding of the position of this token as a sub/superscript, used + ## to handle aligned and nested scripts, both pre and post. + ## (See \elementref{XMTok} for details) + attribute scriptpos { text }? + +## Content model for \elementref{XMText}. +XMText_model = text & Inline.class & Misc.class + +#====================================================================== + +XMWrap = +## Wrapper for a sequence of tokens used to assert the role of the +## contents in its parent. This element generally disappears after parsing. +## The attributes are a subset of those for \elementref{XMTok}. +element XMWrap { XMWrap_attributes & XMWrap_model } + +## Attributes for \elementref{XMWrap}. +XMWrap_attributes = + Common.attributes & + XMath.attributes & + ID.attributes & + + attribute name { text }? & + + ## A more semantic name corresponding to the intended meaning, + ## such as the OpenMath name. + attribute meaning { text }? & + + attribute style { text }? & + + ## An encoding of the position of this token as a sub/superscript, used + ## to handle aligned and nested scripts, both pre and post. + ## (See \elementref{XMTok} for details) + attribute scriptpos { text }? + + +## Content model for \elementref{XMWrap}. +XMWrap_model = XMath.class + +#====================================================================== + +XMArg = +## Wrapper for an argument to a structured macro. +## It implies that its content can be parsed independently of its parent, +## and thus generally disappears after parsing. +element XMArg { XMArg_attributes & XMArg_model } + +## Attributes for \elementref{XMArg}. +XMArg_attributes = + Common.attributes & + XMath.attributes & + ID.attributes & + attribute rule { text }? & + + ## An encoding of the position of this token as a sub/superscript, used + ## to handle aligned and nested scripts, both pre and post. + ## (See \elementref{XMTok} for details) + attribute scriptpos { text }? + +## Content model for \elementref{XMArg}. +XMArg_model = XMath.class + +#====================================================================== + +XMRef = +## Structure sharing element typically used in the presentation +## branch of an \elementref{XMDual} to refer to the arguments present in the content branch. +element XMRef { XMRef_attributes & XMRef_model } + +## Attributes for \elementref{XMRef}. +XMRef_attributes = + Common.attributes & + XMath.attributes & + ID.attributes & + IDREF.attributes + +## Content model for \elementref{XMRef}. +XMRef_model = empty + +#====================================================================== + +XMArray = +## Math Array/Alignment structure. +# The attributes are a subset of those for \elementref{XMTok} or of \elementref{tabular}. +element XMArray { XMArray_attributes & XMArray_model } + +## Attributes for \elementref{XMArray}. +XMArray_attributes = + Common.attributes & + XMath.attributes & + ID.attributes & + attribute name { text }? & + attribute meaning { text }? & + attribute style { text }? & + attribute vattach { "top" | "bottom" }? & + attribute width { text }? + +## Content model for \elementref{XMArray}. +XMArray_model = XMRow* + +#====================================================================== +XMRow = +## A row in a math alignment. +element XMRow { XMRow_attributes & XMRow_model } + +## Attributes for \elementref{XMRow}. +XMRow_attributes = Common.attributes + +## Content model for \elementref{XMRow}. +XMRow_model = XMCell* + +#====================================================================== + +XMCell = +## A cell in a row of a math alignment. +element XMCell { XMCell_attributes & XMCell_model } + +## Attributes for \elementref{XMCell}. +XMCell_attributes = + Common.attributes & + + ## indicates how many columns this cell spans or covers. + attribute colspan { xsd:nonNegativeInteger }? & + + ## indicates how many rows this cell spans or covers. + attribute rowpan { xsd:nonNegativeInteger }? & + +# This would have been clearer, but messes up conversion to dtd +# attribute align { "left" | "right" | "center" | "justify" | text }? & + ## specifies the alignment of the content. + attribute align { text }? & + + ## specifies the desired width for the column. + attribute width { text }? & + + ## records a sequence of t or tt, r or rr, b or bb and l or ll + ## for borders or doubled borders on any side of the cell. + attribute border { text }? & + + ## whether this cell corresponds to a table head or foot. + attribute thead {xsd:boolean}? + +## Content model for \elementref{XMCell}. +XMCell_model = XMath.class +#====================================================================== diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-math.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-math.rng new file mode 100644 index 00000000000..c9e3babe837 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-math.rng @@ -0,0 +1,557 @@ + + + + + The math module defines LaTeXML's internal representation of mathematical +content, including the basic math container \elementref{Math}. This element is +considered inline, as it will be contained within some other block-level +element, eg. \elementref{equation} for display-math. + + + + This class defines the content of the \elementref{Math} element. +Additionally, it could contain MathML or OpenMath, after postprocessing. + + + + These elements comprise the internal math representation, being +the content of the \elementref{XMath} element. + + + + + + + + + + + + + + + + Outer container for all math. This holds the internal +\elementref{XMath} representation, as well as image data and other representations. + + + + + + Attributes for \elementref{Math}. + + + + + + display or inline mode. + + display + inline + + + + + + reconstruction of the \TeX\ that generated the math. + + + + + more semantic version of \attr{tex}. + + + + + a textified representation of the math. + + + + + Content model for \elementref{Math}. + + + + + + + + + The role that this item plays in the Grammar. + + + + + an open delimiter to enclose the object; + + + + + an close delimiter to enclose the object; + + + + + an open delimiter to enclose the argument list, +when this token is applied to arguments with \elementref{XMApp}. + + + + + a close delimiter to enclose the argument list, +when this token is applied to arguments with \elementref{XMApp}. + + + + + characters to separate arguments, +when this token is applied to arguments with \elementref{XMApp}. +Can be multiple characters for different argument positions; +the last character is repeated if there aren't enough. + + + + + trailing (presumably non-semantic) punctuation. + + + + + an annotation placed by the parser when it suspects this token may be used as a function. + + + + + + + Internal representation of mathematics. + + + + + + Attributes for \elementref{XMath}. + + + + Content model for \elementref{XMath}. + + + + + + + + General mathematical token. + + + + + + Attributes for \elementref{XMTok}. + + + + + + The name of the token, typically the control sequence that created it. + + + + + A more semantic name corresponding to the intended meaning, +such as the OpenMath name. + + + + + The OpenMath CD for which \attr{meaning} is a symbol. + + + + + Various random styling information. NOTE This needs to be made consistent. + + + + + The font, size a used for the symbol. + + + + + The size for the symbol, not presumed to be meaningful(?) + + + + + The color (CSS format) for the symbol, not presumed to be meaningful(?) + + + + + An encoding of the position of this token as a sub/superscript, used +to handle aligned and nested scripts, both pre and post. +It is a concatenation of (pre|mid|post), which indicates the horizontal +positioning of the script with relation to it's base, and a counter +indicating the level. These are used to position the scripts, +and to pair up aligned sub- and superscripts. +NOTE: Clarify where this appears: token, base, script operator, apply? + + + + + NOTE: How is this used? + + + + + Content model for \elementref{XMTok}. + + + + + + + + Generalized application of a function, operator, whatever (the first child) +to arguments (the remaining children). +The attributes are a subset of those for \elementref{XMTok}. + + + + + + Attributes for \elementref{XMApp}. + + + + + + The name of the token, typically the control sequence that created it. + + + + + A more semantic name corresponding to the intended meaning, +such as the OpenMath name. + + + + + An encoding of the position of this token as a sub/superscript, used +to handle aligned and nested scripts, both pre and post. +(See \elementref{XMTok} for details) + + + + + Content model for \elementref{XMApp}. + + + + + + + + Parallel markup of content (first child) and presentation (second child) +of a mathematical object. +Typically, the arguments are shared between the two branches: +they appear in the content branch, with \attr{id}'s, +and \elementref{XMRef} is used in the presentation branch + + + + + + Attributes for \elementref{XMDual}. + + + + + + Content model for \elementref{XMDual}. + + + + + + + Various spacing items, generally ignored in parsing. +The attributes are a subset of those for \elementref{XMTok}. + + + + + + Attributes for \elementref{XMHint}. + + + + + + + + + + + + + + + Content model for \elementref{XMHint}. + + + + + + Text appearing within math. + + + + + + Attributes for \elementref{XMText}. + + + + + + An encoding of the position of this token as a sub/superscript, used +to handle aligned and nested scripts, both pre and post. +(See \elementref{XMTok} for details) + + + + + Content model for \elementref{XMText}. + + + + + + + + + + + + Wrapper for a sequence of tokens used to assert the role of the +contents in its parent. This element generally disappears after parsing. +The attributes are a subset of those for \elementref{XMTok}. + + + + + + Attributes for \elementref{XMWrap}. + + + + + + + + + A more semantic name corresponding to the intended meaning, +such as the OpenMath name. + + + + + + + + An encoding of the position of this token as a sub/superscript, used +to handle aligned and nested scripts, both pre and post. +(See \elementref{XMTok} for details) + + + + + Content model for \elementref{XMWrap}. + + + + + + + + Wrapper for an argument to a structured macro. +It implies that its content can be parsed independently of its parent, +and thus generally disappears after parsing. + + + + + + Attributes for \elementref{XMArg}. + + + + + + + + + An encoding of the position of this token as a sub/superscript, used +to handle aligned and nested scripts, both pre and post. +(See \elementref{XMTok} for details) + + + + + Content model for \elementref{XMArg}. + + + + + + + + Structure sharing element typically used in the presentation +branch of an \elementref{XMDual} to refer to the arguments present in the content branch. + + + + + + Attributes for \elementref{XMRef}. + + + + + + + Content model for \elementref{XMRef}. + + + + + + + Math Array/Alignment structure. + + + + + + Attributes for \elementref{XMArray}. + + + + + + + + + + + + + + + + top + bottom + + + + + + + + + Content model for \elementref{XMArray}. + + + + + + + + A row in a math alignment. + + + + + + Attributes for \elementref{XMRow}. + + + + Content model for \elementref{XMRow}. + + + + + + + + A cell in a row of a math alignment. + + + + + + Attributes for \elementref{XMCell}. + + + + indicates how many columns this cell spans or covers. + + + + + + indicates how many rows this cell spans or covers. + + + + + + + specifies the alignment of the content. + + + + + specifies the desired width for the column. + + + + + records a sequence of t or tt, r or rr, b or bb and l or ll +for borders or doubled borders on any side of the cell. + + + + + whether this cell corresponds to a table head or foot. + + + + + + Content model for \elementref{XMCell}. + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-para.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-para.rnc new file mode 100644 index 00000000000..42c3c46f4be --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-para.rnc @@ -0,0 +1,193 @@ +# /=====================================================================\ +# | LaTeXML-para.rnc | +# | RelaxNG model for LaTeXML generated documents | +# |=====================================================================| +# | Part of LaTeXML: | +# | Public domain software, produced as part of work done by the | +# | United States Government & not subject to copyright in the US. | +# |=====================================================================| +# | Bruce Miller #_# | +# | http://dlmf.nist.gov/LaTeXML/ (o o) | +# \=========================================================ooo==U==ooo=/ + +default namespace = "http://dlmf.nist.gov/LaTeXML" + +## This module defines the following `logical' block elements. +Para.class &= para* + & theorem* & proof* + & figure* & table* & float* & listing* + +## Additionally, it defines these miscellaneous elements that can appear +## in both inline and block contexts. +Misc.class &= inline-para* + +#====================================================================== + +para = +## A Logical paragraph. It has an \attr{id}, but not a \attr{label}. +element para { para_attributes & para_model } + +## Attributes for \elementref{para}. +para_attributes = Common.attributes & ID.attributes + + +## Content model for \elementref{para}. +para_model = Block.model + +#====================================================================== + +inline-para = +## An inline para. Actually, can appear in inline or block mode, but +## typesets its contents as para. +element inline-para { inline-para_attributes & inline-para_model } + +## Attributes for \elementref{inline-para}. +inline-para_attributes = Common.attributes & Positionable.attributes + +## Content model for \elementref{inline-para}. +inline-para_model = Para.model + +#====================================================================== + +theorem = +## A theorem or similar object. The \attr{class} attribute can be used to distinguish +## different kinds of theorem. +element theorem { theorem_attributes & theorem_model } + +## Attributes for \elementref{theorem}. +theorem_attributes = Common.attributes & Labelled.attributes + +## Content model for \elementref{theorem}. +theorem_model = title? & Para.model + +#====================================================================== + +proof = +## A proof or similar object. The \attr{class} attribute can be used to distinguish +## different kinds of proof. +element proof { proof_attributes & proof_model } + +## Attributes for \elementref{proof}. +proof_attributes = Common.attributes & Labelled.attributes + +## Content model for \elementref{proof}. +proof_model = title? & Para.model + +#====================================================================== + +## These are the additional elements representing figure and +## table captions. +## NOTE: Could title sensibly be reused here, instead? +## Or, should caption be used for theorem and proof? +Caption.class = caption | toccaption + +#====================================================================== + +figure = +## A figure, possibly captioned. +element figure { figure_attributes & figure_model } + +## Attributes for \elementref{figure}. +figure_attributes = + Common.attributes & + Labelled.attributes & + Positionable.attributes & + + ## the vertical floating placement parameter that determines where the object is displayed. + attribute placement { text }? + +### MiKo: only allowing one caption, is this right? same for table, float, and listing below +## Content model for \elementref{figure}. +figure_model = figure* & Block.model & Caption.class + +#====================================================================== + +table = +## A Table, possibly captioned. This is not necessarily a \elementref{tabular}. +element table { table_attributes & table_model } + +## Attributes for \elementref{table}. +table_attributes = + Common.attributes & + Labelled.attributes & + Positionable.attributes & + + ## the vertical floating placement parameter that determines where the object is displayed. + attribute placement { text }? + +## Content model for \elementref{table}. +table_model = table* & Block.model & Caption.class + +#====================================================================== + +float = +## A generic float, possibly captioned, something other than a table, figure or listing +element float { float_attributes & float_model } + +## Attributes for \elementref{float}. +float_attributes = + Common.attributes & + Labelled.attributes & + Positionable.attributes & + + ## the vertical floating placement parameter that determines where the object is displayed. + attribute placement { text }? + +## Content model for \elementref{float}. +float_model = float* & Block.model & Caption.class + +#====================================================================== + +listing = +## A Listing, possibly captioned. +element listing { listing_attributes & listing_model } + +## Attributes for \elementref{listing}. +listing_attributes = + Common.attributes & + Labelled.attributes & + Positionable.attributes & + + ## the floating placement parameter that determines where the object is displayed. + attribute placement { text }? + +## Content model for \elementref{listing}. +listing_model = Block.model & Caption.class + +#====================================================================== + +caption = +## A caption for a \elementref{table} or \elementref{figure}. +element caption { caption_attributes & caption_model } + +## Attributes for \elementref{caption}. +caption_attributes = + Common.attributes & + attribute font { text }? & + + ## Indicates the text size to use. (See \elementref{text}) + attribute size { "Huge" | "huge" | "LARGE" | "Large" | "large" | "normal" + | "small" | "footnote" | "tiny" | text }? & + + ## the color to use; any CSS compatible color specification. + attribute color { text }? + + +## Content model for \elementref{caption}, +## basically Inline.model with tag included (normally, but not necessarily, tag would come first). +caption_model = tag* & text & Inline.class & Misc.class & Meta.class + +#====================================================================== + +toccaption = +## A short form of \elementref{table} or \elementref{figure} caption, +## used for lists of figures or similar. +element toccaption { toccaption_attributes & toccaption_model } + +## Attributes for \elementref{toccaption}. +toccaption_attributes = Common.attributes + +### MiKo: here we allowed multiple tags, but now we can restrict, do we want that? +## Content model for \elementref{toccaption}. +toccaption_model = text & Inline.class & Misc.class & Meta.class & tag* +#====================================================================== diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-para.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-para.rng new file mode 100644 index 00000000000..a5cd7320bac --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-para.rng @@ -0,0 +1,312 @@ + + + + + This module defines the following `logical' block elements. + + + + + + + + + + + + Additionally, it defines these miscellaneous elements that can appear +in both inline and block contexts. + + + + + + A Logical paragraph. It has an \attr{id}, but not a \attr{label}. + + + + + + Attributes for \elementref{para}. + + + + + Content model for \elementref{para}. + + + + + + An inline para. Actually, can appear in inline or block mode, but +typesets its contents as para. + + + + + + Attributes for \elementref{inline-para}. + + + + + Content model for \elementref{inline-para}. + + + + + + A theorem or similar object. The \attr{class} attribute can be used to distinguish +different kinds of theorem. + + + + + + Attributes for \elementref{theorem}. + + + + + Content model for \elementref{theorem}. + + + + + + + + + A proof or similar object. The \attr{class} attribute can be used to distinguish +different kinds of proof. + + + + + + Attributes for \elementref{proof}. + + + + + Content model for \elementref{proof}. + + + + + + + + These are the additional elements representing figure and +table captions. +NOTE: Could title sensibly be reused here, instead? +Or, should caption be used for theorem and proof? + + + + + + + + + A figure, possibly captioned. + + + + + + Attributes for \elementref{figure}. + + + + + + the vertical floating placement parameter that determines where the object is displayed. + + + + + Content model for \elementref{figure}. + + + + + + + + + + + + A Table, possibly captioned. This is not necessarily a \elementref{tabular}. + + + + + + Attributes for \elementref{table}. + + + + + + the vertical floating placement parameter that determines where the object is displayed. + + + + + Content model for \elementref{table}. + + + + + + + + + + + + A generic float, possibly captioned, something other than a table, figure or listing + + + + + + Attributes for \elementref{float}. + + + + + + the vertical floating placement parameter that determines where the object is displayed. + + + + + Content model for \elementref{float}. + + + + + + + + + + + + A Listing, possibly captioned. + + + + + + Attributes for \elementref{listing}. + + + + + + the floating placement parameter that determines where the object is displayed. + + + + + Content model for \elementref{listing}. + + + + + + + + + + + A caption for a \elementref{table} or \elementref{figure}. + + + + + + Attributes for \elementref{caption}. + + + + + + + Indicates the text size to use. (See \elementref{text}) + + Huge + huge + LARGE + Large + large + normal + small + footnote + tiny + + + + + + + the color to use; any CSS compatible color specification. + + + + + Content model for \elementref{caption}, +basically Inline.model with tag included (normally, but not necessarily, tag would come first). + + + + + + + + + + + + + + A short form of \elementref{table} or \elementref{figure} caption, +used for lists of figures or similar. + + + + + + Attributes for \elementref{toccaption}. + + + + Content model for \elementref{toccaption}. + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-picture.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-picture.rnc new file mode 100644 index 00000000000..dcf8bf8cf15 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-picture.rnc @@ -0,0 +1,285 @@ +# /=====================================================================\ +# | LaTeXML-picture.rnc | +# | RelaxNG model for LaTeXML generated documents | +# |=====================================================================| +# | Part of LaTeXML: | +# | Public domain software, produced as part of work done by the | +# | United States Government & not subject to copyright in the US. | +# |=====================================================================| +# | Bruce Miller #_# | +# | http://dlmf.nist.gov/LaTeXML/ (o o) | +# \=========================================================ooo==U==ooo=/ + +# ====================================================================== +# Picture; Experimental, possibly should evolve to SVG? +# ====================================================================== + +default namespace = "http://dlmf.nist.gov/LaTeXML" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + +## This module defines a picture environment, roughly a subset of SVG. +## NOTE: Consider whether it is sensible to drop this and incorporate SVG itself. +Misc.class &= picture* + +#====================================================================== + +Picture.class = + g* & rect* & line* & circle* & path* + & arc* & wedge* & ellipse* & polygon* & bezier* + & parabola* & curve* & dots* & grid* & clip* + +## These attributes correspond roughly to SVG, but need documentation. +Picture.attributes = + attribute x { text }? & + attribute y { text }? & + attribute r { text }? & + attribute rx { text }? & + attribute ry { text }? & + attribute width { text }? & + attribute height { text }? & + attribute fill { text }? & + attribute stroke { text }? & + attribute stroke-width { text }? & + attribute stroke-dasharray { text }? & + attribute transform { text }? & + attribute terminators { text }? & + attribute arrowlength { text }? & + attribute points { text }? & + attribute showpoints { text }? & + attribute displayedpoints { text }? & + attribute arc { text }? & + attribute angle1 { text }? & + attribute angle2 { text }? & + attribute arcsepA { text }? & + attribute arcsepB { text }? & + attribute curvature { text }? + +## These attributes correspond roughly to SVG, but need documentation. +PictureGroup.attributes = + attribute pos { text }? & + attribute framed {xsd:boolean}? & + [ a:defaultValue = "rect" ] + attribute frametype { "rect" | "circle" | "oval" }? & + attribute fillframe {xsd:boolean }? & + attribute boxsep { text }? & + attribute shadowbox {xsd:boolean}? & + attribute doubleline {xsd:boolean}? + +#====================================================================== + +picture = +## A picture environment. +element picture { picture_attributes & picture_model } + +## Attributes for \elementref{picture}. +picture_attributes = + Common.attributes & + ID.attributes & + Picture.attributes & + Imageable.attributes & + attribute clip {xsd:boolean}? & + attribute baseline { text }? & + attribute unitlength { text }? & + attribute xunitlength { text }? & + attribute yunitlength { text }? & + attribute tex { text }? & + attribute content-tex { text }? + +## Content model for \elementref{picture}. +picture_model = Picture.class & Inline.class & Misc.class & Meta.class + +#====================================================================== + +g = +## A graphical grouping; the content is inherits by the transformations, +## positioning and other properties. +element g { g_attributes & g_model } + +## Attributes for \elementref{g}. +g_attributes = Common.attributes & Picture.attributes & PictureGroup.attributes + +## Content model for \elementref{g}. +g_model = Picture.class & Inline.class & Misc.class & Meta.class + +#====================================================================== + +rect = +## A rectangle within a \elementref{picture}. +element rect { rect_attributes & rect_model } + +## Attributes for \elementref{rect}. +rect_attributes = Common.attributes & Picture.attributes + +## Content model for \elementref{rect}. +rect_model = empty + +#====================================================================== + +line = +## A line within a \elementref{picture}. +element line { line_attributes & line_model } + +## Attributes for \elementref{line}. +line_attributes = Common.attributes & Picture.attributes + +## Content model for \elementref{line}. +line_model = empty + +#====================================================================== + +polygon = +## A polygon within a \elementref{picture}. +element polygon { polygon_attributes & polygon_model } + +## Attributes for \elementref{polygon}. +polygon_attributes = Common.attributes & Picture.attributes + +## Content model for \elementref{polygon}. +polygon_model = empty + +#====================================================================== + +wedge = +## A wedge within a \elementref{picture}. +element wedge { wedge_attributes & wedge_model } + +## Attributes for \elementref{wedge}. +wedge_attributes = Common.attributes & Picture.attributes + +## Content model for \elementref{wedge}. +wedge_model = empty + +#====================================================================== + +arc = +## An arc within a \elementref{picture}. +element arc { arc_attributes & arc_model } + +## Attributes for \elementref{arc}. +arc_attributes = Common.attributes & Picture.attributes + +## Content model for \elementref{arc}. +arc_model = empty + +#====================================================================== + +circle = +## A circle within a \elementref{picture}. +element circle { circle_attributes & circle_model } + +## Attributes for \elementref{circle}. +circle_attributes = Common.attributes & Picture.attributes + +## Content model for \elementref{circle}. +circle_model = empty + +#====================================================================== + +ellipse = +## An ellipse within a \elementref{picture}. +element ellipse { ellipse_attributes & ellipse_model } + +## Attributes for \elementref{ellipse}. +ellipse_attributes = Common.attributes & Picture.attributes + +## Content model for \elementref{ellipse}. +ellipse_model = empty + +#====================================================================== + +path = +## A path within a \elementref{picture}. +element path { path_attributes & path_model } + +## Attributes for \elementref{path}. +path_attributes = Common.attributes & Picture.attributes + +## Content model for \elementref{path}. +path_model = empty + +#====================================================================== + +bezier = +## A bezier curve within a \elementref{picture}. +element bezier { bezier_attributes & bezier_model } + +## Attributes for \elementref{bezier}. +bezier_attributes = Common.attributes & Picture.attributes + +## Content model for \elementref{bezier}. +bezier_model = empty + +#====================================================================== + +curve = +## A curve within a \elementref{picture}. +element curve { curve_attributes & curve_model } + +## Attributes for \elementref{curve}. +curve_attributes = Common.attributes & Picture.attributes + +## Content model for \elementref{curve}. +curve_model = empty + +#====================================================================== + +parabola = +## A parabola curve within a \elementref{picture}. +element parabola { parabola_attributes & parabola_model } + +## Attributes for \elementref{parabola}. +parabola_attributes = Common.attributes & Picture.attributes + +## Content model for \elementref{parabola}. +parabola_model = empty + +#====================================================================== + +dots = +## A sequence of dots (?) within a \elementref{picture}. +element dots { dots_attributes & dots_model } + +## Attributes for \elementref{dots}. +dots_attributes = Common.attributes & Picture.attributes + +## Content model for \elementref{dots}. +dots_model = empty + +#====================================================================== + +grid = +## A grid within a \elementref{picture}. +element grid { grid_attributes & grid_model } + +## Attributes for \elementref{grid}. +grid_attributes = Common.attributes & Picture.attributes + +## Content model for \elementref{grid}. +grid_model = empty + +#====================================================================== + +clip = +## Establishes a clipping region within a \elementref{picture}. +element clip { clip_attributes & clip_model } + +## Attributes for \elementref{clip}. +clip_attributes = Common.attributes & Picture.attributes + + +## Content model for \elementref{clip}. +clip_model = clippath* + +#====================================================================== + +clippath = +## Establishes a clipping region within a \elementref{picture}. +element clippath { clippath_attributes & clippath_model } + +## Attributes for \elementref{clippath}. +clippath_attributes = Common.attributes & Picture.attributes + +## Content model for \elementref{clippath}. +clippath_model = Picture.class & Inline.class & Misc.class & Meta.class + +#====================================================================== diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-picture.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-picture.rng new file mode 100644 index 00000000000..890d006110a --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-picture.rng @@ -0,0 +1,496 @@ + + + + + + This module defines a picture environment, roughly a subset of SVG. +NOTE: Consider whether it is sensible to drop this and incorporate SVG itself. + + + + + + + + + + + + + + + + + + + + + + + + These attributes correspond roughly to SVG, but need documentation. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + These attributes correspond roughly to SVG, but need documentation. + + + + + + + + + + + + rect + circle + oval + + + + + + + + + + + + + + + + + + + + + + + + + + A picture environment. + + + + + + Attributes for \elementref{picture}. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Content model for \elementref{picture}. + + + + + + + + + + + + + A graphical grouping; the content is inherits by the transformations, +positioning and other properties. + + + + + + Attributes for \elementref{g}. + + + + + + Content model for \elementref{g}. + + + + + + + + + + + + + A rectangle within a \elementref{picture}. + + + + + + Attributes for \elementref{rect}. + + + + + Content model for \elementref{rect}. + + + + + + A line within a \elementref{picture}. + + + + + + Attributes for \elementref{line}. + + + + + Content model for \elementref{line}. + + + + + + A polygon within a \elementref{picture}. + + + + + + Attributes for \elementref{polygon}. + + + + + Content model for \elementref{polygon}. + + + + + + A wedge within a \elementref{picture}. + + + + + + Attributes for \elementref{wedge}. + + + + + Content model for \elementref{wedge}. + + + + + + An arc within a \elementref{picture}. + + + + + + Attributes for \elementref{arc}. + + + + + Content model for \elementref{arc}. + + + + + + A circle within a \elementref{picture}. + + + + + + Attributes for \elementref{circle}. + + + + + Content model for \elementref{circle}. + + + + + + An ellipse within a \elementref{picture}. + + + + + + Attributes for \elementref{ellipse}. + + + + + Content model for \elementref{ellipse}. + + + + + + A path within a \elementref{picture}. + + + + + + Attributes for \elementref{path}. + + + + + Content model for \elementref{path}. + + + + + + A bezier curve within a \elementref{picture}. + + + + + + Attributes for \elementref{bezier}. + + + + + Content model for \elementref{bezier}. + + + + + + A curve within a \elementref{picture}. + + + + + + Attributes for \elementref{curve}. + + + + + Content model for \elementref{curve}. + + + + + + A parabola curve within a \elementref{picture}. + + + + + + Attributes for \elementref{parabola}. + + + + + Content model for \elementref{parabola}. + + + + + + A sequence of dots (?) within a \elementref{picture}. + + + + + + Attributes for \elementref{dots}. + + + + + Content model for \elementref{dots}. + + + + + + A grid within a \elementref{picture}. + + + + + + Attributes for \elementref{grid}. + + + + + Content model for \elementref{grid}. + + + + + + Establishes a clipping region within a \elementref{picture}. + + + + + + Attributes for \elementref{clip}. + + + + + Content model for \elementref{clip}. + + + + + + + + Establishes a clipping region within a \elementref{picture}. + + + + + + Attributes for \elementref{clippath}. + + + + + Content model for \elementref{clippath}. + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-structure.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-structure.rnc new file mode 100644 index 00000000000..78e42ac8b73 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-structure.rnc @@ -0,0 +1,513 @@ +# /=====================================================================\ +# | LaTeXML-structure.rnc | +# | RelaxNG model for LaTeXML generated documents | +# |=====================================================================| +# | Part of LaTeXML: | +# | Public domain software, produced as part of work done by the | +# | United States Government & not subject to copyright in the US. | +# |=====================================================================| +# | Bruce Miller #_# | +# | http://dlmf.nist.gov/LaTeXML/ (o o) | +# \=========================================================ooo==U==ooo=/ + +default namespace = "http://dlmf.nist.gov/LaTeXML" + +#====================================================================== + +document = +## The document root. +element document { document_attributes & document_model } + + +## The content allowable as the main body of the document. +document.body.class = Para.model & paragraph* & subsubsection* & subsection* & section* & chapter* & part* + +## Attributes for \elementref{document}. +document_attributes = Sectional.attributes + + +## Content model for \elementref{document}. +document_model = +# (FrontMatter.class & SectionalFrontMatter.class & Meta.class & titlepage*), +# document.body.class, + BackMatter.class + +#====================================================================== + +part = +## A part within a document. +element part { part_attributes & part_model } + +## The content allowable as the main body of a part. +part.body.class = Para.model & chapter* + +## Attributes for \elementref{part}. +part_attributes = Sectional.attributes + +## Content model for \elementref{part}. +part_model = SectionalFrontMatter.class, part.body.class + +#---------------------------------------------------------------------- + +chapter = +## A Chapter within a document. +element chapter { chapter_attributes & chapter_model } + +## The content allowable as the main body of a chapter. +chapter.body.class = Para.model & subparagraph* & paragraph* & subsubsection* & subsection* & section* + +## Attributes for \elementref{chapter}. +chapter_attributes = Sectional.attributes + +## Content model for \elementref{chapter}. +chapter_model = SectionalFrontMatter.class, chapter.body.class + +#---------------------------------------------------------------------- + +section = +## A Section within a document. +element section { section_attributes & section_model } + +## The content allowable as the main body of a section. +section.body.class = Para.model & subparagraph* & paragraph* & subsubsection* & subsection* + +## Attributes for \elementref{section}. +section_attributes = Sectional.attributes + +## Content model for \elementref{section}. +section_model = SectionalFrontMatter.class, section.body.class + +#---------------------------------------------------------------------- + +subsection = +## A Subsection within a document. +element subsection { subsection_attributes & subsection_model } + +## The content allowable as the main body of a chapter. +subsection.body.class = Para.model & subparagraph* & paragraph* & subsubsection* + +## Attributes for \elementref{subsection}. +subsection_attributes = Sectional.attributes + +## Content model for \elementref{subsection}. +subsection_model = SectionalFrontMatter.class, subsection.body.class + +#---------------------------------------------------------------------- + +subsubsection = +## A Subsubsection within a document. +element subsubsection { subsubsection_attributes & subsubsection_model } + +## The content allowable as the main body of a chapter. +subsubsection.body.class = Para.model & subparagraph* & paragraph* + +## Attributes for \elementref{subsubsection}. +subsubsection_attributes = Sectional.attributes + +## Content model for \elementref{subsubsection}. +subsubsection_model = SectionalFrontMatter.class, subsubsection.body.class + +#---------------------------------------------------------------------- + +paragraph = +## A Paragraph within a document. This corresponds to a `formal' marked, possibly labelled +## LaTeX Paragraph, in distinction from an unlabelled logical paragraph. +element paragraph { paragraph_attributes & paragraph_model } + +## The content allowable as the main body of a chapter. +paragraph.body.class = Para.model & subparagraph* + +## Attributes for \elementref{paragraph}. +paragraph_attributes = Sectional.attributes + +## Content model for \elementref{paragraph}. +paragraph_model = SectionalFrontMatter.class, paragraph.body.class + + +#---------------------------------------------------------------------- + +subparagraph = +## A Subparagraph within a document. +element subparagraph { subparagraph_attributes & subparagraph_model } + +## The content allowable as the main body of a chapter. +subparagraph.body.class = Para.model + +## Attributes for \elementref{subparagraph}. +subparagraph_attributes = Sectional.attributes + +## Content model for \elementref{subparagraph}. +subparagraph_model = SectionalFrontMatter.class, subparagraph.body.class + +#====================================================================== + +appendix = +## An Appendix within a document. +element appendix { appendix_attributes & appendix_model } + +## The content allowable as the main body of a chapter. +appendix.body.class = Para.model & subparagraph* & paragraph* & subsubsection* & subsection* & section* + +## Attributes for \elementref{appendix}. +appendix_attributes = Sectional.attributes + +## Content model for \elementref{appendix}. +appendix_model = SectionalFrontMatter.class, appendix.body.class + +#====================================================================== + +bibliography = +## A Bibliography within a document. +element bibliography { bibliography_attributes & bibliography_model } + +## The content allowable as the main body of a chapter. +bibliography.body.class = Para.model & biblist + +## Attributes for \elementref{bibliography}. +bibliography_attributes = + Sectional.attributes & + + ## the list of bib files used to create the bibliograph. + attribute files { text }? + +## Content model for \elementref{bibliography}. +bibliography_model = FrontMatter.class, SectionalFrontMatter.class, bibliography.body.class + +#====================================================================== + +index = +## An Index within a document. +element index { index_attributes & index_model } + +## The content allowable as the main body of a chapter. +index.body.class = Para.model & indexlist* + +## Attributes for \elementref{index}. +index_attributes = Sectional.attributes + +## Content model for \elementref{index}. +index_model = SectionalFrontMatter.class, index.body.class + +#---------------------------------------------------------------------- + +indexlist = +## A heirarchical index generated. Typically generated during postprocessing +## from the collection of \elementref{indexmark} in the document +## (or document collection). +element indexlist { indexlist_attributes & indexlist_model } + +## Attributes for \elementref{indexlist}. +indexlist_attributes = Common.attributes & ID.attributes + +## Content model for \elementref{indexlist}. +indexlist_model = indexentry* + +#---------------------------------------------------------------------- + +indexentry = +## An entry in an \elementref{indexlist} consisting of a phrase, references to +## points in the document where the phrase was found, and possibly +## a nested \elementref{indexlist} represented index levels below this one. +element indexentry { indexentry_attributes & indexentry_model } + +## Attributes for \elementref{indexentry}. +indexentry_attributes = Common.attributes & ID.attributes + +## Content model for \elementref{indexentry}. +indexentry_model = indexphrase, indexrefs? , indexlist? + +#---------------------------------------------------------------------- + +indexrefs = +## A container for the references (\elementref{ref}) to where an \elementref{indexphrase} was +## encountered in the document. The model is Inline to allow +## arbitrary text, in addition to the expected \elementref{ref}'s. +element indexrefs { indexrefs_attributes & indexrefs_model } + +## Attributes for \elementref{indexrefs}. +indexrefs_attributes = Common.attributes + +## Content model for \elementref{indexrefs}. +indexrefs_model = Inline.model + +#====================================================================== + +title = +## The title of a document, section or similar document structure container. +element title { title_attributes & title_model } + +## Attributes for \elementref{title}. +title_attributes = + Common.attributes & + + ## The font prefered for the title. + attribute font { text }? & + + ## Indicates the text size to use. (See \elementref{text}) + attribute size { "Huge" | "huge" | "LARGE" | "Large" | "large" | "normal" + | "small" | "footnote" | "tiny" | text }? & + + ## the color to use; any CSS compatible color specification. + attribute color { text }? + +## Content model for \elementref{title}, +## basically Inline.model with tag included (normally, but not necessarily, tag would come first). +title_model = tag* & text & Inline.class & Misc.class & Meta.class + +#---------------------------------------------------------------------- + +toctitle = +## The short form of a title, for use in tables of contents or similar. +element toctitle { toctitle_attributes & toctitle_model } + +## Attributes for \elementref{toctitle}. +toctitle_attributes = Common.attributes + +## Content model for \elementref{toctitle}. +toctitle_model = text & Inline.class & Misc.class & Meta.class & tag* + +#---------------------------------------------------------------------- + +subtitle = +## A subtitle, or secondary title. +element subtitle { subtitle_attributes & subtitle_model } + +## Attributes for \elementref{subtitle}. +subtitle_attributes = Common.attributes + +## Content model for \elementref{subtitle}. +subtitle_model = Inline.model + +#====================================================================== + +creator = +## Generalized document creator. +element creator { creator_attributes & creator_model } + +## The content allowed in authors, editors, etc. +Person.class = personname* & contact* + +## Attributes for \elementref{creator}. +creator_attributes = + Common.attributes & FrontMatter.attributes & + + ## indicates the role of the person in creating the docment. + ## Commonly useful values are specified, but is open-ended to support extension. + attribute role { "author" | "editor" | "translator" | "contributor" | "translator" | text }? + +## Content model for \elementref{creator}. +creator_model = Person.class & Misc.class + +#---------------------------------------------------------------------- +# NOTE: This should be aligned with Bibname. + +personname = +## A person's name. +element personname { personname_attributes & personname_model } + +## Attributes for \elementref{personname}. +personname_attributes = Common.attributes + +## Content model for \elementref{personname}. +personname_model = Inline.model + +#---------------------------------------------------------------------- + +contact = +## Generalized contact information for a document creator. +## Note that this element can be repeated to give different types +## of contact information (using \attr{role}) for the same creator. +element contact { contact_attributes & contact_model } + +## Attributes for \elementref{contact}. +contact_attributes = + Common.attributes & FrontMatter.attributes & + + ## indicates the type of contact information contained. + ## Commonly useful values are specified, but is open-ended to support extension. + attribute role { "affiliation" | "address" | "current_address" | "email" | "url" + | "thanks" | "dedicatory" | text }? + +## Content model for \elementref{contact}. +contact_model = Inline.model + +#====================================================================== + +date = +## Generalized document date. +## Note that this element can be repeated to give the dates +## of different events (using \attr{role}) for the same document. +element date { date_attributes & date_model } + +## Attributes for \elementref{date}. +date_attributes = + Common.attributes & FrontMatter.attributes & + + ## indicates the relevance of the date to the document. + ## Commonly useful values are specified, but is open-ended to support extension. + attribute role { "creation" | "conversion" | "posted" | "received" + | "revised" | "accepted" | text }? + +## Content model for \elementref{date}. +date_model = Inline.model + +#====================================================================== + +abstract = +## A document abstract. +element abstract { abstract_attributes & abstract_model } + +## Attributes for \elementref{abstract}. +abstract_attributes = Common.attributes & FrontMatter.attributes + +## Content model for \elementref{abstract}. +abstract_model = Block.model + +#====================================================================== + +acknowledgements = +## Acknowledgements for the document. +element acknowledgements { acknowledgements_attributes & acknowledgements_model } + +## Attributes for \elementref{acknowledgements}. +acknowledgements_attributes = Common.attributes & FrontMatter.attributes + +## Content model for \elementref{acknowledgements}. +acknowledgements_model = Inline.model + +#====================================================================== + +keywords = +## Keywords for the document. The content is freeform. +element keywords { keywords_attributes & keywords_model } + +## Attributes for \elementref{keywords}. +keywords_attributes = Common.attributes & FrontMatter.attributes + +## Content model for \elementref{keywords}. +keywords_model = Inline.model + +#====================================================================== + +classification = +## A classification of the document. +element classification { classification_attributes & classification_model } + +## Attributes for \elementref{classification}. +classification_attributes = Common.attributes & FrontMatter.attributes & + + ## indicates what classification scheme was used. + attribute scheme { text }? + +## Content model for \elementref{classification}. +classification_model = Inline.model + +#====================================================================== +# Fallback + +titlepage = +## block of random stuff marked as a titlepage +element titlepage { titlepage_attributes & titlepage_model } + +## Attributes for \elementref{titlepage}. +titlepage_attributes = Sectional.attributes + +## Content model for \elementref{titlepage}. +titlepage_model = FrontMatter.class & SectionalFrontMatter.class & Block.class + +#====================================================================== +# TOC & Navigation; generally added by postprocessing + +TOC = +## (Generalized) Table Of Contents, represents table of contents +## as well as list of figures, tables, and other such things. +## This will generally be placed by a \cs{tableofcontents} command +## and filled in by postprocessing. +element TOC { TOC_attributes & TOC_model } + +## Attributes for \elementref{TOC}. +TOC_attributes = + Common.attributes & + FrontMatter.attributes & + + ## indicates the kind of list + attribute role { ("contents" | "figures" | "tables" | text) }? & + + ## indicates what kind of document elements to list, in the form of + ## one or more tags such as \texttt{ltx:chapter} separated by \texttt{|} + ## (suggestive of an xpath expression). + attribute select { text }? & + + ## indicates how to format the listing + attribute format { ("normal" | "short" | "veryshort" | text) }? + +## Content model for \elementref{TOC}. +TOC_model = toclist? + +toclist = +## The actual table of contents list, filled in. +element toclist {toclist_attributes & toclist_model } + +## Attributes for \elementref{toclist}. +toclist_attributes = Common.attributes + +## Content model for \elementref{toclist}. +toclist_model = tocentry* + +tocentry = +## An entry in a \elementref{toclist}. +element tocentry { tocentry_attributes & tocentry_model } + +## Attributes for \elementref{tocentry}. +tocentry_attributes = Common.attributes + +## Content model for \elementref{tocentry}. +tocentry_model = ref* & toclist* + + +navigation = +## Records navigation cross-referencing information, links from the +## current page or document to related ones, up, down, previous, next, +## and so forth; these relations are recorded in the \attr{class} attribute +## of the \elementref{ref}. +## +## \emph{Really?}; overload the class attribute!? +## This should be \attr{role}! +## Could also use a navigation name text or something? +element navigation { navigation_attributes & navigation_model } + +## Attributes for \elementref{navigation}. +navigation_attributes = Common.attributes + +## Content model for \elementref{navigation}. +navigation_model = ref* & TOC* + +#====================================================================== + +## Attributes shared by all sectional elements +Sectional.attributes = + Common.attributes & + Labelled.attributes + +## Attributes for other elements that can be used in frontmatter. +FrontMatter.attributes = + ## Records the name of the type of object this is to be used when composing the + ## presentation. The value of this attribute is often set by language localization packages. + attribute name { text }? + +## The content allowed for the front matter of each sectional unit, +## and the document. +SectionalFrontMatter.class = title* & toctitle* & creator* + +## The content allowed (in addition to \patternref{SectionalFrontMatter.class}) +## for the front matter of a document. +FrontMatter.class = subtitle* & date* & abstract* & acknowledgements* & keywords* & classification + +## The content allowed a the end of a document. +## Note that this includes random trailing Block and Para material, +## to support articles with figures and similar data appearing `at end'. +BackMatter.class = bibliography* & appendix* & index* & acknowledgements* & Para.class & Meta.class + +Para.class &= TOC* & navigation* + +#====================================================================== diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-structure.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-structure.rng new file mode 100644 index 00000000000..edbb1a9322b --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-structure.rng @@ -0,0 +1,916 @@ + + + + + + + The document root. + + + + + + The content allowable as the main body of the document. + + + + + + + + + + + + Attributes for \elementref{document}. + + + + Content model for \elementref{document}. + + + + + + + + + + + + + + + + + + + A part within a document. + + + + + + The content allowable as the main body of a part. + + + + + + + Attributes for \elementref{part}. + + + + Content model for \elementref{part}. + + + + + + + + + + + A Chapter within a document. + + + + + + The content allowable as the main body of a chapter. + + + + + + + + + + + Attributes for \elementref{chapter}. + + + + Content model for \elementref{chapter}. + + + + + + + + + + + A Section within a document. + + + + + + The content allowable as the main body of a section. + + + + + + + + + + Attributes for \elementref{section}. + + + + Content model for \elementref{section}. + + + + + + + + + + + A Subsection within a document. + + + + + + The content allowable as the main body of a chapter. + + + + + + + + + Attributes for \elementref{subsection}. + + + + Content model for \elementref{subsection}. + + + + + + + + + + + A Subsubsection within a document. + + + + + + The content allowable as the main body of a chapter. + + + + + + + + Attributes for \elementref{subsubsection}. + + + + Content model for \elementref{subsubsection}. + + + + + + + + + + + A Paragraph within a document. This corresponds to a `formal' marked, possibly labelled +LaTeX Paragraph, in distinction from an unlabelled logical paragraph. + + + + + + The content allowable as the main body of a chapter. + + + + + + + Attributes for \elementref{paragraph}. + + + + Content model for \elementref{paragraph}. + + + + + + + + + + + A Subparagraph within a document. + + + + + + The content allowable as the main body of a chapter. + + + + Attributes for \elementref{subparagraph}. + + + + Content model for \elementref{subparagraph}. + + + + + + + + + + + An Appendix within a document. + + + + + + The content allowable as the main body of a chapter. + + + + + + + + + + + Attributes for \elementref{appendix}. + + + + Content model for \elementref{appendix}. + + + + + + + + + + + A Bibliography within a document. + + + + + + The content allowable as the main body of a chapter. + + + + + + + Attributes for \elementref{bibliography}. + + + + the list of bib files used to create the bibliograph. + + + + + Content model for \elementref{bibliography}. + + + + + + + + + + + + + + An Index within a document. + + + + + + The content allowable as the main body of a chapter. + + + + + + + Attributes for \elementref{index}. + + + + Content model for \elementref{index}. + + + + + + + + + + + A heirarchical index generated. Typically generated during postprocessing +from the collection of \elementref{indexmark} in the document +(or document collection). + + + + + + Attributes for \elementref{indexlist}. + + + + + Content model for \elementref{indexlist}. + + + + + + + + An entry in an \elementref{indexlist} consisting of a phrase, references to +points in the document where the phrase was found, and possibly +a nested \elementref{indexlist} represented index levels below this one. + + + + + + Attributes for \elementref{indexentry}. + + + + + Content model for \elementref{indexentry}. + + + + + + + + + + + + A container for the references (\elementref{ref}) to where an \elementref{indexphrase} was +encountered in the document. The model is Inline to allow +arbitrary text, in addition to the expected \elementref{ref}'s. + + + + + + Attributes for \elementref{indexrefs}. + + + + Content model for \elementref{indexrefs}. + + + + + + The title of a document, section or similar document structure container. + + + + + + Attributes for \elementref{title}. + + + + The font prefered for the title. + + + + + Indicates the text size to use. (See \elementref{text}) + + Huge + huge + LARGE + Large + large + normal + small + footnote + tiny + + + + + + + the color to use; any CSS compatible color specification. + + + + + Content model for \elementref{title}, +basically Inline.model with tag included (normally, but not necessarily, tag would come first). + + + + + + + + + + + + + + The short form of a title, for use in tables of contents or similar. + + + + + + Attributes for \elementref{toctitle}. + + + + Content model for \elementref{toctitle}. + + + + + + + + + + + + + + A subtitle, or secondary title. + + + + + + Attributes for \elementref{subtitle}. + + + + Content model for \elementref{subtitle}. + + + + + + Generalized document creator. + + + + + + The content allowed in authors, editors, etc. + + + + + + + Attributes for \elementref{creator}. + + + + + indicates the role of the person in creating the docment. +Commonly useful values are specified, but is open-ended to support extension. + + author + editor + translator + contributor + translator + + + + + + + Content model for \elementref{creator}. + + + + + + + + + + + A person's name. + + + + + + Attributes for \elementref{personname}. + + + + Content model for \elementref{personname}. + + + + + + Generalized contact information for a document creator. +Note that this element can be repeated to give different types +of contact information (using \attr{role}) for the same creator. + + + + + + Attributes for \elementref{contact}. + + + + + indicates the type of contact information contained. +Commonly useful values are specified, but is open-ended to support extension. + + affiliation + address + current_address + email + url + thanks + dedicatory + + + + + + + Content model for \elementref{contact}. + + + + + + Generalized document date. +Note that this element can be repeated to give the dates +of different events (using \attr{role}) for the same document. + + + + + + Attributes for \elementref{date}. + + + + + indicates the relevance of the date to the document. +Commonly useful values are specified, but is open-ended to support extension. + + creation + conversion + posted + received + revised + accepted + + + + + + + Content model for \elementref{date}. + + + + + + A document abstract. + + + + + + Attributes for \elementref{abstract}. + + + + + Content model for \elementref{abstract}. + + + + + + Acknowledgements for the document. + + + + + + Attributes for \elementref{acknowledgements}. + + + + + Content model for \elementref{acknowledgements}. + + + + + + Keywords for the document. The content is freeform. + + + + + + Attributes for \elementref{keywords}. + + + + + Content model for \elementref{keywords}. + + + + + + A classification of the document. + + + + + + Attributes for \elementref{classification}. + + + + + indicates what classification scheme was used. + + + + + Content model for \elementref{classification}. + + + + + + block of random stuff marked as a titlepage + + + + + + Attributes for \elementref{titlepage}. + + + + Content model for \elementref{titlepage}. + + + + + + + + + + + + (Generalized) Table Of Contents, represents table of contents +as well as list of figures, tables, and other such things. +This will generally be placed by a \cs{tableofcontents} command +and filled in by postprocessing. + + + + + + Attributes for \elementref{TOC}. + + + + + indicates the kind of list + + contents + figures + tables + + + + + + + indicates what kind of document elements to list, in the form of +one or more tags such as \texttt{ltx:chapter} separated by \texttt{|} +(suggestive of an xpath expression). + + + + + indicates how to format the listing + + normal + short + veryshort + + + + + + + Content model for \elementref{TOC}. + + + + + + + The actual table of contents list, filled in. + + + + + + Attributes for \elementref{toclist}. + + + + Content model for \elementref{toclist}. + + + + + + + An entry in a \elementref{toclist}. + + + + + + Attributes for \elementref{tocentry}. + + + + Content model for \elementref{tocentry}. + + + + + + + + + + Records navigation cross-referencing information, links from the +current page or document to related ones, up, down, previous, next, +and so forth; these relations are recorded in the \attr{class} attribute +of the \elementref{ref}. + +\emph{Really?}; overload the class attribute!? +This should be \attr{role}! +Could also use a navigation name text or something? + + + + + + Attributes for \elementref{navigation}. + + + + Content model for \elementref{navigation}. + + + + + + + + + + Attributes shared by all sectional elements + + + + + Attributes for other elements that can be used in frontmatter. + + + Records the name of the type of object this is to be used when composing the +presentation. The value of this attribute is often set by language localization packages. + + + + + The content allowed for the front matter of each sectional unit, +and the document. + + + + + + + + The content allowed (in addition to \patternref{SectionalFrontMatter.class}) +for the front matter of a document. + + + + + + + + + + + The content allowed a the end of a document. +Note that this includes random trailing Block and Para material, +to support articles with figures and similar data appearing `at end'. + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-tabular.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-tabular.rnc new file mode 100644 index 00000000000..4ff4bc3feab --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-tabular.rnc @@ -0,0 +1,124 @@ +# /=====================================================================\ +# | LaTeXML-tabular.rnc | +# | RelaxNG model for LaTeXML generated documents | +# |=====================================================================| +# | Part of LaTeXML: | +# | Public domain software, produced as part of work done by the | +# | United States Government & not subject to copyright in the US. | +# |=====================================================================| +# | Bruce Miller #_# | +# | http://dlmf.nist.gov/LaTeXML/ (o o) | +# \=========================================================ooo==U==ooo=/ + +default namespace = "http://dlmf.nist.gov/LaTeXML" + +## This module defines the basic tabular, or alignment, structure. +## It is roughly parallel to the HTML model. +Misc.class &= tabular* + +#====================================================================== + +tabular = +## An alignment structure corresponding to tabular or various similar forms. +## The model is basically a copy of HTML4's table. +element tabular { tabular_attributes & tabular_model } + +## Attributes for \elementref{tabular}. +tabular_attributes = + Common.attributes & + + ## which row's baseline aligns with the container's baseline. + attribute vattach { "top" | "middle" | "bottom" }? & + + ## the desired width of the tabular. + attribute width { Length.type }? + +### MiKo: this can be tightened. Is it really true that we have more than one body? +## Content model for \elementref{tabular}. +tabular_model = thead* & tfoot* & tbody* & tr* + +#====================================================================== + +thead = +## A container for a set of rows that correspond to the header of the tabular. +element thead { thead_attributes & thead_model } + +## Attributes for \elementref{thead}. +thead_attributes = Common.attributes + +## Content model for \elementref{thead}. +thead_model = tr* + +#====================================================================== + +tfoot = +## A container for a set of rows that correspond to the footer of the tabular. +element tfoot { tfoot_attributes & tfoot_model } + +## Attributes for \elementref{tfoot}. +tfoot_attributes = Common.attributes + +## Content model for \elementref{tfoot}. +tfoot_model = tr* + +#====================================================================== + +tbody = +## A container for a set of rows corresponding to the body of the tabular. +element tbody { tbody_attributes & tbody_model } + +## Attributes for \elementref{tbody}. +tbody_attributes = Common.attributes + +## Content model for \elementref{tbody}. +tbody_model = tr* + +#====================================================================== + +tr = +## A row of a tabular. +element tr { tr_attributes & tr_model } + +## Attributes for \elementref{tr}. +tr_attributes = Common.attributes + +## Content model for \elementref{tr}. +tr_model = td* + +#====================================================================== + +td = +## A cell in a row of a tabular. +element td { td_attributes & td_model } + +## Attributes for \elementref{td}. +td_attributes = + + Common.attributes & + + ## indicates how many columns this cell spans or covers. + attribute colspan { xsd:nonNegativeInteger }? & + + ## indicates how many rows this cell spans or covers. + attribute rowspan { xsd:nonNegativeInteger }? & + +# This would have been clearer, but messes up conversion to dtd +# attribute align { "left" | "right" | "center" | "justify" | text }? & + ## specifies the alignment of the content. + attribute align { text }? & + + ## specifies the desired width for the column. + attribute width { Length.type }? & + + ## records a sequence of t or tt, r or rr, b or bb and l or ll + ## for borders or doubled borders on any side of the cell. + attribute border { text }? & + + ## whether this cell corresponds to a table head or foot. + attribute thead {xsd:boolean}? + +## Content model for \elementref{td}. +td_model = Flow.model + +#====================================================================== + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-tabular.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-tabular.rng new file mode 100644 index 00000000000..325c64c302b --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML-tabular.rng @@ -0,0 +1,189 @@ + + + + + This module defines the basic tabular, or alignment, structure. +It is roughly parallel to the HTML model. + + + + + + An alignment structure corresponding to tabular or various similar forms. +The model is basically a copy of HTML4's table. + + + + + + Attributes for \elementref{tabular}. + + + + which row's baseline aligns with the container's baseline. + + top + middle + bottom + + + + + + the desired width of the tabular. + + + + + + Content model for \elementref{tabular}. + + + + + + + + + + + + + A container for a set of rows that correspond to the header of the tabular. + + + + + + Attributes for \elementref{thead}. + + + + Content model for \elementref{thead}. + + + + + + + + A container for a set of rows that correspond to the footer of the tabular. + + + + + + Attributes for \elementref{tfoot}. + + + + Content model for \elementref{tfoot}. + + + + + + + + A container for a set of rows corresponding to the body of the tabular. + + + + + + Attributes for \elementref{tbody}. + + + + Content model for \elementref{tbody}. + + + + + + + + A row of a tabular. + + + + + + Attributes for \elementref{tr}. + + + + Content model for \elementref{tr}. + + + + + + + + A cell in a row of a tabular. + + + + + + Attributes for \elementref{td}. + + + + indicates how many columns this cell spans or covers. + + + + + + indicates how many rows this cell spans or covers. + + + + + + + specifies the alignment of the content. + + + + + specifies the desired width for the column. + + + + + + records a sequence of t or tt, r or rr, b or bb and l or ll +for borders or doubled borders on any side of the cell. + + + + + whether this cell corresponds to a table head or foot. + + + + + + Content model for \elementref{td}. + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML.rnc new file mode 100644 index 00000000000..a17b0186c67 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML.rnc @@ -0,0 +1,41 @@ +# /=====================================================================\ +# | LaTeXML.rnc | +# | Document Type for LaTeXML generated documents | +# |=====================================================================| +# | Part of LaTeXML: | +# | Public domain software, produced as part of work done by the | +# | United States Government & not subject to copyright in the US. | +# |=====================================================================| +# | Bruce Miller #_# | +# | http://dlmf.nist.gov/LaTeXML/ (o o) | +# \=========================================================ooo==U==ooo=/ + + +default namespace = "http://dlmf.nist.gov/LaTeXML" +namespace svg = "http://www.w3.org/2000/svg" +namespace xlink = "http://www.w3.org/1999/xlink" + +include "LaTeXML-common.rnc" +include "LaTeXML-inline.rnc" +include "LaTeXML-block.rnc" +include "LaTeXML-para.rnc" +include "LaTeXML-math.rnc" + +include "LaTeXML-tabular.rnc" +include "LaTeXML-picture.rnc" +include "LaTeXML-structure.rnc" +include "LaTeXML-bib.rnc" + +## Combined model for inline content. +Inline.model = text & Inline.class & Misc.class & Meta.class + +## Combined model for physical block-level content. +Block.model = Block.class & Misc.class & Meta.class + +## Combined model for general flow containing both inline and block level content. +Flow.model = text & Inline.class & Block.class & Misc.class & Meta.class + +## Combined model for logical block-level context. +Para.model = Para.class & Meta.class + +start = document diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML.rng new file mode 100644 index 00000000000..acd16ea8706 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/LaTeXML.rng @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + Combined model for inline content. + + + + + + + + + + + Combined model for physical block-level content. + + + + + + + + + + Combined model for general flow containing both inline and block level content. + + + + + + + + + + + + Combined model for logical block-level context. + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/TAGS b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/TAGS new file mode 100644 index 00000000000..20723d5f92c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/TAGS @@ -0,0 +1,33 @@ + +LaTeXML-bib.rnc,26 +default namespace 13,816 + +LaTeXML-block.rnc,26 +default namespace 13,816 + +LaTeXML-graphics.rnc,26 +default namespace 13,816 + +LaTeXML-index.rnc,26 +default namespace 13,816 + +LaTeXML-inline.rnc,26 +default namespace 14,817 + +LaTeXML-math.rnc,26 +default namespace 13,816 + +LaTeXML-para.rnc,26 +default namespace 13,816 + +LaTeXML-picture.rnc,27 +default namespace 17,1019 + +LaTeXML.rnc,26 +default namespace 13,816 + +LaTeXML-structure.rnc,26 +default namespace 13,816 + +LaTeXML-tabular.rnc,26 +default namespace 13,816 diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-animation.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-animation.rnc new file mode 100644 index 00000000000..89ef4dbea9e --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-animation.rnc @@ -0,0 +1,208 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Animation Module +## file: svg-animation.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-animation.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Animation +## +## animate, set, animateMotion, animateColor, animateTransform, mpath +## +## This module declares markup to provide support for animation. +## + +## +## SVG.Animation.class +## +[ xml:lang = "en" ] +grammar { + SVG.Animation.extra.class = notAllowed + SVG.Animation.class |= + animate + | set + | animateMotion + | animateColor + | animateTransform + | SVG.Animation.extra.class + a:documentation [ "\x{a}" ~ " SVG.Animation.attrib\x{a}" ~ " " ] + SVG.Animation.extra.attrib = empty + SVG.Animation.attrib = SVG.XLink.attrib, SVG.Animation.extra.attrib + a:documentation [ + "\x{a}" ~ + " SVG.AnimationAttribute.attrib\x{a}" ~ + " " + ] + SVG.AnimationAttribute.extra.attrib = empty + SVG.AnimationAttribute.attrib = + attribute attributeName { text }, + attribute attributeType { text }?, + SVG.AnimationAttribute.extra.attrib + a:documentation [ + "\x{a}" ~ + " SVG.AnimationTiming.attrib\x{a}" ~ + " " + ] + SVG.AnimationTiming.extra.attrib = empty + SVG.AnimationTiming.attrib = + attribute begin { text }?, + attribute dur { text }?, + attribute end { text }?, + attribute min { text }?, + attribute max { text }?, + [ a:defaultValue = "always" ] + attribute restart { "always" | "never" | "whenNotActive" }?, + attribute repeatCount { text }?, + attribute repeatDur { text }?, + [ a:defaultValue = "remove" ] + attribute fill { "remove" | "freeze" }?, + SVG.AnimationTiming.extra.attrib + a:documentation [ + "\x{a}" ~ + " SVG.AnimationValue.attrib\x{a}" ~ + " " + ] + SVG.AnimationValue.extra.attrib = empty + SVG.AnimationValue.attrib = + [ a:defaultValue = "linear" ] + attribute calcMode { "discrete" | "linear" | "paced" | "spline" }?, + attribute values { text }?, + attribute keyTimes { text }?, + attribute keySplines { text }?, + attribute from { text }?, + attribute to { text }?, + attribute by { text }?, + SVG.AnimationValue.extra.attrib + a:documentation [ + "\x{a}" ~ + " SVG.AnimationAddtion.attrib\x{a}" ~ + " " + ] + SVG.AnimationAddtion.extra.attrib = empty + SVG.AnimationAddtion.attrib = + [ a:defaultValue = "replace" ] + attribute additive { "replace" | "sum" }?, + [ a:defaultValue = "none" ] + attribute accumulate { "none" | "sum" }?, + SVG.AnimationAddtion.extra.attrib + a:documentation [ + "\x{a}" ~ + " animate: Animate Element\x{a}" ~ + " " + ] + SVG.animate.content = SVG.Description.class* + animate = element animate { attlist.animate, SVG.animate.content } + attlist.animate &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.AnimationEvents.attrib, + SVG.External.attrib, + SVG.Animation.attrib, + SVG.AnimationAttribute.attrib, + SVG.AnimationTiming.attrib, + SVG.AnimationValue.attrib, + SVG.AnimationAddtion.attrib + a:documentation [ "\x{a}" ~ " set: Set Element\x{a}" ~ " " ] + SVG.set.content = SVG.Description.class* + set = element set { attlist.set, SVG.set.content } + attlist.set &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.AnimationEvents.attrib, + SVG.External.attrib, + SVG.Animation.attrib, + SVG.AnimationAttribute.attrib, + SVG.AnimationTiming.attrib, + attribute to { text }? + a:documentation [ + "\x{a}" ~ + " animateMotion: Animate Motion Element\x{a}" ~ + " " + ] + SVG.animateMotion.content = SVG.Description.class*, mpath? + animateMotion = + element animateMotion { + attlist.animateMotion, SVG.animateMotion.content + } + attlist.animateMotion &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.AnimationEvents.attrib, + SVG.External.attrib, + SVG.Animation.attrib, + SVG.AnimationTiming.attrib, + SVG.AnimationAddtion.attrib, + [ a:defaultValue = "paced" ] + attribute calcMode { "discrete" | "linear" | "paced" | "spline" }?, + attribute values { text }?, + attribute keyTimes { text }?, + attribute keySplines { text }?, + attribute from { text }?, + attribute to { text }?, + attribute by { text }?, + attribute path { text }?, + attribute keyPoints { text }?, + attribute rotate { text }?, + attribute origin { text }? + a:documentation [ + "\x{a}" ~ + " animateColor: Animate Color Element\x{a}" ~ + " " + ] + SVG.animateColor.content = SVG.Description.class* + animateColor = + element animateColor { + attlist.animateColor, SVG.animateColor.content + } + attlist.animateColor &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.AnimationEvents.attrib, + SVG.External.attrib, + SVG.Animation.attrib, + SVG.AnimationAttribute.attrib, + SVG.AnimationTiming.attrib, + SVG.AnimationValue.attrib, + SVG.AnimationAddtion.attrib + a:documentation [ + "\x{a}" ~ + " animateTransform: Animate Transform Element\x{a}" ~ + " " + ] + SVG.animateTransform.content = SVG.Description.class* + animateTransform = + element animateTransform { + attlist.animateTransform, SVG.animateTransform.content + } + attlist.animateTransform &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.AnimationEvents.attrib, + SVG.External.attrib, + SVG.Animation.attrib, + SVG.AnimationAttribute.attrib, + SVG.AnimationTiming.attrib, + SVG.AnimationValue.attrib, + SVG.AnimationAddtion.attrib, + [ a:defaultValue = "translate" ] + attribute type { + "translate" | "scale" | "rotate" | "skewX" | "skewY" + }? + a:documentation [ + "\x{a}" ~ + " mpath: Motion Path Element\x{a}" ~ + " " + ] + SVG.mpath.content = SVG.Description.class* + mpath = element mpath { attlist.mpath, SVG.mpath.content } + attlist.mpath &= + SVG.Core.attrib, SVG.XLinkRequired.attrib, SVG.External.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-animation.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-animation.rng new file mode 100644 index 00000000000..918313a71fe --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-animation.rng @@ -0,0 +1,364 @@ + + + + SVG 1.1 Animation Module + file: svg-animation.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-animation.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Animation + + animate, set, animateMotion, animateColor, animateTransform, mpath + + This module declares markup to provide support for animation. + + + SVG.Animation.class + + + + + + + + + + + + + + + + SVG.Animation.attrib + + + + + + + + + + SVG.AnimationAttribute.attrib + + + + + + + + + + + + + SVG.AnimationTiming.attrib + + + + + + + + + + + + + + + + + + + + + + + + always + never + whenNotActive + + + + + + + + + + + + + remove + freeze + + + + + + + SVG.AnimationValue.attrib + + + + + + + + + discrete + linear + paced + spline + + + + + + + + + + + + + + + + + + + + + + + + + SVG.AnimationAddtion.attrib + + + + + + + + + replace + sum + + + + + + + none + sum + + + + + + + animate: Animate Element + + + + + + + + + + + + + + + + + + + + + + + + + set: Set Element + + + + + + + + + + + + + + + + + + + + + + + + + + animateMotion: Animate Motion Element + + + + + + + + + + + + + + + + + + + + + + + + + + + discrete + linear + paced + spline + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + animateColor: Animate Color Element + + + + + + + + + + + + + + + + + + + + + + + + + animateTransform: Animate Transform Element + + + + + + + + + + + + + + + + + + + + + + + + + + translate + scale + rotate + skewX + skewY + + + + + + mpath: Motion Path Element + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-animevents-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-animevents-attrib.rnc new file mode 100644 index 00000000000..efbbabc42c5 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-animevents-attrib.rnc @@ -0,0 +1,33 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Animation Events Attribute Module +## file: svg-animevents-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-animevents-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Animation Events Attribute +## +## onbegin, onend, onrepeat, onload +## +## This module defines the AnimationEvents attribute set. +## +[ xml:lang = "en" ] +grammar { + SVG.onbegin.attrib = attribute onbegin { Script.datatype }? + SVG.onend.attrib = attribute onend { Script.datatype }? + SVG.onrepeat.attrib = attribute onrepeat { Script.datatype }? + SVG.AnimationEvents.extra.attrib = empty + SVG.AnimationEvents.attrib &= + SVG.onbegin.attrib, + SVG.onend.attrib, + SVG.onrepeat.attrib, + SVG.onload.attrib, + SVG.AnimationEvents.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-animevents-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-animevents-attrib.rng new file mode 100644 index 00000000000..164414fe0fc --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-animevents-attrib.rng @@ -0,0 +1,50 @@ + + + + SVG 1.1 Animation Events Attribute Module + file: svg-animevents-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-animevents-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Animation Events Attribute + + onbegin, onend, onrepeat, onload + + This module defines the AnimationEvents attribute set. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-clip.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-clip.rnc new file mode 100644 index 00000000000..5471141c5fa --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-clip.rnc @@ -0,0 +1,64 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Basic Clip Module +## file: svg-basic-clip.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-basic-clip.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Basic Clip +## +## clipPath +## +## This module declares markup to provide support for clipping. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + ClipPathValue.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Clip.attrib\x{a}" ~ " " ] + SVG.Clip.extra.attrib = empty + SVG.Clip.attrib &= + attribute clip-path { ClipPathValue.datatype }?, + attribute clip-rule { ClipFillRule.datatype }?, + SVG.Clip.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Clip.class\x{a}" ~ " " ] + SVG.Clip.extra.class = notAllowed + SVG.Clip.class |= clipPath | SVG.Clip.extra.class + a:documentation [ + "\x{a}" ~ + " clipPath: Clip Path Element\x{a}" ~ + " " + ] + SVG.clipPath.class = rect | SVG.Animation.class | SVG.Use.class + SVG.clipPath.content = SVG.Description.class*, SVG.clipPath.class* + clipPath = element clipPath { attlist.clipPath, SVG.clipPath.content } + attlist.clipPath &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Text.attrib, + SVG.TextContent.attrib, + SVG.Font.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute transform { TransformList.datatype }?, + attribute clipPathUnits { "userSpaceOnUse" | "objectBoundingBox" }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-clip.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-clip.rng new file mode 100644 index 00000000000..0bb1333829f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-clip.rng @@ -0,0 +1,110 @@ + + + + SVG 1.1 Basic Clip Module + file: svg-basic-clip.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-basic-clip.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Basic Clip + + clipPath + + This module declares markup to provide support for clipping. + + + Datatypes + + + + + + SVG.Clip.attrib + + + + + + + + + + + + + + + + + + + SVG.Clip.class + + + + + + + + + + + + clipPath: Clip Path Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-filter.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-filter.rnc new file mode 100644 index 00000000000..995c08e7daf --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-filter.rnc @@ -0,0 +1,338 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Basic Filter Module +## file: svg-basic-filter.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-basic-filter.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Basic Filter +## +## filter, feBlend, feColorMatrix, feComponentTransfer, feComposite, +## feFlood, feGaussianBlur, feImage, feMerge, feMergeNode, feOffset, +## feTile, feFuncR, feFuncG, feFuncB, feFuncA +## +## This module declares markup to provide support for filter effect. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + FilterValue.datatype = xsd:string + NumberOptionalNumber.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Filter.attrib\x{a}" ~ " " ] + SVG.Filter.extra.attrib = empty + SVG.Filter.attrib &= + attribute filter { FilterValue.datatype }?, + SVG.Filter.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.FilterColor.attrib\x{a}" ~ " " ] + SVG.FilterColor.extra.attrib = empty + SVG.FilterColor.attrib &= + attribute color-interpolation-filters { + "auto" | "sRGB" | "linearRGB" | "inherit" + }?, + SVG.FilterColor.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Filter.class\x{a}" ~ " " ] + SVG.Filter.extra.class = notAllowed + SVG.Filter.class |= filter | SVG.Filter.extra.class + a:documentation [ + "\x{a}" ~ + " SVG.FilterPrimitive.class\x{a}" ~ + " " + ] + SVG.FilterPrimitive.extra.class = notAllowed + SVG.FilterPrimitive.class = + feBlend + | feColorMatrix + | feComponentTransfer + | feComposite + | feFlood + | feGaussianBlur + | feImage + | feMerge + | feOffset + | feTile + | SVG.FilterPrimitive.extra.class + a:documentation [ + "\x{a}" ~ + " SVG.FilterPrimitive.attrib\x{a}" ~ + " " + ] + SVG.FilterPrimitive.extra.attrib = empty + SVG.FilterPrimitive.attrib = + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }?, + attribute height { Length.datatype }?, + attribute result { text }?, + SVG.FilterPrimitive.extra.attrib + a:documentation [ + "\x{a}" ~ + " SVG.FilterPrimitiveWithIn.attrib\x{a}" ~ + " " + ] + SVG.FilterPrimitiveWithIn.extra.attrib = empty + SVG.FilterPrimitiveWithIn.attrib = + SVG.FilterPrimitive.attrib, + attribute in { text }?, + SVG.FilterPrimitiveWithIn.extra.attrib + a:documentation [ "\x{a}" ~ " filter: Filter Element\x{a}" ~ " " ] + SVG.filter.content = + SVG.Description.class*, (animate | set | SVG.FilterPrimitive.class)* + filter = element filter { attlist.filter, SVG.filter.content } + attlist.filter &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.XLink.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }?, + attribute height { Length.datatype }?, + attribute filterRes { NumberOptionalNumber.datatype }?, + attribute filterUnits { "userSpaceOnUse" | "objectBoundingBox" }?, + attribute primitiveUnits { "userSpaceOnUse" | "objectBoundingBox" }? + a:documentation [ + "\x{a}" ~ + " feBlend: Filter Effect Blend Element\x{a}" ~ + " " + ] + SVG.feBlend.content = (animate | set)* + feBlend = element feBlend { attlist.feBlend, SVG.feBlend.content } + attlist.feBlend &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute in2 { text }, + [ a:defaultValue = "normal" ] + attribute mode { + "normal" | "multiply" | "screen" | "darken" | "lighten" + }? + a:documentation [ + "\x{a}" ~ + " feColorMatrix: Filter Effect Color Matrix Element\x{a}" ~ + " " + ] + SVG.feColorMatrix.content = (animate | set)* + feColorMatrix = + element feColorMatrix { + attlist.feColorMatrix, SVG.feColorMatrix.content + } + attlist.feColorMatrix &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + [ a:defaultValue = "matrix" ] + attribute type { + "matrix" | "saturate" | "hueRotate" | "luminanceToAlpha" + }?, + attribute values { text }? + a:documentation [ + "\x{a}" ~ + " feComponentTransfer: Filter Effect Component Transfer Element\x{a}" ~ + " " + ] + SVG.feComponentTransfer.content = + feFuncR?, feFuncG?, feFuncB?, feFuncA? + feComponentTransfer = + element feComponentTransfer { + attlist.feComponentTransfer, SVG.feComponentTransfer.content + } + attlist.feComponentTransfer &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib + a:documentation [ + "\x{a}" ~ + " feComposite: Filter Effect Composite Element\x{a}" ~ + " " + ] + SVG.feComposite.content = (animate | set)* + feComposite = + element feComposite { attlist.feComposite, SVG.feComposite.content } + attlist.feComposite &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute in2 { text }, + [ a:defaultValue = "over" ] + attribute operator { + "over" | "in" | "out" | "atop" | "xor" | "arithmetic" + }?, + attribute k1 { Number.datatype }?, + attribute k2 { Number.datatype }?, + attribute k3 { Number.datatype }?, + attribute k4 { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " feFlood: Filter Effect Flood Element\x{a}" ~ + " " + ] + SVG.feFlood.content = (animate | set | animateColor)* + feFlood = element feFlood { attlist.feFlood, SVG.feFlood.content } + attlist.feFlood &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Color.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute flood-color { SVGColor.datatype }?, + attribute flood-opacity { OpacityValue.datatype }? + a:documentation [ + "\x{a}" ~ + " feGaussianBlur: Filter Effect Gaussian Blur Element\x{a}" ~ + " " + ] + SVG.feGaussianBlur.content = (animate | set)* + feGaussianBlur = + element feGaussianBlur { + attlist.feGaussianBlur, SVG.feGaussianBlur.content + } + attlist.feGaussianBlur &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute stdDeviation { NumberOptionalNumber.datatype }? + a:documentation [ + "\x{a}" ~ + " feImage: Filter Effect Image Element\x{a}" ~ + " " + ] + SVG.feImage.content = (animate | set | animateTransform)* + feImage = element feImage { attlist.feImage, SVG.feImage.content } + attlist.feImage &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.FilterPrimitive.attrib, + SVG.XLinkEmbed.attrib, + SVG.External.attrib, + [ a:defaultValue = "xMidYMid meet" ] + attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }? + a:documentation [ + "\x{a}" ~ + " feMerge: Filter Effect Merge Element\x{a}" ~ + " " + ] + SVG.feMerge.content = feMergeNode* + feMerge = element feMerge { attlist.feMerge, SVG.feMerge.content } + attlist.feMerge &= + SVG.Core.attrib, SVG.FilterColor.attrib, SVG.FilterPrimitive.attrib + a:documentation [ + "\x{a}" ~ + " feMergeNode: Filter Effect Merge Node Element\x{a}" ~ + " " + ] + SVG.feMergeNode.content = (animate | set)* + feMergeNode = + element feMergeNode { attlist.feMergeNode, SVG.feMergeNode.content } + attlist.feMergeNode &= + SVG.Core.attrib, + attribute in { text }? + a:documentation [ + "\x{a}" ~ + " feOffset: Filter Effect Offset Element\x{a}" ~ + " " + ] + SVG.feOffset.content = (animate | set)* + feOffset = element feOffset { attlist.feOffset, SVG.feOffset.content } + attlist.feOffset &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute dx { Number.datatype }?, + attribute dy { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " feTile: Filter Effect Tile Element\x{a}" ~ + " " + ] + SVG.feTile.content = (animate | set)* + feTile = element feTile { attlist.feTile, SVG.feTile.content } + attlist.feTile &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib + a:documentation [ + "\x{a}" ~ + " feFuncR: Filter Effect Function Red Element\x{a}" ~ + " " + ] + SVG.feFuncR.content = (animate | set)* + feFuncR = element feFuncR { attlist.feFuncR, SVG.feFuncR.content } + attlist.feFuncR &= + SVG.Core.attrib, + attribute type { + "identity" | "table" | "discrete" | "linear" | "gamma" + }, + attribute tableValues { text }?, + attribute slope { Number.datatype }?, + attribute intercept { Number.datatype }?, + attribute amplitude { Number.datatype }?, + attribute exponent { Number.datatype }?, + attribute offset { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " feFuncG: Filter Effect Function Green Element\x{a}" ~ + " " + ] + SVG.feFuncG.content = (animate | set)* + feFuncG = element feFuncG { attlist.feFuncG, SVG.feFuncG.content } + attlist.feFuncG &= + SVG.Core.attrib, + attribute type { + "identity" | "table" | "discrete" | "linear" | "gamma" + }, + attribute tableValues { text }?, + attribute slope { Number.datatype }?, + attribute intercept { Number.datatype }?, + attribute amplitude { Number.datatype }?, + attribute exponent { Number.datatype }?, + attribute offset { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " feFuncB: Filter Effect Function Blue Element\x{a}" ~ + " " + ] + SVG.feFuncB.content = (animate | set)* + feFuncB = element feFuncB { attlist.feFuncB, SVG.feFuncB.content } + attlist.feFuncB &= + SVG.Core.attrib, + attribute type { + "identity" | "table" | "discrete" | "linear" | "gamma" + }, + attribute tableValues { text }?, + attribute slope { Number.datatype }?, + attribute intercept { Number.datatype }?, + attribute amplitude { Number.datatype }?, + attribute exponent { Number.datatype }?, + attribute offset { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " feFuncA: Filter Effect Function Alpha Element\x{a}" ~ + " " + ] + SVG.feFuncA.content = (animate | set)* + feFuncA = element feFuncA { attlist.feFuncA, SVG.feFuncA.content } + attlist.feFuncA &= + SVG.Core.attrib, + attribute type { + "identity" | "table" | "discrete" | "linear" | "gamma" + }, + attribute tableValues { text }?, + attribute slope { Number.datatype }?, + attribute intercept { Number.datatype }?, + attribute amplitude { Number.datatype }?, + attribute exponent { Number.datatype }?, + attribute offset { Number.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-filter.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-filter.rng new file mode 100644 index 00000000000..6e9a39b50fa --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-filter.rng @@ -0,0 +1,779 @@ + + + + SVG 1.1 Basic Filter Module + file: svg-basic-filter.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-basic-filter.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Basic Filter + + filter, feBlend, feColorMatrix, feComponentTransfer, feComposite, + feFlood, feGaussianBlur, feImage, feMerge, feMergeNode, feOffset, + feTile, feFuncR, feFuncG, feFuncB, feFuncA + + This module declares markup to provide support for filter effect. + + + Datatypes + + + + + + + + + SVG.Filter.attrib + + + + + + + + + + + + + + SVG.FilterColor.attrib + + + + + + + + + auto + sRGB + linearRGB + inherit + + + + + + + SVG.Filter.class + + + + + + + + + + + + SVG.FilterPrimitive.class + + + + + + + + + + + + + + + + + + + + + SVG.FilterPrimitive.attrib + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SVG.FilterPrimitiveWithIn.attrib + + + + + + + + + + + + + filter: Filter Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + + feBlend: Filter Effect Blend Element + + + + + + + + + + + + + + + + + + + + + + + + normal + multiply + screen + darken + lighten + + + + + + feColorMatrix: Filter Effect Color Matrix Element + + + + + + + + + + + + + + + + + + + + + + + matrix + saturate + hueRotate + luminanceToAlpha + + + + + + + + + feComponentTransfer: Filter Effect Component Transfer Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + feComposite: Filter Effect Composite Element + + + + + + + + + + + + + + + + + + + + + + + + over + in + out + atop + xor + arithmetic + + + + + + + + + + + + + + + + + + + + + + + + + + feFlood: Filter Effect Flood Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feGaussianBlur: Filter Effect Gaussian Blur Element + + + + + + + + + + + + + + + + + + + + + + + + + + + feImage: Filter Effect Image Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feMerge: Filter Effect Merge Element + + + + + + + + + + + + + + + + + + + feMergeNode: Filter Effect Merge Node Element + + + + + + + + + + + + + + + + + + + + + + + feOffset: Filter Effect Offset Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feTile: Filter Effect Tile Element + + + + + + + + + + + + + + + + + + + + + + feFuncR: Filter Effect Function Red Element + + + + + + + + + + + + + + + + + + + + identity + table + discrete + linear + gamma + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feFuncG: Filter Effect Function Green Element + + + + + + + + + + + + + + + + + + + + identity + table + discrete + linear + gamma + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feFuncB: Filter Effect Function Blue Element + + + + + + + + + + + + + + + + + + + + identity + table + discrete + linear + gamma + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feFuncA: Filter Effect Function Alpha Element + + + + + + + + + + + + + + + + + + + + identity + table + discrete + linear + gamma + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-font.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-font.rnc new file mode 100644 index 00000000000..a45d34e3c64 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-font.rnc @@ -0,0 +1,196 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Basic Font Module +## file: svg-basic-font.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-basic-font.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Basic Font +## +## font, font-face, glyph, missing-glyph, hkern, vkern, font-face-src, +## font-face-uri, font-face-name +## +## This module declares markup to provide support for template. +## + +## +## SVG.Font.class +## +[ xml:lang = "en" ] +grammar { + SVG.Font.extra.class = notAllowed + SVG.Font.class |= font | font-face | SVG.Font.extra.class + a:documentation [ "\x{a}" ~ " font: Font Element\x{a}" ~ " " ] + SVG.font.content = + SVG.Description.class*, + font-face, + missing-glyph, + (glyph | hkern | vkern)* + font = element font { attlist.font, SVG.font.content } + attlist.font &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.External.attrib, + attribute horiz-origin-x { Number.datatype }?, + attribute horiz-origin-y { Number.datatype }?, + attribute horiz-adv-x { Number.datatype }, + attribute vert-origin-x { Number.datatype }?, + attribute vert-origin-y { Number.datatype }?, + attribute vert-adv-y { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " font-face: Font Face Element\x{a}" ~ + " " + ] + SVG.font-face.extra.class = notAllowed + SVG.font-face.content = + SVG.Description.class*, font-face-src?, SVG.font-face.extra.class + font-face = + element font-face { attlist.font-face, SVG.font-face.content } + attlist.font-face &= + SVG.Core.attrib, + attribute font-family { text }?, + attribute font-style { text }?, + attribute font-variant { text }?, + attribute font-weight { text }?, + attribute font-stretch { text }?, + attribute font-size { text }?, + attribute unicode-range { text }?, + attribute units-per-em { Number.datatype }?, + attribute panose-1 { text }?, + attribute stemv { Number.datatype }?, + attribute stemh { Number.datatype }?, + attribute slope { Number.datatype }?, + attribute cap-height { Number.datatype }?, + attribute x-height { Number.datatype }?, + attribute accent-height { Number.datatype }?, + attribute ascent { Number.datatype }?, + attribute descent { Number.datatype }?, + attribute widths { text }?, + attribute bbox { text }?, + attribute ideographic { Number.datatype }?, + attribute alphabetic { Number.datatype }?, + attribute mathematical { Number.datatype }?, + attribute hanging { Number.datatype }?, + attribute v-ideographic { Number.datatype }?, + attribute v-alphabetic { Number.datatype }?, + attribute v-mathematical { Number.datatype }?, + attribute v-hanging { Number.datatype }?, + attribute underline-position { Number.datatype }?, + attribute underline-thickness { Number.datatype }?, + attribute strikethrough-position { Number.datatype }?, + attribute strikethrough-thickness { Number.datatype }?, + attribute overline-position { Number.datatype }?, + attribute overline-thickness { Number.datatype }? + a:documentation [ "\x{a}" ~ " glyph: Glyph Element\x{a}" ~ " " ] + SVG.glyph.class = notAllowed + SVG.glyph.content = SVG.Description.class*, SVG.glyph.class* + glyph = element glyph { attlist.glyph, SVG.glyph.content } + attlist.glyph &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + attribute unicode { text }?, + attribute glyph-name { text }?, + attribute d { PathData.datatype }?, + attribute orientation { text }?, + attribute arabic-form { text }?, + attribute lang { LanguageCodes.datatype }?, + attribute horiz-adv-x { Number.datatype }?, + attribute vert-origin-x { Number.datatype }?, + attribute vert-origin-y { Number.datatype }?, + attribute vert-adv-y { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " missing-glyph: Missing Glyph Element\x{a}" ~ + " " + ] + SVG.missing-glyph.class = notAllowed + SVG.missing-glyph.content = + SVG.Description.class*, SVG.missing-glyph.class* + missing-glyph = + element missing-glyph { + attlist.missing-glyph, SVG.missing-glyph.content + } + attlist.missing-glyph &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + attribute d { PathData.datatype }?, + attribute horiz-adv-x { Number.datatype }?, + attribute vert-origin-x { Number.datatype }?, + attribute vert-origin-y { Number.datatype }?, + attribute vert-adv-y { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " hkern: Horizontal Kerning Element\x{a}" ~ + " " + ] + SVG.hkern.content = empty + hkern = element hkern { attlist.hkern, SVG.hkern.content } + attlist.hkern &= + SVG.Core.attrib, + attribute u1 { text }?, + attribute g1 { text }?, + attribute u2 { text }?, + attribute g2 { text }?, + attribute k { Number.datatype } + a:documentation [ + "\x{a}" ~ + " vkern: Vertical Kerning Element\x{a}" ~ + " " + ] + SVG.vkern.content = empty + vkern = element vkern { attlist.vkern, SVG.vkern.content } + attlist.vkern &= + SVG.Core.attrib, + attribute u1 { text }?, + attribute g1 { text }?, + attribute u2 { text }?, + attribute g2 { text }?, + attribute k { Number.datatype } + a:documentation [ + "\x{a}" ~ + " font-face-src: Font Face Source Element\x{a}" ~ + " " + ] + SVG.font-face-src.content = (font-face-uri | font-face-name)+ + font-face-src = + element font-face-src { + attlist.font-face-src, SVG.font-face-src.content + } + attlist.font-face-src &= SVG.Core.attrib + a:documentation [ + "\x{a}" ~ + " font-face-uri: Font Face URI Element\x{a}" ~ + " " + ] + SVG.font-face-uri.content = empty + font-face-uri = + element font-face-uri { + attlist.font-face-uri, SVG.font-face-uri.content + } + attlist.font-face-uri &= SVG.Core.attrib, SVG.XLinkRequired.attrib + a:documentation [ + "\x{a}" ~ + " font-face-name: Font Face Name Element\x{a}" ~ + " " + ] + SVG.font-face-name.content = empty + font-face-name = + element font-face-name { + attlist.font-face-name, SVG.font-face-name.content + } + attlist.font-face-name &= + SVG.Core.attrib, + attribute name { text }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-font.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-font.rng new file mode 100644 index 00000000000..da67018545f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-font.rng @@ -0,0 +1,490 @@ + + + + SVG 1.1 Basic Font Module + file: svg-basic-font.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-basic-font.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Basic Font + + font, font-face, glyph, missing-glyph, hkern, vkern, font-face-src, + font-face-uri, font-face-name + + This module declares markup to provide support for template. + + + SVG.Font.class + + + + + + + + + + + + + font: Font Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + font-face: Font Face Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + glyph: Glyph Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + missing-glyph: Missing Glyph Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + hkern: Horizontal Kerning Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + vkern: Vertical Kerning Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + font-face-src: Font Face Source Element + + + + + + + + + + + + + + + + + + + + font-face-uri: Font Face URI Element + + + + + + + + + + + + + + + + font-face-name: Font Face Name Element + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-graphics-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-graphics-attrib.rnc new file mode 100644 index 00000000000..606e2e4e92d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-graphics-attrib.rnc @@ -0,0 +1,49 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Basic Graphics Attribute Module +## file: svg-basic-graphics-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-basic-graphics-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Basic Graphics Attribute +## +## display, visibility +## +## This module defines the Graphics attribute set. +## +[ xml:lang = "en" ] +grammar { + SVG.display.attrib = + attribute display { + "inline" + | "block" + | "list-item" + | "run-in" + | "compact" + | "marker" + | "table" + | "inline-table" + | "table-row-group" + | "table-header-group" + | "table-footer-group" + | "table-row" + | "table-column-group" + | "table-column" + | "table-cell" + | "table-caption" + | "none" + | "inherit" + }? + SVG.visibility.attrib = + attribute visibility { "visible" | "hidden" | "inherit" }? + SVG.Graphics.extra.attrib = empty + SVG.Graphics.attrib &= + SVG.display.attrib, SVG.visibility.attrib, SVG.Graphics.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-graphics-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-graphics-attrib.rng new file mode 100644 index 00000000000..20c40b3648c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-graphics-attrib.rng @@ -0,0 +1,64 @@ + + + + SVG 1.1 Basic Graphics Attribute Module + file: svg-basic-graphics-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-basic-graphics-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Basic Graphics Attribute + + display, visibility + + This module defines the Graphics attribute set. + + + + + + inline + block + list-item + run-in + compact + marker + table + inline-table + table-row-group + table-header-group + table-footer-group + table-row + table-column-group + table-column + table-cell + table-caption + none + inherit + + + + + + + + + visible + hidden + inherit + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-structure.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-structure.rnc new file mode 100644 index 00000000000..67b94df81a1 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-structure.rnc @@ -0,0 +1,293 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Basic Structure Module +## file: svg-basic-structure.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-basic-structure.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Basic Structure +## +## svg, g, defs, desc, title, metadata, use +## +## This module declares the major structural elements and their attributes. +## +[ xml:lang = "en" ] +grammar { + + ## + ## The root element is "svg". + ## + start = svg + + ## + ## Include core set of modules + ## + div { + + ## + ## Datatypes Module + ## + include "svg-datatypes.rnc" + + ## + ## Core Attribute Module + ## + include "svg-core-attrib.rnc" + } + a:documentation [ + "\x{a}" ~ + " Content Models (Default)\x{a}" ~ + " " + ] + SVG.Profile.class = notAllowed + SVG.Gradient.class = notAllowed + SVG.Pattern.class = notAllowed + SVG.Clip.class = notAllowed + SVG.Mask.class = notAllowed + SVG.Filter.class = notAllowed + SVG.Cursor.class = notAllowed + SVG.Marker.class = notAllowed + SVG.View.class = notAllowed + SVG.Script.class = notAllowed + SVG.Font.class = notAllowed + SVG.Extensibility.class = notAllowed + SVG.Conditional.class = notAllowed + SVG.Image.class = notAllowed + SVG.Style.class = notAllowed + SVG.Shape.class = notAllowed + SVG.Text.class = notAllowed + SVG.Hyperlink.class = notAllowed + SVG.Animation.class = notAllowed + a:documentation [ + "\x{a}" ~ + " Attribute Collections (Default)\x{a}" ~ + " " + ] + SVG.Container.attrib = empty + SVG.Viewport.attrib = empty + SVG.Text.attrib = empty + SVG.TextContent.attrib = empty + SVG.Opacity.attrib = empty + SVG.Marker.attrib = empty + SVG.Profile.attrib = empty + SVG.Gradient.attrib = empty + SVG.Clip.attrib = empty + SVG.Mask.attrib = empty + SVG.Filter.attrib = empty + SVG.FilterColor.attrib = empty + SVG.Cursor.attrib = empty + SVG.External.attrib = empty + SVG.Conditional.attrib = empty + SVG.Color.attrib = empty + SVG.Paint.attrib = empty + SVG.Graphics.attrib = empty + SVG.DocumentEvents.attrib = empty + SVG.GraphicalEvents.attrib = empty + SVG.onload.attrib = empty + SVG.AnimationEvents.attrib = empty + SVG.XLink.attrib = empty + SVG.XLinkRequired.attrib = empty + SVG.XLinkEmbed.attrib = empty + SVG.XLinkReplace.attrib = empty + SVG.Style.attrib = empty + SVG.Font.attrib = empty + a:documentation [ "\x{a}" ~ " SVG.Description.class\x{a}" ~ " " ] + SVG.Description.extra.class = notAllowed + SVG.Description.class = + desc | title | metadata | SVG.Description.extra.class + a:documentation [ "\x{a}" ~ " SVG.Use.class\x{a}" ~ " " ] + SVG.Use.extra.class = notAllowed + SVG.Use.class = use | SVG.Use.extra.class + a:documentation [ "\x{a}" ~ " SVG.Structure.class\x{a}" ~ " " ] + SVG.Structure.extra.class = notAllowed + SVG.Structure.class = + svg | g | defs | SVG.Use.class | SVG.Structure.extra.class + a:documentation [ + "\x{a}" ~ + " SVG.Presentation.attrib\x{a}" ~ + " " + ] + SVG.Presentation.extra.attrib = empty + SVG.Presentation.attrib = + SVG.Container.attrib, + SVG.Viewport.attrib, + SVG.Text.attrib, + SVG.TextContent.attrib, + SVG.Font.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Marker.attrib, + SVG.Profile.attrib, + SVG.Gradient.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.FilterColor.attrib, + SVG.Cursor.attrib, + attribute flood-color { SVGColor.datatype }?, + attribute flood-opacity { OpacityValue.datatype }?, + attribute lighting-color { SVGColor.datatype }?, + SVG.Presentation.extra.attrib + a:documentation [ + "\x{a}" ~ + " svg: SVG Document Element\x{a}" ~ + " " + ] + SVG.svg.content = + (SVG.Description.class + | SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class)* + svg = element svg { attlist.svg, SVG.svg.content } + attlist.svg &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.DocumentEvents.attrib, + SVG.GraphicalEvents.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }?, + attribute height { Length.datatype }?, + attribute viewBox { ViewBoxSpec.datatype }?, + [ a:defaultValue = "xMidYMid meet" ] + attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }?, + [ a:defaultValue = "magnify" ] + attribute zoomAndPan { "disable" | "magnify" }?, + [ a:defaultValue = "1.1" ] attribute version { xsd:string "1.1" }?, + attribute baseProfile { Text.datatype }?, + [ a:defaultValue = "text/ecmascript" ] + attribute contentScriptType { ContentType.datatype }?, + [ a:defaultValue = "text/css" ] + attribute contentStyleType { ContentType.datatype }? + a:documentation [ "\x{a}" ~ " g: Group Element\x{a}" ~ " " ] + SVG.g.content = + (SVG.Description.class + | SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class)* + g = element g { attlist.g, SVG.g.content } + attlist.g &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.GraphicalEvents.attrib, + SVG.External.attrib, + attribute transform { TransformList.datatype }? + a:documentation [ + "\x{a}" ~ + " defs: Definisions Element\x{a}" ~ + " " + ] + SVG.defs.content = + (SVG.Description.class + | SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class)* + defs = element defs { attlist.defs, SVG.defs.content } + attlist.defs &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.GraphicalEvents.attrib, + SVG.External.attrib, + attribute transform { TransformList.datatype }? + a:documentation [ + "\x{a}" ~ + " desc: Description Element\x{a}" ~ + " " + ] + SVG.desc.content = text + desc = element desc { attlist.desc, SVG.desc.content } + attlist.desc &= SVG.Core.attrib, SVG.Style.attrib + a:documentation [ "\x{a}" ~ " title: Title Element\x{a}" ~ " " ] + SVG.title.content = text + title = element title { attlist.title, SVG.title.content } + attlist.title &= SVG.Core.attrib, SVG.Style.attrib + a:documentation [ + "\x{a}" ~ + " metadata: Metadata Element\x{a}" ~ + " " + ] + SVG.metadata.content = text + metadata = element metadata { attlist.metadata, SVG.metadata.content } + attlist.metadata &= SVG.Core.attrib + a:documentation [ "\x{a}" ~ " use: Use Element\x{a}" ~ " " ] + SVG.use.content = SVG.Description.class*, SVG.Animation.class* + use = element use { attlist.use, SVG.use.content } + attlist.use &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.GraphicalEvents.attrib, + SVG.XLinkEmbed.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }?, + attribute height { Length.datatype }?, + attribute transform { TransformList.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-structure.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-structure.rng new file mode 100644 index 00000000000..65ee4f172f4 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-structure.rng @@ -0,0 +1,565 @@ + + + + SVG 1.1 Basic Structure Module + file: svg-basic-structure.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-basic-structure.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Basic Structure + + svg, g, defs, desc, title, metadata, use + + This module declares the major structural elements and their attributes. + + + + The root element is "svg". + + + +
+ + Include core set of modules + + + + Datatypes Module + + + + + Core Attribute Module + + +
+ + Content Models (Default) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Attribute Collections (Default) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SVG.Description.class + + + + + + + + + + + + + + SVG.Use.class + + + + + + + + + + + + SVG.Structure.class + + + + + + + + + + + + + + + SVG.Presentation.attrib + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + svg: SVG Document Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + disable + magnify + + + + + + 1.1 + + + + + + + + + + + + + + + + + + + + g: Group Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + defs: Definisions Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + desc: Description Element + + + + + + + + + + + + + + + + title: Title Element + + + + + + + + + + + + + + + + metadata: Metadata Element + + + + + + + + + + + + + + + use: Use Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-text.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-text.rnc new file mode 100644 index 00000000000..8e8b2c728bd --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-text.rnc @@ -0,0 +1,137 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Basic Text Module +## file: svg-basic-text.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-basic-text.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Basic Text +## +## text, altGlyph, altGlyphDef, glyphRef +## +## This module declares markup to provide support for text. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + FontFamilyValue.datatype = xsd:string + FontSizeValue.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Font.attrib\x{a}" ~ " " ] + SVG.Font.extra.attrib = empty + SVG.Font.attrib &= + attribute font-family { FontFamilyValue.datatype }?, + attribute font-size { FontSizeValue.datatype }?, + attribute font-style { + "normal" | "italic" | "oblique" | "inherit" + }?, + attribute font-weight { + "normal" + | "bold" + | "bolder" + | "lighter" + | "100" + | "200" + | "300" + | "400" + | "500" + | "600" + | "700" + | "800" + | "900" + | "inherit" + }?, + SVG.Font.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Text.class\x{a}" ~ " " ] + SVG.Text.extra.class = notAllowed + SVG.Text.class |= \text | SVG.Text.extra.class + a:documentation [ "\x{a}" ~ " SVG.TextContent.class\x{a}" ~ " " ] + SVG.TextContent.extra.class = notAllowed + SVG.TextContent.class = altGlyph | SVG.TextContent.extra.class + a:documentation [ "\x{a}" ~ " text: Text Element\x{a}" ~ " " ] + SVG.text.class = + text + | SVG.Description.class + | SVG.Animation.class + | # + SVG.Hyperlink.class + SVG.text.content = SVG.text.class* + \text = element text { attlist.text, SVG.text.content } + attlist.text &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Font.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute x { Coordinates.datatype }?, + attribute y { Coordinates.datatype }?, + attribute rotate { Numbers.datatype }?, + attribute transform { TransformList.datatype }? + a:documentation [ + "\x{a}" ~ + " altGlyph: Alternate Glyph Element\x{a}" ~ + " " + ] + SVG.altGlyph.content = text + altGlyph = element altGlyph { attlist.altGlyph, SVG.altGlyph.content } + attlist.altGlyph &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Font.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.XLink.attrib, + SVG.External.attrib, + attribute glyphRef { text }?, + attribute format { text }? + a:documentation [ + "\x{a}" ~ + " altGlyphDef: Alternate Glyph Definition Element\x{a}" ~ + " " + ] + SVG.altGlyphDef.content = glyphRef+ + altGlyphDef = + element altGlyphDef { attlist.altGlyphDef, SVG.altGlyphDef.content } + attlist.altGlyphDef &= SVG.Core.attrib + a:documentation [ + "\x{a}" ~ + " glyphRef: Glyph Reference Element\x{a}" ~ + " " + ] + SVG.glyphRef.content = empty + glyphRef = element glyphRef { attlist.glyphRef, SVG.glyphRef.content } + attlist.glyphRef &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Font.attrib, + SVG.XLink.attrib, + attribute glyphRef { text }?, + attribute format { text }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-text.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-text.rng new file mode 100644 index 00000000000..14771acea25 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-basic-text.rng @@ -0,0 +1,236 @@ + + + + SVG 1.1 Basic Text Module + file: svg-basic-text.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-basic-text.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Basic Text + + text, altGlyph, altGlyphDef, glyphRef + + This module declares markup to provide support for text. + + + Datatypes + + + + + + + + + SVG.Font.attrib + + + + + + + + + + + + + + + + + + + normal + italic + oblique + inherit + + + + + + + normal + bold + bolder + lighter + 100 + 200 + 300 + 400 + 500 + 600 + 700 + 800 + 900 + inherit + + + + + + + SVG.Text.class + + + + + + + + + + + + SVG.TextContent.class + + + + + + + + + + + + text: Text Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + altGlyph: Alternate Glyph Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + altGlyphDef: Alternate Glyph Definition Element + + + + + + + + + + + + + + + + + glyphRef: Glyph Reference Element + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-clip.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-clip.rnc new file mode 100644 index 00000000000..50dd76142ea --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-clip.rnc @@ -0,0 +1,30 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" +namespace ns1 = "http://www.w3.org/2000/svg" + + +## +## SVG 1.1 Clip Module +## file: svg-clip.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-clip.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Clip +## +## clipPath +## +## This module declares markup to provide support for clipping. +## +[ xml:lang = "en" ] +grammar { + include "svg-basic-clip.rnc" inherit = ns1 + + ## + ## extend content model of clipPath + ## + SVG.clipPath.class |= SVG.Shape.class | SVG.Text.class +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-clip.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-clip.rng new file mode 100644 index 00000000000..da0d93c81ba --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-clip.rng @@ -0,0 +1,29 @@ + + + + SVG 1.1 Clip Module + file: svg-clip.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-clip.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Clip + + clipPath + + This module declares markup to provide support for clipping. + + + + + extend content model of clipPath + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-conditional.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-conditional.rnc new file mode 100644 index 00000000000..922554a6a8d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-conditional.rnc @@ -0,0 +1,62 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Conditional Processing Module +## file: svg-conditional.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-conditional.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Conditional Processing +## +## switch +## +## This module declares markup to provide support for conditional processing. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + ExtensionList.datatype = xsd:string + FeatureList.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Conditional.attrib\x{a}" ~ " " ] + SVG.Conditional.extra.attrib = empty + SVG.Conditional.attrib &= + attribute requiredFeatures { FeatureList.datatype }?, + attribute requiredExtensions { ExtensionList.datatype }?, + attribute systemLanguage { LanguageCodes.datatype }?, + SVG.Conditional.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Conditional.class\x{a}" ~ " " ] + SVG.Conditional.extra.class = notAllowed + SVG.Conditional.class |= switch | SVG.Conditional.extra.class + a:documentation [ "\x{a}" ~ " switch: Switch Element\x{a}" ~ " " ] + SVG.switch.content = + SVG.Description.class*, + (svg + | g + | use + | \text + | SVG.Animation.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Shape.class + | SVG.Hyperlink.class + | SVG.Extensibility.class)* + switch = element switch { attlist.switch, SVG.switch.content } + attlist.switch &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.GraphicalEvents.attrib, + SVG.External.attrib, + attribute transform { TransformList.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-conditional.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-conditional.rng new file mode 100644 index 00000000000..8bfddf61491 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-conditional.rng @@ -0,0 +1,105 @@ + + + + SVG 1.1 Conditional Processing Module + file: svg-conditional.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-conditional.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Conditional Processing + + switch + + This module declares markup to provide support for conditional processing. + + + Datatypes + + + + + + + + + SVG.Conditional.attrib + + + + + + + + + + + + + + + + + + + + + + + + SVG.Conditional.class + + + + + + + + + + + + switch: Switch Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-container-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-container-attrib.rnc new file mode 100644 index 00000000000..fb4ac5ff47f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-container-attrib.rnc @@ -0,0 +1,33 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Container Attribute Module +## file: svg-container-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-container-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Container Attribute +## +## enable-background +## +## This module defines the Container attribute set. +## +[ xml:lang = "en" ] +grammar { + + ## + ## 'enable-background' property/attribute value (e.g., 'new', 'accumulate') + ## + EnableBackgroundValue.datatype = xsd:string + SVG.enable-background.attrib = + attribute enable-background { EnableBackgroundValue.datatype }? + SVG.Container.extra.attrib = empty + SVG.Container.attrib &= + SVG.enable-background.attrib, SVG.Container.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-container-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-container-attrib.rng new file mode 100644 index 00000000000..01847b07a90 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-container-attrib.rng @@ -0,0 +1,39 @@ + + + + SVG 1.1 Container Attribute Module + file: svg-container-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-container-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Container Attribute + + enable-background + + This module defines the Container attribute set. + + + + 'enable-background' property/attribute value (e.g., 'new', 'accumulate') + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-core-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-core-attrib.rnc new file mode 100644 index 00000000000..e9d73f1601f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-core-attrib.rnc @@ -0,0 +1,35 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Core Attribute Module +## file: svg-core-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-core-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Core Attribute +## +## id, xml:base, xml:lang, xml:space +## +## This module defines the core set of attributes that can be present on +## any element. +## +[ xml:lang = "en" ] +grammar { + SVG.id.attrib = attribute id { xsd:ID }? + SVG.base.attrib = attribute xml:base { URI.datatype }? + SVG.lang.attrib = attribute xml:lang { LanguageCode.datatype }? + SVG.space.attrib = attribute xml:space { "default" | "preserve" }? + SVG.Core.extra.attrib = empty + SVG.Core.attrib = + SVG.id.attrib, + SVG.base.attrib, + SVG.lang.attrib, + SVG.space.attrib, + SVG.Core.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-core-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-core-attrib.rng new file mode 100644 index 00000000000..cf3e64fafd1 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-core-attrib.rng @@ -0,0 +1,61 @@ + + + + SVG 1.1 Core Attribute Module + file: svg-core-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-core-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Core Attribute + + id, xml:base, xml:lang, xml:space + + This module defines the core set of attributes that can be present on + any element. + + + + + + + + + + + + + + + + + + + + + + + + + + + default + preserve + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-cursor.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-cursor.rnc new file mode 100644 index 00000000000..50b42d15627 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-cursor.rnc @@ -0,0 +1,47 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Cursor Module +## file: svg-cursor.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-cursor.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Cursor +## +## cursor +## +## This module declares markup to provide support for cursor. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + CursorValue.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Cursor.attrib\x{a}" ~ " " ] + SVG.Cursor.extra.attrib = empty + SVG.Cursor.attrib &= + attribute cursor { CursorValue.datatype }?, + SVG.Cursor.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Cursor.class\x{a}" ~ " " ] + SVG.Cursor.extra.class = notAllowed + SVG.Cursor.class |= cursor | SVG.Cursor.extra.class + a:documentation [ "\x{a}" ~ " cursor: Cursor Element\x{a}" ~ " " ] + SVG.cursor.content = SVG.Description.class* + cursor = element cursor { attlist.cursor, SVG.cursor.content } + attlist.cursor &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.XLinkRequired.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-cursor.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-cursor.rng new file mode 100644 index 00000000000..e3207ed6c92 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-cursor.rng @@ -0,0 +1,81 @@ + + + + SVG 1.1 Cursor Module + file: svg-cursor.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-cursor.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Cursor + + cursor + + This module declares markup to provide support for cursor. + + + Datatypes + + + + + + SVG.Cursor.attrib + + + + + + + + + + + + + + SVG.Cursor.class + + + + + + + + + + + + cursor: Cursor Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-datatypes.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-datatypes.rnc new file mode 100644 index 00000000000..7a3ea4b659f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-datatypes.rnc @@ -0,0 +1,135 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Datatypes Module +## file: svg-datatypes.mod +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-datatypes.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Datatypes +## +## This module declares common data types for properties and attributes. +## + +## +## feature specification +## +[ xml:lang = "en" ] +grammar { + Boolean.datatype = "false" | "true" + + ## + ## 'clip-rule' or 'fill-rule' property/attribute value + ## + ClipFillRule.datatype = "nonzero" | "evenodd" | "inherit" + + ## + ## media type, as per [RFC2045] + ## + ContentType.datatype = xsd:string + + ## + ## a + ## + Coordinate.datatype = xsd:string + + ## + ## a list of s + ## + Coordinates.datatype = xsd:string + + ## + ## a value + ## + Color.datatype = xsd:string + + ## + ## a + ## + Integer.datatype = xsd:string + + ## + ## a language code, as per [RFC3066] + ## + LanguageCode.datatype = xsd:language + + ## + ## comma-separated list of language codes, as per [RFC3066] + ## + LanguageCodes.datatype = xsd:string + + ## + ## a + ## + Length.datatype = xsd:string + + ## + ## a list of s + ## + Lengths.datatype = xsd:string + + ## + ## a + ## + Number.datatype = xsd:string + + ## + ## a list of s + ## + Numbers.datatype = xsd:string + + ## + ## opacity value (e.g., ) + ## + OpacityValue.datatype = xsd:string + + ## + ## a path data specification + ## + PathData.datatype = xsd:string + + ## + ## 'preserveAspectRatio' attribute specification + ## + PreserveAspectRatioSpec.datatype = + xsd:string { + pattern = + "\s*(none|xMinYMin|xMidYMin|xMaxYMin|xMinYMid|xMidYMid|xMaxYMid|xMinYMax|xMidYMax|xMaxYMax)\s+(meet|slice)?\s*" + } + + ## + ## script expression + ## + Script.datatype = xsd:string + + ## + ## An SVG color value (RGB plus optional ICC) + ## + SVGColor.datatype = xsd:string + + ## + ## arbitrary text string + ## + Text.datatype = xsd:string + + ## + ## list of transforms + ## + TransformList.datatype = xsd:string + + ## + ## a Uniform Resource Identifier, see [URI] + ## + URI.datatype = xsd:anyURI + + ## + ## 'viewBox' attribute specification + ## + ViewBoxSpec.datatype = xsd:string +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-datatypes.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-datatypes.rng new file mode 100644 index 00000000000..dba1588d8d4 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-datatypes.rng @@ -0,0 +1,158 @@ + + + + SVG 1.1 Datatypes Module + file: svg-datatypes.mod + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-datatypes.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Datatypes + + This module declares common data types for properties and attributes. + + + feature specification + + + + false + true + + + + + 'clip-rule' or 'fill-rule' property/attribute value + + + nonzero + evenodd + inherit + + + + + media type, as per [RFC2045] + + + + + + a <coordinate> + + + + + + a list of <coordinate>s + + + + + + a <color> value + + + + + + a <integer> + + + + + + a language code, as per [RFC3066] + + + + + + comma-separated list of language codes, as per [RFC3066] + + + + + + a <ength> + + + + + + a list of <length>s + + + + + + a <number> + + + + + + a list of <number>s + + + + + + opacity value (e.g., <number>) + + + + + + a path data specification + + + + + + 'preserveAspectRatio' attribute specification + + + \s*(none|xMinYMin|xMidYMin|xMaxYMin|xMinYMid|xMidYMid|xMaxYMid|xMinYMax|xMidYMax|xMaxYMax)\s+(meet|slice)?\s* + + + + + script expression + + + + + + An SVG color value (RGB plus optional ICC) + + + + + + arbitrary text string + + + + + + list of transforms + + + + + + a Uniform Resource Identifier, see [URI] + + + + + + 'viewBox' attribute specification + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-docevents-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-docevents-attrib.rnc new file mode 100644 index 00000000000..a03b011c8d3 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-docevents-attrib.rnc @@ -0,0 +1,38 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Document Events Attribute Module +## file: svg-docevents-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-docevents-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Document Events Attribute +## +## onunload, onabort, onerror, onresize, onscroll, onzoom +## +## This module defines the DocumentEvents attribute set. +## +[ xml:lang = "en" ] +grammar { + SVG.onunload.attrib = attribute onunload { Script.datatype }? + SVG.onabort.attrib = attribute onabort { Script.datatype }? + SVG.onerror.attrib = attribute onerror { Script.datatype }? + SVG.onresize.attrib = attribute onresize { Script.datatype }? + SVG.onscroll.attrib = attribute onscroll { Script.datatype }? + SVG.onzoom.attrib = attribute onzoom { Script.datatype }? + SVG.DocumentEvents.extra.attrib = empty + SVG.DocumentEvents.attrib &= + SVG.onunload.attrib, + SVG.onabort.attrib, + SVG.onerror.attrib, + SVG.onresize.attrib, + SVG.onscroll.attrib, + SVG.onzoom.attrib, + SVG.DocumentEvents.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-docevents-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-docevents-attrib.rng new file mode 100644 index 00000000000..3d2eecea923 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-docevents-attrib.rng @@ -0,0 +1,73 @@ + + + + SVG 1.1 Document Events Attribute Module + file: svg-docevents-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-docevents-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Document Events Attribute + + onunload, onabort, onerror, onresize, onscroll, onzoom + + This module defines the DocumentEvents attribute set. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-extensibility.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-extensibility.rnc new file mode 100644 index 00000000000..23ef64bf988 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-extensibility.rnc @@ -0,0 +1,62 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" +default namespace ns1 = "http://www.w3.org/2000/svg" + +a:documentation [ + "\x{a}" ~ + " SVG 1.1 Extensibility Module\x{a}" ~ + " file: svg-extensibility.rng\x{a}" ~ + "\x{a}" ~ + " This is SVG, a language for describing two-dimensional graphics in XML.\x{a}" ~ + " Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved.\x{a}" ~ + "\x{a}" ~ + " $Id: svg-extensibility.rng,v 1.1 2003/07/15 07:11:10 dean Exp $\x{a}" ~ + "\x{a}" +] +a:documentation [ + "\x{a}" ~ + " Extensibility\x{a}" ~ + "\x{a}" ~ + " foreignObject\x{a}" ~ + "\x{a}" ~ + " This module declares markup to provide support for extensibility.\x{a}" ~ + " " +] +a:documentation [ "\x{a}" ~ " SVG.Extensibility.class\x{a}" ~ " " ] +SVG.Extensibility.extra.class = notAllowed +SVG.Extensibility.class |= foreignObject | SVG.Extensibility.extra.class +a:documentation [ + "\x{a}" ~ + " foreignObject: Foreign Object Element\x{a}" ~ + " " +] +SVG.foreignObject.content = + (text + | svg + # ref name="foreignElement"/ + )* +foreignObject = + element foreignObject { + attlist.foreignObject, SVG.foreignObject.content + } +attlist.foreignObject &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.GraphicalEvents.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }, + attribute height { Length.datatype }, + attribute transform { TransformList.datatype }? + +## +## any element in foreign namespace +## +foreignElement = + element * - ns1:* { + (attribute * - ns1:* { text } + | text + | foreignElement)* + } diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-extensibility.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-extensibility.rng new file mode 100644 index 00000000000..d63acf3deae --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-extensibility.rng @@ -0,0 +1,104 @@ + + + + SVG 1.1 Extensibility Module + file: svg-extensibility.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-extensibility.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + + Extensibility + + foreignObject + + This module declares markup to provide support for extensibility. + + + SVG.Extensibility.class + + + + + + + + + + + + foreignObject: Foreign Object Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + any element in foreign namespace + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-extresources-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-extresources-attrib.rnc new file mode 100644 index 00000000000..6c1274e082a --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-extresources-attrib.rnc @@ -0,0 +1,28 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 External Resources Attribute Module +## file: svg-extresources-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-extresources-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## External Resources Attribute +## +## externalResourcesRequired +## +## This module defines the External attribute set. +## +[ xml:lang = "en" ] +grammar { + SVG.externalResourcesRequired.attrib = + attribute externalResourcesRequired { Boolean.datatype }? + SVG.External.extra.attrib = empty + SVG.External.attrib &= + SVG.externalResourcesRequired.attrib, SVG.External.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-extresources-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-extresources-attrib.rng new file mode 100644 index 00000000000..1fa08bfe7ba --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-extresources-attrib.rng @@ -0,0 +1,33 @@ + + + + SVG 1.1 External Resources Attribute Module + file: svg-extresources-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-extresources-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + External Resources Attribute + + externalResourcesRequired + + This module defines the External attribute set. + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-filter.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-filter.rnc new file mode 100644 index 00000000000..9d4cc259ef4 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-filter.rnc @@ -0,0 +1,214 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Filter Module +## file: svg-filter.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-filter.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Filter +## +## filter, feBlend, feColorMatrix, feComponentTransfer, feComposite, +## feConvolveMatrix, feDiffuseLighting, feDisplacementMap, feFlood, +## feGaussianBlur, feImage, feMerge, feMergeNode, feMorphology, feOffset, +## feSpecularLighting, feTile, feTurbulence, feDistantLight, fePointLight, +## feSpotLight, feFuncR, feFuncG, feFuncB, feFuncA +## +## This module declares markup to provide support for filter effect. +## +[ xml:lang = "en" ] +grammar { + include "svg-basic-filter.rnc" + + ## + ## extend SVG.FilterPrimitive.class + ## + SVG.FilterPrimitive.class |= + feConvolveMatrix + | feDiffuseLighting + | feDisplacementMap + | feMorphology + | feSpecularLighting + | feTurbulence + a:documentation [ + "\x{a}" ~ + " feConvolveMatrix: Filter Effect Convolve Matrix Element\x{a}" ~ + " " + ] + SVG.feConvolveMatrix.content = (animate | set)* + feConvolveMatrix = + element feConvolveMatrix { + attlist.feConvolveMatrix, SVG.feConvolveMatrix.content + } + attlist.feConvolveMatrix &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute order { NumberOptionalNumber.datatype }, + attribute kernelMatrix { text }, + attribute divisor { Number.datatype }?, + attribute bias { Number.datatype }?, + attribute targetX { Integer.datatype }?, + attribute targetY { Integer.datatype }?, + [ a:defaultValue = "duplicate" ] + attribute edgeMode { "duplicate" | "wrap" | "none" }?, + attribute kernelUnitLength { NumberOptionalNumber.datatype }?, + attribute preserveAlpha { Boolean.datatype }? + a:documentation [ + "\x{a}" ~ + " feDiffuseLighting: Filter Effect Diffuse Lighting Element\x{a}" ~ + " " + ] + SVG.feDiffuseLighting.content = + (feDistantLight | fePointLight | feSpotLight), + (animate | set | animateColor)* + feDiffuseLighting = + element feDiffuseLighting { + attlist.feDiffuseLighting, SVG.feDiffuseLighting.content + } + attlist.feDiffuseLighting &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Color.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute lighting-color { SVGColor.datatype }?, + attribute surfaceScale { Number.datatype }?, + attribute diffuseConstant { Number.datatype }?, + attribute kernelUnitLength { NumberOptionalNumber.datatype }? + a:documentation [ + "\x{a}" ~ + " feDisplacementMap: Filter Effect Displacement Map Element\x{a}" ~ + " " + ] + SVG.feDisplacementMap.content = (animate | set)* + feDisplacementMap = + element feDisplacementMap { + attlist.feDisplacementMap, SVG.feDisplacementMap.content + } + attlist.feDisplacementMap &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute in2 { text }, + attribute scale { Number.datatype }?, + [ a:defaultValue = "A" ] + attribute xChannelSelector { "R" | "G" | "B" | "A" }?, + [ a:defaultValue = "A" ] + attribute yChannelSelector { "R" | "G" | "B" | "A" }? + a:documentation [ + "\x{a}" ~ + " feMorphology: Filter Effect Morphology Element\x{a}" ~ + " " + ] + SVG.feMorphology.content = (animate | set)* + feMorphology = + element feMorphology { + attlist.feMorphology, SVG.feMorphology.content + } + attlist.feMorphology &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + [ a:defaultValue = "erode" ] + attribute operator { "erode" | "dilate" }?, + attribute radius { NumberOptionalNumber.datatype }? + a:documentation [ + "\x{a}" ~ + " feSpecularLighting: Filter Effect Specular Lighting Element\x{a}" ~ + " " + ] + SVG.feSpecularLighting.content = + (feDistantLight | fePointLight | feSpotLight), + (animate | set | animateColor)* + feSpecularLighting = + element feSpecularLighting { + attlist.feSpecularLighting, SVG.feSpecularLighting.content + } + attlist.feSpecularLighting &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Color.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute lighting-color { SVGColor.datatype }?, + attribute surfaceScale { Number.datatype }?, + attribute specularConstant { Number.datatype }?, + attribute specularExponent { Number.datatype }?, + attribute kernelUnitLength { NumberOptionalNumber.datatype }? + a:documentation [ + "\x{a}" ~ + " feTurbulence: Filter Effect Turbulence Element\x{a}" ~ + " " + ] + SVG.feTurbulence.content = (animate | set)* + feTurbulence = + element feTurbulence { + attlist.feTurbulence, SVG.feTurbulence.content + } + attlist.feTurbulence &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitive.attrib, + attribute baseFrequency { NumberOptionalNumber.datatype }?, + attribute numOctaves { Integer.datatype }?, + attribute seed { Number.datatype }?, + [ a:defaultValue = "noStitch" ] + attribute stitchTiles { "stitch" | "noStitch" }?, + [ a:defaultValue = "turbulence" ] + attribute type { "fractalNoise" | "turbulence" }? + a:documentation [ + "\x{a}" ~ + " feDistantLight: Filter Effect Distant Light Element\x{a}" ~ + " " + ] + SVG.feDistantLight.content = (animate | set)* + feDistantLight = + element feDistantLight { + attlist.feDistantLight, SVG.feDistantLight.content + } + attlist.feDistantLight &= + SVG.Core.attrib, + attribute azimuth { Number.datatype }?, + attribute elevation { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " fePointLight: Filter Effect Point Light Element\x{a}" ~ + " " + ] + SVG.fePointLight.content = (animate | set)* + fePointLight = + element fePointLight { + attlist.fePointLight, SVG.fePointLight.content + } + attlist.fePointLight &= + SVG.Core.attrib, + attribute x { Number.datatype }?, + attribute y { Number.datatype }?, + attribute z { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " feSpotLight: Filter Effect Spot Light Element\x{a}" ~ + " " + ] + SVG.feSpotLight.content = (animate | set)* + feSpotLight = + element feSpotLight { attlist.feSpotLight, SVG.feSpotLight.content } + attlist.feSpotLight &= + SVG.Core.attrib, + attribute x { Number.datatype }?, + attribute y { Number.datatype }?, + attribute z { Number.datatype }?, + attribute pointsAtX { Number.datatype }?, + attribute pointsAtY { Number.datatype }?, + attribute pointsAtZ { Number.datatype }?, + attribute specularExponent { Number.datatype }?, + attribute limitingConeAngle { Number.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-filter.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-filter.rng new file mode 100644 index 00000000000..72bc2c37c50 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-filter.rng @@ -0,0 +1,468 @@ + + + + SVG 1.1 Filter Module + file: svg-filter.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-filter.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Filter + + filter, feBlend, feColorMatrix, feComponentTransfer, feComposite, + feConvolveMatrix, feDiffuseLighting, feDisplacementMap, feFlood, + feGaussianBlur, feImage, feMerge, feMergeNode, feMorphology, feOffset, + feSpecularLighting, feTile, feTurbulence, feDistantLight, fePointLight, + feSpotLight, feFuncR, feFuncG, feFuncB, feFuncA + + This module declares markup to provide support for filter effect. + + + + + extend SVG.FilterPrimitive.class + + + + + + + + + + + + feConvolveMatrix: Filter Effect Convolve Matrix Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + duplicate + wrap + none + + + + + + + + + + + + + + + + feDiffuseLighting: Filter Effect Diffuse Lighting Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feDisplacementMap: Filter Effect Displacement Map Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + R + G + B + A + + + + + + + R + G + B + A + + + + + + feMorphology: Filter Effect Morphology Element + + + + + + + + + + + + + + + + + + + + + + + erode + dilate + + + + + + + + + + + feSpecularLighting: Filter Effect Specular Lighting Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feTurbulence: Filter Effect Turbulence Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + stitch + noStitch + + + + + + + fractalNoise + turbulence + + + + + + feDistantLight: Filter Effect Distant Light Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fePointLight: Filter Effect Point Light Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feSpotLight: Filter Effect Spot Light Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-font.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-font.rnc new file mode 100644 index 00000000000..f14e10c2342 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-font.rnc @@ -0,0 +1,108 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Font Module +## file: svg-font.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-font.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Font +## +## font, font-face, glyph, missing-glyph, hkern, vkern, font-face-src, +## font-face-uri, font-face-format, font-face-name, definition-src +## +## This module declares markup to provide support for template. +## +[ xml:lang = "en" ] +grammar { + include "svg-basic-font.rnc" + a:documentation [ + "\x{a}" ~ + " font-face: Font Face Element\x{a}" ~ + " " + ] + SVG.font-face.extra.class &= definition-src? + a:documentation [ "\x{a}" ~ " glyph: Glyph Element\x{a}" ~ " " ] + SVG.glyph.class |= + SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class + a:documentation [ + "\x{a}" ~ + " missing-glyph: Missing Glyph Element\x{a}" ~ + " " + ] + SVG.missing-glyph.class |= + SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class + a:documentation [ + "\x{a}" ~ + " font-face-uri: Font Face URI Element\x{a}" ~ + " " + ] + SVG.font-face-uri.content |= font-face-format* + a:documentation [ + "\x{a}" ~ + " font-face-format: Font Face Format Element\x{a}" ~ + " " + ] + SVG.font-face-format.content = empty + font-face-format = + element font-face-format { + attlist.font-face-format, SVG.font-face-format.content + } + attlist.font-face-format &= + SVG.Core.attrib, + attribute string { text }? + a:documentation [ + "\x{a}" ~ + " definition-src: Definition Source Element\x{a}" ~ + " " + ] + SVG.definition-src.content = empty + definition-src = + element definition-src { + attlist.definition-src, SVG.definition-src.content + } + attlist.definition-src &= SVG.Core.attrib, SVG.XLinkRequired.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-font.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-font.rng new file mode 100644 index 00000000000..f5da47c17ed --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-font.rng @@ -0,0 +1,123 @@ + + + + SVG 1.1 Font Module + file: svg-font.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-font.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Font + + font, font-face, glyph, missing-glyph, hkern, vkern, font-face-src, + font-face-uri, font-face-format, font-face-name, definition-src + + This module declares markup to provide support for template. + + + + font-face: Font Face Element + + + + + + + + glyph: Glyph Element + + + + + + + + + + + + + + + + + + + + + + + + + + missing-glyph: Missing Glyph Element + + + + + + + + + + + + + + + + + + + + + + + + + + font-face-uri: Font Face URI Element + + + + + + + + font-face-format: Font Face Format Element + + + + + + + + + + + + + + + + + + definition-src: Definition Source Element + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-gradient.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-gradient.rnc new file mode 100644 index 00000000000..e8c6e60525f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-gradient.rnc @@ -0,0 +1,99 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Gradient Module +## file: svg-gradient.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-gradient.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Gradient +## +## linearGradient, radialGradient, stop +## +## This module declares markup to provide support for gradient fill. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + NumberOrPercentage.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Gradient.attrib\x{a}" ~ " " ] + SVG.Gradient.extra.attrib = empty + SVG.Gradient.attrib &= + attribute stop-color { SVGColor.datatype }?, + attribute stop-opacity { OpacityValue.datatype }?, + SVG.Gradient.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Gradient.class\x{a}" ~ " " ] + SVG.Gradient.extra.class = notAllowed + SVG.Gradient.class |= + linearGradient | radialGradient | SVG.Gradient.extra.class + a:documentation [ + "\x{a}" ~ + " linearGradient: Linear Gradient Element\x{a}" ~ + " " + ] + SVG.linearGradient.content = + SVG.Description.class*, (stop | animate | set | animateTransform)* + linearGradient = + element linearGradient { + attlist.linearGradient, SVG.linearGradient.content + } + attlist.linearGradient &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Color.attrib, + SVG.Gradient.attrib, + SVG.XLink.attrib, + SVG.External.attrib, + attribute x1 { Coordinate.datatype }?, + attribute y1 { Coordinate.datatype }?, + attribute x2 { Coordinate.datatype }?, + attribute y2 { Coordinate.datatype }?, + attribute gradientUnits { "userSpaceOnUse" | "objectBoundingBox" }?, + attribute gradientTransform { TransformList.datatype }?, + attribute spreadMethod { "pad" | "reflect" | "repeat" }? + a:documentation [ + "\x{a}" ~ + " radialGradient: Radial Gradient Element\x{a}" ~ + " " + ] + SVG.radialGradient.content = + SVG.Description.class*, (stop | animate | set | animateTransform)* + radialGradient = + element radialGradient { + attlist.radialGradient, SVG.radialGradient.content + } + attlist.radialGradient &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Color.attrib, + SVG.Gradient.attrib, + SVG.XLink.attrib, + SVG.External.attrib, + attribute cx { Coordinate.datatype }?, + attribute cy { Coordinate.datatype }?, + attribute r { Length.datatype }?, + attribute fx { Coordinate.datatype }?, + attribute fy { Coordinate.datatype }?, + attribute gradientUnits { "userSpaceOnUse" | "objectBoundingBox" }?, + attribute gradientTransform { TransformList.datatype }?, + attribute spreadMethod { "pad" | "reflect" | "repeat" }? + a:documentation [ "\x{a}" ~ " stop: Stop Element\x{a}" ~ " " ] + SVG.stop.content = (animate | set | animateColor)* + stop = element stop { attlist.stop, SVG.stop.content } + attlist.stop &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Color.attrib, + SVG.Gradient.attrib, + attribute offset { NumberOrPercentage.datatype } +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-gradient.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-gradient.rng new file mode 100644 index 00000000000..a13c68f8341 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-gradient.rng @@ -0,0 +1,233 @@ + + + + SVG 1.1 Gradient Module + file: svg-gradient.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-gradient.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Gradient + + linearGradient, radialGradient, stop + + This module declares markup to provide support for gradient fill. + + + Datatypes + + + + + + SVG.Gradient.attrib + + + + + + + + + + + + + + + + + + + SVG.Gradient.class + + + + + + + + + + + + + linearGradient: Linear Gradient Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + + + + + + + + pad + reflect + repeat + + + + + + radialGradient: Radial Gradient Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + + + + + + + + pad + reflect + repeat + + + + + + stop: Stop Element + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-graphevents-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-graphevents-attrib.rnc new file mode 100644 index 00000000000..e5828f3dab8 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-graphevents-attrib.rnc @@ -0,0 +1,47 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Graphical Element Events Attribute Module +## file: svg-graphevents-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-graphevents-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Graphical Element Events Attribute +## +## onfocusin, onfocusout, onactivate, onclick, onmousedown, onmouseup, +## onmouseover, onmousemove, onmouseout, onload +## +## This module defines the GraphicalEvents attribute set. +## +[ xml:lang = "en" ] +grammar { + SVG.onfocusin.attrib = attribute onfocusin { Script.datatype }? + SVG.onfocusout.attrib = attribute onfocusout { Script.datatype }? + SVG.onactivate.attrib = attribute onactivate { Script.datatype }? + SVG.onclick.attrib = attribute onclick { Script.datatype }? + SVG.onmousedown.attrib = attribute onmousedown { Script.datatype }? + SVG.onmouseup.attrib = attribute onmouseup { Script.datatype }? + SVG.onmouseover.attrib = attribute onmouseover { Script.datatype }? + SVG.onmousemove.attrib = attribute onmousemove { Script.datatype }? + SVG.onmouseout.attrib = attribute onmouseout { Script.datatype }? + SVG.onload.attrib &= attribute onload { Script.datatype }? + SVG.GraphicalEvents.extra.attrib = empty + SVG.GraphicalEvents.attrib &= + SVG.onfocusin.attrib, + SVG.onfocusout.attrib, + SVG.onactivate.attrib, + SVG.onclick.attrib, + SVG.onmousedown.attrib, + SVG.onmouseup.attrib, + SVG.onmouseover.attrib, + SVG.onmousemove.attrib, + SVG.onmouseout.attrib, + SVG.onload.attrib, + SVG.GraphicalEvents.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-graphevents-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-graphevents-attrib.rng new file mode 100644 index 00000000000..4a69371858f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-graphevents-attrib.rng @@ -0,0 +1,106 @@ + + + + SVG 1.1 Graphical Element Events Attribute Module + file: svg-graphevents-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-graphevents-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Graphical Element Events Attribute + + onfocusin, onfocusout, onactivate, onclick, onmousedown, onmouseup, + onmouseover, onmousemove, onmouseout, onload + + This module defines the GraphicalEvents attribute set. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-graphics-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-graphics-attrib.rnc new file mode 100644 index 00000000000..bbf132ab971 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-graphics-attrib.rnc @@ -0,0 +1,64 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" +namespace ns1 = "http://www.w3.org/2000/svg" + + +## +## SVG 1.1 Graphics Attribute Module +## file: svg-graphics-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-graphics-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Graphics Attribute +## +## display, image-rendering, pointer-events, shape-rendering, +## text-rendering, visibility +## +## This module defines the Graphics attribute set. +## +[ xml:lang = "en" ] +grammar { + include "svg-basic-graphics-attrib.rnc" inherit = ns1 + SVG.image-rendering.attrib = + attribute image-rendering { + "auto" | "optimizeSpeed" | "optimizeQuality" | "inherit" + }? + SVG.pointer-events.attrib = + attribute pointer-events { + "visiblePainted" + | "visibleFill" + | "visibleStroke" + | "visible" + | "painted" + | "fill" + | "stroke" + | "all" + | "none" + | "inherit" + }? + SVG.shape-rendering.attrib = + attribute shape-rendering { + "auto" + | "optimizeSpeed" + | "crispEdges" + | "geometricPrecision" + | "inherit" + }? + SVG.text-rendering.attrib = + attribute text-rendering { + "auto" + | "optimizeSpeed" + | "optimizeLegibility" + | "geometricPrecision" + | "inherit" + }? + SVG.Graphics.attrib &= + SVG.image-rendering.attrib, + SVG.pointer-events.attrib, + SVG.shape-rendering.attrib, + SVG.text-rendering.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-graphics-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-graphics-attrib.rng new file mode 100644 index 00000000000..fb8b6c62348 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-graphics-attrib.rng @@ -0,0 +1,83 @@ + + + + SVG 1.1 Graphics Attribute Module + file: svg-graphics-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-graphics-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Graphics Attribute + + display, image-rendering, pointer-events, shape-rendering, + text-rendering, visibility + + This module defines the Graphics attribute set. + + + + + + + auto + optimizeSpeed + optimizeQuality + inherit + + + + + + + + + visiblePainted + visibleFill + visibleStroke + visible + painted + fill + stroke + all + none + inherit + + + + + + + + + auto + optimizeSpeed + crispEdges + geometricPrecision + inherit + + + + + + + + + auto + optimizeSpeed + optimizeLegibility + geometricPrecision + inherit + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-hyperlink.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-hyperlink.rnc new file mode 100644 index 00000000000..705e3e3334d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-hyperlink.rnc @@ -0,0 +1,66 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Hyperlinking Module +## file: svg-hyperlink.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-hyperlink.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Hyperlinking +## +## a +## +## This module declares markup to provide support for hyper linking. +## +[ xml:lang = "en" ] +grammar { + + ## + ## link to this target + ## + LinkTarget.datatype = xsd:NMTOKEN + a:documentation [ "\x{a}" ~ " SVG.Hyperlink.class\x{a}" ~ " " ] + SVG.Hyperlink.extra.class = notAllowed + SVG.Hyperlink.class |= a | SVG.Hyperlink.extra.class + a:documentation [ "\x{a}" ~ " a: Anchor Element\x{a}" ~ " " ] + SVG.a.content = + (text + | SVG.Description.class + | SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class)* + a = element a { attlist.a, SVG.a.content } + attlist.a &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.GraphicalEvents.attrib, + SVG.XLinkReplace.attrib, + SVG.External.attrib, + attribute transform { TransformList.datatype }?, + attribute target { LinkTarget.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-hyperlink.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-hyperlink.rng new file mode 100644 index 00000000000..1e0c1807091 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-hyperlink.rng @@ -0,0 +1,92 @@ + + + + SVG 1.1 Hyperlinking Module + file: svg-hyperlink.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-hyperlink.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Hyperlinking + + a + + This module declares markup to provide support for hyper linking. + + + + link to this target + + + + + SVG.Hyperlink.class + + + + + + + + + + + + a: Anchor Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-image.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-image.rnc new file mode 100644 index 00000000000..0dffc8e1b92 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-image.rnc @@ -0,0 +1,56 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Image Module +## file: svg-image.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-image.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Image +## +## image +## +## This module declares markup to provide support for image. +## + +## +## SVG.Image.class +## +[ xml:lang = "en" ] +grammar { + SVG.Image.extra.class = notAllowed + SVG.Image.class |= image | SVG.Image.extra.class + a:documentation [ "\x{a}" ~ " image: Image Element\x{a}" ~ " " ] + SVG.image.content = SVG.Description.class*, SVG.Animation.class* + image = element image { attlist.image, SVG.image.content } + attlist.image &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Viewport.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Profile.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.XLinkEmbed.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }, + attribute height { Length.datatype }, + [ a:defaultValue = "xMidYMid meet" ] + attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }?, + attribute transform { TransformList.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-image.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-image.rng new file mode 100644 index 00000000000..8b02c532890 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-image.rng @@ -0,0 +1,91 @@ + + + + SVG 1.1 Image Module + file: svg-image.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-image.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Image + + image + + This module declares markup to provide support for image. + + + SVG.Image.class + + + + + + + + + + + + image: Image Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-marker.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-marker.rnc new file mode 100644 index 00000000000..bfb7c316bd5 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-marker.rnc @@ -0,0 +1,76 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Marker Module +## file: svg-marker.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-marker.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Marker +## +## marker +## +## This module declares markup to provide support for marker. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + MarkerValue.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Marker.attrib\x{a}" ~ " " ] + SVG.Marker.extra.attrib = empty + SVG.Marker.attrib &= + attribute marker-start { MarkerValue.datatype }?, + attribute marker-mid { MarkerValue.datatype }?, + attribute marker-end { MarkerValue.datatype }?, + SVG.Marker.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Marker.class\x{a}" ~ " " ] + SVG.Marker.extra.class = notAllowed + SVG.Marker.class |= marker | SVG.Marker.extra.class + a:documentation [ "\x{a}" ~ " marker: Marker Element\x{a}" ~ " " ] + SVG.marker.content = + (SVG.Description.class + | SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class)* + marker = element marker { attlist.marker, SVG.marker.content } + attlist.marker &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.External.attrib, + attribute refX { Coordinate.datatype }?, + attribute refY { Coordinate.datatype }?, + attribute markerUnits { "strokeWidth" | "userSpaceOnUse" }?, + attribute markerWidth { Length.datatype }?, + attribute markerHeight { Length.datatype }?, + attribute orient { text }?, + attribute viewBox { ViewBoxSpec.datatype }?, + [ a:defaultValue = "xMidYMid meet" ] + attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-marker.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-marker.rng new file mode 100644 index 00000000000..ef30e1d60c1 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-marker.rng @@ -0,0 +1,143 @@ + + + + SVG 1.1 Marker Module + file: svg-marker.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-marker.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Marker + + marker + + This module declares markup to provide support for marker. + + + Datatypes + + + + + + SVG.Marker.attrib + + + + + + + + + + + + + + + + + + + + + + + + SVG.Marker.class + + + + + + + + + + + + marker: Marker Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + strokeWidth + userSpaceOnUse + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-mask.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-mask.rnc new file mode 100644 index 00000000000..c5b8722bf8f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-mask.rnc @@ -0,0 +1,74 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Mask Module +## file: svg-mask.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-mask.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Mask +## +## mask +## +## This module declares markup to provide support for masking. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + MaskValue.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Mask.attrib\x{a}" ~ " " ] + SVG.Mask.extra.attrib = empty + SVG.Mask.attrib &= + attribute mask { MaskValue.datatype }?, + SVG.Mask.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Mask.class\x{a}" ~ " " ] + SVG.Mask.extra.class = notAllowed + SVG.Mask.class |= mask | SVG.Mask.extra.class + a:documentation [ "\x{a}" ~ " mask: Mask Element\x{a}" ~ " " ] + SVG.mask.content = + (SVG.Description.class + | SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class)* + mask = element mask { attlist.mask, SVG.mask.content } + attlist.mask &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }?, + attribute height { Length.datatype }?, + attribute maskUnits { "userSpaceOnUse" | "objectBoundingBox" }?, + attribute maskContentUnits { + "userSpaceOnUse" | "objectBoundingBox" + }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-mask.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-mask.rng new file mode 100644 index 00000000000..ca25e47915d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-mask.rng @@ -0,0 +1,129 @@ + + + + SVG 1.1 Mask Module + file: svg-mask.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-mask.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Mask + + mask + + This module declares markup to provide support for masking. + + + Datatypes + + + + + + SVG.Mask.attrib + + + + + + + + + + + + + + SVG.Mask.class + + + + + + + + + + + + mask: Mask Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-opacity-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-opacity-attrib.rnc new file mode 100644 index 00000000000..c794117b5fa --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-opacity-attrib.rnc @@ -0,0 +1,34 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Paint Opacity Attribute Module +## file: svg-opacity-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-opacity-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Paint Opacity Attribute +## +## opacity, fill-opacity, stroke-opacity +## +## This module defines the Opacity attribute set. +## +[ xml:lang = "en" ] +grammar { + SVG.opacity.attrib = attribute opacity { OpacityValue.datatype }? + SVG.fill-opacity.attrib = + attribute fill-opacity { OpacityValue.datatype }? + SVG.stroke-opacity.attrib = + attribute stroke-opacity { OpacityValue.datatype }? + SVG.Opacity.extra.attrib = empty + SVG.Opacity.attrib &= + SVG.opacity.attrib, + SVG.fill-opacity.attrib, + SVG.stroke-opacity.attrib, + SVG.Opacity.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-opacity-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-opacity-attrib.rng new file mode 100644 index 00000000000..44458f8b805 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-opacity-attrib.rng @@ -0,0 +1,49 @@ + + + + SVG 1.1 Paint Opacity Attribute Module + file: svg-opacity-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-opacity-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Paint Opacity Attribute + + opacity, fill-opacity, stroke-opacity + + This module defines the Opacity attribute set. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-paint-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-paint-attrib.rnc new file mode 100644 index 00000000000..bcb9ccce9e4 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-paint-attrib.rnc @@ -0,0 +1,97 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Paint Attribute Module +## file: svg-paint-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-paint-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Paint Attribute +## +## fill, fill-rule, stroke, stroke-dasharray, stroke-dashoffset, +## stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-width, color, +## color-interpolation, color-rendering +## +## This module defines the Paint and Color attribute sets. +## +[ xml:lang = "en" ] +grammar { + + ## + ## a 'fill' or 'stroke' property/attribute value: + ## + Paint.datatype = xsd:string + + ## + ## 'stroke-dasharray' property/attribute value + ## (e.g., 'none', list of s) + ## + StrokeDashArrayValue.datatype = xsd:string + + ## + ## 'stroke-dashoffset' property/attribute value (e.g., 'none', ) + ## + StrokeDashOffsetValue.datatype = xsd:string + + ## + ## 'stroke-miterlimit' property/attribute value (e.g., ) + ## + StrokeMiterLimitValue.datatype = xsd:string + + ## + ## 'stroke-width' property/attribute value (e.g., ) + ## + StrokeWidthValue.datatype = xsd:string + SVG.fill.attrib = attribute fill { Paint.datatype }? + SVG.fill-rule.attrib = attribute fill-rule { ClipFillRule.datatype }? + SVG.stroke.attrib = attribute stroke { Paint.datatype }? + SVG.stroke-dasharray.attrib = + attribute stroke-dasharray { StrokeDashArrayValue.datatype }? + SVG.stroke-dashoffset.attrib = + attribute stroke-dashoffset { StrokeDashOffsetValue.datatype }? + SVG.stroke-linecap.attrib = + attribute stroke-linecap { + "butt" | "round" | "square" | "inherit" + }? + SVG.stroke-linejoin.attrib = + attribute stroke-linejoin { + "miter" | "round" | "bevel" | "inherit" + }? + SVG.stroke-miterlimit.attrib = + attribute stroke-miterlimit { StrokeMiterLimitValue.datatype }? + SVG.stroke-width.attrib = + attribute stroke-width { StrokeWidthValue.datatype }? + SVG.Paint.extra.attrib = empty + SVG.Paint.attrib &= + SVG.fill.attrib, + SVG.fill-rule.attrib, + SVG.stroke.attrib, + SVG.stroke-dasharray.attrib, + SVG.stroke-dashoffset.attrib, + SVG.stroke-linecap.attrib, + SVG.stroke-linejoin.attrib, + SVG.stroke-miterlimit.attrib, + SVG.stroke-width.attrib, + SVG.Paint.extra.attrib + SVG.color.attrib = attribute color { Color.datatype }? + SVG.color-interpolation.attrib = + attribute color-interpolation { + "auto" | "sRGB" | "linearRGB" | "inherit" + }? + SVG.color-rendering.attrib = + attribute color-rendering { + "auto" | "optimizeSpeed" | "optimizeQuality" | "inherit" + }? + SVG.Color.extra.attrib = empty + SVG.Color.attrib &= + SVG.color.attrib, + SVG.color-interpolation.attrib, + SVG.color-rendering.attrib, + SVG.Color.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-paint-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-paint-attrib.rng new file mode 100644 index 00000000000..fe9d499edca --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-paint-attrib.rng @@ -0,0 +1,180 @@ + + + + SVG 1.1 Paint Attribute Module + file: svg-paint-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-paint-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Paint Attribute + + fill, fill-rule, stroke, stroke-dasharray, stroke-dashoffset, + stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-width, color, + color-interpolation, color-rendering + + This module defines the Paint and Color attribute sets. + + + + a 'fill' or 'stroke' property/attribute value: <paint> + + + + + + 'stroke-dasharray' property/attribute value + (e.g., 'none', list of <number>s) + + + + + + 'stroke-dashoffset' property/attribute value (e.g., 'none', <legnth>) + + + + + + 'stroke-miterlimit' property/attribute value (e.g., <number>) + + + + + + 'stroke-width' property/attribute value (e.g., <length>) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + butt + round + square + inherit + + + + + + + + + miter + round + bevel + inherit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + auto + sRGB + linearRGB + inherit + + + + + + + + + auto + optimizeSpeed + optimizeQuality + inherit + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-pattern.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-pattern.rnc new file mode 100644 index 00000000000..0a538fe96a8 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-pattern.rnc @@ -0,0 +1,76 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Pattern Module +## file: svg-pattern.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-pattern.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Pattern +## +## pattern +## +## This module declares markup to provide support for pattern fill. +## + +## +## SVG.Pattern.class +## +[ xml:lang = "en" ] +grammar { + SVG.Pattern.extra.class = notAllowed + SVG.Pattern.class |= pattern | SVG.Pattern.extra.class + a:documentation [ + "\x{a}" ~ + " pattern: Pattern Element\x{a}" ~ + " " + ] + SVG.pattern.content = + (SVG.Description.class + | SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class)* + pattern = element pattern { attlist.pattern, SVG.pattern.content } + attlist.pattern &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.XLink.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }?, + attribute height { Length.datatype }?, + attribute patternUnits { "userSpaceOnUse" | "objectBoundingBox" }?, + attribute patternContentUnits { + "userSpaceOnUse" | "objectBoundingBox" + }?, + attribute patternTransform { TransformList.datatype }?, + attribute viewBox { ViewBoxSpec.datatype }?, + [ a:defaultValue = "xMidYMid meet" ] + attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-pattern.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-pattern.rng new file mode 100644 index 00000000000..371521b1688 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-pattern.rng @@ -0,0 +1,125 @@ + + + + SVG 1.1 Pattern Module + file: svg-pattern.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-pattern.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Pattern + + pattern + + This module declares markup to provide support for pattern fill. + + + SVG.Pattern.class + + + + + + + + + + + + pattern: Pattern Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-profile.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-profile.rnc new file mode 100644 index 00000000000..ba154bdca8b --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-profile.rnc @@ -0,0 +1,58 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Color Profile Module +## file: svg-profile.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-profile.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Color Profile +## +## color-profile +## +## This module declares markup to provide support for color profile. +## + +## +## SVG.Profile.attrib +## +[ xml:lang = "en" ] +grammar { + SVG.Profile.extra.attrib = empty + SVG.Profile.attrib &= + attribute color-profile { text }?, + SVG.Profile.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Profile.class\x{a}" ~ " " ] + SVG.Profile.extra.class = notAllowed + SVG.Profile.class |= color-profile | SVG.Profile.extra.class + a:documentation [ + "\x{a}" ~ + " color-profile: Color Profile Element\x{a}" ~ + " " + ] + SVG.color-profile.content = SVG.Description.class* + color-profile = + element color-profile { + attlist.color-profile, SVG.color-profile.content + } + attlist.color-profile &= + SVG.Core.attrib, + SVG.XLink.attrib, + attribute local { text }?, + attribute name { text }, + [ a:defaultValue = "auto" ] + attribute rendering-intent { + "auto" + | "perceptual" + | "relative-colorimetric" + | "saturation" + | "absolute-colorimetric" + }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-profile.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-profile.rng new file mode 100644 index 00000000000..11834192f0f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-profile.rng @@ -0,0 +1,76 @@ + + + + SVG 1.1 Color Profile Module + file: svg-profile.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-profile.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Color Profile + + color-profile + + This module declares markup to provide support for color profile. + + + SVG.Profile.attrib + + + + + + + + + + + + SVG.Profile.class + + + + + + + + + + + + color-profile: Color Profile Element + + + + + + + + + + + + + + + + + + + + + + + auto + perceptual + relative-colorimetric + saturation + absolute-colorimetric + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-qname.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-qname.rng new file mode 100644 index 00000000000..e4a9e19f87c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-qname.rng @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-script.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-script.rnc new file mode 100644 index 00000000000..a990e5497fc --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-script.rnc @@ -0,0 +1,38 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Scripting Module +## file: svg-script.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-script.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Scripting +## +## script +## +## This module declares markup to provide support for scripting. +## + +## +## SVG.Script.class +## +[ xml:lang = "en" ] +grammar { + SVG.Script.extra.class = notAllowed + SVG.Script.class |= script | SVG.Script.extra.class + a:documentation [ "\x{a}" ~ " script: Script Element\x{a}" ~ " " ] + SVG.script.content = text + script = element script { attlist.script, SVG.script.content } + attlist.script &= + SVG.Core.attrib, + SVG.XLink.attrib, + SVG.External.attrib, + attribute type { ContentType.datatype } +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-script.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-script.rng new file mode 100644 index 00000000000..4e21020a398 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-script.rng @@ -0,0 +1,51 @@ + + + + SVG 1.1 Scripting Module + file: svg-script.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-script.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Scripting + + script + + This module declares markup to provide support for scripting. + + + SVG.Script.class + + + + + + + + + + + + script: Script Element + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-shape.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-shape.rnc new file mode 100644 index 00000000000..cc80462b97d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-shape.rnc @@ -0,0 +1,207 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Shape Module +## file: svg-shape.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-shape.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Shape +## +## path, rect, circle, line, ellipse, polyline, polygon +## +## This module declares markup to provide support for graphical shapes. +## +[ xml:lang = "en" ] +grammar { + + ## + ## a list of points + ## + Points.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Shape.class\x{a}" ~ " " ] + SVG.Shape.extra.class = notAllowed + SVG.Shape.class |= + path + | rect + | circle + | line + | ellipse + | polyline + | polygon + | SVG.Shape.extra.class + a:documentation [ "\x{a}" ~ " path: Path Element\x{a}" ~ " " ] + SVG.path.content = SVG.Description.class*, SVG.Animation.class* + path = element path { attlist.path, SVG.path.content } + attlist.path &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Marker.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute d { PathData.datatype }, + attribute pathLength { Number.datatype }?, + attribute transform { TransformList.datatype }? + a:documentation [ + "\x{a}" ~ + " rect: Rectangle Element\x{a}" ~ + " " + ] + SVG.rect.content = SVG.Description.class*, SVG.Animation.class* + rect = element rect { attlist.rect, SVG.rect.content } + attlist.rect &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }, + attribute height { Length.datatype }, + attribute rx { Length.datatype }?, + attribute ry { Length.datatype }?, + attribute transform { TransformList.datatype }? + a:documentation [ "\x{a}" ~ " circle: Circle Element\x{a}" ~ " " ] + SVG.circle.content = SVG.Description.class*, SVG.Animation.class* + circle = element circle { attlist.circle, SVG.circle.content } + attlist.circle &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute cx { Coordinate.datatype }?, + attribute cy { Coordinate.datatype }?, + attribute r { Length.datatype }, + attribute transform { TransformList.datatype }? + a:documentation [ "\x{a}" ~ " line: Line Element\x{a}" ~ " " ] + SVG.line.content = SVG.Description.class*, SVG.Animation.class* + line = element line { attlist.line, SVG.line.content } + attlist.line &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Marker.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute x1 { Coordinate.datatype }?, + attribute y1 { Coordinate.datatype }?, + attribute x2 { Coordinate.datatype }?, + attribute y2 { Coordinate.datatype }?, + attribute transform { TransformList.datatype }? + a:documentation [ + "\x{a}" ~ + " ellipse: Ellipse Element\x{a}" ~ + " " + ] + SVG.ellipse.content = SVG.Description.class*, SVG.Animation.class* + ellipse = element ellipse { attlist.ellipse, SVG.ellipse.content } + attlist.ellipse &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute cx { Coordinate.datatype }?, + attribute cy { Coordinate.datatype }?, + attribute rx { Length.datatype }, + attribute ry { Length.datatype }, + attribute transform { TransformList.datatype }? + a:documentation [ + "\x{a}" ~ + " polyline: Polyline Element\x{a}" ~ + " " + ] + SVG.polyline.content = SVG.Description.class*, SVG.Animation.class* + polyline = element polyline { attlist.polyline, SVG.polyline.content } + attlist.polyline &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Marker.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute points { Points.datatype }, + attribute transform { TransformList.datatype }? + a:documentation [ + "\x{a}" ~ + " polygon: Polygon Element\x{a}" ~ + " " + ] + SVG.polygon.content = SVG.Description.class*, SVG.Animation.class* + polygon = element polygon { attlist.polygon, SVG.polygon.content } + attlist.polygon &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Marker.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute points { Points.datatype }, + attribute transform { TransformList.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-shape.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-shape.rng new file mode 100644 index 00000000000..c931bab7ae2 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-shape.rng @@ -0,0 +1,395 @@ + + + + SVG 1.1 Shape Module + file: svg-shape.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-shape.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Shape + + path, rect, circle, line, ellipse, polyline, polygon + + This module declares markup to provide support for graphical shapes. + + + + a list of points + + + + + SVG.Shape.class + + + + + + + + + + + + + + + + + + path: Path Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rect: Rectangle Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + circle: Circle Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + line: Line Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ellipse: Ellipse Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + polyline: Polyline Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + polygon: Polygon Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-structure.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-structure.rnc new file mode 100644 index 00000000000..370c4259c05 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-structure.rnc @@ -0,0 +1,62 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Structure Module +## file: svg-structure.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-structure.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Structure +## +## svg, g, defs, desc, title, metadata, symbol, use +## +## This module declares the major structural elements and their attributes. +## +[ xml:lang = "en" ] +grammar { + include "svg-basic-structure.rnc" + + ## + ## extend SVG.Structure.class + ## + SVG.Structure.class |= symbol + a:documentation [ "\x{a}" ~ " symbol: Symbol Element\x{a}" ~ " " ] + SVG.symbol.content = + (SVG.Description.class + | SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class)* + symbol = element symbol { attlist.symbol, SVG.symbol.content } + attlist.symbol &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.GraphicalEvents.attrib, + SVG.External.attrib, + attribute viewBox { ViewBoxSpec.datatype }?, + [ a:defaultValue = "xMidYMid meet" ] + attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-structure.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-structure.rng new file mode 100644 index 00000000000..533d3462646 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-structure.rng @@ -0,0 +1,78 @@ + + + + SVG 1.1 Structure Module + file: svg-structure.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-structure.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Structure + + svg, g, defs, desc, title, metadata, symbol, use + + This module declares the major structural elements and their attributes. + + + + + extend SVG.Structure.class + + + + + symbol: Symbol Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-style.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-style.rnc new file mode 100644 index 00000000000..68c7f48c1a3 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-style.rnc @@ -0,0 +1,56 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Style Module +## file: svg-style.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-style.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Style +## +## style +## +## This module declares markup to provide support for stylesheet. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + ClassList.datatype = xsd:NMTOKENS + StyleSheet.datatype = xsd:string + + ## + ## comma-separated list of media descriptors. + ## + MediaDesc.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Style.attrib\x{a}" ~ " " ] + SVG.Style.extra.attrib = empty + SVG.Style.attrib &= + attribute style { StyleSheet.datatype }?, + attribute class { ClassList.datatype }?, + SVG.Style.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Style.class\x{a}" ~ " " ] + SVG.Style.extra.class = notAllowed + SVG.Style.class |= style | SVG.Style.extra.class + a:documentation [ "\x{a}" ~ " style: Style Element\x{a}" ~ " " ] + SVG.style.content = text + style = element style { attlist.style, SVG.style.content } + attlist.style &= + [ a:defaultValue = "preserve" ] attribute xml:space { "preserve" }?, + SVG.id.attrib, + SVG.base.attrib, + SVG.lang.attrib, + SVG.Core.extra.attrib, + attribute type { ContentType.datatype }, + attribute media { MediaDesc.datatype }?, + attribute title { Text.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-style.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-style.rng new file mode 100644 index 00000000000..bc9b9a736f6 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-style.rng @@ -0,0 +1,101 @@ + + + + SVG 1.1 Style Module + file: svg-style.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-style.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Style + + style + + This module declares markup to provide support for stylesheet. + + + Datatypes + + + + + + + + + + comma-separated list of media descriptors. + + + + + SVG.Style.attrib + + + + + + + + + + + + + + + + + + + SVG.Style.class + + + + + + + + + + + + style: Style Element + + + + + + + + + + + + + + preserve + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-text.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-text.rnc new file mode 100644 index 00000000000..b9d52e14420 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-text.rnc @@ -0,0 +1,275 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Text Module +## file: svg-text.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-text.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Text +## +## text, tspan, tref, textPath, altGlyph, altGlyphDef, altGlyphItem, +## glyphRef +## +## This module declares markup to provide support for alternate glyph. +## +[ xml:lang = "en" ] +grammar { + include "svg-basic-text.rnc" + a:documentation [ "\x{a}" ~ " Datatypes\x{a}" ~ " " ] + BaselineShiftValue.datatype = xsd:string + FontSizeAdjustValue.datatype = xsd:string + GlyphOrientationHorizontalValue.datatype = xsd:string + GlyphOrientationVerticalValue.datatype = xsd:string + KerningValue.datatype = xsd:string + SpacingValue.datatype = xsd:string + TextDecorationValue.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Text.attrib\x{a}" ~ " " ] + SVG.Text.extra.attrib = empty + SVG.Text.attrib &= + attribute writing-mode { + "lr-tb" | "rl-tb" | "tb-rl" | "lr" | "rl" | "tb" | "inherit" + }?, + SVG.Text.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.TextContent.attrib\x{a}" ~ " " ] + SVG.TextContent.extra.attrib = empty + SVG.TextContent.attrib &= + attribute alignment-baseline { + "auto" + | "baseline" + | "before-edge" + | "text-before-edge" + | "middle" + | "central" + | "after-edge" + | "text-after-edge" + | "ideographic" + | "alphabetic" + | "hanging" + | "mathematical" + | "inherit" + }?, + attribute baseline-shift { BaselineShiftValue.datatype }?, + attribute direction { "ltr" | "rtl" | "inherit" }?, + attribute dominant-baseline { + "auto" + | "use-script" + | "no-change" + | "reset-size" + | "ideographic" + | "alphabetic" + | "hanging" + | "mathematical" + | "central" + | "middle" + | "text-after-edge" + | "text-before-edge" + | "inherit" + }?, + attribute glyph-orientation-horizontal { + GlyphOrientationHorizontalValue.datatype + }?, + attribute glyph-orientation-vertical { + GlyphOrientationVerticalValue.datatype + }?, + attribute kerning { KerningValue.datatype }?, + attribute letter-spacing { SpacingValue.datatype }?, + attribute text-anchor { "start" | "middle" | "end" | "inherit" }?, + attribute text-decoration { TextDecorationValue.datatype }?, + attribute unicode-bidi { + "normal" | "embed" | "bidi-override" | "inherit" + }?, + attribute word-spacing { SpacingValue.datatype }?, + SVG.TextContent.extra.attrib + SVG.Font.attrib &= + attribute font-size-adjust { FontSizeAdjustValue.datatype }?, + attribute font-stretch { + "normal" + | "wider" + | "narrower" + | "ultra-condensed" + | "extra-condensed" + | "condensed" + | "semi-condensed" + | "semi-expanded" + | "expanded" + | "extra-expanded" + | "ultra-expanded" + | "inherit" + }?, + attribute font-variant { "normal" | "small-caps" | "inherit" }? + + ## + ## extend SVG.Text.class + ## + SVG.Text.class |= altGlyphDef + + ## + ## extend SVG.TextContent.class + ## + SVG.TextContent.class |= tspan | tref | textPath + a:documentation [ "\x{a}" ~ " text: Text Element\x{a}" ~ " " ] + SVG.text.class |= SVG.TextContent.class + attlist.text &= + SVG.Text.attrib, + SVG.TextContent.attrib, + attribute dx { Lengths.datatype }?, + attribute dy { Lengths.datatype }?, + attribute textLength { Length.datatype }?, + attribute lengthAdjust { "spacing" | "spacingAndGlyphs" }? + a:documentation [ + "\x{a}" ~ + " tspan: Text Span Element\x{a}" ~ + " " + ] + SVG.tspan.content = + (text + | tspan + | tref + | altGlyph + | animate + | set + | animateColor + | SVG.Description.class + | SVG.Hyperlink.class)* + tspan = element tspan { attlist.tspan, SVG.tspan.content } + attlist.tspan &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.TextContent.attrib, + SVG.Font.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute x { Coordinates.datatype }?, + attribute y { Coordinates.datatype }?, + attribute dx { Lengths.datatype }?, + attribute dy { Lengths.datatype }?, + attribute rotate { Numbers.datatype }?, + attribute textLength { Length.datatype }?, + attribute lengthAdjust { "spacing" | "spacingAndGlyphs" }? + a:documentation [ + "\x{a}" ~ + " tref: Text Reference Element\x{a}" ~ + " " + ] + SVG.tref.content = + (animate | set | animateColor | SVG.Description.class)* + tref = element tref { attlist.tref, SVG.tref.content } + attlist.tref &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.TextContent.attrib, + SVG.Font.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.XLinkRequired.attrib, + SVG.External.attrib, + attribute x { Coordinates.datatype }?, + attribute y { Coordinates.datatype }?, + attribute dx { Lengths.datatype }?, + attribute dy { Lengths.datatype }?, + attribute rotate { Numbers.datatype }?, + attribute textLength { Length.datatype }?, + attribute lengthAdjust { "spacing" | "spacingAndGlyphs" }? + a:documentation [ + "\x{a}" ~ + " textPath: Text Path Element\x{a}" ~ + " " + ] + SVG.textPath.content = + (text + | tspan + | tref + | altGlyph + | animate + | set + | animateColor + | SVG.Description.class + | SVG.Hyperlink.class)* + textPath = element textPath { attlist.textPath, SVG.textPath.content } + attlist.textPath &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.TextContent.attrib, + SVG.Font.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.XLinkRequired.attrib, + SVG.External.attrib, + attribute startOffset { Length.datatype }?, + attribute textLength { Length.datatype }?, + attribute lengthAdjust { "spacing" | "spacingAndGlyphs" }?, + attribute method { "align" | "stretch" }?, + attribute spacing { "auto" | "exact" }? + a:documentation [ + "\x{a}" ~ + " altGlyph: Alternate Glyph Element\x{a}" ~ + " " + ] + attlist.altGlyph &= + SVG.TextContent.attrib, + attribute x { Coordinates.datatype }?, + attribute y { Coordinates.datatype }?, + attribute dx { Lengths.datatype }?, + attribute dy { Lengths.datatype }?, + attribute rotate { Numbers.datatype }? + a:documentation [ + "\x{a}" ~ + " altGlyphDef: Alternate Glyph Definition Element\x{a}" ~ + " " + ] + SVG.altGlyphDef.content |= altGlyphItem+ + a:documentation [ + "\x{a}" ~ + " altGlyphItem: Alternate Glyph Item Element\x{a}" ~ + " " + ] + SVG.altGlyphItem.content = glyphRef+ + altGlyphItem = + element altGlyphItem { + attlist.altGlyphItem, SVG.altGlyphItem.content + } + attlist.altGlyphItem &= SVG.Core.attrib + a:documentation [ + "\x{a}" ~ + " glyphRef: Glyph Reference Element\x{a}" ~ + " " + ] + attlist.glyphRef &= + attribute x { Number.datatype }?, + attribute y { Number.datatype }?, + attribute dx { Number.datatype }?, + attribute dy { Number.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-text.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-text.rng new file mode 100644 index 00000000000..d0740889641 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-text.rng @@ -0,0 +1,572 @@ + + + + SVG 1.1 Text Module + file: svg-text.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-text.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Text + + text, tspan, tref, textPath, altGlyph, altGlyphDef, altGlyphItem, + glyphRef + + This module declares markup to provide support for alternate glyph. + + + + Datatypes + + + + + + + + + + + + + + + + + + + + + + + + SVG.Text.attrib + + + + + + + + + lr-tb + rl-tb + tb-rl + lr + rl + tb + inherit + + + + + + + SVG.TextContent.attrib + + + + + + + + + auto + baseline + before-edge + text-before-edge + middle + central + after-edge + text-after-edge + ideographic + alphabetic + hanging + mathematical + inherit + + + + + + + + + + + + ltr + rtl + inherit + + + + + + + auto + use-script + no-change + reset-size + ideographic + alphabetic + hanging + mathematical + central + middle + text-after-edge + text-before-edge + inherit + + + + + + + + + + + + + + + + + + + + + + + + + + + start + middle + end + inherit + + + + + + + + + + + + normal + embed + bidi-override + inherit + + + + + + + + + + + + + + + + + + + + normal + wider + narrower + ultra-condensed + extra-condensed + condensed + semi-condensed + semi-expanded + expanded + extra-expanded + ultra-expanded + inherit + + + + + + + normal + small-caps + inherit + + + + + + + extend SVG.Text.class + + + + + + extend SVG.TextContent.class + + + + + + + + + text: Text Element + + + + + + + + + + + + + + + + + + + + + + + + + + spacing + spacingAndGlyphs + + + + + + tspan: Text Span Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + spacing + spacingAndGlyphs + + + + + + tref: Text Reference Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + spacing + spacingAndGlyphs + + + + + + textPath: Text Path Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + spacing + spacingAndGlyphs + + + + + + + align + stretch + + + + + + + auto + exact + + + + + + altGlyph: Alternate Glyph Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + altGlyphDef: Alternate Glyph Definition Element + + + + + + + + altGlyphItem: Alternate Glyph Item Element + + + + + + + + + + + + + + + + + glyphRef: Glyph Reference Element + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-view.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-view.rnc new file mode 100644 index 00000000000..41501c31f92 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-view.rnc @@ -0,0 +1,42 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 View Module +## file: svg-view.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-view.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## View +## +## view +## +## This module declares markup to provide support for view. +## + +## +## SVG.View.class +## +[ xml:lang = "en" ] +grammar { + SVG.View.extra.class = notAllowed + SVG.View.class |= view | SVG.View.extra.class + a:documentation [ "\x{a}" ~ " view: View Element\x{a}" ~ " " ] + SVG.view.content = SVG.Description.class* + view = element view { attlist.view, SVG.view.content } + attlist.view &= + SVG.Core.attrib, + SVG.External.attrib, + attribute viewBox { ViewBoxSpec.datatype }?, + [ a:defaultValue = "xMidYMid meet" ] + attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }?, + [ a:defaultValue = "magnify" ] + attribute zoomAndPan { "disable" | "magnify" }?, + attribute viewTarget { text }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-view.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-view.rng new file mode 100644 index 00000000000..2b26547d2f8 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-view.rng @@ -0,0 +1,70 @@ + + + + SVG 1.1 View Module + file: svg-view.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-view.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + View + + view + + This module declares markup to provide support for view. + + + SVG.View.class + + + + + + + + + + + + view: View Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + disable + magnify + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-viewport-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-viewport-attrib.rnc new file mode 100644 index 00000000000..d7acd96d7c5 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-viewport-attrib.rnc @@ -0,0 +1,36 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Viewport Attribute Module +## file: svg-viewport-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-viewport-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Viewport Attribute +## +## clip, overflow +## +## This module defines the Viewport attribute set. +## +[ xml:lang = "en" ] +grammar { + + ## + ## 'clip' property/attribute value (e.g., 'auto', rect(...)) + ## + ClipValue.datatype = xsd:string + SVG.clip.attrib = attribute clip { ClipValue.datatype }? + SVG.overflow.attrib = + attribute overflow { + "visible" | "hidden" | "scroll" | "auto" | "inherit" + }? + SVG.Viewport.extra.attrib = empty + SVG.Viewport.attrib &= + SVG.clip.attrib, SVG.overflow.attrib, SVG.Viewport.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-viewport-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-viewport-attrib.rng new file mode 100644 index 00000000000..1578d27ceb3 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-viewport-attrib.rng @@ -0,0 +1,53 @@ + + + + SVG 1.1 Viewport Attribute Module + file: svg-viewport-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-viewport-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Viewport Attribute + + clip, overflow + + This module defines the Viewport attribute set. + + + + 'clip' property/attribute value (e.g., 'auto', rect(...)) + + + + + + + + + + + + + + + visible + hidden + scroll + auto + inherit + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-xlink-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-xlink-attrib.rnc new file mode 100644 index 00000000000..c31505e04d2 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-xlink-attrib.rnc @@ -0,0 +1,67 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" +namespace xlink = "http://www.w3.org/1999/xlink" + + +## +## SVG 1.1 XLink Attribute Module +## file: svg-xlink-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-xlink-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## XLink Attribute +## +## type, href, role, arcrole, title, show, actuate +## +## This module defines the XLink, XLinkRequired, XLinkEmbed, and +## XLinkReplace attribute set. +## +[ xml:lang = "en" ] +grammar { + SVG.XLink.extra.attrib = empty + SVG.XLink.attrib &= + [ a:defaultValue = "simple" ] attribute xlink:type { "simple" }?, + attribute xlink:href { URI.datatype }?, + attribute xlink:role { URI.datatype }?, + attribute xlink:arcrole { URI.datatype }?, + attribute xlink:title { text }?, + [ a:defaultValue = "other" ] attribute xlink:show { "other" }?, + [ a:defaultValue = "onLoad" ] attribute xlink:actuate { "onLoad" }?, + SVG.XLink.extra.attrib + SVG.XLinkRequired.extra.attrib = empty + SVG.XLinkRequired.attrib &= + [ a:defaultValue = "simple" ] attribute xlink:type { "simple" }?, + attribute xlink:href { URI.datatype }, + attribute xlink:role { URI.datatype }?, + attribute xlink:arcrole { URI.datatype }?, + attribute xlink:title { text }?, + [ a:defaultValue = "other" ] attribute xlink:show { "other" }?, + [ a:defaultValue = "onLoad" ] attribute xlink:actuate { "onLoad" }?, + SVG.XLinkRequired.extra.attrib + SVG.XLinkEmbed.extra.attrib = empty + SVG.XLinkEmbed.attrib &= + [ a:defaultValue = "simple" ] attribute xlink:type { "simple" }?, + attribute xlink:href { URI.datatype }, + attribute xlink:role { URI.datatype }?, + attribute xlink:arcrole { URI.datatype }?, + attribute xlink:title { text }?, + [ a:defaultValue = "embed" ] attribute xlink:show { "embed" }?, + [ a:defaultValue = "onLoad" ] attribute xlink:actuate { "onLoad" }?, + SVG.XLinkEmbed.extra.attrib + SVG.XLinkReplace.extra.attrib = empty + SVG.XLinkReplace.attrib &= + [ a:defaultValue = "simple" ] attribute xlink:type { "simple" }?, + attribute xlink:href { URI.datatype }, + attribute xlink:role { URI.datatype }?, + attribute xlink:arcrole { URI.datatype }?, + attribute xlink:title { text }?, + [ a:defaultValue = "replace" ] + attribute xlink:show { "new" | "replace" }?, + [ a:defaultValue = "onRequest" ] + attribute xlink:actuate { "onRequest" }?, + SVG.XLinkReplace.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-xlink-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-xlink-attrib.rng new file mode 100644 index 00000000000..0f1a65dffef --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg-xlink-attrib.rng @@ -0,0 +1,173 @@ + + + + SVG 1.1 XLink Attribute Module + file: svg-xlink-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-xlink-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + XLink Attribute + + type, href, role, arcrole, title, show, actuate + + This module defines the XLink, XLinkRequired, XLinkEmbed, and + XLinkReplace attribute set. + + + + + + + + simple + + + + + + + + + + + + + + + + + + + + + + + other + + + + + onLoad + + + + + + + + + + + simple + + + + + + + + + + + + + + + + + + + + + other + + + + + onLoad + + + + + + + + + + + simple + + + + + + + + + + + + + + + + + + + + + embed + + + + + onLoad + + + + + + + + + + + simple + + + + + + + + + + + + + + + + + + + + + + new + replace + + + + + + onRequest + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg11-basic.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg11-basic.rng new file mode 100644 index 00000000000..bacfea8f65e --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg11-basic.rng @@ -0,0 +1,213 @@ + + + + + + RELAX NG schema for SVG 1.1 Basic + file: svg11-basic.rng + + This is SVG Basic, a proper subset of SVG. + + The Scalable Vector Graphics (SVG) + Copyright 2001, 2002 World Wide Web Consortium + (Massachusetts Institute of Technology, Institut National de + Recherche en Informatique et en Automatique, Keio University). + All Rights Reserved. + + Permission to use, copy, modify and distribute this RELAX NG schema + for SVG and its accompanying documentation for any purpose and without + fee is hereby granted in perpetuity, provided that the above copyright + notice and this paragraph appear in all copies. The copyright holders + nor the author make no representation about the suitability of this + RELAX NG schema for any purpose. + + It is provided "as is" without expressed or implied warranty. + + Author: Masayasu Ishikawa (mimasa@w3.org) + $Id: svg11-basic.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + This is the driver file for version 1.1 of the SVG Basic RELAX NG schema. + + The DTD version is identified by the PUBLIC and SYSTEM identifiers: + + PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" + SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd" + + Use this URI to identify the default namespace: + + "http://www.w3.org/2000/svg" + + + + + Viewport Attribute Module + + + + + + Paint Attribute Module + + + + + + Opacity Attribute Module + + + + + + Graphics Attribute Module + + + + + + Document Events Attribute Module + + + + + + Graphical Element Events Attribute Module + + + + + + Animation Events Attribute Module + + + + + + XLink Attribute Module + + + + + + External Resources Attribute Module + + + + + + Structure Module (required) + + + + + + Conditional Processing Module + + + + + + Image Module + + + + + + Style Module + + + + + + Shape Module + + + + + + Text Module + + + + + + Color Profile Module + + + + + + Gradient Module + + + + + + Pattern Module + + + + + + Basic Clip Module + + + + + + Mask Module + + + + + + Basic Filter Module + + + + + + Cursor Module + + + + + + Hyperlinking Module + + + + + + View Module + + + + + + Scripting Module + + + + + + Animation Module + + + + + + Font Module + + + + + + Extensibility Module + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg11-tiny.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg11-tiny.rng new file mode 100644 index 00000000000..6d7a30bf346 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg11-tiny.rng @@ -0,0 +1,159 @@ + + + + + + RELAX NG schema for SVG 1.1 Tiny + file: svg11-tiny.rng + + This is SVG Tiny, a proper subset of SVG. + + The Scalable Vector Graphics (SVG) + Copyright 2001, 2002 World Wide Web Consortium + (Massachusetts Institute of Technology, Institut National de + Recherche en Informatique et en Automatique, Keio University). + All Rights Reserved. + + Permission to use, copy, modify and distribute this RELAX NG schema + for SVG and its accompanying documentation for any purpose and without + fee is hereby granted in perpetuity, provided that the above copyright + notice and this paragraph appear in all copies. The copyright holders + nor the author make no representation about the suitability of this + RELAX NG schema for any purpose. + + It is provided "as is" without expressed or implied warranty. + + Author: Masayasu Ishikawa (mimasa@w3.org) + $Id: svg11-tiny.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + This is the driver file for version 1.1 of the SVG Tiny RELAX NG schema. + + The DTD version is identified by the PUBLIC and SYSTEM identifiers: + + PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" + SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd" + + Use this URI to identify the default namespace: + + "http://www.w3.org/2000/svg" + + + + + Paint Attribute Module + + + + + + Basic Graphics Attribute Module + + + + + + Document Events Attribute Module + + + + + + Graphical Element Events Attribute Module + + + + + + Animation Events Attribute Module + + + + + + XLink Attribute Module + + + + + + External Resources Attribute Module + + + + + + Basic Structure Module (required) + + + + + + Conditional Processing Module + + + + + + Image Module + + + + + + Style Module + + + + + + Shape Module + + + + + + Basic Text Module + + + + + + Hyperlinking Module + + + + + + View Module + + + + + + Scripting Module + + + + + + Animation Module + + + + + + Basic Font Module + + + + + + Extensibility Module + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg11.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg11.rnc new file mode 100644 index 00000000000..a4b74cdc9a4 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg11.rnc @@ -0,0 +1,193 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" +namespace ns1 = "http://www.w3.org/2000/svg" +namespace xlink = "http://www.w3.org/1999/xlink" + + +## +## RELAX NG schema for SVG 1.1 +## file: svg11.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## +## The Scalable Vector Graphics (SVG) +## Copyright 2001, 2002 World Wide Web Consortium +## (Massachusetts Institute of Technology, Institut National de +## Recherche en Informatique et en Automatique, Keio University). +## All Rights Reserved. +## +## Permission to use, copy, modify and distribute this RELAX NG schema +## for SVG and its accompanying documentation for any purpose and without +## fee is hereby granted in perpetuity, provided that the above copyright +## notice and this paragraph appear in all copies. The copyright holders +## nor the author make no representation about the suitability of this +## RELAX NG schema for any purpose. +## +## It is provided "as is" without expressed or implied warranty. +## +## Author: Masayasu Ishikawa (mimasa@w3.org) +## $Id: svg11.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## +## This is the driver file for version 1.1 of the SVG RELAX NG schema. +## +## The DTD version is identified by the PUBLIC and SYSTEM identifiers: +## +## PUBLIC "-//W3C//DTD SVG 1.1//EN" +## SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" +## +## Use this URI to identify the default namespace: +## +## "http://www.w3.org/2000/svg" +## +[ xml:lang = "en" ] +grammar { + + ## + ## Container Attribute Module + ## + include "svg-container-attrib.rnc" inherit = ns1 + + ## + ## Viewport Attribute Module + ## + include "svg-viewport-attrib.rnc" inherit = ns1 + + ## + ## Paint Attribute Module + ## + include "svg-paint-attrib.rnc" inherit = ns1 + + ## + ## Paint Opacity Attribute Module + ## + include "svg-opacity-attrib.rnc" inherit = ns1 + + ## + ## Graphics Attribute Module + ## + include "svg-graphics-attrib.rnc" inherit = ns1 + + ## + ## Document Events Attribute Module + ## + include "svg-docevents-attrib.rnc" inherit = ns1 + + ## + ## Graphical Element Events Attribute Module + ## + include "svg-graphevents-attrib.rnc" inherit = ns1 + + ## + ## Animation Events Attribute Module + ## + include "svg-animevents-attrib.rnc" inherit = ns1 + + ## + ## XLink Attribute Module + ## + include "svg-xlink-attrib.rnc" inherit = ns1 + + ## + ## External Resources Attribute Module + ## + include "svg-extresources-attrib.rnc" inherit = ns1 + + ## + ## Structure Module (required) + ## + include "svg-structure.rnc" inherit = ns1 + + ## + ## Conditional Processing Module + ## + include "svg-conditional.rnc" inherit = ns1 + + ## + ## Image Module + ## + include "svg-image.rnc" inherit = ns1 + + ## + ## Style Module + ## + include "svg-style.rnc" inherit = ns1 + + ## + ## Shape Module + ## + include "svg-shape.rnc" inherit = ns1 + + ## + ## Text Module + ## + include "svg-text.rnc" inherit = ns1 + + ## + ## Marker Module + ## + include "svg-marker.rnc" inherit = ns1 + + ## + ## Color Profile Module + ## + include "svg-profile.rnc" inherit = ns1 + + ## + ## Gradient Module + ## + include "svg-gradient.rnc" inherit = ns1 + + ## + ## Pattern Module + ## + include "svg-pattern.rnc" inherit = ns1 + + ## + ## Clip Module + ## + include "svg-clip.rnc" inherit = ns1 + + ## + ## Mask Module + ## + include "svg-mask.rnc" inherit = ns1 + + ## + ## Filter Module + ## + include "svg-filter.rnc" inherit = ns1 + + ## + ## Cursor Module + ## + include "svg-cursor.rnc" inherit = ns1 + + ## + ## Hyperlinking Module + ## + include "svg-hyperlink.rnc" inherit = ns1 + + ## + ## View Module + ## + include "svg-view.rnc" inherit = ns1 + + ## + ## Scripting Module + ## + include "svg-script.rnc" inherit = ns1 + + ## + ## Animation Module + ## + include "svg-animation.rnc" inherit = ns1 + + ## + ## Font Module + ## + include "svg-font.rnc" inherit = ns1 + + ## + ## Extensibility Module + ## + include "svg-extensibility.rnc" inherit = ns1 +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg11.rng b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg11.rng new file mode 100644 index 00000000000..4b643a943b3 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/LaTeXML/svg11.rng @@ -0,0 +1,188 @@ + + + + RELAX NG schema for SVG 1.1 + file: svg11.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + + The Scalable Vector Graphics (SVG) + Copyright 2001, 2002 World Wide Web Consortium + (Massachusetts Institute of Technology, Institut National de + Recherche en Informatique et en Automatique, Keio University). + All Rights Reserved. + + Permission to use, copy, modify and distribute this RELAX NG schema + for SVG and its accompanying documentation for any purpose and without + fee is hereby granted in perpetuity, provided that the above copyright + notice and this paragraph appear in all copies. The copyright holders + nor the author make no representation about the suitability of this + RELAX NG schema for any purpose. + + It is provided "as is" without expressed or implied warranty. + + Author: Masayasu Ishikawa (mimasa@w3.org) + $Id: svg11.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + This is the driver file for version 1.1 of the SVG RELAX NG schema. + + The DTD version is identified by the PUBLIC and SYSTEM identifiers: + + PUBLIC "-//W3C//DTD SVG 1.1//EN" + SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" + + Use this URI to identify the default namespace: + + "http://www.w3.org/2000/svg" + + + + Container Attribute Module + + + + + Viewport Attribute Module + + + + + Paint Attribute Module + + + + + Paint Opacity Attribute Module + + + + + Graphics Attribute Module + + + + + Document Events Attribute Module + + + + + Graphical Element Events Attribute Module + + + + + Animation Events Attribute Module + + + + + XLink Attribute Module + + + + + External Resources Attribute Module + + + + + Structure Module (required) + + + + + Conditional Processing Module + + + + + Image Module + + + + + Style Module + + + + + Shape Module + + + + + Text Module + + + + + Marker Module + + + + + Color Profile Module + + + + + Gradient Module + + + + + Pattern Module + + + + + Clip Module + + + + + Mask Module + + + + + Filter Module + + + + + Cursor Module + + + + + Hyperlinking Module + + + + + View Module + + + + + Scripting Module + + + + + Animation Module + + + + + Font Module + + + + + Extensibility Module + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/Makefile b/Master/texmf-dist/source/latex/stex/schema/rnc/Makefile new file mode 100644 index 00000000000..b5848cdf65c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/Makefile @@ -0,0 +1,6 @@ +all: + +clean: + rm -f *~ +distclean: clean + rm -f *.dtd *.xsd *.rng diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/metadata.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/metadata.rnc new file mode 100644 index 00000000000..18f2461ec6c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/metadata.rnc @@ -0,0 +1,41 @@ +# /=====================================================================\ +# | Metadata for LaTeXML | +# |=====================================================================| +# | Not Part of LaTeXML: | +# | Copyright (c) 2005 Michael Kohlhase | +# | Released under the Gnu Public License (GPL) | +# |=====================================================================| +# | Michael Kohlhase #_# | +# | http://dlmf.nist.gov/LaTeXML/ (o o) | +# \=========================================================ooo==U==ooo=/ + +default namespace = "http://dlmf.nist.gov/LaTeXML" + +dc.class = Creator | Contributor | Title | Subject | + Description | Publisher | Date | Type | + Identifier | Source | Language | Relation | + Rights | license + +metadata = element metadata {Common.attribs,(dc.class)*} + + +Creator = element Creator {Common.attribs,(text|Inline.class)*} +Contributor = element Contributor {Common.attribs,(text|Inline.class)*} +Title = element Title {Common.attribs,(text|Inline.class)*} +Subject = element Subject {Common.attribs,(text|Inline.class)*} +Description = element Description {Common.attribs,(text|Inline.class)*} +Publisher = element Publisher {Common.attribs,(text|Inline.class)*} +Date = element Date {Common.attribs,(text|Inline.class)*} +Type = element Type {Common.attribs,(text|Inline.class)*} +Identifier = element Identifier {Common.attribs,(text|Inline.class)*} +Source = element Source {Common.attribs,(text|Inline.class)*} +Language = element Language {Common.attribs,(text|Inline.class)*} +Relation = element Relation {Common.attribs,(text|Inline.class)*} +Rights = element Rights {Common.attribs,(text | Inline.class)*} + +license = element license {Common.attribs,(attribution|noncommercial|sharealike|noderivativeworks)*} +attribution = element attribution {Common.attribs} +noncommercial = element noncommercial {Common.attribs} +sharealike = element sharealike {Common.attribs} +noderivativeworks = element noderivativeworks {Common.attribs} + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc+ltxml.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc+ltxml.rnc new file mode 100644 index 00000000000..20616411787 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc+ltxml.rnc @@ -0,0 +1,149 @@ +# A RelaxNG for Open Mathematical documents (OMDoc 1.2) with LaTeXML +# $Id: omdoc+ltxml.rnc 1884 2011-09-09 12:45:49Z kohlhase $ +# $HeadURL: https://svn.kwarc.info/repos/stex/trunk/schema/rnc/omdoc+ltxml.rnc $ +# See the documentation and examples at http://omdoc.org +# (c) 2010 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace omdoc = "http://omdoc.org/ns" + +## we include the OMDoc Schema, but we allow the sectioning elements defined below +## as document structuring elements as well. +include "omdoc/omdoc.rnc" {docstruct.class = omgroup* & lechapter*} + +## we extend the Math Objects by the ones introduced by LaTeXML +mobj |= grammar { + include "LaTeXML/LaTeXML-common.rnc" + include "LaTeXML/LaTeXML-math.rnc" + start = Math} + +## we extend the model of rendering elements by XMath, and we extend the XMath there, so +## that we can cope with piecewise and friends at the intermediate level. +render.class |= grammar { + include "LaTeXML/LaTeXML.rnc" + {#XMath.class &= XMRow* & XMCell* +# XMRow_model &= element XMTok {attribute role {xsd:string {pattern = "ID"}}} +# XMArray_model &= element XMTok {attribute role {xsd:string {pattern = "ID"}}} + XMTok_attributes &= parent ntn.attrib + start = Math | \text}} + +## we extend the core structural classes of OMDoc with various LaTeXML counterparts. These +## are usful, since sTeX defers to LaTeXML to generate these, and in a later pass (the +## XSLTs) replaces them by their OMDoc counterparts. The rules below, have another +## purpose: in the OMDoc schema (which is the primary one here, we use the & operator for +## making classes, whereas the LaTeXML schema uses the less flexible | operator. Therefore +## we need to construct conjunctive extensions in start macro. + +inline.class &= grammar { + include "LaTeXML/LaTeXML.rnc" + {Common.attributes &=parent id.attribs + Inline.class = parent inline.class + text_model = parent inline.model + start=bibref* & break* & ref* & cite* & \text* & emph*}} + +plike.class &= grammar { + include "LaTeXML/LaTeXML.rnc" + {Common.attributes =parent id.attribs + Inline.class = parent inline.class + Block.class = parent plike.class +# Flow.class = parent flow.class + text_model = parent inline.model + listingblock_model = parent plike.class + start = p* & tabular* & + equation* & equationgroup* & + figure* & graphics* & verbatim* & listingblock* & listing* & + itemize* & enumerate* & description*}} + + +tikz = element tikz {text} + +## we allow various LaTeXML elements as a top-level elements, +## they will be converted by XSLT later +omdoc.class &= grammar {include "LaTeXML/LaTeXML.rnc" { + Common.attributes &=parent id.attribs + Inline.class = parent inline.class + Block.class = parent plike.class + Para.class = parent omdoc.class +# Flow.class = parent flow.class + text_model = parent inline.model + listingblock_model = parent plike.class + start= para* & figure* & table* & listing* & + itemize* & enumerate* & description*}} + +backmatter &= grammar {include "LaTeXML/LaTeXML.rnc" { + Common.attributes &=parent id.attribs + Inline.class = parent inline.class + Block.class = parent plike.class + Para.class = parent omdoc.class +# Flow.class = parent flow.class + text_model = parent inline.model + listingblock_model = parent plike.class + start= bibliography*}} + + +## we prepare some nested content models for sectioning elements +lesubparagraph = subparagraph* +leparagraph = paragraph* & lesubparagraph +lesubsubsection = subsubsection* & leparagraph +lesubsection = subsection* & lesubsubsection +lesection = section* & lesubsection +lechapter = chapter* & lesection + +## they need to be able to nest theories transparently +theory.chapter = element theory {theory.attribs & + metadata.class & + omdoc.class & + constitutive.class & + lesection} +theory.section = element theory {theory.attribs & + metadata.class & + omdoc.class & + constitutive.class & + lesubsection} +theory.subsection = element theory {theory.attribs & + metadata.class & + omdoc.class & + constitutive.class & + lesubsubsection} +theory.subsubsection = element theory {theory.attribs & + metadata.class & + omdoc.class & + constitutive.class & + leparagraph} +theory.paragraph = element theory {theory.attribs & + metadata.class & + omdoc.class & + constitutive.class & + lesubparagraph} +theory.subparagraph = element theory {theory.attribs & + metadata.class & + omdoc.class & + constitutive.class} + +sectional.attribs = id.attribs + +## and now the elemens themselves +chapter = element chapter {sectional.attribs & + metadata.class & + omdoc.class & + theory.chapter*} +section= element section{sectional.attribs & + metadata.class & + omdoc.class & + theory.section*} +subsection= element subsection {sectional.attribs & + metadata.class & + omdoc.class & + theory.subsection*} +subsubsection= element subsubsection {sectional.attribs & + metadata.class & + omdoc.class & + theory.subsubsection*} +paragraph= element paragraph {sectional.attribs & + metadata.class & + omdoc.class & + theory.paragraph*} +subparagraph= element subparagraph {sectional.attribs & + metadata.class & + omdoc.class & + theory.subparagraph*} + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/MARCRelators.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/MARCRelators.rnc new file mode 100644 index 00000000000..e3d7c72dbd8 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/MARCRelators.rnc @@ -0,0 +1,23 @@ +# the MARC relator set; see http://www.loc.gov/marc/relators +MARCRelators = + "act" | "adp" | "aft" | "ann" | "ant" | "app" | "aqt" | + "arc" | "arr" | "art" | "asg" | "asn" | "att" | "auc" | "aud" | "aui" | + "aus" | "aut" | "bdd" | "bjd" | "bkd" | "bkp" | "bnd" | "bpd" | "bsl" | + "ccp" | "chr" | "clb" | "cli" | "cll" | "clt" | "cmm" | "cmp" | "cmt" | + "cnd" | "cns" | "coe" | "col" | "com" | "cos" | "cot" | "cov" | "cpc" | + "cpe" | "cph" | "cpl" | "cpt" | "cre" | "crp" | "crr" | "csl" | "csp" | + "cst" | "ctb" | "cte" | "ctg" | "ctr" | "cts" | "ctt" | "cur" | "cwt" | + "dfd" | "dfe" | "dft" | "dgg" | "dis" | "dln" | "dnc" | "dnr" | "dpc" | + "dpt" | "drm" | "drt" | "dsr" | "dst" | "dte" | "dto" | "dub" | "edt" | + "egr" | "elt" | "eng" | "etr" | "exp" | "fac" | "flm" | "fmo" | "fnd" | + "fpy" | "frg" | "hnr" | "hst" | "ill" | "ilu" | "ins" | "inv" | "itr" | + "ive" | "ivr" | "lbt" | "lee" | "lel" | "len" | "let" | "lie" | "lil" | + "lit" | "lsa" | "lse" | "lso" | "ltg" | "lyr" | "mdc" | "mod" | "mon" | + "mrk" | "mte" | "mus" | "nrt" | "opn" | "org" | "orm" | "oth" | "own" | + "pat" | "pbd" | "pbl" | "pfr" | "pht" | "plt" | "pop" | "ppm" | "prc" | + "prd" | "prf" | "prg" | "prm" | "pro" | "prt" | "pta" | "pte" | "ptf" | + "pth" | "ptt" | "rbr" | "rce" | "rcp" | "red" | "ren" | "res" | "rev" | + "rpt" | "rpy" | "rse" | "rsp" | "rst" | "rth" | "rtm" | "sad" | "sce" | + "scl" | "scr" | "sec" | "sgn" | "sng" | "spk" | "spn" | "spy" | "srv" | + "stl" | "stn" | "str" | "ths" | "trc" | "trl" | "tyd" | "tyg" | "voc" | + "wam" | "wdc" | "wde" | "wit" diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/Makefile b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/Makefile new file mode 100644 index 00000000000..0a4cef88b07 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/Makefile @@ -0,0 +1,11 @@ +RNC = $(shell ls *.rnc) + +all: #$(RNG) #$(XSD) #omdoc.xsd $(TARGET.dtd) + +clean: + rm -f *~ +distclean: clean + +# no longer adequate +# install: $(SRC.rnc) $(SRC.rng) #$(SRC.xsd) +# cp $(RNC) $(RNG) $(HOME)/vc/svn/omdoc.org/www/rnc diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/README b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/README new file mode 100644 index 00000000000..d9f6d4f0209 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/README @@ -0,0 +1,3 @@ +This directory contains a RelaxNG schema for OMDoc in compact form. +It includes parts of the XHTML schema slightly edited for embeddability and +the MathML3 schema in original form. diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/arith1.omdoc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/arith1.omdoc new file mode 100644 index 00000000000..d7aa94849ff --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/arith1.omdoc @@ -0,0 +1,1672 @@ + + + + + + The OpenMath Content Dictionary arith1.ocd in OMDoc form + Michael Kohlhase + The OpenMath Society + 2004-07-13 + Derived from the OpenMath CD http://www.openmath.org/cd/arith1.ocd. + Text + application/omdoc+xml + + Copyright (c) 2000-2002 Michael Kohlhase; + This OMDoc content dictionary is released under the OpenMath license: + http://monet.nag.co.uk/openmath/cdfiles/license.html + + + This CD defines symbols for common arithmetic functions. + + + + + + + + + + + + The symbol to represent the n-ary function to return the + least common multiple of its arguments. + + + + + Das Symbol f"ur das kleinste + gemeinsame Vielfache (als n-aere Funktion). + + + lcm + kgV + + + + + + + + + + + + + + + + + + + + + lcm + + + lcm + + + kgV + + + + + + + + + + + + + + + + for all integers and + . + + + + + fuer alle ganzen Zahlen und . + + + + + + + + + + + + + + + + + + + + + For all integers a,b there is no such + that and and + . + + + + + Fuer alle ganzen Zahlen a,b gibt es kein mit + und und + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The symbol to represent the n-ary function to return the gcd (greatest + common divisor) of its arguments. + + + + + + + + + + + + + + + + + + + + + + + gcd + + + gcd + + + ggT + + + + + + + + + + + + + + For all integers a,b there is no c + such that and + but + . + + Note that this implies that + + + + + 0 + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 6 + 9 + + 3 + + + + + + + + The symbol representing an n-ary commutative function plus. + plus + + + + + + + + + + + + + + + + + + + + + + + + + + + plus + + + + + + + + ( + + + + + + ) + + + + + + + + + plus + + + + + + + + + + + + + + + + For all and , + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This symbol denotes unary minus, i.e. the additive inverse.unary minus + + + + + + + + + + + + + + + + + + + + + unary_minus + + + + + + - + ( + + ) + + + + + + + + + unary_minus + + + - + + + + + + + + + + + + for all + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The symbol representing a binary minus function. This is equivalent to + adding the additive inverse. + + + + + + + + + + + + + + + + + + + + + + + + minus + + + + + + + ( + + - + + ) + + + + + + + + + minus + + + - + + + + + + + + + + + + + + For all and , + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The symbol representing an n-ary multiplication function.times + + + + + + + + + + + + + + + + + + + + times + + + + + + + + + + + + + + + + + times + + + + + + + + ( + + + + + + + ) + + + + + + + + + + + + + + + + + + + + + + + 1 + 2 + + + + 3 + 4 + + + + + + + 5 + 6 + + + + 7 + 8 + + + + + + + + 19 + 20 + + + + 43 + 50 + + + + + + + + for all and , + and + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + For all , + , + and , we + have + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This symbol represents a (binary) division function denoting the first argument + right-divided by the second, i.e. divide(a,b)=a*inverse(b). It is the + inverse of the multiplication function defined by the symbol times in this CD. + + + + + + + + + + + + + + + + + + + divide + + + / + + + + + + + + + + + + + divide + + + + + + + + + + + + + + + + + + + + + If then + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This symbol represents a power function. The first argument is raised + to the power of the second argument. When the second argument is not + an integer, powering is defined in terms of exponentials and + logarithms for the complex and real numbers. + This operator can represent general powering. + + + + + + + + + + + + + + + + + + + + power + + + power + + + + + + + + + + + + + power + + + + + + + + + + + + + + + + + + + + + + + implies + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + If is an integer then + and + . + + + + + + + + + + + + + + + + + + 0 + + + + + + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + 1 + 2 + + + + 3 + 4 + + + 3 + + + + + + 37 + 54 + + + + 81 + 118 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A unary operator which represents the absolute value of its + argument. The argument should be numerically valued. + In the complex case this is often referred to as the modulus. + + + + + + + + + + + + + + + + + + + abs + + + abs + + + + + + + + + + + + abs + + + + + || + + + + + + + + + + + + For all and + we + have . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + A binary operator which represents its first argument "lowered" to its + n'th root where n is the second argument. This is the inverse of the operation + represented by the power symbol defined in this CD. + + Care should be taken as to the precise meaning of this operator, in particular + which root is represented, however it is here to represent the general notion of + taking n'th roots. As inferred by the signature relevant to this symbol, the + function represented by this symbol is the single valued function, the specific + root returned is the one indicated by the first CMP. Note also that the converse + of the second CMP is not valid in general. + + + + + + + + + + + + + + + + + + + + + + + + root + + + + + + + + + + + + + + + + + root + + + + + + + + + + + + + + + + implies + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + For all and + (if the root exists!). + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + An operator taking two arguments, the first being the range of summation, + e.g. an integral interval, the second being the function to be + summed. Note that the sum may be over an infinite interval. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sum + + integer_interval + + + + + lambda + + + + + + + + + + + + = + + + + + + + + + + + + + + + + + + + + + + + + + sum + + + lambda + + + + + + + + + + + + + + + + + + + + + + sum + + + + + + + + + + + + + + This represents the summation of the reciprocals of all the integers between + 1 and + 10 + inclusive. + + + + + + + 1 + 10 + + + + + + + + + 1 + + + + + + + + + + + + An operator taking two arguments, the first being the range of multiplication + e.g. an integral interval, the second being the function to + be multiplied. Note that the product may be over an infinite interval. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + product + + integer_interval + + + + + lambda + + + + + + + + + + + + = + + + + + + + + + + + + + + product + + + + + + + + + + + + This represents the statement that the + factorial of n is equal to the + product + of all the integers between 1 and n inclusive. + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/creativecommons.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/creativecommons.rnc new file mode 100644 index 00000000000..078d80e4a3b --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/creativecommons.rnc @@ -0,0 +1,48 @@ +# A RelaxNG for Creative Commons License Specifications +# $Id: creativecommons.rnc 8550 2009-11-07 06:38:23Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/trunk/schema/rnc/pragmatic/creativecommons.rnc $ +# Copyright (c) 2008 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace cc = "http://creativecommons.org/ns" + +iana.tld = ("ac"|"ad"|"ae"|"af"|"ag"|"ai"|"al"|"am"|"an"|"ao"|"aq"|"ar"|"as"|"at"|"au"|"aw"|"ax"|"az"| + "ba"|"bb"|"bd"|"be"|"bf"|"bg"|"bh"|"bi"|"bj"|"bm"|"bn"|"bo"|"br"|"bs"|"bt"|"bv"|"bw"|"by"|"bz"| + "ca"|"cc"|"cd"|"cf"|"cg"|"ch"|"ci"|"ck"|"cl"|"cm"|"cn"|"co"|"cr"|"cs"|"cu"|"cv"|"cx"|"cy"|"cz"| + "de"|"dj"|"dk"|"dm"|"do"|"dz"|"ec"|"ee"|"eg"|"eh"|"er"|"es"|"et"|"fi"|"fj"|"fk"|"fm"|"fo"|"fr"| + "ga"|"gb"|"gd"|"ge"|"gf"|"gg"|"gh"|"gi"|"gl"|"gm"|"gn"|"gp"|"gq"|"gr"|"gs"|"gt"|"gu"|"gw"|"gy"| + "hk"|"hm"|"hn"|"hr"|"ht"|"hu"|"id"|"ie"|"il"|"im"|"in"|"io"|"iq"|"ir"|"is"|"it"|"je"|"jm"|"jo"|"jp"| + "ke"|"kg"|"kh"|"ki"|"km"|"kn"|"kp"|"kr"|"kw"|"ky"|"kz"|"la"|"lb"| + "lc"|"li"|"lk"|"lr"|"ls"|"lt"|"lu"|"lv"|"ly"| + "ma"|"mc"|"md"|"mg"|"mh"|"mk"|"ml"|"mm"|"mn"|"mo"|"mp"|"mq"|"mr"|"ms"|"mt"|"mu"|"mv"|"mw"|"mx"|"my"|"mz"| + "na"|"nc"|"ne"|"nf"|"ng"|"ni"|"nl"|"no"|"np"|"nr"|"nu"|"nz"|"om"| + "pa"|"pe"|"pf"|"pg"|"ph"|"pk"|"pl"|"pm"|"pn"|"pr"|"ps"|"pt"|"pw"|"py"|"qa"|"re"|"ro"|"ru"|"rw"| + "sa"|"sb"|"sc"|"sd"|"se"|"sg"|"sh"|"si"|"sj"|"sk"|"sl"|"sm"|"sn"|"so"|"sr"|"st"|"sv"|"sy"|"sz"| + "tc"|"td"|"tf"|"tg"|"th"|"tj"|"tk"|"tl"|"tm"|"tn"|"to"|"tp"|"tr"|"tt"|"tv"|"tw"|"tz"|"ua"| + "ug"|"uk"|"um"|"us"|"uy"|"uz"|"va"|"vc"|"ve"|"vg"|"vi"|"vn"|"vu"|"wf"|"ws"|"ye"|"yt"|"yu"|"za"|"zm"|"zw") + +license.attribs = attribute jurisdiction {iana.tld}? & + attribute version {xsd:string}? +license.model = permissions,prohibitions,requirements,description +license = element license {license.attribs& license.model} + +permissions.attribs= attribute reproduction {"permitted" |" prohibited"} & + attribute distribution {"permitted" |" prohibited"} & + attribute derivative_works {"permitted" | "prohibited"} +permissions.model = description +permissions = element permissions {permissions.attribs & permissions.model} + +prohibitions.attribs = attribute commercial_use {"prohibited" | "permitted"} +prohibitions.model = description +prohibitions = element prohibitions {prohibitions.attribs & prohibitions.model} + +requirements.attribs = attribute notice {"required" | "not_required"} & + attribute attribution {"required" | "not_required"} & + attribute copyleft {"required" | "not_required"} +requirements.model = description +requirements = element requirements {requirements.attribs & requirements.model} + +description.attribs = empty +description.model = text +description = element description {description.attribs & description.model} + +start = license diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/dublincore.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/dublincore.rnc new file mode 100644 index 00000000000..2402ddb1e7c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/dublincore.rnc @@ -0,0 +1,42 @@ +# A RelaxNG schema for the Dublin Core elements +# $Id: dublincore.rnc 8550 2009-11-07 06:38:23Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/trunk/schema/rnc/pragmatic/dublincore.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2008 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace dc = "http://purl.org/dc/elements/1.1/" + +## the various content models, specialize for integration +dc.person = text +dc.publisher = text +dc.text = text +dc.inline = text +dc.format = text +dc.source = text +dc.language = text +dc.rights = text +dc.relation = text +dc.date = xsd:dateTime +dc.type = text +dc.identifier = text + +# the model of the Dublin Metadata initiative (http://purl.org/dc) +start = contributor* & creator* & rights* & subject* & title* & description* & + publisher* & date* & type* & format* & identifier* & source* & language* & relation* + +contributor = element contributor {dc.person} +creator = element creator {dc.person} +title = element title {dc.inline} +subject = element subject {dc.inline} +description = element description {dc.text} +publisher = element publisher {dc.publisher} +type = element type {dc.type} +format = element format {dc.format} +source = element source {dc.source} +language = element language {dc.language} +relation = element relation {dc.relation} +rights = element rights {dc.rights} +date = element date {dc.date} +identifier = element identifier {dc.identifier} + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-common.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-common.rnc new file mode 100644 index 00000000000..3d18ae1d3f8 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-common.rnc @@ -0,0 +1,84 @@ +# This is the Mathematical Markup Language (MathML) 3.0, an XML +# application for describing mathematical notation and capturing +# both its structure and content. +# +# Copyright 1998-2009 W3C (MIT, ERCIM, Keio) +# +# Use and distribution of this code are permitted under the terms +# W3C Software Notice and License +# http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + + +default namespace m = "http://www.w3.org/1998/Math/MathML" +namespace local = "" + +start = math + +math = element math {math.attributes,MathExpression*} +MathExpression = semantics + +NonMathMLAtt = attribute (* - (local:*|m:*)) {xsd:string} + +CommonDeprecatedAtt = attribute other {text}? + +CommonAtt = attribute id {xsd:ID}?, + attribute xref {text}?, + attribute class {xsd:NMTOKENS}?, + attribute style {xsd:string}?, + attribute href {xsd:anyURI}?, + CommonDeprecatedAtt, + NonMathMLAtt* + + +math.attributes = CommonAtt, + attribute display {"block" | "inline"}?, + attribute maxwidth {length}?, + attribute overflow {"linebreak" | "scroll" | "elide" | "truncate" | "scale"}?, + attribute altimg {xsd:anyURI}?, + attribute altimg-width {length}?, + attribute altimg-height {length}?, + attribute altimg-valign {length | "top" | "middle" | "bottom"}?, + attribute alttext {text}?, + attribute cdgroup {xsd:anyURI}?, + math.deprecatedattributes + +# the mathml3-presentation schema adds additional attributes +# to the math element, all those valid on mstyle + +math.deprecatedattributes = attribute mode {xsd:string}?, + attribute macros {xsd:string}? + + +name = attribute name {xsd:NCName} +cd = attribute cd {xsd:NCName} + +src = attribute src {xsd:anyURI}? + +annotation = element annotation {annotation.attributes,text} + +annotation-xml.model = (MathExpression|anyElement)* + +anyElement = element (* - m:*) {(attribute * {text}|text| anyElement)*} + +annotation-xml = element annotation-xml {annotation.attributes, + annotation-xml.model} +annotation.attributes = CommonAtt, + cd?, + name?, + DefEncAtt, + src? + +DefEncAtt = attribute encoding {xsd:string}?, + attribute definitionURL {xsd:anyURI}? + +semantics = element semantics {semantics.attributes, + MathExpression, + (annotation|annotation-xml)*} +semantics.attributes = CommonAtt,DefEncAtt,cd?,name? + + + +length = xsd:string { + pattern = '\s*((-?[0-9]*(\.[0-9]*)?(e[mx]|in|cm|mm|p[xtc]|%)?)|(negative)?((very){0,2}thi(n|ck)|medium)mathspace)\s*' +} + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-content.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-content.rnc new file mode 100755 index 00000000000..3facbfd5567 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-content.rnc @@ -0,0 +1,373 @@ + +# This is the Mathematical Markup Language (MathML) 3.0, an XML +# application for describing mathematical notation and capturing +# both its structure and content. +# +# Copyright 1998-2010 W3C (MIT, ERCIM, Keio) +# +# Use and distribution of this code are permitted under the terms +# W3C Software Notice and License +# http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +include "mathml3-strict-content.rnc"{ + cn.content = (text | mglyph | sep | PresentationExpression)* + cn.attributes = CommonAtt, DefEncAtt, attribute type {text}?, base? + + ci.attributes = CommonAtt, DefEncAtt, ci.type? + ci.type = attribute type {text} + ci.content = (text | mglyph | PresentationExpression)* + + csymbol.attributes = CommonAtt, DefEncAtt, attribute type {text}?,cd? + csymbol.content = (text | mglyph | PresentationExpression)* + + bvar = element bvar { (ci | semantics-ci) & degree?} + + cbytes.attributes = CommonAtt, DefEncAtt + + cs.attributes = CommonAtt, DefEncAtt + + apply.content = ContExp+ | (ContExp, BvarQ, Qualifier*, ContExp*) + + bind.content = apply.content +} + +base = attribute base {text} + + +sep = element sep {empty} +PresentationExpression |= notAllowed + + +DomainQ = (domainofapplication|condition|interval|(lowlimit,uplimit?))* +domainofapplication = element domainofapplication {ContExp} +condition = element condition {ContExp} +uplimit = element uplimit {ContExp} +lowlimit = element lowlimit {ContExp} + +Qualifier = DomainQ|degree|momentabout|logbase +degree = element degree {ContExp} +momentabout = element momentabout {ContExp} +logbase = element logbase {ContExp} + +type = attribute type {text} +order = attribute order {"numeric" | "lexicographic"} +closure = attribute closure {text} + + +ContExp |= piecewise + + +piecewise = element piecewise {CommonAtt, DefEncAtt,(piece* & otherwise?)} + +piece = element piece {CommonAtt, DefEncAtt, ContExp, ContExp} + +otherwise = element otherwise {CommonAtt, DefEncAtt, ContExp} + + +DeprecatedContExp = reln | fn | declare +ContExp |= DeprecatedContExp + +reln = element reln {ContExp*} +fn = element fn {ContExp} +declare = element declare {attribute type {xsd:string}?, + attribute scope {xsd:string}?, + attribute nargs {xsd:nonNegativeInteger}?, + attribute occurrence {"prefix"|"infix"|"function-model"}?, + DefEncAtt, + ContExp+} + + +interval.class = interval +ContExp |= interval.class + + +interval = element interval { CommonAtt, DefEncAtt,closure?, ContExp,ContExp} + +unary-functional.class = inverse | ident | domain | codomain | image | ln | log | moment +ContExp |= unary-functional.class + + +inverse = element inverse { CommonAtt, DefEncAtt, empty} +ident = element ident { CommonAtt, DefEncAtt, empty} +domain = element domain { CommonAtt, DefEncAtt, empty} +codomain = element codomain { CommonAtt, DefEncAtt, empty} +image = element image { CommonAtt, DefEncAtt, empty} +ln = element ln { CommonAtt, DefEncAtt, empty} +log = element log { CommonAtt, DefEncAtt, empty} +moment = element moment { CommonAtt, DefEncAtt, empty} + +lambda.class = lambda +ContExp |= lambda.class + + +lambda = element lambda { CommonAtt, DefEncAtt, BvarQ, DomainQ, ContExp} + +nary-functional.class = compose +ContExp |= nary-functional.class + + +compose = element compose { CommonAtt, DefEncAtt, empty} + +binary-arith.class = quotient | divide | minus | power | rem | root +ContExp |= binary-arith.class + + +quotient = element quotient { CommonAtt, DefEncAtt, empty} +divide = element divide { CommonAtt, DefEncAtt, empty} +minus = element minus { CommonAtt, DefEncAtt, empty} +power = element power { CommonAtt, DefEncAtt, empty} +rem = element rem { CommonAtt, DefEncAtt, empty} +root = element root { CommonAtt, DefEncAtt, empty} + +unary-arith.class = factorial | minus | root | abs | conjugate | arg | real | imaginary | floor | ceiling | exp +ContExp |= unary-arith.class + + +factorial = element factorial { CommonAtt, DefEncAtt, empty} +abs = element abs { CommonAtt, DefEncAtt, empty} +conjugate = element conjugate { CommonAtt, DefEncAtt, empty} +arg = element arg { CommonAtt, DefEncAtt, empty} +real = element real { CommonAtt, DefEncAtt, empty} +imaginary = element imaginary { CommonAtt, DefEncAtt, empty} +floor = element floor { CommonAtt, DefEncAtt, empty} +ceiling = element ceiling { CommonAtt, DefEncAtt, empty} +exp = element exp { CommonAtt, DefEncAtt, empty} + +nary-minmax.class = max | min +ContExp |= nary-minmax.class + + +max = element max { CommonAtt, DefEncAtt, empty} +min = element min { CommonAtt, DefEncAtt, empty} + +nary-arith.class = plus | times | gcd | lcm +ContExp |= nary-arith.class + + +plus = element plus { CommonAtt, DefEncAtt, empty} +times = element times { CommonAtt, DefEncAtt, empty} +gcd = element gcd { CommonAtt, DefEncAtt, empty} +lcm = element lcm { CommonAtt, DefEncAtt, empty} + +nary-logical.class = and | or | xor +ContExp |= nary-logical.class + + +and = element and { CommonAtt, DefEncAtt, empty} +or = element or { CommonAtt, DefEncAtt, empty} +xor = element xor { CommonAtt, DefEncAtt, empty} + +unary-logical.class = not +ContExp |= unary-logical.class + + +not = element not { CommonAtt, DefEncAtt, empty} + +binary-logical.class = implies | equivalent +ContExp |= binary-logical.class + + +implies = element implies { CommonAtt, DefEncAtt, empty} +equivalent = element equivalent { CommonAtt, DefEncAtt, empty} + +quantifier.class = forall | exists +ContExp |= quantifier.class + + +forall = element forall { CommonAtt, DefEncAtt, empty} +exists = element exists { CommonAtt, DefEncAtt, empty} + +nary-reln.class = eq | gt | lt | geq | leq +ContExp |= nary-reln.class + + +eq = element eq { CommonAtt, DefEncAtt, empty} +gt = element gt { CommonAtt, DefEncAtt, empty} +lt = element lt { CommonAtt, DefEncAtt, empty} +geq = element geq { CommonAtt, DefEncAtt, empty} +leq = element leq { CommonAtt, DefEncAtt, empty} + +binary-reln.class = neq | approx | factorof | tendsto +ContExp |= binary-reln.class + + +neq = element neq { CommonAtt, DefEncAtt, empty} +approx = element approx { CommonAtt, DefEncAtt, empty} +factorof = element factorof { CommonAtt, DefEncAtt, empty} +tendsto = element tendsto { CommonAtt, DefEncAtt, type?, empty} + +int.class = int +ContExp |= int.class + + +int = element int { CommonAtt, DefEncAtt, empty} + +Differential-Operator.class = diff +ContExp |= Differential-Operator.class + + +diff = element diff { CommonAtt, DefEncAtt, empty} + +partialdiff.class = partialdiff +ContExp |= partialdiff.class + + +partialdiff = element partialdiff { CommonAtt, DefEncAtt, empty} + +unary-veccalc.class = divergence | grad | curl | laplacian +ContExp |= unary-veccalc.class + + +divergence = element divergence { CommonAtt, DefEncAtt, empty} +grad = element grad { CommonAtt, DefEncAtt, empty} +curl = element curl { CommonAtt, DefEncAtt, empty} +laplacian = element laplacian { CommonAtt, DefEncAtt, empty} + +nary-setlist-constructor.class = set | \list +ContExp |= nary-setlist-constructor.class + + +set = element set { CommonAtt, DefEncAtt, type?, BvarQ*, DomainQ*, ContExp*} +\list = element \list { CommonAtt, DefEncAtt, order?, BvarQ*, DomainQ*, ContExp*} + +nary-set.class = union | intersect | cartesianproduct +ContExp |= nary-set.class + + +union = element union { CommonAtt, DefEncAtt, empty} +intersect = element intersect { CommonAtt, DefEncAtt, empty} +cartesianproduct = element cartesianproduct { CommonAtt, DefEncAtt, empty} + +binary-set.class = in | notin | notsubset | notprsubset | setdiff +ContExp |= binary-set.class + + +in = element in { CommonAtt, DefEncAtt, empty} +notin = element notin { CommonAtt, DefEncAtt, empty} +notsubset = element notsubset { CommonAtt, DefEncAtt, empty} +notprsubset = element notprsubset { CommonAtt, DefEncAtt, empty} +setdiff = element setdiff { CommonAtt, DefEncAtt, empty} + +nary-set-reln.class = subset | prsubset +ContExp |= nary-set-reln.class + + +subset = element subset { CommonAtt, DefEncAtt, empty} +prsubset = element prsubset { CommonAtt, DefEncAtt, empty} + +unary-set.class = card +ContExp |= unary-set.class + + +card = element card { CommonAtt, DefEncAtt, empty} + +sum.class = sum +ContExp |= sum.class + + +sum = element sum { CommonAtt, DefEncAtt, empty} + +product.class = product +ContExp |= product.class + + +product = element product { CommonAtt, DefEncAtt, empty} + +limit.class = limit +ContExp |= limit.class + + +limit = element limit { CommonAtt, DefEncAtt, empty} + +unary-elementary.class = sin | cos | tan | sec | csc | cot | sinh | cosh | tanh | sech | csch | coth | arcsin | arccos | arctan | arccosh | arccot | arccoth | arccsc | arccsch | arcsec | arcsech | arcsinh | arctanh +ContExp |= unary-elementary.class + + +sin = element sin { CommonAtt, DefEncAtt, empty} +cos = element cos { CommonAtt, DefEncAtt, empty} +tan = element tan { CommonAtt, DefEncAtt, empty} +sec = element sec { CommonAtt, DefEncAtt, empty} +csc = element csc { CommonAtt, DefEncAtt, empty} +cot = element cot { CommonAtt, DefEncAtt, empty} +sinh = element sinh { CommonAtt, DefEncAtt, empty} +cosh = element cosh { CommonAtt, DefEncAtt, empty} +tanh = element tanh { CommonAtt, DefEncAtt, empty} +sech = element sech { CommonAtt, DefEncAtt, empty} +csch = element csch { CommonAtt, DefEncAtt, empty} +coth = element coth { CommonAtt, DefEncAtt, empty} +arcsin = element arcsin { CommonAtt, DefEncAtt, empty} +arccos = element arccos { CommonAtt, DefEncAtt, empty} +arctan = element arctan { CommonAtt, DefEncAtt, empty} +arccosh = element arccosh { CommonAtt, DefEncAtt, empty} +arccot = element arccot { CommonAtt, DefEncAtt, empty} +arccoth = element arccoth { CommonAtt, DefEncAtt, empty} +arccsc = element arccsc { CommonAtt, DefEncAtt, empty} +arccsch = element arccsch { CommonAtt, DefEncAtt, empty} +arcsec = element arcsec { CommonAtt, DefEncAtt, empty} +arcsech = element arcsech { CommonAtt, DefEncAtt, empty} +arcsinh = element arcsinh { CommonAtt, DefEncAtt, empty} +arctanh = element arctanh { CommonAtt, DefEncAtt, empty} + +nary-stats.class = mean | sdev | variance | median | mode +ContExp |= nary-stats.class + + +mean = element mean { CommonAtt, DefEncAtt, empty} +sdev = element sdev { CommonAtt, DefEncAtt, empty} +variance = element variance { CommonAtt, DefEncAtt, empty} +median = element median { CommonAtt, DefEncAtt, empty} +mode = element mode { CommonAtt, DefEncAtt, empty} + +nary-constructor.class = vector | matrix | matrixrow +ContExp |= nary-constructor.class + + +vector = element vector { CommonAtt, DefEncAtt, BvarQ, DomainQ, ContExp*} +matrix = element matrix { CommonAtt, DefEncAtt, BvarQ, DomainQ, ContExp*} +matrixrow = element matrixrow { CommonAtt, DefEncAtt, BvarQ, DomainQ, ContExp*} + +unary-linalg.class = determinant | transpose +ContExp |= unary-linalg.class + + +determinant = element determinant { CommonAtt, DefEncAtt, empty} +transpose = element transpose { CommonAtt, DefEncAtt, empty} + +nary-linalg.class = selector +ContExp |= nary-linalg.class + + +selector = element selector { CommonAtt, DefEncAtt, empty} + +binary-linalg.class = vectorproduct | scalarproduct | outerproduct +ContExp |= binary-linalg.class + + +vectorproduct = element vectorproduct { CommonAtt, DefEncAtt, empty} +scalarproduct = element scalarproduct { CommonAtt, DefEncAtt, empty} +outerproduct = element outerproduct { CommonAtt, DefEncAtt, empty} + +constant-set.class = integers | reals | rationals | naturalnumbers | complexes | primes | emptyset +ContExp |= constant-set.class + + +integers = element integers { CommonAtt, DefEncAtt, empty} +reals = element reals { CommonAtt, DefEncAtt, empty} +rationals = element rationals { CommonAtt, DefEncAtt, empty} +naturalnumbers = element naturalnumbers { CommonAtt, DefEncAtt, empty} +complexes = element complexes { CommonAtt, DefEncAtt, empty} +primes = element primes { CommonAtt, DefEncAtt, empty} +emptyset = element emptyset { CommonAtt, DefEncAtt, empty} + +constant-arith.class = exponentiale | imaginaryi | notanumber | true | false | pi | eulergamma | infinity +ContExp |= constant-arith.class + + +exponentiale = element exponentiale { CommonAtt, DefEncAtt, empty} +imaginaryi = element imaginaryi { CommonAtt, DefEncAtt, empty} +notanumber = element notanumber { CommonAtt, DefEncAtt, empty} +true = element true { CommonAtt, DefEncAtt, empty} +false = element false { CommonAtt, DefEncAtt, empty} +pi = element pi { CommonAtt, DefEncAtt, empty} +eulergamma = element eulergamma { CommonAtt, DefEncAtt, empty} +infinity = element infinity { CommonAtt, DefEncAtt, empty} \ No newline at end of file diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-presentation.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-presentation.rnc new file mode 100644 index 00000000000..5fa56e7b3d9 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-presentation.rnc @@ -0,0 +1,536 @@ + +# This is the Mathematical Markup Language (MathML) 3.0, an XML +# application for describing mathematical notation and capturing +# both its structure and content. +# +# Copyright 1998-2010 W3C (MIT, ERCIM, Keio) +# +# Use and distribution of this code are permitted under the terms +# W3C Software Notice and License +# http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +default namespace m = "http://www.w3.org/1998/Math/MathML" + +MathExpression |= PresentationExpression + +ImpliedMrow = MathExpression* + +TableRowExpression = mtr|mlabeledtr + +TableCellExpression = mtd + +MstackExpression = MathExpression|mscarries|msline|msrow|msgroup + +MsrowExpression = MathExpression|none + +MultiScriptExpression = (MathExpression|none),(MathExpression|none) + +mpadded-length = xsd:string { + pattern = '\s*([\+\-]?[0-9]*(\.[0-9]*)?\s*((%?\s*(height|depth|width)?)|e[mx]|in|cm|mm|p[xtc]|((negative)?((very){0,2}thi(n|ck)|medium)mathspace)))\s*' } + +linestyle = "none" | "solid" | "dashed" + +verticalalign = + "top" | + "bottom" | + "center" | + "baseline" | + "axis" + +columnalignstyle = "left" | "center" | "right" + +notationstyle = + "longdiv" | + "actuarial" | + "radical" | + "box" | + "roundedbox" | + "circle" | + "left" | + "right" | + "top" | + "bottom" | + "updiagonalstrike" | + "downdiagonalstrike" | + "verticalstrike" | + "horizontalstrike" | + "madruwb" + +idref = text +unsigned-integer = xsd:unsignedLong +integer = xsd:integer +number = xsd:decimal + +character = xsd:string { + pattern = '\s*\S\s*'} + +color = xsd:string { + pattern = '\s*((#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?)|[aA][qQ][uU][aA]|[bB][lL][aA][cC][kK]|[bB][lL][uU][eE]|[fF][uU][cC][hH][sS][iI][aA]|[gG][rR][aA][yY]|[gG][rR][eE][eE][nN]|[lL][iI][mM][eE]|[mM][aA][rR][oO][oO][nN]|[nN][aA][vV][yY]|[oO][lL][iI][vV][eE]|[pP][uU][rR][pP][lL][eE]|[rR][eE][dD]|[sS][iI][lL][vV][eE][rR]|[tT][eE][aA][lL]|[wW][hH][iI][tT][eE]|[yY][eE][lL][lL][oO][wW])\s*'} + + +group-alignment = "left" | "center" | "right" | "decimalpoint" +group-alignment-list = list {group-alignment+} +group-alignment-list-list = xsd:string { + pattern = '(\s*\{\s*(left|center|right|decimalpoint)(\s+(left|center|right|decimalpoint))*\})*\s*' } +positive-integer = xsd:positiveInteger + + +TokenExpression = mi|mn|mo|mtext|mspace|ms + +token.content = mglyph|malignmark|text + +mi = element mi {mi.attributes, token.content*} +mi.attributes = + CommonAtt, + CommonPresAtt, + TokenAtt + + +mn = element mn {mn.attributes, token.content*} +mn.attributes = + CommonAtt, + CommonPresAtt, + TokenAtt + + +mo = element mo {mo.attributes, token.content*} +mo.attributes = + CommonAtt, + CommonPresAtt, + TokenAtt, + attribute form {"prefix" | "infix" | "postfix"}?, + attribute fence {"true" | "false"}?, + attribute separator {"true" | "false"}?, + attribute lspace {length}?, + attribute rspace {length}?, + attribute stretchy {"true" | "false"}?, + attribute symmetric {"true" | "false"}?, + attribute maxsize {length | "infinity"}?, + attribute minsize {length}?, + attribute largeop {"true" | "false"}?, + attribute movablelimits {"true" | "false"}?, + attribute accent {"true" | "false"}?, + attribute linebreak {"auto" | "newline" | "nobreak" | "goodbreak" | "badbreak"}?, + attribute lineleading {length}?, + attribute linebreakstyle {"before" | "after" | "duplicate" | "infixlinebreakstyle"}?, + attribute linebreakmultchar {text}?, + attribute indentalign {"left" | "center" | "right" | "auto" | "id"}?, + attribute indentshift {length}?, + attribute indenttarget {idref}?, + attribute indentalignfirst {"left" | "center" | "right" | "auto" | "id" | "indentalign"}?, + attribute indentshiftfirst {length | "indentshift"}?, + attribute indentalignlast {"left" | "center" | "right" | "auto" | "id" | "indentalign"}?, + attribute indentshiftlast {length | "indentshift"}? + + +mtext = element mtext {mtext.attributes, token.content*} +mtext.attributes = + CommonAtt, + CommonPresAtt, + TokenAtt + + +mspace = element mspace {mspace.attributes, empty} +mspace.attributes = + CommonAtt, + CommonPresAtt, + TokenAtt, + attribute width {length}?, + attribute height {length}?, + attribute depth {length}?, + attribute linebreak {"auto" | "newline" | "nobreak" | "goodbreak" | "badbreak" | "indentingnewline"}? + + +ms = element ms {ms.attributes, token.content*} +ms.attributes = + CommonAtt, + CommonPresAtt, + TokenAtt, + attribute lquote {text}?, + attribute rquote {text}? + + +mglyph = element mglyph {mglyph.attributes,mglyph.deprecatedattributes,empty} +mglyph.attributes = + CommonAtt, CommonPresAtt, + attribute src {xsd:anyURI}?, + attribute width {length}?, + attribute height {length}?, + attribute valign {length}?, + attribute alt {text}? +mglyph.deprecatedattributes = + attribute index {integer}?, + attribute mathvariant {"normal" | "bold" | "italic" | "bold-italic" | "double-struck" | "bold-fraktur" | "script" | "bold-script" | "fraktur" | "sans-serif" | "bold-sans-serif" | "sans-serif-italic" | "sans-serif-bold-italic" | "monospace" | "initial" | "tailed" | "looped" | "stretched"}?, + attribute mathsize {"small" | "normal" | "big" | length}?, + DeprecatedTokenAtt + +msline = element msline {msline.attributes,empty} +msline.attributes = + CommonAtt, CommonPresAtt, + attribute position {integer}?, + attribute length {unsigned-integer}?, + attribute leftoverhang {length}?, + attribute rightoverhang {length}?, + attribute mslinethickness {length | "thin" | "medium" | "thick"}? + +none = element none {none.attributes,empty} +none.attributes = + CommonAtt, + CommonPresAtt + +mprescripts = element mprescripts {mprescripts.attributes,empty} +mprescripts.attributes = + CommonAtt, + CommonPresAtt + + +CommonPresAtt = + attribute mathcolor {color}?, + attribute mathbackground {color | "transparent"}? + +TokenAtt = + attribute mathvariant {"normal" | "bold" | "italic" | "bold-italic" | "double-struck" | "bold-fraktur" | "script" | "bold-script" | "fraktur" | "sans-serif" | "bold-sans-serif" | "sans-serif-italic" | "sans-serif-bold-italic" | "monospace" | "initial" | "tailed" | "looped" | "stretched"}?, + attribute mathsize {"small" | "normal" | "big" | length}?, + attribute dir {"ltr" | "rtl"}?, + DeprecatedTokenAtt + +DeprecatedTokenAtt = + attribute fontfamily {text}?, + attribute fontweight {"normal" | "bold"}?, + attribute fontstyle {"normal" | "italic"}?, + attribute fontsize {length}?, + attribute color {color}?, + attribute background {color | "transparent"}? + +MalignExpression = maligngroup|malignmark + +malignmark = element malignmark {malignmark.attributes, empty} +malignmark.attributes = + CommonAtt, CommonPresAtt, + attribute edge {"left" | "right"}? + + +maligngroup = element maligngroup {maligngroup.attributes, empty} +maligngroup.attributes = + CommonAtt, CommonPresAtt, + attribute groupalign {"left" | "center" | "right" | "decimalpoint"}? + + +PresentationExpression = TokenExpression|MalignExpression| + mrow|mfrac|msqrt|mroot|mstyle|merror|mpadded|mphantom| + mfenced|menclose|msub|msup|msubsup|munder|mover|munderover| + mmultiscripts|mtable|mstack|mlongdiv|maction + + + +mrow = element mrow {mrow.attributes, MathExpression*} +mrow.attributes = + CommonAtt, CommonPresAtt, + attribute dir {"ltr" | "rtl"}? + + +mfrac = element mfrac {mfrac.attributes, MathExpression, MathExpression} +mfrac.attributes = + CommonAtt, CommonPresAtt, + attribute linethickness {length | "thin" | "medium" | "thick"}?, + attribute numalign {"left" | "center" | "right"}?, + attribute denomalign {"left" | "center" | "right"}?, + attribute bevelled {"true" | "false"}? + + +msqrt = element msqrt {msqrt.attributes, ImpliedMrow} +msqrt.attributes = + CommonAtt, CommonPresAtt + + +mroot = element mroot {mroot.attributes, MathExpression, MathExpression} +mroot.attributes = + CommonAtt, CommonPresAtt + + +mstyle = element mstyle {mstyle.attributes, ImpliedMrow} +mstyle.attributes = + CommonAtt, CommonPresAtt, + mstyle.specificattributes, + mstyle.generalattributes, + mstyle.deprecatedattributes + +mstyle.specificattributes = + attribute scriptlevel {integer}?, + attribute displaystyle {"true" | "false"}?, + attribute scriptsizemultiplier {number}?, + attribute scriptminsize {length}?, + attribute infixlinebreakstyle {"before" | "after" | "duplicate"}?, + attribute decimalpoint {character}? + +mstyle.generalattributes = + attribute accent {"true" | "false"}?, + attribute accentunder {"true" | "false"}?, + attribute align {"left" | "right" | "center"}?, + attribute alignmentscope {list {("true" | "false") +}}?, + attribute bevelled {"true" | "false"}?, + attribute charalign {"left" | "center" | "right"}?, + attribute charspacing {length | "loose" | "medium" | "tight"}?, + attribute close {text}?, + attribute columnalign {list {columnalignstyle+} }?, + attribute columnlines {list {linestyle +}}?, + attribute columnspacing {list {(length) +}}?, + attribute columnspan {positive-integer}?, + attribute columnwidth {list {("auto" | length | "fit") +}}?, + attribute crossout {list {("none" | "updiagonalstrike" | "downdiagonalstrike" | "verticalstrike" | "horizontalstrike")*}}?, + attribute denomalign {"left" | "center" | "right"}?, + attribute depth {length}?, + attribute dir {"ltr" | "rtl"}?, + attribute edge {"left" | "right"}?, + attribute equalcolumns {"true" | "false"}?, + attribute equalrows {"true" | "false"}?, + attribute fence {"true" | "false"}?, + attribute form {"prefix" | "infix" | "postfix"}?, + attribute frame {linestyle}?, + attribute framespacing {list {length, length}}?, + attribute groupalign {group-alignment-list-list}?, + attribute height {length}?, + attribute indentalign {"left" | "center" | "right" | "auto" | "id"}?, + attribute indentalignfirst {"left" | "center" | "right" | "auto" | "id" | "indentalign"}?, + attribute indentalignlast {"left" | "center" | "right" | "auto" | "id" | "indentalign"}?, + attribute indentshift {length}?, + attribute indentshiftfirst {length | "indentshift"}?, + attribute indentshiftlast {length | "indentshift"}?, + attribute indenttarget {idref}?, + attribute largeop {"true" | "false"}?, + attribute leftoverhang {length}?, + attribute length {unsigned-integer}?, + attribute linebreak {"auto" | "newline" | "nobreak" | "goodbreak" | "badbreak"}?, + attribute linebreakmultchar {text}?, + attribute linebreakstyle {"before" | "after" | "duplicate" | "infixlinebreakstyle"}?, + attribute lineleading {length}?, + attribute linethickness {length | "thin" | "medium" | "thick"}?, + attribute location {"w" | "nw" | "n" | "ne" | "e" | "se" | "s" | "sw"}?, + attribute longdivstyle {"lefttop" | "stackedrightright" | "mediumstackedrightright" | "shortstackedrightright" | "righttop" | "left/\right" | "left)(right" | ":right=right" | "stackedleftleft" | "stackedleftlinetop"}?, + attribute lquote {text}?, + attribute lspace {length}?, + attribute mathsize {"small" | "normal" | "big" | length}?, + attribute mathvariant {"normal" | "bold" | "italic" | "bold-italic" | "double-struck" | "bold-fraktur" | "script" | "bold-script" | "fraktur" | "sans-serif" | "bold-sans-serif" | "sans-serif-italic" | "sans-serif-bold-italic" | "monospace" | "initial" | "tailed" | "looped" | "stretched"}?, + attribute maxsize {length | "infinity"}?, + attribute minlabelspacing {length}?, + attribute minsize {length}?, + attribute movablelimits {"true" | "false"}?, + attribute mslinethickness {length | "thin" | "medium" | "thick"}?, + attribute notation {text}?, + attribute numalign {"left" | "center" | "right"}?, + attribute open {text}?, + attribute position {integer}?, + attribute rightoverhang {length}?, + attribute rowalign {list {verticalalign+} }?, + attribute rowlines {list {linestyle +}}?, + attribute rowspacing {list {(length) +}}?, + attribute rowspan {positive-integer}?, + attribute rquote {text}?, + attribute rspace {length}?, + attribute selection {positive-integer}?, + attribute separator {"true" | "false"}?, + attribute separators {text}?, + attribute shift {integer}?, + attribute side {"left" | "right" | "leftoverlap" | "rightoverlap"}?, + attribute stackalign {"left" | "center" | "right" | "decimalpoint"}?, + attribute stretchy {"true" | "false"}?, + attribute subscriptshift {length}?, + attribute superscriptshift {length}?, + attribute symmetric {"true" | "false"}?, + attribute valign {length}?, + attribute width {length}? + +mstyle.deprecatedattributes = + DeprecatedTokenAtt, + attribute veryverythinmathspace {length}?, + attribute verythinmathspace {length}?, + attribute thinmathspace {length}?, + attribute mediummathspace {length}?, + attribute thickmathspace {length}?, + attribute verythickmathspace {length}?, + attribute veryverythickmathspace {length}? + +math.attributes &= CommonPresAtt +math.attributes &= mstyle.specificattributes +math.attributes &= mstyle.generalattributes + + + + +merror = element merror {merror.attributes, ImpliedMrow} +merror.attributes = + CommonAtt, CommonPresAtt + + +mpadded = element mpadded {mpadded.attributes, ImpliedMrow} +mpadded.attributes = + CommonAtt, CommonPresAtt, + attribute height {mpadded-length}?, + attribute depth {mpadded-length}?, + attribute width {mpadded-length}?, + attribute lspace {mpadded-length}?, + attribute voffset {mpadded-length}? + + +mphantom = element mphantom {mphantom.attributes, ImpliedMrow} +mphantom.attributes = + CommonAtt, CommonPresAtt + + +mfenced = element mfenced {mfenced.attributes, MathExpression*} +mfenced.attributes = + CommonAtt, CommonPresAtt, + attribute open {text}?, + attribute close {text}?, + attribute separators {text}? + + +menclose = element menclose {menclose.attributes, ImpliedMrow} +menclose.attributes = + CommonAtt, CommonPresAtt, + attribute notation {text}? + + +msub = element msub {msub.attributes, MathExpression, MathExpression} +msub.attributes = + CommonAtt, CommonPresAtt, + attribute subscriptshift {length}? + + +msup = element msup {msup.attributes, MathExpression, MathExpression} +msup.attributes = + CommonAtt, CommonPresAtt, + attribute superscriptshift {length}? + + +msubsup = element msubsup {msubsup.attributes, MathExpression, MathExpression, MathExpression} +msubsup.attributes = + CommonAtt, CommonPresAtt, + attribute subscriptshift {length}?, + attribute superscriptshift {length}? + + +munder = element munder {munder.attributes, MathExpression, MathExpression} +munder.attributes = + CommonAtt, CommonPresAtt, + attribute accentunder {"true" | "false"}?, + attribute align {"left" | "right" | "center"}? + + +mover = element mover {mover.attributes, MathExpression, MathExpression} +mover.attributes = + CommonAtt, CommonPresAtt, + attribute accent {"true" | "false"}?, + attribute align {"left" | "right" | "center"}? + + +munderover = element munderover {munderover.attributes, MathExpression, MathExpression, MathExpression} +munderover.attributes = + CommonAtt, CommonPresAtt, + attribute accent {"true" | "false"}?, + attribute accentunder {"true" | "false"}?, + attribute align {"left" | "right" | "center"}? + + +mmultiscripts = element mmultiscripts {mmultiscripts.attributes, MathExpression,MultiScriptExpression*,(mprescripts,MultiScriptExpression*)?} +mmultiscripts.attributes = + msubsup.attributes + + +mtable = element mtable {mtable.attributes, TableRowExpression*} +mtable.attributes = + CommonAtt, CommonPresAtt, + attribute align {xsd:string { + pattern ='\s*(top|bottom|center|baseline|axis)\s*[0-9]*'}}?, + attribute rowalign {list {verticalalign+} }?, + attribute columnalign {list {columnalignstyle+} }?, + attribute groupalign {group-alignment-list-list}?, + attribute alignmentscope {list {("true" | "false") +}}?, + attribute columnwidth {list {("auto" | length | "fit") +}}?, + attribute width {"auto" | length}?, + attribute rowspacing {list {(length) +}}?, + attribute columnspacing {list {(length) +}}?, + attribute rowlines {list {linestyle +}}?, + attribute columnlines {list {linestyle +}}?, + attribute frame {linestyle}?, + attribute framespacing {list {length, length}}?, + attribute equalrows {"true" | "false"}?, + attribute equalcolumns {"true" | "false"}?, + attribute displaystyle {"true" | "false"}?, + attribute side {"left" | "right" | "leftoverlap" | "rightoverlap"}?, + attribute minlabelspacing {length}? + + +mlabeledtr = element mlabeledtr {mlabeledtr.attributes, TableCellExpression+} +mlabeledtr.attributes = + mtr.attributes + + +mtr = element mtr {mtr.attributes, TableCellExpression*} +mtr.attributes = + CommonAtt, CommonPresAtt, + attribute rowalign {"top" | "bottom" | "center" | "baseline" | "axis"}?, + attribute columnalign {list {columnalignstyle+} }?, + attribute groupalign {group-alignment-list-list}? + + +mtd = element mtd {mtd.attributes, ImpliedMrow} +mtd.attributes = + CommonAtt, CommonPresAtt, + attribute rowspan {positive-integer}?, + attribute columnspan {positive-integer}?, + attribute rowalign {"top" | "bottom" | "center" | "baseline" | "axis"}?, + attribute columnalign {columnalignstyle}?, + attribute groupalign {group-alignment-list}? + + +mstack = element mstack {mstack.attributes, MstackExpression*} +mstack.attributes = + CommonAtt, CommonPresAtt, + attribute align {xsd:string { + pattern ='\s*(top|bottom|center|baseline|axis)\s*[0-9]*'}}?, + attribute stackalign {"left" | "center" | "right" | "decimalpoint"}?, + attribute charalign {"left" | "center" | "right"}?, + attribute charspacing {length | "loose" | "medium" | "tight"}? + + +mlongdiv = element mlongdiv {mlongdiv.attributes, MstackExpression,MstackExpression,MstackExpression+} +mlongdiv.attributes = + msgroup.attributes, + attribute longdivstyle {"lefttop" | "stackedrightright" | "mediumstackedrightright" | "shortstackedrightright" | "righttop" | "left/\right" | "left)(right" | ":right=right" | "stackedleftleft" | "stackedleftlinetop"}? + + +msgroup = element msgroup {msgroup.attributes, MstackExpression*} +msgroup.attributes = + CommonAtt, CommonPresAtt, + attribute position {integer}?, + attribute shift {integer}? + + +msrow = element msrow {msrow.attributes, MsrowExpression*} +msrow.attributes = + CommonAtt, CommonPresAtt, + attribute position {integer}? + + +mscarries = element mscarries {mscarries.attributes, (MsrowExpression|mscarry)*} +mscarries.attributes = + CommonAtt, CommonPresAtt, + attribute position {integer}?, + attribute location {"w" | "nw" | "n" | "ne" | "e" | "se" | "s" | "sw"}?, + attribute crossout {list {("none" | "updiagonalstrike" | "downdiagonalstrike" | "verticalstrike" | "horizontalstrike")*}}?, + attribute scriptsizemultiplier {number}? + + +mscarry = element mscarry {mscarry.attributes, MsrowExpression*} +mscarry.attributes = + CommonAtt, CommonPresAtt, + attribute location {"w" | "nw" | "n" | "ne" | "e" | "se" | "s" | "sw"}?, + attribute crossout {list {("none" | "updiagonalstrike" | "downdiagonalstrike" | "verticalstrike" | "horizontalstrike")*}}? + + +maction = element maction {maction.attributes, MathExpression+} +maction.attributes = + CommonAtt, CommonPresAtt, + attribute actiontype {text}?, + attribute selection {positive-integer}? diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-strict-content.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-strict-content.rnc new file mode 100755 index 00000000000..e854b1cd13a --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-strict-content.rnc @@ -0,0 +1,60 @@ +# This is the Mathematical Markup Language (MathML) 3.0, an XML +# application for describing mathematical notation and capturing +# both its structure and content. +# +# Copyright 1998-2009 W3C (MIT, ERCIM, Keio) +# +# Use and distribution of this code are permitted under the terms +# W3C Software Notice and License +# http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + + +default namespace m = "http://www.w3.org/1998/Math/MathML" + +ContExp = semantics-contexp | cn | ci | csymbol | apply | bind | share | cerror | cbytes | cs + +cn = element cn {cn.attributes,cn.content} +cn.content = text +cn.attributes = attribute type {"integer" | "real" | "double" | "hexdouble"} + +semantics-ci = element semantics {semantics.attributes,(ci|semantics-ci), + (annotation|annotation-xml)*} + +semantics-contexp = element semantics {semantics.attributes,ContExp, + (annotation|annotation-xml)*} + +ci = element ci {ci.attributes, ci.content} +ci.attributes = CommonAtt, ci.type? +ci.type = attribute type {"integer" | "rational" | "real" | "complex" | "complex-polar" | "complex-cartesian" | "constant" | "function" | "vector" | "list" | "set" | "matrix"} +ci.content = text + + +csymbol = element csymbol {csymbol.attributes,csymbol.content} + +SymbolName = xsd:NCName +csymbol.attributes = CommonAtt, cd +csymbol.content = SymbolName + +BvarQ = bvar* +bvar = element bvar { ci | semantics-ci} + +apply = element apply {CommonAtt,apply.content} +apply.content = ContExp+ + + +bind = element bind {CommonAtt,bind.content} +bind.content = ContExp,bvar*,ContExp + +share = element share {CommonAtt, src, empty} + +cerror = element cerror {cerror.attributes, csymbol, ContExp*} +cerror.attributes = CommonAtt + +cbytes = element cbytes {cbytes.attributes, base64} +cbytes.attributes = CommonAtt +base64 = xsd:base64Binary + +cs = element cs {cs.attributes, text} +cs.attributes = CommonAtt + +MathExpression |= ContExp diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-strict.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-strict.rnc new file mode 100644 index 00000000000..31d2ad40051 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3-strict.rnc @@ -0,0 +1,80 @@ +# This is the Mathematical Markup Language (MathML) 3.0, an XML +# application for describing mathematical notation and capturing +# both its structure and content. +# +# Copyright 1998-2008 W3C (MIT, ERCIM, Keio) +# +# Use and distribution of this code are permitted under the terms +# W3C Software Notice and License +# http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 +# +# +# Revision: $Id: mathml3-strict.rnc 8959 2011-09-02 06:01:43Z kohlhase $ +# +# Update to MathML3 and Relax NG: David Carlisle and Michael Kohlhase +# +# This is the RelaxNG schema module for the strict content part of MathML. + +default namespace m = "http://www.w3.org/1998/Math/MathML" + +include "mathml3-common.rnc" + +math.content |= ContExp + +#ednote(rnc:opel-content) What is the content of a operator element, currently all text? +opel.content = text + +# we want to extend this in pragmatic CMathML, so we introduce abbrevs here. +#ednote(rnc:cn-content) What is the content of a cn? +cn.content = text |(cn,cn) +cn.type.vals = "integer"|"real"|"double" + +cn = element cn {attribute base {text}?, + attribute type {cn.type.vals}?, + Definition.attrib, + MathML.Common.attrib, + (cn.content)*} + +ci = element ci {attribute type {xsd:string}?, + attribute nargs {xsd:string}?, + attribute occurrence {xsd:string}?, + Definition.attrib, + MathML.Common.attrib, + opel.content, + name.attrib?} + +cdname.attrib = attribute cd {xsd:NCName} + +csymbol = element csymbol {MathML.Common.attrib, + Definition.attrib,cdname.attrib?,cdbase.attrib?, + opel.content} + +# the content of the apply element, leave it empty and extend it later +apply = element apply {MathML.Common.attrib,cdbase.attrib?,apply.content} +apply-head = apply|bind|ci|csymbol|semantics-apply +apply.content = apply-head,ContExp* +semantics-apply = element semantics {semantics.attribs,apply-head, semantics-annotation*} + +qualifier = notAllowed + +# the content of the bind element, leave it empty and extend it later +bind = element bind {MathML.Common.attrib,cdbase.attrib?,bind.content} +bind-head = apply|csymbol|semantics-bind +bind.content = bind-head,bvar*,qualifier?,ContExp +semantics-bind = element semantics {semantics.attribs,bind-head, semantics-annotation*} + +bvar = element bvar {MathML.Common.attrib,cdbase.attrib?,bvar-head} +bvar-head = ci|semantics-bvar +semantics-bvar = element semantics {semantics.attribs,bvar-head, semantics-annotation*} + +share = element share {MathML.Common.attrib,attribute href {xsd:anyURI}} + +# the content of the cerror element, leave it empty and extend it later +cerror = element cerror {MathML.Common.attrib,cdbase.attrib?,cerror.content} +cerror-head = csymbol|apply|semantics-cerror +cerror.content = cerror-head,ContExp* +semantics-cerror = element semantics {semantics.attribs,cerror-head, semantics-annotation*} + +semantics-cmml = element semantics {semantics.attribs,ContExp, semantics-annotation*} + +ContExp = cn| ci | csymbol | apply | bind | share | cerror | semantics-cmml diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3.rnc new file mode 100644 index 00000000000..317db3dd468 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mathml3.rnc @@ -0,0 +1,21 @@ +# This is the Mathematical Markup Language (MathML) 3.0, an XML +# application for describing mathematical notation and capturing +# both its structure and content. +# +# Copyright 1998-2009 W3C (MIT, ERCIM, Keio) +# +# Use and distribution of this code are permitted under the terms +# W3C Software Notice and License +# http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + + +default namespace m = "http://www.w3.org/1998/Math/MathML" + +## Content MathML +include "mathml3-content.rnc" + +## Presentation MathML +include "mathml3-presentation.rnc" + +## math and semantics common to both Content and Presentation +include "mathml3-common.rnc" diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mocksoap.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mocksoap.rnc new file mode 100644 index 00000000000..745ee82d7ce --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/mocksoap.rnc @@ -0,0 +1,39 @@ +# A RelaxNG schema for Mock Soap with OMDoc content (OMDoc 1.3) +# $Id: mocksoap.rnc 8959 2011-09-02 06:01:43Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/mocksoap.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2007 Michael Kohlhase, released under the GNU Public License (GPL) + +namespace omdoc = "http://omdoc.org/ns" +namespace env = "http://www.w3.org/2003/05/soap-envelope" +namespace ws = "http://www.mathweb.org/ws-fictional" + +start = Envelope + +include "omdoc-common.rnc" +include "omdocmobj.rnc" +include "omdocdoc.rnc" +include "omdocdc.rnc" +include "omdoccc.rnc" +include "omdocmtxt.rnc" +include "omdocst.rnc" +include "omdocpf.rnc" + + +Envelope = element env:Envelope {Body} +Body = element env:Body {(prover|prove|proof|theory)*} +prover = element ws:prover {attribute env:encodingStyle {xsd:anyURI}?, + name?,version?,URL?,uptime?,sysinfo?} +name = element ws:name {text} +version = element ws:version {text} +URL = element ws:URL {text} +uptime = element ws:uptime {text} +sysinfo = element ws:sysinfo {ostype?,mips?} +ostype = element ws:ostype {text} +mips = element ws:mips {text} + +prove = element ws:prove {attribute env:encodingStyle {xsd:anyURI}?, + (assertion|replyWith|timeout)*} +replyWith = element ws:replyWith {state*} +timeout = element ws:timeout {text} +state = element ws:state {text} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omcd2.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omcd2.rnc new file mode 100644 index 00000000000..2a2b64e4371 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omcd2.rnc @@ -0,0 +1,59 @@ +# ********************************************* +# +# Relax NG Schema for OpenMath CD +# +# ********************************************* + +default namespace = "http://www.openmath.org/OpenMathCD" + +include "openmath2.rnc" + +start = CD + +CDComment = element CDComment { text } +CDName = element CDName { xsd:NCName } +CDUses = element CDUses { CDName* } +CDURL = element CDURL { xsd:anyURI } +CDBase = element CDBase { xsd:anyURI } +text-or-om = (text | OMOBJ)* +CDReviewDate = element CDReviewDate { xsd:date } +CDDate = element CDDate { xsd:date } +CDVersion = element CDVersion { xsd:nonNegativeInteger } +CDRevision = element CDRevision { xsd:nonNegativeInteger } +CDStatus = element CDStatus { + "official" | + "experimental" | + "private" | + "obsolete"} +Description = element Description { text } +Name = element Name { xsd:NCName } +Role = element Role { + "binder" | + "attribution" | + "semantic-attribution" | + "error" | + "application" | + "constant" } +CMP = element CMP { text } +FMP = element FMP { + attribute kind {xsd:string}?, + OMOBJ + } +# allow embedded OM +Example = element Example { text-or-om } +CDDefinition = + element CDDefinition { + CDComment*, + (Name & Role? & Description), + (CDComment | Example | FMP | CMP)* + } +CD = + element CD { + (CDComment* & Description? & + CDName & CDURL? & CDBase? & + CDReviewDate? & CDDate & CDStatus & + CDUses? & + CDVersion & CDRevision), + ( CDDefinition,CDComment* )+ + } + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omcdgroup2.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omcdgroup2.rnc new file mode 100644 index 00000000000..3b6754e471d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omcdgroup2.rnc @@ -0,0 +1,33 @@ + +# Schema for OpenMath CD groups + +# info on the CD group itself + +default namespace = "http://www.openmath.org/OpenMathCDG" + +CDGroupName = element CDGroupName { xsd:NCName } +CDGroupVersion = element CDGroupVersion { xsd:nonNegativeInteger } +CDGroupRevision = element CDGroupRevision { xsd:nonNegativeInteger } +CDGroupURL = element CDGroupURL { text } +CDGroupDescription = element CDGroupDescription { text } +# info on the CDs in the group +CDComment = element CDComment { text } +CDGroupMember = + element CDGroupMember { + CDComment?, CDName, CDVersion?, CDURL? + } +CDName = element CDName { xsd:NCName } +CDVersion = element CDVersion { xsd:nonNegativeInteger } +CDURL = element CDURL { text } +# structure of the group +CDGroup = + element CDGroup { + CDGroupName, + CDGroupVersion, + CDGroupRevision?, + CDGroupURL, + CDGroupDescription, + (CDGroupMember | CDComment)* + } +start = CDGroup + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omcdsig2.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omcdsig2.rnc new file mode 100644 index 00000000000..32aa235cc76 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omcdsig2.rnc @@ -0,0 +1,32 @@ +# ********************************************* +# +# Relax NG Schema for OpenMath CD Signatures +# +# ********************************************* + +default namespace = "http://www.openmath.org/OpenMathCDS" + +include "openmath2.rnc" + +start = CDSignatures + +CDSComment = element CDSComment { text } +CDSReviewDate = element CDSReviewDate { text } +CDSStatus = element CDSStatus { + "official" | + "experimental" | + "private" | + "obsolete"} +CDSignatures = + element CDSignatures { + attlist.CDSignatures, + (CDSComment)*, + (CDSReviewDate? & CDSStatus), + (CDSComment | Signature)* + } +attlist.CDSignatures = + attribute cd { xsd:NCName }, + attribute type { xsd:NCName } +Signature = element Signature { attlist.Signature, OMOBJ? } +attlist.Signature = attribute name { text } + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdoc-common.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdoc-common.rnc new file mode 100644 index 00000000000..eef4f53b04e --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdoc-common.rnc @@ -0,0 +1,66 @@ +# A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) Common attributes +# $Id: omdoc-common.rnc 8958 2011-09-02 06:01:13Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdoc-common.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2010 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace omdoc = "http://omdoc.org/ns" +namespace local = "" + +# all the explicitly namespaced attributes, except xml:lang, which +# is handled explicitly +nonlocal.attribs = attribute * - (local:* | xml:*) {xsd:string}* + +# the attributes for CSS and PRES styling +css.attribs = attribute style {xsd:string}? & attribute class {xsd:string}? + +omdocref = xsd:anyURI # an URI reference pointing to an OMDoc fragment +omdocrefs = list {xsd:anyURI*} # a whitespace-separated list of omdocref + +xref.attrib = attribute xref {omdocref} +tref = attribute tref {omdocref} + +# for the moment, we may get regexp at some point. +curie = xsd:string +curies = xsd:string +safecurie = xsd:string + +about.attrib = attribute about {xsd:anyURI|safecurie} +xmlbase.attrib = attribute xml:base {xsd:anyURI} +xmlid.attrib = attribute xml:id {xsd:ID} + +idrest.attribs = css.attribs & nonlocal.attribs & about.attrib? & xmlbase.attrib? + +id.attribs = xmlid.attrib? & idrest.attribs + +toplevel.attribs = id.attribs, attribute generated-from {omdocref}? + +iso639 = "aa" | "ab" | "af" | "am" | "ar" | "as" | +"ay" | "az" | "ba" | "be" | "bg" | "bh" | "bi" | "bn" | "bo" | "br" | "ca" | "co" +| "cs" | "cy" | "da" | "de" | "dz" | "el" | "en" | "eo" | "es" | "et" | "eu" | +"fa" | "fi" | "fj" | "fo" | "fr" | "fy" | "ga" | "gd" | "gl" | "gn" | "gu" | "ha" +| "he" | "hi" | "hr" | "hu" | "hy" | "ia" | "ie" | "ik" | "id" | "is" | "it" | +"iu" | "ja" | "jv" | "ka" | "kk" | "kl" | "km" | "kn" | "ko" | "ks" | "ku" | "ky" +| "la" | "ln" | "lo" | "lt" | "lv" | "mg" | "mi" | "mk" | "ml" | "mn" | "mo" | +"mr" | "ms" | "mt" | "my" | "na" | "ne" | "nl" | "no" | "oc" | "om" | "or" | "pa" +| "pl" | "ps" | "pt" | "qu" | "rm" | "rn" | "ro" | "ru" | "rw" | "sa" | "sd" | +"sg" | "sh" | "si" | "sk" | "sl" | "sm" | "sn" | "so" | "sq" | "sr" | "ss" | "st" +| "su" | "sv" | "sw" | "ta" | "te" | "tg" | "th" | "ti" | "tk" | "tl" | "tn" | +"to" | "tr" | "ts" | "tt" | "tw" | "ug" | "uk" | "ur" | "uz" | "vi" | "vo" | "wo" +| "xh" | "yi" | "yo" | "za" | "zh" | "zu" + +xml.lang.attrib = attribute xml:lang {iso639}? + +Anything = (AnyElement|text)* +AnyElement = element * {AnyAttribute,(text | AnyElement)*} +AnyAttribute = attribute * { text }* + +## useful classes to be extended in the modules +inline.class = empty +omdoc.class = empty +plike.class = empty + +## mixed models +inline.model = text & inline.class + +metadata.model &= dublincore diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdoc.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdoc.rnc new file mode 100644 index 00000000000..0616aaf0147 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdoc.rnc @@ -0,0 +1,24 @@ +# A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) +# $Id: omdoc.rnc 8959 2011-09-02 06:01:43Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdoc.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2007 Michael Kohlhase, released under the GNU Public License (GPL) + +start = omdoc + +include "omdoc-common.rnc" +include "omdocmobj.rnc" +include "omdocmeta.rnc" +include "omdocdoc.rnc" +include "omdocdc.rnc" +include "omdoccc.rnc" +include "omdocmtxt.rnc" +include "omdocrt.rnc" +include "omdocpres.rnc" +include "omdocst.rnc" +include "omdoccth.rnc" +include "omdocdg.rnc" +include "omdocpf.rnc" +include "omdocadt.rnc" +include "omdocext.rnc" +include "omdocquiz.rnc" diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocadt.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocadt.rnc new file mode 100644 index 00000000000..131df5606ff --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocadt.rnc @@ -0,0 +1,49 @@ +# A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) Module ADT +# $Id: omdocadt.rnc 8959 2011-09-02 06:01:43Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocadt.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2007 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace omdoc = "http://omdoc.org/ns" +omdoc.class &= adt* + +adt.sym.attrib = id.attribs,scope.attrib,attribute name {xsd:NCName} + +# adts are abstract data types, they are short forms for groups of symbols +# and their definitions, therefore, they have much the same attributes. + +adt.attribs = toplevel.attribs & + attribute parameters {list {xsd:NCName*}}? +adt.class = sortdef+ +adt.model = metadata.class & adt.class +adt = element adt {tref|(adt.attribs & adt.model)} + +adttype = "loose" | "generated" | "free" +sortdef.attribs = adt.sym.attrib & + attribute role {"sort"}? & + attribute type {adttype}? +sortdef.model = metadata.class & constructor* & insort* & recognizer? +sortdef = element sortdef {tref|(sortdef.attribs &sortdef.model)} + +insort.attribs = attribute for {omdocref} +insort.model = empty +insort = element insort {tref|(insort.attribs & insort.model)} + +constructor.attribs = adt.sym.attrib & sym.role.attrib? +constructor.model = metadata.class & argument* +constructor = element constructor {tref|(constructor.attribs & constructor.model)} + +recognizer.attribs = adt.sym.attrib & sym.role.attrib? +recognizer.model = metadata.class +recognizer = element recognizer {tref|(recognizer.attribs & recognizer.model)} + +argument.attribs = empty +argument.model = type & selector? +argument = element argument {tref|(argument.attribs & argument.model)} + +selector.attribs = adt.sym.attrib & + sym.role.attrib? & + attribute total {"yes" | "no"}? +selector.model = metadata.class +selector = element selector {tref|(selector.attribs & selector.model)} + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdoccc.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdoccc.rnc new file mode 100644 index 00000000000..3828aec5a6d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdoccc.rnc @@ -0,0 +1,10 @@ +# A RelaxNG for Open Mathematical documents (OMDoc 1.3) Module CC +# $Id: omdoccc.rnc 8959 2011-09-02 06:01:43Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdoccc.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2010 Michael Kohlhase, released under the GNU Public License (GPL) + +# we include the OMDoc version of cc metadata and specialize the description +license = grammar {include "creativecommons.rnc" {description = parent plike.class}} + +metadata.class &= license* diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdoccth.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdoccth.rnc new file mode 100644 index 00000000000..8e52773b51d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdoccth.rnc @@ -0,0 +1,53 @@ +# A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) Module CTH +# $Id: omdoccth.rnc 8979 2011-11-29 04:56:59Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdoccth.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2007 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace omdoc = "http://omdoc.org/ns" + +constitutive.class &= inclusion* +imports.model &= morphism? & + attribute type { "local" | "global"}? & + attribute conservativity {"conservative" | "monomorphism" | "definitional"}? & + attribute conservativity-just {omdocref}? + +toplevel.attribs &= attribute generated-via {omdocref}? +constitutive.attribs &= attribute generated-via {omdocref}? + +omdoc.class &= theory-inclusion* & axiom-inclusion* +theory-inclusion.justification = obligation* +axiom-inclusion.justification = obligation* + +fromto.attrib = from.attrib & attribute to {omdocref} +# attributes 'to' and 'from' are URIref + +morphism.attribs = id.attribs & + attribute hiding {omdocrefs}? & + attribute base {omdocrefs}? +morphism.model = def.eq? +morphism = element morphism {tref|(morphism.attribs & morphism.model)} +# base points to some other morphism it extends + +inclusion.attribs = id.attribs & attribute via {omdocref} +inclusion.model = empty +inclusion = element inclusion {tref|(inclusion.attribs & inclusion.model)} +# via points to a theory-inclusion + +theory-inclusion.attribs = toplevel.attribs & fromto.attrib +theory-inclusion.model = metadata? & morphism? & theory-inclusion.justification +theory-inclusion = element theory-inclusion {tref|(theory-inclusion.attribs & theory-inclusion.model)} + +axiom-inclusion.attribs = toplevel.attribs & fromto.attrib +axiom-inclusion.model = metadata? & morphism? & axiom-inclusion.justification +axiom-inclusion = element theory-inclusion {tref|(axiom-inclusion.attribs & axiom-inclusion.model)} + +obligation.attribs = id.attribs & + attribute induced-by {omdocref} & + attribute assertion {omdocref} +obligation.model = empty +obligation = element obligation {tref|(obligation.attribs & obligation.model)} +# attribute 'assertion' is a URIref, points to an assertion +# that is the proof obligation induced by the axiom or definition +# specified by 'induced-by'. + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocdc.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocdc.rnc new file mode 100644 index 00000000000..7d91738da37 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocdc.rnc @@ -0,0 +1,29 @@ +# A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) Module DC +# $Id: omdocdc.rnc 8968 2011-09-07 05:37:09Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocdc.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2010 Michael Kohlhase, released under the GNU Public License (GPL) + +# we include the dublin core and MARC elements, filling them with our content types +dc.common = id.attribs & nonlocal.attribs +dc.comlang =dc.common & xml.lang.attrib + +dublincore = grammar {include "MARCRelators.rnc" + include "dublincore.rnc" + {dc.date = parent dc.common & + attribute action {xsd:NMTOKEN}? & + attribute who {xsd:anyURI}? & + (xsd:date|xsd:dateTime) + dc.identifier = parent tref|(parent dc.common & + attribute scheme {xsd:NMTOKEN} & + text) + dc.type = parent tref|(parent dc.common & ("Dataset" | "Text" | "Collection")) + dc.inline = parent tref|(parent dc.comlang & parent inline.model) + dc.text = parent tref|(parent dc.comlang & parent plike.class) + dc.person = parent tref|(parent dc.common & + attribute role {MARCRelators}? & + parent inline.model) + dc.rights = parent tref|(parent dc.comlang & parent plike.class) + dc.source = parent plike.class}} + +metadata.model &= dublincore diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocdg.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocdg.rnc new file mode 100644 index 00000000000..af5cfe2fc5b --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocdg.rnc @@ -0,0 +1,28 @@ +# A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) Module CTH +# $Id: omdocdg.rnc 8958 2011-09-02 06:01:13Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocdg.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2007 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace omdoc = "http://omdoc.org/ns" + +omdoc.class &= decomposition* & path-just* +omdoccth.theory-inclusion.justification &= decomposition* +omdoccth.axiom-inclusion.justification &= path-just* + +decomposition.attribs = toplevel.attribs & for.attrib? & + attribute links {omdocrefs} +decomposition.model = empty +decomposition = element decomposition {tref|(decomposition.attribs & decomposition.model)} +# attribute 'for' points to a 'theory-inclusion', which this +# element justifies; attribute 'links' is an URIrefs, points to a +# list of axiom-inlcusions and theory-inclusions + +path-just.attribs = for.attrib? & id.attribs & + attribute local {omdocref} & + attribute globals {omdocrefs} +path-just.model = empty +path-just = element path-just {tref|(path-just.attribs & path-just.model)} +# attribute 'local' is an URIref, points to axiom-inclusion +# 'globals' is an URIrefs, points to a list of theory-inclusions + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocdoc.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocdoc.rnc new file mode 100644 index 00000000000..77215095b2b --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocdoc.rnc @@ -0,0 +1,62 @@ +# A RelaxNG for Open Mathematical documents (OMDoc 1.3) Module DOC +# $Id: omdocdoc.rnc 8972 2011-09-09 11:36:34Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocdoc.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2007 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace omdoc = "http://omdoc.org/ns" +# extend the stuff that can go into a mathematical text + +omdoc.class &= ignore* & tableofcontents* + +ignore.attribs = id.attribs & + attribute type {xsd:string}? & + attribute comment {xsd:string}? +ignore.model = Anything +ignore = element ignore {tref|(ignore.attribs & ignore.model)} + +tableofcontents.attribs = attribute level {xsd:nonNegativeInteger}? +tableofcontents.model = empty +tableofcontents = element tableofcontents {tref|(tableofcontents.attribs & tableofcontents.model)} + +index.attribs = id.attribs +index.model = empty +index = element index {tref|(index.attribs & index.model)} + +bibliography.attribs = id.attribs, attribute files {text} +bibliography.model = empty +bibliography = element bibliography {tref|(bibliography.attribs & bibliography.model)} + + +group.attribs = id.attribs, + attribute type {xsd:anyURI}?, + attribute modules {xsd:anyURI}?, + attribute layout {text}? + +## The and elements allow frontmatter and backmatter, +## which we will now define +frontmatter = metadata.class & tableofcontents? +backmatter = index? & bibliography? +docstruct.class = omgroup* +omdoc.class &= docstruct.class +mainmatter = omdoc.class + +omgroup.attribs = toplevel.attribs & group.attribs +omgroup.model = frontmatter,mainmatter,backmatter +omgroup = element omgroup {tref|(omgroup.attribs & omgroup.model)} + +## the model of the document root only differs from in the version attribute +omdoc.attribs = toplevel.attribs & group.attribs & + attribute version {xsd:string {pattern = "1.3"}}? +omdoc.model =frontmatter,mainmatter,backmatter +omdoc = element omdoc {tref|(omdoc.attribs & omdoc.model)} + + +############################## deprecated ################################ +# the following is for legacy only, and will be removed soon. +ref.attribs = id.attribs & xref.attrib & attribute type {"include" | "cite"} +ref.model = empty +ref = element ref{ref.attribs & ref.model} + +omdoc.class &= ref* +inline.class &= ref* diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocext.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocext.rnc new file mode 100644 index 00000000000..8b37d56603b --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocext.rnc @@ -0,0 +1,64 @@ +# A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) Module EXT +# $Id: omdocext.rnc 8958 2011-09-02 06:01:13Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocext.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2007 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace omdoc = "http://omdoc.org/ns" + +plike.class &= omlet* +omdoc.class &= private* & code* + +private.attribs = toplevel.attribs & + for.attrib? & + attribute requires {omdocref}? & + attribute reformulates {omdocref}? +private.model = metadata.class & data+ +private = element private {tref|(private.attribs & private.model)} +# reformulates is a URIref to the omdoc elements that are reformulated by the +# system-specific information in this element + +code.attribs = private.attribs +code.model = metadata.class & data* & input* & output* & effect* +code = element code {tref|(code.attribs & code.model)} + +input.attribs = id.attribs +input.model = mcf.class +input = element input {tref|(input.attribs & input.model)} + +output.attribs = id.attribs +output.model = mcf.class +output = element output {tref|(output.attribs & output.model)} + +effect.attribs = id.attribs +effect.model = mcf.class +effect = element effect {tref|(effect.attribs & effect.model)} + +data.attribs = id.attribs & + attribute href {xsd:anyURI}? & + attribute size {xsd:string}? & + attribute pto {xsd:string}? & + attribute pto-version {xsd:string}? & + attribute original {"external" | "local"}? + +data.textformat = "TeX" +data.text = data.attribs & attribute format {data.textformat}? & text +data.any = data.attribs & attribute format {xsd:anyURI}? & Anything +data.model = data.text | data.any +data = element data {tref|data.model} + +omlet.attribs = id.attribs & + attribute action {"display" | "execute" | "other"}? & + attribute show {"new" | "replace" | "embed" | "other"}? & + attribute actuate {"onPresent" | "onLoad" | "onRequest" | "other"}? +omlet.param = text & inline.class & param* +omlet.data = attribute data {xsd:anyURI}|(private|code) +omlet.model = metadata.class & omlet.param & omlet.data +omlet = element omlet {tref|(omlet.attribs & omlet.model)} + +param.attribs = id.attribs & + attribute name {xsd:string} & + attribute value {xsd:string}? & + attribute valuetype {"data" | "ref" | "object"}? +param.model = mobj? +param = element param {tref|(param.attribs & param.model)} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocmeta.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocmeta.rnc new file mode 100644 index 00000000000..a77d98d65d4 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocmeta.rnc @@ -0,0 +1,39 @@ +# A RelaxNG for Open Mathematical documents (OMDoc 1.3) Module META +# $Id: omdocmeta.rnc 8958 2011-09-02 06:01:13Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocmeta.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2007-2008 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace omdoc = "http://omdoc.org/ns" + +rel.attrib = attribute rel {curies} +rev.attrib = attribute rev {curies} +content.attrib = attribute content {xsd:string} +resource.attrib = attribute resource {xsd:anyURI|safecurie} +property.attrib = attribute property {curies} +datatype.attrib = attribute datatype {curie} +typeof.attrib = attribute typeof {curies} + +meta.attribs = id.attribs & property.attrib?& datatype.attrib? & xml.lang.attrib +meta.model = content.attrib | Anything | (content.attrib & Anything) +meta = element meta {tref|(meta.attribs & meta.model)} + +mlink.attribs = id.attribs & rel.attrib? & rev.attrib? & resource.attrib? +mlink.class = resource* & mlink* & meta* +mlink.model = attribute href {curie}|mlink.class +mlink = element link {tref|(mlink.attribs,mlink.model)} + +resource.attribs = id.attribs & typeof.attrib? & about.attrib? +resource.class = meta* & mlink* +resource = element resource {tref|(resource.attribs & resource.class)} + +metadata.class = metadata? & meta* & mlink* +metadata.model = metadata.class +metadata.attribs = id.attribs +metadata = element metadata {tref|(metadata.attribs & metadata.model)} + +rdfa.attribs = rel.attrib? & rev.attrib? & content.attrib? & about.attrib? + & resource.attrib? & property.attrib? & datatype.attrib? + & typeof.attrib? + +id.attribs &= rdfa.attribs diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocmobj.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocmobj.rnc new file mode 100644 index 00000000000..dfe54e9d1ac --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocmobj.rnc @@ -0,0 +1,27 @@ +# A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) Module MOBJ +# $Id: omdocmobj.rnc 8973 2011-09-09 12:45:16Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocmobj.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2009 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace omdoc = "http://omdoc.org/ns" + +namespace om = "http://www.openmath.org/OpenMath" +namespace local = "" + +# the legacy element, it can encapsulate the non-migrated formats +legacy.attribs = id.attribs & + attribute formalism {xsd:anyURI}? & + attribute format {xsd:anyURI} +legacy.model = Anything +legacy = element legacy {tref|(legacy.attribs & legacy.model)} + +nonom.attribs = attribute * - (local:* | om:*) {text}* +extom.attribs = idrest.attribs & nonom.attribs +omobj = grammar {include "openmath2.rnc" + common.attributes &= parent extom.attribs} + +cmml = grammar {include "mathml3-common.rnc" + include "mathml3-strict-content.rnc"} + +mobj = legacy | omobj | cmml diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocmtxt.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocmtxt.rnc new file mode 100644 index 00000000000..e4130acab1c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocmtxt.rnc @@ -0,0 +1,105 @@ +# A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) Module MTXT +# $Id: omdocmtxt.rnc 8967 2011-09-02 12:41:47Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocmtxt.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2007 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace omdoc = "http://omdoc.org/ns" + +omdoc.class &= omtext* + +#attribute for is a whitespace-separated list of URIrefs +for.attrib = attribute for {omdocrefs} +from.attrib = attribute from {omdocref} +mc.class = metadata.class & CMP* +mcf.class = mc.class & FMP* + +rsttype = "abstract" | "introduction" | "annote" | + "conclusion" | "thesis" | "comment" | "antithesis" | + "elaboration" | "motivation" | "evidence" | "note" | + "warning" | "question" | "answer" | "transition" + +statementtype = "axiom" | "definition" | "example" | "proof" | + "derive" | "hypothesis" | "notation" + +assertiontype = "assertion" | "theorem" | "lemma" | "corollary" | "proposition" | + "conjecture" | "false-conjecture" | "obligation" | + "postulate" | "formula" | "assumption" | "rule" + +verbalizes.attrib = attribute verbalizes {omdocrefs} +omtext.type.attrib = attribute type {rsttype | statementtype | assertiontype | xsd:anyURI} +index.attrib = attribute index {xsd:NMTOKEN} +parallel.attribs = verbalizes.attrib? & index.attrib? & omtext.type.attrib? + +omtext.attribs = toplevel.attribs & + omtext.type.attrib? & + attribute for {omdocref}? & + attribute from {omdocref}? & + verbalizes.attrib? +omtext.model = mcf.class +omtext = element omtext {tref|(omtext.attribs & omtext.model)} + +CMP.attribs = xml.lang.attrib & id.attribs +CMP.model = plike.class +CMP = element CMP {tref|(CMP.attribs & CMP.model)} + +term.attribs = id.attribs & + attribute role {text}? & + attribute cdbase {xsd:anyURI}? & + attribute cd {xsd:NCName} & + attribute name {xsd:NCName} +term.model = inline.model +term = element term {tref|(term.attribs & term.model)} + +FMP.attribs = id.attribs & attribute logic {xsd:NMTOKEN}? +FMP.model = (assumption*,conclusion*)|mobj +FMP = element FMP {tref|(FMP.attribs & FMP.model)} + +assumption.attribs = id.attribs & + attribute inductive {"yes" | "no"}? +assumption.model = mobj +assumption = element assumption {tref|(assumption.attribs & assumption.model)} + +conclusion.attribs = id.attribs +conclusion.model = mobj +conclusion = element conclusion {tref|(conclusion.attribs & conclusion.model)} + +note.attribs = id.attribs & for.attrib? & parallel.attribs & attribute type {xsd:NMTOKEN}? +note.model = inline.model +note = element note {tref|(note.attribs & note.model)} + +# index +index.att = attribute sort-by {text}? & + attribute see {omdocrefs}? & + attribute seealso {omdocrefs}? & + attribute links {list {xsd:anyURI*}}? + +idx.attribs = id.attribs|xref.attrib +idx.model = idt? & ide+ +idx = element idx {tref|(idx.attribs & idx.model)} + +ide.attribs = (id.attribs & index.att & index.attrib) | xref.attrib +ide.model = idp* +ide = element ide {tref|(ide.attribs & ide.model)} + +idt.attribs = id.attribs|xref.attrib +idt.model = inline.model +idt = element idt {tref|(idt.attribs & idt.model)} + +idp.attribs = index.att +idp.model = inline.model +idp = element idp {tref|(idp.attribs & idp.model)} + +# citations +citation.attribs = id.attribs & attribute bibrefs {text} +citation.model = empty +citation = element citation {tref|(citation.attribs & citation.model)} + +# citations +oref.attribs = id.attribs & attribute href {xsd:anyURI} +oref.model = empty +oref = element oref {tref|(oref.attribs & oref.model)} + +# what can go into a mathematical text +op.class = \term* & mobj* & note* & idx* & citation* & oref* +inline.class &=op.class diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocpf.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocpf.rnc new file mode 100644 index 00000000000..d10b6e89600 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocpf.rnc @@ -0,0 +1,39 @@ +# A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) Module PF +# $Id: omdocpf.rnc 8958 2011-09-02 06:01:13Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocpf.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2007 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace omdoc = "http://omdoc.org/ns" + +omdocpf.opt.content &= proof* & proofobject* +omdoc.class &= proof* & proofobject* + +proof.attribs = toplevel.attribs & for.attrib? +proof.model = metadata.class & omtext* & symbol* & definition* & derive* & hypothesis* +proof = element proof {tref|(proof.attribs & proof.model)} + +proofobject.attribs = proof.attribs +proofobject.model = metadata.class & mobj +proofobject = element proofobject {tref|(proofobject.attribs & proofobject.model)} + +derive.attribs = id.attribs & attribute type {"conclusion" | "gap"}? +derive.model = mcf.class & method? +derive = element derive {tref|(derive.attribs & derive.model)} + +hypothesis.attribs = id.attribs & attribute inductive {"yes" | "no"}? +hypothesis.model = mcf.class +hypothesis = element hypothesis {tref|(hypothesis.attribs & hypothesis.model)} + +method.attribs = id.attribs & xref.attrib? +method.model = mobj* & premise* & proof* & proofobject* +method = element method {tref|(method.attribs & method.model)} + +premise.attribs = xref.attrib & attribute rank {xsd:nonNegativeInteger}? +premise.model = empty +premise = element premise {tref|(premise.attribs & premise.model)} + +# The rank of a premise specifies its importance in the inference rule. +# Rank 0 (the default) is a real premise, whereas positive rank signifies +# sideconditions of varying degree. + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocphys.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocphys.rnc new file mode 100644 index 00000000000..88c30df8169 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocphys.rnc @@ -0,0 +1,47 @@ +# A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) Module PHYS +# $Id: omdocphys.rnc 8959 2011-09-02 06:01:43Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocphys.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2007 Michael Kohlhase, released under the GNU Public License (GPL) + +system.attribs = id.attribs & + attribute type {"ideal" | "real"} +system.model = metadata.class & + observable* & improvement? & algebra? & realization? +system = element system {tref|(system.attribs & system.model)} + +observable.attribs = id.attribs & + attribute low {xsd:float} & + attribute high {xsd:float} +observable.model = mobj,mobj +observable = element observable {tref|(observable.attribs & observable.model)} + +improvement.attribs = id.attribs +improvement.model = mcf.class +improvement = element improvement {tref|(improvement.attribs & improvement.model)} + +realization.attribs = id.attribs +realization.model = mcf.class +realization = element realization {tref|(realization.attribs & realization.model)} + +interpretation.attribs = id.attribs +interpretation.model = mcf.class +interpretation = element interpretation {tref|(interpretation.attribs & interpretation.model)} + +state.attribs = id.attribs & attribute of {omdocref} +state.model = metadata.class & value* +state = element state {tref|(state.attribs & state.model)} + +value.attribs = id.attribs & + attribute for {omdocref} & + attribute num {xsd:float} +value.model = metadata.class +value = element value {tref|(value.attribs & value.model)} + +experiment.attribs = id.attribs +experiment.model = mcf.class,state,state +experiment = element experiment {tref|(experiment.attribs & experiment.model)} + +evidence.attribs = id.attribs & attribute for {omdocref} +evidence.model = experiment*,interpretation +evidence = element evidence {tref|(evidence.attribs & evidence.model)} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocpres.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocpres.rnc new file mode 100644 index 00000000000..2d2b26db632 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocpres.rnc @@ -0,0 +1,91 @@ +# A RelaxNG for Open Mathematical documents (OMDoc 1.3) Module PRES +# $Id: omdocpres.rnc 8973 2011-09-09 12:45:16Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocpres.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2008 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace omdoc = "http://omdoc.org/ns" +omdoc.class &= notation* + +## we first add the ic and ec attributes for notation contexts everywhere +ic.attrib = attribute ic {text} +ec.attrib = attribute ec {text} +idrest.attribs &= ic.attrib? & ec.attrib? + +prototype.attribs = empty +prototype.model = protoexp +prototype = element prototype {tref|(prototype.attribs & prototype.model)} + +protoexp = grammar {include "openmath2.rnc" + {start = omel + common.attributes = parent id.attribs} + omel |= parent proto.class + omvar |= parent proto.class + common.attributes &= parent ntn.attrib} + | grammar {include "mathml3.rnc" {start = ContExp} + ContExp |= parent proto.class + ci |= parent proto.class + CommonAtt &= parent ntn.attrib} + +precedence.att = attribute precedence {xsd:integer} | attribute argprec {xsd:integer} +context.att = attribute xml:lang {text}? & + attribute context {text}? & + attribute variant {text}? + +format.att = attribute format {text}? + +rendering.attribs = precedence.att? & context.att & format.att +rendering.model = renderexp + +rendering = element rendering {tref|(rendering.attribs & rendering.model)} + +renderexp = grammar {include "mathml3-common.rnc" {start = PresentationExpression} + include "mathml3-presentation.rnc" + PresentationExpression |= parent render.class + CommonAtt &= parent ntn.attrib + mtable.content.class |= parent render.class + mtr.content.class |= parent render.class} + | (pdata|render.class)* + +pdata.attribs = empty +pdata.model = text +pdata = element pdata {pdata.attribs & pdata.model} + +iterexp = grammar {include "mathml3.rnc" + {start = PresentationExpression|mtr|mlabeledtr|mtd} + PresentationExpression |= parent render.class + MathML.Common.attrib &= parent ntn.attrib + mtable.content.class |= parent render.class + mtr.content.class |= parent render.class} + + name.attrib = attribute name {xsd:NCName}? + triple.att = attribute cdbase {xsd:anyURI}? & name.attrib & attribute cd {xsd:NCName}? + +notation.attribs = id.attribs & triple.att +notation.model = metadata.class & CMP* & prototype+ & rendering* +notation = element notation {tref|(notation.attribs & notation.model)} + +# we extend the content and presentation models by metavariables +proto.class = exprlist | expr +render.class = render | iterate +ntn.attrib = attribute cr {text}? & attribute egroup {text}? + +exprlist.attribs = name.attrib +exprlist.model = protoexp* +exprlist = element exprlist {exprlist.attribs & exprlist.model} + +expr.attribs = name.attrib +expr.model = empty +expr = element expr {tref|(expr.attribs & expr.model)} + +iterate.attribs = name.attrib & precedence.att? +iterate.model = separator & iterexp* +iterate = element iterate {tref|(iterate.attribs & iterate.model)} + +render.attribs = name.attrib & precedence.att? +render.model = empty +render = element render {tref|(render.attribs & render.model)} + +separator.attribs = empty +separator.model = renderexp* +separator = element separator {tref|(separator.attribs & separator.model)} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocquiz.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocquiz.rnc new file mode 100644 index 00000000000..176ce32feae --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocquiz.rnc @@ -0,0 +1,37 @@ +# A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) Module QUIZ +# $Id: omdocquiz.rnc 8958 2011-09-02 06:01:13Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocquiz.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2007 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace omdoc = "http://omdoc.org/ns" + +omdoc.class &= exercise* & hint* & mc* & solution* +plike.class &= hint* + +exercise.attribs = toplevel.attribs & for.attrib? +exercise.model = mcf.class | omdoc.class +exercise = element exercise {tref|(exercise.attribs & exercise.model)} + +omdocpf.opt.content = notAllowed + +hint.attribs = toplevel.attribs & for.attrib? +hint.model = mcf.class +hint = element hint {tref|(hint.attribs & hint.model)} + +solution.attribs = toplevel.attribs & for.attrib? +solution.model = mcf.class | omdoc.class +solution = element solution {tref|(solution.attribs & solution.model)} + +mc.attribs = toplevel.attribs & for.attrib? +mc.model = choice,hint?,answer +mc = element mc {tref|(mc.attribs & mc.model)} + +choice.attribs = id.attribs +choice.model = mcf.class +choice = element choice {tref|(choice.attribs & choice.model)} + +answer.attribs = id.attribs & attribute verdict {"true" | "false"}? +answer.model = mcf.class +answer = element answer {tref|(answer.attribs & answer.model)} + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocrt.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocrt.rnc new file mode 100644 index 00000000000..ac7c3010494 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocrt.rnc @@ -0,0 +1,32 @@ +# A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) Module RT +# $Id: omdocrt.rnc 8973 2011-09-09 12:45:16Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocrt.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2007 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace omdoc = "http://omdoc.org/ns" + +rst.attribs = verbalizes.attrib? + +## We extend the three main content models by xhtml elements +inline.class &= grammar {include "pxhtml.rnc" + {Inline.model = text & parent metadata.class & Inline.class} + Inline.class &= parent op.class + span.attlist &= parent rst.attribs + start = Inline.class} + +plike.class &= grammar {include "pxhtml.rnc" + {Inline.model = text & parent metadata.class & Inline.class} + Common.attrib &= parent idrest.attribs & parent parallel.attribs + Inline.class &= parent op.class + span.attlist &= parent rst.attribs + start = Block.class} + +omdoc.class &= grammar {include "pxhtml.rnc" + {Inline.model = text & parent metadata.class & Inline.class} + Common.attrib &= parent idrest.attribs & parent parallel.attribs + Inline.class &= parent op.class + Block.cass &= parent plike.class + Flow.model &= parent omdoc.class + span.attlist &= parent rst.attribs + start = List.class} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocst.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocst.rnc new file mode 100644 index 00000000000..46419186d52 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/omdocst.rnc @@ -0,0 +1,135 @@ +# A RelaxNG schema for Open Mathematical documents (OMDoc 1.3) Module ST +# $Id: omdocst.rnc 8972 2011-09-09 11:36:34Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/omdocst.rnc $ +# See the documentation and examples at http://www.omdoc.org +# Copyright (c) 2004-2007 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace omdoc = "http://omdoc.org/ns" + +omdoc.class &= symbol* & axiom* & definition* & imports* & assertion* & type* & alternative* & example* & theory* + +constitutive.attribs = id.attribs & attribute generated-from {omdocref}? +sym.role.attrib = attribute role {"type" | "sort" | "object" | + "binder" | "attribution" | "application" | "constant" | + "semantic-attribution" | "error"} +theory-unique = xsd:NCName +scope.attrib = attribute scope {"global" | "local"}? +symbol.attribs = scope.attrib & + attribute name {theory-unique}? & + constitutive.attribs & + sym.role.attrib? +symbol.model = metadata.class & type* +symbol = element symbol {tref|(symbol.attribs & symbol.model)} + +forname.attrib = attribute for {list {xsd:NCName+}} +axiom.attribs = constitutive.attribs & forname.attrib & attribute type {xsd:string}? +axiom.model = metadata.class & mcf.class +axiom = element axiom {tref|(axiom.attribs & axiom.model)} + +#informal definitions +def.informal = attribute type {"informal"}? + +#simple definitions +def.simple.attribs = attribute type {"simple"} +def.simple = def.simple.attribs & mobj + +#implicit definitions +exists.attrib = attribute existence {omdocref} +unique.attrib = attribute uniqueness {omdocref} +def.implicit.attribs = attribute type {"implicit"} & exists.attrib? & unique.attrib? +def.implicit = def.implicit.attribs & FMP* + +exhaust.attrib = attribute exhaustivity {omdocref} +consist.attrib = attribute consistency {omdocref} + +def.pattern.attribs = attribute type {"pattern"}? & exhaust.attrib? & consist.attrib? +def.pattern.model = requation* +def.pattern = def.pattern.attribs & def.pattern.model + +def.inductive.attribs = attribute type {"inductive"}? & exhaust.attrib? & consist.attrib? +def.inductive.model = requation* & measure? & ordering? +def.inductive = def.inductive.attribs & def.inductive.model + +def.eq = def.pattern | def.inductive + +#all definition forms, add more by extending this. +defs.all = def.informal | def.simple | def.implicit | def.eq + +# Definitions contain CMPs, FMPs and concept specifications. +# The latter define the set of concepts defined in this element. +# They can be reached under this name in the content dictionary +# of the name specified in the theory attribute of the definition. +definition.attribs = constitutive.attribs & forname.attrib +definition = element definition {tref|(definition.attribs & mc.class & defs.all)} + +requation.attribs = id.attribs +requation.model = mobj,mobj +requation = element requation {tref|(requation.attribs & requation.model)} + +measure.attribs = id.attribs +measure.model = mobj +measure = element measure {tref|(measure.attribs & measure.model)} + +ordering.attribs = id.attribs & attribute terminating {omdocref}? +ordering.model = mobj +ordering = element ordering {tref|(ordering.attribs & ordering.model)} + +# the non-constitutive statements, they need a theory attribute +toplevel.attribs &= attribute theory {omdocref}? + +ded.status.class = "satisfiable" | "counter-satisfiable" | "no-consequence" | + "theorem" | "conter-theorem" | "contradictory-axioms" | + "tautologous-conclusion" | " tautology" | "equivalent" | + "conunter-equivalent" | "unsatisfiable-conclusion" | "unsatisfiable" + +just-by.attrib = attribute just-by {omdocref} +assertion.attribs = toplevel.attribs & + attribute type {assertiontype}? & + attribute status {ded.status.class}? & + just-by.attrib? +assertion.model = mcf.class +assertion = element assertion {tref|(assertion.attribs & assertion.model)} +# the assertiontype has no formal meaning yet, it is solely for human consumption. +# 'just-by' is a list of URIRefs that point to proof objects, etc that justifies the status. + +type.attribs = toplevel.attribs & just-by.attrib? & + attribute system {omdocref}? & + attribute for {omdocref}? +type.model = mc.class, mobj, mobj? +type = element type {tref|(type.attribs & type.model)} + +##just-by, points to the theorem justifying well-definedness +## entailed-by, entails, point to other (equivalent definitions +## entailed-by-thm, entails-thm point to the theorems justifying +## the entailment relation) +alternative.attribs = toplevel.attribs & for.attrib & + ((attribute equivalence {omdocref}, + attribute equivalence-thm {omdocref}) | + (attribute entailed-by {omdocref} & + attribute entails {omdocref} & + attribute entailed-by-thm {omdocref} & + attribute entails-thm {omdocref})) +alternative.model = mc.class & defs.all +alternative = element alternative {tref|(alternative.attribs & alternative.model)} + +example.attribs = toplevel.attribs & for.attrib & + attribute type {"for" | "against" }? & + attribute assertion {omdocref}? +example.model = mc.class,mobj* +example = element example {tref|(example.attribs & example.model)} + +theory.attribs = id.attribs & + attribute cdurl {xsd:anyURI}? & + attribute cdbase {xsd:anyURI}? & + attribute cdreviewdate {xsd:date}? & + attribute cdversion {xsd:nonNegativeInteger}? & + attribute cdrevision {xsd:nonNegativeInteger}? & + attribute cdstatus {"official" | "experimental" |"private" | "obsolete"}? +theory.model = metadata.class & omdoc.class +theory = element theory {tref|(theory.attribs & theory.model)} + +imports.attribs = id.attribs & from.attrib +imports.model = metadata.class +imports = element imports {tref|(imports.attribs & imports.model)} + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/openmath2.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/openmath2.rnc new file mode 100644 index 00000000000..2d07eb14148 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/openmath2.rnc @@ -0,0 +1,89 @@ +# RELAX NG Schema for OpenMath 2 +# $Id: openmath2.rnc 8959 2011-09-02 06:01:43Z kohlhase $ +# $HeadURL: https://svn.omdoc.org/repos/omdoc/branches/omdoc-1.3/schema/rnc/openmath2.rnc $ +# See the documentation and examples at http://www.openmath.org + +default namespace om = "http://www.openmath.org/OpenMath" + +start = OMOBJ + +# OpenMath object constructor +OMOBJ = element OMOBJ { compound.attributes, + attribute version { xsd:string }?, + omel } + +# Elements which can appear inside an OpenMath object +omel = + OMS | OMV | OMI | OMB | OMSTR | OMF | OMA | OMBIND | OME | OMATTR |OMR + +# things which can be variables +omvar = OMV | attvar + +attvar = element OMATTR { common.attributes,(OMATP , (OMV | attvar))} + + +cdbase = attribute cdbase { xsd:anyURI}? + +# attributes common to all elements +common.attributes = (attribute id { xsd:ID })? + +# attributes common to all elements that construct compount OM objects. +compound.attributes = common.attributes,cdbase + +# symbol +OMS = element OMS { common.attributes, + attribute name {xsd:NCName}, + attribute cd {xsd:NCName}, + cdbase } + +# variable +OMV = element OMV { common.attributes, + attribute name { xsd:NCName} } + +# integer +OMI = element OMI { common.attributes, + xsd:string {pattern = "\s*(-\s?)?[0-9]+(\s[0-9]+)*\s*"}} +# byte array +OMB = element OMB { common.attributes, xsd:base64Binary } + +# string +OMSTR = element OMSTR { common.attributes, text } + +# IEEE floating point number +OMF = element OMF { common.attributes, + ( attribute dec { xsd:double } | + attribute hex { xsd:string {pattern = "[0-9A-F]+"}}) } + +# apply constructor +OMA = element OMA { compound.attributes, omel+ } + +# binding constructor +OMBIND = element OMBIND { compound.attributes, omel, OMBVAR, omel } + +# variables used in binding constructor +OMBVAR = element OMBVAR { common.attributes, omvar+ } + +# error constructor +OME = element OME { common.attributes, OMS, (omel|OMFOREIGN)* } + +# attribution constructor and attribute pair constructor +OMATTR = element OMATTR { compound.attributes, OMATP, omel } + +OMATP = element OMATP { compound.attributes, (OMS, (omel | OMFOREIGN) )+ } + +# foreign constructor +OMFOREIGN = element OMFOREIGN { + compound.attributes, attribute encoding {xsd:string}?, + (omel|notom)* } + +# Any elements not in the om namespace +# (valid om is allowed as a descendant) +notom = + (element * - om:* {attribute * { text }*,(omel|notom)*} + | text) + +# reference constructor +OMR = element OMR { common.attributes, + attribute href { xsd:anyURI } + } + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/pxhtml.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/pxhtml.rnc new file mode 100644 index 00000000000..f9758a57506 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/pxhtml.rnc @@ -0,0 +1,17 @@ +# XHTML for paragraphs in OMDoc +# this is a subset of the xhtml RelaxNG schema for XHTML we use it for paragraphs in OMDoc1.3 + +default namespace xhtml = "http://www.w3.org/1999/xhtml" + +include "xhtml-datatypes.rnc" +include "xhtml-attribs.rnc" +include "xhtml-text.rnc" +include "xhtml-hypertext.rnc" +include "xhtml-list.rnc" +include "xhtml-image.rnc" +include "xhtml-param.rnc" +include "xhtml-object.rnc" +include "xhtml-bdo.rnc" +include "xhtml-applet.rnc" +include "xhtml-table.rnc" +include "xhtml-inlstyle.rnc" diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/schemas.xml b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/schemas.xml new file mode 100644 index 00000000000..7709ff94ead --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/schemas.xml @@ -0,0 +1,4 @@ + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/todo b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/todo new file mode 100644 index 00000000000..1d7969e6fd5 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/todo @@ -0,0 +1,3 @@ +- maybe move metadata back into omdoc-core.mod +- is omgroup.... really conditional now? +- integrate MathML diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/todo.txt b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/todo.txt new file mode 100644 index 00000000000..1b4aec578a8 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/todo.txt @@ -0,0 +1,2 @@ +- tighten up the grammar for definition, we can make the relation between + type and content explicit now diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-applet.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-applet.rnc new file mode 100644 index 00000000000..eaaa1a15a52 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-applet.rnc @@ -0,0 +1,19 @@ +# Applet Module + +applet = + element applet { + applet.attlist, + # No restrictions on mixed content in TREX. + param*, + Flow.model + } +applet.attlist = + Core.attrib & + attribute alt { Text.datatype } & + attribute archive { text }? & + attribute code { text }? & + attribute codebase { URI.datatype }? & + attribute object { text }? & + attribute height { Length.datatype } & + attribute width { Length.datatype } +Inline.class &= applet* diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-attribs.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-attribs.rnc new file mode 100644 index 00000000000..0aa6e323164 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-attribs.rnc @@ -0,0 +1,14 @@ +# Common Attributes Module + +id.attrib = attribute id { ID.datatype }? +class.attrib = attribute class { NMTOKENS.datatype }? +title.attrib = attribute title { Text.datatype }? +Core.attrib = id.attrib & class.attrib & title.attrib +lang.attrib = attribute xml:lang { LanguageCode.datatype }? +I18n.attrib = lang.attrib +Common.attrib = Core.attrib & I18n.attrib +CommonIdRequired.attrib = + attribute id { ID.datatype } & + class.attrib & + title.attrib & + I18n.attrib diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-basic-table.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-basic-table.rnc new file mode 100644 index 00000000000..c0205d29716 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-basic-table.rnc @@ -0,0 +1,28 @@ +# Basic Tables Module + +table = element table { table.attlist & caption? & tr+ } +table.attlist = + Common.attrib & + attribute summary { Text.datatype }? +caption = element caption { caption.attlist, Inline.model } +caption.attlist = Common.attrib +tr = element tr { tr.attlist & (th | td)+ } +tr.attlist = Common.attrib & CellHAlign.attrib & CellVAlign.attrib +th = element th { th.attlist & Flow.model } +th.attlist = Cell.attrib +td = element td { td.attlist & Flow.model } +td.attlist = Cell.attrib +Cell.attrib = + Common.attrib & + attribute abbr { Text.datatype }? & + attribute axis { text }? & + attribute headers { IDREFS.datatype }? & + scope.attrib & + attribute rowspan { Number.datatype }? & + attribute colspan { Number.datatype }? & + CellHAlign.attrib & + CellVAlign.attrib +CellHAlign.attrib = attribute align { "left" | "center" | "right" }? +CellVAlign.attrib = attribute valign { "top" | "middle" | "bottom" }? +scope.attrib = attribute scope { "row" | "col" }? +Block.class &= table* diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-bdo.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-bdo.rnc new file mode 100644 index 00000000000..96bd91e378d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-bdo.rnc @@ -0,0 +1,7 @@ +# Bi-directional Module + +bdo = element bdo { bdo.attlist & Inline.model } +bdo.attlist = Core.attrib & lang.attrib & dir.attrib +dir.attrib = attribute dir { "ltr" | "rtl" } +I18n.attrib &= dir.attrib? +Inline.class &= bdo* diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-datatypes.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-datatypes.rnc new file mode 100644 index 00000000000..596598039dd --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-datatypes.rnc @@ -0,0 +1,47 @@ +# Datatypes Module + +# Length defined for cellpadding/cellspacing + +# nn for pixels or nn% for percentage length +Length.datatype = text +# space-separated list of link types +LinkTypes.datatype = NMTOKENS.datatype +# single or comma-separated list of media descriptors +MediaDesc.datatype = text +# pixel, percentage, or relative +MultiLength.datatype = text +# one or more digits (NUMBER) +Number.datatype = text +# integer representing length in pixels +Pixels.datatype = text +# script expression +Script.datatype = text +# textual content +Text.datatype = text +# Imported Datatypes ................................ + +# a single character from [ISO10646] +Character.datatype = text +# a character encoding, as per [RFC2045] +Charset.datatype = text +# a space separated list of character encodings, as per [RFC2045] +Charsets.datatype = text +# media type, as per [RFC2045] +ContentType.datatype = text +# comma-separated list of media types, as per [RFC2045] +ContentTypes.datatype = text +# date and time information. ISO date format +Datetime.datatype = text +# formal public identifier, as per [ISO8879] +FPI.datatype = text +# a language code, as per [RFC1766] +LanguageCode.datatype = xsd:language +# a Uniform Resource Identifier, see [URI] +URI.datatype = xsd:anyURI +# a space-separated list of Uniform Resource Identifiers, see [URI] +URIs.datatype = text +NMTOKEN.datatype = xsd:NMTOKEN +NMTOKENS.datatype = xsd:NMTOKENS +ID.datatype = xsd:ID +IDREF.datatype = xsd:IDREF +IDREFS.datatype = xsd:IDREFS diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-hypertext.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-hypertext.rnc new file mode 100644 index 00000000000..0dc78e6161f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-hypertext.rnc @@ -0,0 +1,16 @@ +# Hypertext Module + +# Depends on text module. + +a = element a { a.attlist & Inline.model } +a.attlist = + Common.attrib & + attribute href { URI.datatype }? & + attribute charset { Charset.datatype }? & + attribute type { ContentType.datatype }? & + attribute hreflang { LanguageCode.datatype }? & + attribute rel { LinkTypes.datatype }? & + attribute rev { LinkTypes.datatype }? & + attribute accesskey { Character.datatype }? & + attribute tabindex { Number.datatype }? +Inline.class &= a* diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-image.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-image.rnc new file mode 100644 index 00000000000..f897cc6d956 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-image.rnc @@ -0,0 +1,11 @@ +# Image Module + +img = element img { img.attlist } +img.attlist = + Common.attrib & + attribute src { URI.datatype } & + attribute alt { Text.datatype } & + attribute longdesc { URI.datatype }? & + attribute height { Length.datatype }? & + attribute width { Length.datatype }? +Inline.class &= img* diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-inlstyle.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-inlstyle.rnc new file mode 100644 index 00000000000..aa69b75ab61 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-inlstyle.rnc @@ -0,0 +1,3 @@ +# Inline Style Module + +Core.attrib &= attribute style { text }? diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-list.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-list.rnc new file mode 100644 index 00000000000..ce20fc89884 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-list.rnc @@ -0,0 +1,16 @@ +# List Module + +dl = element dl { dl.attlist & (dt | dd)+ } +dl.attlist = Common.attrib +dt = element dt { dt.attlist & Inline.model } +dt.attlist = Common.attrib +dd = element dd { dd.attlist &Flow.model } +dd.attlist = Common.attrib +ol = element ol { ol.attlist & li+ } +ol.attlist = Common.attrib +ul = element ul { ul.attlist & li+ } +ul.attlist = Common.attrib +li = element li { li.attlist & Flow.model } +li.attlist = Common.attrib +List.class = ul* & ol* & dl* +Block.class &= List.class diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-object.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-object.rnc new file mode 100644 index 00000000000..2ec52ecf798 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-object.rnc @@ -0,0 +1,24 @@ +# Object Module + +object = + element object { + object.attlist, + # No restrictions on mixed content in TREX. + param*, + Flow.model + } +object.attlist = + Common.attrib & + attribute declare { "declare" }? & + attribute classid { URI.datatype }? & + attribute codebase { URI.datatype }? & + attribute data { URI.datatype }? & + attribute type { ContentType.datatype }? & + attribute codetype { ContentType.datatype }? & + attribute archive { URIs.datatype }? & + attribute standby { Text.datatype }? & + attribute height { Length.datatype }? & + attribute width { Length.datatype }? & + attribute name { text }? & + attribute tabindex { Number.datatype }? +Inline.class &= object* diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-param.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-param.rnc new file mode 100644 index 00000000000..641f695eab8 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-param.rnc @@ -0,0 +1,9 @@ +# Param Module + +param = element param { param.attlist } +param.attlist = + id.attrib & + attribute name { text } & + attribute value { text }? & + attribute valuetype { "data" | "ref" | "object" }? & + attribute type { ContentType.datatype }? diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-table.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-table.rnc new file mode 100644 index 00000000000..ab2b4d20ee4 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-table.rnc @@ -0,0 +1,67 @@ +# Tables Module + +# This builds on the basic tables module, unlike with the DTD +# implementation. + +include "xhtml-basic-table.rnc" { + table = + element table { + table.attlist, + caption?, + (col* | colgroup*), + ((thead?, tfoot?, tbody+) | tr+) + } + th = element th { th.attlist & Flow.model } + td = element td { td.attlist & Flow.model } + CellHAlign.attrib = + attribute align { + "left" | "center" | "right" | "justify" | "char" + }? & + attribute char { Character.datatype }? & + attribute charoff { Length.datatype }? + CellVAlign.attrib = + attribute valign { "top" | "middle" | "bottom" | "baseline" }? + scope.attrib = + attribute scope { "row" | "col" | "rowgroup" | "colgroup" }? +} +table.attlist &= + attribute width { Length.datatype }? & + attribute border { Pixels.datatype }? & + frame.attrib & + rules.attrib & + attribute cellspacing { Length.datatype }? & + attribute cellpadding { Length.datatype }? +col = element col { col.attlist } +col.attlist = + Common.attrib & + attribute span { Number.datatype }? & + attribute width { MultiLength.datatype }? & + CellHAlign.attrib & + CellVAlign.attrib +colgroup = element colgroup { colgroup.attlist & col* } +colgroup.attlist = + Common.attrib & + attribute span { Number.datatype }? & + attribute width { MultiLength.datatype }? & + CellHAlign.attrib & + CellVAlign.attrib +tbody = element tbody { tbody.attlist & tr+ } +tbody.attlist = Common.attrib & CellHAlign.attrib & CellVAlign.attrib +thead = element thead { thead.attlist & tr+ } +thead.attlist = Common.attrib & CellHAlign.attrib & CellVAlign.attrib +tfoot = element tfoot { tfoot.attlist & tr+ } +tfoot.attlist = Common.attrib & CellHAlign.attrib & CellVAlign.attrib +frame.attrib = + attribute frame { + "void" + | "above" + | "below" + | "hsides" + | "lhs" + | "rhs" + | "vsides" + | "box" + | "border" + }? +rules.attrib = + attribute rules { "none" | "groups" | "rows" | "cols" | "all" }? diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-text.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-text.rnc new file mode 100644 index 00000000000..b9e999be009 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/omdoc/xhtml-text.rnc @@ -0,0 +1,86 @@ +# Text Module +br = element br { br.attlist & empty } +br.attlist = Core.attrib + +span = element span { span.attlist & Inline.model } +span.attlist = Common.attrib + +abbr = element abbr { abbr.attlist & Inline.model } +abbr.attlist = Common.attrib + +acronym = element acronym { acronym.attlist & Inline.model } +acronym.attlist = Common.attrib + +cite = element cite { cite.attlist & Inline.model } +cite.attlist = Common.attrib + +code = element code { code.attlist & Inline.model } +code.attlist = Common.attrib + +dfn = element dfn { dfn.attlist & Inline.model } +dfn.attlist = Common.attrib + +em = element em { em.attlist & Inline.model } +em.attlist = Common.attrib + +kbd = element kbd { kbd.attlist & Inline.model } +kbd.attlist = Common.attrib + +q = element q { q.attlist & Inline.model } +q.attlist = + Common.attrib & + attribute cite { URI.datatype }? + +samp = element samp { samp.attlist & Inline.model } +samp.attlist = Common.attrib + +strong = element strong { strong.attlist & Inline.model } +strong.attlist = Common.attrib + +var = element var { var.attlist & Inline.model } +var.attlist = Common.attrib + +\div = element div { div.attlist & Flow.model } +div.attlist = Common.attrib + +p = element p { p.attlist & Inline.model } +p.attlist = Common.attrib + +address = element address { address.attlist & Inline.model } +address.attlist = Common.attrib + +blockquote = element blockquote { blockquote.attlist & Block.model } +blockquote.attlist = + Common.attrib & + attribute cite { URI.datatype }? + +pre = element pre { pre.attlist & Inline.model } +pre.attlist = + Common.attrib & + attribute xml:space { "preserve" }? + +Block.class = address* & blockquote* & \div* & p* & pre* + +Inline.class = + abbr* + & acronym* + & br* + & cite* + & code* + & dfn* + & em* + & kbd* + & q* + & samp* + & span* + & strong* + & var* + +Inline.model = text & Inline.class +# This is redefined by the legacy module to include inlines. + +Block.mix = Block.class + +Block.model = Block.mix+ + +Flow.model = text & Inline.class & Block.class diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/owl.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/owl.rnc new file mode 100644 index 00000000000..a262df3fc31 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/owl.rnc @@ -0,0 +1,44 @@ +# A simplified RelaxNG for OWL (so that we can generate OWL from sTeX +# https://kwarc.info/repos/kwarc/repos/stex/rnc/omdoc+ltxml.rnc +# (c) 2010 Michael Kohlhase, released under the GNU Public License (GPL) + +namespace owl = "http://www.w3.org/2002/07/owl#" +namespace rdf = "http://www.w3.org/1999/02/22-rdf-syntax-ns#" +namespace rdfs = "http://www.w3.org/2000/01/rdf-schema#" +namespace stex = "http://kwarc.info/ns/sTeX" +namespace local = "" + +nonlocal-attribs = attribute * - (local:* | owl:* | rdf:* | rdfs:*) {xsd:string} + +start = RDF + +RDF = element rdf:RDF {nonlocal-attribs & Ontology} + +Ontology.attribs = nonlocal-attribs* & about.attrib? +Ontology.model = Class* & Property* +Ontology = element owl:Ontology {Ontology.attribs & Ontology.model} + +about.attrib = attribute rdf:about {xsd:anyURI} +resource.attrib = attribute rdf:resource {xsd:anyURI} +label.attrib = attribute rdfs:label {text} +comment.attrib = attribute rdfs:comment {text} + + +Class.attribs = nonlocal-attribs* & about.attrib? & label.attrib? & comment.attrib? +Class.model = rdftype* & subClassOf* & disjointWith* & isDefinedBy? +Class = element rdfs:Class {Class.attribs & Class.model} + +Property.attribs = nonlocal-attribs* & about.attrib? & label.attrib? & comment.attrib? +Property.model = rdftype* & domain? & range & isDefinedBy? +Property = element rdf:Property {Property.attribs & Property.model} + +rdftype.attribs = nonlocal-attribs* & resource.attrib +#rdftype.model = notAllowed +rdftype = element rdf:type {rdftype.attribs} + +subClassOf = element rdfs:subClassOf {resource.attrib} +isDefinedBy = element rdfs:isDefinedBy {resource.attrib} +disjointWith = element owl:disjointWith {resource.attrib} + +range = element rdfs:range {resource.attrib} +domain = element rdfs:domain {resource.attrib} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/owl2+ltxml.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/owl2+ltxml.rnc new file mode 100644 index 00000000000..4a2259005d8 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/owl2+ltxml.rnc @@ -0,0 +1,15 @@ +# A simplified RelaxNG for OWL2 (so that we can generate OWL from sTeX +# https://kwarc.info/repos/kwarc/repos/stex/rnc/omdoc+ltxml.rnc +# (c) 2010 Michael Kohlhase, released under the GNU Public License (GPL) + +namespace owl = "http://www.w3.org/2002/07/owl#" + +include "owl2xml.rnc" + +LTXML.Math = grammar { + include "LaTeXML/LaTeXML-common.rnc" + include "LaTeXML/LaTeXML-math.rnc" + start = Math} +Ontology.model &=LTXML.Math & axiom + +axiom = element owl:Axiom { LTXML.Math& Annotation} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/owl2-xml.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/owl2-xml.rnc new file mode 100644 index 00000000000..cf0bb9c5774 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/owl2-xml.rnc @@ -0,0 +1,532 @@ +# From: http://www.w3.org/TR/rdf-sparql-query/#grammar +# The entities implement productions [95] (PN_CHARS_BASE), [96] (PN_CHARS_U), [98] (PN_CHARS), [99] (PN_PREFIX), +# [100] (PN_LOCAL), [71] (PNAME_NS), [72] (PNAME_LN) and [68] (PrefixedName) +# +# PN_PREFIX is roughly equivalent to NCName. + +default namespace = "http://www.w3.org/2002/07/owl#" + +# The ontology +Prefix.type = + attribute name { + xsd:string { + pattern = + "([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿])(([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀]|\.)*([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀] ))?|" + } + }, + attribute IRI { xsd:anyURI } +start |= Prefix +Prefix = element Prefix { Prefix.type } +Import.type = attribute specialAttrs { text } +start |= Import +Import = element Import { Import.type } +Ontology.type = + Prefix*, + Import*, + ontologyAnnotations, + Axiom*, + attribute ontologyIRI { xsd:anyURI }?, + attribute versionIRI { xsd:anyURI }?, + attribute specialAttrs { text } +start |= Ontology +Ontology = element Ontology { Ontology.type } +# Entities, anonymous individuals, and literals + +# Note that the "Entity" group does not have a corresponding abstract type. +# This is due to the fact that XML Schema does not support multiple inheritence. +# "owl:Class" is both an entity and a class expression. The authors of this schema +# determined it was more useful to be able to retrieve "owl:Class" in such queries +# as schema(*, owl:ClassExpression). +Entity = + Class + | Datatype + | ObjectProperty + | DataProperty + | AnnotationProperty + | NamedIndividual +# This is the type for the attribute. The complex type for the element is capitalized. +abbreviatedIRI = + xsd:string { + pattern = + "(((([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿])(([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀]|\.)*([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀] ))?)?:)(([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|[0-9])(([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀]|\.)*([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀]))?))|((([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿])(([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀]|\.)*([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀] ))?)?:)" + } +Class.type = + ClassExpression, + attribute IRI { xsd:anyURI }?, + attribute abbreviatedIRI { abbreviatedIRI }? +start |= Class +Class = element Class { Class.type } +Datatype.type = + DataRange, + attribute IRI { xsd:anyURI }?, + attribute abbreviatedIRI { abbreviatedIRI }? +start |= Datatype +Datatype = element Datatype { Datatype.type } +ObjectProperty.type = + ObjectPropertyExpression, + attribute IRI { xsd:anyURI }?, + attribute abbreviatedIRI { abbreviatedIRI }? +start |= ObjectProperty +ObjectProperty = element ObjectProperty { ObjectProperty.type } +DataProperty.type = + DataPropertyExpression, + attribute IRI { xsd:anyURI }?, + attribute abbreviatedIRI { abbreviatedIRI }? +start |= DataProperty +DataProperty = element DataProperty { DataProperty.type } +AnnotationProperty.type = + attribute IRI { xsd:anyURI }?, + attribute abbreviatedIRI { abbreviatedIRI }?, + attribute specialAttrs { text } +start |= AnnotationProperty +AnnotationProperty = element AnnotationProperty { AnnotationProperty.type } +Individual = attribute specialAttrs { text }, (NamedIndividual | AnonymousIndividual) +NamedIndividual.type = + Individual, + attribute IRI { xsd:anyURI }?, + attribute abbreviatedIRI { abbreviatedIRI }? +start |= NamedIndividual +NamedIndividual = element NamedIndividual { NamedIndividual.type } +AnonymousIndividual.type = + Individual, + attribute nodeID { xsd:NCName } +start |= AnonymousIndividual +AnonymousIndividual = + element AnonymousIndividual { AnonymousIndividual.type } +Literal.type = + attribute datatypeIRI { xsd:anyURI }, + attribute specialAttrs { text } +start |= Literal +Literal = element Literal { Literal.type } +# Declarations +Declaration.type = Axiom, Entity +start |= Declaration +Declaration = element Declaration { Declaration.type } +# Object property expressions +ObjectPropertyExpression = attribute specialAttrs { text }, (ObjectProperty | ObjectInverseOf) +ObjectInverseOf.type = ObjectPropertyExpression, ObjectProperty +start |= ObjectInverseOf +ObjectInverseOf = element ObjectInverseOf { ObjectInverseOf.type } +# Data property expressions +DataPropertyExpression = attribute specialAttrs { text }, DataProperty +# Data ranges +DataRange = attribute specialAttrs { text }, + (Datatype + | DataIntersectionOf + | DataUnionOf + | DataComplementOf + | DataOneOf + | DatatypeRestriction) +DataIntersectionOf.type = DataRange, DataRange+ +start |= DataIntersectionOf +DataIntersectionOf = element DataIntersectionOf { DataIntersectionOf.type } +DataUnionOf.type = DataRange, DataRange+ +start |= DataUnionOf +DataUnionOf = element DataUnionOf { DataUnionOf.type } +DataComplementOf.type = DataRange, DataRange +start |= DataComplementOf +DataComplementOf = element DataComplementOf { DataComplementOf.type } +DataOneOf.type = DataRange, Literal+ +start |= DataOneOf +DataOneOf = element DataOneOf { DataOneOf.type } +DatatypeRestriction.type = + DataRange, + Datatype, + element FacetRestriction { FacetRestriction }+ +start |= DatatypeRestriction +DatatypeRestriction = + element DatatypeRestriction { DatatypeRestriction.type } +FacetRestriction = + Literal, + attribute facet { xsd:anyURI }, + attribute specialAttrs { text } +# Class expressions +ClassExpression = attribute specialAttrs { text }, + (Class + | ObjectIntersectionOf + | ObjectUnionOf + | ObjectComplementOf + | ObjectOneOf + | ObjectSomeValuesFrom + | ObjectAllValuesFrom + | ObjectHasValue + | ObjectHasSelf + | ObjectMinCardinality + | ObjectMaxCardinality + | ObjectExactCardinality + | DataSomeValuesFrom + | DataAllValuesFrom + | DataHasValue + | DataMinCardinality + | DataMaxCardinality + | DataExactCardinality) +ObjectIntersectionOf.type = ClassExpression, ClassExpression+ +start |= ObjectIntersectionOf +ObjectIntersectionOf = + element ObjectIntersectionOf { ObjectIntersectionOf.type } +ObjectUnionOf.type = ClassExpression, ClassExpression+ +start |= ObjectUnionOf +ObjectUnionOf = element ObjectUnionOf { ObjectUnionOf.type } +ObjectComplementOf.type = ClassExpression, ClassExpression +start |= ObjectComplementOf +ObjectComplementOf = element ObjectComplementOf { ObjectComplementOf.type } +ObjectOneOf.type = ClassExpression, Individual+ +start |= ObjectOneOf +ObjectOneOf = element ObjectOneOf { ObjectOneOf.type } +ObjectSomeValuesFrom.type = + ClassExpression, ObjectPropertyExpression, ClassExpression +start |= ObjectSomeValuesFrom +ObjectSomeValuesFrom = + element ObjectSomeValuesFrom { ObjectSomeValuesFrom.type } +ObjectAllValuesFrom.type = + ClassExpression, ObjectPropertyExpression, ClassExpression +start |= ObjectAllValuesFrom +ObjectAllValuesFrom = + element ObjectAllValuesFrom { ObjectAllValuesFrom.type } +ObjectHasValue.type = ClassExpression, ObjectPropertyExpression, Individual +start |= ObjectHasValue +ObjectHasValue = element ObjectHasValue { ObjectHasValue.type } +ObjectHasSelf.type = ClassExpression, ObjectPropertyExpression +start |= ObjectHasSelf +ObjectHasSelf = element ObjectHasSelf { ObjectHasSelf.type } +ObjectMinCardinality.type = + ClassExpression, + ObjectPropertyExpression, + ClassExpression?, + attribute cardinality { xsd:nonNegativeInteger } +start |= ObjectMinCardinality +ObjectMinCardinality = + element ObjectMinCardinality { ObjectMinCardinality.type } +ObjectMaxCardinality.type = + ClassExpression, + ObjectPropertyExpression, + ClassExpression?, + attribute cardinality { xsd:nonNegativeInteger } +start |= ObjectMaxCardinality +ObjectMaxCardinality = + element ObjectMaxCardinality { ObjectMaxCardinality.type } +ObjectExactCardinality.type = + ClassExpression, + ObjectPropertyExpression, + ClassExpression?, + attribute cardinality { xsd:nonNegativeInteger } +start |= ObjectExactCardinality +ObjectExactCardinality = + element ObjectExactCardinality { ObjectExactCardinality.type } +DataSomeValuesFrom.type = ClassExpression, DataPropertyExpression+, DataRange +start |= DataSomeValuesFrom +DataSomeValuesFrom = element DataSomeValuesFrom { DataSomeValuesFrom.type } +DataAllValuesFrom.type = ClassExpression, DataPropertyExpression+, DataRange +start |= DataAllValuesFrom +DataAllValuesFrom = element DataAllValuesFrom { DataAllValuesFrom.type } +DataHasValue.type = ClassExpression, DataPropertyExpression, Literal +start |= DataHasValue +DataHasValue = element DataHasValue { DataHasValue.type } +DataMinCardinality.type = + ClassExpression, + DataPropertyExpression, + DataRange?, + attribute cardinality { xsd:nonNegativeInteger } +start |= DataMinCardinality +DataMinCardinality = element DataMinCardinality { DataMinCardinality.type } +DataMaxCardinality.type = + ClassExpression, + DataPropertyExpression, + DataRange?, + attribute cardinality { xsd:nonNegativeInteger } +start |= DataMaxCardinality +DataMaxCardinality = element DataMaxCardinality { DataMaxCardinality.type } +DataExactCardinality.type = + ClassExpression, + DataPropertyExpression, + DataRange?, + attribute cardinality { xsd:nonNegativeInteger } +start |= DataExactCardinality +DataExactCardinality = + element DataExactCardinality { DataExactCardinality.type } +# Axioms +Axiom = axiomAnnotations, attribute specialAttrs { text }, + (Declaration + | ClassAxiom + | ObjectPropertyAxiom + | DataPropertyAxiom + | DatatypeDefinition + | HasKey + | Assertion + | AnnotationAxiom) +# Class expression axioms +ClassAxiom = Axiom | SubClassOf | EquivalentClasses | DisjointClasses | DisjointUnion +SubClassOf.type = + ClassAxiom, + ClassExpression, + # This is the subexpression + ClassExpression + # This is the superexpression + +start |= SubClassOf +SubClassOf = element SubClassOf { SubClassOf.type } +EquivalentClasses.type = ClassAxiom, ClassExpression+ +start |= EquivalentClasses +EquivalentClasses = element EquivalentClasses { EquivalentClasses.type } +DisjointClasses.type = ClassAxiom, ClassExpression+ +start |= DisjointClasses +DisjointClasses = element DisjointClasses { DisjointClasses.type } +DisjointUnion.type = ClassAxiom, Class, ClassExpression+ +start |= DisjointUnion +DisjointUnion = element DisjointUnion { DisjointUnion.type } +# Object property axioms +ObjectPropertyAxiom = Axiom| + SubObjectPropertyOf + | EquivalentObjectProperties + | DisjointObjectProperties + | InverseObjectProperties + | ObjectPropertyDomain + | ObjectPropertyRange + | FunctionalObjectProperty + | InverseFunctionalObjectProperty + | ReflexiveObjectProperty + | IrreflexiveObjectProperty + | SymmetricObjectProperty + | AsymmetricObjectProperty + | TransitiveObjectProperty +SubObjectPropertyOf.type = + ObjectPropertyAxiom, + (# This is the subproperty expression or the property chain + ObjectPropertyExpression + | element ObjectPropertyChain { ObjectPropertyChain.type }), + ObjectPropertyExpression + # This is the superproperty expression + +start |= SubObjectPropertyOf +SubObjectPropertyOf = + element SubObjectPropertyOf { SubObjectPropertyOf.type } +ObjectPropertyChain.type = + ObjectPropertyExpression+, + attribute specialAttrs { text } +EquivalentObjectProperties.type = + ObjectPropertyAxiom, ObjectPropertyExpression+ +start |= EquivalentObjectProperties +EquivalentObjectProperties = + element EquivalentObjectProperties { EquivalentObjectProperties.type } +DisjointObjectProperties.type = + ObjectPropertyAxiom, ObjectPropertyExpression+ +start |= DisjointObjectProperties +DisjointObjectProperties = + element DisjointObjectProperties { DisjointObjectProperties.type } +ObjectPropertyDomain.type = + ObjectPropertyAxiom, ObjectPropertyExpression, ClassExpression +start |= ObjectPropertyDomain +ObjectPropertyDomain = + element ObjectPropertyDomain { ObjectPropertyDomain.type } +ObjectPropertyRange.type = + ObjectPropertyAxiom, ObjectPropertyExpression, ClassExpression +start |= ObjectPropertyRange +ObjectPropertyRange = + element ObjectPropertyRange { ObjectPropertyRange.type } +InverseObjectProperties.type = + ObjectPropertyAxiom, + ObjectPropertyExpression, + ObjectPropertyExpression +start |= InverseObjectProperties +InverseObjectProperties = + element InverseObjectProperties { InverseObjectProperties.type } +FunctionalObjectProperty.type = ObjectPropertyAxiom, ObjectPropertyExpression +start |= FunctionalObjectProperty +FunctionalObjectProperty = + element FunctionalObjectProperty { FunctionalObjectProperty.type } +InverseFunctionalObjectProperty.type = + ObjectPropertyAxiom, ObjectPropertyExpression +start |= InverseFunctionalObjectProperty +InverseFunctionalObjectProperty = + element InverseFunctionalObjectProperty { + InverseFunctionalObjectProperty.type + } +ReflexiveObjectProperty.type = ObjectPropertyAxiom, ObjectPropertyExpression +start |= ReflexiveObjectProperty +ReflexiveObjectProperty = + element ReflexiveObjectProperty { ReflexiveObjectProperty.type } +IrreflexiveObjectProperty.type = + ObjectPropertyAxiom, ObjectPropertyExpression +start |= IrreflexiveObjectProperty +IrreflexiveObjectProperty = + element IrreflexiveObjectProperty { IrreflexiveObjectProperty.type } +SymmetricObjectProperty.type = ObjectPropertyAxiom, ObjectPropertyExpression +start |= SymmetricObjectProperty +SymmetricObjectProperty = + element SymmetricObjectProperty { SymmetricObjectProperty.type } +AsymmetricObjectProperty.type = ObjectPropertyAxiom, ObjectPropertyExpression +start |= AsymmetricObjectProperty +AsymmetricObjectProperty = + element AsymmetricObjectProperty { AsymmetricObjectProperty.type } +TransitiveObjectProperty.type = ObjectPropertyAxiom, ObjectPropertyExpression +start |= TransitiveObjectProperty +TransitiveObjectProperty = + element TransitiveObjectProperty { TransitiveObjectProperty.type } +# Data property axioms +DataPropertyAxiom = Axiom | + SubDataPropertyOf + | EquivalentDataProperties + | DisjointDataProperties + | DataPropertyDomain + | DataPropertyRange + | FunctionalDataProperty +SubDataPropertyOf.type = + DataPropertyAxiom, + DataPropertyExpression, + # This is the subproperty expression + DataPropertyExpression + # This is the superproperty expression + +start |= SubDataPropertyOf +SubDataPropertyOf = element SubDataPropertyOf { SubDataPropertyOf.type } +EquivalentDataProperties.type = DataPropertyAxiom, DataPropertyExpression+ +start |= EquivalentDataProperties +EquivalentDataProperties = + element EquivalentDataProperties { EquivalentDataProperties.type } +DisjointDataProperties.type = DataPropertyAxiom, DataPropertyExpression+ +start |= DisjointDataProperties +DisjointDataProperties = + element DisjointDataProperties { DisjointDataProperties.type } +DataPropertyDomain.type = + DataPropertyAxiom, DataPropertyExpression, ClassExpression +start |= DataPropertyDomain +DataPropertyDomain = element DataPropertyDomain { DataPropertyDomain.type} +DataPropertyRange.type = DataPropertyAxiom, DataPropertyExpression, DataRange +start |= DataPropertyRange +DataPropertyRange = element DataPropertyRange { DataPropertyRange.type } +FunctionalDataProperty.type = DataPropertyAxiom, DataPropertyExpression +start |= FunctionalDataProperty +FunctionalDataProperty = + element FunctionalDataProperty { FunctionalDataProperty.type } +# Datatype definitions +DatatypeDefinition.type = Axiom, Datatype, DataRange +start |= DatatypeDefinition +DatatypeDefinition = element DatatypeDefinition { DatatypeDefinition.type } +# Key axioms +HasKey.type = + Axiom, + ClassExpression, + ObjectPropertyExpression*, + DataPropertyExpression* +start |= HasKey +HasKey = element HasKey { HasKey.type } +# Assertions +Assertion = Axiom | + SameIndividual + | DifferentIndividuals + | ClassAssertion + | ObjectPropertyAssertion + | NegativeObjectPropertyAssertion + | DataPropertyAssertion + | NegativeDataPropertyAssertion +SameIndividual.type = Assertion, Individual+ +start |= SameIndividual +SameIndividual = element SameIndividual { SameIndividual.type } +DifferentIndividuals.type = Assertion, Individual+ +start |= DifferentIndividuals +DifferentIndividuals = + element DifferentIndividuals { DifferentIndividuals.type } +ClassAssertion.type = Assertion, ClassExpression, Individual +start |= ClassAssertion +ClassAssertion = element ClassAssertion { ClassAssertion.type } +ObjectPropertyAssertion.type = + Assertion, + ObjectPropertyExpression, + Individual, + # This is the source invididual + Individual + # This is the target individual + +start |= ObjectPropertyAssertion +ObjectPropertyAssertion = + element ObjectPropertyAssertion { ObjectPropertyAssertion.type } +NegativeObjectPropertyAssertion.type = + Assertion, + ObjectPropertyExpression, + Individual, + # This is the source invididual + Individual + # This is the target individual + +start |= NegativeObjectPropertyAssertion +NegativeObjectPropertyAssertion = + element NegativeObjectPropertyAssertion { + NegativeObjectPropertyAssertion.type + } +DataPropertyAssertion.type = + Assertion, + DataPropertyExpression, + Individual, + # This is the source invididual + Literal + # This is the target individual + +start |= DataPropertyAssertion +DataPropertyAssertion = + element DataPropertyAssertion { DataPropertyAssertion.type } +NegativeDataPropertyAssertion.type = + Assertion, + DataPropertyExpression, + Individual, + # This is the source invididual + Literal + # This is the target individual + +start |= NegativeDataPropertyAssertion +NegativeDataPropertyAssertion = + element NegativeDataPropertyAssertion { + NegativeDataPropertyAssertion.type + } +# Annotations +IRI.type = attribute specialAttrs { text } +start |= IRI +IRI = element IRI { IRI.type } +AbbreviatedIRI.type = attribute specialAttrs { text } +start |= AbbreviatedIRI +AbbreviatedIRI = element AbbreviatedIRI { AbbreviatedIRI.type } +AnnotationSubject = IRI | AbbreviatedIRI | AnonymousIndividual +AnnotationValue = IRI | AbbreviatedIRI | AnonymousIndividual | Literal +Annotation.type = + annotationAnnotations, + AnnotationProperty, + AnnotationValue, + attribute specialAttrs { text } +start |= Annotation +Annotation = element Annotation { Annotation.type } +axiomAnnotations = Annotation* +ontologyAnnotations = Annotation* +annotationAnnotations = Annotation* +# Annotation axioms +AnnotationAxiom = Axiom | + AnnotationAssertion + | SubAnnotationPropertyOf + | AnnotationPropertyDomain + | AnnotationPropertyRange +AnnotationAssertion.type = + AnnotationAxiom, + AnnotationProperty, + AnnotationSubject, + AnnotationValue +start |= AnnotationAssertion +AnnotationAssertion = + element AnnotationAssertion { AnnotationAssertion.type } +SubAnnotationPropertyOf.type = + AnnotationAxiom, + AnnotationProperty, + # This is the subproperty + AnnotationProperty + # This is the superproperty + +start |= SubAnnotationPropertyOf +SubAnnotationPropertyOf = + element SubAnnotationPropertyOf { SubAnnotationPropertyOf.type } +AnnotationPropertyDomain.type = + AnnotationAxiom, AnnotationProperty, IRI, AbbreviatedIRI +start |= AnnotationPropertyDomain +AnnotationPropertyDomain = + element AnnotationPropertyDomain { AnnotationPropertyDomain.type } +AnnotationPropertyRange.type = + AnnotationAxiom, AnnotationProperty, IRI, AbbreviatedIRI +start |= AnnotationPropertyRange +AnnotationPropertyRange = + element AnnotationPropertyRange { AnnotationPropertyRange.type } diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/owl2xml.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/owl2xml.rnc new file mode 100644 index 00000000000..73b0ba51cc9 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/owl2xml.rnc @@ -0,0 +1,138 @@ +# A simplified RelaxNG for OWL2 (so that we can generate OWL from sTeX +# https://kwarc.info/repos/kwarc/repos/stex/rnc/omdoc+ltxml.rnc +# (c) 2010 Michael Kohlhase, released under the GNU Public License (GPL) + +default namespace owl = "http://www.w3.org/2002/07/owl#" +namespace local = "" + +nonlocal-attribs = attribute * - (local:* | owl:*) {xsd:string} + +start = Ontology + +base.attrib = element xml:base {xsd:anyURI} +ontologyIRI.attrib = attribute ontologyIRI {xsd:anyURI} +IRI.attrib = attribute IRI {text} | attribute abbreviatedIRI {text} +datatypeIRI.attrib = attribute datatypeIRI {text} +name.attrib = attribute name {text} +facet.attrib = attribute facet {xsd:anyURI} +cardinality.attrib = attribute cardinality {xsd:integer} + +Ontology.attribs = ontologyIRI.attrib? & base.attrib? +Ontology.model = Prefix* & Declaration* & Import* & Axioms* + +Axioms = AnnotationAssertion* + & DatatypeDefinition* & HasKey* & SubClassOf* & EquivalentClasses* + & ObjectProperties* & DataProperties* + & DisjointClasses* & DifferentIndividuals* & SameIndividual* + & ObjectPropertyAssertion* & DataPropertyAssertion* & ClassAssertion* + & NegativeObjectPropertyAssertion* & NegativeDataPropertyAssertion* & NegativeClassAssertion* + +Ontology = element Ontology {Ontology.attribs & Ontology.model} + +Prefix = element Prefix {name.attrib & IRI.attrib} +Import = element Import {xsd:anyURI} +ObjectProperties = SymmetricObjectProperty* & AsymmetricObjectProperty* & ReflexiveObjectProperty* + & IrreflexiveObjectProperty* & FunctionalObjectProperty* & InverseObjectProperty* + & DisjointObjectProperties* & InverseFunctionalObjectProperty* & TransitiveObjectProperty* + & TransitiveObjectProperty* & ObjectPropertyDomain* & ObjectPropertyRange* + & InverseObjectProperties* & SubObjectPropertyOf* & EquivalentObjectProperties* +DataProperties = SymmetricDataProperty* & AsymmetricDataProperty* & ReflexiveDataProperty* + & IrreflexiveDataProperty* & FunctionalDataProperty* & InverseDataProperty* + & DisjointDataProperties* & InverseFunctionalDataProperty* & TransitiveDataProperty* + & TransitiveDataProperty* & DataPropertyDomain* & DataPropertyRange* + & InverseDataProperties* & SubDataPropertyOf* & EquivalentDataProperties* + +Declaration.model = Class.model | Data.model +Declaration = element Declaration {Declaration.model} +NamedIndividual = element NamedIndividual {IRI.attrib} +ClassAssertion = element ClassAssertion {Class.model,Ind.class} +NegativeClassAssertion = element NegativeClassAssertion {Class.model,Ind.class} + +ObjectProperty = element ObjectProperty {IRI.attrib} +SymmetricObjectProperty = element SymmetricObjectProperty {ObjectProperty*} +AsymmetricObjectProperty = element AsymmetricObjectProperty {ObjectProperty*} +DisjointObjectProperties = element DisjointObjectProperties {ObjectProperty*} +ReflexiveObjectProperty = element ReflexiveObjectProperty {ObjectProperty} +IrreflexiveObjectProperty = element IrreflexiveObjectProperty {ObjectProperty} +FunctionalObjectProperty = element FunctionalObjectProperty {ObjectProperty} +InverseFunctionalObjectProperty = element InverseFunctionalObjectProperty {ObjectProperty} +InverseObjectProperty = element InverseObjectProperty {ObjectProperty} +InverseObjectProperties = element InverseObjectProperties {ObjectProperty*} +TransitiveObjectProperty = element TransitiveObjectProperty {ObjectProperty*} +EquivalentObjectProperties = element EquivalentObjectProperties {ObjectProperty*} +ObjectPropertyDomain = element ObjectPropertyDomain {ObjectProperty,Class} +ObjectPropertyRange = element ObjectPropertyRange {ObjectProperty,Class} +SubObjectPropertyOf = element SubObjectPropertyOf {(ObjectProperty|ObjectPropertyChain),ObjectProperty} +ObjectPropertyChain = element ObjectPropertyChain {ObjectProperty*} +ObjectPropertyAssertion = element ObjectPropertyAssertion {ObjectProperty*,Ind.class,Ind.class} +NegativeObjectPropertyAssertion = element NegativeObjectPropertyAssertion {ObjectProperty*,Ind.class,Ind.class} + +SymmetricDataProperty = element SymmetricDataProperty {DataProperty*} +AsymmetricDataProperty = element AsymmetricDataProperty {DataProperty*} +DisjointDataProperties = element DisjointDataProperties {DataProperty*} +ReflexiveDataProperty = element ReflexiveDataProperty {DataProperty} +IrreflexiveDataProperty = element IrreflexiveDataProperty {DataProperty} +FunctionalDataProperty = element FunctionalDataProperty {DataProperty} +InverseFunctionalDataProperty = element InverseFunctionalDataProperty {DataProperty} +InverseDataProperty = element InverseDataProperty {DataProperty} +InverseDataProperties = element InverseDataProperties {DataProperty*} +TransitiveDataProperty = element TransitiveDataProperty {DataProperty*} +EquivalentDataProperties = element EquivalentDataProperties {DataProperty*} +DataPropertyDomain = element DataPropertyDomain {DataProperty,Class} +DataPropertyRange = element DataPropertyRange {DataProperty,Datatype} +SubDataPropertyOf = element SubDataPropertyOf {(DataProperty|DataPropertyChain),DataProperty} +DataPropertyChain = element DataPropertyChain {DataProperty*} +DataPropertyAssertion = element DataPropertyAssertion {DataProperty*,Ind.class,Literal} +NegativeDataPropertyAssertion = element NegativeDataPropertyAssertion {DataProperty*,Ind.class,Literal} + + +DataProperty = element DataProperty {IRI.attrib} +Datatype = element Datatype {IRI.attrib} +Class= element Class{IRI.attrib} + +Annotation = element Annotation {AnnotationProperty & Literal} +AnnotationAssertion= element AnnotationAssertion {AnnotationProperty,IRI,Literal} +AnnotationProperty= element AnnotationProperty {IRI.attrib} +IRI = element IRI {xsd:anyURI} +Literal = element Literal {datatypeIRI.attrib? & text} + +DatatypeDefinition.model = Datatype* & DatatypeRestriction* & DataComplementOf* & DataIntersectionOf* & DataOneOf* +DatatypeDefinition = element DatatypeDefinition {DatatypeDefinition.model} +DatatypeRestriction = element DatatypeRestriction {Datatype & FacetRestriction*} +FacetRestriction = element FacetRestriction {facet.attrib & Literal} +DataIntersectionOf = element DataIntersectionOf {Data.model*} +DataComplementOf = element DataComplementOf {Data.model*} +DataOneOf = element DataOneOf {Literal*} +DataSomeValuesFrom = element DataSomeValuesFrom {Data.model*} +DataAllValuesFrom = element DataAllValuesFrom {Data.model*} +Data.model = DataProperty | Datatype | DataOneOf | DataSomeValuesFrom + | DataAllValuesFrom | DataComplementOf | DatatypeRestriction + + +HasKey = element HasKey {Class, ObjectProperty} +SubClassOf = element SubClassOf {Annotation*,Class.model,(Data.model | Class.model)} +EquivalentClasses = element EquivalentClasses{Class.model*} + +ObjectIntersectionOf = element ObjectIntersectionOf {Class.model*} +ObjectComplementOf = element ObjectComplementOf {Class.model*} +ObjectSomeValuesFrom = element ObjectSomeValuesFrom {Class.model*} +ObjectAllValuesFrom = element ObjectAllValuesFrom {Class.model*} +ObjectOneOf = element ObjectOneOf {Class.model*} +ObjectInverseOf = element ObjectInverseOf {Class.model*} +ObjectMaxCardinality = element ObjectMaxCardinality{cardinality.attrib & Class.model*} +ObjectMinCardinality = element ObjectMinCardinality{cardinality.attrib & Class.model*} +ObjectExactCardinality = element ObjectExactCardinality{cardinality.attrib & Class.model*} +ObjectHasValue = element ObjectHasValue {ObjectProperty,Ind.class} +ObjectHasSelf = element ObjectHasSelf {ObjectProperty} +ObjectUnionOf = element ObjectUnionOf {Class.model*} +Class.model = Class | ObjectIntersectionOf | ObjectComplementOf + | ObjectSomeValuesFrom | ObjectAllValuesFrom + | ObjectOneOf | Ind.class| ObjectInverseOf | ObjectProperty + | ObjectMaxCardinality | ObjectMinCardinality | ObjectExactCardinality + | ObjectHasValue | ObjectHasSelf | ObjectUnionOf + +DisjointClasses = element DisjointClasses {Annotation?,Class.model*} +DifferentIndividuals = element DifferentIndividuals {Ind.class*} +SameIndividual = element SameIndividual {Ind.class*} + +Ind.class = NamedIndividual diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/schemas.xml b/Master/texmf-dist/source/latex/stex/schema/rnc/schemas.xml new file mode 100644 index 00000000000..301ddb0abc7 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/schemas.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/statements.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/statements.rnc new file mode 100644 index 00000000000..dd29b4819e4 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/statements.rnc @@ -0,0 +1,50 @@ +# /=====================================================================\ +# | Mathematical Statements for LaTeXML | +# |=====================================================================| +# | Not Part of LaTeXML: | +# | Copyright (c) 2005 Michael Kohlhase | +# | Released under the Gnu Public License (GPL) | +# |=====================================================================| +# | Michael Kohlhase #_# | +# | http://dlmf.nist.gov/LaTeXML/ (o o) | +# \=========================================================ooo==U==ooo=/ + +default namespace = "http://dlmf.nist.gov/LaTeXML" + +statement.model = text|Flow.class + +example = element example {Common.attribs,attribute for {xsd:string},metadata?,(statement.model)*} +definition = element definition {Common.attribs,attribute for {xsd:string},metadata?,(statement.model)*} +definiens = element definiens {attribute name {xsd:string},(statement.model)*} +termin = element termin {attribute cd {xsd:NCName},attribute name {xsd:NCName}, + (statement.model|Math)*} + +notation = element notation {Common.attribs,attribute for {xsd:string},(statement.model)*} +notemph = element notemph {(statement.model|Math)*} + +statement-group = element statement-group + {Common.attribs,metadata?, + (omtext | example | definition | symbol | assertion | + notation | itemize | enumerate | description)*} + +symbol = element symbol {attribute name {xsd:string}} + +assertion = element assertion {Common.attribs,attribute type {xsd:string}?,metadata?,(statement.model)*} +axiom = element axiom {Common.attribs,(statement.model)*} + +proof.model = omtext|step|cases +proof = element proof {Common.attribs,attribute for {xsd:string}?,metadata?,(proof.model)*} +cases = element cases {(case|omtext)*} +case = element case {Common.attribs,attribute for {xsd:string}?,(proof.model)*} +step = element step {Common.attribs,(statement.model|method)*} +method = element method {Common.attribs,attribute xref {xsd:string},(text|Math|proof|premise)*} +premise = element premise {Common.attribs,attribute xref {xsd:string}} + +omtext = element omtext {Common.attribs,attribute for {xsd:string}?, + attribute from {xsd:string}?,attribute type {xsd:string}?, + metadata?,(text|Flow.class)*} + +statements.Block.class |= example | definition | notation | symbol | assertion | proof + | axiom | omtext | statement-group +statements.Inline.class |= definiens | notemph | termin | method + diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-animation.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-animation.rnc new file mode 100644 index 00000000000..89ef4dbea9e --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-animation.rnc @@ -0,0 +1,208 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Animation Module +## file: svg-animation.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-animation.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Animation +## +## animate, set, animateMotion, animateColor, animateTransform, mpath +## +## This module declares markup to provide support for animation. +## + +## +## SVG.Animation.class +## +[ xml:lang = "en" ] +grammar { + SVG.Animation.extra.class = notAllowed + SVG.Animation.class |= + animate + | set + | animateMotion + | animateColor + | animateTransform + | SVG.Animation.extra.class + a:documentation [ "\x{a}" ~ " SVG.Animation.attrib\x{a}" ~ " " ] + SVG.Animation.extra.attrib = empty + SVG.Animation.attrib = SVG.XLink.attrib, SVG.Animation.extra.attrib + a:documentation [ + "\x{a}" ~ + " SVG.AnimationAttribute.attrib\x{a}" ~ + " " + ] + SVG.AnimationAttribute.extra.attrib = empty + SVG.AnimationAttribute.attrib = + attribute attributeName { text }, + attribute attributeType { text }?, + SVG.AnimationAttribute.extra.attrib + a:documentation [ + "\x{a}" ~ + " SVG.AnimationTiming.attrib\x{a}" ~ + " " + ] + SVG.AnimationTiming.extra.attrib = empty + SVG.AnimationTiming.attrib = + attribute begin { text }?, + attribute dur { text }?, + attribute end { text }?, + attribute min { text }?, + attribute max { text }?, + [ a:defaultValue = "always" ] + attribute restart { "always" | "never" | "whenNotActive" }?, + attribute repeatCount { text }?, + attribute repeatDur { text }?, + [ a:defaultValue = "remove" ] + attribute fill { "remove" | "freeze" }?, + SVG.AnimationTiming.extra.attrib + a:documentation [ + "\x{a}" ~ + " SVG.AnimationValue.attrib\x{a}" ~ + " " + ] + SVG.AnimationValue.extra.attrib = empty + SVG.AnimationValue.attrib = + [ a:defaultValue = "linear" ] + attribute calcMode { "discrete" | "linear" | "paced" | "spline" }?, + attribute values { text }?, + attribute keyTimes { text }?, + attribute keySplines { text }?, + attribute from { text }?, + attribute to { text }?, + attribute by { text }?, + SVG.AnimationValue.extra.attrib + a:documentation [ + "\x{a}" ~ + " SVG.AnimationAddtion.attrib\x{a}" ~ + " " + ] + SVG.AnimationAddtion.extra.attrib = empty + SVG.AnimationAddtion.attrib = + [ a:defaultValue = "replace" ] + attribute additive { "replace" | "sum" }?, + [ a:defaultValue = "none" ] + attribute accumulate { "none" | "sum" }?, + SVG.AnimationAddtion.extra.attrib + a:documentation [ + "\x{a}" ~ + " animate: Animate Element\x{a}" ~ + " " + ] + SVG.animate.content = SVG.Description.class* + animate = element animate { attlist.animate, SVG.animate.content } + attlist.animate &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.AnimationEvents.attrib, + SVG.External.attrib, + SVG.Animation.attrib, + SVG.AnimationAttribute.attrib, + SVG.AnimationTiming.attrib, + SVG.AnimationValue.attrib, + SVG.AnimationAddtion.attrib + a:documentation [ "\x{a}" ~ " set: Set Element\x{a}" ~ " " ] + SVG.set.content = SVG.Description.class* + set = element set { attlist.set, SVG.set.content } + attlist.set &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.AnimationEvents.attrib, + SVG.External.attrib, + SVG.Animation.attrib, + SVG.AnimationAttribute.attrib, + SVG.AnimationTiming.attrib, + attribute to { text }? + a:documentation [ + "\x{a}" ~ + " animateMotion: Animate Motion Element\x{a}" ~ + " " + ] + SVG.animateMotion.content = SVG.Description.class*, mpath? + animateMotion = + element animateMotion { + attlist.animateMotion, SVG.animateMotion.content + } + attlist.animateMotion &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.AnimationEvents.attrib, + SVG.External.attrib, + SVG.Animation.attrib, + SVG.AnimationTiming.attrib, + SVG.AnimationAddtion.attrib, + [ a:defaultValue = "paced" ] + attribute calcMode { "discrete" | "linear" | "paced" | "spline" }?, + attribute values { text }?, + attribute keyTimes { text }?, + attribute keySplines { text }?, + attribute from { text }?, + attribute to { text }?, + attribute by { text }?, + attribute path { text }?, + attribute keyPoints { text }?, + attribute rotate { text }?, + attribute origin { text }? + a:documentation [ + "\x{a}" ~ + " animateColor: Animate Color Element\x{a}" ~ + " " + ] + SVG.animateColor.content = SVG.Description.class* + animateColor = + element animateColor { + attlist.animateColor, SVG.animateColor.content + } + attlist.animateColor &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.AnimationEvents.attrib, + SVG.External.attrib, + SVG.Animation.attrib, + SVG.AnimationAttribute.attrib, + SVG.AnimationTiming.attrib, + SVG.AnimationValue.attrib, + SVG.AnimationAddtion.attrib + a:documentation [ + "\x{a}" ~ + " animateTransform: Animate Transform Element\x{a}" ~ + " " + ] + SVG.animateTransform.content = SVG.Description.class* + animateTransform = + element animateTransform { + attlist.animateTransform, SVG.animateTransform.content + } + attlist.animateTransform &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.AnimationEvents.attrib, + SVG.External.attrib, + SVG.Animation.attrib, + SVG.AnimationAttribute.attrib, + SVG.AnimationTiming.attrib, + SVG.AnimationValue.attrib, + SVG.AnimationAddtion.attrib, + [ a:defaultValue = "translate" ] + attribute type { + "translate" | "scale" | "rotate" | "skewX" | "skewY" + }? + a:documentation [ + "\x{a}" ~ + " mpath: Motion Path Element\x{a}" ~ + " " + ] + SVG.mpath.content = SVG.Description.class* + mpath = element mpath { attlist.mpath, SVG.mpath.content } + attlist.mpath &= + SVG.Core.attrib, SVG.XLinkRequired.attrib, SVG.External.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-animevents-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-animevents-attrib.rnc new file mode 100644 index 00000000000..efbbabc42c5 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-animevents-attrib.rnc @@ -0,0 +1,33 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Animation Events Attribute Module +## file: svg-animevents-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-animevents-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Animation Events Attribute +## +## onbegin, onend, onrepeat, onload +## +## This module defines the AnimationEvents attribute set. +## +[ xml:lang = "en" ] +grammar { + SVG.onbegin.attrib = attribute onbegin { Script.datatype }? + SVG.onend.attrib = attribute onend { Script.datatype }? + SVG.onrepeat.attrib = attribute onrepeat { Script.datatype }? + SVG.AnimationEvents.extra.attrib = empty + SVG.AnimationEvents.attrib &= + SVG.onbegin.attrib, + SVG.onend.attrib, + SVG.onrepeat.attrib, + SVG.onload.attrib, + SVG.AnimationEvents.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-clip.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-clip.rnc new file mode 100644 index 00000000000..5471141c5fa --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-clip.rnc @@ -0,0 +1,64 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Basic Clip Module +## file: svg-basic-clip.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-basic-clip.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Basic Clip +## +## clipPath +## +## This module declares markup to provide support for clipping. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + ClipPathValue.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Clip.attrib\x{a}" ~ " " ] + SVG.Clip.extra.attrib = empty + SVG.Clip.attrib &= + attribute clip-path { ClipPathValue.datatype }?, + attribute clip-rule { ClipFillRule.datatype }?, + SVG.Clip.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Clip.class\x{a}" ~ " " ] + SVG.Clip.extra.class = notAllowed + SVG.Clip.class |= clipPath | SVG.Clip.extra.class + a:documentation [ + "\x{a}" ~ + " clipPath: Clip Path Element\x{a}" ~ + " " + ] + SVG.clipPath.class = rect | SVG.Animation.class | SVG.Use.class + SVG.clipPath.content = SVG.Description.class*, SVG.clipPath.class* + clipPath = element clipPath { attlist.clipPath, SVG.clipPath.content } + attlist.clipPath &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Text.attrib, + SVG.TextContent.attrib, + SVG.Font.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute transform { TransformList.datatype }?, + attribute clipPathUnits { "userSpaceOnUse" | "objectBoundingBox" }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-filter.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-filter.rnc new file mode 100644 index 00000000000..995c08e7daf --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-filter.rnc @@ -0,0 +1,338 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Basic Filter Module +## file: svg-basic-filter.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-basic-filter.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Basic Filter +## +## filter, feBlend, feColorMatrix, feComponentTransfer, feComposite, +## feFlood, feGaussianBlur, feImage, feMerge, feMergeNode, feOffset, +## feTile, feFuncR, feFuncG, feFuncB, feFuncA +## +## This module declares markup to provide support for filter effect. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + FilterValue.datatype = xsd:string + NumberOptionalNumber.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Filter.attrib\x{a}" ~ " " ] + SVG.Filter.extra.attrib = empty + SVG.Filter.attrib &= + attribute filter { FilterValue.datatype }?, + SVG.Filter.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.FilterColor.attrib\x{a}" ~ " " ] + SVG.FilterColor.extra.attrib = empty + SVG.FilterColor.attrib &= + attribute color-interpolation-filters { + "auto" | "sRGB" | "linearRGB" | "inherit" + }?, + SVG.FilterColor.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Filter.class\x{a}" ~ " " ] + SVG.Filter.extra.class = notAllowed + SVG.Filter.class |= filter | SVG.Filter.extra.class + a:documentation [ + "\x{a}" ~ + " SVG.FilterPrimitive.class\x{a}" ~ + " " + ] + SVG.FilterPrimitive.extra.class = notAllowed + SVG.FilterPrimitive.class = + feBlend + | feColorMatrix + | feComponentTransfer + | feComposite + | feFlood + | feGaussianBlur + | feImage + | feMerge + | feOffset + | feTile + | SVG.FilterPrimitive.extra.class + a:documentation [ + "\x{a}" ~ + " SVG.FilterPrimitive.attrib\x{a}" ~ + " " + ] + SVG.FilterPrimitive.extra.attrib = empty + SVG.FilterPrimitive.attrib = + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }?, + attribute height { Length.datatype }?, + attribute result { text }?, + SVG.FilterPrimitive.extra.attrib + a:documentation [ + "\x{a}" ~ + " SVG.FilterPrimitiveWithIn.attrib\x{a}" ~ + " " + ] + SVG.FilterPrimitiveWithIn.extra.attrib = empty + SVG.FilterPrimitiveWithIn.attrib = + SVG.FilterPrimitive.attrib, + attribute in { text }?, + SVG.FilterPrimitiveWithIn.extra.attrib + a:documentation [ "\x{a}" ~ " filter: Filter Element\x{a}" ~ " " ] + SVG.filter.content = + SVG.Description.class*, (animate | set | SVG.FilterPrimitive.class)* + filter = element filter { attlist.filter, SVG.filter.content } + attlist.filter &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.XLink.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }?, + attribute height { Length.datatype }?, + attribute filterRes { NumberOptionalNumber.datatype }?, + attribute filterUnits { "userSpaceOnUse" | "objectBoundingBox" }?, + attribute primitiveUnits { "userSpaceOnUse" | "objectBoundingBox" }? + a:documentation [ + "\x{a}" ~ + " feBlend: Filter Effect Blend Element\x{a}" ~ + " " + ] + SVG.feBlend.content = (animate | set)* + feBlend = element feBlend { attlist.feBlend, SVG.feBlend.content } + attlist.feBlend &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute in2 { text }, + [ a:defaultValue = "normal" ] + attribute mode { + "normal" | "multiply" | "screen" | "darken" | "lighten" + }? + a:documentation [ + "\x{a}" ~ + " feColorMatrix: Filter Effect Color Matrix Element\x{a}" ~ + " " + ] + SVG.feColorMatrix.content = (animate | set)* + feColorMatrix = + element feColorMatrix { + attlist.feColorMatrix, SVG.feColorMatrix.content + } + attlist.feColorMatrix &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + [ a:defaultValue = "matrix" ] + attribute type { + "matrix" | "saturate" | "hueRotate" | "luminanceToAlpha" + }?, + attribute values { text }? + a:documentation [ + "\x{a}" ~ + " feComponentTransfer: Filter Effect Component Transfer Element\x{a}" ~ + " " + ] + SVG.feComponentTransfer.content = + feFuncR?, feFuncG?, feFuncB?, feFuncA? + feComponentTransfer = + element feComponentTransfer { + attlist.feComponentTransfer, SVG.feComponentTransfer.content + } + attlist.feComponentTransfer &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib + a:documentation [ + "\x{a}" ~ + " feComposite: Filter Effect Composite Element\x{a}" ~ + " " + ] + SVG.feComposite.content = (animate | set)* + feComposite = + element feComposite { attlist.feComposite, SVG.feComposite.content } + attlist.feComposite &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute in2 { text }, + [ a:defaultValue = "over" ] + attribute operator { + "over" | "in" | "out" | "atop" | "xor" | "arithmetic" + }?, + attribute k1 { Number.datatype }?, + attribute k2 { Number.datatype }?, + attribute k3 { Number.datatype }?, + attribute k4 { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " feFlood: Filter Effect Flood Element\x{a}" ~ + " " + ] + SVG.feFlood.content = (animate | set | animateColor)* + feFlood = element feFlood { attlist.feFlood, SVG.feFlood.content } + attlist.feFlood &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Color.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute flood-color { SVGColor.datatype }?, + attribute flood-opacity { OpacityValue.datatype }? + a:documentation [ + "\x{a}" ~ + " feGaussianBlur: Filter Effect Gaussian Blur Element\x{a}" ~ + " " + ] + SVG.feGaussianBlur.content = (animate | set)* + feGaussianBlur = + element feGaussianBlur { + attlist.feGaussianBlur, SVG.feGaussianBlur.content + } + attlist.feGaussianBlur &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute stdDeviation { NumberOptionalNumber.datatype }? + a:documentation [ + "\x{a}" ~ + " feImage: Filter Effect Image Element\x{a}" ~ + " " + ] + SVG.feImage.content = (animate | set | animateTransform)* + feImage = element feImage { attlist.feImage, SVG.feImage.content } + attlist.feImage &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.FilterPrimitive.attrib, + SVG.XLinkEmbed.attrib, + SVG.External.attrib, + [ a:defaultValue = "xMidYMid meet" ] + attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }? + a:documentation [ + "\x{a}" ~ + " feMerge: Filter Effect Merge Element\x{a}" ~ + " " + ] + SVG.feMerge.content = feMergeNode* + feMerge = element feMerge { attlist.feMerge, SVG.feMerge.content } + attlist.feMerge &= + SVG.Core.attrib, SVG.FilterColor.attrib, SVG.FilterPrimitive.attrib + a:documentation [ + "\x{a}" ~ + " feMergeNode: Filter Effect Merge Node Element\x{a}" ~ + " " + ] + SVG.feMergeNode.content = (animate | set)* + feMergeNode = + element feMergeNode { attlist.feMergeNode, SVG.feMergeNode.content } + attlist.feMergeNode &= + SVG.Core.attrib, + attribute in { text }? + a:documentation [ + "\x{a}" ~ + " feOffset: Filter Effect Offset Element\x{a}" ~ + " " + ] + SVG.feOffset.content = (animate | set)* + feOffset = element feOffset { attlist.feOffset, SVG.feOffset.content } + attlist.feOffset &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute dx { Number.datatype }?, + attribute dy { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " feTile: Filter Effect Tile Element\x{a}" ~ + " " + ] + SVG.feTile.content = (animate | set)* + feTile = element feTile { attlist.feTile, SVG.feTile.content } + attlist.feTile &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib + a:documentation [ + "\x{a}" ~ + " feFuncR: Filter Effect Function Red Element\x{a}" ~ + " " + ] + SVG.feFuncR.content = (animate | set)* + feFuncR = element feFuncR { attlist.feFuncR, SVG.feFuncR.content } + attlist.feFuncR &= + SVG.Core.attrib, + attribute type { + "identity" | "table" | "discrete" | "linear" | "gamma" + }, + attribute tableValues { text }?, + attribute slope { Number.datatype }?, + attribute intercept { Number.datatype }?, + attribute amplitude { Number.datatype }?, + attribute exponent { Number.datatype }?, + attribute offset { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " feFuncG: Filter Effect Function Green Element\x{a}" ~ + " " + ] + SVG.feFuncG.content = (animate | set)* + feFuncG = element feFuncG { attlist.feFuncG, SVG.feFuncG.content } + attlist.feFuncG &= + SVG.Core.attrib, + attribute type { + "identity" | "table" | "discrete" | "linear" | "gamma" + }, + attribute tableValues { text }?, + attribute slope { Number.datatype }?, + attribute intercept { Number.datatype }?, + attribute amplitude { Number.datatype }?, + attribute exponent { Number.datatype }?, + attribute offset { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " feFuncB: Filter Effect Function Blue Element\x{a}" ~ + " " + ] + SVG.feFuncB.content = (animate | set)* + feFuncB = element feFuncB { attlist.feFuncB, SVG.feFuncB.content } + attlist.feFuncB &= + SVG.Core.attrib, + attribute type { + "identity" | "table" | "discrete" | "linear" | "gamma" + }, + attribute tableValues { text }?, + attribute slope { Number.datatype }?, + attribute intercept { Number.datatype }?, + attribute amplitude { Number.datatype }?, + attribute exponent { Number.datatype }?, + attribute offset { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " feFuncA: Filter Effect Function Alpha Element\x{a}" ~ + " " + ] + SVG.feFuncA.content = (animate | set)* + feFuncA = element feFuncA { attlist.feFuncA, SVG.feFuncA.content } + attlist.feFuncA &= + SVG.Core.attrib, + attribute type { + "identity" | "table" | "discrete" | "linear" | "gamma" + }, + attribute tableValues { text }?, + attribute slope { Number.datatype }?, + attribute intercept { Number.datatype }?, + attribute amplitude { Number.datatype }?, + attribute exponent { Number.datatype }?, + attribute offset { Number.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-font.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-font.rnc new file mode 100644 index 00000000000..a45d34e3c64 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-font.rnc @@ -0,0 +1,196 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Basic Font Module +## file: svg-basic-font.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-basic-font.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Basic Font +## +## font, font-face, glyph, missing-glyph, hkern, vkern, font-face-src, +## font-face-uri, font-face-name +## +## This module declares markup to provide support for template. +## + +## +## SVG.Font.class +## +[ xml:lang = "en" ] +grammar { + SVG.Font.extra.class = notAllowed + SVG.Font.class |= font | font-face | SVG.Font.extra.class + a:documentation [ "\x{a}" ~ " font: Font Element\x{a}" ~ " " ] + SVG.font.content = + SVG.Description.class*, + font-face, + missing-glyph, + (glyph | hkern | vkern)* + font = element font { attlist.font, SVG.font.content } + attlist.font &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.External.attrib, + attribute horiz-origin-x { Number.datatype }?, + attribute horiz-origin-y { Number.datatype }?, + attribute horiz-adv-x { Number.datatype }, + attribute vert-origin-x { Number.datatype }?, + attribute vert-origin-y { Number.datatype }?, + attribute vert-adv-y { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " font-face: Font Face Element\x{a}" ~ + " " + ] + SVG.font-face.extra.class = notAllowed + SVG.font-face.content = + SVG.Description.class*, font-face-src?, SVG.font-face.extra.class + font-face = + element font-face { attlist.font-face, SVG.font-face.content } + attlist.font-face &= + SVG.Core.attrib, + attribute font-family { text }?, + attribute font-style { text }?, + attribute font-variant { text }?, + attribute font-weight { text }?, + attribute font-stretch { text }?, + attribute font-size { text }?, + attribute unicode-range { text }?, + attribute units-per-em { Number.datatype }?, + attribute panose-1 { text }?, + attribute stemv { Number.datatype }?, + attribute stemh { Number.datatype }?, + attribute slope { Number.datatype }?, + attribute cap-height { Number.datatype }?, + attribute x-height { Number.datatype }?, + attribute accent-height { Number.datatype }?, + attribute ascent { Number.datatype }?, + attribute descent { Number.datatype }?, + attribute widths { text }?, + attribute bbox { text }?, + attribute ideographic { Number.datatype }?, + attribute alphabetic { Number.datatype }?, + attribute mathematical { Number.datatype }?, + attribute hanging { Number.datatype }?, + attribute v-ideographic { Number.datatype }?, + attribute v-alphabetic { Number.datatype }?, + attribute v-mathematical { Number.datatype }?, + attribute v-hanging { Number.datatype }?, + attribute underline-position { Number.datatype }?, + attribute underline-thickness { Number.datatype }?, + attribute strikethrough-position { Number.datatype }?, + attribute strikethrough-thickness { Number.datatype }?, + attribute overline-position { Number.datatype }?, + attribute overline-thickness { Number.datatype }? + a:documentation [ "\x{a}" ~ " glyph: Glyph Element\x{a}" ~ " " ] + SVG.glyph.class = notAllowed + SVG.glyph.content = SVG.Description.class*, SVG.glyph.class* + glyph = element glyph { attlist.glyph, SVG.glyph.content } + attlist.glyph &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + attribute unicode { text }?, + attribute glyph-name { text }?, + attribute d { PathData.datatype }?, + attribute orientation { text }?, + attribute arabic-form { text }?, + attribute lang { LanguageCodes.datatype }?, + attribute horiz-adv-x { Number.datatype }?, + attribute vert-origin-x { Number.datatype }?, + attribute vert-origin-y { Number.datatype }?, + attribute vert-adv-y { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " missing-glyph: Missing Glyph Element\x{a}" ~ + " " + ] + SVG.missing-glyph.class = notAllowed + SVG.missing-glyph.content = + SVG.Description.class*, SVG.missing-glyph.class* + missing-glyph = + element missing-glyph { + attlist.missing-glyph, SVG.missing-glyph.content + } + attlist.missing-glyph &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + attribute d { PathData.datatype }?, + attribute horiz-adv-x { Number.datatype }?, + attribute vert-origin-x { Number.datatype }?, + attribute vert-origin-y { Number.datatype }?, + attribute vert-adv-y { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " hkern: Horizontal Kerning Element\x{a}" ~ + " " + ] + SVG.hkern.content = empty + hkern = element hkern { attlist.hkern, SVG.hkern.content } + attlist.hkern &= + SVG.Core.attrib, + attribute u1 { text }?, + attribute g1 { text }?, + attribute u2 { text }?, + attribute g2 { text }?, + attribute k { Number.datatype } + a:documentation [ + "\x{a}" ~ + " vkern: Vertical Kerning Element\x{a}" ~ + " " + ] + SVG.vkern.content = empty + vkern = element vkern { attlist.vkern, SVG.vkern.content } + attlist.vkern &= + SVG.Core.attrib, + attribute u1 { text }?, + attribute g1 { text }?, + attribute u2 { text }?, + attribute g2 { text }?, + attribute k { Number.datatype } + a:documentation [ + "\x{a}" ~ + " font-face-src: Font Face Source Element\x{a}" ~ + " " + ] + SVG.font-face-src.content = (font-face-uri | font-face-name)+ + font-face-src = + element font-face-src { + attlist.font-face-src, SVG.font-face-src.content + } + attlist.font-face-src &= SVG.Core.attrib + a:documentation [ + "\x{a}" ~ + " font-face-uri: Font Face URI Element\x{a}" ~ + " " + ] + SVG.font-face-uri.content = empty + font-face-uri = + element font-face-uri { + attlist.font-face-uri, SVG.font-face-uri.content + } + attlist.font-face-uri &= SVG.Core.attrib, SVG.XLinkRequired.attrib + a:documentation [ + "\x{a}" ~ + " font-face-name: Font Face Name Element\x{a}" ~ + " " + ] + SVG.font-face-name.content = empty + font-face-name = + element font-face-name { + attlist.font-face-name, SVG.font-face-name.content + } + attlist.font-face-name &= + SVG.Core.attrib, + attribute name { text }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-graphics-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-graphics-attrib.rnc new file mode 100644 index 00000000000..606e2e4e92d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-graphics-attrib.rnc @@ -0,0 +1,49 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Basic Graphics Attribute Module +## file: svg-basic-graphics-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-basic-graphics-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Basic Graphics Attribute +## +## display, visibility +## +## This module defines the Graphics attribute set. +## +[ xml:lang = "en" ] +grammar { + SVG.display.attrib = + attribute display { + "inline" + | "block" + | "list-item" + | "run-in" + | "compact" + | "marker" + | "table" + | "inline-table" + | "table-row-group" + | "table-header-group" + | "table-footer-group" + | "table-row" + | "table-column-group" + | "table-column" + | "table-cell" + | "table-caption" + | "none" + | "inherit" + }? + SVG.visibility.attrib = + attribute visibility { "visible" | "hidden" | "inherit" }? + SVG.Graphics.extra.attrib = empty + SVG.Graphics.attrib &= + SVG.display.attrib, SVG.visibility.attrib, SVG.Graphics.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-structure.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-structure.rnc new file mode 100644 index 00000000000..67b94df81a1 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-structure.rnc @@ -0,0 +1,293 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Basic Structure Module +## file: svg-basic-structure.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-basic-structure.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Basic Structure +## +## svg, g, defs, desc, title, metadata, use +## +## This module declares the major structural elements and their attributes. +## +[ xml:lang = "en" ] +grammar { + + ## + ## The root element is "svg". + ## + start = svg + + ## + ## Include core set of modules + ## + div { + + ## + ## Datatypes Module + ## + include "svg-datatypes.rnc" + + ## + ## Core Attribute Module + ## + include "svg-core-attrib.rnc" + } + a:documentation [ + "\x{a}" ~ + " Content Models (Default)\x{a}" ~ + " " + ] + SVG.Profile.class = notAllowed + SVG.Gradient.class = notAllowed + SVG.Pattern.class = notAllowed + SVG.Clip.class = notAllowed + SVG.Mask.class = notAllowed + SVG.Filter.class = notAllowed + SVG.Cursor.class = notAllowed + SVG.Marker.class = notAllowed + SVG.View.class = notAllowed + SVG.Script.class = notAllowed + SVG.Font.class = notAllowed + SVG.Extensibility.class = notAllowed + SVG.Conditional.class = notAllowed + SVG.Image.class = notAllowed + SVG.Style.class = notAllowed + SVG.Shape.class = notAllowed + SVG.Text.class = notAllowed + SVG.Hyperlink.class = notAllowed + SVG.Animation.class = notAllowed + a:documentation [ + "\x{a}" ~ + " Attribute Collections (Default)\x{a}" ~ + " " + ] + SVG.Container.attrib = empty + SVG.Viewport.attrib = empty + SVG.Text.attrib = empty + SVG.TextContent.attrib = empty + SVG.Opacity.attrib = empty + SVG.Marker.attrib = empty + SVG.Profile.attrib = empty + SVG.Gradient.attrib = empty + SVG.Clip.attrib = empty + SVG.Mask.attrib = empty + SVG.Filter.attrib = empty + SVG.FilterColor.attrib = empty + SVG.Cursor.attrib = empty + SVG.External.attrib = empty + SVG.Conditional.attrib = empty + SVG.Color.attrib = empty + SVG.Paint.attrib = empty + SVG.Graphics.attrib = empty + SVG.DocumentEvents.attrib = empty + SVG.GraphicalEvents.attrib = empty + SVG.onload.attrib = empty + SVG.AnimationEvents.attrib = empty + SVG.XLink.attrib = empty + SVG.XLinkRequired.attrib = empty + SVG.XLinkEmbed.attrib = empty + SVG.XLinkReplace.attrib = empty + SVG.Style.attrib = empty + SVG.Font.attrib = empty + a:documentation [ "\x{a}" ~ " SVG.Description.class\x{a}" ~ " " ] + SVG.Description.extra.class = notAllowed + SVG.Description.class = + desc | title | metadata | SVG.Description.extra.class + a:documentation [ "\x{a}" ~ " SVG.Use.class\x{a}" ~ " " ] + SVG.Use.extra.class = notAllowed + SVG.Use.class = use | SVG.Use.extra.class + a:documentation [ "\x{a}" ~ " SVG.Structure.class\x{a}" ~ " " ] + SVG.Structure.extra.class = notAllowed + SVG.Structure.class = + svg | g | defs | SVG.Use.class | SVG.Structure.extra.class + a:documentation [ + "\x{a}" ~ + " SVG.Presentation.attrib\x{a}" ~ + " " + ] + SVG.Presentation.extra.attrib = empty + SVG.Presentation.attrib = + SVG.Container.attrib, + SVG.Viewport.attrib, + SVG.Text.attrib, + SVG.TextContent.attrib, + SVG.Font.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Marker.attrib, + SVG.Profile.attrib, + SVG.Gradient.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.FilterColor.attrib, + SVG.Cursor.attrib, + attribute flood-color { SVGColor.datatype }?, + attribute flood-opacity { OpacityValue.datatype }?, + attribute lighting-color { SVGColor.datatype }?, + SVG.Presentation.extra.attrib + a:documentation [ + "\x{a}" ~ + " svg: SVG Document Element\x{a}" ~ + " " + ] + SVG.svg.content = + (SVG.Description.class + | SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class)* + svg = element svg { attlist.svg, SVG.svg.content } + attlist.svg &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.DocumentEvents.attrib, + SVG.GraphicalEvents.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }?, + attribute height { Length.datatype }?, + attribute viewBox { ViewBoxSpec.datatype }?, + [ a:defaultValue = "xMidYMid meet" ] + attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }?, + [ a:defaultValue = "magnify" ] + attribute zoomAndPan { "disable" | "magnify" }?, + [ a:defaultValue = "1.1" ] attribute version { xsd:string "1.1" }?, + attribute baseProfile { Text.datatype }?, + [ a:defaultValue = "text/ecmascript" ] + attribute contentScriptType { ContentType.datatype }?, + [ a:defaultValue = "text/css" ] + attribute contentStyleType { ContentType.datatype }? + a:documentation [ "\x{a}" ~ " g: Group Element\x{a}" ~ " " ] + SVG.g.content = + (SVG.Description.class + | SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class)* + g = element g { attlist.g, SVG.g.content } + attlist.g &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.GraphicalEvents.attrib, + SVG.External.attrib, + attribute transform { TransformList.datatype }? + a:documentation [ + "\x{a}" ~ + " defs: Definisions Element\x{a}" ~ + " " + ] + SVG.defs.content = + (SVG.Description.class + | SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class)* + defs = element defs { attlist.defs, SVG.defs.content } + attlist.defs &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.GraphicalEvents.attrib, + SVG.External.attrib, + attribute transform { TransformList.datatype }? + a:documentation [ + "\x{a}" ~ + " desc: Description Element\x{a}" ~ + " " + ] + SVG.desc.content = text + desc = element desc { attlist.desc, SVG.desc.content } + attlist.desc &= SVG.Core.attrib, SVG.Style.attrib + a:documentation [ "\x{a}" ~ " title: Title Element\x{a}" ~ " " ] + SVG.title.content = text + title = element title { attlist.title, SVG.title.content } + attlist.title &= SVG.Core.attrib, SVG.Style.attrib + a:documentation [ + "\x{a}" ~ + " metadata: Metadata Element\x{a}" ~ + " " + ] + SVG.metadata.content = text + metadata = element metadata { attlist.metadata, SVG.metadata.content } + attlist.metadata &= SVG.Core.attrib + a:documentation [ "\x{a}" ~ " use: Use Element\x{a}" ~ " " ] + SVG.use.content = SVG.Description.class*, SVG.Animation.class* + use = element use { attlist.use, SVG.use.content } + attlist.use &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.GraphicalEvents.attrib, + SVG.XLinkEmbed.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }?, + attribute height { Length.datatype }?, + attribute transform { TransformList.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-text.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-text.rnc new file mode 100644 index 00000000000..8e8b2c728bd --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-basic-text.rnc @@ -0,0 +1,137 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Basic Text Module +## file: svg-basic-text.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-basic-text.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Basic Text +## +## text, altGlyph, altGlyphDef, glyphRef +## +## This module declares markup to provide support for text. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + FontFamilyValue.datatype = xsd:string + FontSizeValue.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Font.attrib\x{a}" ~ " " ] + SVG.Font.extra.attrib = empty + SVG.Font.attrib &= + attribute font-family { FontFamilyValue.datatype }?, + attribute font-size { FontSizeValue.datatype }?, + attribute font-style { + "normal" | "italic" | "oblique" | "inherit" + }?, + attribute font-weight { + "normal" + | "bold" + | "bolder" + | "lighter" + | "100" + | "200" + | "300" + | "400" + | "500" + | "600" + | "700" + | "800" + | "900" + | "inherit" + }?, + SVG.Font.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Text.class\x{a}" ~ " " ] + SVG.Text.extra.class = notAllowed + SVG.Text.class |= \text | SVG.Text.extra.class + a:documentation [ "\x{a}" ~ " SVG.TextContent.class\x{a}" ~ " " ] + SVG.TextContent.extra.class = notAllowed + SVG.TextContent.class = altGlyph | SVG.TextContent.extra.class + a:documentation [ "\x{a}" ~ " text: Text Element\x{a}" ~ " " ] + SVG.text.class = + text + | SVG.Description.class + | SVG.Animation.class + | # + SVG.Hyperlink.class + SVG.text.content = SVG.text.class* + \text = element text { attlist.text, SVG.text.content } + attlist.text &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Font.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute x { Coordinates.datatype }?, + attribute y { Coordinates.datatype }?, + attribute rotate { Numbers.datatype }?, + attribute transform { TransformList.datatype }? + a:documentation [ + "\x{a}" ~ + " altGlyph: Alternate Glyph Element\x{a}" ~ + " " + ] + SVG.altGlyph.content = text + altGlyph = element altGlyph { attlist.altGlyph, SVG.altGlyph.content } + attlist.altGlyph &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Font.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.XLink.attrib, + SVG.External.attrib, + attribute glyphRef { text }?, + attribute format { text }? + a:documentation [ + "\x{a}" ~ + " altGlyphDef: Alternate Glyph Definition Element\x{a}" ~ + " " + ] + SVG.altGlyphDef.content = glyphRef+ + altGlyphDef = + element altGlyphDef { attlist.altGlyphDef, SVG.altGlyphDef.content } + attlist.altGlyphDef &= SVG.Core.attrib + a:documentation [ + "\x{a}" ~ + " glyphRef: Glyph Reference Element\x{a}" ~ + " " + ] + SVG.glyphRef.content = empty + glyphRef = element glyphRef { attlist.glyphRef, SVG.glyphRef.content } + attlist.glyphRef &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Font.attrib, + SVG.XLink.attrib, + attribute glyphRef { text }?, + attribute format { text }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-clip.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-clip.rnc new file mode 100644 index 00000000000..50dd76142ea --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-clip.rnc @@ -0,0 +1,30 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" +namespace ns1 = "http://www.w3.org/2000/svg" + + +## +## SVG 1.1 Clip Module +## file: svg-clip.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-clip.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Clip +## +## clipPath +## +## This module declares markup to provide support for clipping. +## +[ xml:lang = "en" ] +grammar { + include "svg-basic-clip.rnc" inherit = ns1 + + ## + ## extend content model of clipPath + ## + SVG.clipPath.class |= SVG.Shape.class | SVG.Text.class +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-conditional.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-conditional.rnc new file mode 100644 index 00000000000..922554a6a8d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-conditional.rnc @@ -0,0 +1,62 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Conditional Processing Module +## file: svg-conditional.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-conditional.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Conditional Processing +## +## switch +## +## This module declares markup to provide support for conditional processing. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + ExtensionList.datatype = xsd:string + FeatureList.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Conditional.attrib\x{a}" ~ " " ] + SVG.Conditional.extra.attrib = empty + SVG.Conditional.attrib &= + attribute requiredFeatures { FeatureList.datatype }?, + attribute requiredExtensions { ExtensionList.datatype }?, + attribute systemLanguage { LanguageCodes.datatype }?, + SVG.Conditional.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Conditional.class\x{a}" ~ " " ] + SVG.Conditional.extra.class = notAllowed + SVG.Conditional.class |= switch | SVG.Conditional.extra.class + a:documentation [ "\x{a}" ~ " switch: Switch Element\x{a}" ~ " " ] + SVG.switch.content = + SVG.Description.class*, + (svg + | g + | use + | \text + | SVG.Animation.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Shape.class + | SVG.Hyperlink.class + | SVG.Extensibility.class)* + switch = element switch { attlist.switch, SVG.switch.content } + attlist.switch &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.GraphicalEvents.attrib, + SVG.External.attrib, + attribute transform { TransformList.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-container-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-container-attrib.rnc new file mode 100644 index 00000000000..fb4ac5ff47f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-container-attrib.rnc @@ -0,0 +1,33 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Container Attribute Module +## file: svg-container-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-container-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Container Attribute +## +## enable-background +## +## This module defines the Container attribute set. +## +[ xml:lang = "en" ] +grammar { + + ## + ## 'enable-background' property/attribute value (e.g., 'new', 'accumulate') + ## + EnableBackgroundValue.datatype = xsd:string + SVG.enable-background.attrib = + attribute enable-background { EnableBackgroundValue.datatype }? + SVG.Container.extra.attrib = empty + SVG.Container.attrib &= + SVG.enable-background.attrib, SVG.Container.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-core-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-core-attrib.rnc new file mode 100644 index 00000000000..e9d73f1601f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-core-attrib.rnc @@ -0,0 +1,35 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Core Attribute Module +## file: svg-core-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-core-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Core Attribute +## +## id, xml:base, xml:lang, xml:space +## +## This module defines the core set of attributes that can be present on +## any element. +## +[ xml:lang = "en" ] +grammar { + SVG.id.attrib = attribute id { xsd:ID }? + SVG.base.attrib = attribute xml:base { URI.datatype }? + SVG.lang.attrib = attribute xml:lang { LanguageCode.datatype }? + SVG.space.attrib = attribute xml:space { "default" | "preserve" }? + SVG.Core.extra.attrib = empty + SVG.Core.attrib = + SVG.id.attrib, + SVG.base.attrib, + SVG.lang.attrib, + SVG.space.attrib, + SVG.Core.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-cursor.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-cursor.rnc new file mode 100644 index 00000000000..50b42d15627 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-cursor.rnc @@ -0,0 +1,47 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Cursor Module +## file: svg-cursor.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-cursor.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Cursor +## +## cursor +## +## This module declares markup to provide support for cursor. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + CursorValue.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Cursor.attrib\x{a}" ~ " " ] + SVG.Cursor.extra.attrib = empty + SVG.Cursor.attrib &= + attribute cursor { CursorValue.datatype }?, + SVG.Cursor.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Cursor.class\x{a}" ~ " " ] + SVG.Cursor.extra.class = notAllowed + SVG.Cursor.class |= cursor | SVG.Cursor.extra.class + a:documentation [ "\x{a}" ~ " cursor: Cursor Element\x{a}" ~ " " ] + SVG.cursor.content = SVG.Description.class* + cursor = element cursor { attlist.cursor, SVG.cursor.content } + attlist.cursor &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.XLinkRequired.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-datatypes.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-datatypes.rnc new file mode 100644 index 00000000000..7a3ea4b659f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-datatypes.rnc @@ -0,0 +1,135 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Datatypes Module +## file: svg-datatypes.mod +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-datatypes.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Datatypes +## +## This module declares common data types for properties and attributes. +## + +## +## feature specification +## +[ xml:lang = "en" ] +grammar { + Boolean.datatype = "false" | "true" + + ## + ## 'clip-rule' or 'fill-rule' property/attribute value + ## + ClipFillRule.datatype = "nonzero" | "evenodd" | "inherit" + + ## + ## media type, as per [RFC2045] + ## + ContentType.datatype = xsd:string + + ## + ## a + ## + Coordinate.datatype = xsd:string + + ## + ## a list of s + ## + Coordinates.datatype = xsd:string + + ## + ## a value + ## + Color.datatype = xsd:string + + ## + ## a + ## + Integer.datatype = xsd:string + + ## + ## a language code, as per [RFC3066] + ## + LanguageCode.datatype = xsd:language + + ## + ## comma-separated list of language codes, as per [RFC3066] + ## + LanguageCodes.datatype = xsd:string + + ## + ## a + ## + Length.datatype = xsd:string + + ## + ## a list of s + ## + Lengths.datatype = xsd:string + + ## + ## a + ## + Number.datatype = xsd:string + + ## + ## a list of s + ## + Numbers.datatype = xsd:string + + ## + ## opacity value (e.g., ) + ## + OpacityValue.datatype = xsd:string + + ## + ## a path data specification + ## + PathData.datatype = xsd:string + + ## + ## 'preserveAspectRatio' attribute specification + ## + PreserveAspectRatioSpec.datatype = + xsd:string { + pattern = + "\s*(none|xMinYMin|xMidYMin|xMaxYMin|xMinYMid|xMidYMid|xMaxYMid|xMinYMax|xMidYMax|xMaxYMax)\s+(meet|slice)?\s*" + } + + ## + ## script expression + ## + Script.datatype = xsd:string + + ## + ## An SVG color value (RGB plus optional ICC) + ## + SVGColor.datatype = xsd:string + + ## + ## arbitrary text string + ## + Text.datatype = xsd:string + + ## + ## list of transforms + ## + TransformList.datatype = xsd:string + + ## + ## a Uniform Resource Identifier, see [URI] + ## + URI.datatype = xsd:anyURI + + ## + ## 'viewBox' attribute specification + ## + ViewBoxSpec.datatype = xsd:string +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-docevents-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-docevents-attrib.rnc new file mode 100644 index 00000000000..a03b011c8d3 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-docevents-attrib.rnc @@ -0,0 +1,38 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Document Events Attribute Module +## file: svg-docevents-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-docevents-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Document Events Attribute +## +## onunload, onabort, onerror, onresize, onscroll, onzoom +## +## This module defines the DocumentEvents attribute set. +## +[ xml:lang = "en" ] +grammar { + SVG.onunload.attrib = attribute onunload { Script.datatype }? + SVG.onabort.attrib = attribute onabort { Script.datatype }? + SVG.onerror.attrib = attribute onerror { Script.datatype }? + SVG.onresize.attrib = attribute onresize { Script.datatype }? + SVG.onscroll.attrib = attribute onscroll { Script.datatype }? + SVG.onzoom.attrib = attribute onzoom { Script.datatype }? + SVG.DocumentEvents.extra.attrib = empty + SVG.DocumentEvents.attrib &= + SVG.onunload.attrib, + SVG.onabort.attrib, + SVG.onerror.attrib, + SVG.onresize.attrib, + SVG.onscroll.attrib, + SVG.onzoom.attrib, + SVG.DocumentEvents.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-extensibility.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-extensibility.rnc new file mode 100644 index 00000000000..23ef64bf988 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-extensibility.rnc @@ -0,0 +1,62 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" +default namespace ns1 = "http://www.w3.org/2000/svg" + +a:documentation [ + "\x{a}" ~ + " SVG 1.1 Extensibility Module\x{a}" ~ + " file: svg-extensibility.rng\x{a}" ~ + "\x{a}" ~ + " This is SVG, a language for describing two-dimensional graphics in XML.\x{a}" ~ + " Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved.\x{a}" ~ + "\x{a}" ~ + " $Id: svg-extensibility.rng,v 1.1 2003/07/15 07:11:10 dean Exp $\x{a}" ~ + "\x{a}" +] +a:documentation [ + "\x{a}" ~ + " Extensibility\x{a}" ~ + "\x{a}" ~ + " foreignObject\x{a}" ~ + "\x{a}" ~ + " This module declares markup to provide support for extensibility.\x{a}" ~ + " " +] +a:documentation [ "\x{a}" ~ " SVG.Extensibility.class\x{a}" ~ " " ] +SVG.Extensibility.extra.class = notAllowed +SVG.Extensibility.class |= foreignObject | SVG.Extensibility.extra.class +a:documentation [ + "\x{a}" ~ + " foreignObject: Foreign Object Element\x{a}" ~ + " " +] +SVG.foreignObject.content = + (text + | svg + # ref name="foreignElement"/ + )* +foreignObject = + element foreignObject { + attlist.foreignObject, SVG.foreignObject.content + } +attlist.foreignObject &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.GraphicalEvents.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }, + attribute height { Length.datatype }, + attribute transform { TransformList.datatype }? + +## +## any element in foreign namespace +## +foreignElement = + element * - ns1:* { + (attribute * - ns1:* { text } + | text + | foreignElement)* + } diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-extresources-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-extresources-attrib.rnc new file mode 100644 index 00000000000..6c1274e082a --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-extresources-attrib.rnc @@ -0,0 +1,28 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 External Resources Attribute Module +## file: svg-extresources-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-extresources-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## External Resources Attribute +## +## externalResourcesRequired +## +## This module defines the External attribute set. +## +[ xml:lang = "en" ] +grammar { + SVG.externalResourcesRequired.attrib = + attribute externalResourcesRequired { Boolean.datatype }? + SVG.External.extra.attrib = empty + SVG.External.attrib &= + SVG.externalResourcesRequired.attrib, SVG.External.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-filter.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-filter.rnc new file mode 100644 index 00000000000..9d4cc259ef4 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-filter.rnc @@ -0,0 +1,214 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Filter Module +## file: svg-filter.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-filter.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Filter +## +## filter, feBlend, feColorMatrix, feComponentTransfer, feComposite, +## feConvolveMatrix, feDiffuseLighting, feDisplacementMap, feFlood, +## feGaussianBlur, feImage, feMerge, feMergeNode, feMorphology, feOffset, +## feSpecularLighting, feTile, feTurbulence, feDistantLight, fePointLight, +## feSpotLight, feFuncR, feFuncG, feFuncB, feFuncA +## +## This module declares markup to provide support for filter effect. +## +[ xml:lang = "en" ] +grammar { + include "svg-basic-filter.rnc" + + ## + ## extend SVG.FilterPrimitive.class + ## + SVG.FilterPrimitive.class |= + feConvolveMatrix + | feDiffuseLighting + | feDisplacementMap + | feMorphology + | feSpecularLighting + | feTurbulence + a:documentation [ + "\x{a}" ~ + " feConvolveMatrix: Filter Effect Convolve Matrix Element\x{a}" ~ + " " + ] + SVG.feConvolveMatrix.content = (animate | set)* + feConvolveMatrix = + element feConvolveMatrix { + attlist.feConvolveMatrix, SVG.feConvolveMatrix.content + } + attlist.feConvolveMatrix &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute order { NumberOptionalNumber.datatype }, + attribute kernelMatrix { text }, + attribute divisor { Number.datatype }?, + attribute bias { Number.datatype }?, + attribute targetX { Integer.datatype }?, + attribute targetY { Integer.datatype }?, + [ a:defaultValue = "duplicate" ] + attribute edgeMode { "duplicate" | "wrap" | "none" }?, + attribute kernelUnitLength { NumberOptionalNumber.datatype }?, + attribute preserveAlpha { Boolean.datatype }? + a:documentation [ + "\x{a}" ~ + " feDiffuseLighting: Filter Effect Diffuse Lighting Element\x{a}" ~ + " " + ] + SVG.feDiffuseLighting.content = + (feDistantLight | fePointLight | feSpotLight), + (animate | set | animateColor)* + feDiffuseLighting = + element feDiffuseLighting { + attlist.feDiffuseLighting, SVG.feDiffuseLighting.content + } + attlist.feDiffuseLighting &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Color.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute lighting-color { SVGColor.datatype }?, + attribute surfaceScale { Number.datatype }?, + attribute diffuseConstant { Number.datatype }?, + attribute kernelUnitLength { NumberOptionalNumber.datatype }? + a:documentation [ + "\x{a}" ~ + " feDisplacementMap: Filter Effect Displacement Map Element\x{a}" ~ + " " + ] + SVG.feDisplacementMap.content = (animate | set)* + feDisplacementMap = + element feDisplacementMap { + attlist.feDisplacementMap, SVG.feDisplacementMap.content + } + attlist.feDisplacementMap &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute in2 { text }, + attribute scale { Number.datatype }?, + [ a:defaultValue = "A" ] + attribute xChannelSelector { "R" | "G" | "B" | "A" }?, + [ a:defaultValue = "A" ] + attribute yChannelSelector { "R" | "G" | "B" | "A" }? + a:documentation [ + "\x{a}" ~ + " feMorphology: Filter Effect Morphology Element\x{a}" ~ + " " + ] + SVG.feMorphology.content = (animate | set)* + feMorphology = + element feMorphology { + attlist.feMorphology, SVG.feMorphology.content + } + attlist.feMorphology &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + [ a:defaultValue = "erode" ] + attribute operator { "erode" | "dilate" }?, + attribute radius { NumberOptionalNumber.datatype }? + a:documentation [ + "\x{a}" ~ + " feSpecularLighting: Filter Effect Specular Lighting Element\x{a}" ~ + " " + ] + SVG.feSpecularLighting.content = + (feDistantLight | fePointLight | feSpotLight), + (animate | set | animateColor)* + feSpecularLighting = + element feSpecularLighting { + attlist.feSpecularLighting, SVG.feSpecularLighting.content + } + attlist.feSpecularLighting &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Color.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitiveWithIn.attrib, + attribute lighting-color { SVGColor.datatype }?, + attribute surfaceScale { Number.datatype }?, + attribute specularConstant { Number.datatype }?, + attribute specularExponent { Number.datatype }?, + attribute kernelUnitLength { NumberOptionalNumber.datatype }? + a:documentation [ + "\x{a}" ~ + " feTurbulence: Filter Effect Turbulence Element\x{a}" ~ + " " + ] + SVG.feTurbulence.content = (animate | set)* + feTurbulence = + element feTurbulence { + attlist.feTurbulence, SVG.feTurbulence.content + } + attlist.feTurbulence &= + SVG.Core.attrib, + SVG.FilterColor.attrib, + SVG.FilterPrimitive.attrib, + attribute baseFrequency { NumberOptionalNumber.datatype }?, + attribute numOctaves { Integer.datatype }?, + attribute seed { Number.datatype }?, + [ a:defaultValue = "noStitch" ] + attribute stitchTiles { "stitch" | "noStitch" }?, + [ a:defaultValue = "turbulence" ] + attribute type { "fractalNoise" | "turbulence" }? + a:documentation [ + "\x{a}" ~ + " feDistantLight: Filter Effect Distant Light Element\x{a}" ~ + " " + ] + SVG.feDistantLight.content = (animate | set)* + feDistantLight = + element feDistantLight { + attlist.feDistantLight, SVG.feDistantLight.content + } + attlist.feDistantLight &= + SVG.Core.attrib, + attribute azimuth { Number.datatype }?, + attribute elevation { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " fePointLight: Filter Effect Point Light Element\x{a}" ~ + " " + ] + SVG.fePointLight.content = (animate | set)* + fePointLight = + element fePointLight { + attlist.fePointLight, SVG.fePointLight.content + } + attlist.fePointLight &= + SVG.Core.attrib, + attribute x { Number.datatype }?, + attribute y { Number.datatype }?, + attribute z { Number.datatype }? + a:documentation [ + "\x{a}" ~ + " feSpotLight: Filter Effect Spot Light Element\x{a}" ~ + " " + ] + SVG.feSpotLight.content = (animate | set)* + feSpotLight = + element feSpotLight { attlist.feSpotLight, SVG.feSpotLight.content } + attlist.feSpotLight &= + SVG.Core.attrib, + attribute x { Number.datatype }?, + attribute y { Number.datatype }?, + attribute z { Number.datatype }?, + attribute pointsAtX { Number.datatype }?, + attribute pointsAtY { Number.datatype }?, + attribute pointsAtZ { Number.datatype }?, + attribute specularExponent { Number.datatype }?, + attribute limitingConeAngle { Number.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-font.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-font.rnc new file mode 100644 index 00000000000..f14e10c2342 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-font.rnc @@ -0,0 +1,108 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Font Module +## file: svg-font.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-font.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Font +## +## font, font-face, glyph, missing-glyph, hkern, vkern, font-face-src, +## font-face-uri, font-face-format, font-face-name, definition-src +## +## This module declares markup to provide support for template. +## +[ xml:lang = "en" ] +grammar { + include "svg-basic-font.rnc" + a:documentation [ + "\x{a}" ~ + " font-face: Font Face Element\x{a}" ~ + " " + ] + SVG.font-face.extra.class &= definition-src? + a:documentation [ "\x{a}" ~ " glyph: Glyph Element\x{a}" ~ " " ] + SVG.glyph.class |= + SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class + a:documentation [ + "\x{a}" ~ + " missing-glyph: Missing Glyph Element\x{a}" ~ + " " + ] + SVG.missing-glyph.class |= + SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class + a:documentation [ + "\x{a}" ~ + " font-face-uri: Font Face URI Element\x{a}" ~ + " " + ] + SVG.font-face-uri.content |= font-face-format* + a:documentation [ + "\x{a}" ~ + " font-face-format: Font Face Format Element\x{a}" ~ + " " + ] + SVG.font-face-format.content = empty + font-face-format = + element font-face-format { + attlist.font-face-format, SVG.font-face-format.content + } + attlist.font-face-format &= + SVG.Core.attrib, + attribute string { text }? + a:documentation [ + "\x{a}" ~ + " definition-src: Definition Source Element\x{a}" ~ + " " + ] + SVG.definition-src.content = empty + definition-src = + element definition-src { + attlist.definition-src, SVG.definition-src.content + } + attlist.definition-src &= SVG.Core.attrib, SVG.XLinkRequired.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-gradient.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-gradient.rnc new file mode 100644 index 00000000000..e8c6e60525f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-gradient.rnc @@ -0,0 +1,99 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Gradient Module +## file: svg-gradient.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-gradient.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Gradient +## +## linearGradient, radialGradient, stop +## +## This module declares markup to provide support for gradient fill. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + NumberOrPercentage.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Gradient.attrib\x{a}" ~ " " ] + SVG.Gradient.extra.attrib = empty + SVG.Gradient.attrib &= + attribute stop-color { SVGColor.datatype }?, + attribute stop-opacity { OpacityValue.datatype }?, + SVG.Gradient.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Gradient.class\x{a}" ~ " " ] + SVG.Gradient.extra.class = notAllowed + SVG.Gradient.class |= + linearGradient | radialGradient | SVG.Gradient.extra.class + a:documentation [ + "\x{a}" ~ + " linearGradient: Linear Gradient Element\x{a}" ~ + " " + ] + SVG.linearGradient.content = + SVG.Description.class*, (stop | animate | set | animateTransform)* + linearGradient = + element linearGradient { + attlist.linearGradient, SVG.linearGradient.content + } + attlist.linearGradient &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Color.attrib, + SVG.Gradient.attrib, + SVG.XLink.attrib, + SVG.External.attrib, + attribute x1 { Coordinate.datatype }?, + attribute y1 { Coordinate.datatype }?, + attribute x2 { Coordinate.datatype }?, + attribute y2 { Coordinate.datatype }?, + attribute gradientUnits { "userSpaceOnUse" | "objectBoundingBox" }?, + attribute gradientTransform { TransformList.datatype }?, + attribute spreadMethod { "pad" | "reflect" | "repeat" }? + a:documentation [ + "\x{a}" ~ + " radialGradient: Radial Gradient Element\x{a}" ~ + " " + ] + SVG.radialGradient.content = + SVG.Description.class*, (stop | animate | set | animateTransform)* + radialGradient = + element radialGradient { + attlist.radialGradient, SVG.radialGradient.content + } + attlist.radialGradient &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Color.attrib, + SVG.Gradient.attrib, + SVG.XLink.attrib, + SVG.External.attrib, + attribute cx { Coordinate.datatype }?, + attribute cy { Coordinate.datatype }?, + attribute r { Length.datatype }?, + attribute fx { Coordinate.datatype }?, + attribute fy { Coordinate.datatype }?, + attribute gradientUnits { "userSpaceOnUse" | "objectBoundingBox" }?, + attribute gradientTransform { TransformList.datatype }?, + attribute spreadMethod { "pad" | "reflect" | "repeat" }? + a:documentation [ "\x{a}" ~ " stop: Stop Element\x{a}" ~ " " ] + SVG.stop.content = (animate | set | animateColor)* + stop = element stop { attlist.stop, SVG.stop.content } + attlist.stop &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Color.attrib, + SVG.Gradient.attrib, + attribute offset { NumberOrPercentage.datatype } +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-graphevents-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-graphevents-attrib.rnc new file mode 100644 index 00000000000..e5828f3dab8 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-graphevents-attrib.rnc @@ -0,0 +1,47 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Graphical Element Events Attribute Module +## file: svg-graphevents-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-graphevents-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Graphical Element Events Attribute +## +## onfocusin, onfocusout, onactivate, onclick, onmousedown, onmouseup, +## onmouseover, onmousemove, onmouseout, onload +## +## This module defines the GraphicalEvents attribute set. +## +[ xml:lang = "en" ] +grammar { + SVG.onfocusin.attrib = attribute onfocusin { Script.datatype }? + SVG.onfocusout.attrib = attribute onfocusout { Script.datatype }? + SVG.onactivate.attrib = attribute onactivate { Script.datatype }? + SVG.onclick.attrib = attribute onclick { Script.datatype }? + SVG.onmousedown.attrib = attribute onmousedown { Script.datatype }? + SVG.onmouseup.attrib = attribute onmouseup { Script.datatype }? + SVG.onmouseover.attrib = attribute onmouseover { Script.datatype }? + SVG.onmousemove.attrib = attribute onmousemove { Script.datatype }? + SVG.onmouseout.attrib = attribute onmouseout { Script.datatype }? + SVG.onload.attrib &= attribute onload { Script.datatype }? + SVG.GraphicalEvents.extra.attrib = empty + SVG.GraphicalEvents.attrib &= + SVG.onfocusin.attrib, + SVG.onfocusout.attrib, + SVG.onactivate.attrib, + SVG.onclick.attrib, + SVG.onmousedown.attrib, + SVG.onmouseup.attrib, + SVG.onmouseover.attrib, + SVG.onmousemove.attrib, + SVG.onmouseout.attrib, + SVG.onload.attrib, + SVG.GraphicalEvents.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-graphics-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-graphics-attrib.rnc new file mode 100644 index 00000000000..bbf132ab971 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-graphics-attrib.rnc @@ -0,0 +1,64 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" +namespace ns1 = "http://www.w3.org/2000/svg" + + +## +## SVG 1.1 Graphics Attribute Module +## file: svg-graphics-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-graphics-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Graphics Attribute +## +## display, image-rendering, pointer-events, shape-rendering, +## text-rendering, visibility +## +## This module defines the Graphics attribute set. +## +[ xml:lang = "en" ] +grammar { + include "svg-basic-graphics-attrib.rnc" inherit = ns1 + SVG.image-rendering.attrib = + attribute image-rendering { + "auto" | "optimizeSpeed" | "optimizeQuality" | "inherit" + }? + SVG.pointer-events.attrib = + attribute pointer-events { + "visiblePainted" + | "visibleFill" + | "visibleStroke" + | "visible" + | "painted" + | "fill" + | "stroke" + | "all" + | "none" + | "inherit" + }? + SVG.shape-rendering.attrib = + attribute shape-rendering { + "auto" + | "optimizeSpeed" + | "crispEdges" + | "geometricPrecision" + | "inherit" + }? + SVG.text-rendering.attrib = + attribute text-rendering { + "auto" + | "optimizeSpeed" + | "optimizeLegibility" + | "geometricPrecision" + | "inherit" + }? + SVG.Graphics.attrib &= + SVG.image-rendering.attrib, + SVG.pointer-events.attrib, + SVG.shape-rendering.attrib, + SVG.text-rendering.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-hyperlink.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-hyperlink.rnc new file mode 100644 index 00000000000..705e3e3334d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-hyperlink.rnc @@ -0,0 +1,66 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Hyperlinking Module +## file: svg-hyperlink.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-hyperlink.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Hyperlinking +## +## a +## +## This module declares markup to provide support for hyper linking. +## +[ xml:lang = "en" ] +grammar { + + ## + ## link to this target + ## + LinkTarget.datatype = xsd:NMTOKEN + a:documentation [ "\x{a}" ~ " SVG.Hyperlink.class\x{a}" ~ " " ] + SVG.Hyperlink.extra.class = notAllowed + SVG.Hyperlink.class |= a | SVG.Hyperlink.extra.class + a:documentation [ "\x{a}" ~ " a: Anchor Element\x{a}" ~ " " ] + SVG.a.content = + (text + | SVG.Description.class + | SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class)* + a = element a { attlist.a, SVG.a.content } + attlist.a &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.GraphicalEvents.attrib, + SVG.XLinkReplace.attrib, + SVG.External.attrib, + attribute transform { TransformList.datatype }?, + attribute target { LinkTarget.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-image.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-image.rnc new file mode 100644 index 00000000000..0dffc8e1b92 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-image.rnc @@ -0,0 +1,56 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Image Module +## file: svg-image.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-image.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Image +## +## image +## +## This module declares markup to provide support for image. +## + +## +## SVG.Image.class +## +[ xml:lang = "en" ] +grammar { + SVG.Image.extra.class = notAllowed + SVG.Image.class |= image | SVG.Image.extra.class + a:documentation [ "\x{a}" ~ " image: Image Element\x{a}" ~ " " ] + SVG.image.content = SVG.Description.class*, SVG.Animation.class* + image = element image { attlist.image, SVG.image.content } + attlist.image &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Viewport.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Profile.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.XLinkEmbed.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }, + attribute height { Length.datatype }, + [ a:defaultValue = "xMidYMid meet" ] + attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }?, + attribute transform { TransformList.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-marker.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-marker.rnc new file mode 100644 index 00000000000..bfb7c316bd5 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-marker.rnc @@ -0,0 +1,76 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Marker Module +## file: svg-marker.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-marker.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Marker +## +## marker +## +## This module declares markup to provide support for marker. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + MarkerValue.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Marker.attrib\x{a}" ~ " " ] + SVG.Marker.extra.attrib = empty + SVG.Marker.attrib &= + attribute marker-start { MarkerValue.datatype }?, + attribute marker-mid { MarkerValue.datatype }?, + attribute marker-end { MarkerValue.datatype }?, + SVG.Marker.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Marker.class\x{a}" ~ " " ] + SVG.Marker.extra.class = notAllowed + SVG.Marker.class |= marker | SVG.Marker.extra.class + a:documentation [ "\x{a}" ~ " marker: Marker Element\x{a}" ~ " " ] + SVG.marker.content = + (SVG.Description.class + | SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class)* + marker = element marker { attlist.marker, SVG.marker.content } + attlist.marker &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.External.attrib, + attribute refX { Coordinate.datatype }?, + attribute refY { Coordinate.datatype }?, + attribute markerUnits { "strokeWidth" | "userSpaceOnUse" }?, + attribute markerWidth { Length.datatype }?, + attribute markerHeight { Length.datatype }?, + attribute orient { text }?, + attribute viewBox { ViewBoxSpec.datatype }?, + [ a:defaultValue = "xMidYMid meet" ] + attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-mask.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-mask.rnc new file mode 100644 index 00000000000..c5b8722bf8f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-mask.rnc @@ -0,0 +1,74 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Mask Module +## file: svg-mask.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-mask.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Mask +## +## mask +## +## This module declares markup to provide support for masking. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + MaskValue.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Mask.attrib\x{a}" ~ " " ] + SVG.Mask.extra.attrib = empty + SVG.Mask.attrib &= + attribute mask { MaskValue.datatype }?, + SVG.Mask.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Mask.class\x{a}" ~ " " ] + SVG.Mask.extra.class = notAllowed + SVG.Mask.class |= mask | SVG.Mask.extra.class + a:documentation [ "\x{a}" ~ " mask: Mask Element\x{a}" ~ " " ] + SVG.mask.content = + (SVG.Description.class + | SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class)* + mask = element mask { attlist.mask, SVG.mask.content } + attlist.mask &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }?, + attribute height { Length.datatype }?, + attribute maskUnits { "userSpaceOnUse" | "objectBoundingBox" }?, + attribute maskContentUnits { + "userSpaceOnUse" | "objectBoundingBox" + }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-opacity-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-opacity-attrib.rnc new file mode 100644 index 00000000000..c794117b5fa --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-opacity-attrib.rnc @@ -0,0 +1,34 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Paint Opacity Attribute Module +## file: svg-opacity-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-opacity-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Paint Opacity Attribute +## +## opacity, fill-opacity, stroke-opacity +## +## This module defines the Opacity attribute set. +## +[ xml:lang = "en" ] +grammar { + SVG.opacity.attrib = attribute opacity { OpacityValue.datatype }? + SVG.fill-opacity.attrib = + attribute fill-opacity { OpacityValue.datatype }? + SVG.stroke-opacity.attrib = + attribute stroke-opacity { OpacityValue.datatype }? + SVG.Opacity.extra.attrib = empty + SVG.Opacity.attrib &= + SVG.opacity.attrib, + SVG.fill-opacity.attrib, + SVG.stroke-opacity.attrib, + SVG.Opacity.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-paint-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-paint-attrib.rnc new file mode 100644 index 00000000000..bcb9ccce9e4 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-paint-attrib.rnc @@ -0,0 +1,97 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Paint Attribute Module +## file: svg-paint-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-paint-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Paint Attribute +## +## fill, fill-rule, stroke, stroke-dasharray, stroke-dashoffset, +## stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-width, color, +## color-interpolation, color-rendering +## +## This module defines the Paint and Color attribute sets. +## +[ xml:lang = "en" ] +grammar { + + ## + ## a 'fill' or 'stroke' property/attribute value: + ## + Paint.datatype = xsd:string + + ## + ## 'stroke-dasharray' property/attribute value + ## (e.g., 'none', list of s) + ## + StrokeDashArrayValue.datatype = xsd:string + + ## + ## 'stroke-dashoffset' property/attribute value (e.g., 'none', ) + ## + StrokeDashOffsetValue.datatype = xsd:string + + ## + ## 'stroke-miterlimit' property/attribute value (e.g., ) + ## + StrokeMiterLimitValue.datatype = xsd:string + + ## + ## 'stroke-width' property/attribute value (e.g., ) + ## + StrokeWidthValue.datatype = xsd:string + SVG.fill.attrib = attribute fill { Paint.datatype }? + SVG.fill-rule.attrib = attribute fill-rule { ClipFillRule.datatype }? + SVG.stroke.attrib = attribute stroke { Paint.datatype }? + SVG.stroke-dasharray.attrib = + attribute stroke-dasharray { StrokeDashArrayValue.datatype }? + SVG.stroke-dashoffset.attrib = + attribute stroke-dashoffset { StrokeDashOffsetValue.datatype }? + SVG.stroke-linecap.attrib = + attribute stroke-linecap { + "butt" | "round" | "square" | "inherit" + }? + SVG.stroke-linejoin.attrib = + attribute stroke-linejoin { + "miter" | "round" | "bevel" | "inherit" + }? + SVG.stroke-miterlimit.attrib = + attribute stroke-miterlimit { StrokeMiterLimitValue.datatype }? + SVG.stroke-width.attrib = + attribute stroke-width { StrokeWidthValue.datatype }? + SVG.Paint.extra.attrib = empty + SVG.Paint.attrib &= + SVG.fill.attrib, + SVG.fill-rule.attrib, + SVG.stroke.attrib, + SVG.stroke-dasharray.attrib, + SVG.stroke-dashoffset.attrib, + SVG.stroke-linecap.attrib, + SVG.stroke-linejoin.attrib, + SVG.stroke-miterlimit.attrib, + SVG.stroke-width.attrib, + SVG.Paint.extra.attrib + SVG.color.attrib = attribute color { Color.datatype }? + SVG.color-interpolation.attrib = + attribute color-interpolation { + "auto" | "sRGB" | "linearRGB" | "inherit" + }? + SVG.color-rendering.attrib = + attribute color-rendering { + "auto" | "optimizeSpeed" | "optimizeQuality" | "inherit" + }? + SVG.Color.extra.attrib = empty + SVG.Color.attrib &= + SVG.color.attrib, + SVG.color-interpolation.attrib, + SVG.color-rendering.attrib, + SVG.Color.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-pattern.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-pattern.rnc new file mode 100644 index 00000000000..0a538fe96a8 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-pattern.rnc @@ -0,0 +1,76 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Pattern Module +## file: svg-pattern.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-pattern.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Pattern +## +## pattern +## +## This module declares markup to provide support for pattern fill. +## + +## +## SVG.Pattern.class +## +[ xml:lang = "en" ] +grammar { + SVG.Pattern.extra.class = notAllowed + SVG.Pattern.class |= pattern | SVG.Pattern.extra.class + a:documentation [ + "\x{a}" ~ + " pattern: Pattern Element\x{a}" ~ + " " + ] + SVG.pattern.content = + (SVG.Description.class + | SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class)* + pattern = element pattern { attlist.pattern, SVG.pattern.content } + attlist.pattern &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.XLink.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }?, + attribute height { Length.datatype }?, + attribute patternUnits { "userSpaceOnUse" | "objectBoundingBox" }?, + attribute patternContentUnits { + "userSpaceOnUse" | "objectBoundingBox" + }?, + attribute patternTransform { TransformList.datatype }?, + attribute viewBox { ViewBoxSpec.datatype }?, + [ a:defaultValue = "xMidYMid meet" ] + attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-profile.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-profile.rnc new file mode 100644 index 00000000000..ba154bdca8b --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-profile.rnc @@ -0,0 +1,58 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Color Profile Module +## file: svg-profile.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-profile.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Color Profile +## +## color-profile +## +## This module declares markup to provide support for color profile. +## + +## +## SVG.Profile.attrib +## +[ xml:lang = "en" ] +grammar { + SVG.Profile.extra.attrib = empty + SVG.Profile.attrib &= + attribute color-profile { text }?, + SVG.Profile.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Profile.class\x{a}" ~ " " ] + SVG.Profile.extra.class = notAllowed + SVG.Profile.class |= color-profile | SVG.Profile.extra.class + a:documentation [ + "\x{a}" ~ + " color-profile: Color Profile Element\x{a}" ~ + " " + ] + SVG.color-profile.content = SVG.Description.class* + color-profile = + element color-profile { + attlist.color-profile, SVG.color-profile.content + } + attlist.color-profile &= + SVG.Core.attrib, + SVG.XLink.attrib, + attribute local { text }?, + attribute name { text }, + [ a:defaultValue = "auto" ] + attribute rendering-intent { + "auto" + | "perceptual" + | "relative-colorimetric" + | "saturation" + | "absolute-colorimetric" + }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-qname.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-qname.rnc new file mode 100644 index 00000000000..884c76d157d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-qname.rnc @@ -0,0 +1,116 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" +namespace xlink = "http://www.w3.org/1999/xlink" + +# ....................................................................... + +# SVG 1.1 Qualified Name Module ......................................... + +# file: svg-qname.mod +# +# This is SVG, a language for describing two-dimensional graphics in XML. +# Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +# Revision: $Id: svg-qname.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +# +# This DTD module is identified by the PUBLIC and SYSTEM identifiers: +# +# PUBLIC "-//W3C//ENTITIES SVG 1.1 Qualified Name//EN" +# SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg-qname.mod" +# +# ....................................................................... + +# Qualified Name +# +# This module is contained in two parts, labeled Section 'A' and 'B': +# +# Section A declares parameter entities to support namespace- +# qualified names, namespace declarations, and name prefixing +# for SVG and extensions. +# +# Section B declares parameter entities used to provide +# namespace-qualified names for all SVG element types: + +# Section A: SVG XML Namespace Framework :::::::::::::::::::::: + +# 1. Declare a %SVG.prefixed; conditional section keyword, used +# to activate namespace prefixing. The default value should +# inherit '%NS.prefixed;' from the DTD driver, so that unless +# overridden, the default behaviour follows the overall DTD +# prefixing scheme. + +# 2. Declare a parameter entity (eg., %SVG.xmlns;) containing +# the URI reference used to identify the SVG namespace: + +# 3. Declare parameter entities (eg., %SVG.prefix;) containing +# the default namespace prefix string(s) to use when prefixing +# is enabled. This may be overridden in the DTD driver or the +# internal subset of an document instance. If no default prefix +# is desired, this may be declared as an empty string. + +# 4. Declare parameter entities (eg., %SVG.pfx;) containing the +# colonized prefix(es) (eg., '%SVG.prefix;:') used when +# prefixing is active, an empty string when it is not. + +# 5. The parameter entity %SVG.xmlns.extra.attrib; may be +# redeclared to contain any non-SVG namespace declaration +# attributes for namespaces embedded in SVG. The default +# is an empty string. + +# Declare a parameter entity XLINK.xmlns.attrib containing +# the XML Namespace declarations for XLink. +XLINK.xmlns.attrib = empty +# Declare a parameter entity %NS.decl.attrib; containing +# all XML Namespace declarations used in the DTD, plus the +# xmlns declaration for SVG, its form dependent on whether +# prefixing is active. + +# Declare a parameter entity %SVG.xmlns.attrib; containing +# all XML namespace declaration attributes used by SVG, +# including a default xmlns attribute when prefixing is +# inactive. +SVG.xmlns.attrib = empty, XLINK.xmlns.attrib +# Section B: SVG Qualified Names :::::::::::::::::::::::::::::: + +# 6. This section declares parameter entities used to provide +# namespace-qualified names for all SVG element types. + +# module: svg-structure.mod ......................... + +# module: svg-conditional.mod ....................... + +# module: svg-image.mod ............................. + +# module: svg-style.mod ............................. + +# module: svg-shape.mod ............................. + +# module: svg-text.mod .............................. + +# module: svg-marker.mod ............................ + +# module: svg-profile.mod ........................... + +# module: svg-gradient.mod .......................... + +# module: svg-pattern.mod ........................... + +# module: svg-clip.mod .............................. + +# module: svg-mask.mod .............................. + +# module: svg-filter.mod ............................ + +# module: svg-cursor.mod ............................ + +# module: svg-hyperlink.mod ......................... + +# module: svg-view.mod .............................. + +# module: svg-script.mod ............................ + +# module: svg-animation.mod ......................... + +# module: svg-font.mod .............................. + +# module: svg-extensibility.mod ..................... + +# end of svg-qname.mod diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-script.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-script.rnc new file mode 100644 index 00000000000..a990e5497fc --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-script.rnc @@ -0,0 +1,38 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Scripting Module +## file: svg-script.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-script.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Scripting +## +## script +## +## This module declares markup to provide support for scripting. +## + +## +## SVG.Script.class +## +[ xml:lang = "en" ] +grammar { + SVG.Script.extra.class = notAllowed + SVG.Script.class |= script | SVG.Script.extra.class + a:documentation [ "\x{a}" ~ " script: Script Element\x{a}" ~ " " ] + SVG.script.content = text + script = element script { attlist.script, SVG.script.content } + attlist.script &= + SVG.Core.attrib, + SVG.XLink.attrib, + SVG.External.attrib, + attribute type { ContentType.datatype } +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-shape.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-shape.rnc new file mode 100644 index 00000000000..cc80462b97d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-shape.rnc @@ -0,0 +1,207 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Shape Module +## file: svg-shape.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-shape.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Shape +## +## path, rect, circle, line, ellipse, polyline, polygon +## +## This module declares markup to provide support for graphical shapes. +## +[ xml:lang = "en" ] +grammar { + + ## + ## a list of points + ## + Points.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Shape.class\x{a}" ~ " " ] + SVG.Shape.extra.class = notAllowed + SVG.Shape.class |= + path + | rect + | circle + | line + | ellipse + | polyline + | polygon + | SVG.Shape.extra.class + a:documentation [ "\x{a}" ~ " path: Path Element\x{a}" ~ " " ] + SVG.path.content = SVG.Description.class*, SVG.Animation.class* + path = element path { attlist.path, SVG.path.content } + attlist.path &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Marker.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute d { PathData.datatype }, + attribute pathLength { Number.datatype }?, + attribute transform { TransformList.datatype }? + a:documentation [ + "\x{a}" ~ + " rect: Rectangle Element\x{a}" ~ + " " + ] + SVG.rect.content = SVG.Description.class*, SVG.Animation.class* + rect = element rect { attlist.rect, SVG.rect.content } + attlist.rect &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute x { Coordinate.datatype }?, + attribute y { Coordinate.datatype }?, + attribute width { Length.datatype }, + attribute height { Length.datatype }, + attribute rx { Length.datatype }?, + attribute ry { Length.datatype }?, + attribute transform { TransformList.datatype }? + a:documentation [ "\x{a}" ~ " circle: Circle Element\x{a}" ~ " " ] + SVG.circle.content = SVG.Description.class*, SVG.Animation.class* + circle = element circle { attlist.circle, SVG.circle.content } + attlist.circle &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute cx { Coordinate.datatype }?, + attribute cy { Coordinate.datatype }?, + attribute r { Length.datatype }, + attribute transform { TransformList.datatype }? + a:documentation [ "\x{a}" ~ " line: Line Element\x{a}" ~ " " ] + SVG.line.content = SVG.Description.class*, SVG.Animation.class* + line = element line { attlist.line, SVG.line.content } + attlist.line &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Marker.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute x1 { Coordinate.datatype }?, + attribute y1 { Coordinate.datatype }?, + attribute x2 { Coordinate.datatype }?, + attribute y2 { Coordinate.datatype }?, + attribute transform { TransformList.datatype }? + a:documentation [ + "\x{a}" ~ + " ellipse: Ellipse Element\x{a}" ~ + " " + ] + SVG.ellipse.content = SVG.Description.class*, SVG.Animation.class* + ellipse = element ellipse { attlist.ellipse, SVG.ellipse.content } + attlist.ellipse &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute cx { Coordinate.datatype }?, + attribute cy { Coordinate.datatype }?, + attribute rx { Length.datatype }, + attribute ry { Length.datatype }, + attribute transform { TransformList.datatype }? + a:documentation [ + "\x{a}" ~ + " polyline: Polyline Element\x{a}" ~ + " " + ] + SVG.polyline.content = SVG.Description.class*, SVG.Animation.class* + polyline = element polyline { attlist.polyline, SVG.polyline.content } + attlist.polyline &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Marker.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute points { Points.datatype }, + attribute transform { TransformList.datatype }? + a:documentation [ + "\x{a}" ~ + " polygon: Polygon Element\x{a}" ~ + " " + ] + SVG.polygon.content = SVG.Description.class*, SVG.Animation.class* + polygon = element polygon { attlist.polygon, SVG.polygon.content } + attlist.polygon &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Marker.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute points { Points.datatype }, + attribute transform { TransformList.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-structure.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-structure.rnc new file mode 100644 index 00000000000..370c4259c05 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-structure.rnc @@ -0,0 +1,62 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Structure Module +## file: svg-structure.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-structure.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Structure +## +## svg, g, defs, desc, title, metadata, symbol, use +## +## This module declares the major structural elements and their attributes. +## +[ xml:lang = "en" ] +grammar { + include "svg-basic-structure.rnc" + + ## + ## extend SVG.Structure.class + ## + SVG.Structure.class |= symbol + a:documentation [ "\x{a}" ~ " symbol: Symbol Element\x{a}" ~ " " ] + SVG.symbol.content = + (SVG.Description.class + | SVG.Animation.class + | SVG.Structure.class + | SVG.Conditional.class + | SVG.Image.class + | SVG.Style.class + | SVG.Shape.class + | SVG.Text.class + | SVG.Marker.class + | SVG.Profile.class + | SVG.Gradient.class + | SVG.Pattern.class + | SVG.Clip.class + | SVG.Mask.class + | SVG.Filter.class + | SVG.Cursor.class + | SVG.Hyperlink.class + | SVG.View.class + | SVG.Script.class + | SVG.Font.class)* + symbol = element symbol { attlist.symbol, SVG.symbol.content } + attlist.symbol &= + SVG.Core.attrib, + SVG.Style.attrib, + SVG.Presentation.attrib, + SVG.GraphicalEvents.attrib, + SVG.External.attrib, + attribute viewBox { ViewBoxSpec.datatype }?, + [ a:defaultValue = "xMidYMid meet" ] + attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-style.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-style.rnc new file mode 100644 index 00000000000..68c7f48c1a3 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-style.rnc @@ -0,0 +1,56 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Style Module +## file: svg-style.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-style.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Style +## +## style +## +## This module declares markup to provide support for stylesheet. +## + +## +## Datatypes +## +[ xml:lang = "en" ] +grammar { + ClassList.datatype = xsd:NMTOKENS + StyleSheet.datatype = xsd:string + + ## + ## comma-separated list of media descriptors. + ## + MediaDesc.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Style.attrib\x{a}" ~ " " ] + SVG.Style.extra.attrib = empty + SVG.Style.attrib &= + attribute style { StyleSheet.datatype }?, + attribute class { ClassList.datatype }?, + SVG.Style.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.Style.class\x{a}" ~ " " ] + SVG.Style.extra.class = notAllowed + SVG.Style.class |= style | SVG.Style.extra.class + a:documentation [ "\x{a}" ~ " style: Style Element\x{a}" ~ " " ] + SVG.style.content = text + style = element style { attlist.style, SVG.style.content } + attlist.style &= + [ a:defaultValue = "preserve" ] attribute xml:space { "preserve" }?, + SVG.id.attrib, + SVG.base.attrib, + SVG.lang.attrib, + SVG.Core.extra.attrib, + attribute type { ContentType.datatype }, + attribute media { MediaDesc.datatype }?, + attribute title { Text.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-text.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-text.rnc new file mode 100644 index 00000000000..b9d52e14420 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-text.rnc @@ -0,0 +1,275 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Text Module +## file: svg-text.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-text.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Text +## +## text, tspan, tref, textPath, altGlyph, altGlyphDef, altGlyphItem, +## glyphRef +## +## This module declares markup to provide support for alternate glyph. +## +[ xml:lang = "en" ] +grammar { + include "svg-basic-text.rnc" + a:documentation [ "\x{a}" ~ " Datatypes\x{a}" ~ " " ] + BaselineShiftValue.datatype = xsd:string + FontSizeAdjustValue.datatype = xsd:string + GlyphOrientationHorizontalValue.datatype = xsd:string + GlyphOrientationVerticalValue.datatype = xsd:string + KerningValue.datatype = xsd:string + SpacingValue.datatype = xsd:string + TextDecorationValue.datatype = xsd:string + a:documentation [ "\x{a}" ~ " SVG.Text.attrib\x{a}" ~ " " ] + SVG.Text.extra.attrib = empty + SVG.Text.attrib &= + attribute writing-mode { + "lr-tb" | "rl-tb" | "tb-rl" | "lr" | "rl" | "tb" | "inherit" + }?, + SVG.Text.extra.attrib + a:documentation [ "\x{a}" ~ " SVG.TextContent.attrib\x{a}" ~ " " ] + SVG.TextContent.extra.attrib = empty + SVG.TextContent.attrib &= + attribute alignment-baseline { + "auto" + | "baseline" + | "before-edge" + | "text-before-edge" + | "middle" + | "central" + | "after-edge" + | "text-after-edge" + | "ideographic" + | "alphabetic" + | "hanging" + | "mathematical" + | "inherit" + }?, + attribute baseline-shift { BaselineShiftValue.datatype }?, + attribute direction { "ltr" | "rtl" | "inherit" }?, + attribute dominant-baseline { + "auto" + | "use-script" + | "no-change" + | "reset-size" + | "ideographic" + | "alphabetic" + | "hanging" + | "mathematical" + | "central" + | "middle" + | "text-after-edge" + | "text-before-edge" + | "inherit" + }?, + attribute glyph-orientation-horizontal { + GlyphOrientationHorizontalValue.datatype + }?, + attribute glyph-orientation-vertical { + GlyphOrientationVerticalValue.datatype + }?, + attribute kerning { KerningValue.datatype }?, + attribute letter-spacing { SpacingValue.datatype }?, + attribute text-anchor { "start" | "middle" | "end" | "inherit" }?, + attribute text-decoration { TextDecorationValue.datatype }?, + attribute unicode-bidi { + "normal" | "embed" | "bidi-override" | "inherit" + }?, + attribute word-spacing { SpacingValue.datatype }?, + SVG.TextContent.extra.attrib + SVG.Font.attrib &= + attribute font-size-adjust { FontSizeAdjustValue.datatype }?, + attribute font-stretch { + "normal" + | "wider" + | "narrower" + | "ultra-condensed" + | "extra-condensed" + | "condensed" + | "semi-condensed" + | "semi-expanded" + | "expanded" + | "extra-expanded" + | "ultra-expanded" + | "inherit" + }?, + attribute font-variant { "normal" | "small-caps" | "inherit" }? + + ## + ## extend SVG.Text.class + ## + SVG.Text.class |= altGlyphDef + + ## + ## extend SVG.TextContent.class + ## + SVG.TextContent.class |= tspan | tref | textPath + a:documentation [ "\x{a}" ~ " text: Text Element\x{a}" ~ " " ] + SVG.text.class |= SVG.TextContent.class + attlist.text &= + SVG.Text.attrib, + SVG.TextContent.attrib, + attribute dx { Lengths.datatype }?, + attribute dy { Lengths.datatype }?, + attribute textLength { Length.datatype }?, + attribute lengthAdjust { "spacing" | "spacingAndGlyphs" }? + a:documentation [ + "\x{a}" ~ + " tspan: Text Span Element\x{a}" ~ + " " + ] + SVG.tspan.content = + (text + | tspan + | tref + | altGlyph + | animate + | set + | animateColor + | SVG.Description.class + | SVG.Hyperlink.class)* + tspan = element tspan { attlist.tspan, SVG.tspan.content } + attlist.tspan &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.TextContent.attrib, + SVG.Font.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.External.attrib, + attribute x { Coordinates.datatype }?, + attribute y { Coordinates.datatype }?, + attribute dx { Lengths.datatype }?, + attribute dy { Lengths.datatype }?, + attribute rotate { Numbers.datatype }?, + attribute textLength { Length.datatype }?, + attribute lengthAdjust { "spacing" | "spacingAndGlyphs" }? + a:documentation [ + "\x{a}" ~ + " tref: Text Reference Element\x{a}" ~ + " " + ] + SVG.tref.content = + (animate | set | animateColor | SVG.Description.class)* + tref = element tref { attlist.tref, SVG.tref.content } + attlist.tref &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.TextContent.attrib, + SVG.Font.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.XLinkRequired.attrib, + SVG.External.attrib, + attribute x { Coordinates.datatype }?, + attribute y { Coordinates.datatype }?, + attribute dx { Lengths.datatype }?, + attribute dy { Lengths.datatype }?, + attribute rotate { Numbers.datatype }?, + attribute textLength { Length.datatype }?, + attribute lengthAdjust { "spacing" | "spacingAndGlyphs" }? + a:documentation [ + "\x{a}" ~ + " textPath: Text Path Element\x{a}" ~ + " " + ] + SVG.textPath.content = + (text + | tspan + | tref + | altGlyph + | animate + | set + | animateColor + | SVG.Description.class + | SVG.Hyperlink.class)* + textPath = element textPath { attlist.textPath, SVG.textPath.content } + attlist.textPath &= + SVG.Core.attrib, + SVG.Conditional.attrib, + SVG.Style.attrib, + SVG.TextContent.attrib, + SVG.Font.attrib, + SVG.Paint.attrib, + SVG.Color.attrib, + SVG.Opacity.attrib, + SVG.Graphics.attrib, + SVG.Clip.attrib, + SVG.Mask.attrib, + SVG.Filter.attrib, + SVG.GraphicalEvents.attrib, + SVG.Cursor.attrib, + SVG.XLinkRequired.attrib, + SVG.External.attrib, + attribute startOffset { Length.datatype }?, + attribute textLength { Length.datatype }?, + attribute lengthAdjust { "spacing" | "spacingAndGlyphs" }?, + attribute method { "align" | "stretch" }?, + attribute spacing { "auto" | "exact" }? + a:documentation [ + "\x{a}" ~ + " altGlyph: Alternate Glyph Element\x{a}" ~ + " " + ] + attlist.altGlyph &= + SVG.TextContent.attrib, + attribute x { Coordinates.datatype }?, + attribute y { Coordinates.datatype }?, + attribute dx { Lengths.datatype }?, + attribute dy { Lengths.datatype }?, + attribute rotate { Numbers.datatype }? + a:documentation [ + "\x{a}" ~ + " altGlyphDef: Alternate Glyph Definition Element\x{a}" ~ + " " + ] + SVG.altGlyphDef.content |= altGlyphItem+ + a:documentation [ + "\x{a}" ~ + " altGlyphItem: Alternate Glyph Item Element\x{a}" ~ + " " + ] + SVG.altGlyphItem.content = glyphRef+ + altGlyphItem = + element altGlyphItem { + attlist.altGlyphItem, SVG.altGlyphItem.content + } + attlist.altGlyphItem &= SVG.Core.attrib + a:documentation [ + "\x{a}" ~ + " glyphRef: Glyph Reference Element\x{a}" ~ + " " + ] + attlist.glyphRef &= + attribute x { Number.datatype }?, + attribute y { Number.datatype }?, + attribute dx { Number.datatype }?, + attribute dy { Number.datatype }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-view.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-view.rnc new file mode 100644 index 00000000000..41501c31f92 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-view.rnc @@ -0,0 +1,42 @@ +default namespace = "http://www.w3.org/2000/svg" +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 View Module +## file: svg-view.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-view.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## View +## +## view +## +## This module declares markup to provide support for view. +## + +## +## SVG.View.class +## +[ xml:lang = "en" ] +grammar { + SVG.View.extra.class = notAllowed + SVG.View.class |= view | SVG.View.extra.class + a:documentation [ "\x{a}" ~ " view: View Element\x{a}" ~ " " ] + SVG.view.content = SVG.Description.class* + view = element view { attlist.view, SVG.view.content } + attlist.view &= + SVG.Core.attrib, + SVG.External.attrib, + attribute viewBox { ViewBoxSpec.datatype }?, + [ a:defaultValue = "xMidYMid meet" ] + attribute preserveAspectRatio { PreserveAspectRatioSpec.datatype }?, + [ a:defaultValue = "magnify" ] + attribute zoomAndPan { "disable" | "magnify" }?, + attribute viewTarget { text }? +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-viewport-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-viewport-attrib.rnc new file mode 100644 index 00000000000..d7acd96d7c5 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-viewport-attrib.rnc @@ -0,0 +1,36 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" + + +## +## SVG 1.1 Viewport Attribute Module +## file: svg-viewport-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-viewport-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## Viewport Attribute +## +## clip, overflow +## +## This module defines the Viewport attribute set. +## +[ xml:lang = "en" ] +grammar { + + ## + ## 'clip' property/attribute value (e.g., 'auto', rect(...)) + ## + ClipValue.datatype = xsd:string + SVG.clip.attrib = attribute clip { ClipValue.datatype }? + SVG.overflow.attrib = + attribute overflow { + "visible" | "hidden" | "scroll" | "auto" | "inherit" + }? + SVG.Viewport.extra.attrib = empty + SVG.Viewport.attrib &= + SVG.clip.attrib, SVG.overflow.attrib, SVG.Viewport.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-xlink-attrib.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-xlink-attrib.rnc new file mode 100644 index 00000000000..c31505e04d2 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg-xlink-attrib.rnc @@ -0,0 +1,67 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" +namespace xlink = "http://www.w3.org/1999/xlink" + + +## +## SVG 1.1 XLink Attribute Module +## file: svg-xlink-attrib.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. +## +## $Id: svg-xlink-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## + +## +## XLink Attribute +## +## type, href, role, arcrole, title, show, actuate +## +## This module defines the XLink, XLinkRequired, XLinkEmbed, and +## XLinkReplace attribute set. +## +[ xml:lang = "en" ] +grammar { + SVG.XLink.extra.attrib = empty + SVG.XLink.attrib &= + [ a:defaultValue = "simple" ] attribute xlink:type { "simple" }?, + attribute xlink:href { URI.datatype }?, + attribute xlink:role { URI.datatype }?, + attribute xlink:arcrole { URI.datatype }?, + attribute xlink:title { text }?, + [ a:defaultValue = "other" ] attribute xlink:show { "other" }?, + [ a:defaultValue = "onLoad" ] attribute xlink:actuate { "onLoad" }?, + SVG.XLink.extra.attrib + SVG.XLinkRequired.extra.attrib = empty + SVG.XLinkRequired.attrib &= + [ a:defaultValue = "simple" ] attribute xlink:type { "simple" }?, + attribute xlink:href { URI.datatype }, + attribute xlink:role { URI.datatype }?, + attribute xlink:arcrole { URI.datatype }?, + attribute xlink:title { text }?, + [ a:defaultValue = "other" ] attribute xlink:show { "other" }?, + [ a:defaultValue = "onLoad" ] attribute xlink:actuate { "onLoad" }?, + SVG.XLinkRequired.extra.attrib + SVG.XLinkEmbed.extra.attrib = empty + SVG.XLinkEmbed.attrib &= + [ a:defaultValue = "simple" ] attribute xlink:type { "simple" }?, + attribute xlink:href { URI.datatype }, + attribute xlink:role { URI.datatype }?, + attribute xlink:arcrole { URI.datatype }?, + attribute xlink:title { text }?, + [ a:defaultValue = "embed" ] attribute xlink:show { "embed" }?, + [ a:defaultValue = "onLoad" ] attribute xlink:actuate { "onLoad" }?, + SVG.XLinkEmbed.extra.attrib + SVG.XLinkReplace.extra.attrib = empty + SVG.XLinkReplace.attrib &= + [ a:defaultValue = "simple" ] attribute xlink:type { "simple" }?, + attribute xlink:href { URI.datatype }, + attribute xlink:role { URI.datatype }?, + attribute xlink:arcrole { URI.datatype }?, + attribute xlink:title { text }?, + [ a:defaultValue = "replace" ] + attribute xlink:show { "new" | "replace" }?, + [ a:defaultValue = "onRequest" ] + attribute xlink:actuate { "onRequest" }?, + SVG.XLinkReplace.extra.attrib +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg11-basic.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg11-basic.rnc new file mode 100644 index 00000000000..846970b1357 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg11-basic.rnc @@ -0,0 +1,183 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" +namespace ns1 = "http://www.w3.org/2000/svg" +namespace xlink = "http://www.w3.org/1999/xlink" + + +## +## RELAX NG schema for SVG 1.1 Basic +## file: svg11-basic.rng +## +## This is SVG Basic, a proper subset of SVG. +## +## The Scalable Vector Graphics (SVG) +## Copyright 2001, 2002 World Wide Web Consortium +## (Massachusetts Institute of Technology, Institut National de +## Recherche en Informatique et en Automatique, Keio University). +## All Rights Reserved. +## +## Permission to use, copy, modify and distribute this RELAX NG schema +## for SVG and its accompanying documentation for any purpose and without +## fee is hereby granted in perpetuity, provided that the above copyright +## notice and this paragraph appear in all copies. The copyright holders +## nor the author make no representation about the suitability of this +## RELAX NG schema for any purpose. +## +## It is provided "as is" without expressed or implied warranty. +## +## Author: Masayasu Ishikawa (mimasa@w3.org) +## $Id: svg11-basic.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## +## This is the driver file for version 1.1 of the SVG Basic RELAX NG schema. +## +## The DTD version is identified by the PUBLIC and SYSTEM identifiers: +## +## PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" +## SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd" +## +## Use this URI to identify the default namespace: +## +## "http://www.w3.org/2000/svg" +## +[ xml:lang = "en" ] +grammar { + + ## + ## Viewport Attribute Module + ## + include "svg-viewport-attrib.rnc" inherit = ns1 + + ## + ## Paint Attribute Module + ## + include "svg-paint-attrib.rnc" inherit = ns1 + + ## + ## Opacity Attribute Module + ## + include "svg-opacity-attrib.rnc" inherit = ns1 + + ## + ## Graphics Attribute Module + ## + include "svg-graphics-attrib.rnc" inherit = ns1 + + ## + ## Document Events Attribute Module + ## + include "svg-docevents-attrib.rnc" inherit = ns1 + + ## + ## Graphical Element Events Attribute Module + ## + include "svg-graphevents-attrib.rnc" inherit = ns1 + + ## + ## Animation Events Attribute Module + ## + include "svg-animevents-attrib.rnc" inherit = ns1 + + ## + ## XLink Attribute Module + ## + include "svg-xlink-attrib.rnc" inherit = ns1 + + ## + ## External Resources Attribute Module + ## + include "svg-extresources-attrib.rnc" inherit = ns1 + + ## + ## Structure Module (required) + ## + include "svg-structure.rnc" inherit = ns1 + + ## + ## Conditional Processing Module + ## + include "svg-conditional.rnc" inherit = ns1 + + ## + ## Image Module + ## + include "svg-image.rnc" inherit = ns1 + + ## + ## Style Module + ## + include "svg-style.rnc" inherit = ns1 + + ## + ## Shape Module + ## + include "svg-shape.rnc" inherit = ns1 + + ## + ## Text Module + ## + include "svg-text.rnc" inherit = ns1 + + ## + ## Color Profile Module + ## + include "svg-profile.rnc" inherit = ns1 + + ## + ## Gradient Module + ## + include "svg-gradient.rnc" inherit = ns1 + + ## + ## Pattern Module + ## + include "svg-pattern.rnc" inherit = ns1 + + ## + ## Basic Clip Module + ## + include "svg-basic-clip.rnc" inherit = ns1 + + ## + ## Mask Module + ## + include "svg-mask.rnc" inherit = ns1 + + ## + ## Basic Filter Module + ## + include "svg-basic-filter.rnc" inherit = ns1 + + ## + ## Cursor Module + ## + include "svg-cursor.rnc" inherit = ns1 + + ## + ## Hyperlinking Module + ## + include "svg-hyperlink.rnc" inherit = ns1 + + ## + ## View Module + ## + include "svg-view.rnc" inherit = ns1 + + ## + ## Scripting Module + ## + include "svg-script.rnc" inherit = ns1 + + ## + ## Animation Module + ## + include "svg-animation.rnc" inherit = ns1 + + ## + ## Font Module + ## + include "svg-font.rnc" inherit = ns1 + + ## + ## Extensibility Module + ## + include "svg-extensibility.rnc" inherit = ns1 +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg11-tiny.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg11-tiny.rnc new file mode 100644 index 00000000000..40ff52469a1 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg11-tiny.rnc @@ -0,0 +1,138 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" +namespace ns1 = "http://www.w3.org/2000/svg" +namespace xlink = "http://www.w3.org/1999/xlink" + + +## +## RELAX NG schema for SVG 1.1 Tiny +## file: svg11-tiny.rng +## +## This is SVG Tiny, a proper subset of SVG. +## +## The Scalable Vector Graphics (SVG) +## Copyright 2001, 2002 World Wide Web Consortium +## (Massachusetts Institute of Technology, Institut National de +## Recherche en Informatique et en Automatique, Keio University). +## All Rights Reserved. +## +## Permission to use, copy, modify and distribute this RELAX NG schema +## for SVG and its accompanying documentation for any purpose and without +## fee is hereby granted in perpetuity, provided that the above copyright +## notice and this paragraph appear in all copies. The copyright holders +## nor the author make no representation about the suitability of this +## RELAX NG schema for any purpose. +## +## It is provided "as is" without expressed or implied warranty. +## +## Author: Masayasu Ishikawa (mimasa@w3.org) +## $Id: svg11-tiny.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## +## This is the driver file for version 1.1 of the SVG Tiny RELAX NG schema. +## +## The DTD version is identified by the PUBLIC and SYSTEM identifiers: +## +## PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" +## SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd" +## +## Use this URI to identify the default namespace: +## +## "http://www.w3.org/2000/svg" +## +[ xml:lang = "en" ] +grammar { + + ## + ## Paint Attribute Module + ## + include "svg-paint-attrib.rnc" inherit = ns1 + + ## + ## Basic Graphics Attribute Module + ## + include "svg-basic-graphics-attrib.rnc" inherit = ns1 + + ## + ## Document Events Attribute Module + ## + include "svg-docevents-attrib.rnc" inherit = ns1 + + ## + ## Graphical Element Events Attribute Module + ## + include "svg-graphevents-attrib.rnc" inherit = ns1 + + ## + ## Animation Events Attribute Module + ## + include "svg-animevents-attrib.rnc" inherit = ns1 + + ## + ## XLink Attribute Module + ## + include "svg-xlink-attrib.rnc" inherit = ns1 + + ## + ## External Resources Attribute Module + ## + include "svg-extresources-attrib.rnc" inherit = ns1 + + ## + ## Basic Structure Module (required) + ## + include "svg-basic-structure.rnc" inherit = ns1 + + ## + ## Conditional Processing Module + ## + include "svg-conditional.rnc" inherit = ns1 + + ## + ## Image Module + ## + include "svg-image.rnc" inherit = ns1 + + ## + ## Style Module + ## + include "svg-style.rnc" inherit = ns1 + + ## + ## Shape Module + ## + include "svg-shape.rnc" inherit = ns1 + + ## + ## Basic Text Module + ## + include "svg-basic-text.rnc" inherit = ns1 + + ## + ## Hyperlinking Module + ## + include "svg-hyperlink.rnc" inherit = ns1 + + ## + ## View Module + ## + include "svg-view.rnc" inherit = ns1 + + ## + ## Scripting Module + ## + include "svg-script.rnc" inherit = ns1 + + ## + ## Animation Module + ## + include "svg-animation.rnc" inherit = ns1 + + ## + ## Basic Font Module + ## + include "svg-basic-font.rnc" inherit = ns1 + + ## + ## Extensibility Module + ## + include "svg-extensibility.rnc" inherit = ns1 +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg11.rnc b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg11.rnc new file mode 100644 index 00000000000..4e3f3b4366a --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rnc/svg/svg11.rnc @@ -0,0 +1,193 @@ +namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" +namespace ns1 = "http://www.w3.org/2000/svg" +namespace xlink = "http://www.w3.org/1999/xlink" + + +## +## RELAX NG schema for SVG 1.1 +## file: svg11.rng +## +## This is SVG, a language for describing two-dimensional graphics in XML. +## +## The Scalable Vector Graphics (SVG) +## Copyright 2001, 2002 World Wide Web Consortium +## (Massachusetts Institute of Technology, Institut National de +## Recherche en Informatique et en Automatique, Keio University). +## All Rights Reserved. +## +## Permission to use, copy, modify and distribute this RELAX NG schema +## for SVG and its accompanying documentation for any purpose and without +## fee is hereby granted in perpetuity, provided that the above copyright +## notice and this paragraph appear in all copies. The copyright holders +## nor the author make no representation about the suitability of this +## RELAX NG schema for any purpose. +## +## It is provided "as is" without expressed or implied warranty. +## +## Author: Masayasu Ishikawa (mimasa@w3.org) +## $Id: svg11.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ +## +## This is the driver file for version 1.1 of the SVG RELAX NG schema. +## +## The DTD version is identified by the PUBLIC and SYSTEM identifiers: +## +## PUBLIC "-//W3C//DTD SVG 1.1//EN" +## SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" +## +## Use this URI to identify the default namespace: +## +## "http://www.w3.org/2000/svg" +## +[ xml:lang = "en" ] +grammar { + + ## + ## Container Attribute Module + ## + include "svg-container-attrib.rnc" inherit = ns1 + + ## + ## Viewport Attribute Module + ## + include "svg-viewport-attrib.rnc" inherit = ns1 + + ## + ## Paint Attribute Module + ## + include "svg-paint-attrib.rnc" inherit = ns1 + + ## + ## Paint Opacity Attribute Module + ## + include "svg-opacity-attrib.rnc" inherit = ns1 + + ## + ## Graphics Attribute Module + ## + include "svg-graphics-attrib.rnc" inherit = ns1 + + ## + ## Document Events Attribute Module + ## + include "svg-docevents-attrib.rnc" inherit = ns1 + + ## + ## Graphical Element Events Attribute Module + ## + include "svg-graphevents-attrib.rnc" inherit = ns1 + + ## + ## Animation Events Attribute Module + ## + include "svg-animevents-attrib.rnc" inherit = ns1 + + ## + ## XLink Attribute Module + ## + include "svg-xlink-attrib.rnc" inherit = ns1 + + ## + ## External Resources Attribute Module + ## + include "svg-extresources-attrib.rnc" inherit = ns1 + + ## + ## Structure Module (required) + ## + include "svg-structure.rnc" inherit = ns1 + + ## + ## Conditional Processing Module + ## + include "svg-conditional.rnc" inherit = ns1 + + ## + ## Image Module + ## + include "svg-image.rnc" inherit = ns1 + + ## + ## Style Module + ## + include "svg-style.rnc" inherit = ns1 + + ## + ## Shape Module + ## + include "svg-shape.rnc" inherit = ns1 + + ## + ## Text Module + ## + include "svg-text.rnc" inherit = ns1 + + ## + ## Marker Module + ## + include "svg-marker.rnc" inherit = ns1 + + ## + ## Color Profile Module + ## + include "svg-profile.rnc" inherit = ns1 + + ## + ## Gradient Module + ## + Include "svg-gradient.rnc" inherit = ns1 + + ## + ## Pattern Module + ## + include "svg-pattern.rnc" inherit = ns1 + + ## + ## Clip Module + ## + include "svg-clip.rnc" inherit = ns1 + + ## + ## Mask Module + ## + include "svg-mask.rnc" inherit = ns1 + + ## + ## Filter Module + ## + include "svg-filter.rnc" inherit = ns1 + + ## + ## Cursor Module + ## + include "svg-cursor.rnc" inherit = ns1 + + ## + ## Hyperlinking Module + ## + include "svg-hyperlink.rnc" inherit = ns1 + + ## + ## View Module + ## + include "svg-view.rnc" inherit = ns1 + + ## + ## Scripting Module + ## + include "svg-script.rnc" inherit = ns1 + + ## + ## Animation Module + ## + include "svg-animation.rnc" inherit = ns1 + + ## + ## Font Module + ## + include "svg-font.rnc" inherit = ns1 + + ## + ## Extensibility Module + ## + include "svg-extensibility.rnc" inherit = ns1 +} diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-bib.rng b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-bib.rng new file mode 100644 index 00000000000..b44216f22d0 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-bib.rng @@ -0,0 +1,900 @@ + + + + + + + + A list of bibliographic \elementref{bibentry} or \elementref{bibitem}. + + + + + + + + Attributes for \elementref{biblist}. + + + + Content model for \elementref{biblist}. + + + + + + + + + + + + + A formatted bibliographic item, typically as written explicit +in a LaTeX article. This has generally lost most of the semantics +present in the BibTeX data. + + + + + + + + Attributes for \elementref{bibitem}. + + + + + + The unique key for this object; this key is referenced by the +\attr{bibrefs} attribute of \elementref{bibref}. + + + + + + Content model for \elementref{bibitem}. + + + + + + + + + + + Various formatted tags for bibliographic items. +Typically @role refnum is shown in the displayed bibliography, +as the beginning of the item. Other roles +(eg. number, authors, fullauthors, year, title) record formatted +info to be used for filling in citations (\elementref{bibref}). + + + + + + + + Attributes for \elementref{bibtag}. + + + + + number + authors + fullauthors + key + year + bibtype + title + + + + + + + A delimiter for formatting the refnum in the bibliography + + + + + A delimiter for formatting the refnum in the bibliography + + + + + + Content model for \elementref{bibtag}. + + + + + + A block of data appearing within a \elementref{bibitem}. + + + + + + + + Attributes for \elementref{bibblock}. + + + + Content model for \elementref{bibblock}. + + + + + + + Semantic representation of a bibliography entry, +typically resulting from parsing BibTeX + + + + + + + + + article + book + booklet + conference + inbook + incollection + inproceedings + manual + mastersthesis + misc + phdthesis + proceedings + techreport + unpublished + report + thesis + website + software + periodical + collection + collection.article + proceedings.article + + + + + Attributes for \elementref{bibentry}. + + + + + The unique key for this object; this key is referenced by the +\attr{bibrefs} attribute of \elementref{bibref}. + + + The type of the referenced object. The values are a superset of +those types recognized by BibTeX, but is also open-ended for extensibility. + + + + + + Content model for \elementref{bibentry}. + + + + + + + Name of some participant in creating a bibliographic entry. + + + + + + + + Attributes for \elementref{bib-name}. + + + + + The role that this participant played in creating the entry. + + author + editor + translator + + + + + + + + Content model for \elementref{bib-name}. + + + + The content model of the bibliographic name fields (\elementref{bib-name}) + + + + + + + + + + + + + + Surname of a participant (\elementref{bib-name}). + + + + + + + + Attributes for \elementref{surname}. + + + + Content model for \elementref{surname}. + + + + + + Given name of a participant (\elementref{bib-name}). + + + + + + + + Attributes for \elementref{givenname}. + + + + Content model for \elementref{givenname}. + + + + + + Lineage of a participant (\elementref{bib-name}), eg. Jr. or similar. + + + + + + + + Attributes for \elementref{lineage}. + + + + Content model for \elementref{lineage}. + + + + + + + Title of a bibliographic entry. + + + + + + + + Attributes for \elementref{bib-title}. + + + + Content model for \elementref{bib-title}. + + + + + + Subtitle of a bibliographic entry. + + + + + + + + Attributes for \elementref{bib-subtitle}. + + + + Content model for \elementref{bib-subtitle}. + + + + + + Unique key of a bibliographic entry. + + + + + + + + Attributes for \elementref{bib-key}. + + + + Content model for \elementref{bib-key}. + + + + + + Type of a bibliographic entry. + + + + + + + + Attributes for \elementref{bib-type}. + + + + Content model for \elementref{bib-type}. + + + + + + Date of a bibliographic entry. + + + + + + + + Attributes for \elementref{bib-date}. + + + + + characterizes what happened on the given date + + publication + copyright + + + + + + + + Content model for \elementref{bib-date}. + + + + + + Publisher of a bibliographic entry. + + + + + + + + Attributes for \elementref{bib-publisher}. + + + + Content model for \elementref{bib-publisher}. + + + + + + Organization responsible for a bibliographic entry. + + + + + + + + Attributes for \elementref{bib-organization}. + + + + Content model for \elementref{bib-organization}. + + + + + + Location of publisher or event + + + + + + + + Attributes for \elementref{bib-place}. + + + + Content model for \elementref{bib-place}. + + + + + + A Related bibliographic object, such as the book or journal +that the current item is related to. + + + + + + + + Attributes for \elementref{bib-related}. + + + + + The type of this related entry. + + + + + + How this object relates to the containing object. +Particularly important is \attrval{host} which indicates that +the outer object is a part of this object. + + host + event + original + + + + + + + If the bibrefs attribute is given, it is the key of another object in the bibliography, +and this element should be empty; otherwise the object should be described by +the content of the element. + + + + + + Content model for \elementref{bib-related}. + + + + + + Describes how the current object is related to a related (\elementref{bib-related}) +object, in particular page, part, volume numbers and similar. + + + + + + + + Attributes for \elementref{bib-part}. + + + + + indicates how the value partitions the containing object. + + pages + part + volume + issue + number + chapter + section + paragraph + + + + + + + + Content model for \elementref{bib-part}. + + + + + + Edition of a bibliographic entry. + + + + + + + + Attributes for \elementref{bib-edition}. + + + + Content model for \elementref{bib-edition}. + + + + + + Status of a bibliographic entry. + + + + + + + + Attributes for \elementref{bib-status}. + + + + Content model for \elementref{bib-status}. + + + + + + Some form of document identfier. The content is descriptive. + + + + + + + + Attributes for \elementref{bib-identifier}. + + + + + indicates what sort of identifier it is; it is open-ended for extensibility. + + doi + issn + isbn + mr + + + + + + + the identifier. + + + + + a url to the document, if available + + + + + + Content model for \elementref{bib-identifier}. + + + + + + Review of a bibliographic entry. The content is descriptive. + + + + + + + + Attributes for \elementref{bib-review}. + + + + + indicates what sort of identifier it is; it is open-ended for extensibility. + + doi + issn + isbn + mr + + + + + + + the identifier. + + + + + a url to the review, if available + + + + + + Content model for \elementref{bib-review}. + + + + + + Links to other things like preprints, source code, etc. + + + + + + + + Attributes for \elementref{bib-links}. + + + + Content model for \elementref{bib-links}. + + + + + + Language of a bibliographic entry. + + + + + + + + Attributes for \elementref{bib-language}. + + + + Content model for \elementref{bib-language}. + + + + + + A URL for a bibliographic entry. The content is descriptive + + + + + + + + Attributes for \elementref{bib-url}. + + + + + + + + + Content model for \elementref{bib-url}. + + + + + + An extract from the referenced object. + + + + + + + + Attributes for \elementref{bib-extract}. + + + + + Classify what kind of extract + + keywords + abstract + contents + + + + + + + + Content model for \elementref{bib-extract}. + + + + + + Notes about a bibliographic entry. + + + + + + + + Attributes for \elementref{bib-note}. + + + + + Classify the kind of note + + annotation + publication + + + + + + + + Content model for \elementref{bib-note}. + + + + + + Random data, not necessarily even text. +(future questions: should model be text or ANY? maybe should have encoding attribute?). + + + + + + + + Attributes for \elementref{bib-data}. + + + + + Classify the relationship of the data to the entry. + + + + + Classify the type of the data. + + + + + + Content model for \elementref{bib-data}. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-block.rng b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-block.rng new file mode 100644 index 00000000000..bb3b97ed755 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-block.rng @@ -0,0 +1,589 @@ + + + + + The block module defines the following `physical' block elements. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Additionally, it defines these miscellaneous elements that can appear +in both inline and block contexts. + + + + + + + + + + + + + + + + + + + + Additional Metadata that can be present in equations. + + + + + + A physical paragraph. + + + + + + + + Attributes for \elementref{p}. + + + + + + + + Content model for \elementref{p}. + + + + + + A constraint upon an equation. + + + + + + + + Attributes for \elementref{constraint}. + + + + + + + + Content model for \elementref{constraint}. + + + + + + An Equation. The model is just Inline which includes \elementref{Math}, +the main expected ingredient. +However, other things can end up in display math, too, so we use Inline. +Note that tabular is here only because it's a common, if misguided, idiom; +the processor will lift such elements out of math, when possible + + + + + + + + Attributes for \elementref{equation}. + + + + + + + Content model for \elementref{equation}. + + + + + + + + + + + + + + + + + + + + + A group of equations, perhaps aligned (Though this is nowhere recorded). + + + + + + + + Attributes for \elementref{equationgroup}. + + + + + + + Content model for \elementref{equationgroup}. + + + + + + + + + + + + + + + + + + A wrapper for Math that provides alternative, +but typically less semantically meaningful, +formatted representations. +The first child is the meaningful form, +the extra children provide formatted forms, +for example being table rows or cells arising from an eqnarray. + + + + + + + + Attributes for \elementref{MathFork}. + + + + Content model for \elementref{MathFork}. + + + + + + + + + A container for an alternatively formatted math representation. + + + + + + + + Attributes for \elementref{MathBranch}. + + + + + + + + + Content model for \elementref{MathBranch}. + + + + + + + + + + + + + + + + A quotation. + + + + + + + + Attributes for \elementref{quote}. + + + + + + + Content model for \elementref{quote}. + + + + + + + A generic block (fallback). + + + + + + + + Attributes for \elementref{block}. + + + + + + + + Content model for \elementref{block}. + + + + + + An in-block Listing, without caption + + + + + + + + Attributes for \elementref{listingblock}. + + + + + + + Content model for \elementref{listingblock}. + + + + + + + + A forced line break. + + + + + + + + Attributes for \elementref{break}. + + + + Content model for \elementref{break}. + + + + + + An inline block. Actually, can appear in inline or block mode, but +typesets its contents as a block. + + + + + + + + Attributes for \elementref{inline-block}. + + + + + + + + Content model for \elementref{inline-block}. + + + + + + Verbatim content + + + + + + + + Attributes for \elementref{verbatim}. + + + + + + the font to use; generally typewriter. + + + + + Indicates the text size to use. (See \elementref{text}) + + Huge + huge + LARGE + Large + large + normal + small + footnote + tiny + + + + + + + the color to use; any CSS compatible color specification. + + + + + + Content model for \elementref{verbatim}. + + + + + + An itemized list. + + + + + + + + Attributes for \elementref{itemize}. + + + + + + + Content model for \elementref{itemize}. + + + + + + + + An enumerated list. + + + + + + + + Attributes for \elementref{enumerate}. + + + + + + + Content model for \elementref{enumerate}. + + + + + + + + A description list. The \elementref{item}s within are expected to have a \elementref{tag} +which represents the term being described in each \elementref{item}. + + + + + + + + Attributes for \elementref{description}. + + + + + + + Content model for \elementref{description}. + + + + + + + + An item within a list. + + + + + + + + Attributes for \elementref{item}. + + + + + + + Content model for \elementref{item}. + + + + + + + + + + + A tag within an item indicating the term or bullet for a given item. + + + + + + + + Attributes for \elementref{tag}. + + + + + specifies an open delimiters used to display the tag. + + + + + specifies an close delimiters used to display the tag. + + + + + + Content model for \elementref{tag}. + + + + + + A graphical insertion of an external file. + + + + + + + + Attributes for \elementref{graphics}. + + + + + + + the path to the graphics file. This is the (often minimally specified) path +to a graphics file omitting the type extension. Once resolved to a specific +image file, the \attr{imagesrc} (from Imageable.attributes) is used. + + + + + a comma separated list of candidate graphics files that could be used to +for \attr{graphic}. A post-processor or application may choose from these, +or may make its own selection or synthesis to implement the graphic for a given target. + + + + + an encoding of the scaling and positioning options +to be used in processing the graphic. + + + + + + Content model for \elementref{graphics}. + + + + + + An SVG (Scalable Vector Graphics) object +[eventually must adapt to put LaTeXML objects in foreignObject] + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-common.rng b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-common.rng new file mode 100644 index 00000000000..a46741628a9 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-common.rng @@ -0,0 +1,235 @@ + + + + + + All strictly inline elements. + + + + All `physical' block elements. +A physical block is typically displayed as a block, but +may not constitute a complete logical unit. + + + + Additional miscellaneous elements that can appear in +both inline and block contexts. + + + + All logical block level elements. +A logical block typically contains one or more physical block elements. +For example, a common situation might be \elementref{p},\elementref{equation},\elementref{p}, +where the entire sequence comprises a single sentence. + + + + All metadata elements, typically representing hidden data. + + + + + The type for attributes specifying a length. +Should be a number followed by a length, typically px. +NOTE: To be narrowed later. + + + + The type for attributes specifying a color. +NOTE: To be narrowed later. + + + + + Attributes shared by ALL elements. + + + + a space separated list of tokens, as in CSS. +The \attr{class} can be used to add differentiate different instances of elements +without introducing new element declarations. +However, this generally shouldn't be used for deep semantic distinctions. +This attribute is carried over to HTML and can be used for CSS selection. +[Note that the default XSLT stylesheets for html and xhtml +add the latexml element names to the class of html elements +for more convenience in using CSS.] + + + + + + Attributes for elements that can be cross-referenced +from inside or outside the document. + + + the unique identifier of the element, +usually generated automatically by the latexml. + + + + + + Attributes for elements that can cross-reference other elements. + + + the identifier of the referred-to element. + + + + + + Attributes for elements that can be labelled from within LaTeX. +These attributes deal with assigning a label and generating cross references. + + + + + Records the various labels that LaTeX uses for crossreferencing. +(note that \cs{label} can associate more than one label with an object!) +It consists of space separated labels for the element. +The \cs{label} macro provides the label prefixed by \texttt{LABEL:}; +Spaces in a label are replaced by underscore. +Other mechanisms (like acro?) might use other prefixes (but \texttt{ID:} is reserved!) + + + + + the reference number (ie. section number, equation number, etc) of the object. + + + + + the formatted reference number of the object, typically this is the refnum with +the object type prepended, such as "Chapter 2" + + + + + + Attributes shared by low-level, generic inline and block elements +that can be sized or shifted. + + + + the desired width of the box + + + + + + the desired height of the box + + + + + + the desired depth of the box + + + + + + extra width beyond the boxes natural size. + + + + + + extra height beyond the boxes natural size. + + + + + + horizontal shift the position of the box. + + + + + + vertical shift the position of the box. + + + + + + alignment of material within the box. + + left + center + right + justified + + + + + + specifies which line of the box is aligned to the baseline of the containing object. + + top + middle + bottom + + + + + + the horizontal floating placement parameter that determines where the object is displayed. + + right + left + + + + + + + + Attributes for elements that may be converted to image form +during postprocessing, such as math, graphics, pictures, etc. + + + + the file, possibly generated from other data. + + + + + + the width in pixels of \attr{imagesrc}. + + + + + + the height in pixels of \attr{imagesrc}. + + + + + + a description of the image + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-inline.rng b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-inline.rng new file mode 100644 index 00000000000..01cb51dcae1 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-inline.rng @@ -0,0 +1,514 @@ + + + + + The inline module defines basic inline elements used throughout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Additionally, it defines these meta elements. These are generally hidden, +and can appear in inline and block contexts. + + + + + + + + + + + + + + + + General container for styled text. +Attributes cover a variety of styling and position shifting properties. + + + + + + + + Attributes for \elementref{text}. + + + + + + Indicates the font to use. It consists of a space separated sequence +of values representing the +family (\texttt{serif}, \texttt{sansserif}, \texttt{math}, \texttt{typewriter}, + \texttt{caligraphic}, \texttt{fraktur}, \texttt{script}, \ldots), +series (\texttt{medium}, \texttt{bold}, \ldots), +and shape (\texttt{upright}, \texttt{italic}, \texttt{slanted}, \texttt{smallcaps}, \ldots). +Only the values differing from the current context are given. +Each component is open-ended, for extensibility; it is thus unclear +whether unknown values specify family, series or shape. +In postprocessing, these values are carried to the \attr{class} attribute, +and can thus be effected by CSS. + + + + + Indicates the text size to use. The values are modeled after the +more abstract \LaTeX\ font size switches, rather than point-sizes. +The values are open-ended for extensibility; +In postprocessing, these values are carried to the \attr{class} attribute, +and can thus be effected by CSS. + + Huge + huge + LARGE + Large + large + normal + small + footnote + tiny + + + + + + + the color to use; any CSS compatible color specification. +In postprocessing, these values are carried to the \attr{class} attribute, +and can thus be effected by CSS. + + + + + the kind of frame or outline for the text. + + rectangle + underline + + + + + + + + Content model for \elementref{text}. + + + + + + Emphasized text. + + + + + + + + Attributes for \elementref{emph}. + + + + Content model for \elementref{emph}. + + + + + + Represents an acronym. + + + + + + + + Attributes for \elementref{acronym}. + + + + + should be used to indicate the expansion of the acronym. + + + + + + Content model for \elementref{acronym}. + + + + + + A Rule. + + + + + + + + Attributes for \elementref{rule}. + + + + + + + Content model for \elementref{rule}. + + + + + + A hyperlink reference to some other object. +When converted to HTML, the content would be the content of the anchor. +The destination can be specified by one of the +attributes \attr{labelref}, \attr{idref} or \attr{href}; +Missing fields will usually be filled in during postprocessing, +based on data extracted from the document(s). + + + + + + + + Attributes for \elementref{ref}. + + + + reference to an internal identifier. + + + + reference to a LaTeX labelled object; +See the \attr{labels} attribute of \patternref{Labelled.attributes}. + + + + + reference to an arbitrary url. + + + + + a pattern encoding how the text content should be filled in during +postprocessing, if it is empty. +It consists of the words + \texttt{type} (standing for the object type, eg. Ch.), + \texttt{refnum} and \texttt{title} +mixed with arbitrary characters. The +It can also be \texttt{fulltitle}, which indicates the title +with prefix and type if section numbering is enabled. + + + + + gives a longer form description of the target, +this would typically appear as a tooltip in HTML. +Typically filled in by postprocessor. + + + + + + Content model for \elementref{ref}. + + + + + + Inline anchor. + + + + + + + + Attributes for \elementref{anchor}. + + + + + + + Content model for \elementref{anchor}. + + + + + + A container for a bibliographic citation. The model is inline to +allow arbitrary comments before and after the expected \elementref{bibref}(s) +which are the specific citation. + + + + + + + + Attributes for \elementref{cite}. + + + + Content model for \elementref{cite}. + + + + + + A bibliographic citation refering to a specific bibliographic item. + + + + + + + + Attributes for \elementref{bibref}. + + + + + + a comma separated list of bibliographic keys. +(See the \attr{key} attribute of \elementref{bibitem} and \elementref{bibentry}) + + + + + a pattern encoding how the text content (of an empty bibref) will be filled in. +Consists of strings \texttt{author}, \texttt{fullauthor}, \texttt{year}, +\texttt{number} and \texttt{title} +(to be replaced by data from the bibliographic item) +mixed with arbitrary characters. + + + + + separator between formatted references + + + + + separator between formatted years when duplicate authors are combined. + + + + + + Content model for \elementref{bibref}. + + + + + + + + A preceding or following phrase used in composing a bibliographic reference, +such as listing pages or chapter. + + + + + + + + Attributes for \elementref{bibrefphrase} + + + + Content model for \elementref{bibrefphrase} + + + + + + Metadata that covers several `out of band' annotations. +It's content allows both inline and block-level content. + + + + + + + + Attributes for \elementref{note}. + + + + + indicates the desired visible marker to be linked to the note. + + + + + indicates the kind of note + + footnote + + + + + + + + Content model for \elementref{note}. + + + + + + + error object for undefined control sequences, or whatever + + + + + + + + Attributes for \elementref{ERROR}. + + + + Content model for \elementref{ERROR}. + + + + + + + + Metadata to record an indexing position. The content is +a sequence of \elementref{indexphrase}, each representing a level in +a multilevel indexing entry. + + + + + + + + Attributes for \elementref{indexmark}. + + + + + a flattened form (like \attr{key}) of another \elementref{indexmark}, +used to crossreference. + + + + + NOTE: describe this. + + + + + + Content model for \elementref{indexmark}. + + + + + + + + + + + A phrase within an \elementref{indexmark} + + + + + + + + Attributes for \elementref{indexphrase}. + + + + + a flattened form of the phrase for generating an \attr{ID}. + + + + + + Content model for \elementref{indexphrase}. + + + + + A see-also phrase within an \elementref{indexmark} + + + + + + + + Attributes for \elementref{indexsee}. + + + + + a flattened form of the phrase for generating an \attr{ID}. + + + + + a name for the see phrase, such as "see also". + + + + + + Content model for \elementref{indexsee}. + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-math.rng b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-math.rng new file mode 100644 index 00000000000..b88c8d11194 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-math.rng @@ -0,0 +1,613 @@ + + + + + The math module defines LaTeXML's internal representation of mathematical +content, including the basic math container \elementref{Math}. This element is +considered inline, as it will be contained within some other block-level +element, eg. \elementref{equation} for display-math. + + + + + + This class defines the content of the \elementref{Math} element. +Additionally, it could contain MathML or OpenMath, after postprocessing. + + + + These elements comprise the internal math representation, being +the content of the \elementref{XMath} element. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Outer container for all math. This holds the internal +\elementref{XMath} representation, as well as image data and other representations. + + + + + + + + Attributes for \elementref{Math}. + + + + + + + display or inline mode. + + display + inline + + + + + + reconstruction of the \TeX\ that generated the math. + + + + + more semantic version of \attr{tex}. + + + + + a textified representation of the math. + + + + + + Content model for \elementref{Math}. + + + + + + + + The role that this item plays in the Grammar. + + + + + an open delimiter to enclose the object; + + + + + an close delimiter to enclose the object; + + + + + an open delimiter to enclose the argument list, +when this token is applied to arguments with \elementref{XMApp}. + + + + + a close delimiter to enclose the argument list, +when this token is applied to arguments with \elementref{XMApp}. + + + + + characters to separate arguments, +when this token is applied to arguments with \elementref{XMApp}. +Can be multiple characters for different argument positions; +the last character is repeated if there aren't enough. + + + + + trailing (presumably non-semantic) punctuation. + + + + + an annotation placed by the parser when it suspects this token may be used as a function. + + + + + + + + Internal representation of mathematics. + + + + + + + + Attributes for \elementref{XMath}. + + + + Content model for \elementref{XMath}. + + + + + + General mathematical token. + + + + + + + + Attributes for \elementref{XMTok}. + + + + + + + The name of the token, typically the control sequence that created it. + + + + + A more semantic name corresponding to the intended meaning, +such as the OpenMath name. + + + + + The OpenMath CD for which \attr{meaning} is a symbol. + + + + + Various random styling information. NOTE This needs to be made consistent. + + + + + The font, size a used for the symbol. + + + + + The size for the symbol, not presumed to be meaningful(?) + + + + + The color (CSS format) for the symbol, not presumed to be meaningful(?) + + + + + An encoding of the position of this token as a sub/superscript, used +to handle aligned and nested scripts, both pre and post. +It is a concatenation of (pre|mid|post), which indicates the horizontal +positioning of the script with relation to it's base, and a counter +indicating the level. These are used to position the scripts, +and to pair up aligned sub- and superscripts. +NOTE: Clarify where this appears: token, base, script operator, apply? + + + + + NOTE: How is this used? + + + + + + Content model for \elementref{XMTok}. + + + + + + + + Generalized application of a function, operator, whatever (the first child) +to arguments (the remaining children). +The attributes are a subset of those for \elementref{XMTok}. + + + + + + + + Attributes for \elementref{XMApp}. + + + + + + + The name of the token, typically the control sequence that created it. + + + + + A more semantic name corresponding to the intended meaning, +such as the OpenMath name. + + + + + An encoding of the position of this token as a sub/superscript, used +to handle aligned and nested scripts, both pre and post. +(See \elementref{XMTok} for details) + + + + + + Content model for \elementref{XMApp}. + + + + + + Parallel markup of content (first child) and presentation (second child) +of a mathematical object. +Typically, the arguments are shared between the two branches: +they appear in the content branch, with \attr{id}'s, +and \elementref{XMRef} is used in the presentation branch + + + + + + + + Attributes for \elementref{XMDual}. + + + + + + + + Content model for \elementref{XMDual}. + + + + + + + Various spacing items, generally ignored in parsing. +The attributes are a subset of those for \elementref{XMTok}. + + + + + + + + Attributes for \elementref{XMHint}. + + + + + + + + + + + + + + + + + Content model for \elementref{XMHint}. + + + + + + Text appearing within math. + + + + + + + + Attributes for \elementref{XMText}. + + + + + + + An encoding of the position of this token as a sub/superscript, used +to handle aligned and nested scripts, both pre and post. +(See \elementref{XMTok} for details) + + + + + + Content model for \elementref{XMText}. + + + + + + + + + + Wrapper for a sequence of tokens used to assert the role of the +contents in its parent. This element generally disappears after parsing. +The attributes are a subset of those for \elementref{XMTok}. + + + + + + + + Attributes for \elementref{XMWrap}. + + + + + + + + + + A more semantic name corresponding to the intended meaning, +such as the OpenMath name. + + + + + + + + An encoding of the position of this token as a sub/superscript, used +to handle aligned and nested scripts, both pre and post. +(See \elementref{XMTok} for details) + + + + + + Content model for \elementref{XMWrap}. + + + + + + Wrapper for an argument to a structured macro. +It implies that its content can be parsed independently of its parent, +and thus generally disappears after parsing. + + + + + + + + Attributes for \elementref{XMArg}. + + + + + + + + + + An encoding of the position of this token as a sub/superscript, used +to handle aligned and nested scripts, both pre and post. +(See \elementref{XMTok} for details) + + + + + + Content model for \elementref{XMArg}. + + + + + + Structure sharing element typically used in the presentation +branch of an \elementref{XMDual} to refer to the arguments present in the content branch. + + + + + + + + Attributes for \elementref{XMRef}. + + + + + + + + + Content model for \elementref{XMRef}. + + + + + + + Math Array/Alignment structure. + + + + + + + + Attributes for \elementref{XMArray}. + + + + + + + + + + + + + + + + + top + bottom + + + + + + + + + + Content model for \elementref{XMArray}. + + + + + + + + A row in a math alignment. + + + + + + + + Attributes for \elementref{XMRow}. + + + + Content model for \elementref{XMRow}. + + + + + + + + A cell in a row of a math alignment. + + + + + + + + Attributes for \elementref{XMCell}. + + + + + indicates how many columns this cell spans or covers. + + + + + + indicates how many rows this cell spans or covers. + + + + + + + specifies the alignment of the content. + + + + + specifies the desired width for the column. + + + + + records a sequence of t or tt, r or rr, b or bb and l or ll +for borders or doubled borders on any side of the cell. + + + + + whether this cell corresponds to a table head or foot. + + + + + + + Content model for \elementref{XMCell}. + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-para.rng b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-para.rng new file mode 100644 index 00000000000..5b54f77ddfe --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-para.rng @@ -0,0 +1,370 @@ + + + + + This module defines the following `logical' block elements. + + + + + + + + + + + + + + + + + + + + + + + + + + Additionally, it defines these miscellaneous elements that can appear +in both inline and block contexts. + + + + + + + + A Logical paragraph. It has an \attr{id}, but not a \attr{label}. + + + + + + + + Attributes for \elementref{para}. + + + + + + + Content model for \elementref{para}. + + + + + + An inline para. Actually, can appear in inline or block mode, but +typesets its contents as para. + + + + + + + + Attributes for \elementref{inline-para}. + + + + + + + Content model for \elementref{inline-para}. + + + + + + A theorem or similar object. The \attr{class} attribute can be used to distinguish +different kinds of theorem. + + + + + + + + Attributes for \elementref{theorem}. + + + + + + + Content model for \elementref{theorem}. + + + + + + + + + + + A proof or similar object. The \attr{class} attribute can be used to distinguish +different kinds of proof. + + + + + + + + Attributes for \elementref{proof}. + + + + + + + Content model for \elementref{proof}. + + + + + + + + + + These are the additional elements representing figure and +table captions. +NOTE: Could title sensibly be reused here, instead? +Or, should caption be used for theorem and proof? + + + + + + + + + A figure, possibly captioned. + + + + + + + + Attributes for \elementref{figure}. + + + + + + + the vertical floating placement parameter that determines where the object is displayed. + + + + + + MiKo: only allowing one caption, is this right? same for table, float, and listing below +Content model for \elementref{figure}. + + + + + + + + + + + + A Table, possibly captioned. This is not necessarily a \elementref{tabular}. + + + + + + + + Attributes for \elementref{table}. + + + + + + + the vertical floating placement parameter that determines where the object is displayed. + + + + + + Content model for \elementref{table}. + + + + + + + + + + + + A generic float, possibly captioned, something other than a table, figure or listing + + + + + + + + Attributes for \elementref{float}. + + + + + + + the vertical floating placement parameter that determines where the object is displayed. + + + + + + Content model for \elementref{float}. + + + + + + + + + + + + A Listing, possibly captioned. + + + + + + + + Attributes for \elementref{listing}. + + + + + + + the floating placement parameter that determines where the object is displayed. + + + + + + Content model for \elementref{listing}. + + + + + + + + + A caption for a \elementref{table} or \elementref{figure}. + + + + + + + + Attributes for \elementref{caption}. + + + + + + + + Indicates the text size to use. (See \elementref{text}) + + Huge + huge + LARGE + Large + large + normal + small + footnote + tiny + + + + + + + the color to use; any CSS compatible color specification. + + + + + + Content model for \elementref{caption}, +basically Inline.model with tag included (normally, but not necessarily, tag would come first). + + + + + + + + + + + + + + A short form of \elementref{table} or \elementref{figure} caption, +used for lists of figures or similar. + + + + + + + + Attributes for \elementref{toccaption}. + + + + MiKo: here we allowed multiple tags, but now we can restrict, do we want that? +Content model for \elementref{toccaption}. + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-picture.rng b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-picture.rng new file mode 100644 index 00000000000..d5f5ea15dc3 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-picture.rng @@ -0,0 +1,594 @@ + + + + + + This module defines a picture environment, roughly a subset of SVG. +NOTE: Consider whether it is sensible to drop this and incorporate SVG itself. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + These attributes correspond roughly to SVG, but need documentation. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + These attributes correspond roughly to SVG, but need documentation. + + + + + + + + + + + + + rect + circle + oval + + + + + + + + + + + + + + + + + + + + + + + + + + + A picture environment. + + + + + + + + Attributes for \elementref{picture}. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Content model for \elementref{picture}. + + + + + + + + + + + A graphical grouping; the content is inherits by the transformations, +positioning and other properties. + + + + + + + + Attributes for \elementref{g}. + + + + + + + + Content model for \elementref{g}. + + + + + + + + + + + A rectangle within a \elementref{picture}. + + + + + + + + Attributes for \elementref{rect}. + + + + + + + Content model for \elementref{rect}. + + + + + + A line within a \elementref{picture}. + + + + + + + + Attributes for \elementref{line}. + + + + + + + Content model for \elementref{line}. + + + + + + A polygon within a \elementref{picture}. + + + + + + + + Attributes for \elementref{polygon}. + + + + + + + Content model for \elementref{polygon}. + + + + + + A wedge within a \elementref{picture}. + + + + + + + + Attributes for \elementref{wedge}. + + + + + + + Content model for \elementref{wedge}. + + + + + + An arc within a \elementref{picture}. + + + + + + + + Attributes for \elementref{arc}. + + + + + + + Content model for \elementref{arc}. + + + + + + A circle within a \elementref{picture}. + + + + + + + + Attributes for \elementref{circle}. + + + + + + + Content model for \elementref{circle}. + + + + + + An ellipse within a \elementref{picture}. + + + + + + + + Attributes for \elementref{ellipse}. + + + + + + + Content model for \elementref{ellipse}. + + + + + + A path within a \elementref{picture}. + + + + + + + + Attributes for \elementref{path}. + + + + + + + Content model for \elementref{path}. + + + + + + A bezier curve within a \elementref{picture}. + + + + + + + + Attributes for \elementref{bezier}. + + + + + + + Content model for \elementref{bezier}. + + + + + + A curve within a \elementref{picture}. + + + + + + + + Attributes for \elementref{curve}. + + + + + + + Content model for \elementref{curve}. + + + + + + A parabola curve within a \elementref{picture}. + + + + + + + + Attributes for \elementref{parabola}. + + + + + + + Content model for \elementref{parabola}. + + + + + + A sequence of dots (?) within a \elementref{picture}. + + + + + + + + Attributes for \elementref{dots}. + + + + + + + Content model for \elementref{dots}. + + + + + + A grid within a \elementref{picture}. + + + + + + + + Attributes for \elementref{grid}. + + + + + + + Content model for \elementref{grid}. + + + + + + Establishes a clipping region within a \elementref{picture}. + + + + + + + + Attributes for \elementref{clip}. + + + + + + + Content model for \elementref{clip}. + + + + + + + + Establishes a clipping region within a \elementref{picture}. + + + + + + + + Attributes for \elementref{clippath}. + + + + + + + Content model for \elementref{clippath}. + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-structure.rng b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-structure.rng new file mode 100644 index 00000000000..dae5c993de1 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-structure.rng @@ -0,0 +1,1039 @@ + + + + + + + The document root. + + + + + + + + The content allowable as the main body of the document. + + + + + + + + + + + + + + + + + + + + + + + + Attributes for \elementref{document}. + + + + Content model for \elementref{document}. + + + + + + + A part within a document. + + + + + + + + The content allowable as the main body of a part. + + + + + + + + + Attributes for \elementref{part}. + + + + Content model for \elementref{part}. + + + + + + + A Chapter within a document. + + + + + + + + The content allowable as the main body of a chapter. + + + + + + + + + + + + + + + + + + + + + Attributes for \elementref{chapter}. + + + + Content model for \elementref{chapter}. + + + + + + + A Section within a document. + + + + + + + + The content allowable as the main body of a section. + + + + + + + + + + + + + + + + + + Attributes for \elementref{section}. + + + + Content model for \elementref{section}. + + + + + + + A Subsection within a document. + + + + + + + + The content allowable as the main body of a chapter. + + + + + + + + + + + + + + + Attributes for \elementref{subsection}. + + + + Content model for \elementref{subsection}. + + + + + + + A Subsubsection within a document. + + + + + + + + The content allowable as the main body of a chapter. + + + + + + + + + + + + Attributes for \elementref{subsubsection}. + + + + Content model for \elementref{subsubsection}. + + + + + + + A Paragraph within a document. This corresponds to a `formal' marked, possibly labelled +LaTeX Paragraph, in distinction from an unlabelled logical paragraph. + + + + + + + + The content allowable as the main body of a chapter. + + + + + + + + + Attributes for \elementref{paragraph}. + + + + Content model for \elementref{paragraph}. + + + + + + + A Subparagraph within a document. + + + + + + + + The content allowable as the main body of a chapter. + + + + Attributes for \elementref{subparagraph}. + + + + Content model for \elementref{subparagraph}. + + + + + + + An Appendix within a document. + + + + + + + + The content allowable as the main body of a chapter. + + + + + + + + + + + + + + + + + + + + + Attributes for \elementref{appendix}. + + + + Content model for \elementref{appendix}. + + + + + + + A Bibliography within a document. + + + + + + + + The content allowable as the main body of a chapter. + + + + + + + Attributes for \elementref{bibliography}. + + + + + the list of bib files used to create the bibliograph. + + + + + + Content model for \elementref{bibliography}. + + + + + + + + An Index within a document. + + + + + + + + The content allowable as the main body of a chapter. + + + + + + + + + Attributes for \elementref{index}. + + + + Content model for \elementref{index}. + + + + + + + A heirarchical index generated. Typically generated during postprocessing +from the collection of \elementref{indexmark} in the document +(or document collection). + + + + + + + + Attributes for \elementref{indexlist}. + + + + + + + Content model for \elementref{indexlist}. + + + + + + + + An entry in an \elementref{indexlist} consisting of a phrase, references to +points in the document where the phrase was found, and possibly +a nested \elementref{indexlist} represented index levels below this one. + + + + + + + + Attributes for \elementref{indexentry}. + + + + + + + Content model for \elementref{indexentry}. + + + + + + + + + + + + A container for the references (\elementref{ref}) to where an \elementref{indexphrase} was +encountered in the document. The model is Inline to allow +arbitrary text, in addition to the expected \elementref{ref}'s. + + + + + + + + Attributes for \elementref{indexrefs}. + + + + Content model for \elementref{indexrefs}. + + + + + + The title of a document, section or similar document structure container. + + + + + + + + Attributes for \elementref{title}. + + + + + The font prefered for the title. + + + + + Indicates the text size to use. (See \elementref{text}) + + Huge + huge + LARGE + Large + large + normal + small + footnote + tiny + + + + + + + the color to use; any CSS compatible color specification. + + + + + + Content model for \elementref{title}, +basically Inline.model with tag included (normally, but not necessarily, tag would come first). + + + + + + + + + + + + + + The short form of a title, for use in tables of contents or similar. + + + + + + + + Attributes for \elementref{toctitle}. + + + + Content model for \elementref{toctitle}. + + + + + + + + + + + + + + A subtitle, or secondary title. + + + + + + + + Attributes for \elementref{subtitle}. + + + + Content model for \elementref{subtitle}. + + + + + + Generalized document creator. + + + + + + + + The content allowed in authors, editors, etc. + + + + + + + + + + + Attributes for \elementref{creator}. + + + + + + indicates the role of the person in creating the docment. +Commonly useful values are specified, but is open-ended to support extension. + + author + editor + translator + contributor + translator + + + + + + + + Content model for \elementref{creator}. + + + + + + + + + A person's name. + + + + + + + + Attributes for \elementref{personname}. + + + + Content model for \elementref{personname}. + + + + + + Generalized contact information for a document creator. +Note that this element can be repeated to give different types +of contact information (using \attr{role}) for the same creator. + + + + + + + + Attributes for \elementref{contact}. + + + + + + indicates the type of contact information contained. +Commonly useful values are specified, but is open-ended to support extension. + + affiliation + address + current_address + email + url + thanks + dedicatory + + + + + + + + Content model for \elementref{contact}. + + + + + + Generalized document date. +Note that this element can be repeated to give the dates +of different events (using \attr{role}) for the same document. + + + + + + + + Attributes for \elementref{date}. + + + + + + indicates the relevance of the date to the document. +Commonly useful values are specified, but is open-ended to support extension. + + creation + conversion + posted + received + revised + accepted + + + + + + + + Content model for \elementref{date}. + + + + + + A document abstract. + + + + + + + + Attributes for \elementref{abstract}. + + + + + + + Content model for \elementref{abstract}. + + + + + + Acknowledgements for the document. + + + + + + + + Attributes for \elementref{acknowledgements}. + + + + + + + Content model for \elementref{acknowledgements}. + + + + + + Keywords for the document. The content is freeform. + + + + + + + + Attributes for \elementref{keywords}. + + + + + + + Content model for \elementref{keywords}. + + + + + + A classification of the document. + + + + + + + + Attributes for \elementref{classification}. + + + + + + indicates what classification scheme was used. + + + + + + Content model for \elementref{classification}. + + + + + + block of random stuff marked as a titlepage + + + + + + + + Attributes for \elementref{titlepage}. + + + + Content model for \elementref{titlepage}. + + + + + + + + + + (Generalized) Table Of Contents, represents table of contents +as well as list of figures, tables, and other such things. +This will generally be placed by a \cs{tableofcontents} command +and filled in by postprocessing. + + + + + + + + Attributes for \elementref{TOC}. + + + + + + indicates the kind of list + + contents + figures + tables + + + + + + + indicates what kind of document elements to list, in the form of +one or more tags such as \texttt{ltx:chapter} separated by \texttt{|} +(suggestive of an xpath expression). + + + + + indicates how to format the listing + + normal + short + veryshort + + + + + + + + Content model for \elementref{TOC}. + + + + + + + The actual table of contents list, filled in. + + + + + + + + Attributes for \elementref{toclist}. + + + + Content model for \elementref{toclist}. + + + + + + + An entry in a \elementref{toclist}. + + + + + + + + Attributes for \elementref{tocentry}. + + + + Content model for \elementref{tocentry}. + + + + + + + + + + + + Records navigation cross-referencing information, links from the +current page or document to related ones, up, down, previous, next, +and so forth; these relations are recorded in the \attr{class} attribute +of the \elementref{ref}. + +\emph{Really?}; overload the class attribute!? +This should be \attr{role}! +Could also use a navigation name text or something? + + + + + + + + Attributes for \elementref{navigation}. + + + + Content model for \elementref{navigation}. + + + + + + + + + + + + Attributes shared by all sectional elements + + + + + + + Attributes for other elements that can be used in frontmatter. + + + Records the name of the type of object this is to be used when composing the +presentation. The value of this attribute is often set by language localization packages. + + + + + The content allowed for the front matter of each sectional unit, +and the document. + + + + + + + + + + + + + + The content allowed (in addition to \patternref{SectionalFrontMatter.class}) +for the front matter of a document. + + + + + + + + + + + + + + + + + + + + + The content allowed a the end of a document. +Note that this includes random trailing Block and Para material, +to support articles with figures and similar data appearing `at end'. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-tabular.rng b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-tabular.rng new file mode 100644 index 00000000000..c7c653612a4 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML-tabular.rng @@ -0,0 +1,214 @@ + + + + + This module defines the basic tabular, or alignment, structure. +It is roughly parallel to the HTML model. + + + + + + + + An alignment structure corresponding to tabular or various similar forms. +The model is basically a copy of HTML4's table. + + + + + + + + Attributes for \elementref{tabular}. + + + + + which row's baseline aligns with the container's baseline. + + top + middle + bottom + + + + + + the desired width of the tabular. + + + + + + + MiKo: this can be tightened. Is it really true that we have more than one body? +Content model for \elementref{tabular}. + + + + + + + + + + + + + + + + + + + A container for a set of rows that correspond to the header of the tabular. + + + + + + + + Attributes for \elementref{thead}. + + + + Content model for \elementref{thead}. + + + + + + + + A container for a set of rows that correspond to the footer of the tabular. + + + + + + + + Attributes for \elementref{tfoot}. + + + + Content model for \elementref{tfoot}. + + + + + + + + A container for a set of rows corresponding to the body of the tabular. + + + + + + + + Attributes for \elementref{tbody}. + + + + Content model for \elementref{tbody}. + + + + + + + + A row of a tabular. + + + + + + + + Attributes for \elementref{tr}. + + + + Content model for \elementref{tr}. + + + + + + + + A cell in a row of a tabular. + + + + + + + + Attributes for \elementref{td}. + + + + + indicates how many columns this cell spans or covers. + + + + + + indicates how many rows this cell spans or covers. + + + + + + + specifies the alignment of the content. + + + + + specifies the desired width for the column. + + + + + + records a sequence of t or tt, r or rr, b or bb and l or ll +for borders or doubled borders on any side of the cell. + + + + + whether this cell corresponds to a table head or foot. + + + + + + + Content model for \elementref{td}. + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML.rng b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML.rng new file mode 100644 index 00000000000..646aea4b6ce --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/LaTeXML.rng @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + Combined model for inline content. + + + + + + + + + Combined model for physical block-level content. + + + + + + + + Combined model for general flow containing both inline and block level content. + + + + + + + + + + Combined model for logical block-level context. + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/MARCRelators.rng b/Master/texmf-dist/source/latex/stex/schema/rng/MARCRelators.rng new file mode 100644 index 00000000000..44a616795dd --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/MARCRelators.rng @@ -0,0 +1,190 @@ + + + + + + act + adp + aft + ann + ant + app + aqt + arc + arr + art + asg + asn + att + auc + aud + aui + aus + aut + bdd + bjd + bkd + bkp + bnd + bpd + bsl + ccp + chr + clb + cli + cll + clt + cmm + cmp + cmt + cnd + cns + coe + col + com + cos + cot + cov + cpc + cpe + cph + cpl + cpt + cre + crp + crr + csl + csp + cst + ctb + cte + ctg + ctr + cts + ctt + cur + cwt + dfd + dfe + dft + dgg + dis + dln + dnc + dnr + dpc + dpt + drm + drt + dsr + dst + dte + dto + dub + edt + egr + elt + eng + etr + exp + fac + flm + fmo + fnd + fpy + frg + hnr + hst + ill + ilu + ins + inv + itr + ive + ivr + lbt + lee + lel + len + let + lie + lil + lit + lsa + lse + lso + ltg + lyr + mdc + mod + mon + mrk + mte + mus + nrt + opn + org + orm + oth + own + pat + pbd + pbl + pfr + pht + plt + pop + ppm + prc + prd + prf + prg + prm + pro + prt + pta + pte + ptf + pth + ptt + rbr + rce + rcp + red + ren + res + rev + rpt + rpy + rse + rsp + rst + rth + rtm + sad + sce + scl + scr + sec + sgn + sng + spk + spn + spy + srv + stl + stn + str + ths + trc + trl + tyd + tyg + voc + wam + wdc + wde + wit + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/Makefile b/Master/texmf-dist/source/latex/stex/schema/rng/Makefile new file mode 100644 index 00000000000..051561e50af --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/Makefile @@ -0,0 +1,23 @@ +RNCDIR = ../rnc +BUT.rnc = +OMDOC.rnc = $(shell ls $(RNCDIR)/omdoc/*rnc) +LATEXML.rnc = $(shell ls $(RNCDIR)/LaTeXML/*rnc) +SRC.rnc = $(RNCDIR)/omdoc+ltxml.rnc #$(filter-out $(BUT.rnc), $(shell ls $(RNCDIR)/*.rnc)) +SRC.rng = $(SRC.rnc:%.rnc=%.rng) + +all: $(SRC.rng) #$(TARGET.xsd) + +clean: + rm -f *~ +distclean: clean + +# for the moment we do not install +# install: $(SRC.rnc) $(SRC.rng) +# cp $(SRC.rnc) $(SRC.rng) $(HOME)/vc/svn/omdoc.org/www/rnc + +test: + +$(SRC.rng): %.rng: %.rnc $(OMDOC.rnc) $(LATEXML.rnc) +# rnc2rng $< $@ + trang -I rnc -O rng $< $@ + mv ../rnc/*.rng . diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/creativecommons.rng b/Master/texmf-dist/source/latex/stex/schema/rng/creativecommons.rng new file mode 100644 index 00000000000..3b5080e9653 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/creativecommons.rng @@ -0,0 +1,390 @@ + + + + + + ac + ad + ae + af + ag + ai + al + am + an + ao + aq + ar + as + at + au + aw + ax + az + ba + bb + bd + be + bf + bg + bh + bi + bj + bm + bn + bo + br + bs + bt + bv + bw + by + bz + ca + cc + cd + cf + cg + ch + ci + ck + cl + cm + cn + co + cr + cs + cu + cv + cx + cy + cz + de + dj + dk + dm + do + dz + ec + ee + eg + eh + er + es + et + fi + fj + fk + fm + fo + fr + ga + gb + gd + ge + gf + gg + gh + gi + gl + gm + gn + gp + gq + gr + gs + gt + gu + gw + gy + hk + hm + hn + hr + ht + hu + id + ie + il + im + in + io + iq + ir + is + it + je + jm + jo + jp + ke + kg + kh + ki + km + kn + kp + kr + kw + ky + kz + la + lb + lc + li + lk + lr + ls + lt + lu + lv + ly + ma + mc + md + mg + mh + mk + ml + mm + mn + mo + mp + mq + mr + ms + mt + mu + mv + mw + mx + my + mz + na + nc + ne + nf + ng + ni + nl + no + np + nr + nu + nz + om + pa + pe + pf + pg + ph + pk + pl + pm + pn + pr + ps + pt + pw + py + qa + re + ro + ru + rw + sa + sb + sc + sd + se + sg + sh + si + sj + sk + sl + sm + sn + so + sr + st + sv + sy + sz + tc + td + tf + tg + th + tj + tk + tl + tm + tn + to + tp + tr + tt + tv + tw + tz + ua + ug + uk + um + us + uy + uz + va + vc + ve + vg + vi + vn + vu + wf + ws + ye + yt + yu + za + zm + zw + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + permitted + prohibited + + + + + permitted + prohibited + + + + + permitted + prohibited + + + + + + + + + + + + + + + + + + + prohibited + permitted + + + + + + + + + + + + + + + + + + + required + not_required + + + + + required + not_required + + + + + required + not_required + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/dublincore.rng b/Master/texmf-dist/source/latex/stex/schema/rng/dublincore.rng new file mode 100644 index 00000000000..e9841803f4d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/dublincore.rng @@ -0,0 +1,164 @@ + + + + + the various content models, specialize for integration + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-cds-pragmatic.rng b/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-cds-pragmatic.rng new file mode 100644 index 00000000000..4c46d7ce35d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-cds-pragmatic.rng @@ -0,0 +1,2899 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + real + complex + principal_branch + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + function + algebraic + + + + + + + + + + + + + + + + + + + + + function + algebraic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + function + algebraic + + + + + + + + + + + + + + + + + + + + + function + algebraic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + closed + open + open-closed + closed-open + integer + + + + + + + + + + + + + + + + + + closed + open + open-closed + closed-open + integer + + + + + + + + + + + + + + + + + + + + + + + + + + + + open + + + + + + + + + + + + + + + + + closed + + + + + + + + + + + + + + + + + open-closed + + + + + + + + + + + + + + + + closed-open + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + above + below + two-sided + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + row + + + + + + + + + + + + + + + + + + + row + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + real + complex + integer + symbolic + + + + + + + + + + + + + + + + + + + real + complex + integer + symbolic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + column + + + + + + + + + + + + + + + + + + + column + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + row + + + + + + + + + + + + + + + + + + + row + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + real + complex + integer + symbolic + + + + + + + + + + + + + + + + + + + real + complex + integer + symbolic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + lexicographic + numeric + + + + + + + + + + + + + + + + + + lexicographic + numeric + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + multiset + + + + + + + + + + + + + + + + + multiset + + + + + + + + + + + + + + multiset + + + + + + + + + + + + + + multiset + + + + + + + + + + + + + + multiset + + + + + + + + + + + + + + multiset + + + + + + + + + + + + + + multiset + + + + + + + + + + + + + + + + + + + + + + + + + + multiset + + + + + + + + + + + + + + + + + multiset + + + + + + + + + + + + + + + + + multiset + + + + + + + + + + + + + + multiset + + + + + + + + + + + + + + + + + multiset + + + + + + + + + + + + + + multiset + + + + + + + + + + + + + + multiset + + + + + + + + + + + + + + + + + multiset + + + + + + + + + + + + + + multiset + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + normal + multiset + + + + + + + + + + + + + + + + + + + + + normal + multiset + + + + + + + + + + + + + + + + + + normal + multiset + + + + + + + + + + + + + + + + + + normal + multiset + + + + + + + + + + + + + + + + + + normal + multiset + + + + + + + + + + + + + + + + + + normal + multiset + + + + + + + + + + + + + + + + + + normal + multiset + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + normal + multiset + + + + + + + + + + + + + + + + + + + + + normal + multiset + + + + + + + + + + + + + + + + + + + + + normal + multiset + + + + + + + + + + + + + + + + + + normal + multiset + + + + + + + + + + + + + + + + + + + + + normal + multiset + + + + + + + + + + + + + + + + + + normal + multiset + + + + + + + + + + + + + + + + + + normal + multiset + + + + + + + + + + + + + + + + + + + + + normal + multiset + + + + + + + + + + + + + + + + + + normal + multiset + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-common.rng b/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-common.rng new file mode 100644 index 00000000000..612e635a83d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-common.rng @@ -0,0 +1,257 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + block + inline + + + + + + + + + + + + linebreak + scroll + elide + truncate + scale + + + + + + + + + + + + + + + + + + + + + + + top + middle + bottom + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \s*((-?[0-9]*(\.[0-9]*)?(e[mx]|in|cm|mm|p[xtc]|%)?)|(negative)?((very){0,2}thi(n|ck)|medium)mathspace)\s* + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-content.rng b/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-content.rng new file mode 100644 index 00000000000..f32cf7b023b --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-content.rng @@ -0,0 +1,1543 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + numeric + lexicographic + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + prefix + infix + function-model + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-pragmatic.rng b/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-pragmatic.rng new file mode 100644 index 00000000000..c137293e3ca --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-pragmatic.rng @@ -0,0 +1,290 @@ + + + + + the content of "cn" may have <sep> elements in it + + + + + + + + + + + + + + + + e-notation + rational + complex-cartesian + complex-polar + constant + + + + allow degree in bvar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + allow degree to modify <root/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + allow apply to act as a binder + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + allow the non-strict qualifiers + + + + + + + + + + + + + + + + + + + + we collect the operator elements by role + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the values of the MathML type attributes; + + real + complex + function + algebraic + integer + + + + we instantiate the strict content model by structure checking + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + allow all functions, constants, and containers to be content expressions on their own + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-presentation.rng b/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-presentation.rng new file mode 100644 index 00000000000..047524afda5 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-presentation.rng @@ -0,0 +1,2265 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \s*([\+\-]?[0-9]*(\.[0-9]*)?\s*((%?\s*(height|depth|width)?)|e[mx]|in|cm|mm|p[xtc]|((negative)?((very){0,2}thi(n|ck)|medium)mathspace)))\s* + + + + + none + solid + dashed + + + + + top + bottom + center + baseline + axis + + + + + left + center + right + + + + + longdiv + actuarial + radical + box + roundedbox + circle + left + right + top + bottom + updiagonalstrike + downdiagonalstrike + verticalstrike + horizontalstrike + madruwb + + + + + + + + + + + + + + + + + \s*\S\s* + + + + + \s*((#[0-9a-fA-F]{3}([0-9a-fA-F]{3})?)|[aA][qQ][uU][aA]|[bB][lL][aA][cC][kK]|[bB][lL][uU][eE]|[fF][uU][cC][hH][sS][iI][aA]|[gG][rR][aA][yY]|[gG][rR][eE][eE][nN]|[lL][iI][mM][eE]|[mM][aA][rR][oO][oO][nN]|[nN][aA][vV][yY]|[oO][lL][iI][vV][eE]|[pP][uU][rR][pP][lL][eE]|[rR][eE][dD]|[sS][iI][lL][vV][eE][rR]|[tT][eE][aA][lL]|[wW][hH][iI][tT][eE]|[yY][eE][lL][lL][oO][wW])\s* + + + + + left + center + right + decimalpoint + + + + + + + + + + + + (\s*\{\s*(left|center|right|decimalpoint)(\s+(left|center|right|decimalpoint))*\})*\s* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + prefix + infix + postfix + + + + + + + true + false + + + + + + + true + false + + + + + + + + + + + + + + + + + true + false + + + + + + + true + false + + + + + + + + infinity + + + + + + + + + + + + true + false + + + + + + + true + false + + + + + + + true + false + + + + + + + auto + newline + nobreak + goodbreak + badbreak + + + + + + + + + + + + before + after + duplicate + infixlinebreakstyle + + + + + + + + + + left + center + right + auto + id + + + + + + + + + + + + + + + + + left + center + right + auto + id + indentalign + + + + + + + + indentshift + + + + + + + left + center + right + auto + id + indentalign + + + + + + + + indentshift + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + auto + newline + nobreak + goodbreak + badbreak + indentingnewline + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + normal + bold + italic + bold-italic + double-struck + bold-fraktur + script + bold-script + fraktur + sans-serif + bold-sans-serif + sans-serif-italic + sans-serif-bold-italic + monospace + initial + tailed + looped + stretched + + + + + + + small + normal + big + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + thin + medium + thick + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + transparent + + + + + + + + + normal + bold + italic + bold-italic + double-struck + bold-fraktur + script + bold-script + fraktur + sans-serif + bold-sans-serif + sans-serif-italic + sans-serif-bold-italic + monospace + initial + tailed + looped + stretched + + + + + + + small + normal + big + + + + + + + + ltr + rtl + + + + + + + + + + + + + normal + bold + + + + + + + normal + italic + + + + + + + + + + + + + + + + + + transparent + + + + + + + + + + + + + + + + + + + + + + + left + right + + + + + + + + + + + + + + + + + left + center + right + decimalpoint + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ltr + rtl + + + + + + + + + + + + + + + + + + + thin + medium + thick + + + + + + + left + center + right + + + + + + + left + center + right + + + + + + + true + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + + + + + + + + + + + + + + + + + before + after + duplicate + + + + + + + + + + + + + + true + false + + + + + + + true + false + + + + + + + left + right + center + + + + + + + + + true + false + + + + + + + + + true + false + + + + + + + left + center + right + + + + + + + + loose + medium + tight + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + auto + + fit + + + + + + + + + + + none + updiagonalstrike + downdiagonalstrike + verticalstrike + horizontalstrike + + + + + + + + + left + center + right + + + + + + + + + + + + ltr + rtl + + + + + + + left + right + + + + + + + true + false + + + + + + + true + false + + + + + + + true + false + + + + + + + prefix + infix + postfix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + left + center + right + auto + id + + + + + + + left + center + right + auto + id + indentalign + + + + + + + left + center + right + auto + id + indentalign + + + + + + + + + + + + + indentshift + + + + + + + + indentshift + + + + + + + + + + + + true + false + + + + + + + + + + + + + + + + + auto + newline + nobreak + goodbreak + badbreak + + + + + + + + + + before + after + duplicate + infixlinebreakstyle + + + + + + + + + + + + + thin + medium + thick + + + + + + + w + nw + n + ne + e + se + s + sw + + + + + + + lefttop + stackedrightright + mediumstackedrightright + shortstackedrightright + righttop + left/\right + left)(right + :right=right + stackedleftleft + stackedleftlinetop + + + + + + + + + + + + + + + small + normal + big + + + + + + + + normal + bold + italic + bold-italic + double-struck + bold-fraktur + script + bold-script + fraktur + sans-serif + bold-sans-serif + sans-serif-italic + sans-serif-bold-italic + monospace + initial + tailed + looped + stretched + + + + + + + + infinity + + + + + + + + + + + + + + + + + true + false + + + + + + + + thin + medium + thick + + + + + + + + + + left + center + right + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + + + + + + + + + + + + + + + left + right + leftoverlap + rightoverlap + + + + + + + left + center + right + decimalpoint + + + + + + + true + false + + + + + + + + + + + + + + + + + true + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + + + + + + + left + right + center + + + + + + + + + + + + + + + + + + true + false + + + + + + + left + right + center + + + + + + + + + + + + + + + + + + + true + false + + + + + + + true + false + + + + + + + left + right + center + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \s*(top|bottom|center|baseline|axis)\s*[0-9]* + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + + + + + + + + + + + auto + + fit + + + + + + + + + auto + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + + + + + + + true + false + + + + + + + true + false + + + + + + + left + right + leftoverlap + rightoverlap + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + top + bottom + center + baseline + axis + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + top + bottom + center + baseline + axis + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \s*(top|bottom|center|baseline|axis)\s*[0-9]* + + + + + + + left + center + right + decimalpoint + + + + + + + left + center + right + + + + + + + + loose + medium + tight + + + + + + + + + + + + + + + + + + + + lefttop + stackedrightright + mediumstackedrightright + shortstackedrightright + righttop + left/\right + left)(right + :right=right + stackedleftleft + stackedleftlinetop + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + w + nw + n + ne + e + se + s + sw + + + + + + + + + none + updiagonalstrike + downdiagonalstrike + verticalstrike + horizontalstrike + + + + + + + + + + + + + + + + + + + + + + + + + + w + nw + n + ne + e + se + s + sw + + + + + + + + + none + updiagonalstrike + downdiagonalstrike + verticalstrike + horizontalstrike + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-strict-content.rng b/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-strict-content.rng new file mode 100644 index 00000000000..f2e3b0ea8e9 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-strict-content.rng @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + integer + real + double + hexdouble + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + integer + rational + real + complex + complex-polar + complex-cartesian + constant + function + vector + list + set + matrix + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-strict.rng b/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-strict.rng new file mode 100644 index 00000000000..be5a334c8fe --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/mathml3-strict.rng @@ -0,0 +1,267 @@ + + + + + + + + + + + + + + + + + + + + + + + + integer + real + double + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/mathml3.rng b/Master/texmf-dist/source/latex/stex/schema/rng/mathml3.rng new file mode 100644 index 00000000000..67b0561c133 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/mathml3.rng @@ -0,0 +1,23 @@ + + + + + Content MathML + + + Presentation MathML + + + math and semantics common to both Content and Presentation + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/metadata.rng b/Master/texmf-dist/source/latex/stex/schema/rng/metadata.rng new file mode 100644 index 00000000000..b85d0d4f533 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/metadata.rng @@ -0,0 +1,217 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdoc+ltxml.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdoc+ltxml.rng new file mode 100644 index 00000000000..04b411a61dd --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdoc+ltxml.rng @@ -0,0 +1,436 @@ + + + + + we include the OMDoc Schema, but we allow the sectioning elements defined below +as document structuring elements as well. + + + + + + + + + + + + + we extend the Math Objects by the ones introduced by LaTeXML + + + + + + + + + + we extend the model of rendering elements by XMath, and we extend the XMath there, so +that we can cope with piecewise and friends at the intermediate level. + + + + + + + + + + + + + + + + + we extend the core structural classes of OMDoc with various LaTeXML counterparts. These +are usful, since sTeX defers to LaTeXML to generate these, and in a later pass (the +XSLTs) replaces them by their OMDoc counterparts. The rules below, have another +purpose: in the OMDoc schema (which is the primary one here, we use the & operator for +making classes, whereas the LaTeXML schema uses the less flexible | operator. Therefore +we need to construct conjunctive extensions in start macro. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + we allow various LaTeXML elements as a top-level elements, +they will be converted by XSLT later + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + we prepare some nested content models for sectioning elements + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + they need to be able to nest theories transparently + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and now the elemens themselves + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdoc-common.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdoc-common.rng new file mode 100644 index 00000000000..17d8676e6ad --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdoc-common.rng @@ -0,0 +1,317 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + aa + ab + af + am + ar + as + ay + az + ba + be + bg + bh + bi + bn + bo + br + ca + co + cs + cy + da + de + dz + el + en + eo + es + et + eu + fa + fi + fj + fo + fr + fy + ga + gd + gl + gn + gu + ha + he + hi + hr + hu + hy + ia + ie + ik + id + is + it + iu + ja + jv + ka + kk + kl + km + kn + ko + ks + ku + ky + la + ln + lo + lt + lv + mg + mi + mk + ml + mn + mo + mr + ms + mt + my + na + ne + nl + no + oc + om + or + pa + pl + ps + pt + qu + rm + rn + ro + ru + rw + sa + sd + sg + sh + si + sk + sl + sm + sn + so + sq + sr + ss + st + su + sv + sw + ta + te + tg + th + ti + tk + tl + tn + to + tr + ts + tt + tw + ug + uk + ur + uz + vi + vo + wo + xh + yi + yo + za + zh + zu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + useful classes to be extended in the modules + + + + + + + + + + mixed models + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdoc-xhtml.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdoc-xhtml.rng new file mode 100644 index 00000000000..83b930ecb61 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdoc-xhtml.rng @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdoc.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdoc.rng new file mode 100644 index 00000000000..48c9e7d9ba3 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdoc.rng @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdocadt.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdocadt.rng new file mode 100644 index 00000000000..5fe330eb6bb --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdocadt.rng @@ -0,0 +1,229 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + loose + generated + free + + + + + + + + sort + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + yes + no + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdocattribs.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdocattribs.rng new file mode 100644 index 00000000000..2d66607c5c0 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdocattribs.rng @@ -0,0 +1,257 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + aa + ab + af + am + ar + as + ay + az + ba + be + bg + bh + bi + bn + bo + br + ca + co + cs + cy + da + de + dz + el + en + eo + es + et + eu + fa + fi + fj + fo + fr + fy + ga + gd + gl + gn + gu + ha + he + hi + hr + hu + hy + ia + ie + ik + id + is + it + iu + ja + jv + ka + kk + kl + km + kn + ko + ks + ku + ky + la + ln + lo + lt + lv + mg + mi + mk + ml + mn + mo + mr + ms + mt + my + na + ne + nl + no + oc + om + or + pa + pl + ps + pt + qu + rm + rn + ro + ru + rw + sa + sd + sg + sh + si + sk + sl + sm + sn + so + sq + sr + ss + st + su + sv + sw + ta + te + tg + th + ti + tk + tl + tn + to + tr + ts + tt + tw + ug + uk + ur + uz + vi + vo + wo + xh + yi + yo + za + zh + zu + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdoccc.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdoccc.rng new file mode 100644 index 00000000000..100d6aaa183 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdoccc.rng @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdoccth.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdoccth.rng new file mode 100644 index 00000000000..d07a5b680dd --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdoccth.rng @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + local + global + + + + + + + conservative + monomorphism + definitional + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdocdc.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdocdc.rng new file mode 100644 index 00000000000..cd1cc409c60 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdocdc.rng @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Dataset + Text + Collection + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdocdg.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdocdg.rng new file mode 100644 index 00000000000..735bfd6ed89 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdocdg.rng @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdocdoc.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdocdoc.rng new file mode 100644 index 00000000000..bac94d26352 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdocdoc.rng @@ -0,0 +1,240 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + The <omdoc> and <omgroup> elements allow frontmatter and backmatter, +which we will now define + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + the model of the document root only differs from <omgroup> in the version attribute + + + + + + + 1.3 + + + + + + + + + + + + + + + + + + + + + + + + deprecated ################################ + + + + + + include + cite + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdocext.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdocext.rng new file mode 100644 index 00000000000..b7672c89a65 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdocext.rng @@ -0,0 +1,330 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + external + local + + + + + + + TeX + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + display + execute + other + + + + + + + new + replace + embed + other + + + + + + + onPresent + onLoad + onRequest + other + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + data + ref + object + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdocmeta.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdocmeta.rng new file mode 100644 index 00000000000..699dfa55937 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdocmeta.rng @@ -0,0 +1,220 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdocmobj.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdocmobj.rng new file mode 100644 index 00000000000..de29149f94e --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdocmobj.rng @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdocmtxt.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdocmtxt.rng new file mode 100644 index 00000000000..77d51f527a6 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdocmtxt.rng @@ -0,0 +1,502 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + abstract + introduction + annote + conclusion + thesis + comment + antithesis + elaboration + motivation + evidence + note + warning + question + answer + transition + + + + + axiom + definition + example + proof + derive + hypothesis + notation + + + + + assertion + theorem + lemma + corollary + proposition + conjecture + false-conjecture + obligation + postulate + formula + assumption + rule + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + yes + no + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdocpf.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdocpf.rng new file mode 100644 index 00000000000..e9ea40e59d8 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdocpf.rng @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + conclusion + gap + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + yes + no + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdocpres.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdocpres.rng new file mode 100644 index 00000000000..3f37f8cbedd --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdocpres.rng @@ -0,0 +1,386 @@ + + + + + + + + + + we first add the ic and ec attributes for notation contexts everywhere + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdocquiz.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdocquiz.rng new file mode 100644 index 00000000000..d02d811edc5 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdocquiz.rng @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + false + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdocrt.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdocrt.rng new file mode 100644 index 00000000000..4ed1dcee6ed --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdocrt.rng @@ -0,0 +1,100 @@ + + + + + + + + + + We extend the three main content models by xhtml elements + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/omdocst.rng b/Master/texmf-dist/source/latex/stex/schema/rng/omdocst.rng new file mode 100644 index 00000000000..59e54d0f723 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/omdocst.rng @@ -0,0 +1,634 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + type + sort + object + binder + attribution + application + constant + semantic-attribution + error + + + + + + + + + + + global + local + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + informal + + + + + + + simple + + + + + + + + + + + + + + + + + + + + + + + implicit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pattern + + + + + + + + + + + + + + + + + + + + + + + + + + inductive + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + satisfiable + counter-satisfiable + no-consequence + theorem + conter-theorem + contradictory-axioms + tautologous-conclusion + tautology + equivalent + conunter-equivalent + unsatisfiable-conclusion + unsatisfiable + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + just-by, points to the theorem justifying well-definedness +entailed-by, entails, point to other (equivalent definitions +entailed-by-thm, entails-thm point to the theorems justifying +the entailment relation) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + for + against + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + official + experimental + private + obsolete + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/openmath2.rng b/Master/texmf-dist/source/latex/stex/schema/rng/openmath2.rng new file mode 100644 index 00000000000..af2ccdb78da --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/openmath2.rng @@ -0,0 +1,253 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \s*(-\s?)?[0-9]+(\s[0-9]+)*\s* + + + + + + + + + + + + + + + + + + + + + + + + + + + + [0-9A-F]+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/openmath3.rng b/Master/texmf-dist/source/latex/stex/schema/rng/openmath3.rng new file mode 100644 index 00000000000..6d1ac08e7c7 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/openmath3.rng @@ -0,0 +1,247 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \s*(-\s?)?[0-9]+(\s[0-9]+)*\s* + + + + + + + + + + + + + + + + + + + + + + + + + + + + [0-9A-F]+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/owl.rng b/Master/texmf-dist/source/latex/stex/schema/rng/owl.rng new file mode 100644 index 00000000000..f32cf39c02d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/owl.rng @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/owl2+ltxml.rng b/Master/texmf-dist/source/latex/stex/schema/rng/owl2+ltxml.rng new file mode 100644 index 00000000000..e4fdff503b1 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/owl2+ltxml.rng @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/owl2-xml.rng b/Master/texmf-dist/source/latex/stex/schema/rng/owl2-xml.rng new file mode 100644 index 00000000000..fc1cb64cd14 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/owl2-xml.rng @@ -0,0 +1,1321 @@ + + + + + + + + ([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿])(([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀]|\.)*([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀] ))?| + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (((([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿])(([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀]|\.)*([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀] ))?)?:)(([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|[0-9])(([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀]|\.)*([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀]))?))|((([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿])(([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀]|\.)*([A-Z]|[a-z]|[À-Ö]|[Ø-ö]|[ø-˿]|[Ͱ-ͽ]|[Ϳ-῿]|[‌-‍]|[⁰-↏]|[Ⰰ-⿯]|[、-퟿]|[豈-﷏]|[ﷰ-�]|[𐀀-󯿿]|_|\-|[0-9]|·|[̀-ͯ]|[‿-⁀] ))?)?:) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/owl2xml.rng b/Master/texmf-dist/source/latex/stex/schema/rng/owl2xml.rng new file mode 100644 index 00000000000..4510c3776fd --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/owl2xml.rng @@ -0,0 +1,809 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/pxhtml.rng b/Master/texmf-dist/source/latex/stex/schema/rng/pxhtml.rng new file mode 100644 index 00000000000..721c22c0da2 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/pxhtml.rng @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/statements.rng b/Master/texmf-dist/source/latex/stex/schema/rng/statements.rng new file mode 100644 index 00000000000..c678f7f8d7d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/statements.rng @@ -0,0 +1,279 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-animation.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-animation.rng new file mode 100644 index 00000000000..918313a71fe --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-animation.rng @@ -0,0 +1,364 @@ + + + + SVG 1.1 Animation Module + file: svg-animation.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-animation.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Animation + + animate, set, animateMotion, animateColor, animateTransform, mpath + + This module declares markup to provide support for animation. + + + SVG.Animation.class + + + + + + + + + + + + + + + + SVG.Animation.attrib + + + + + + + + + + SVG.AnimationAttribute.attrib + + + + + + + + + + + + + SVG.AnimationTiming.attrib + + + + + + + + + + + + + + + + + + + + + + + + always + never + whenNotActive + + + + + + + + + + + + + remove + freeze + + + + + + + SVG.AnimationValue.attrib + + + + + + + + + discrete + linear + paced + spline + + + + + + + + + + + + + + + + + + + + + + + + + SVG.AnimationAddtion.attrib + + + + + + + + + replace + sum + + + + + + + none + sum + + + + + + + animate: Animate Element + + + + + + + + + + + + + + + + + + + + + + + + + set: Set Element + + + + + + + + + + + + + + + + + + + + + + + + + + animateMotion: Animate Motion Element + + + + + + + + + + + + + + + + + + + + + + + + + + + discrete + linear + paced + spline + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + animateColor: Animate Color Element + + + + + + + + + + + + + + + + + + + + + + + + + animateTransform: Animate Transform Element + + + + + + + + + + + + + + + + + + + + + + + + + + translate + scale + rotate + skewX + skewY + + + + + + mpath: Motion Path Element + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-animevents-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-animevents-attrib.rng new file mode 100644 index 00000000000..164414fe0fc --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-animevents-attrib.rng @@ -0,0 +1,50 @@ + + + + SVG 1.1 Animation Events Attribute Module + file: svg-animevents-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-animevents-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Animation Events Attribute + + onbegin, onend, onrepeat, onload + + This module defines the AnimationEvents attribute set. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-clip.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-clip.rng new file mode 100644 index 00000000000..0bb1333829f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-clip.rng @@ -0,0 +1,110 @@ + + + + SVG 1.1 Basic Clip Module + file: svg-basic-clip.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-basic-clip.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Basic Clip + + clipPath + + This module declares markup to provide support for clipping. + + + Datatypes + + + + + + SVG.Clip.attrib + + + + + + + + + + + + + + + + + + + SVG.Clip.class + + + + + + + + + + + + clipPath: Clip Path Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-filter.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-filter.rng new file mode 100644 index 00000000000..6e9a39b50fa --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-filter.rng @@ -0,0 +1,779 @@ + + + + SVG 1.1 Basic Filter Module + file: svg-basic-filter.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-basic-filter.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Basic Filter + + filter, feBlend, feColorMatrix, feComponentTransfer, feComposite, + feFlood, feGaussianBlur, feImage, feMerge, feMergeNode, feOffset, + feTile, feFuncR, feFuncG, feFuncB, feFuncA + + This module declares markup to provide support for filter effect. + + + Datatypes + + + + + + + + + SVG.Filter.attrib + + + + + + + + + + + + + + SVG.FilterColor.attrib + + + + + + + + + auto + sRGB + linearRGB + inherit + + + + + + + SVG.Filter.class + + + + + + + + + + + + SVG.FilterPrimitive.class + + + + + + + + + + + + + + + + + + + + + SVG.FilterPrimitive.attrib + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SVG.FilterPrimitiveWithIn.attrib + + + + + + + + + + + + + filter: Filter Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + + feBlend: Filter Effect Blend Element + + + + + + + + + + + + + + + + + + + + + + + + normal + multiply + screen + darken + lighten + + + + + + feColorMatrix: Filter Effect Color Matrix Element + + + + + + + + + + + + + + + + + + + + + + + matrix + saturate + hueRotate + luminanceToAlpha + + + + + + + + + feComponentTransfer: Filter Effect Component Transfer Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + feComposite: Filter Effect Composite Element + + + + + + + + + + + + + + + + + + + + + + + + over + in + out + atop + xor + arithmetic + + + + + + + + + + + + + + + + + + + + + + + + + + feFlood: Filter Effect Flood Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feGaussianBlur: Filter Effect Gaussian Blur Element + + + + + + + + + + + + + + + + + + + + + + + + + + + feImage: Filter Effect Image Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feMerge: Filter Effect Merge Element + + + + + + + + + + + + + + + + + + + feMergeNode: Filter Effect Merge Node Element + + + + + + + + + + + + + + + + + + + + + + + feOffset: Filter Effect Offset Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feTile: Filter Effect Tile Element + + + + + + + + + + + + + + + + + + + + + + feFuncR: Filter Effect Function Red Element + + + + + + + + + + + + + + + + + + + + identity + table + discrete + linear + gamma + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feFuncG: Filter Effect Function Green Element + + + + + + + + + + + + + + + + + + + + identity + table + discrete + linear + gamma + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feFuncB: Filter Effect Function Blue Element + + + + + + + + + + + + + + + + + + + + identity + table + discrete + linear + gamma + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feFuncA: Filter Effect Function Alpha Element + + + + + + + + + + + + + + + + + + + + identity + table + discrete + linear + gamma + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-font.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-font.rng new file mode 100644 index 00000000000..da67018545f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-font.rng @@ -0,0 +1,490 @@ + + + + SVG 1.1 Basic Font Module + file: svg-basic-font.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-basic-font.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Basic Font + + font, font-face, glyph, missing-glyph, hkern, vkern, font-face-src, + font-face-uri, font-face-name + + This module declares markup to provide support for template. + + + SVG.Font.class + + + + + + + + + + + + + font: Font Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + font-face: Font Face Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + glyph: Glyph Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + missing-glyph: Missing Glyph Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + hkern: Horizontal Kerning Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + vkern: Vertical Kerning Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + font-face-src: Font Face Source Element + + + + + + + + + + + + + + + + + + + + font-face-uri: Font Face URI Element + + + + + + + + + + + + + + + + font-face-name: Font Face Name Element + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-graphics-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-graphics-attrib.rng new file mode 100644 index 00000000000..20c40b3648c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-graphics-attrib.rng @@ -0,0 +1,64 @@ + + + + SVG 1.1 Basic Graphics Attribute Module + file: svg-basic-graphics-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-basic-graphics-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Basic Graphics Attribute + + display, visibility + + This module defines the Graphics attribute set. + + + + + + inline + block + list-item + run-in + compact + marker + table + inline-table + table-row-group + table-header-group + table-footer-group + table-row + table-column-group + table-column + table-cell + table-caption + none + inherit + + + + + + + + + visible + hidden + inherit + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-structure.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-structure.rng new file mode 100644 index 00000000000..65ee4f172f4 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-structure.rng @@ -0,0 +1,565 @@ + + + + SVG 1.1 Basic Structure Module + file: svg-basic-structure.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-basic-structure.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Basic Structure + + svg, g, defs, desc, title, metadata, use + + This module declares the major structural elements and their attributes. + + + + The root element is "svg". + + + +
+ + Include core set of modules + + + + Datatypes Module + + + + + Core Attribute Module + + +
+ + Content Models (Default) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Attribute Collections (Default) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SVG.Description.class + + + + + + + + + + + + + + SVG.Use.class + + + + + + + + + + + + SVG.Structure.class + + + + + + + + + + + + + + + SVG.Presentation.attrib + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + svg: SVG Document Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + disable + magnify + + + + + + 1.1 + + + + + + + + + + + + + + + + + + + + g: Group Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + defs: Definisions Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + desc: Description Element + + + + + + + + + + + + + + + + title: Title Element + + + + + + + + + + + + + + + + metadata: Metadata Element + + + + + + + + + + + + + + + use: Use Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-text.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-text.rng new file mode 100644 index 00000000000..14771acea25 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-basic-text.rng @@ -0,0 +1,236 @@ + + + + SVG 1.1 Basic Text Module + file: svg-basic-text.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-basic-text.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Basic Text + + text, altGlyph, altGlyphDef, glyphRef + + This module declares markup to provide support for text. + + + Datatypes + + + + + + + + + SVG.Font.attrib + + + + + + + + + + + + + + + + + + + normal + italic + oblique + inherit + + + + + + + normal + bold + bolder + lighter + 100 + 200 + 300 + 400 + 500 + 600 + 700 + 800 + 900 + inherit + + + + + + + SVG.Text.class + + + + + + + + + + + + SVG.TextContent.class + + + + + + + + + + + + text: Text Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + altGlyph: Alternate Glyph Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + altGlyphDef: Alternate Glyph Definition Element + + + + + + + + + + + + + + + + + glyphRef: Glyph Reference Element + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-clip.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-clip.rng new file mode 100644 index 00000000000..180cdd58e23 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-clip.rng @@ -0,0 +1,29 @@ + + + + SVG 1.1 Clip Module + file: svg-clip.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-clip.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Clip + + clipPath + + This module declares markup to provide support for clipping. + + + + + extend content model of clipPath + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-conditional.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-conditional.rng new file mode 100644 index 00000000000..8bfddf61491 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-conditional.rng @@ -0,0 +1,105 @@ + + + + SVG 1.1 Conditional Processing Module + file: svg-conditional.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-conditional.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Conditional Processing + + switch + + This module declares markup to provide support for conditional processing. + + + Datatypes + + + + + + + + + SVG.Conditional.attrib + + + + + + + + + + + + + + + + + + + + + + + + SVG.Conditional.class + + + + + + + + + + + + switch: Switch Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-container-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-container-attrib.rng new file mode 100644 index 00000000000..01847b07a90 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-container-attrib.rng @@ -0,0 +1,39 @@ + + + + SVG 1.1 Container Attribute Module + file: svg-container-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-container-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Container Attribute + + enable-background + + This module defines the Container attribute set. + + + + 'enable-background' property/attribute value (e.g., 'new', 'accumulate') + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-core-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-core-attrib.rng new file mode 100644 index 00000000000..cf3e64fafd1 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-core-attrib.rng @@ -0,0 +1,61 @@ + + + + SVG 1.1 Core Attribute Module + file: svg-core-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-core-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Core Attribute + + id, xml:base, xml:lang, xml:space + + This module defines the core set of attributes that can be present on + any element. + + + + + + + + + + + + + + + + + + + + + + + + + + + default + preserve + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-cursor.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-cursor.rng new file mode 100644 index 00000000000..e3207ed6c92 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-cursor.rng @@ -0,0 +1,81 @@ + + + + SVG 1.1 Cursor Module + file: svg-cursor.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-cursor.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Cursor + + cursor + + This module declares markup to provide support for cursor. + + + Datatypes + + + + + + SVG.Cursor.attrib + + + + + + + + + + + + + + SVG.Cursor.class + + + + + + + + + + + + cursor: Cursor Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-datatypes.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-datatypes.rng new file mode 100644 index 00000000000..dba1588d8d4 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-datatypes.rng @@ -0,0 +1,158 @@ + + + + SVG 1.1 Datatypes Module + file: svg-datatypes.mod + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-datatypes.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Datatypes + + This module declares common data types for properties and attributes. + + + feature specification + + + + false + true + + + + + 'clip-rule' or 'fill-rule' property/attribute value + + + nonzero + evenodd + inherit + + + + + media type, as per [RFC2045] + + + + + + a <coordinate> + + + + + + a list of <coordinate>s + + + + + + a <color> value + + + + + + a <integer> + + + + + + a language code, as per [RFC3066] + + + + + + comma-separated list of language codes, as per [RFC3066] + + + + + + a <ength> + + + + + + a list of <length>s + + + + + + a <number> + + + + + + a list of <number>s + + + + + + opacity value (e.g., <number>) + + + + + + a path data specification + + + + + + 'preserveAspectRatio' attribute specification + + + \s*(none|xMinYMin|xMidYMin|xMaxYMin|xMinYMid|xMidYMid|xMaxYMid|xMinYMax|xMidYMax|xMaxYMax)\s+(meet|slice)?\s* + + + + + script expression + + + + + + An SVG color value (RGB plus optional ICC) + + + + + + arbitrary text string + + + + + + list of transforms + + + + + + a Uniform Resource Identifier, see [URI] + + + + + + 'viewBox' attribute specification + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-docevents-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-docevents-attrib.rng new file mode 100644 index 00000000000..3d2eecea923 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-docevents-attrib.rng @@ -0,0 +1,73 @@ + + + + SVG 1.1 Document Events Attribute Module + file: svg-docevents-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-docevents-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Document Events Attribute + + onunload, onabort, onerror, onresize, onscroll, onzoom + + This module defines the DocumentEvents attribute set. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-extensibility.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-extensibility.rng new file mode 100644 index 00000000000..d63acf3deae --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-extensibility.rng @@ -0,0 +1,104 @@ + + + + SVG 1.1 Extensibility Module + file: svg-extensibility.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-extensibility.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + + Extensibility + + foreignObject + + This module declares markup to provide support for extensibility. + + + SVG.Extensibility.class + + + + + + + + + + + + foreignObject: Foreign Object Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + any element in foreign namespace + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-extresources-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-extresources-attrib.rng new file mode 100644 index 00000000000..1fa08bfe7ba --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-extresources-attrib.rng @@ -0,0 +1,33 @@ + + + + SVG 1.1 External Resources Attribute Module + file: svg-extresources-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-extresources-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + External Resources Attribute + + externalResourcesRequired + + This module defines the External attribute set. + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-filter.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-filter.rng new file mode 100644 index 00000000000..72bc2c37c50 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-filter.rng @@ -0,0 +1,468 @@ + + + + SVG 1.1 Filter Module + file: svg-filter.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-filter.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Filter + + filter, feBlend, feColorMatrix, feComponentTransfer, feComposite, + feConvolveMatrix, feDiffuseLighting, feDisplacementMap, feFlood, + feGaussianBlur, feImage, feMerge, feMergeNode, feMorphology, feOffset, + feSpecularLighting, feTile, feTurbulence, feDistantLight, fePointLight, + feSpotLight, feFuncR, feFuncG, feFuncB, feFuncA + + This module declares markup to provide support for filter effect. + + + + + extend SVG.FilterPrimitive.class + + + + + + + + + + + + feConvolveMatrix: Filter Effect Convolve Matrix Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + duplicate + wrap + none + + + + + + + + + + + + + + + + feDiffuseLighting: Filter Effect Diffuse Lighting Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feDisplacementMap: Filter Effect Displacement Map Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + R + G + B + A + + + + + + + R + G + B + A + + + + + + feMorphology: Filter Effect Morphology Element + + + + + + + + + + + + + + + + + + + + + + + erode + dilate + + + + + + + + + + + feSpecularLighting: Filter Effect Specular Lighting Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feTurbulence: Filter Effect Turbulence Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + stitch + noStitch + + + + + + + fractalNoise + turbulence + + + + + + feDistantLight: Filter Effect Distant Light Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fePointLight: Filter Effect Point Light Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + feSpotLight: Filter Effect Spot Light Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-font.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-font.rng new file mode 100644 index 00000000000..f5da47c17ed --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-font.rng @@ -0,0 +1,123 @@ + + + + SVG 1.1 Font Module + file: svg-font.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-font.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Font + + font, font-face, glyph, missing-glyph, hkern, vkern, font-face-src, + font-face-uri, font-face-format, font-face-name, definition-src + + This module declares markup to provide support for template. + + + + font-face: Font Face Element + + + + + + + + glyph: Glyph Element + + + + + + + + + + + + + + + + + + + + + + + + + + missing-glyph: Missing Glyph Element + + + + + + + + + + + + + + + + + + + + + + + + + + font-face-uri: Font Face URI Element + + + + + + + + font-face-format: Font Face Format Element + + + + + + + + + + + + + + + + + + definition-src: Definition Source Element + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-gradient.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-gradient.rng new file mode 100644 index 00000000000..a13c68f8341 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-gradient.rng @@ -0,0 +1,233 @@ + + + + SVG 1.1 Gradient Module + file: svg-gradient.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-gradient.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Gradient + + linearGradient, radialGradient, stop + + This module declares markup to provide support for gradient fill. + + + Datatypes + + + + + + SVG.Gradient.attrib + + + + + + + + + + + + + + + + + + + SVG.Gradient.class + + + + + + + + + + + + + linearGradient: Linear Gradient Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + + + + + + + + pad + reflect + repeat + + + + + + radialGradient: Radial Gradient Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + + + + + + + + pad + reflect + repeat + + + + + + stop: Stop Element + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-graphevents-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-graphevents-attrib.rng new file mode 100644 index 00000000000..4a69371858f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-graphevents-attrib.rng @@ -0,0 +1,106 @@ + + + + SVG 1.1 Graphical Element Events Attribute Module + file: svg-graphevents-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-graphevents-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Graphical Element Events Attribute + + onfocusin, onfocusout, onactivate, onclick, onmousedown, onmouseup, + onmouseover, onmousemove, onmouseout, onload + + This module defines the GraphicalEvents attribute set. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-graphics-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-graphics-attrib.rng new file mode 100644 index 00000000000..307dcd62754 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-graphics-attrib.rng @@ -0,0 +1,83 @@ + + + + SVG 1.1 Graphics Attribute Module + file: svg-graphics-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-graphics-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Graphics Attribute + + display, image-rendering, pointer-events, shape-rendering, + text-rendering, visibility + + This module defines the Graphics attribute set. + + + + + + + auto + optimizeSpeed + optimizeQuality + inherit + + + + + + + + + visiblePainted + visibleFill + visibleStroke + visible + painted + fill + stroke + all + none + inherit + + + + + + + + + auto + optimizeSpeed + crispEdges + geometricPrecision + inherit + + + + + + + + + auto + optimizeSpeed + optimizeLegibility + geometricPrecision + inherit + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-hyperlink.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-hyperlink.rng new file mode 100644 index 00000000000..1e0c1807091 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-hyperlink.rng @@ -0,0 +1,92 @@ + + + + SVG 1.1 Hyperlinking Module + file: svg-hyperlink.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-hyperlink.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Hyperlinking + + a + + This module declares markup to provide support for hyper linking. + + + + link to this target + + + + + SVG.Hyperlink.class + + + + + + + + + + + + a: Anchor Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-image.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-image.rng new file mode 100644 index 00000000000..8b02c532890 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-image.rng @@ -0,0 +1,91 @@ + + + + SVG 1.1 Image Module + file: svg-image.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-image.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Image + + image + + This module declares markup to provide support for image. + + + SVG.Image.class + + + + + + + + + + + + image: Image Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-marker.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-marker.rng new file mode 100644 index 00000000000..ef30e1d60c1 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-marker.rng @@ -0,0 +1,143 @@ + + + + SVG 1.1 Marker Module + file: svg-marker.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-marker.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Marker + + marker + + This module declares markup to provide support for marker. + + + Datatypes + + + + + + SVG.Marker.attrib + + + + + + + + + + + + + + + + + + + + + + + + SVG.Marker.class + + + + + + + + + + + + marker: Marker Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + strokeWidth + userSpaceOnUse + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-mask.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-mask.rng new file mode 100644 index 00000000000..ca25e47915d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-mask.rng @@ -0,0 +1,129 @@ + + + + SVG 1.1 Mask Module + file: svg-mask.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-mask.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Mask + + mask + + This module declares markup to provide support for masking. + + + Datatypes + + + + + + SVG.Mask.attrib + + + + + + + + + + + + + + SVG.Mask.class + + + + + + + + + + + + mask: Mask Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-opacity-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-opacity-attrib.rng new file mode 100644 index 00000000000..44458f8b805 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-opacity-attrib.rng @@ -0,0 +1,49 @@ + + + + SVG 1.1 Paint Opacity Attribute Module + file: svg-opacity-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-opacity-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Paint Opacity Attribute + + opacity, fill-opacity, stroke-opacity + + This module defines the Opacity attribute set. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-paint-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-paint-attrib.rng new file mode 100644 index 00000000000..fe9d499edca --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-paint-attrib.rng @@ -0,0 +1,180 @@ + + + + SVG 1.1 Paint Attribute Module + file: svg-paint-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-paint-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Paint Attribute + + fill, fill-rule, stroke, stroke-dasharray, stroke-dashoffset, + stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-width, color, + color-interpolation, color-rendering + + This module defines the Paint and Color attribute sets. + + + + a 'fill' or 'stroke' property/attribute value: <paint> + + + + + + 'stroke-dasharray' property/attribute value + (e.g., 'none', list of <number>s) + + + + + + 'stroke-dashoffset' property/attribute value (e.g., 'none', <legnth>) + + + + + + 'stroke-miterlimit' property/attribute value (e.g., <number>) + + + + + + 'stroke-width' property/attribute value (e.g., <length>) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + butt + round + square + inherit + + + + + + + + + miter + round + bevel + inherit + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + auto + sRGB + linearRGB + inherit + + + + + + + + + auto + optimizeSpeed + optimizeQuality + inherit + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-pattern.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-pattern.rng new file mode 100644 index 00000000000..371521b1688 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-pattern.rng @@ -0,0 +1,125 @@ + + + + SVG 1.1 Pattern Module + file: svg-pattern.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-pattern.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Pattern + + pattern + + This module declares markup to provide support for pattern fill. + + + SVG.Pattern.class + + + + + + + + + + + + pattern: Pattern Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + + + userSpaceOnUse + objectBoundingBox + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-profile.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-profile.rng new file mode 100644 index 00000000000..11834192f0f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-profile.rng @@ -0,0 +1,76 @@ + + + + SVG 1.1 Color Profile Module + file: svg-profile.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-profile.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Color Profile + + color-profile + + This module declares markup to provide support for color profile. + + + SVG.Profile.attrib + + + + + + + + + + + + SVG.Profile.class + + + + + + + + + + + + color-profile: Color Profile Element + + + + + + + + + + + + + + + + + + + + + + + auto + perceptual + relative-colorimetric + saturation + absolute-colorimetric + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-script.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-script.rng new file mode 100644 index 00000000000..4e21020a398 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-script.rng @@ -0,0 +1,51 @@ + + + + SVG 1.1 Scripting Module + file: svg-script.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-script.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Scripting + + script + + This module declares markup to provide support for scripting. + + + SVG.Script.class + + + + + + + + + + + + script: Script Element + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-shape.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-shape.rng new file mode 100644 index 00000000000..c931bab7ae2 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-shape.rng @@ -0,0 +1,395 @@ + + + + SVG 1.1 Shape Module + file: svg-shape.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-shape.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Shape + + path, rect, circle, line, ellipse, polyline, polygon + + This module declares markup to provide support for graphical shapes. + + + + a list of points + + + + + SVG.Shape.class + + + + + + + + + + + + + + + + + + path: Path Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + rect: Rectangle Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + circle: Circle Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + line: Line Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ellipse: Ellipse Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + polyline: Polyline Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + polygon: Polygon Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-structure.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-structure.rng new file mode 100644 index 00000000000..533d3462646 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-structure.rng @@ -0,0 +1,78 @@ + + + + SVG 1.1 Structure Module + file: svg-structure.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-structure.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Structure + + svg, g, defs, desc, title, metadata, symbol, use + + This module declares the major structural elements and their attributes. + + + + + extend SVG.Structure.class + + + + + symbol: Symbol Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-style.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-style.rng new file mode 100644 index 00000000000..bc9b9a736f6 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-style.rng @@ -0,0 +1,101 @@ + + + + SVG 1.1 Style Module + file: svg-style.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-style.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Style + + style + + This module declares markup to provide support for stylesheet. + + + Datatypes + + + + + + + + + + comma-separated list of media descriptors. + + + + + SVG.Style.attrib + + + + + + + + + + + + + + + + + + + SVG.Style.class + + + + + + + + + + + + style: Style Element + + + + + + + + + + + + + + preserve + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-text.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-text.rng new file mode 100644 index 00000000000..d0740889641 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-text.rng @@ -0,0 +1,572 @@ + + + + SVG 1.1 Text Module + file: svg-text.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-text.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Text + + text, tspan, tref, textPath, altGlyph, altGlyphDef, altGlyphItem, + glyphRef + + This module declares markup to provide support for alternate glyph. + + + + Datatypes + + + + + + + + + + + + + + + + + + + + + + + + SVG.Text.attrib + + + + + + + + + lr-tb + rl-tb + tb-rl + lr + rl + tb + inherit + + + + + + + SVG.TextContent.attrib + + + + + + + + + auto + baseline + before-edge + text-before-edge + middle + central + after-edge + text-after-edge + ideographic + alphabetic + hanging + mathematical + inherit + + + + + + + + + + + + ltr + rtl + inherit + + + + + + + auto + use-script + no-change + reset-size + ideographic + alphabetic + hanging + mathematical + central + middle + text-after-edge + text-before-edge + inherit + + + + + + + + + + + + + + + + + + + + + + + + + + + start + middle + end + inherit + + + + + + + + + + + + normal + embed + bidi-override + inherit + + + + + + + + + + + + + + + + + + + + normal + wider + narrower + ultra-condensed + extra-condensed + condensed + semi-condensed + semi-expanded + expanded + extra-expanded + ultra-expanded + inherit + + + + + + + normal + small-caps + inherit + + + + + + + extend SVG.Text.class + + + + + + extend SVG.TextContent.class + + + + + + + + + text: Text Element + + + + + + + + + + + + + + + + + + + + + + + + + + spacing + spacingAndGlyphs + + + + + + tspan: Text Span Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + spacing + spacingAndGlyphs + + + + + + tref: Text Reference Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + spacing + spacingAndGlyphs + + + + + + textPath: Text Path Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + spacing + spacingAndGlyphs + + + + + + + align + stretch + + + + + + + auto + exact + + + + + + altGlyph: Alternate Glyph Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + altGlyphDef: Alternate Glyph Definition Element + + + + + + + + altGlyphItem: Alternate Glyph Item Element + + + + + + + + + + + + + + + + + glyphRef: Glyph Reference Element + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-view.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-view.rng new file mode 100644 index 00000000000..2b26547d2f8 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-view.rng @@ -0,0 +1,70 @@ + + + + SVG 1.1 View Module + file: svg-view.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-view.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + View + + view + + This module declares markup to provide support for view. + + + SVG.View.class + + + + + + + + + + + + view: View Element + + + + + + + + + + + + + + + + + + + + + + + + + + + + + disable + magnify + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-viewport-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-viewport-attrib.rng new file mode 100644 index 00000000000..1578d27ceb3 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-viewport-attrib.rng @@ -0,0 +1,53 @@ + + + + SVG 1.1 Viewport Attribute Module + file: svg-viewport-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-viewport-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + Viewport Attribute + + clip, overflow + + This module defines the Viewport attribute set. + + + + 'clip' property/attribute value (e.g., 'auto', rect(...)) + + + + + + + + + + + + + + + visible + hidden + scroll + auto + inherit + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg-xlink-attrib.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg-xlink-attrib.rng new file mode 100644 index 00000000000..0f1a65dffef --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg-xlink-attrib.rng @@ -0,0 +1,173 @@ + + + + SVG 1.1 XLink Attribute Module + file: svg-xlink-attrib.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + Copyright 2001, 2002 W3C (MIT, INRIA, Keio), All Rights Reserved. + + $Id: svg-xlink-attrib.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + + XLink Attribute + + type, href, role, arcrole, title, show, actuate + + This module defines the XLink, XLinkRequired, XLinkEmbed, and + XLinkReplace attribute set. + + + + + + + + simple + + + + + + + + + + + + + + + + + + + + + + + other + + + + + onLoad + + + + + + + + + + + simple + + + + + + + + + + + + + + + + + + + + + other + + + + + onLoad + + + + + + + + + + + simple + + + + + + + + + + + + + + + + + + + + + embed + + + + + onLoad + + + + + + + + + + + simple + + + + + + + + + + + + + + + + + + + + + + new + replace + + + + + + onRequest + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/svg11.rng b/Master/texmf-dist/source/latex/stex/schema/rng/svg11.rng new file mode 100644 index 00000000000..76600ad1f31 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/svg11.rng @@ -0,0 +1,188 @@ + + + + RELAX NG schema for SVG 1.1 + file: svg11.rng + + This is SVG, a language for describing two-dimensional graphics in XML. + + The Scalable Vector Graphics (SVG) + Copyright 2001, 2002 World Wide Web Consortium + (Massachusetts Institute of Technology, Institut National de + Recherche en Informatique et en Automatique, Keio University). + All Rights Reserved. + + Permission to use, copy, modify and distribute this RELAX NG schema + for SVG and its accompanying documentation for any purpose and without + fee is hereby granted in perpetuity, provided that the above copyright + notice and this paragraph appear in all copies. The copyright holders + nor the author make no representation about the suitability of this + RELAX NG schema for any purpose. + + It is provided "as is" without expressed or implied warranty. + + Author: Masayasu Ishikawa (mimasa@w3.org) + $Id: svg11.rng,v 1.1 2003/07/15 07:11:10 dean Exp $ + + This is the driver file for version 1.1 of the SVG RELAX NG schema. + + The DTD version is identified by the PUBLIC and SYSTEM identifiers: + + PUBLIC "-//W3C//DTD SVG 1.1//EN" + SYSTEM "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" + + Use this URI to identify the default namespace: + + "http://www.w3.org/2000/svg" + + + + Container Attribute Module + + + + + Viewport Attribute Module + + + + + Paint Attribute Module + + + + + Paint Opacity Attribute Module + + + + + Graphics Attribute Module + + + + + Document Events Attribute Module + + + + + Graphical Element Events Attribute Module + + + + + Animation Events Attribute Module + + + + + XLink Attribute Module + + + + + External Resources Attribute Module + + + + + Structure Module (required) + + + + + Conditional Processing Module + + + + + Image Module + + + + + Style Module + + + + + Shape Module + + + + + Text Module + + + + + Marker Module + + + + + Color Profile Module + + + + + Gradient Module + + + + + Pattern Module + + + + + Clip Module + + + + + Mask Module + + + + + Filter Module + + + + + Cursor Module + + + + + Hyperlinking Module + + + + + View Module + + + + + Scripting Module + + + + + Animation Module + + + + + Font Module + + + + + Extensibility Module + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-applet.rng b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-applet.rng new file mode 100644 index 00000000000..5913d0b3339 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-applet.rng @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-attribs.rng b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-attribs.rng new file mode 100644 index 00000000000..c2f8edfa754 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-attribs.rng @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-base.rng b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-base.rng new file mode 100644 index 00000000000..468bfcd25d6 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-base.rng @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-basic-table.rng b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-basic-table.rng new file mode 100644 index 00000000000..ab51f61c17f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-basic-table.rng @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + left + center + right + + + + + + + + + top + middle + bottom + + + + + + + + + row + col + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-bdo.rng b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-bdo.rng new file mode 100644 index 00000000000..0ae52c536d7 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-bdo.rng @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + ltr + rtl + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-datatypes.rng b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-datatypes.rng new file mode 100644 index 00000000000..21c1816c665 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-datatypes.rng @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-hypertext.rng b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-hypertext.rng new file mode 100644 index 00000000000..c926915bb7d --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-hypertext.rng @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-image.rng b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-image.rng new file mode 100644 index 00000000000..562eae86c96 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-image.rng @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-inlstyle.rng b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-inlstyle.rng new file mode 100644 index 00000000000..887146be00c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-inlstyle.rng @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-link.rng b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-link.rng new file mode 100644 index 00000000000..309e66f38cb --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-link.rng @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-list.rng b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-list.rng new file mode 100644 index 00000000000..81ae3ba03a1 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-list.rng @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-object.rng b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-object.rng new file mode 100644 index 00000000000..118dbc6163e --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-object.rng @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + declare + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-param.rng b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-param.rng new file mode 100644 index 00000000000..22b8df19182 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-param.rng @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + data + ref + object + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-table.rng b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-table.rng new file mode 100644 index 00000000000..89d5acc42a5 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-table.rng @@ -0,0 +1,263 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + left + center + right + justify + char + + + + + + + + + + + + + + + + + + + + top + middle + bottom + baseline + + + + + + + + + row + col + rowgroup + colgroup + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + void + above + below + hsides + lhs + rhs + vsides + box + border + + + + + + + + + none + groups + rows + cols + all + + + + + diff --git a/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-text.rng b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-text.rng new file mode 100644 index 00000000000..ac6fb26901c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/schema/rng/xhtml-text.rng @@ -0,0 +1,307 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + preserve + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/sproof/sproof.dtx b/Master/texmf-dist/source/latex/stex/sproof/sproof.dtx new file mode 100644 index 00000000000..ca5baa3660c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/sproof/sproof.dtx @@ -0,0 +1,834 @@ +% \iffalse meta-comment +% An Infrastructure for Structural Markup for Proofs +% Copyright (C) 2004-2011 Michael Kohlhase, all rights reserved +% this file is released under the +% LaTeX Project Public License (LPPL) +% +% The development version of this file can be found at +% $URL: https://svn.kwarc.info/repos/stex/trunk/sty/sproof/sproof.dtx $ +% $Rev: 1999 $; last modified by $Author: kohlhase $ +% $Date: 2012-01-28 08:32:11 +0100 (Sat, 28 Jan 2012) $ +% \fi +% +% \iffalse +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\ProvidesPackage{sproof}[2012/01/28 v1.0 Semantic Markup for Proofs] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{url,array,stex,float,moreverb} +\usepackage[show]{ed} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} +\usepackage{../ctansvn} +\usepackage{hyperref} +\usepackage[eso-foot,today]{svninfo} +\svnInfo $Id: sproof.dtx 1999 2012-01-28 07:32:11Z kohlhase $ +\svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/sproof/sproof.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{sproof.dtx}\end{document} +% +% \fi +% +% \CheckSum{315} +% +% \changes{v0.9}{2005/06/14}{First Version with Documentation} +% \changes{v0.9a}{2005/07/01}{Completed Documentation} +% \changes{v0.9b}{2005/08/06}{Complete functionality and Updated Documentation} +% \changes{v0.9c}{2006/01/13}{more packaging} +% \changes{v0.9d}{2006/10/31}{made sproof.dtx independent of statements.dtx} +% \changes{v0.9d}{2006/10/31}{revamped the proof end mark management} +% \changes{v0.9e}{2008/10/11}{taking type seriously} +% \changes{v0.9f}{2009/12/14}{changing to omd metadata framework} +% \changes{v0.9f}{2008/12/14}{first steps to sref} +% \changes{v1.0}{2011/01/23}{making proof step labels stylable} +% +% \GetFileInfo{sproof.sty} +% +% \MakeShortVerb{\|} +%\def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} +% \def\xml{\scsys{Xml}} +% \def\mathml{\scsys{MathML}} +% \def\omdoc{\scsys{OMDoc}} +% \def\openmath{\scsys{OpenMath}} +% \def\latexml{\scsys{LaTeXML}} +% \def\perl{\scsys{Perl}} +% \def\cmathml{Content-{\sc MathML}\index{Content {\sc MathML}}\index{MathML@{\sc MathML}!content}} +% \def\activemath{\scsys{ActiveMath}} +% \def\twin#1#2{\index{#1!#2}\index{#2!#1}} +% \def\twintoo#1#2{{#1 #2}\twin{#1}{#2}} +% \def\atwin#1#2#3{\index{#1!#2!#3}\index{#3!#2 (#1)}} +% \def\atwintoo#1#2#3{{#1 #2 #3}\atwin{#1}{#2}{#3}} +% \title{{\texttt{sproof.sty}}: Structural Markup for Proofs\thanks{Version {\fileversion} (last revised +% {\filedate})}} +% \author{Michael Kohlhase\\ +% Jacobs University, Bremen\\ +% \url{http://kwarc.info/kohlhase}} +% \maketitle +% +% \begin{abstract} +% The |sproof| package is part of the {\stex} collection, a version of {\TeX/\LaTeX} that +% allows to markup {\TeX/\LaTeX} documents semantically without leaving the document +% format, essentially turning {\TeX/\LaTeX} into a document format for mathematical +% knowledge management (MKM). +% +% This package supplies macros and environment that allow to annotate the structure of +% mathematical proofs in {\stex} files. This structure can be used by MKM systems for +% added-value services, either directly from the {\sTeX} sources, or after translation. +% \end{abstract} +% +% \newpage\tableofcontents\newpage +% +%\section{Introduction}\label{sec:sproof} +% +% The |sproof| ({\twintoo{semantic}{proofs}}) package supplies macros and environment that +% allow to annotate the structure of mathematical proofs in {\stex} files. This structure +% can be used by MKM systems for added-value services, either directly from the {\sTeX} +% sources, or after translation. Even though it is part of the {\stex} collection, it can +% be used independently, like it's sister package |statements|. +% +% {\stex} is a version of {\TeX/\LaTeX} that allows to markup {\TeX/\LaTeX} documents +% semantically without leaving the document format, essentially turning {\TeX/\LaTeX} into +% a document format for mathematical knowledge management (MKM). +% +% \begin{exfig}\scriptsize +% \begin{verbatim} +% \begin{sproof}[id=simple-proof,for=sum-over-odds] +% {We prove that $\sum_{i=1}^n{2i-1}=n^{2}$ by induction over $n$} +% \begin{spfcases}{For the induction we have to consider the following cases:} +% \begin{spfcase}{$n=1$} +% \begin{spfstep}[display=flow] then we compute $1=1^2$\end{spfstep} +% \end{spfcase} +% \begin{spfcase}{$n=2$} +% \begin{sproofcomment}[display=flow] +% This case is not really necessary, but we do it for the +% fun of it (and to get more intuition). +% \end{sproofcomment} +% \begin{spfstep}[display=flow] We compute $1+3=2^{2}=4$.\end{spfstep} +% \end{spfcase} +% \begin{spfcase}{$n>1$} +% \begin{spfstep}[type=assumption,id=ind-hyp] +% Now, we assume that the assertion is true for a certain $k\geq 1$, +% i.e. $\sum_{i=1}^k{(2i-1)}=k^{2}$. +% \end{spfstep} +% \begin{sproofcomment} +% We have to show that we can derive the assertion for $n=k+1$ from +% this assumption, i.e. $\sum_{i=1}^{k+1}{(2i-1)}=(k+1)^{2}$. +% \end{sproofcomment} +% \begin{spfstep} +% We obtain $\sum_{i=1}^{k+1}{2i-1}=\sum_{i=1}^k{2i-1}+2(k+1)-1$ +% \begin{justification}[method=arith:split-sum] +% by splitting the sum. +% \end{justification} +% \end{spfstep} +% \begin{spfstep} +% Thus we have $\sum_{i=1}^{k+1}{(2i-1)}=k^2+2k+1$ +% \begin{justification}[method=fertilize] by inductive hypothesis.\end{justification} +% \end{spfstep} +% \begin{spfstep}[type=conclusion] +% We can \begin{justification}[method=simplify]simplify\end{justification} +% the right-hand side to ${k+1}^2$, which proves the assertion. +% \end{spfstep} +% \end{spfcase} +% \begin{spfstep}[type=conclusion] +% We have considered all the cases, so we have proven the assertion. +% \end{spfstep} +% \end{spfcases} +% \end{sproof} +% \end{verbatim} +% \vspace*{-.5cm} +% \caption{A very explicit proof, marked up semantically}\label{fig:proof:src} +% \end{exfig} +% +% We will go over the general intuition by way of our running example (see +% Figure~\ref{fig:proof:src} for the source and Figure~\ref{fig:proof:result} for the +% formatted result).\ednote{talk a bit more about proofs and their structure,... maybe +% copy from OMDoc spec. } +% +% \section{The User Interface} +% +% \subsection{Package Options}\label{sec:user:options} +% +% The |sproof| package takes a single option: \DescribeMacro{showmeta}|showmeta|. If +% this is set, then the metadata keys are shown (see~\cite{Kohlhase:metakeys:ctan} for details +% and customization options). +% +% \subsection{Proofs and Proof steps} +% +% \DescribeEnv{sproof} The |proof| environment is the main container for proofs. It takes +% an optional |KeyVal| argument that allows to specify the |id| (identifier) and |for| +% (for which assertion is this a proof) keys. The regular argument of the |proof| +% environment contains an introductory comment, that may be used to announce the proof +% style. The |proof| environment contains a sequence of |\step|, |proofcomment|, and +% |pfcases| environments that are used to markup the proof steps. The |proof| environment +% has a variant |Proof|, which does not use the proof end marker. This is convenient, if a +% proof ends in a case distinction, which brings it's own proof end marker with it. +% \DescribeEnv{sProof} The |Proof| environment is a variant of |proof| that does not mark +% the end of a proof with a little box; presumably, since one of the subproofs already has +% one and then a box supplied by the outer proof would generate an otherwise empty line. +% \DescribeMacro{\spfidea} The |\spfidea| macro allows to give a one-paragraph +% description of the proof idea. +% +% For one-line proof sketches, we use the \DescribeMacro{spfsketch}|\spfsketch| macro, +% which takes the |KeyVal| argument as |sproof| and another one: a natural language text +% that sketches the proof. +% +% \DescribeEnv{spfstep} Regular proof steps are marked up with the |step| environment, which +% takes an optional |KeyVal| argument for annotations. A proof step usually contains a +% local assertion (the text of the step) together with some kind of evidence that this can +% be derived from already established assertions. +% +% Note that both |\premise| and |\justarg| can be used with an empty second argument to +% mark up premises and arguments that are not explicitly mentioned in the text. +% +% \begin{exfig} +% \begin{sproof}[id=simple-proof,for=sum-over-odds] +% {We prove that $\sum_{i=1}^n{2i-1}=n^{2}$ by induction over $n$} +% \begin{spfcases}{For the induction we have to consider the following cases:} +% \begin{spfcase}{$n=1$} +% \begin{spfstep}[display=flow] then we compute $1=1^2$\end{spfstep} +% \end{spfcase} +% \begin{spfcase}{$n=2$} +% \begin{sproofcomment}[display=flow] +% This case is not really necessary, but we do it for the fun +% of it (and to get more intuition). +% \end{sproofcomment} +% \begin{spfstep}[display=flow] +% We compute $1+3=2^{2}=4$ +% \end{spfstep} +% \end{spfcase} +% \begin{spfcase}{$n>1$} +% \begin{spfstep}[type=hypothesis,id=ind-hyp] +% Now, we assume that the assertion is true for a certain $k\geq 1$, i.e. +% $\sum_{i=1}^k{(2i-1)}=k^{2}$. +% \end{spfstep} +% \begin{sproofcomment} +% We have to show that we can derive the assertion for $n=k+1$ from this +% assumption, i.e. $\sum_{i=1}^{k+1}{(2i-1)}=(k+1)^{2}$. +% \end{sproofcomment} +% \begin{spfstep}[id=splitit] +% We obtain $\sum_{i=1}^{k+1}{(2i-1)}=\sum_{i=1}^k{(2i-1)}+2(k+1)-1$ +% \begin{justification}[method=arith:split-sum] +% by splitting the sum +% \end{justification} +% \end{spfstep} +% \begin{spfstep}[id=byindhyp] +% Thus we have $\sum_{i=1}^{k+1}{(2i-1)}=k^2+2k+1$ +% \begin{justification}[method=fertilize] +% by \premise[ind-hyp]{inductive hypothesis}. +% \end{justification} +% \end{spfstep} +% \begin{spfstep}[type=conclusion] +% We can \begin{justification}[method=simplify-eq] +% simplify the {\justarg[rhs]{right-hand side}} +% \end{justification} to $(k+1)^2$, which proves the assertion. +% \end{spfstep} +% \end{spfcase} +% \begin{spfstep}[type=conclusion] +% We have considered all the cases, so we have proven the assertion. +% \end{spfstep} +% \end{spfcases} +% \end{sproof} +% \caption{The formatted result of the proof in Figure~\ref{fig:proof:src}}\label{fig:proof:result} +% \end{exfig} +% +% \subsection{Justifications} +% +% \DescribeEnv{justification} This evidence is marked up with the |justification| +% environment in the |sproof| package. This environment totally invisible to the formatted +% result; it wraps the text in the proof step that corresponds to the evidence. The +% environment takes an optional |KeyVal| argument, which can have the |method| key, whose +% value is the name of a proof method (this will only need to mean something to the +% application that consumes the semantic annotations). Furthermore, the justification can +% contain ``premises'' (specifications to assertions that were used justify the step) and +% ``arguments'' (other information taken into account by the proof method). +% +% \DescribeMacro{\premise} The |\premise| macro allows to mark up part of the text as +% reference to an assertion that is used in the argumentation. In the example in +% Figure~\ref{fig:proof:src} we have used the |\premise| macro to identify the inductive +% hypothesis. +% +% \DescribeMacro{\justarg} The |\justarg| macro is very similar to |\premise| with the +% difference that it is used to mark up arguments to the proof method. Therefore the +% content of the first argument is interpreted as a mathematical object rather than as an +% identifier as in the case of |\premise|. In our example, we specified that the +% simplification should take place on the right hand side of the equation. Other examples +% include proof methods that instantiate. Here we would indicate the substituted object in +% a |\justarg| macro. +% +% \subsection{Proof Structure} +% +% \DescribeEnv{spfcases} The |pfcases| environment is used to mark up a proof by +% cases. This environment takes an optional |KeyVal| argument for semantic annotations and +% a second argument that allows to specify an introductory comment (just like in the +% |proof| environment). +% +% \DescribeEnv{spfcase} The content of a |pfcases| environment are a sequence of case +% proofs marked up in the |pfcase| environment, which takes an optional |KeyVal| argument +% for semantic annotations. The second argument is used to specify the the description of +% the case under consideration. The content of a |pfcase| environment is the same as that +% of a |proof|, i.e. |step|s, |proofcomment|s, and |pfcases| environments. +% +% \DescribeEnv{sproofcomment} The |proofcomment| environment is much like a |step|, only +% that it does not have an object-level assertion of its own. Rather than asserting some +% fact that is relevant for the proof, it is used to explain where the proof is going, +% what we are attempting to to, or what we have achieved so far. As such, it cannot be the +% target of a |\premise|. +% +% \subsection{Proof End Markers} +% +% Traditionally, the end of a mathematical proof is marked with a little box at the end of +% the last line of the proof (if there is space and on the end of the next line if there +% isn't), like so:\sproofend +% +% The |sproof| package provides the \DescribeMacro{\sproofend}|\sproofend| macro for +% this. If a different symbol for the proof end is to be used (e.g. {\sl{q.e.d}}), then +% this can be obtained by specifying it using the +% \DescribeMacro{\sProofEndSymbol}|\sProofEndSymbol| configuration macro (e.g. by specifying +% |\sProofEndSymbol{q.e.d}|). +% +% Some of the proof structuring macros above will insert proof end symbols for sub-proofs, +% in most cases, this is desirable to make the proof structure explicit, but sometimes +% this wastes space (especially, if a proof ends in a case analysis which will supply its +% own proof end marker). To suppress it locally, just set |proofend={}| in them or use use +% |\sProofEndSymbol{}|. +% +% \subsection{Configuration of the Presentation}\label{sec:user:conf} +% +% Finally, we provide configuration hooks in Figure~\ref{fig:hooks} for the keywords in +% proofs. These are mainly intended for package authors building on |statements|, e.g. for +% multi-language support.\ednote{we might want to develop an extension +% \texttt{sproof-babel} in the future.}. +%\begin{figure}[ht]\centering +% \begin{tabular}{|lll|}\hline +% Environment & configuration macro & value\\\hline\hline +% \texttt{proof} & \texttt{\textbackslash spf@proof@kw} & \makeatletter\spf@proof@kw\\\hline +% \texttt{sketchproof} & \texttt{\textbackslash spf@sketchproof@kw} & \makeatletter\spf@proofsketch@kw\\\hline +% \end{tabular} +% \caption{Configuration Hooks for Semantic Proof Markup}\label{fig:hooks} +% \end{figure} +% The proof step labels can be customized via the +% \DescribeMacro{\pstlabelstyle}|\pstlabelstyle| macro: |\pstlabelstyle{|\meta{style}|}| +% sets the style; see Figure~\ref{fig:pstlabel} for an overview of styles. Package writers +% can add additional styles by adding a macro |\pst@make@label@|\meta{style} that takes +% two arguments: a comma-separated list of ordinals that make up the prefix and the current +% ordinal. Note that comma-separated lists can be conveniently iterated over by the +% {\LaTeX} |\@for|\ldots|:=|\ldots|\do{|\ldots|}| macro; see Figure~\ref{fig:pstlabel} for +% examples. +% +%\begin{figure}[ht]\centering\makeatletter\small +% \begin{tabular}{|lll|}\hline +% style & example& configuration macro\\\hline\hline +% \texttt{long} & \pst@make@label@long{0,8,1}{5} & \verb|\def\pst@make@label@long#1#2{\@for\@I:=#1\do{\@I.}#2}|\\\hline +% \texttt{angles} & \pst@make@label@angles{0,8,1}{5} & \verb|\def\pst@make@label@angles#1#2|\\ +% &&\quad\verb|{\ensuremath{\@for\@I:=#1\do{\rangle}}#2}|\\\hline +% \texttt{short} & \pst@make@label@short{0,8,1}{5} & \verb|\def\pst@make@label@short#1#2{#2}|\\\hline +% \texttt{empty} & \pst@make@label@empty{0,8,1}{5} & \verb|\def\pst@make@label@empty#1#2{}|\\\hline +% \end{tabular} +% \caption{Configuration Proof Step Label Styles}\label{fig:pstlabel} +% \end{figure} +% +% \section{Limitations}\label{sec:limitations} +% +% In this section we document known limitations. If you want to help alleviate them, +% please feel free to contact the package author. Some of them are currently discussed in +% the TRAC. +% \begin{compactenum} +% \item The numbering scheme of proofs cannot be changed. It is more geared for teaching +% proof structures (the author's main use case) and not for writing papers.\lec{reported +% by Tobias Pfeiffer; see \tracissue{1658}} (fixed) +% \item currently proof steps are formatted by the {\LaTeX} |description| environment. We +% would like to configure this, e.g. to use the |inparaenum| environment for more +% condensed proofs. I am just not sure what the best user interface would be I can +% imagine redefining an internal environment |spf@proofstep@list| or adding a key +% |prooflistenv| to the |proof| environment that allows to specify the environment +% directly. Maybe we should do both. +% \end{compactenum} +% +% +% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography} +% \newpage +% +% \section{The Implementation} +% +% The |sproof| package generates to 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 +% {\textsf{$\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. +% +% We first set up the Perl Packages for {\latexml} +% +% \begin{macrocode} +%<*ltxml> +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +RequirePackage('sref'); +%
+% \end{macrocode} +% +% \subsection{Package Options}\label{sec:impl:options} +% +% We declare some switches which will modify the behavior according to the package +% options. Generally, an option |xxx| will just set the appropriate switches to true +% (otherwise they stay false).\ednote{need an implementation for {\latexml}} +% +% \begin{macrocode} +%<*package> +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\ProcessOptions +% +%<*ltxml> +DeclareOption('showmeta',''); +% +% \end{macrocode} +% +% Then we make sure that the |sref| package is loaded~\ctancite{Kohlhase:sref}. +% \begin{macrocode} +%<*package> +\RequirePackage{sref} +% +% \end{macrocode} +% +% \subsection{Proofs}\label{sec:impl:proofs} +% +% We first define some keys for the |proof| environment. +% \begin{macrocode} +%<*package> +\srefaddidkey{spf} +\addmetakey*{spf}{display} +\addmetakey{spf}{for} +\addmetakey{spf}{from} +\addmetakey*[\sproof@box]{spf}{proofend} +\addmetakey{spf}{type} +\addmetakey*{spf}{title} +\addmetakey{spf}{continues} +\addmetakey{spf}{functions} +% +% \end{macrocode} +% +% \begin{macro}{\spf@flow} +% We define this macro, so that we can test whether the |display| key has the value |flow| +% \begin{macrocode} +%\def\spf@flow{flow} +% \end{macrocode} +% \end{macro} +% +% For proofs, we will have to have deeply nested structures of enumerated list-like +% environments. However, {\LaTeX} only allows |enumerate| environments up to nesting depth +% 4 and general list environments up to listing depth 6. This is not enough for us. +% Therefore we have decided to go along the route proposed by Leslie Lamport to use a +% single top-level list with dotted sequences of numbers to identify the position in the +% proof tree. Unfortunately, we could not use his |pf.sty| package directly, since it does +% not do automatic numbering, and we have to add keyword arguments all over the place, to +% accomodate semantic information. +% +% \begin{environment}{pst@with@label} +% This environment manages\footnote{This gets the labeling right but only works 8 levels +% deep} the path labeling of the proof steps in the description environment of the +% outermost |proof| environment. The argument is the label prefix up to now; which we +% cache in |\pst@label| (we need evaluate it first, since are in the right place +% now!). Then we increment the proof depth which is stored in |\count10| (lower counters +% are used by {\TeX} for page numbering) and initialize the next level counter +% |\count\count10| with 1. In the end call for this environment, we just decrease the +% proof depth counter by 1 again. +% \begin{macrocode} +%<*package> +\newenvironment{pst@with@label}[1]% +{\edef\pst@label{#1}\advance\count10 by 1\count\count10=1} +{\advance\count10 by -1} +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\the@pst@label} +% |\the@pst@label| evaluates to the current step label. +% \begin{macrocode} +\def\the@pst@label{\pst@make@label\pst@label{\number\count\count10}} +% \end{macrocode} +%\end{macro} +% +% \begin{macro}{\pstlabelstyle} +% |\pstlabelstyle| just sets the |\pst@make@label| macro according to the style. +% \begin{macrocode} +\def\pst@make@label@long#1#2{\@for\@I:=#1\do{\@I.}#2} +\def\pst@make@label@angles#1#2{\ensuremath{\@for\@I:=#1\do{\rangle}}#2} +\def\pst@make@label@short#1#2{#2} +\def\pst@make@label@empty#1#2{} +\def\pstlabelstyle#1{\def\pst@make@label{\@nameuse{pst@make@label@#1}}} +\pstlabelstyle{long} +% \end{macrocode} +%\end{macro} +% +% \begin{macro}{\next@pst@label} +% |\next@pst@label| increments the step label at the current level. +% \begin{macrocode} +\def\next@pst@label{\global\advance\count\count10 by 1} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\sproofend} +% This macro places a little box at the end of the line if there is space, or at the +% end of the next line if there isn't +% \begin{macrocode} +\def\sproof@box{\hbox{\vrule\vbox{\hrule width 6 pt\vskip 6pt\hrule}\vrule}} +\def\spf@proofend{\sproof@box} +\def\sproofend{\ifx\spf@proofend\@empty\else\hfil\null\nobreak\hfill\spf@proofend\par\smallskip\fi} +\def\sProofEndSymbol#1{\def\sproof@box{#1}} +% +%DefConstructor('\sproofend',""); +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{spf@*@kw} +% \begin{macrocode} +%<*package> +\def\spf@proofsketch@kw{Proof Sketch} +\def\spf@proof@kw{Proof} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{spfsketch} +% \begin{macrocode} +%<*package> +\newcommand{\spfsketch}[2][]{\metasetkeys{spf}{#1}\sref@target +\ifx\spf@display\spf@flow\else{\stDMemph{\ifx\spf@type\@empty\spf@proofsketch@kw\else\spf@type\fi}:}\fi{ #2}% +\sref@label@id{this \ifx\spf@type\@empty\spf@proofsketch@kw\else\spf@type\fi}} +% +%<*ltxml> +DefConstructor('\spfsketch OptionalKeyVals:pf{}', + "\n" + . "?#2(#2\n)()" + . "\n"); +DefConstructor('\sProofEndSymbol {}',''); +% +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{sproof} +% In this environment, we initialize the proof depth counter |\count10| to 10, and set +% up the description environment that will take the proof steps. At the end of the +% proof, we position the proof end into the last line. +% \begin{macrocode} +%<*package> +\newenvironment{spf@proof}[2][]{\metasetkeys{spf}{#1}\sref@target +\count10=10 +\ifx\spf@display\spf@flow\else{\stDMemph{\ifx\spf@type\@empty\spf@proof@kw\else\spf@type\fi}:}\fi{ #2}% +\sref@label@id{this \ifx\spf@type\@empty\spf@proof@kw\else\spf@type\fi} +\def\pst@label{}\newcount\pst@count% initialize the labeling mechanism +\begin{description}\begin{pst@with@label}{P}} +{\end{pst@with@label}\end{description}} +\newenvironment{sproof}[2][]{\begin{spf@proof}[#1]{#2}}{\sproofend\end{spf@proof}} +\newenvironment{sProof}[2][]{\begin{spf@proof}[#1]{#2}}{\end{spf@proof}} +% +%<*ltxml> +DefEnvironment('{sproof} OptionalKeyVals:pf{}', + "\n" + . "?#2(" + . "#2" + . "\n)()" + . "#body" + . "\n"); +DefMacro('\sProof','\sproof'); +DefMacro('\endsProof','\endsproof'); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{spfidea} +% \begin{macrocode} +%<*package> +\newcommand{\spfidea}[2][]{\metasetkeys{spf}{#1}% +\stDMemph{\ifx\spf@type\@empty{Proof Idea}\else\spf@type\fi:} #2\sproofend} +% +%<*ltxml> +DefConstructor('\spfidea OptionalKeyVals:pf {}', + "\n" + . "#2\n" + . "\n"); +% +% \end{macrocode} +% \end{environment} +% +% The next two environments (proof steps) and comments, are mostly semantical, they take +% |KeyVal| arguments that specify their semantic role. In draft mode, they read these +% values and show them. If the surrounding proof had |display=flow|, then no new |\item| is +% generated, otherwise it is. In any case, the proof step number (at the current level) is +% incremented. +% \begin{environment}{spfstep} +% \begin{macrocode} +%<*package> +\newenvironment{spfstep}[1][]{\metasetkeys{spf}{#1} +\ifx\spf@display\spf@flow\else\item[\the@pst@label]\fi +\ifx\spf@title\@empty\else{(\stDMemph{\spf@title})}\fi} +{\next@pst@label} +% +%<*ltxml> +DefEnvironment('{spfstep} OptionalKeyVals:pf', + "" + . "#body\n", + beforeConstruct=>sub { + $_[0]->maybeCloseElement('omdoc:CMP'); + });#$ +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{sproofcomment} +% \begin{macrocode} +%<*package> +\newenvironment{sproofcomment}[1][]{\metasetkeys{spf}{#1} +\ifx\spf@display\spf@flow\else\item[\the@pst@label]\fi} +{\next@pst@label} +% +%<*ltxml> +DefEnvironment('{sproofcomment} OptionalKeyVals:pf', + "" + . "#body" + . ""); +% +% \end{macrocode} +% \end{environment} +% +% The next two environments also take a |KeyVal| argument, but also a regular one, which +% contains a start text. Both environments start a new numbered proof level. +% +% \begin{environment}{spfcases} +% In the |pfcases| environment, the start text is displayed as the first comment of the +% proof. +% \begin{macrocode} +%<*package> +\newenvironment{spfcases}[2][]{\metasetkeys{spf}{#1} +\def\@test{#2}\ifx\@test\empty\else +\ifx\spf@display\spf@flow {#2}\else\item[\the@pst@label]{#2} \fi\fi +\begin{pst@with@label}{\pst@label,\number\count\count10}} +{\end{pst@with@label}\next@pst@label} +% +%<*ltxml> +DefEnvironment('{spfcases} OptionalKeyVals:pf {}', + "\n" + . "#2\n" + . "#body" + . "\n"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{spfcase} +% In the |pfcase| environment, the start text is displayed specification of the case +% after the |\item| +% \begin{macrocode} +%<*package> +\newenvironment{spfcase}[2][]{\metasetkeys{spf}{#1} +\ifx\spf@display\spf@flow\else\item[\the@pst@label]\fi +\def\@test{#2}\ifx\@test\@empty\else{\stDMemph{#2}:}\fi +\begin{pst@with@label}{\pst@label,\number\count\count10}} +{\ifx\spf@display\spf@flow\else\sproofend\fi\end{pst@with@label}\next@pst@label} +% +%<*ltxml> +DefEnvironment('{spfcase} OptionalKeyVals:pf{}', + "\n" + . "?#2(" + . "#2" + . "\n)()" + . "#body" + . "\n"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{subproof} +% In the |subproof| environment, a new (lower-level) proof environment is +% started.\ednote{document this above} +% \begin{macrocode} +%<*package> +\newenvironment{subproof}[1][]% +{\begin{pst@with@label}{\pst@label,\number\count\count10}} +{\ifx\spf@display\spf@flow\else\sproofend\fi\end{pst@with@label}} +% +%<*ltxml> +DefEnvironment('{subproof}[]', + "" + . "?#1(#1)()" + . "" + . "\n #body\n" + . "" + .""); +% +% \end{macrocode} +% \end{environment} +% +% \subsection{Justifications} +% +% We define the actions that are undertaken, when the keys for justifications are +% encountered. Here this is very simple, we just define an internal macro with the value, +% so that we can use it later. +% \begin{macrocode} +%<*package> +\srefaddidkey{just} +\addmetakey{just}{method} +\addmetakey{just}{premises} +\addmetakey{just}{args} +% +%<*ltxml> +DefKeyVal('just','id','Semiverbatim'); +DefKeyVal('just','method','Semiverbatim'); +DefKeyVal('just','premises','Semiverbatim'); +DefKeyVal('just','args','Semiverbatim'); +% +% \end{macrocode} +% +% The next three environments and macros are purely semantic, so we ignore the keyval +% arguments for now and only display the content.\ednote{need to do something about the +% premise in draft mode.} +% +% \begin{environment}{justification} +% \begin{macrocode} +%<*package> +\newenvironment{justification}[1][]{}{} +% +%<*ltxml> +sub extractBodyText { + my ($box, $remove) = @_; + my $str = ''; + my @boxes = $box->unlist; + foreach my $b(@boxes) { + my $s = ''; + if ($b =~ /LaTeXML::Whatsit/) { + my $body = $b->getBody; + $s = $body ? extractBodyText($body, $remove) : ''; + } elsif ($b =~ /LaTeXML::Box/) { + $s = $b->toString || ''; + @{$b}[0] = '' if $remove; } + $str .= $s; } + $str =~ s/\s+/ /g; + $str; } + +DefEnvironment('{justification} OptionalKeyVals:just', sub { + my ($doc, $keys, %props) = @_; + my $text = extractBodyText($props{body}, 1); + my $node = LookupValue('_LastSeenCMP'); + #$node->appendText($text) if $node; + my $method = $keys ? $keys->getValue('method') : undef; + $doc->openElement("omdoc:method", $method ? (xref => $method) : ()); + $doc->absorb($props{body}) if $props{body}; + $doc->closeElement("omdoc:method"); + return; }); +% +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\premise} +% \begin{macrocode} +%<*package> +\newcommand{\premise}[2][]{#2} +% +%<*ltxml> +DefMacro('\premise[]{}', sub { + my ($xref, $text) = ($_[1], $_[2]); + my @res = (T_CS('\premise@content')); + push(@res, T_OTHER('['), $xref->unlist, T_OTHER(']')) if $xref; + push(@res, T_SPACE, $text->unlist) if $text; + @res; }); +DefConstructor('\premise@content[]', + ""); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\justarg} +% the |\justarg| macro is purely semantic, so we ignore the keyval arguments for now and +% only display the content. +% \begin{macrocode} +%<*package> +\newcommand{\justarg}[2][]{#2} +% +%<*ltxml> +DefMacro('\justarg[]{}', sub { (($_[1] ? $_[1]->unlist : ()), + T_SPACE, $_[2]->unlist, T_SPACE); }); +Tag('omdoc:derive', afterClose=>sub { + my ($doc, $node) = @_; + my @children = grep($_->nodeType == XML_ELEMENT_NODE, $node->childNodes); + my $firstCMP = undef; + foreach my $child(@children) { + next unless ($child->localname || '') eq 'CMP'; + if ($child->hasChildNodes()) { + next unless $#{$child->childNodes} == 0; + next unless $child->firstChild->nodeType == XML_TEXT_NODE; } + + if ($firstCMP) { + $firstCMP->appendText($child->textContent); + $node->removeChild($child); + } else { $firstCMP = $child; } + } + });#$ +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Providing IDs for {\omdoc} Elements}\label{sec:impl:ids} +% +% To provide default identifiers, we tag all {\omdoc} +% elements that allow |xml:id| attributes by executing the |numberIt| procedure from |omdoc.sty.ltxml|. +% +% \begin{macrocode} +%<*ltxml> +Tag('omdoc:proof',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:derive',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:method',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:premise',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:derive',afterOpen=>\&numberIt,afterClose=>\&locateIt); +% +% \end{macrocode} +% +% \section{Finale} +% +% Finally, we need to terminate the file with a success mark for perl. +% \begin{macrocode} +%1; +% \end{macrocode} +% \Finale +\endinput + +%%% Local Variables: +%%% mode: doctex +%%% TeX-master: t +%%% End: +% LocalWords: GPL structuresharing STR sproof dtx CPERL keyval methodfalse env +% LocalWords: methodtrue envtrue medhodtrue DefKeyVal Semiverbatim omdoc args +% LocalWords: DefEnvironment OptionalKeyVals KeyVal omtext DefConstructor str +% LocalWords: proofidea KeyVal pfstep DefCMPEnvironment KeyVal proofcomment eq +% LocalWords: KeyVal pfcases KeyVal pfcase KeyVal extractBodyText unlist elsif +% LocalWords: foreach getBody toString str str str LookupValue LastSeenCMP Thu +% LocalWords: appendText getValue undef openElement closeElement DefMacro omd +% LocalWords: afterClose nodeType childNodes firstCMP localname hasChildNodes +% LocalWords: firstChild textContent removeChild iffalse kohlhase sref scsys +% LocalWords: sproofs.sty sc sc mathml openmath latexml cmathml activemath geq +% LocalWords: twintoo atwin atwintoo texttt fileversion maketitle stex newpage +% LocalWords: tableofcontents newpage exfig scriptsize vspace ednote spfidea +% LocalWords: spfidea spfsketch spfsketch spfstep justarg spfcases spfcase rhs +% LocalWords: sproofcomment ind-hyp splitit arith byindhyp sproofend proofend +% LocalWords: printbibliography textsf langle textsf langle ltxml ctancite spf +% LocalWords: srefaddidkey pf.sty newenvironment hbox vrule vbox ifx showmeta +% LocalWords: hrule vskip hrule vrule hfil nobreak hfill smallskip newcommand +% LocalWords: stDMemph newcount endsproof xref doctex showmeta hline lec ldots +% LocalWords: textbackslash makeatletter sketchproof compactenum tracissue +% LocalWords: metakeys addmetakey metasetkeys stylable pstlabelstyle pstlabel +% LocalWords: pstlabelstyle pstlabelstyle ldots ldots ensuremath inparaenum +% LocalWords: nameuse prooflistenv diff --git a/Master/texmf-dist/source/latex/stex/sproof/sproof.ins b/Master/texmf-dist/source/latex/stex/sproof/sproof.ins new file mode 100644 index 00000000000..639af148fdc --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/sproof/sproof.ins @@ -0,0 +1,38 @@ +%% +%% This file generates files required to use the ed package. +%% At your command prompt write +%% +%% latex sproof.ins +%% +%% Copyright(c) 2005 Michael Kohlhase +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{sproof.sty}{\from{sproof.dtx}{package}}} + +\Msg{*} +\Msg{* You probably need to move the generated style files into a directory searched by TeX.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\nopreamble\nopostamble +\generate{\file{sproof.sty.ltxml}{\from{sproof.dtx}{ltxml}}} + +\Msg{*} +\Msg{* You probably need to move the generated ltxml files into a directory searched by LaTeXML.} +\Msg{*} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/stex/sref/sref.dtx b/Master/texmf-dist/source/latex/stex/sref/sref.dtx new file mode 100644 index 00000000000..dca5ed8371e --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/sref/sref.dtx @@ -0,0 +1,850 @@ +% \iffalse meta-comment +% A LaTeX Class and Package for Semantic Cross-Referencing +% Copyright (c) 2009 Michael Kohlhase, all rights reserved +% this file is released under the +% LaTeX Project Public License (LPPL) +% +% The development version of this file can be found at +% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/sref/sref.dtx $ +% \fi +% +% \iffalse +%<*package> +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{sref}[2012/01/28 v1.0 Semantic Cross-References] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{url,array,float} +\usepackage[show]{ed} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} +\usepackage{stex-logo,sref} +\usepackage{../ctansvn} +\usepackage{hyperref} +\usepackage[eso-foot,today]{svninfo} +\svnInfo $Id: sref.dtx 1999 2012-01-28 07:32:11Z kohlhase $ +\svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/sref/sref.dtx $ +\makeindex +\floatstyle{boxed} +\newfloat{exfig}{thp}{lop} +\floatname{exfig}{Example} +\newcommand\tracissue[1]{\cite{sTeX:online}, \hyperlink{http://trac.kwarc.info/sTeX/ticket/#1}{issue #1}} +\begin{document}\DocInput{sref.dtx}\end{document} +% +% \fi +% +%\CheckSum{316} +% +% \changes{v0.5}{2008/03/28}{split off from omdoc.sty} +% \changes{v0.6}{2009/12/07}{introducing sequation} +% \changes{v0.9}{2009/07/14}{using omd for metadata} +% \changes{v1.0}{2011/12/20}{adding \texttt{\textbackslash sreflabel}} +% +% \GetFileInfo{sref.sty} +% +% \MakeShortVerb{\|} +% +% \def\omdoc{OMDoc} +% \def\latexml{{\LaTeX}ML} +% \title{{\texttt{sref.sty}}: Semantic Cross-Referencing in {\LaTeX}\thanks{Version {\fileversion} (last revised +% {\filedate})}} +% \author{Michael Kohlhase\\ +% Jacobs University, Bremen\\ +% \url{http://kwarc.info/kohlhase}} +% \maketitle +% +% \begin{abstract} +% The |sref| package is part of the {\sTeX} collection, a version of {\TeX/\LaTeX} that +% allows to markup {\TeX/\LaTeX} documents semantically without leaving the document +% format, essentially turning {\TeX/\LaTeX} into a document format for mathematical +% knowledge management (MKM). +% +% The |sref| package supplies an for semantic cross-referencing over multiple documents. +% \end{abstract} +% +%\tableofcontents\newpage +% +% \section{Introduction}\label{sec:intro} +% +% The automatic computation of cross-references is one of the traditional strong points of +% {\LaTeX}. However, cross-referencing is limited to labels in the current document +% only. Cross-referencing between multiple documents in a jointly developed document +% collection is not easy to achieve in the {\LaTeX} processing model, which reads files +% sequentially and lacks a path concept. +% +% The |sref| package is mainly aimed at package developers. It supplies the internal +% macros that can be used to make document structuring elements cross-referencable. The +% general strategy here is to equip the document structuring macros with an +% \DescribeMacro{id}|id| key, so that the author can specify meaningful ones, but to let +% the transformation give default ones if the author did not. The value of the |id| key +% can also be used for cross-referencing like the |\label|/|\ref| mechanism in +% {\LaTeX}. We implement an independent referencing mechanism, since the referencing model +% is geared more towards referencing text fragments than text fragment labels like section +% numbers. Therefore we let the referenced fragments define the reference text much like +% the |\autoref| macro from |\hpyerref|. +% +% \section{The User Interface}\label{sec:user} +% +% This package is currently mainly meaningful in the context of the {\sTeX} collection, +% since all cross-referencable macros and environments must be extended to know about their +% referencing mechanism. We explain the user interface in \sref{sucrossref}. To +% port the functionality to other {\LaTeX} classes and packages, they have to be upgraded +% via the API in \sref{supackage-authors}. +% +% \subsection{Package Options}\label{sec:user:options} +% +% The |sref| package has the \DescribeMacro{extrefs}|extrefs| package option, which can be +% set to activate multifile support (see \sref{suinterdoc}). If the +% \DescribeMacro{showmeta}|showmeta| is set, then the metadata keys are shown +% (see~\cite{Kohlhase:metakeys:ctan} for details and customization options). +% +% \subsection{Cross-Referencing}\sreflabel{Section}{sucrossref} +% +% The \DescribeMacro{\sref}|\sref{|\meta{id}|}| macro is the main cross-referencing macro, +% see Figure~\ref{fig:mysection} for an example. Depending on the whether macro or +% environment marking up the respective document fragment carries the key/value pair +% |id=|\meta{id} the cross-reference will expand to ``Section 2.1'' or ``this remark'', +% both carrying hyper-references. The |\sref| macro takes an optional argument that allows +% to specify a link text that overrides the auto-generated one. +% +% \begin{exfig} +% \begin{verbatim} +% \mysection[id=foo]{#2} +% ... \sref{foo} ... +% \end{verbatim} +% \vspace*{-1.5em} +% \caption{Semantic Crossreferencing}\label{fig:mysection} +% \end{exfig} +% +% The \DescribeMacro{\sreflabel}|\sreflabel|\footnote{It would have been more natural to +% name the macro \texttt{slabel}, but this is overwritten by other packages without +% warning.} macro is a variant to the |\label| macro provided by {\LaTeX} proper. It takes +% two arguments, the first one is a classification (used in |\sref|) and the second one +% the identifier. +% +% The +% \DescribeMacro{\srefs}|\srefl{|\meta{id\textsuperscript{1}}|}{|\meta{id\textsuperscript{2}}|}| +% is a variant it |\sref|, only that it allows to reference two semantic objects and +% expands to ``\meta{reference\textsuperscript{1}} and +% \meta{reference\textsuperscript{2}}''. \DescribeMacro{\srefl}|\srefl{|\meta{id\textsuperscript{1}}|}{|\meta{id\textsuperscript{n}}|}| +% is similar, but for ranges; it expands to ``\meta{reference\textsuperscript{1}} to +% \meta{reference\textsuperscript{n}}''. Its use should be restricted to cases, where the +% types of objects references are homogenous. +% +% Finally, there is a variant \DescribeMacro{\spageref}|\spageref| that only outputs the +% page number of the referenced object. It can be used in cases where no hyper-referencing +% is present. It uses the macro \DescribeMacro{\sref@page@label}|\sref@page@label| for +% styling the page reference. Redefining this will allows to customize this. The default +% setting is +% \begin{verbatim} +% \newcommand{\sref@page@label}[1]{p.~{#1}} +% \end{verbatim} +% +% \subsection{An API for Package Authors}\sreflabel{Section}{supackage-authors} +% +% To make use of the |sref| package, the package must define the document structuring +% infrastructure using the |sref| internal macros. The {\sTeX} packages already does this, +% so we make an example here for a slightly upgraded sectioning command in +% Figure~\ref{fig:mysection:setup}. The first three lines define the keys for the keyval +% attribute of the |\mysection| command using the infrastructure supplied by the |omd| +% package~\ctancite{Kohlhase:metakeys} (remember the |\RequirePackage{metakeys}|). The first two just +% initialize the keys to save the key values in internal macros, and the |\metasetkeys| +% activates the keys when reading the keyval argument. The +% \DescribeMacro{\srefaddidkey}|\srefaddidkey| macro is a variant of |\addmetakey| macro +% supplied by the |sref| package that sets up the keys to set the +% \DescribeMacro{\sref@id}|\sref@id| register for later use by the |sref| +% infrastructure. Note that the |\srefaddidkey| macro uses the |prefix| key to +% systematically construct prefixed identifiers. This can be useful in particular for +% sectioning commands. +% +% \begin{exfig} +% \begin{verbatim} +% \addmetakey{sec}{short} +% \addmetakey[black]{sec}{color} +% \srefaddidkey[prefix=sec.]{sec} +% \newcommand{\mysection}[2][]{\metasetkeys{#1}\sref@target\color{\sec@color} +% \section[\sec@short]{#2}\sref@label@id{Section \thesection}} +% \end{verbatim} +% \vspace*{-1.5em} +% \caption{A slightly upgraded sectioning command}\label{fig:mysection:setup} +% \end{exfig} +% +% In this situation, the |\mysection| macro processes the optional argument with +% |\metasetkeys| and then sets the color of the section. The +% \DescribeMacro{\sref@target}|\sref@target| sets up the hypertarget for the |hyperref| +% package to use. Then we use the regular |\section| command, and we use the +% \DescribeMacro{\sref@label@id}|\sref@label@id| macro to define the label that the +% |\sref| macro will use for cross-referencing. +% +% Note that the use of the straight use of the label ``Section'', which will be written +% into the auxiliary files is bad practice since it is not configurable. It would be much +% better to make it configurable via a presentation macro like |\my@section@label| in +% Figure~\ref{fig:mysection:configurable}. Then translators or even the user could redefine +% the |\my@section@label| to adapt them to their needs. +% +% \begin{exfig} +% \begin{verbatim} +% \newcommand{\my@section@label}[1]{Section~{#1}} +% \newcommand{\mysection}[2][]{\metasetkeys{#1}\sref@target\color{\sec@color} +% \section[\sec@short]{#2}\sref@label@id{\my@section@label\thesection}} +% \end{verbatim} +% \vspace*{-1.5em} +% \caption{A Sectioning Command with Configurable Label}\label{fig:mysection:configurable} +% \end{exfig} +% +% \subsection{Inter-Document Cross-Referencing}\sreflabel{Section}{suinterdoc} +% +% |sref.sty| provides inter-document cross-referencing. The use case is simple: we want to +% have a document collection (e.g. a book with conference proceedings), but also want to +% be able format the individual documents separately, and still have meaningful +% cross-references. To show off the possibilities, let us assume that we have a book with +% two separate papers, which we put into separate directories |idc| and |scr| to minimize +% interference between the authors Jane Doe and John Bull. To achieve this, we would set +% up paper driver files |main.tex| like the one in Figure~\ref{fig:paper-driver} in the +% two directories. These use the \DescribeMacro{\makeextrefs}|\makeextrefs| macro, which +% causes the |sref| package to generate a {\emph{external references file}} +% |main.refs|. Note that the |\makeextrefs| macros reads the previous |main.refs| file so +% that forward-referencing is possible (in the pass after a reference was labeled). +% +% \begin{exfig} +% \begin{verbatim} +% \documentclass{article} +% \usepackage[extrefs]{sref} +% \makeextrefs{idc} +% \inputrefs{scr}{../scr/main} +% \extrefstyle{scr}{\cite[\protect{\theextref}]{Doe09}} +% \title{Inter-Document Crossreferencing} +% \author{John Bull\\...} +% \begin{document}\maketitle\input{paper}\end{document} +% \end{verbatim} +% \vspace*{-2em} +% \caption{A document driver {\texttt{idc/main.tex}} for a paper}\label{fig:paper-driver} +% \end{exfig} +% +% The external references file can be read by other documents; in +% Figure~\ref{fig:paper-driver}, we read the references file of Jane Doe's paper via the +% \DescribeMacro{\inputrefs}|\inputrefs| macro. This allows John Bull to use\footnote{Note +% that the external references file is updated every time {\LaTeX} is run, so that +% references may be off by one version.} references like +% \DescribeMacro{\extref}|\extref{scr}{foo}| to reference document fragments in Jane Doe's +% paper she has labeled with the {\emph{reference prefix}} |\sreflabel{foo}| (assuming that +% she has added |\makeextrefs{scr}| in the preamble of her paper). Note that just as the +% |\sref| macro |\extref| takes an optional first argument that allows to specify the link +% text. Here, John Bull uses the \DescribeMacro{\extrefstyle}|\extrefstyle| macro to +% specify how the externa references are to be formatted, in this case he decided to use a +% {\LaTeX} citation. Generally, first argument of the |\extrefstyle| macro is the +% reference prefix which should be configured, and the second is the format, where the +% \DescribeMacro{\theextref}|\theextref| macro expands to the cross-reference. In this +% case, John chose to use a bib{\TeX} citation (he has an entry |Doe09| in his database) +% for the reference to the external paper. +% +% As the content of the respective paper is input from a file |paper.tex| in the +% individual papers, we can re-use these in the book. To do this we set up a book driver +% file like the one in Figure~\ref{fig:book-driver}. This one does not use the |extrefs| +% option, so the references are written to the |.aux| file. Furthermore |\extref| is +% redefined to act like |\sref| disregarding the first required argument. Thus all +% references work like they should. +% \begin{exfig} +% \begin{verbatim} +% \documentclass{book} +% \usepackage{sref} +% \title{Cross-Referencing in {\LaTeX}} +% \author{Elder Reseacher} +% \begin{document} +% \maketitle +% \chapter{Semantic Crossreferencing (Jane Doe, ...)} +% \input{scr/paper}\newpage +% ... +% \chapter{Inter-Document Crossreferencing (John Bull, ...)} +% \input{idc/paper}\newpage +% \end{document} +% \end{verbatim} +% \vspace*{-2em} +% \caption{A document driver for the book assembling the papers}\label{fig:book-driver} +% \end{exfig} +% +% This example has been carried through (without the separation of chapters in to +% subdirectories) in the files accompanying the source distribution of the |sref| +% package. They are used for testing the package. +% +% \subsection{Semantic Versions of Commonly used Referencing Commands}\label{sec:user:common} +% +% The |sref| package defines semantically referencable versions of commonly used {\LaTeX} +% environments and command sequences.\footnote{This section will be extended by need, so +% if you miss some semantic environment, please contact the package author, or (better) +% file an issue at~\cite{sTeX:online})} +% +% The \DescribeEnv{sequation}|sequation| environment takes an optional key/value argument +% that allows to specify an identifier and unifies the behavior of the |equation| (if an +% |id| key is given) and |displaymath| (else) environments. So the markup +% \begin{exfig} +% \begin{verbatim} +% A semantic equation with id +% \begin{sequation}[id=foo] +% e^{mc}=-1 +% \end{sequation} +% and another one without id +% \begin{sequation} +% e^{mc}=-1 +% \end{sequation} +% now, we reference the first equation: {\sref{foo}} +% \end{verbatim} +% \vspace*{-1.5em}\hrule +% yields the result:\hrule +% A semantic equation with id +% \begin{sequation}[id=foo] +% e^{mc}=-1 +% \end{sequation} +% and another one without id +% \begin{sequation} +% e^{mc}=-1 +% \end{sequation} +% now, we reference the first equation: {\sref{foo}} +% \caption{Semantic Equation}\label{fig:sequation} +% \end{exfig} +% +% \subsection{Semantic Citations}\label{sec:user:citations} +% +% \withcite{Patashnik:b88}{bib\TeX} and \withcite{Lehmann:biblatex10}{bib\LaTeX} provide a +% semi-semantic way of referencing literature. If we look at the +% \begin{withcitation}{LasSwi:rdf99} +% current practice of citing from an RDF standpoint~\citeit which views links as +% subject/predicate/object triples, +% \end{withcitation} +% then the treatment of the predicate and object are semantic, but the subject is hinted +% at by mere juxtaposition in the text. The |sref| package helps out here via the +% \DescribeMacro{\withcite} macro for short subjects (in the second argument) that are +% postfixed by the citation (key in the first argument). For instance the occurrence at +% the beginning of this paragraph was created by +% \begin{verbatim} +% \withcite{Patashnik:b88}{bib\TeX} +% \end{verbatim} +% The general case is covered by the \DescribeEnv{withcitation}|withcitation| environment +% for long subjects. In the latter, the citation can be placed by the +% \DescribeMacro{\citeit}. For instance, the second sentence was marked up as +% \begin{verbatim} +% If we look at the +% \begin{withcitation}{LasSwi:rdf99} +% current practice of citing from an RDF standpoint which views links as +% subject/predicate/object triples, +% \end{withcitation} +% then the treatment of the predicate ... +% \end{verbatim} +% The advantage of this treatment is that the meaning of the reference is fully marked up +% and can be taken advantage of in the \omdoc transformation, from which RDF triples can +% then be harvested for a linked open data treatment. +% +% \section{Limitations}\label{sec:limitations} +% +% In this section we document known limitations. If you want to help alleviate them, +% please feel free to contact the package author. Some of them are currently discussed in +% the \sTeX TRAC~\cite{sTeX:online}. +% \begin{compactenum} +% \item none reported yet +% \end{compactenum} +% +% \StopEventually{\newpage\PrintIndex\newpage\PrintChanges\printbibliography} +% \newpage +% +% \section{Implementation}\label{sec:impl} +% +% The |sref| 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. +% +% We first set up header information for the {\latexml} binding file. +% \begin{macrocode} +%<*ltxml> +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +% +% \end{macrocode} +% +% \subsection{Package Options}\label{sec:impl:options} +% +% We declare some switches which will modify the behavior according to the package +% options. Generally, an option |xxx| will just set the appropriate switches to true +% (otherwise they stay false).\ednote{need an implementation for {\latexml}} +% +% \begin{macrocode} +%<*package> +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\newif\ifextrefs\extrefsfalse +\DeclareOption{extrefs}{\extrefstrue} +\ProcessOptions +% +%<*ltxml> +DeclareOption('extrefs',''); +% +% \end{macrocode} +% +% Then we need to set up the packages by requiring the |metakeys| package~\ctancite{Kohlhase:metakeys} +% to be loaded (in the right version). +% +% \begin{macrocode} +%<*package> +\RequirePackage{metakeys} +% +%RequirePackage('metakeys'); +% \end{macrocode} +% +% \subsection{Crossreferencing}\label{sec:impl:crossref} +% +% The following user-level macros just use the |\sref@hlink| macros in various ways for +% internal referencing.\ednote{they need implementation in LaTeXML, the ones here only are +% stubs to make the error messages shut up.} +% +% \begin{macro}{\sref} +% \begin{macrocode} +%<*package> +\newcommand{\sref}[2][]{% +\@ifundefined{sref@part}{\sref@hlink[#1]{#2}}{\sref@hlink[#1]{\sref@part @#2}}} +% +%<*ltxml> +sub withhash {'#';} +DefConstructor('\sref[]{}', + ""); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\srefs} +% \begin{macrocode} +%<*package> +\newcommand{\srefs}[3][]{% +\def\@test{#1}\ifx\@test\@empty\sref{#2} and \sref{#3}\else #1\fi} +% +%<*ltxml> +DefConstructor('\srefs[]{}', + ""); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\srefl} +% \begin{macrocode} +%<*package> +\newcommand{\srefl}[3][]{% +\def\@test{#1}\ifx\@test\@empty\sref{#2} to \sref{#3}\else #1\fi} +% +%<*ltxml> +DefConstructor('\srefl[]{}', + ""); +% +% \end{macrocode} +% \end{macro} +% \ednote{it is not clear what we want in the LaTeXML implementation of spageref} +% \begin{macro}{\spageref} +% \begin{macrocode} +%<*package> +\newcommand{\spageref}[1]{% +\@ifundefined{sref@part}{\sref@pageref{#1}}{\sref@pageref{\sref@part @#1}}} +% +%<*ltxml> +DefConstructor('\spageref{}', + ""); +% +% \end{macrocode} +% \end{macro} +% +% \subsection{An API for Package Authors}\label{sec:impl:package-authors} +% +% We find out whether the |hyperref| package is loaded, since we may want to use it for +% cross-references, for which we set up some internal macros that gracefully degrade if +% |hyperref| is not loaded. +% +% \begin{macro}{\sref@*@ifh} +% \begin{macrocode} +%<*package> +\newif\ifhref\hreffalse +\AtBeginDocument{\@ifpackageloaded{hyperref}{\hreftrue}{\hreffalse}} +\newcommand\sref@href@ifh[2]{\ifhref\href{#1}{#2}\else#2\fi} +\newcommand\sref@hlink@ifh[2]{\ifhref\hyperlink{#1}{#2}\else#2\fi} +\newcommand\sref@target@ifh[2]{\ifhref\hypertarget{#1}{#2}\else#2\fi} +% \end{macrocode} +% \end{macro} +% +% Then we provide some macros for {\sTeX}-specific crossreferencing +% +% \begin{macro}{\sref@target} +% The next macro uses this and makes an target from the current |sref@id| declared by +% a |id| key. +% \begin{macrocode} +\def\sref@target% +{\ifx\sref@id\@empty\else% +\edef\@target{sref@\@ifundefined{sref@part}{}{\sref@part @}\sref@id @target} +\sref@target@ifh\@target{}\fi} +% \end{macrocode} +% \end{macro} +% +% The next two macros are used for setting labels, it is mainly used for enabling forward +% references, to do this, it is written into \meta{jobname}|.aux| or \meta{jobname}|.refs|. +% +% \begin{macro}{\@sref@def} +% This macro stores the value of its last argument in a custom macro for reference. +% \begin{macrocode} +\newcommand\@sref@def[3]{\expandafter\gdef\csname sref@#1@#2\endcsname{#3}} +% \end{macrocode} +% \end{macro} +% +% The next step is to set up a file to which the references are written, this is normally +% the |.aux| file, but if the |extref| option is set, we have to use an |.ref| file. +% \begin{macrocode} +\ifextrefs\newwrite\refs@file\else\def\refs@file{\@auxout}\fi +% \end{macrocode} +% +% \begin{macro}{\sref@def} +% This macro writes an |\@sref@def| command to the current aux file and also executes it. +% \begin{macrocode} +\newcommand\sref@def[3]{%\@sref@def{#1}{#2}{#3}% +\protected@write\refs@file{}{\string\@sref@def{#1}{#2}{#3}}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\srefaddidkey} +% |\srefaddidkey[|\meta{keyval}|]{|\meta{group}|}| extends the metadata keys of the +% group \meta{group} with an |id| key. In the optional key/value pairs in \meta{keyval} +% the |prefix| key can be used to specify a prefix. Note that the |id| key defined by +% |\srefaddidkey[|\meta{keyval}|]{|\meta{group}|}| not only defines |\sref@id|, which is +% used for referencing by the |sref| package, but also |\|\meta{group}|@id|, which is +% used for showing metadata via the |showmeta| option of the |metakeys| package. +% \begin{macrocode} +\addmetakey{srefaddidkey}{prefix} +\newcommand\srefaddidkey[2][]{\metasetkeys{srefaddidkey}{#1}% +\@metakeys@ext@clear@keys{#2}{sref@id}{}% id cannot have a default +\metakeys@ext@clear@keys{#2}{id}{}% +\metakeys@ext@showkeys{#2}{id}% +\define@key{#2}{id}{\edef\sref@id{\srefaddidkey@prefix ##1}% +\expandafter\edef\csname #2@id\endcsname{\srefaddidkey@prefix ##1}}} +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Inter-Document Crossreferencing}\label{sec:impl:interdoc} +% +% \begin{macro}{\makeextrefs} +% \begin{macrocode} +%<*package> +\newcommand\makeextrefs[1]{\gdef\sref@part{#1}% +\makeatletter +\IfFileExists{\jobname.refs}{\input{\jobname.refs}}{}% +\immediate\openout\refs@file=\jobname.refs +\makeatother} +% +%DefConstructor('\makeextrefs{}',''); +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\sref@label} +% The |\sref@label| macro writes a label definition to the auxfile. +% \begin{macrocode} +%<*package> +\newcommand\sref@label[2]{% +\sref@def{\@ifundefined{sref@part}{}{\sref@part @}#2}{page}{\thepage}% +\sref@def{\@ifundefined{sref@part}{}{\sref@part @}#2}{label}{#1}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\sreflabel} +% The |\sreflabel| macro is a semantic version of |\label|, it combines the categorization +% given in the first argument with {\LaTeX}'s |\@currentlabel|. +% \begin{macrocode} +%<*package> +\newcommand\sreflabel[2]{\message{sreflabel: #1, #2}\sref@label{#1 \@currentlabel}{#2}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\sref@label@id} +% The |\sref@label@id| writes a label definition for the current |\sref@id| if it is +% defined. +% \begin{macrocode} +%<*package> +\newcommand\sref@label@id[1]{\ifx\sref@id\@empty\else\sref@label{#1}{\sref@id}\fi} +% +% \end{macrocode} +% \end{macro} +% +% Finally we come to the user visible macro |\sref| which is used for +% referencing.\ednote{The {\latexml} does not take into account the optional argument +% yet.} +% +% \begin{macro}{\sref@hlink} +% |\sref@hlink[|\meta{alt}|]{|\meta{label}|}|creates an error message if the target +% specified by \meta{label} is not defined, and otherwise generates a hyperlinked +% reference whose link text is \meta{alt} (if the optional argument is given) and the +% label generated by object specified by \meta{label} otherwise. +% \begin{macrocode} +%<*package> +\newcommand{\sref@hlink}[2][]{\def\@test{#1}% +\@ifundefined{sref@#2@label}% +{\protect\G@refundefinedtrue\@latex@warning{reference #2 undefined}??}% +{\sref@hlink@ifh{sref@#2@target}{\ifx\@test\@empty\@nameuse{sref@#2@label}\else #1\fi}}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\sref@page@label} +% This macro styles a page reference. +% \begin{macrocode} +%<*package> +\newcommand{\sref@page@label}[1]{p.~{#1}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\sref@pageref} +% The next macro creates an error message if the target is not defined, and otherwise +% generates a page reference. +% \begin{macrocode} +%<*package> +\newcommand{\sref@pageref}[1]{\@ifundefined{sref@#1@page}% +{\protect\G@refundefinedtrue\@latex@warning{reference #1 undefined}\sref@page@label{??}}% +{\sref@hlink@ifh{sref@#1@target}{\sref@page@label{\@nameuse{sref@#1@page}}}}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\sref@href} +% The next macro creates an error message if the target is not defined, and otherwise +% generates a hyperlinked reference. +% \begin{macrocode} +%<*package> +\newcommand{\sref@href}[3][]{\def\@test{#1}% +\@ifundefined{sref@#2@label}% +{\protect\G@refundefinedtrue\@latex@warning{reference #2 undefined}??}% +{\@ifundefined{sref@#3@URI}% +{\protect\G@refundefinedtrue\@latex@warning{external refs of type #3 undefined}??}% +{\edef\@uri{\@nameuse{sref@#3@URI}.pdf\#sref@#2@target} +\edef\@label{\ifx\@test\@empty\@nameuse{sref@#2@label}\else #1\fi} +\sref@href@ifh\@uri\@label}}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extref} +% The next macros use |\sref@hlink| with the respective prefix for external referencing +% if external references are used as indicated by the |extrefs| option; otherwise it +% disregards the first required macro and uses internal referencing.\ednote{This needs +% to be implemented on the LaTeXML side.} +% \begin{macrocode} +%<*package> +\ifextrefs +\newcommand{\extref}[3][]{\def\theextref{\sref@href[#1]{#2@#3}{#2}}% +\csname doextref@#2\endcsname} +\else +\newcommand{\extref}[3][]{\sref[#1]{#3}} +\fi +% +%<*ltxml> +DefConstructor('\extref[]{}{}', + ""); +DefConstructor('\theextref',''); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extpageref} +% The next macros use |\sref@hlink| with the respective prefix for external referencing +% if external references are used as indicated by the |extrefs| option; otherwise it +% disregards the first required macro and uses internal referencing.\ednote{This needs +% to be implemented on the LaTeXML side.} +% \begin{macrocode} +%<*package> +\ifextrefs +\newcommand{\extpageref}[3][]{\def\theextref{\sref@pageref[#1]{#2@#3}{#2}}% +\csname doextpageref@#2\endcsname} +\else +\newcommand{\extpageref}[3][]{\spageref[#1]{#3}} +\fi +% +%<*ltxml> +DefConstructor('\extpageref[]{}{}', + ""); +DefConstructor('\theextref',''); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extrefstyle} +% This user macro defines an internal macro that is used for internal styling; for +% instance |\extrefstyle{foo}{\theextref in bar}| defines the macro |\doextref@foo| +% which evaluates to \meta{the reference} |in bar|. This is used in the |\extref| macro. +% \begin{macrocode} +%<*package> +\newcommand\extrefstyle[2]{\expandafter\gdef\csname doextref@#1\endcsname{#2}} +% +%<*ltxml> +DefConstructor('\extrefstyle{}{}',""); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\extpagerefstyle} +% This is analogous to |\extrefstyle| +% \begin{macrocode} +%<*package> +\newcommand\extpagerefstyle[2]{\expandafter\gdef\csname doextpageref@#1\endcsname{#2}} +% +%<*ltxml> +DefConstructor('\extrefstyle{}{}',""); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\inputrefs} +% If the external references file exists, it is read (under the protection of +% |\makeatother|) otherwise an error message is displayed. +% \begin{macrocode} +%<*package> +\newcommand{\inputrefs}[2]{% +\@namedef{sref@#1@URI}{#2} +\makeatletter% +\IfFileExists{#2.refs}{\input{#2.refs}} + {\PackageError{sref}{Reference file #1.refs does not exist} + {Maybe you have to run LaTeX on #2.tex first}} +\makeatother} +% +%<*ltxml> +DefConstructor('\inputrefs{}{}',''); +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Semantic Versions of Commonly used Referencing Commands}\label{sec:impl:common} +% +% \begin{environment}{sequation} +% \begin{macrocode} +%<*package> +\srefaddidkey{sequation} +\def\sref@sequation@heading{equation} +\newenvironment{sequation}[1][]{\metasetkeys{sequation}{#1}% +\ifx\sref@id\@empty\begin{displaymath}\else% no id, using equation* +\begin{equation}\sref@target\sref@label@id{\sref@sequation@heading~(\theequation)}\fi} +{\ifx\sref@id\@empty\end{displaymath}\else\end{equation}\fi} +% +%<*ltxml> +DefEnvironment('{sequation} OptionalKeyVals', + "" + . "" + . "#body" + . "" + . "", + mode=>'display_math', + properties=> sub { RefStepCounter('equation') }, + locked=>1); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{seqnarray} +% \begin{macrocode} +%<*package> +\newenvironment{seqnarray}[1][]% +{\metasetkeys{sequation}{#1}\begin{eqnarray*}\sref@target% +\sref@label@id{\sref@sequation@heading~(\theequation)}} +{\end{eqnarray*}} +% +%<*ltxml> +DefMacro('\seqnarray OptionalKeyVals','\begin{eqnarray*}'); +DefMacro('\endseqnarray','\end{eqnarray*}'); +% +% \end{macrocode} +% \end{environment} +% +% \subsection{Semantic Citations}\label{sec:impl:citations} +% +% \begin{macro}{withcite} +% \begin{macrocode} +%<*package> +\newcommand\withcite[2]{#2~\cite{#1}} +% +%<*ltxml> +DefMacro('\withcite{}{}','\begin{withcitation}{#1}#2\citeit\end{withcitation}'); +% +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{withcitation} +% \begin{macrocode} +%<*package> +\newenvironment{withcitation}[1]{\def\citeit{\cite{#1}}}{} +% +%<*ltxml> +DefConstructor('\citeit'," ", +afterConstruct => sub { + my ($document,$whatsit) = @_; + # LibXML acrobatics, since we can't talk about the xml:id prior to construction's end + # (and please do correct me if this is inaccurate) + my $node = $document->getNode; + my ($citenode) = $document->findnodes('preceding-sibling::omdoc:citation',$node); + my ($phrase_parent) = $document->findnodes('ancestor::ltx:text[@xml:id]',$node); + return unless (defined $phrase_parent) && (defined $citenode); + my $id = $phrase_parent->getAttribute('xml:id'); + my $refs = $phrase_parent->getAttribute('citeit-refs'); + $phrase_parent->removeAttribute('citeit-refs'); + $citenode->setAttribute('for',$id); + $citenode->setAttribute('refs',$refs); +});#$ +DefEnvironment('{withcitation}{}', + "#body"); +% +% \end{macrocode} +% \end{environment} +% +% \subsection{Finale}\label{sec:common} +% +% Finally, we need to terminate the file with a success mark for perl. +% \begin{macrocode} +%<*ltxml> +1; +% +% \end{macrocode} +% \Finale +\endinput +% \iffalse +%%% Local Variables: +%%% mode: doctex +%%% TeX-master: t +%%% End: +% \fi + +% LocalWords: GPL structuresharing STR omdoc dtx stex CPERL LoadClass url dc +% LocalWords: RequirePackage RegisterNamespace namespace xsl DocType ltxml dtd +% LocalWords: ltx DefEnvironment beforeDigest AssignValue inPreamble getGullet +% LocalWords: afterDigest keyval omgroup DefKeyVal Semiverbatim KeyVal iffalse +% LocalWords: OptionalKeyVals DefParameterType IfBeginFollows skipSpaces CMP +% LocalWords: ifNext DefMacro needwrapper unlist DefConstructor omtext bgroup +% LocalWords: useCMPItemizations RefStepItemCounter egroup beginItemize li di +% LocalWords: beforeDigestEnd useTheoryItemizations dt autoclose ul ol dl env +% LocalWords: afterOpen LastSeenCMP autoClose proto ToString textsuperscript +% LocalWords: addAttribute nlex nlcex omdocColorMacro args tok MergeFont qw +% LocalWords: TokenizeInternal toString isMath foreach maybeCloseElement id'd +% LocalWords: autoOpen minipage footnotesize scriptsize numberIt whatsit href +% LocalWords: getAttribute setAttribute OMDoc RelaxNGSchema noindex xml lec +% LocalWords: Subsubsection useDefaultItemizations refundefinedtrue blockquote +% LocalWords: DefCMPConstructor inlinequote idx idt ide idp emph sref extrefs +% LocalWords: flushleft flushright DeclareOption hyperref LaTeX tex pdf hlink +% LocalWords: sequation omd def texorpdfstring raisebox latexml texttt newpage +% LocalWords: fileversion maketitle tableofcontents autoref hpyerref mysection +% LocalWords: exfig vspacesrefaddidkey srefaddidkey scr vspace withcite LasSwi +% LocalWords: makeextrefs inputrefs extref foo Patashnik withcite biblatex10 +% LocalWords: extrefstyle theextref theextref displaymath hrule impl ednote +% LocalWords: printbibliography newif ifextrefs extrefsfalse extrefstrue srefs +% LocalWords: Crossreferencing newcommand ifundefined ifx srefl xref ifh gdef +% LocalWords: ifhref hreffalse ifpackageloaded hreftrue expandafter jobname +% LocalWords: jobname csname endcsname newwrite auxout makeatletter openout +% LocalWords: makeatother auxfile nameuse doextref namedef newenvironment +% LocalWords: theequation refnum refnum seqnarray eqnarray endseqnarray doctex +% LocalWords: textsuperscript spageref spageref thepage pageref ctancite rdf99 +% LocalWords: cross-referencable showmeta showmeta metakeys metasetkeys textsf +% LocalWords: addmetakey referencable langle textsf langle withcitation citeit +% LocalWords: compactenum diff --git a/Master/texmf-dist/source/latex/stex/sref/sref.ins b/Master/texmf-dist/source/latex/stex/sref/sref.ins new file mode 100644 index 00000000000..ed4d9c3a607 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/sref/sref.ins @@ -0,0 +1,38 @@ +%% +%% This file generates files required to use the ed package. +%% At your command prompt write +%% +%% latex sref.ins +%% +%% Copyright(c) 2009 Michael Kohlhase +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{sref.sty}{\from{sref.dtx}{package}}} + +\Msg{*} +\Msg{* You probably need to move the generated style files into a directory searched by TeX.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\nopreamble\nopostamble +\generate{\file{sref.sty.ltxml}{\from{sref.dtx}{ltxml}}} + +\Msg{*} +\Msg{* You may need to move the generated ltxml files into a directory searched by LaTeXML.} +\Msg{*} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/stex/statements/statements.dtx b/Master/texmf-dist/source/latex/stex/statements/statements.dtx new file mode 100644 index 00000000000..05a9c950a2a --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/statements/statements.dtx @@ -0,0 +1,1439 @@ +% \iffalse meta-comment +% An Infrastructure for Mathematical Statements in sTeX +% Copyright (C) 2004-2008 Michael Kohlhase, all rights reserved +% this file is released under the +% LaTeX Project Public License (LPPL) +% +% The development version of this file can be found at +% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/statements/statements.dtx $ +% \fi +% +% \iffalse +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\ProvidesPackage{statements}[2012/01/28 v1.1 Semantic Markup for Statements] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{url,array,float,amsfonts} +\usepackage{statements,modules,presentation} +\usepackage{paralist} +\usepackage[show]{ed} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} +\usepackage[eso-foot,today]{svninfo} +\usepackage{stex-logo} +\usepackage{../ctansvn} +\usepackage{hyperref} +\svnInfo $Id: statements.dtx 1999 2012-01-28 07:32:11Z kohlhase $ +\svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/statements/statements.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{statements.dtx}\end{document} +% +% \fi +% +% \CheckSum{597} +% +% \changes{v0.9}{2005/06/14}{First Version with Documentation} +% \changes{v0.9a}{2005/07/01}{Completed Documentation} +% \changes{v0.9b}{2005/08/06}{Complete functionality and Updated Documentation} +% \changes{v0.9c}{2006/01/13}{more packaging} +% \changes{v0.9d}{2007/09/09}{moved omtext and friends to the omdoc package} +% \changes{v0.9d}{2007/09/09}{made dependence on the omdoc package explicit} +% \changes{v0.9d}{2007/09/09}{adding ids to many elements} +% \changes{v0.9e}{2008/05/27}{adding cross-references} +% \changes{v0.9e}{2008/09/29}{augmenting the index macros with optional values} +% \changes{v0.9f}{2008/12/04}{changed 'consymb' to 'symboldec' and documented it.} +% \changes{v0.9g}{2010/01/14}{the package is now based on {\texttt{ntheorem for presentation}}} +% \changes{v0.9g}{2010/01/19}{Added support for localization} +% \changes{v0.9g}{2010/02/23}{added {\texttt{\textbackslash symref}}} +% \changes{v1.0}{2010/06/18}{now based on {\texttt{omtext}} package instead of {\texttt{omdoc}}} +% \changes{v1.0}{2010/07/13}{adding {\texttt{\textbackslash inlineex}}} +% \changes{v1.1}{2011/08/25}{renaming all convenience macros for {\texttt{\textbackslash +% definendum}} and {\texttt{\textbackslash termref}}} +% +% \GetFileInfo{statements.sty} +% +% \MakeShortVerb{\|} +% \def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} +% \def\xml{\scsys{Xml}} +% \def\mathml{\scsys{MathML}} +% \def\omdoc{\scsys{OMDoc}} +% \def\openmath{\scsys{OpenMath}} +% \def\latexml{\scsys{LaTeXML}} +% \def\perl{\scsys{Perl}} +% \def\activemath{\scsys{ActiveMath}} +% \title{Semantic Markup for Mathematical Statements\thanks{Version {\fileversion} (last revised +% {\filedate})}} +% \author{Michael Kohlhase\\ +% Jacobs University, Bremen\\ +% \url{http://kwarc.info/kohlhase}} +% \maketitle +% +% \begin{abstract} +% The |statements| package is part of the {\stex} collection, a version of {\TeX/\LaTeX} +% that allows to markup {\TeX/\LaTeX} documents semantically without leaving the +% document format, essentially turning {\TeX/\LaTeX} into a document format for +% mathematical knowledge management (MKM). +% +% This package provides semantic markup facilities for mathematical statements like +% Theorems, Lemmata, Axioms, Definitions, etc. in {\stex} files. This structure can be +% used by MKM systems for added-value services, either directly from the {\sTeX} +% sources, or after translation. +% \end{abstract} +% +% \setcounter{tocdepth}{2}\tableofcontents\newpage +% +% \section{Introduction}\label{sec:intro} +% +% The motivation for the |statements| package is very similar to that for semantic macros +% in the |modules| package: We want to annotate the structural semantic properties of +% statements in the source, but present them as usual in the formatted documents. In +% contrast to the case for mathematical objects, the repertoire of mathematical statements +% and their structure is more or less fixed. +% +% This structure can be used by MKM systems for added-value services, either directly from +% the {\sTeX} sources, or after translation. Even though it is part of the {\stex} +% collection, it can be used independently, like it's sister package |sproofs|. +% +% {\stex}~\cite{Kohlhase:ulsmf08,sTeX:online} is a version of {\TeX/\LaTeX} that allows +% to markup {\TeX/\LaTeX} documents semantically without leaving the document format, +% essentially turning {\TeX/\LaTeX} into a document format for mathematical knowledge +% management (MKM). Currently the {\omdoc} format~\cite{Kohlhase:omdoc1.2} is directly +% supported. +% +% \section{The User Interface}\label{sec:user-interface} +% +% The |statements| package supplies a semantically oriented infrastructure for marking up +% mathematical statements: fragments of natural language that state properties of +% mathematical objects, e.g. axioms, definitions, or theorems. The |statement| package +% provides an infrastructure for marking up the semantic relations between statements for +% the {\omdoc} transformation and uses the |ntheorem| package~\cite{MaySch:eltte09} for +% formatting (i.e. transformation to PDF). +% +% \subsection{Package Options}\label{sec:user:options} +% +% The |statements| package 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{Statements}\label{sec:statements} +% +% All the statements are marked up as environments, that take a |KeyVal| argument that +% allows to annotate semantic information. Generally, we distinguish two forms of +% statements: +% \begin{description} +% \item[{\twintoo{block}{statement}s}] have explicit discourse markers that delimit their +% content in the surrounding text, e.g. the boldface word ``{\bf{Theorem}:}'' as a start +% marker and a little line-end box as an end marker of a proof. +% \item[{\twintoo{flow}{statement}s}] do not have explicit markers, they are interspersed +% with the surrounding text. +% \end{description} +% Since they have the same semantic status, they must both be marked up, but styled +% differently. We distinguis between these two presentational forms with the +% \DescribeMacro{display=}|display| key, which is allowed on all statement +% environments. If it has the value |block| (the default), then the statement will be +% presented in a paragraph of its own, have explicit discourse markers for its begin and +% end, possibly numbering, etc. If it has the value |flow|, then no extra presentation +% will be added the semantic information is invisible to the reader. Another key that is +% present on all statement environments in the \DescribeMacro{id=}|id| key it allows to +% identify the statement with a name and to reference it with the semantic referencing +% infrastructure provided by the |sref| package~\ctancite{Kohlhase:sref}. +% +% \subsubsection{Axioms and Assertions}\label{sec:user:axiomassertion} +% +% The \DescribeEnv{assertion}|assertion| environment is used for marking up statements +% that can be justified from previously existing knowledge (usually marked with the +% monikers ``Theorem'', ``Lemma'', ``Proposition'', etc. in mathematical vernacular). The +% environment |assertion| is used for all of them, and the particular subtype of +% assertion is given in the \DescribeMacro{type=}|type| key. So instead of +% |\begin{Lemma}|\iffalse\end{Lemma}\fi we have to write +% |\begin{assertion}[type=lemma]|\iffalse\end{assertion}\fi (see +% Example~\ref{fig:assertion} for an example). +% \begin{exfig} +% \begin{verbatim} +% \begin{assertion}[id=sum-over-odds,type=lemma] +% $\sum_{i=1}^n{2i-1}=n^2$ +% \end{assertion} +% \end{verbatim} +% \vspace{-1em}will lead to the result\vspace{-2em}\par\noindent +% \begin{assertion}[id=sum-over-odds,type=lemma] +% $\sum_{i=1}^n{2i-1}=n^2$ +% \end{assertion} +% \caption{Semantic Markup for a Lemma in a {\texttt{module}} context}\label{fig:assertion} +% \end{exfig} +% +% Whether we will see the keyword ``Lemma'' will depend on the value of the optional +% |display| key. In all of the |assertion| environments, the presentation expectation is +% that the text will be presented in italic font. The presentation (keywords, spacing, and +% numbering) of the |assertion| environment is delegated to a theorem styles from the +% |ntheorem| environment. For an assertion of type \meta{type} the |assertion| environment +% calls the |ST|\meta{type}|AssEnv| environment provided by the |statements| package; see +% Figure~\ref{fig:assertion-types} for a list of provided assertion types. Their +% formatting can be customized by redefining the |ST|\meta{type}|AssEnv| environment via +% the |\renewtheorem| command from the |ntheorem| package; see~\cite{MaySch:eltte09} for +% details. +% +% \begin{exfig} +% \begin{tabular}{|l|l|}\hline +% Value & Explanation \\\hline\hline +% \textbf{theorem}, \textbf{proposition} +% & an important assertion with a proof\\\hline +% \multicolumn{2}{|p{12cm}|}{\footnotesize Note that the meaning of \textbf{theorem} +% (in this case the existence of a proof) is not +% enforced by {\omdoc} applications. It can be appropriate to give an assertion +% the \textbf{theorem}, if the +% author knows of a proof (e.g. in the literature), but has not formalized it in +% {\omdoc} yet.}\\\hline\hline +% \textbf{lemma} & a less important assertion with a proof\\\hline +% \multicolumn{2}{|p{12cm}|}{\footnotesize The difference of importance specified +% here is even softer than the other ones, since e.g. reusing +% a mathematical paper as a chapter in a larger monograph, may make it necessary to +% downgrade a theorem (e.g. the main theorem of the paper) and give it the status of +% a lemma in the overall work.}\\\hline\hline +% \textbf{corollary} & a simple consequence\\\hline +% \multicolumn{2}{|p{12cm}|}{\footnotesize An assertion is +% sometimes marked as a corollary to some other statement, if the proof is +% considered simple. This is often the case for important theorems that are simple +% to get from technical lemmata.}\\\hline\hline +% \textbf{postulate}, \textbf{conjecture} +% & an assertion without proof or counter-exam\-ple\\\hline +% \multicolumn{2}{|p{12cm}|}{\footnotesize Conjectures are assertions, whose +% semantic value is not yet decided, but which the author considers likely to be +% true. In particular, there is no proof or counter-example.}\\\hline\hline +% \textbf{false-conjecture} +% & an assertion with a counter-example\\\hline +% \multicolumn{2}{|p{12cm}|}{\footnotesize A conjecture that has proven to be false, +% i.e. it has a counter-example. Such assertions are often kept for illustration and +% historical purposes.}\\\hline\hline +% \textbf{obligation}, \textbf{assumption} +% & an assertion on which a proof of another depends\\\hline +% \multicolumn{2}{|p{12cm}|}{\footnotesize These kinds of assertions +% are convenient during the exploration of a mathematical theory. They can be used +% and proven later (or assumed as an axiom).}\\\hline\hline +% \textbf{observation} & if everything else fails\\\hline +% \multicolumn{2}{|p{12cm}|}{\footnotesize This type is the catch-all if none of the others +% applies.}\\\hline +% \end{tabular} +% \caption{Types of Mathematical Assertions}\label{fig:assertion-types} +% \end{exfig} +% +% \DescribeEnv{axiom} The |axiom| environment is similar to |assertion|, but the content +% has a different ontological status: axioms are assumed without (formal) justification, +% whereas assertions are expected to be justified from other assertions, axioms or +% definitions. This environment relegates the formatting to the |STaxiomEnv| environment, +% which can be redefined for configuration. +% +% \subsubsection{Symbols}\label{sec:user:symbol} +% +% \DescribeEnv{symboldec} The |symboldec| environment can be used for declaring concepts +% and symbols. Note the the |symdef| forms from the |modules| package will not do this +% automatically (but the |definition| environment and the |\inlinedef| macro will for all +% the definienda; see below). The |symboldec| environment takes an optional keywords +% argument with the keys |id|, |role|, |title| and |name|. The first is for general +% identification, the |role| specifies the {\openmath}/{\omdoc} role, which is one of +% |object|, |type|, |sort|, |binder|, |attribution|, |application|, |constant|, +% |semantic-attribution|, and |error| (see the {\omdoc} specification for details). The +% |name| key specifies the {\openmath} name of the symbol, it should coincide with the +% control sequence introduced by the corresponding |\symdef| (if one is present). The +% |title| key is for presenting the title of this symbol as in other statements. Usually, +% |axiom| and |symboldec| environments are used together as in Figure~\ref{fig:axioms}. +% +%\begin{exfig} +% \begin{verbatim} +% \symdef{zero}{0} +% \begin{symboldec}[name=zero,title=The number zero,type=constant] +% The number zero, it is used as the base case of the inductive definition +% of natural numbers via the Peano Axioms. +% \end{symboldec} +% +% \symdef{succ}[1]{\prefix{s}{#1}} +% \begin{symboldec}[name=succ,title=The Successor Function,type=application] +% The successor function, it is used for the step case of the inductive +% definition of natural numbers via the Peano Axioms. +% \end{symboldec} +% +% \symdef{NaturalNumbers}{\mathbb{N}} +% \begin{symboldec}[name=succ,title=The Natural Numbers,type=constant] +% The natural numbers inductively defined via the Peano Axioms. +% \end{symboldec} +% +% \begin{axiom}[id=peano.P1,title=P1] +% $\zero$ is a natural number. +% \end{axiom} +% ... +% \begin{axiom}[id=peano.P5,title=P5] +% Any property $P$ such $P(\zero)$ and $P(\succ{k})$ whenever $P(k)$ +% holds for all $n$ in $\NaturalNumbers$ +% \end{axiom} +% \end{verbatim} +% \vspace{-1em}will lead to the result\medskip\par\noindent +% \begin{module}[id=peano] +% \symdef{zero}{0} +% \begin{symboldec}[name=zero,title=The number zero,role=constant] +% The number zero, it is used as the base case of the inductive definition +% of natural numbers via the Peano Axioms. +% \end{symboldec} +% +% \symdef{succ}[1]{\prefix{s}{#1}} +% \begin{symboldec}[name=succ,title=The Successor Function,role=application] +% The successor function, it is used for the step case of the inductive +% definition of natural numbers via the Peano Axioms. +% \end{symboldec} +% +% \symdef{NaturalNumbers}{\mathbb{N}} +% \begin{symboldec}[name=succ,title=The Natural Numbers,role=constant] +% The natural numbers inductively defined via the Peano Axioms. +% \end{symboldec} +% +% \begin{axiom}[id=peano.P1,title=P1] +% $\zero$ is a natural number. +% \end{axiom} +% \ldots \stepcounter{STtheoremAssEnv}\stepcounter{STtheoremAssEnv}\stepcounter{STtheoremAssEnv} +% \begin{axiom}[id=peano.P5,title=P5] +% Any property $P$ such $P(\zero)$ and $P(\succ{k})$ whenever $P(k)$ +% holds for all $n$ in $\NaturalNumbers$ +% \end{axiom} +% \end{module} +% \caption{Semantic Markup for the Peano Axioms}\label{fig:axioms} +% \end{exfig} +% +% \subsubsection{Definitions, and Definienda}\label{sec:definition} +% +% \DescribeEnv{definition} The |definition| environment is used for marking up +% mathematical definitions. Its peculiarity is that it defines (i.e. gives a meaning to) +% new mathematical concepts or objects. These\DescribeMacro{\definiendum} are identified +% by the |\definiendum| macro, which is used as +% |\definiendum[|\meta{sysname}|]{|\meta{text}|}|. Here, \meta{text} is the text that is +% to be emphasized in the presentation and the optional \meta{sysname} is a system name of +% the symbol defined (for reference via |\term|, see Section~\ref{sec:user:crossref}). If +% \meta{sysname} is not given, then \meta{text} is used as a system name instead, which is +% usually sufficient for most situations. +% +%\begin{exfig} +% \begin{verbatim} +% \symdef{one}{1} +% \begin{definition}[id=one.def,for=one] +% $\notatiendum[one]{\one}$ is the successor of $\zero$ +% (formally: $\one\colon=\succ\zero$) +% \end{definition} +% \end{verbatim} +% \vspace{-1em}will lead to the result\medskip\par\noindent +% \begin{module} +% \importmodule{peano} +% \symdef{one}{1} +% \begin{definition}[id=one.def,for=one] +% $\notatiendum[one]{\one}$ is the successor of $\zero$ +% (formally: $\one\colon=\succ\zero$) +% \end{definition} +% \end{module} +% \caption{A Definition based on Figure {\ref{fig:axioms}}}\label{fig:definition} +% \end{exfig} +% The \DescribeMacro{defin}|\defi{|\meta{word}|}| macro combines the functionality of the +% |\definiendum| macro with index markup from the |omdoc| +% package~\ctancite{Kohlhase:smomdl}: use |\defi[|\meta{name}|]{|\meta{word}|}| to markup +% a definiendum \meta{word} with system name \meta{name} that appear in the index --- in +% other words in almost all definitions of single-word concepts. We also have the variants +% \DescribeMacro{\defii}|\defii| and \DescribeMacro{\defiii}|\defiii| for (adjectivized) +% two-word compounds. Finally, the varaiants \DescribeMacro{\adefi}|\adefi|, +% \DescribeMacro{\adefii}|\adefii|,and \DescribeMacro{\adefiii}|\adefiii| have an +% additional first argument that allows to specify an alternative text; see +% Figure~\ref{fig:defin} +% +% \begin{exfig} +% \begin{tabular}{l|l|l} +% \multicolumn{3}{l}{source}\\ +% system name & result & index \\\hline +% \multicolumn{3}{l}{\texttt{\textbackslash defin\{concept\}}}\\ +% |concept| & concept& concept\\\hline +% \multicolumn{3}{l}{\texttt{\textbackslash defin[csymbol]\{concept\}}}\\ +% |csymbol| & concept & concept\\\hline +% \multicolumn{3}{l}{\texttt{\textbackslash definalt[csymbol]\{concepts\}\{concept\}}}\\ +% |csymbol| & concepts & concept\\\hline +% \multicolumn{3}{l}{\texttt{\textbackslash twindef\{concept\}\{group\}}}\\ +% |concept-group| & concept group & concept group, \\ +% && group - , concept\\\hline +% \multicolumn{3}{l}{\texttt{\textbackslash atwindef\{small\}\{concept\}\{group\}}}\\ +% |small-concept-group| & small concept group & small concept group, \\ +% && concept group - , small\\ +% \end{tabular} +% \caption{Some definienda with Index}\label{fig:defin} +% \end{exfig} +% +% Note that the |\definiendum|, |\defi|, |\defii|, and |\defiii| macros can only be +% used inside the definitional situation, i.e. in a |definition| or |symboldec| +% environment or a |\inlinedef| macro. If you find yourself in a situation where you want +% to use it outside, you will most likely want to wrap the appropriate text fragment in a +% |\begin{definition}[display=flow]| ... and |\end{definition}|. For instance, we could +% continue the example in Figure~\ref{fig:axioms} with the |definition| environment in +% Figure~\ref{fig:definition}. +% +% \DescribeMacro{\inlinedef} Sometimes we define mathematical concepts in passing, e.g. in +% a phrase like ``\ldots $s(o)$ which we call {\textbf{one}}.''. For this we cannot use +% the |definition| environment, which presupposes that its content gives all that is +% needed to understand the definition. But we do want to make use of the infrastructure +% introduced for the |definition| environment. In this situation, we just wrap the phrase +% in an |\inlinedef| macro that makes them available. The |\inlinedef| macro accepts the +% same |id| and |for| keys in its optional argument, and additionally the |verbalizes| key +% which can be used to point to a full definition of the concept somewhere else. +% +% Note that definienda can only be referenced via a |\term| element, if they are only +% allowed inside a named module, i.e. a |module| environment with a name given by the +% |id=| key or the |theory=| key on is specified on the definitional environment. +% +% \subsubsection{Examples}\label{sec:user:example} +% +% \DescribeEnv{example} The |example| environment is a generic statement environment, +% except that the |for| key should be given to specify the identifier what this is an +% example for. The |example| environment also expects a |type| key to be specified, so +% that we know whether this is an example or a counterexample. +% +% \DescribeMacro{\inlineex} The |\inlineex| is analogous to |\inlinedef|, only that it is +% used for inline examples, e.g. ``\ldots mammals, e.g. goats''. Note that we have used an +% inline example for an inline example. +% +% \subsection{Cross-Referencing Symbols and Concepts}\label{sec:user:crossref} +% +% If we have defined a concept with the |\definiendum| macro, then we can mark up other +% occurrences of the term as referring to this concept. Note that this process cannot be +% fully automatized yet, since that would need advanced language technology to get around +% problems of disambiguation, inflection, and non-contiguous phrases\footnote{We do have a +% program that helps annotate larger text collections spotting the easy cases; see +% {\url{http://kwarc.info/projects/stex}} and look for the program +% |termin|.}. Therefore, the \DescribeMacro{\termref}|\termref| can be used to make this +% information explicit. It takes the keys +% \begin{compactdesc} +% \item[\texttt{cdbase}] to specify a URI (a path actually, since {\LaTeX} cannot load +% from URIs) where the module can be found. +% \item[\texttt{cd}] to specify the module in which the term is defined. If the |cd| key +% is not given, then the current module is assumed. If no |cdbase| is specified (this is +% the usual case), then the CD has to be imported via a |\importmodule| from the +% |modules| package~\ctancite{KohAmb:smmssl}. +% \item[\texttt{name}] to specify the name of the definiendum (which is given in the body +% of the |\definiendum| or the optional argument). If the |name| key is not specified, +% then argument of the |\termref| macro is used. +% \item[\texttt{role}] is currently unused. +% \end{compactdesc} +% |\termref[cd=|\meta{cd}|,name=|\meta{name}|]{|\meta{text}|}| will just typeset the link +% text \meta{text} with (if the |hyperref| package is loaded) a hyperlink to the +% definition in module \meta{cd} that defines the concept \meta{name}, e.g. that contains +% |\defi[|\meta{name}|]{|\meta{text}|}|. +% +% Just as the |\definiendum| macro has the convenience variants |\defi|, |\defii| and +% |\defiii|, the |\termref| has variants |\trefi|, |\trefii|, and |\trefiii| that take two +% and three arguments for the parts of the compositum. In the same module, concepts that +% are marked up by |\defi{|\meta{name}|}| in the definition can be referenced by +% \DescribeMacro{\trefi}|\trefi{|\meta{name}|}|. Here the link text is just +% \meta{name}. Concepts defined via |\defii{|\meta{first}|}{|\meta{second}|}| can be +% referenced by \DescribeMacro{\trefii}|\trefii{|\meta{first}|}{|\meta{second}|}| (with +% link text ``\meta{first} \meta{second}'') and analogously for |\defiii| and +% \DescribeMacro{\trefiii}|\trefiii|. Finally, we have variants +% \DescribeMacro{\atref*}|\atrefi|, |\atrefii|, and |\atrefiii| with alternative link +% text. For instance |\atrefii{|\meta{text}|{|\meta{first}|}{|\meta{second}|}| references +% a concept introduced by |\defii{|\meta{first}|}{|\meta{second}|}| but with link text +% \meta{text}. Of course, if the system identifier is given explicitly in the optional +% argument of the definition form, as in +% |\defii[|\meta{name}|]{|\meta{first}|}{|\meta{second}|}|, then the terms are referenced +% by |\trefi{|\meta{name}|}|. +% +% For referencing terms outside the current module, the module name can be specified in +% the first optional argument of the |\*tref*| macros. To specify the |cdbase|, we have to +% resort to the |\termref| macro with the keyval arguments. +% +% Note that the |\termref| treatment above is natural for ``concepts'' declared by the +% |\termdef| macro from the |modules| package~\ctancite{KohAmb:smmssl}. Concepts are +% natural language names for mathematical objects. For ``symbols'', i.e. symbolic +% identifiers for mathematical objects used in mathematical formulae, we use the |\symdef| +% macro from the |modules| package. Sometimes, symbols also have an associated natural +% language concept, and we want to use the symbol name to reference it (instead of +% specifying |cd| and |name| which is more inconvenient). For this the |statements| +% package supplies the \DescribeMacro{\symref}|\symref| macro. Like |\termref|, and +% invocation of |\symref{|\meta{cseq}|}{|\meta{text}|}| will just typeset \meta{text} with +% a hyperlink to the relevant definition (i.e. the one that has the declaration +% |for=|\meta{cseq} in the metadata argument.) +% +% \section{Configuration of the Presentation}\label{sec:conf} +% +% \DescribeMacro{\defemph} The |\defemph| macro is a configuration hook that allows to +% specify the style of presentation of the {\index*{definiendum}}. By default, it is set to +% |\bf| as a fallback, since we can be sure that this is always available. It can be +% customized by redefinition: For instance |\renewcommand{\defemph}[1]{\emph{#1}}|, +% changes the default behavior to italics. +% +% \DescribeMacro{\termemph} The |\termenph| macro does the same for the style for +% |\termref|, it is empty by default. Note the term might carry an implicit hyper-reference +% to the defining occurrence and that the presentation engine might mark this up, changing +% this behavior. +% +% \DescribeMacro{\stDMemph} The |\stDMemph| macro does the same for the style for the +% markup of the discourse markers like ``Theorem''. If it is not defined, it is set to +% |\bf|; that allows to preset this in the class file. \ednote{function declarations} +% +% Some authors like to lowercase the semantic references, i.e. use ``axiom 2.6'' instead +% of the default ``\sref{peano.P5}'' to refer to the last axiom in +% Figure~\ref{fig:axioms}. This can be achieved by redefining the +% \DescribeMacro{\STpresent}|\STpresent| macro, which is applied to the keyword of the +% |ST*Env| theorem environments.\ednote{this does not quite work as yet, since +% \textbf{STpresent} is applied when the label is written. But we would really like to +% have it applied when the reference is constructed. But for that we need to split the +% label into keyword and number in package |sref|.} +% +% Finally, we provide configuration hooks in Figure~\ref{fig:hooks} for the statement +% types provided by the |statement| package. These are mainly intended for package authors +% building on |statements|, e.g. for multi-language support.\ednote{we might want to +% develop an extension \texttt{statements-babel} in the future.}. +%\begin{exfig} +% \begin{tabular}{lll} +% Environment & configuration macro & value\\\hline\hline +% \texttt{STtheoremAssEnv} & \texttt{\textbackslash st@theorem@kw} & \makeatletter\st@theorem@kw\\\hline +% \texttt{STlemmaAssEnv} & \texttt{\textbackslash st@lemma@kw} & \makeatletter\st@lemma@kw \\\hline +% \texttt{STpropositionAssEnv} & \texttt{\textbackslash st@proposition@kw} & \makeatletter\st@proposition@kw \\\hline +% \texttt{STcorollaryAssEnv} & \texttt{\textbackslash st@corollary@kw} & \makeatletter\st@corollary@kw\\\hline +% \texttt{STconjectureAssEnv} & \texttt{\textbackslash st@conjecture@kw} & \makeatletter\st@conjecture@kw\\\hline +% \texttt{STfalseconjectureAssEnv} & \texttt{\textbackslash st@falseconjecture@kw} & \makeatletter\st@falseconjecture@kw\\\hline +% \texttt{STpostulateAssEnv} & \texttt{\textbackslash st@postulate@kw} & \makeatletter\st@postulate@kw\\\hline +% \texttt{STobligationAssEnv} & \texttt{\textbackslash st@obligation@kw} & \makeatletter\st@obligation@kw\\\hline +% \texttt{STassumptionAssEnv} & \texttt{\textbackslash st@assumption@kw} & \makeatletter\st@assumption@kw\\\hline +% \texttt{STobservationAssEnv} & \texttt{\textbackslash st@observation@kw} & \makeatletter\st@observation@kw\\\hline +% \texttt{STexampleEnv} & \texttt{\textbackslash st@example@kw} & \makeatletter\st@example@kw\\\hline +% \texttt{STaxiomEnv} & \texttt{\textbackslash st@axiom@kw} & \makeatletter\st@axiom@kw\\\hline +% \texttt{STdefinitionEnv} & \texttt{\textbackslash st@definition@kw} & \makeatletter\st@definition@kw\\\hline +% \texttt{STnotationEnv} & \texttt{\textbackslash st@notation@kw} & \makeatletter\st@notation@kw +% \end{tabular} +% \caption{Configuration Hooks for statement types}\label{fig:hooks} +% \end{exfig} +% +% \section{Limitations}\label{sec:limitations} +% +% In this section we document known limitations. If you want to help alleviate them, +% please feel free to contact the package author. Some of them are currently discussed in +% the \sTeX 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 |statements| 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> +\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} +% +% The next measure is to ensure that some {\sTeX} packages are loaded: |omdoc| for the +% statement keys, |modules| since we need module identifiers for referencing. Furthermore, +% we need the |ntheorem| package for presenting statements. For {\latexml}, we also +% initialize the package inclusions, there we do not need |ntheorem|, since the XML does +% not do the presentation. +% \begin{macrocode} +%<*package> +\RequirePackage{omtext} +\RequirePackage{modules} +\RequirePackage[hyperref]{ntheorem} +\theoremstyle{plain} +% +%<*ltxml> +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +RequirePackage('omtext'); +RequirePackage('modules'); +% +% \end{macrocode} +% Now, we define an auxiliary function that lowercases strings +% \begin{macrocode} +%<*ltxml> +sub lowcase {my ($string) = @_; $string ? return lc(ToString($string)) : return('')}#$ +sub dashed { join('-',map($_->toString,@_));}#$ +% +% \end{macrocode} +% Sometimes it is necessary to fallback to symbol names in order to generate xml:id attributes. For this purpose, +% we define an auxiliary function which ensures the name receives a unique NCName equivalent.\ednote{Hard to be unique here, +% e.g. the names "foo\_bar" and "foo bar" would receive the same xml:id attributes... of course we can devise a more complex scheme +% for the symbol replacement.} +% \begin{macrocode} +%<*ltxml> +sub makeNCName { + my ($name) = @_; + my $ncname=$name; + $ncname=~s/\s/_/g; #Spaces to underscores + $ncname="_$ncname" if $ncname!~/^(\w|_)/; #Ensure start with letter or underscore + ##More to come... + $ncname; +} +% +% \end{macrocode} +% The following functions are strictly utility functions that makes our life easier later on +% \begin{macrocode} +%<*ltxml> +sub simple_wrapper { + #Deref if array reference + my @input; + foreach (@_) { + if (ref $_ && $_ =~ /ARRAY/ && $_ !~ /LaTeXML/) { + @input=(@input,@$_); + } else + { push (@input,$_); } + } + return '' if (!@input); + @input = map(split(/\s*,\s*/,ToString($_)),@input); + my $output=join(" ",@input); + $output=~s/(^ )|[{}]//g; #remove leading space and list separator brackets + $output||''; +} +sub hash_wrapper{ + #Deref if array reference + my @input; + foreach (@_) { + if (ref $_ && $_ =~ /ARRAY/ && $_ !~ /LaTeXML/) { + @input=(@input,@$_); + } else + { push (@input,$_); } + } + return '' if (!@input); + @input = map(split(/\s*,\s*/,ToString($_)),@input); + my $output=join(".sym #",@input); + $output=~s/(^\.sym )|[{}]//g; #remove leading space and list separator brackets + "#$output"||''; +} +% +% \end{macrocode} +% +% \subsection{Statements}\label{sec:impl:statements} +% +% \begin{macro}{\STpresent} +% \begin{macrocode} +%<*package> +\providecommand\STpresent[1]{#1} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\define@statement@env} +% We define a meta-macro that allows us to define several variants of statements. Upon +% beginning this environment, we first set the |KeyVal| attributes, then we decide +% whether to print the discourse marker based on the value of the |display| key, then +% (given the right Options were set), we show the semantic annotations, and finally +% initialize the environment using the appropriate macro. Upon ending the environment, +% we just run the respective termination macro. +% \begin{macrocode} +%<*package> +\def\define@statement@env#1{% +\newenvironment{#1}[1][]{\metasetkeys{omtext}{##1}\sref@target% +\ifx\omtext@display\st@flow\else% +\ifx\omtext@title\@empty\begin{ST#1Env}\else\begin{ST#1Env}[\omtext@title]\fi% +\ifx\sref@id\@empty\else\label{#1.\sref@id}\fi +\csname st@#1@initialize\endcsname\fi +\ifx\sref@id\@empty\sref@label@id{here}\else% +\sref@label@id{\STpresent{\csname ST#1EnvKeyword\endcsname}~\@currentlabel}\fi} +{\csname st@#1@terminate\endcsname\ifx\omtext@display\st@flow\else\end{ST#1Env}\fi}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{assertion} +% \begin{macrocode} +%<*package> +\newenvironment{assertion}[1][]{\metasetkeys{omtext}{#1}\sref@target% +\ifx\omtext@display\st@flow\else% +\ifx\omtext@title\@empty\begin{ST\omtext@type AssEnv}% +\else\begin{ST\omtext@type AssEnv}[\omtext@title]\fi\fi% +\ifx\omtext@type\@empty\sref@label@id{here}\else% +\sref@label@id{\STpresent{\csname ST\omtext@type AssEnvKeyword\endcsname}~\@currentlabel}\fi} +{\ifx\omtext@display\st@flow\else\end{ST\omtext@type AssEnv}\fi} +% +%<*ltxml> +DefEnvironment('{assertion} OptionalKeyVals:omtext', + "" + . "?&KeyVal(#1,'title')(&KeyVal(#1,'title'))()" + . "#body" + ."\n"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\st@*@kw} +% We configure the default keywords for the various theorem environments. +% \begin{macrocode} +%<*package> +\def\st@theorem@kw{Theorem} +\def\st@lemma@kw{Lemma} +\def\st@proposition@kw{Proposition} +\def\st@corollary@kw{Corollary} +\def\st@conjecture@kw{Conjecture} +\def\st@falseconjecture@kw{Conjecture (false)} +\def\st@postulate@kw{Postulate} +\def\st@obligation@kw{Obligation} +\def\st@assumption@kw{Assumption} +\def\st@observation@kw{Observation} +% \end{macrocode} +% \end{macro} +% Then we configure the presentation of the theorem environments +% \begin{macrocode} +\theorembodyfont{\itshape} +\theoremheaderfont{\normalfont\bfseries} +% \end{macrocode} +% and then we finally define the theorem environments in terms of the statement keywords +% defined above. They are all numbered together with the section counter. +% \begin{environment}{ST*AssEnv} +% \begin{macrocode} +\newtheorem{STtheoremAssEnv}{\st@theorem@kw} +\newtheorem{STlemmaAssEnv}[STtheoremAssEnv]{\st@lemma@kw} +\newtheorem{STpropositionAssEnv}[STtheoremAssEnv]{\st@proposition@kw} +\newtheorem{STcorollaryAssEnv}[STtheoremAssEnv]{\st@corollary@kw} +\newtheorem{STconjectureAssEnv}[STtheoremAssEnv]{\st@conjecture@kw} +\newtheorem{STfalseconjectureAssEnv}[STtheoremAssEnv]{\st@falseconjecture@kw} +\newtheorem{STpostulateAssEnv}[STtheoremAssEnv]{\st@postulate@kw} +\newtheorem{STobligationAssEnv}[STtheoremAssEnv]{\st@obligation@kw} +\newtheorem{STassumptionAssEnv}[STtheoremAssEnv]{\st@assumption@kw} +\newtheorem{STobservationAssEnv}[STtheoremAssEnv]{\st@observation@kw} +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{example} +% \begin{macrocode} +%<*package> +\def\st@example@initialize{}\def\st@example@terminate{} +\define@statement@env{example} +\def\st@example@kw{Example} +\theorembodyfont{\upshape} +\newtheorem{STexampleEnv}[STtheoremAssEnv]{\st@example@kw} +% +%<*ltxml> +DefEnvironment('{example} OptionalKeyVals:omtext', + "" + . "?&KeyVal(#1,'title')(&KeyVal(#1,'title'))()" + . "#body" + . "\n"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{axiom} +% \begin{macrocode} +%<*package> +\def\st@axiom@initialize{}\def\st@axiom@terminate{} +\define@statement@env{axiom} +\def\st@axiom@kw{Axiom} +\theorembodyfont{\upshape} +\newtheorem{STaxiomEnv}[STtheoremAssEnv]{\st@axiom@kw} +% +%<*ltxml> +DefEnvironment('{axiom} OptionalKeyVals:omtext', + "" + . "?&KeyVal(#1,'title')(&KeyVal(#1,'title'))()" + . "#body" + . "\n"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{symboldec} +% \begin{macrocode} +%<*package> +\srefaddidkey{symboldec} +\addmetakey{symboldec}{functions} +\addmetakey{symboldec}{role} +\addmetakey*{symboldec}{title} +\addmetakey{symboldec}{name} +\addmetakey{symboldec}{subject} +\addmetakey*{symboldec}{display} +\def\symboldec@type{Symbol} +\newenvironment{symboldec}[1][]{\metasetkeys{symboldec}{#1}\sref@target\st@indeftrue% +\ifx\symboldec@display\st@flow\else{\stDMemph{\symboldec@type} \symboldec@name:}\fi% +\ifx\symboldec@title\@empty~\else~(\stDMemph{\symboldec@title})\par\fi}{} +% +%<*ltxml> +DefEnvironment('{symboldec} OptionalKeyVals:symboldec', + "" + . "?&KeyVal(#1,'title')(&KeyVal(#1,'title'))()" + . "#body" + ."\n"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\symtype} +% \begin{macrocode} +%<*package> +\newcommand{\symtype}[2]{Type (#1): $#2$} +% +%<*ltxml> +DefConstructor('\symtype{}{}', + "#2"); +% +% \end{macrocode} +% \end{macro} +% +% \begin{environment}{definition} +% The |definition| environment itself is quite similar to the other's but we need to set +% the |\st@indef| switch to suppress warnings from |\st@def@target|. +% \begin{macrocode} +%<*package> +\newif\ifst@indef\st@indeffalse +\newenvironment{definition}[1][]{\metasetkeys{omtext}{#1}\sref@target\st@indeftrue% +\ifx\omtext@display\st@flow\else% +\ifx\omtext@title\@empty\begin{STdefinitionEnv}\else\begin{STdefinitionEnv}[\omtext@title]\fi\fi% +\ifx\sref@id\@empty\sref@label@id{here}\else% +\sref@label@id{\STpresent{\csname STdefinitionEnvKeyword\endcsname}~\@currentlabel}\fi} +{\ifx\omtext@display\st@flow\else\end{STdefinitionEnv}\fi} +\def\st@definition@kw{Definition} +\theorembodyfont{\upshape} +\newtheorem{STdefinitionEnv}[STtheoremAssEnv]{\st@definition@kw} +% +%<*ltxml> +sub definitionBody { + my ($doc, $keyvals, %props) = @_; + my $for = $keyvals->getValue('for') if $keyvals; + my $type = $keyvals->getValue('type') if $keyvals; + my %for_attr=(); + if (ToString($for)) { + $for = ToString($for); + $for =~ s/^{(.+)}$/$1/eg; + foreach (split(/,\s*/,$for)) { + $for_attr{$_}=1; + }} + if ($props{theory}) { + my @symbols = @{$props{defs} || []}; + foreach my $symb(@symbols) { + next if $for_attr{$symb}; + $for_attr{$symb}=1; + $doc->insertElement('omdoc:symbol', undef, (name=>$symb, "xml:id"=>makeNCName("$symb.def.sym"))); + } + } + my %attrs = (); + $for = join(" ",(keys %for_attr)); + $attrs{'for'} = $for if $for; + my $id = $keyvals->getValue('id') if $keyvals; + $attrs{'xml:id'} = $id if $id; + $attrs{'type'} = $type if $type; + if ($props{theory}) { + $doc->openElement('omdoc:definition', %attrs); + } else { + $attrs{'type'}='definition'; + $doc->openElement('omdoc:omtext', %attrs); + } + my $title = $keyvals->getValue('title') if $keyvals; + if ($title) { + $doc->openElement('omdoc:metadata'); + $doc->openElement('dc:title'); + $doc->absorb($title); + $doc->closeElement('dc:title');} + $doc->openElement('omdoc:CMP'); + $doc->absorb($props{body}) if $props{body}; + $doc->maybeCloseElement('omdoc:CMP'); + if ($props{theory}) { + $doc->closeElement('omdoc:definition'); + } else { + $doc->closeElement('omdoc:omtext'); + } + return; } +DefEnvironment('{definition} OptionalKeyVals:omtext', sub{definitionBody(@_)}, + afterDigestBegin=>sub { + my ($stomach, $whatsit) = @_; + my @symbols = (); + $whatsit->setProperty(theory=>LookupValue('current_module')); + $whatsit->setProperty(defs=>\@symbols); + AssignValue('defs', \@symbols); return; }, + afterDigest => sub { AssignValue('defs', undef); return; });#$ +% +% \end{macrocode} +% \end{environment} +% +% \begin{environment}{notation} +% We initialize the |\def\st@notation@initialize{}| here, and extend it with +% functionality below. +% \begin{macrocode} +%<*package> +\def\notemph#1{{\bf{#1}}} +\def\st@notation@terminate{} +\def\st@notation@initialize{} +\define@statement@env{notation} +\def\st@notation@kw{Notation} +\theorembodyfont{\upshape} +\newtheorem{STnotationEnv}[STtheoremAssEnv]{\st@notation@kw} +% +%<*ltxml> +DefEnvironment('{notation} OptionalKeyVals:omtext', + "" + . "?&KeyVal(#1,'title')(&KeyVal(#1,'title'))()" + . "#body" + . "\n"); +DefConstructor('\notatiendum OptionalKeyVals:notation {}', + "#2"); +% +% \end{macrocode} +% \end{environment} +% +% \begin{macro}{\st@def@target} +% the next macro is a variant of the |\sref@target| macro provided by the |sref| package +% specialized for the use in the |\definiendum|, |\defi|, |\defii|, and |\defiii| +% macros. |\st@def@target{|\meta{opt}|}{|\meta{name}|}| makes a target with label +% |sref@|\meta{opt}|@|\meta{modulename}|@target|, if \meta{opt} is non-empty, else with +% the label |sref@|\meta{name}|@|\meta{modulename}|@target|. Also it generates the +% necessary warnings for a definiendum-like macro. +% \begin{macrocode} +%<*package> +\def\st@def@target#1#2{\def\@test{#1}% +\ifst@indef% if we are in a definition or such +\ifx\omtext@theory\@empty% if there is no theory attribute +\@ifundefined{mod@id}% if we are not in a module +{\PackageWarning{statements}{definiendum in unidentified module\MessageBreak +\protect\definiendum, \protect\defi, +\protect\defii, \protect\defiii\MessageBreak +can only be referenced when called in a module with id key}}% +{\ifx\@test\@empty% +\expandafter\sref@target@ifh{sref@#2@\mod@id @target}{}\else% +\expandafter\sref@target@ifh{sref@#1@\mod@id @target}{}\fi}% +\else\expandafter\sref@target@ifh{sref@#1@\omtext@theory @target}{}\fi% +\else\PackageError{statements}% +{definiendum outside definition context\MessageBreak +\protect\definiendum, \protect\defi, +\protect\defii, \protect\defiii\MessageBreak +do not make sense semantically outside a definition.\MessageBreak +Consider wrapping the defining phrase in a \protect\inlinedef}% +\fi} +% +% \end{macrocode} +% \end{macro} +% +% The |\definiendum| and |\notatiendum| macros are very simple. +% +% \begin{macro}{\@termdef} +% This macro is experimental, it is supposed to be invoked in |\definiendum| to define a +% macro with the definiendum text, so that can be re-used later in term assignments (see +% the |modules| package). But in the current context, where we rely on {\TeX} groupings +% for visibility, this does not work, since the invocations of |\definiendum| are in +% |definition| environments and thus one group level too low. Keeping this for future +% reference. +% \begin{macrocode} +%<*package> +\newcommand\@termdef[2][]{\def\@test{#1}% +\@ifundefined{mod@id}{}{\ifx\@test\@empty\def\@@name{#2}\else\def\@@name{#1}\fi% +\termdef{\mod@id @\@@name}{#2}}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\definiendum} +% \begin{macrocode} +%<*package> +%\newcommand\definiendum[2][]{\st@def@target{#1}{#2}\@termdef[#1]{#2}\defemph{#2}} +\newcommand\definiendum[2][]{\st@def@target{#1}{#2}\defemph{#2}} +% +%<*ltxml> +DefConstructor('\definiendum [] {}', + "#2", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $whatsit->getArg(2) unless $name; + $whatsit->setProperty(name=>$name->toString); + push(@$addr, $name->toString) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module')); + return; });#$ +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\notatiendum} +% the |notatiendum| macro also needs to be visible in the |notation| and |definition| +% environments +% \begin{macrocode} +%<*package> +\newcommand{\notatiendum}[2][]{\notemph{#2}} +% +% \end{macrocode} +% \end{macro} +% +% We expand the {\latexml} bindings for |\defi|, |\defii| and |\defiii| into two +% instances one will be used for the definition and the other for indexing. +% +% \begin{macro}{\defi} +% \begin{macrocode} +%<*package> +\newcommand{\defi}[2][]{\definiendum[#1]{#2}\omdoc@index[#1]{#2}} +% +%<*ltxml> +DefConstructor('\defi[]{}', + "" + . "" + . "#2" + . "" + . "#2" + ."", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $whatsit->getArg(2) unless $name; + push(@$addr, $name->toString) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module'));#$ + return; }, + alias=>'\defi'); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\adefi} +% \begin{macrocode} +%<*package> +\newcommand{\adefi}[3][]{\def\@test{#1}% +\ifx\@test\@empty\definiendum[#3]{#2}% +\else\definiendum[#1]{#2}\omdoc@index[#1]{#3}\fi} +% +%<*ltxml> +DefConstructor('\adefi[]{}{}', + "" + . "" + . "#2" + . "" + . "#3" + ."", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $whatsit->getArg(3) unless $name; + push(@$addr, $name->toString) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module'));#$ + return; }, + alias=>'\adefi'); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\defii} +% \begin{macrocode} +%<*package> +\newcommand{\defii}[3][]{\st@def@target{#1}{#2-#3}\defemph{#2 #3}\@twin[#1]{#2}{#3}} +% +%<*ltxml> +DefConstructor('\defii[]{}{}', + "" + . "" + . "" + . "#2 #3" + . "" + . "" + . "" + . "#2" + . "#3" + . "" + ."", + afterDigest => sub { + my ($stomach, $whatsit) = @_; +my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $name->toString if $name; + $name = $whatsit->getArg(2)->toString.'-'.$whatsit->getArg(3)->toString unless $name; + push(@$addr, $name) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module')); + return; }, + alias=>'\defii');#$ +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\adefii} +% \begin{macrocode} +%<*package> +\newcommand{\adefii}[4][]{\def\@test{#1}% +\ifx\@test\@empty\definiendum[#3-#4]{#2}% +\else\definiendum[#1]{#2}\@twin[#1]{#3}{#4}\fi} +% +%<*ltxml> +DefConstructor('\adefii[]{}{}{}', + "" + . "" + . "" + . "#2" + . "" + . "" + . "" + . "#3" + . "#4" + . "" + ."", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $name->toString if $name; + $name = $whatsit->getArg(3)->toString.'-'.$whatsit->getArg(4)->toString unless $name; + push(@$addr, $name) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module')); + return; }, + alias=>'\defii');#$ +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\defiii} +% \begin{macrocode} +%<*package> +\newcommand{\defiii}[4][]{\st@def@target{#1}{#2-#3-#4}\defemph{#2 #3 #4}\@atwin[#1]{#2}{#3}{#4}} +% +%<*ltxml> +DefConstructor('\defiii[]{}{}{}', + "" + . "" + . "#2 #3 #4" + . "" + . "" + . "#2" + . "#3" + . "#4" + . "" + . "", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $name->toString if $name; + $name = $whatsit->getArg(2)->toString.'-'.$whatsit->getArg(3)->toString.'-'.$whatsit->getArg(4)->toString unless $name; + push(@$addr, $name) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module')); + return; }, + alias=>'\defiii'); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\adefiii} +% \begin{macrocode} +%<*package> +\newcommand{\adefiii}[5][]{\def\@test{#1}% +\ifx\@test\@empty\definiendum[#3-#4-#5]{#2}% +\else\definiendum[#1]{#2}\@atwin[#1]{#3}{#4}{#5}\fi} +% +%<*ltxml> +DefConstructor('\adefiii[]{}{}{}{}', + "" + . "" + . "#2" + . "" + . "" + . "#3" + . "#4" + . "#5" + . "" + . "", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $name->toString if $name; + $name = $whatsit->getArg(3)->toString.'-'.$whatsit->getArg(4)->toString.'-'.$whatsit->getArg(5)->toString unless $name; + push(@$addr, $name) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module')); + return; }, + alias=>'\defiii'); +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\inlineex} +% \begin{macrocode} +%<*package> +\newcommand{\inlineex}[2][]{\metasetkeys{omtext}{#1}\sref@target\sref@label@id{here}#2} +% +%<*ltxml> +DefConstructor('\inlineex OptionalKeyVals:omtext {}', + "#2"); +% +% \end{macrocode} +% \end{macro} +% \begin{macro}{\inlinedef} +% \begin{macrocode} +%<*package> +\newcommand{\inlinedef}[2][]{\metasetkeys{omtext}{#1}\sref@target\sref@label@id{here}\st@indeftrue #2} +% +%<*ltxml> +DefConstructor('\inlinedef OptionalKeyVals:omtext {}', sub { + my ($document, $keyvals, $body, %props) = @_; + my $for = $keyvals->getValue('for') if $keyvals; + my %for_attr=(); + if (ToString($for)) { + $for = ToString($for); + $for =~ s/^{(.+)}$/$1/eg; + foreach (split(/,\s*/,$for)) { + $for_attr{$_}=1; + }} + my @symbols = @{$props{defs} || []}; + #Prepare for symbol insertion -insert before the parent of the closest ancestor CMP element + my $original_node = $document->getNode; + my $xc = XML::LibXML::XPathContext->new( $original_node ); + $xc->registerNs('omdoc', 'http://omdoc.org/ns'); + my ($statement_ancestor) = $xc->findnodes('./ancestor::omdoc:CMP/..'); + foreach my $symb(@symbols) { + next if $for_attr{$symb}; + $for_attr{$symb}=1; + my $symbolnode = XML::LibXML::Element->new('symbol'); + $symbolnode->setAttribute(name=>$symb); + $symbolnode->setAttribute("xml:id"=>makeNCName("$symb.def.sym")); + $statement_ancestor->parentNode->insertBefore($symbolnode,$statement_ancestor); + } + #Restore the insertion point + $document->setNode($original_node); + my %attrs = (); + $for = join(" ",(keys %for_attr)); + $attrs{'for'} = $for if $for; + my $id = $keyvals->getValue('id') if $keyvals; + $attrs{'xml:id'} = $id if $id; +$attrs{'class'} = 'inlinedef'; + $document->openElement('ltx:text',%attrs); + $document->absorb($body); +$document->closeElement('ltx:text'); }, + #Prepare 'defs' hooks for \defi and \definiendum symbol names + beforeDigest=>sub { + my @symbols = (); + AssignValue('defs', \@symbols); return; }, + #Adopt collected names as 'defs' property, remove hooks + afterDigest=>sub { + my ($stomach, $whatsit) = @_; + my $defsref = LookupValue('defs'); + my @defs = @$defsref; + $whatsit->setProperty('defs',\@defs); + AssignValue('defs',undef); + return; }); +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Cross-Referencing Symbols and Concepts}\label{sec:impl:crossref} +% +% \begin{macro}{\termref@set} +% The |term| macro uses the |cd| and |name| keys for hyperlinking to create hyper-refs, +% if the |hyperref| package is loaded: We first see if the |cd| key was given, if not we +% define it as the local module identifier. +% \begin{macrocode} +%<*package> +\addmetakey[\mod@id]{termref}{cd} +\addmetakey{termref}{cdbase} +\addmetakey{termref}{name} +\addmetakey{termref}{role} +\def\termref@set#1#2{\def\termref@name{#2}\metasetkeys{termref}{#1}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\termref} +% \begin{macrocode} +\newcommand{\termref}[2][]{\metasetkeys{termref}{#1}\st@termref{#2}} +% +%<*ltxml> +DefConstructor('\termref OptionalKeyVals:termref {}', + "" + . "#2" + ."", + afterDigest=>sub{$_[1]->setProperty(module=>LookupValue('current_module'))}); +%%$ +% \end{macrocode} +% \end{macro} +% The next macro is where the actual work is done. +% \begin{macro}{\st@termref} +% If the |cdbase| is given, then we make a hyper-reference, otherwise we punt to +% |\mod@termref|, which can deal with the case where the cdbase is given by the imported +% cd. +% \begin{macrocode} +%<*package> +\def\st@termref#1{\ifx\termref@name\@empty\def\termref@name{#1}\fi% +\ifx\termref@cdbase\@empty\mod@termref\termref@cd\termref@name{#1}% +\else\sref@href@ifh\termref@cdbase{#1}\fi} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tref*} +% \begin{macrocode} +%RawTeX(' +%<*package|ltxml> +\newcommand\atrefi[3][]{\def\@test{#1}\ifx\@test\@empty\termref[name=#3]{#2}\else\termref[cd=#1,name=#3]{#2}\fi} +\newcommand\atrefii[4][]{\atrefi[#1]{#2}{#3-#4}} +\newcommand\atrefiii[5][]{\atrefi[#1]{#2}{#3-#4-#5}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\tref*} +% \begin{macrocode} +\newcommand{\trefi}[2][]{\atrefi[#1]{#2}{#2}} +\newcommand{\trefii}[3][]{\atrefi[#1]{#2 #3}{#2-#3}} +\newcommand{\trefiii}[4][]{\atrefi[#1]{#2 #3 #4}{#2-#3-#4}} +% +%'); +% \end{macrocode} +% \end{macro} +% +% Now we care about the configuration switches, they are set to sensible values, if they +% are not defined already. These are just configuration parameters, which should not +% appear in documents, therefore we do not provide {\latexml} bindings for them. +% \begin{macro}{\*emph} +% \begin{macrocode} +%<*package> +\providecommand{\termemph}[1]{#1} +\providecommand{\defemph}[1]{{\textbf{#1}}} +\providecommand{\stDMemph}[1]{{\textbf{#1}}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\symref} +% The |\symref| macros is quite simple, since we have done all the heavy lifting in the +% |modules| package: we simply apply |\mod@symref@|\meta{arg1} to +% \meta{arg2}. +% \begin{macrocode} +%<*package> +\newcommand{\symref}[2]{\@nameuse{mod@symref@#1}{#2}} +% +%<*ltxml> +DefConstructor('\symref{}{}', + "" + . "#2" + .""); +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Providing IDs for {\omdoc} Elements}\label{sec:impl:ids} +% +% To provide default identifiers, we tag all {\omdoc} +% elements that allow |xml:id| attributes by executing the |numberIt| procedure from |omdoc.sty.ltxml|. +% +% \begin{macrocode} +%<*ltxml> +Tag('omdoc:assertion',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:definition',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:example',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:requation',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:axiom',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:symbol',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:type',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:term',afterOpen=>\&numberIt,afterClose=>\&locateIt); +% +% \end{macrocode} +% +% \subsection{Deprecated Functionality}\label{sec:deprecated} +% +% In this section we centralize old interfaces that are only partially supported any +% more. +% \begin{macro}{\*def*} +% \begin{macrocode} +%RawTeX(' +%<*package|ltxml> +\newcommand\defin[2][]{\defi[#1]{#2}% +\PackageWarning{statements}{\protect\defin\space is deprecated, use \protect\defi\space instead}} +\newcommand\twindef[3][]{\defii[#1]{#2}{#3}% +\PackageWarning{statements}{\protect\twindef\space is deprecated, use \protect\defii\space instead}} +\newcommand\atwindef[4][]{\defiii[#1]{#2}{#3}{#4}% +\PackageWarning{statements}{\protect\atwindef\space is deprecated, use \protect\defiii\space instead}} +\newcommand\definalt[3][]{\adefi[#1]{#2}{#3}% +\PackageWarning{statements}{\protect\definalt\space is deprecated, use \protect\adefi\space instead}} +\newcommand\twindefalt[4][]{\adefii[#1]{#2}{#3}{#4}% +\PackageWarning{statements}{\protect\twindefalt\space is deprecated, use \protect\adefii\space instead}} +\newcommand\atwindefalt[5][]{\adefiii[#1]{#2}{#3}{#4}{#5}% +\PackageWarning{statements}{\protect\atwindefalt\space is deprecated, use \protect\adefiii\space instead}} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\*def*} +% \begin{macrocode} +\newcommand\twinref[3][]{\trefii[#1]{#2}{#3}% +\PackageWarning{statements}{\protect\twinref\space is deprecated, use \protect\trefii\space instead}} +\newcommand\atwinref[4][]{\atrefiii[#1]{#2}{#3}{#4}% +\PackageWarning{statements}{\protect\atwindef\space is deprecated, use \protect\trefiii\space instead}} +% +%'); +% \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 +% LocalWords: GPL structuresharing STR dtx keyval env envfalse idfalse idtrue +% LocalWords: displayfalse envtrue displaytrue forfalse typefalse titlefalse +% LocalWords: continuesfalse fortrue fromtrue typetrue titletrue CPERL omdoc +% LocalWords: continuestrue symboldec omtext RequirePackage lowcase lc ToString +% LocalWords: foreach hyperref href hlink DefEnvironment OptionalKeyVals ne +% LocalWords: KeyVal xml CMP simpleDef PatternDef DefEnvironment PatternRule +% LocalWords: requation PatternCMP RecDef DefConstructor keyvals defs psymbols +% LocalWords: openElement symb closeElement ffor getValue attrs metadata undef +% LocalWords: afterDigestBegin setProperty AssignValue afterDigest definiendum +% LocalWords: cd addr LookupValue getArg toString idx idt definiendum ide idp +% LocalWords: DefMacro args unlist inlinedef uri pdf afterOpen numberIt texttt +% LocalWords: iffalse consymb ntheorem textbackslash symref def scsys sc sc kw +% LocalWords: mathml openmath latexml activemath fileversion maketitle stex +% LocalWords: setcounter tocdepth tableofcontents newpage sproofs ulsmf08 sref +% LocalWords: MaySch eltte09 twintoo sref subsubsection exfig vspace vspace +% LocalWords: noindent renewtheorem hline textbf textbf footnotesize ple peano +% LocalWords: STaxiomEnv symdef medskip succ mathbb ldots stepcounter ednote +% LocalWords: STtheoremAssEnv stepcounter STtheoremAssEnv stepcounter defin +% LocalWords: STtheoremAssEnv notatiendum defin smomdl biblatex twindef cdbase +% LocalWords: twindef atwindef atwindef adjectivized varaiants twindefalt cseq +% LocalWords: twindefalt atwindefalt atwindefalt csymbol definalt termref emph +% LocalWords: termref compactdesc KohAmb smmssl twinref atwinref newpart impl +% LocalWords: termdef defemph defemph renewcommand termemph termenph stDMemph +% LocalWords: stDMemph STpresent STpresent makeatletter STlemmaAssEnv textsf +% LocalWords: STpropositionAssEnv STcorollaryAssEnv STconjectureAssEnv langle +% LocalWords: STfalseconjectureAssEnv STpostulateAssEnv STobligationAssEnv foo +% LocalWords: STassumptionAssEnv STobservationAssEnv STexampleEnv textsf ltxml +% LocalWords: STdefinitionEnv STnotationEnv printbibliography langle ncname +% LocalWords: theoremstyle sym newenvironment ifx csname endcsname +% LocalWords: currentlabel theorembodyfont itshape theoremheaderfont bfseries +% LocalWords: normalfont newtheorem upshape srefaddidkey +% LocalWords: newcommand indef newif ifst indeffalse indeftrue attr whatsit +% LocalWords: STdefinitionEnvKeyword notemph modulename ifundefined atwin +% LocalWords: expandafter providecommand nameuse doctex ctancite funval + +%%% Local Variables: +%%% mode: doctex +%%% TeX-master: t +%%% End: +% \fi +% LocalWords: funsymbs findnodes symbolnode defsref diff --git a/Master/texmf-dist/source/latex/stex/statements/statements.ins b/Master/texmf-dist/source/latex/stex/statements/statements.ins new file mode 100644 index 00000000000..98628a07d7c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/statements/statements.ins @@ -0,0 +1,38 @@ +%% +%% This file generates files required to use the ed package. +%% At your command prompt write +%% +%% latex statements.ins +%% +%% Copyright(c) 2005 Michael Kohlhase +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{statements.sty}{\from{statements.dtx}{package}}} + +\Msg{*} +\Msg{* You probably need to move the generated style files into a directory searched by TeX.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\nopreamble\nopostamble +\generate{\file{statements.sty.ltxml}{\from{statements.dtx}{ltxml}}} + +\Msg{*} +\Msg{* You probably need to move the generated ltxml files into a directory searched by LaTeXML.} +\Msg{*} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/stex/workaddress/workaddress.dtx b/Master/texmf-dist/source/latex/stex/workaddress/workaddress.dtx new file mode 100644 index 00000000000..78e09ed1322 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/workaddress/workaddress.dtx @@ -0,0 +1,552 @@ +% \iffalse meta-comment +% An Infrastructure for managing addresses and affiliations in LaTeX +% $URL: https://svn.kwarc.info/repos/stex/trunk/sty/workaddress/workaddress.dtx $ +% $Rev: 1999 $; last modified by $Author: kohlhase $ +% $Date: 2012-01-28 08:32:11 +0100 (Sat, 28 Jan 2012) $ +% Copyright (c) 2011 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{workaddress}[2012/01/28 v0.4 WorkAddress] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage{workaddress,sref,url,array,float} +\usepackage[show]{ed} +\usepackage[hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} +\usepackage{../ctansvn} +\usepackage{hyperref} +\usepackage{stex-logo} +\usepackage[eso-foot,today]{svninfo} +\svnInfo $Id: workaddress.dtx 1999 2012-01-28 07:32:11Z kohlhase $ +\svnKeyword $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/workaddress/workaddress.dtx $ +\makeindex +\floatstyle{boxed} +\newfloat{exfig}{thp}{lop} +\floatname{exfig}{Example} +\WAperson[id=jdoe,affiliation=dfki,department=skss, + url=http://dfki.de/jdoe] + {John Doe} +\WAperson[id=miko,affiliation=jacu,department=case, + url=http://kwarc.info/kohlhase] + {Michael Kohlhase} +\WAinstitution[id=case,acronym=CASE, + url=http://jacobs-university.de/ses/case,partof=jacu] + {Center for Advanced Systems Engineering} +\WAinstitution[id=jacu,url=http://jacobs-university.de,shortname=Jacobs University,acronym=JU] + {Jacobs University Bremen} +\WAinstitution[id=skss,url=http://dfki.de/sks,partof=dfki,acronym=SKS,] + {Safe and Secure Cognitive Systems} +\WAinstitution[id=dfki,url=http://dfki.de,acronym=DFKI,shortname=DFKI] + {German Research Center for Artificial Intelligence} +\def\tracissue#1{\cite{sTeX:online}, \hyperlink{http://trac.kwarc.info/sTeX/ticket/#1}{issue #1}} +\begin{document}\DocInput{workaddress.dtx}\end{document} +% +% \fi +% +%\CheckSum{341} +% +% \changes{v0.4}{2011/11/04}{Extracting from dcm.sty} +% \changes{v0.4}{2012/01/18}{new functionality for logos} +% +% \GetFileInfo{workaddress.sty} +% +% \MakeShortVerb{\|} +% \def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} +% \def\latexml{\scsys{LaTeXML}} +% +% \title{{\texttt{workaddress.sty}}: An Infrastructure for managing Addresses and +% Affiliations in {\LaTeX}\thanks{Version {\fileversion} (last revised {\filedate})}} +% \author{\WAauthorblock[aff,url]{miko,jdoe}} +% \maketitle +% \begin{abstract}The |workaddress| package allows manage addresses and Affiliations in +% a bib\TeX-like manner.\ednote{continue} +% \end{abstract} +% +% \setcounter{tocdepth}{2}\tableofcontents\newpage +% +% \section{Introduction}\label{sec:intro} +% +% The |workaddress| package allows manage Addresses and affiliations of persons in a +% bib\TeX-like manner.\ednote{continue} +% +% \section{The User Interface}\label{sec:user} +% +% \subsection{Package Options}\label{sec:user.options} +% +% The |workaddress| package takes a single option: \DescribeMacro{showmeta}|showmeta|. If +% this is set, then the metadata keys are shown (see~\cite{Kohlhase:metakeys:ctan} for +% details and customization options). +% +% \subsection{Database Entries for Persons} +% +% The |workaddress| package recognizes that from a metadata perspective, persons are complex +% entities. In particular, specifying metadata is a tedious and repetitive task that leads +% to embarrassing errors. Therefore the |workaddress| package takes a hint from bibTeX and allows +% to specify personal metadata in a database and use it by a database key. +% \begin{exfig}[ht] +% \begin{verbatim} +% \WAperson[id=jdoe,affiliation=dfki,department=skss, +% url=http://dfki.de/jdoe] +% {John Doe} +% \WAperson[id=miko,affiliation=jacu,department=case, +% url=http://kwarc.info/kohlhase] +% {Michael Kohlhase} +% \end{verbatim} +% \caption{A small database of Persons} +% \label{fig:persons} +% \end{exfig} +% The \DescribeMacro{\WAperson}|\WAperson| macro allows to specify personal metadata\ednote{This +% should be synchronized with the FOAF specification~\cite{FOAF:spec}} with the following +% keys: +% \begin{center} +% \begin{tabular}{|l|l|l|}\hline +% key & value & comment\\\hline\hline +% id & string & identifier of this person\\\hline +% birthdate & date & birthdate \\\hline +% email & & the primary e-mail address\\\hline +% url & URI & primary home page \\\hline +% affiliation & Inst. identifier & the primary professional affiliation\\\hline +% personaltitle & string & the personal title e.g. {\texttt{King}}\\\hline +% academictitle & string & the academic title e.g. {\texttt{Prof. Dr.}}\\\hline +% department & Inst. identifier & the department specified in the work address\\\hline +% workaddress & long string & the work address \\\hline +% privaddress & long string & the private address \\\hline +% worktel & string & work telephone number \\\hline +% privtel & string & private telephone number\\\hline +% workfax & string & work fax number \\\hline +% privfax & string & private fax number \\\hline +% worktelfax & string & if the phone and fax share a prefix, give this as well \\\hline +% privtelfax & string & dito\\\hline +% \end{tabular} +% \end{center} +% In Figure~\ref{fig:persons} we have specified (minimal) metadata for the authors of the +% |workaddress| package. The metadata can be accessed by specifying the identifiers (given by the +% |id| key) in the |workaddress| macros defined below, see for instance the |\WAcreators| macro +% in Figure~\ref{fig:workaddressblock}, which leads to the title block of this note. +% +% Like in bibTeX~\cite{Patashnik:b88}, it is a good idea to collect the metadata in a separate +% file that is input in the document. In practice it may be possible to generate these +% files from conventional address databases. +% +% \subsection{Institutions} +% +% Institutions are treated analogously to persons. +% \begin{exfig}[ht] +% \begin{verbatim} +% \WAinstitution[id=case,partof=jacu,acronym=CASE, +% url=http://jacobs-university.de/ses/case] +% {Center for Advanced Systems Engineering} +% \WAinstitution[id=jacu,url=http://jacobs-university.de] +% {Jacobs University Bremen} +% \WAinstitution[id=skss,partof=dfki,url=http://dfki.de/sks,acronym=SKS] +% {Safe and Secure Cognitive Systems} +% \WAinstitution[id=dfki,url=http://dfki.de,shortname=DFKI,acronym=DFKI] +% {German Research Center for Artificial Intelligence} +% \end{verbatim} +% \caption{A small Database of Institutions and their Parts} +% \label{fig:institutions} +% \end{exfig} +% The \DescribeMacro{\WAinstitution}|\WAinstitution| macro allows to specify personal +% metadata\ednote{This should be synchronized with the FOAF +% specification~\cite{FOAF:spec}} with the following keys: +% \begin{center} +% \begin{tabular}{|l|l|l|}\hline +% key & value & comment\\\hline\hline +% id & string & identifier of this person\\\hline +% url & URI & primary home page \\\hline +% partof & Inst. identifier & parent institution\\\hline +% \end{tabular} +% \end{center} +% +% \subsection{Applications}\label{sec:user.appl} +% +% The data from the address database can be used in various ways. For instance, the +% \DescribeMacro{\WAauthorblock}|\WAauthorblock| macro creates a block of users and their +% affiliations. In the context of the database from Figures~\ref{fig:persons} +% and~\ref{fig:institutions}, |\WAauthorblock{miko,jdoe}| creates +% \begin{center}\WAauthorblock{miko,jdoe}\end{center} +% +% \DescribeMacro{\wa@institution@logo}|\wa@institution@logo| creates the logo of an +% institution from the database, and (if that is not there create a box and a message +% instead.) +% +% \section{Limitations}\label{sec:limitations} +% +% In this section we document known limitations. If you want to help alleviate them, +% please feel free to contact the package author. Some of them are currently discussed in +% the \sTeX TRAC~\cite{sTeX:online}. +% \begin{compactenum} +% \item none reported yet +% \end{compactenum} +% +% \StopEventually{\printbibliography} +% +% \section{The Implementation}\label{sec:impl} +% +% The |workaddress| 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} +% 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} +%<*package> +\RequirePackage{sref} +\RequirePackage{pgf} +% +%<*ltxml> +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Global; +use LaTeXML::Package; +RequirePackage('sref'); +% +% \end{macrocode} +% +% \subsection{Persons} +% +% To implement the |\WAperson| macro, we need to implement its keywords. +% +% \begin{macrocode} +%<*package> +\addmetakey{wa@person}{id} +\addmetakey{wa@person}{birthdate} +\addmetakey{wa@person}{email} +\addmetakey{wa@person}{url} +\addmetakey{wa@person}{affiliation} +\addmetakey{wa@person}{personaltitle} +\addmetakey{wa@person}{academictitle} +\addmetakey{wa@person}{department} +\addmetakey{wa@person}{workaddress} +\addmetakey{wa@person}{privaddress} +\addmetakey{wa@person}{worktel} +\addmetakey{wa@person}{privtel} +\addmetakey{wa@person}{workfax} +\addmetakey{wa@person}{privfax} +\addmetakey{wa@person}{worktelfax} +\addmetakey{wa@person}{privtelfax} +% \end{macrocode} +% +% \begin{macro}{\wa@def} +% The next macro is an auxiliary one that puts the value into an appropriate token +% register. +% \begin{macrocode} +\def\wa@def#1#2#3#4{\expandafter\xdef\csname wa@#1@#2@#3\endcsname{#4}} +% +% \end{macrocode} +% +% At the {\latexml} side we have a function |ExportMetadata| that does a similar job, +% fishing out the metadata keys from the keyval arguments and storing them in a safe place +% so they can be accessed later. +% +% \begin{macrocode} +%<*ltxml> + sub getKeyValue_noDelim { + my ($keyval,$key)=@_; + my $valuelist = $keyval && ToString($keyval->getValue($key)); + $valuelist =~ s/^{(.*)}$/$1/g if $valuelist; + return $valuelist; +} +sub ExportMetadata { + my $keys = shift; + my($id, $email,$affill,$address,$url,$name)=$keys + && map(getKeyValue_noDelim($keys,$_),qw(id email affiliation address url name)); + if ($id) { + AssignValue('WA_'.$id.'_email',$email,'global') if $email; + AssignValue('WA_'.$id.'_affiliation',$affill,'global') if $affill; + AssignValue('WA_'.$id.'_address',$email,'global') if $email; + AssignValue('WA_'.$id.'_url',$url,'global') if $url; + AssignValue('WA_'.$id.'_name',$name,'global') if $name; + } else {print STDERR "Warning: key 'id' undefined in \\WAperson\n"}; + return;}#$ +% +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\wa@ref@test} +% This macro tests whether the information specified is defined, and gives an error +% message else. +% \begin{macrocode} +%<*package> +\def\wa@ref@test#1#2#3{% +\@ifundefined{wa@#1@#2@#3}% +{\PackageError{workaddress}{reference to undefined #3 of #1 #2}% +{you must define a #1 with #2=#3\MessageBreak% +via the macro \protect\WA#1, before you can use it!}} +{}} +% \end{macrocode} +% \end{macro} +% +% With this, referencing is simple +% +% \begin{macro}{\wa@ref} +% \begin{macrocode} +\def\wa@ref#1#2#3{\wa@ref@test{#1}{#2}{#3}\csname wa@#1@#2@#3\endcsname} +% \end{macrocode} +% \end{macro} +% +% With this we can define the |\WAperson| macro, it just clears the keys, sets them +% again, and stores them in token registers. If course only if a |id| attribute is given, +% else we raise an error. +% +% \begin{macro}{WAperson} +% \begin{macrocode} +\let\wa@persons=\relax +\newcommand{\WAperson}[2][]{\metasetkeys{wa@person}{#1} +\ifx\wa@person@id\@empty\@latex@warning{key 'id' undefined in WAperson}\else +\wa@def{person}\wa@person@id{id}{\wa@person@id}% redundant, but useful for checking +\wa@def{person}\wa@person@id{name}{#2} +\wa@def{person}\wa@person@id{email}{\wa@person@email} +\wa@def{person}\wa@person@id{birthdate}{\wa@person@birthdate} +\wa@def{person}\wa@person@id{url}{\wa@person@url} +\wa@def{person}\wa@person@id{affiliation}{\wa@person@affiliation} +\wa@def{person}\wa@person@id{workaddress}{\wa@person@workaddress} +\wa@def{person}\wa@person@id{privaddress}{\wa@person@privaddress} +\wa@def{person}\wa@person@id{personaltitle}{\wa@person@personaltitle} +\wa@def{person}\wa@person@id{academictitle}{\wa@person@academictitle} +\wa@def{person}\wa@person@id{department}{\wa@person@department} +\wa@def{person}\wa@person@id{workaddress}{\wa@person@workaddress} +\wa@def{person}\wa@person@id{privaddress}{\wa@person@privaddress} +\wa@def{person}\wa@person@id{worktel}{\wa@person@worktel} +\wa@def{person}\wa@person@id{privtel}{\wa@person@privtel} +\wa@def{person}\wa@person@id{workfax}{\wa@person@workfax} +\wa@def{person}\wa@person@id{privfax}{\wa@person@privfax} +\wa@def{person}\wa@person@id{worktelfax}{\wa@person@worktelfax} +\wa@def{person}\wa@person@id{privtelfax}{\wa@person@privtelfax} +\@ifundefined{wa@persons} +{\xdef\wa@persons{\wa@person@id}} +{\xdef\wa@persons{\wa@persons,\wa@person@id}} +\fi} +\newcommand\DCMperson[2][]{\WAperson[#1]{#2}% +\PackageWarning{workaddress}{\protect\DCMperson\space is deprecated, use \protect\WAperson\space instead}} +% +%<*ltxml> +DefKeyVal('wa@person','id','Semiverbatim'); +DefKeyVal('wa@person','birthdate','Semiverbatim'); +DefKeyVal('wa@person','email','Semiverbatim'); +DefKeyVal('wa@person','url','Semiverbatim'); +DefKeyVal('wa@person','affiliation','Semiverbatim'); +DefKeyVal('wa@person','personaltitle','Semiverbatim'); +DefKeyVal('wa@person','academictitle','Semiverbatim'); +DefKeyVal('wa@person','department','Semiverbatim'); +DefKeyVal('wa@person','workaddress','Semiverbatim'); +DefKeyVal('wa@person','privaddress','Semiverbatim'); +DefKeyVal('wa@person','worktel','Semiverbatim'); +DefKeyVal('wa@person','privtel','Semiverbatim'); +DefKeyVal('wa@person','workfax','Semiverbatim'); +DefKeyVal('wa@person','privfax','Semiverbatim'); +DefKeyVal('wa@person','worktelfax','Semiverbatim'); +DefKeyVal('wa@person','privtelfax','Semiverbatim'); + +DefConstructor('\WAperson OptionalKeyVals:wa@person {}','', +afterDigest=>sub { + my ($stomach,$whatsit)=@_; + my $keys=$whatsit->getArg(1); + my $name=ToString($whatsit->getArg(2)); + $keys->setValue('name',$name); + ExportMetadata($keys); + return; +});#$ +% +% \end{macrocode} +% \end{macro} +% +% \subsection{Institutions} +% +% To implement the |\WAinstitution| macro, we need to implement its keywords first. +% +% \begin{macrocode} +%<*package> +\addmetakey{wa@institution}{id} +\addmetakey{wa@institution}{shortname} +\addmetakey{wa@institution}{acronym} +\addmetakey{wa@institution}{url} +\addmetakey{wa@institution}{partof} +\addmetakey{wa@institution}{countryshort} +\addmetakey{wa@institution}{logo} +\addmetakey{wa@institution}{streetaddress} +\addmetakey{wa@institution}{townzip} +\addmetakey{wa@institution}{type} +\addmetakey{wa@institution}{country} +% \end{macrocode} +% and we proceed as for |\WAperson|, +% \begin{macrocode} +\let\wa@institutions=\relax +% \end{macrocode} +% +% \begin{macro}{WAinstitution} +% \begin{macrocode} +\newcommand{\WAinstitution}[2][]{\metasetkeys{wa@institution}{#1} +\ifx\wa@institution@id\@empty\@latex@warning{key 'id' undefined in WAinstitution}\else +\wa@def{institution}\wa@institution@id{id}{\wa@institution@id}% redundant, but useful for checking +\wa@def{institution}\wa@institution@id{name}{#2} +\wa@def{institution}\wa@institution@id{shortname}{\wa@institution@shortname} +\wa@def{institution}\wa@institution@id{acronym}{\wa@institution@acronym} +\wa@def{institution}\wa@institution@id{url}{\wa@institution@url} +\wa@def{institution}\wa@institution@id{partof}{\wa@institution@partof} +\wa@def{institution}\wa@institution@id{countryshort}{\wa@institution@countryshort} +\wa@def{institution}\wa@institution@id{logo}{\wa@institution@logo} +\wa@def{institution}\wa@institution@id{townzip}{\wa@institution@townzip} +\wa@def{institution}\wa@institution@id{streetaddress}{\wa@institution@streetaddress} +\wa@def{institution}\wa@institution@id{country}{\wa@institution@country} +\wa@def{institution}\wa@institution@id{type}{\wa@institution@type} +\@ifundefined{wa@institutions} +{\xdef\wa@institutions{\wa@institution@id}} +{\xdef\wa@institutions{\wa@institutions,\wa@institution@id}} +\fi} +\newcommand\DCMinstitution[2][]{\WAinstitution[#1]{#2}% +\PackageWarning{workaddress}{\protect\DCMinstitution\space is deprecated, use \protect\WAinstitution\space instead}} +% +%<*ltxml> +DefKeyVal('wa@institution','id','Semiverbatim'); +DefKeyVal('wa@institution','url','Semiverbatim'); +DefKeyVal('wa@institution','partof','Semiverbatim'); +DefConstructor('\WAinstitution OptionalKeyVals:wa@institution {}','', +afterDigest=>sub { + my ($stomach,$whatsit)=@_; + my $keys=$whatsit->getArg(1); + my $name=ToString($whatsit->getArg(2)); + $keys->setValue('name',$name); + ExportMetadata($keys); + return; +});#$ +% +% \end{macrocode} +% \end{macro} +% +%\subsection{Applications}\label{sec:impl.appl} +% +% \begin{macro}{\WAauthorblock} +% This internal macro builds an author block from a list of |\WAperson| labels in +% |\wa@creators|. +% \begin{macrocode} +%<*package> +\addmetakey[false]{WAauthorblock}{dept}[true] +\addmetakey[false]{WAauthorblock}{aff}[true] +\addmetakey[false]{WAauthorblock}{url}[true] +\def\@true{true} +\newcounter{authors} +\newcommand\WAauthorblock[2][]{% +\metasetkeys{WAauthorblock}{#1} +{\let\tabularnewline\relax + \@for\@I:=#2\do{\stepcounter{authors}} + \def\@authors{}\def\@affs{}\def\@depts{}\def\@urls{} + \@for\@I:=#2\do + {\xdef\@authors{\@authors&\wa@ref{person}\@I{name}} + \xdef\@@dept{\wa@ref{person}\@I{department}} + \xdef\@shortname{\csname wa@institution@\@@dept @shortname\endcsname} + \xdef\@dept{\ifx\@shortname\@empty\wa@ref{institution}\@@dept{name}\else\@shortname\fi} + \xdef\@depts{\@depts&\@dept} + \xdef\@@aff{\wa@ref{person}\@I{affiliation}} + \xdef\@shortname{\csname wa@institution@\@@aff @shortname\endcsname} + \xdef\@aff{\ifx\@shortname\@empty\wa@ref{institution}\@@aff{name}\else\@shortname\fi} + \xdef\@affs{\@affs&\@aff} + \xdef\@urls{\@urls&\wa@ref{person}\@I{url}}} + \message{\theauthors authors: \@authors}} + \begin{tabular}[t]{l*{\theauthors}{c}} + \@authors\\ + \ifx\WAauthorblock@dept\@true\@depts\\\fi + \ifx\WAauthorblock@aff\@true\@affs\\\fi + \ifx\WAauthorblock@url\@true\@urls\\\fi +\end{tabular}} +% +% \begin{macrocode} +% \end{macro} +% +% \begin{macro}{\wapname} +% \begin{macrocode} +%<*package> +\newcommand\wapname[1]{\wa@ref{person}{#1}{name}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\waptname} +% \begin{macrocode} +%<*package> +\newcommand\waptname[1]{\wa@ref{person}{#1}{personaltitle} \wa@ref{person}{#1}{name}} +% +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\wa@institution@logo} +% \ednote{this code should probably be refactored into workaddress.dtx} +% \begin{macrocode} +%<*package> +\newcommand\wa@institution@logo[2][]{% +\pgfdeclareimage[#1]{logo}{\wa@ref{institution}{#2}{logo}} +\IfFileExists{\wa@ref{institution}{#2}{logo}}% +{\pgfuseimage{logo}} +{\fbox{#2 logo}\message{still need logo for #2}}} +% +% \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: RequirePackage birthdate personaltitle academictitle workaddress +% LocalWords: privaddress worktel privtel workfax privfax worktelfax noDelim +% LocalWords: privtelfax getKeyValue valuelist ToString getValue affill STDERR +% LocalWords: ExportMetadata AssignValue WAperson DefConstructor afterDigest +% LocalWords: getArg setValue FishOutMetadata keyvals foreach idlist tabline +% LocalWords: LookupValue insertElement atabline bitabline shorttitle nc args +% LocalWords: sharealike noderivativeworks DefMacro authorblock subsubsection +% LocalWords: contribs OptionalKeyVals omgroup omdoc srcref xml RawTeX partof +% LocalWords: openElement iffalse kohlhase Thu scsys sc sc latexml +% LocalWords: maketitle WAtitle texttt fileversion WAcreators miko jdoe impl +% LocalWords: WAabstract setcounter tocdepth tableofcontents newpage dmt03 +% LocalWords: WAsection ednote WAsubsection exfig hline dcmblock Patashnik +% LocalWords: DescribeEnv WAcontributors WAshorttitle WAshorttitle WAdate +% LocalWords: WAsubject WAsubject WAdescription WAdescription WApublisher +% LocalWords: WApublisher WAdate WAtype WAtype WAidentifier WAidentifier +% LocalWords: WAsource WAsource WAlanguage WAlanguage WArelation ctancite +% LocalWords: WArelation WArights WArights WAlicense WAlicense titlepage +% LocalWords: WAlicensenotice WAlicensenotice WAcopyrightnotice titlepage +% LocalWords: WAcopyrightnotice WAcclicense WAcclicense user.blockstyles +% LocalWords: WAchapter WAchatper WAsubsubsection WAsubsubsection ltxml +% LocalWords: user.conig makeatletter printbibliography expandafter showmeta +% LocalWords: xdef csname endcsname newcommand ifx ifundefined affs showmeta +% LocalWords: Semiverbatim whatsit newenvironment mtabline providecommand vfil +% LocalWords: WAsubtitle cclicense defdcm impl.blockstyles newcounter vskip +% LocalWords: stepcounter tabularnewline theauthors lineskip textbf noindent +% LocalWords: omd omd srefaddidkey thechapter autoclose thesection ifnum ifnum +% LocalWords: thesubsection thesubsubsection WAparagraph ISOtimestamp doctex +% LocalWords: WAinstitution WAinstitution compactenum textsf langle textsf +% LocalWords: langle metakeys addmetakey metasetkeys countryshort townzip aff +% LocalWords: streetaddress depts diff --git a/Master/texmf-dist/source/latex/stex/workaddress/workaddress.ins b/Master/texmf-dist/source/latex/stex/workaddress/workaddress.ins new file mode 100644 index 00000000000..af3b9cbe80a --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/workaddress/workaddress.ins @@ -0,0 +1,40 @@ +%% +%% This file generates files required to use the ed package. +%% At your command prompt write +%% +%% latex workaddress.ins +%% +%% Copyright(c) 2008 Michael Kohlhase +%% The development version of this file can be found at +%% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/workaddress/workaddress.ins $ +%% +%% This file is distributed under the terms of the LaTeX Project Public +%% License from CTAN archives in directory macros/latex/base/lppl.txt. +%% Either version 1.0 or, at your option, any later version. +%% +\input docstrip +\preamble +\endpreamble + +%\usedir{tex/latex/listings} +\keepsilent +\askforoverwritefalse + +% generate base package +\generate{\file{workaddress.sty}{\from{workaddress.dtx}{package}}} + +\Msg{*} +\Msg{* You probably need to move the file workaddress.sty into a directory searched by TeX.} +\Msg{*} +\Msg{* And don't forget to refresh your filename database} +\Msg{* if your TeX distribution uses such a database.} +\Msg{*} + +\nopreamble\nopostamble +\generate{\file{workaddress.sty.ltxml}{\from{workaddress.dtx}{ltxml}}} + +\Msg{*} +\Msg{* You probably need to move the generated file workaddress.sty.ltxml into a directory searched by LaTeXML.} +\Msg{*} + +\endbatchfile diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-bib-xhtml.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-bib-xhtml.xsl new file mode 100644 index 00000000000..82252d877af --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-bib-xhtml.xsl @@ -0,0 +1,54 @@ + + + + + + + + + +
    + +
+
+ + +
  • + +
  • +
    + + + + + + + + +
    + +
    +
    + +
    diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-block-xhtml.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-block-xhtml.xsl new file mode 100644 index 00000000000..b4537d12637 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-block-xhtml.xsl @@ -0,0 +1,470 @@ + + + + + + + + +

    +
    + + +
    + +
    +
    + + +
    +
    + + +
    +
    + + + + +
    +
    + + +
    +
    + + + + + + + + + + +
    +
    + + + +
    +
    + + + + + + + + + + + + + + + + + + + + () + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + +
    + +
    + + +
    + + + + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +
    +
    + + +
      + +
    +
    + + +
    + +
    +
    + + + + +
  • + +
  • +
    + +
  • + +
  • +
    +
    +
    + + +
    +
    +
    + + + + + + + + + {f:if(../ltx:figure/ltx:caption,../ltx:figure/ltx:caption/text(),@description)} + + + + + + + + + +
    \ No newline at end of file diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-common.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-common.xsl new file mode 100644 index 00000000000..ecdf089623b --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-common.xsl @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-html.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-html.xsl new file mode 100644 index 00000000000..37ea6a6fce6 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-html.xsl @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-html5.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-html5.xsl new file mode 100644 index 00000000000..dcb4cac0c8e --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-html5.xsl @@ -0,0 +1,52 @@ + + + + + + + + + + + + <!DOCTYPE html> + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-inline-xhtml.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-inline-xhtml.xsl new file mode 100644 index 00000000000..bbb7b5724d1 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-inline-xhtml.xsl @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + +   + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + : + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-math-image.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-math-image.xsl new file mode 100644 index 00000000000..519c4ffb5bb --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-math-image.xsl @@ -0,0 +1,36 @@ + + + + + + + + + {@tex} + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-math-mathml-html5.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-math-mathml-html5.xsl new file mode 100644 index 00000000000..5823af10df2 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-math-mathml-html5.xsl @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-math-mathml.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-math-mathml.xsl new file mode 100644 index 00000000000..ca9954a3494 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-math-mathml.xsl @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + simple + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-para-html5.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-para-html5.xsl new file mode 100644 index 00000000000..735313e70ac --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-para-html5.xsl @@ -0,0 +1,96 @@ + + + + + + + +
    +
    + + + + + + + + + +
    + +
    +
    + + + + + + +
    + + + + + + + + + +
    + +
    + + + +
    +
    +
    + + + + + +
    +
    + + +
    + + +
    +
    + + + +
    \ No newline at end of file diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-para-xhtml.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-para-xhtml.xsl new file mode 100644 index 00000000000..bdaff75bc0c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-para-xhtml.xsl @@ -0,0 +1,97 @@ + + + + + + + +
    +
    + + + + + + + + + +
    + +
    +
    + + + + + + +
    + + + + + + + + + +
    + +
    + + + +
    +
    +
    + + + + + +
    +
    + + +
    + + +
    +
    + + + +
    \ No newline at end of file diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-picture-image.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-picture-image.xsl new file mode 100644 index 00000000000..f3065dcce9b --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-picture-image.xsl @@ -0,0 +1,36 @@ + + + + + + + {@tex} + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-picture-svg-html5.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-picture-svg-html5.xsl new file mode 100644 index 00000000000..8021fbd4f22 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-picture-svg-html5.xsl @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-picture-svg.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-picture-svg.xsl new file mode 100644 index 00000000000..bad0b6f7fa3 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-picture-svg.xsl @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-structure-html5.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-structure-html5.xsl new file mode 100644 index 00000000000..21dacbf3f12 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-structure-html5.xsl @@ -0,0 +1,151 @@ + + + + + + + +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + + + + +
    + +
    .
    + +
    +
    + + +
    + +
    .
    + +
    +
    + + +
    + +
    :
    + +
    +
    + + + + +
    + + + + + : +
    +
    + + + + + 6 + + + + + + + +
    +

    + +
    +
    + + +

    +
    + + + + + + +
      + + +
    +
    + + +
  • + + + +
  • +
    + + + + + +
    diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-structure-xhtml.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-structure-xhtml.xsl new file mode 100644 index 00000000000..e3665da7a25 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-structure-xhtml.xsl @@ -0,0 +1,261 @@ + + + + + + + +
    + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + +
    +
    + + + + + +
    + +
    .
    + +
    +
    + + +
    + +
    .
    + +
    +
    + + +
    +
    + + + +
    + +
    :
    + +
    +
    + + + + +
    + + + + + : +
    +
    + + + + + 6 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 6 + + + 6 + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + +
      + + +
    +
    + + +
  • + + + +
  • +
    + + + + + +
    diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-tabular-xhtml.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-tabular-xhtml.xsl new file mode 100644 index 00000000000..93849426b67 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-tabular-xhtml.xsl @@ -0,0 +1,89 @@ + + + + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + char + + + + + + + + + + + + + + + + + + + + + + + + +
    diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-webpage-html5.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-webpage-html5.xsl new file mode 100644 index 00000000000..7e0e8b0df63 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-webpage-html5.xsl @@ -0,0 +1,248 @@ + + + + + + + + + +0 + + + + + + + + + <xsl:apply-templates select="*/ltx:title" mode="visible-text"/> + <xsl:for-each select="//ltx:navigation/ltx:ref[@class='up']" + > ‣ <xsl:value-of select="@title"/></xsl:for-each> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    +
    + + + + + +
    + + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + +
    :
    + +
    +
    + + + + +
    + ♦ +
    +
    + + + + +
    +
    + + + + +
      + + + +
    +
    + + + + +
      + + + +
    +
    + + + + +
  • +
    + + + + + + + + +
    \ No newline at end of file diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-webpage-xhtml.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-webpage-xhtml.xsl new file mode 100644 index 00000000000..560233fec27 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-webpage-xhtml.xsl @@ -0,0 +1,249 @@ + + + + + + + + + +0 + + + + + + + + + <xsl:apply-templates select="*/ltx:title" mode="visible-text"/> + <xsl:for-each select="//ltx:navigation/ltx:ref[@class='up']" + > ‣ <xsl:value-of select="@title"/></xsl:for-each> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + + + + +
    + + + +
    + + + +
    + + + +
    + + + +
    + + + + + + + + + + + + + + + + +
    + + + + + +
    +
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + +
    :
    + +
    +
    + + + + +
    + ♦ +
    +
    + + + + +
    +
    + + + + +
      + + + +
    +
    + + + + +
      + + + +
    +
    + + + + +
  • +
    + + + + + + + + +
    \ No newline at end of file diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-xhtml.xsl b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-xhtml.xsl new file mode 100644 index 00000000000..7b56175b8d6 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/LaTeXML-xhtml.xsl @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/amsart.css b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/amsart.css new file mode 100644 index 00000000000..5865875b873 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/amsart.css @@ -0,0 +1,11 @@ +/* A somewhat amsart-like style */ +h1, h2, h3, h4, h5, h6, .author .authorname + { font-family:serif; font-variant:small-caps;} +.author + { font-family:serif; } + +h1, h2, h3 + { text-align:center; color:#700303; } + +.para > p:first-child { text-indent: 2em; } +p { text-align:justify; } diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/closedbib.css b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/closedbib.css new file mode 100644 index 00000000000..d4ed13f403c --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/closedbib.css @@ -0,0 +1,5 @@ +/*====================================================================== + closedbib.css + supplemental style for LaTeXML documents converted to (X)HTML */ + +.bibblock { display:inline; } diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/core.css b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/core.css new file mode 100644 index 00000000000..1007bca0ee7 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/core.css @@ -0,0 +1,157 @@ +/*====================================================================== + Core CSS for LaTeXML documents converted to (X)HTML */ + +/* Generic Page layout */ +/* Header & footer */ +/*.header:before { content:url(latexml.png); }*/ +.header,.footer { font-size:80%; } +.header .previous, +.footer .previous { float:left; } +.header .up, +.footer { display:block; text-align:center; } +.header .next, +.footer .next { float:right; } +.header li { padding:0.1em 0.2em 0.1em 1em;} + +/* Main content */ +.content { clear:both; padding-top:5px; border-top:1px solid; } +.footer { margin-top:5px; border-top:1px solid; } + +/* if shown */ +.navbar .toc li { margin-left:-0.5em; } +.navbar li { white-space:nowrap; display:block; overflow:hidden; } +.navbar li .here { white-space:normal; overflow:visible; } + +.slide {width: 95%; + margin: 5mm 5mm 5mm 5mm; + border-style:solid; + border-width:medium; + padding: 10pt; + position: relative; +} + +/*====================================================================== + Titles & Frontmatter */ +h1 { text-align:center; font-size: 150%; font-family:sans-serif;} +h2 { font-family:sans-serif; padding-left:0.2em; margin-left:-0.5em; } +h3 { font-family:sans-serif; padding-left:0.2em; margin-left:-0.3em; } +/* h6 { display:run-in; }*/ +/* Hack to simulate run-in! */ +h6 { display:inline; font-size:100%; font-family:sans-serif; } +h6:after { content:" "; } +h6 + div.para, +h6 + p { display:inline; } + +.subtitle { text-align:center; font-size: 120%; font-family:sans-serif; + padding-left:0.2em; margin-left:-0.5em; } +.author { text-align:center; font-family:sans-serif; } +.author .personname { font-size: 130%; } +.dedicatory { font-style:oblique; } +.classification, +.keywords { font-size:90%; margin-left:4em; } +.abstract { margin:1em 4em 1em 4em; } +.toc li { list-style-type:none; } + +.navbar { display: none; } /* override! */ +.main { margin:0px; padding:1em 3em 1em 2em; } + +/*====================================================================== + Blocks, Lists, Floats */ +.inline-block { display:inline-block; } +div.equation { display:block; width:95%; text-align:center; } +.equation span.refnum.left { position:absolute; left:2em; } +.equation span.refnum.right { position:absolute; right:2em; } + +.equation td { width:auto; } +table.equation, +table.equationgroup { width:100%; } +/* Hide this from IE */ +tr > td.eqpad { width:50%; } + +dl.description dt { margin-right:0.5em; float:left; + font-weight:bold; font-size:95%; } +dl.description dd { margin-left:5em; } +dl.description dl.description dd { margin-left:3em; } + +.theorem {margin:1em 0em 1em 0em; } + +.bibliography dt { margin-right:0.5em; float:left; } +.bibliography dd { margin-left:3em; } +.biblist { list-style-type:none; } +.bibtag { font-weight:bold; margin-left:-2em; width:3em; } +/*.bibitem-tag + div { display:inline; }*/ +.bib-title { font-style:italic; } +.bib-article .bib-title { font-style:normal !important; } +.bib-journal { font-style:italic; } +.bib-volume { font-weight:bold; } + +.indexlist li { list-style-type:none; } +.indexlist { margin-left:1em; padding-left:1em;} +.listing td.linenumber, +.listingblock td.linenumber + { width:3em; text-align:right;} +/*====================================================================== + Borders and such */ +.framed { border:1px solid black;} +.tabular td, .tabular th { padding:0.1em 0.5em; } +table { border-collapse:collapse; } +/* Hmm... the star should be m:mtd */ +td.t, th.t, *[class~="t"] { border-top:1px solid black; } +td.r, th.r, *[class~="r"] { border-right:1px solid black; } +td.b, th.b, *[class~="b"] { border-bottom:1px solid black; } +td.l, th.l, *[class~="l"] { border-left:1px solid black; } +td.tt, th.tt, *[class~="tt"] { border-top:3px double black; } +td.rr, th.rr, *[class~="rr"] { border-right:3px double black; } +td.bb, th.bb, *[class~="bb"] { border-bottom:3px double black; } +td.ll, th.ll, *[class~="ll"] { border-left:3px double black; } + +td.left, th.left { text-align:left; white-space:nowrap; } +td.right, th.right { text-align:right; white-space:nowrap; } +td.center, th.center { text-align:center; white-space:nowrap; } +td.middle, th.middle, tr.middle { vertical-align:middle; } +td.baseline, th.baseline, tr.baseline { vertical-align:baseline; } + +/*====================================================================== + Low-level Basics */ +.TINY { font-size:50%; } +.Tiny { font-size:60%; } +.tiny { font-size:65%; } +.script { font-size:70%; } +.footnote { font-size:80%; } +.small { font-size:90%; } +.normal { font-size:100%; } +.large { font-size:110%; } +.Large { font-size:120%; } +.LARGE { font-size:140%; } +.huge { font-size:150%; } +.Huge { font-size:170%; } +.HUGE { font-size:200%; } +.sansserif { font-family: sans-serif; } +.typewriter { font-family: monospace; } +.bold { font-weight: bold; } +.medium { font-weight: normal; } +.italic { font-style: italic; } +.upright { font-style: normal; } +.slanted { font-style: oblique; } +.smallcaps { font-variant: small-caps; } +.red { color:red; } +.centering { text-align:center; + margin:auto; } +.inline-block.centering, +img.centering { display:block; + margin:auto; } +.flushleft { text-align:left; } +.flushright { text-align:right; } +.ERROR { color:red; } +cite { font-style: normal; } + +/*====================================================================== + pop-up footnotes, endnote, margin */ +.note .note_content {display:none; } +.note .note_content { + width: 70%; right:5%; font-size:80%; + background:#E0E0E0; border:3px outset gray; } +.note .mark { color:blue; } +.note-type { font-weight: bold; } +.note:hover .note_content + { display:block; position:absolute; z-index:10; } diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/marginpar.css b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/marginpar.css new file mode 100644 index 00000000000..fb6888573cf --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/marginpar.css @@ -0,0 +1,11 @@ +/* A simple example of CSS for placing marginpar in margin. + (more sophisticated layout probably requires xslt) */ +.note.margin .mark { display:none; } +.note.margin .note-type { display:none; } +.note.margin .note_content { + display:block; + position:fixed; left:83%; width:15%; + background-color: transparent; border:0pt; } + +/* Narrower, to make room for marginpar */ +.main { width:80%; } diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/navbar-left.css b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/navbar-left.css new file mode 100644 index 00000000000..dc8cf31d1a8 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/navbar-left.css @@ -0,0 +1,9 @@ +/* CSS for left navigation bar */ + +.navbar { display:block!important; position:fixed; left:0px; top:0px; width:170px; + margin:0em; padding:1em; font: bold 75% sans-serif; + border: 3px double; } +.navbar ul { margin-left:-2em; } +.main { position:absolute; left:190px; top:0px; right:2px; + margin:0px; padding:1em 3em 1em 2em; + width:70%; } diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/navbar-right.css b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/navbar-right.css new file mode 100644 index 00000000000..16af01b4005 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/navbar-right.css @@ -0,0 +1,7 @@ +/* CSS for left navigation bar */ + +.navbar { display:block!important; position:fixed; left:80%; top:0px; width:20%; + margin:0em; padding:1em; font: bold 75% sans-serif; } +.navbar ul { margin-left:-2em; } +.main { margin:0px; padding:1em 3em 1em 2em; + width:75%; } diff --git a/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/theme-blue.css b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/theme-blue.css new file mode 100644 index 00000000000..9e3659bc7cd --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/LaTeXML/theme-blue.css @@ -0,0 +1,15 @@ +/* Blue theme */ +body { background:#FFFFFF; color:#000000; } + +/* +.navbar { border-right: 3px double #087d9d; + border-bottom: 5px double #087d9d; background:#e5f7fb; } +*/ +.navbar { border: 5px double #087d9d; background:#e5f7fb; } + +.content { border-top:1px solid #087d9d; } +.footer { border-top:1px solid #087d9d; } + +h2 { border-top: 5px double #087d9d; border-left: 3px double #087d9d; background:#e5f7fb; } +h3 { border-top: 1px solid #087d9d; border-left: 1px solid #087d9d; background:#e7faff; } +th, *[class~="thead"] { background-color:#e5f7fb; } diff --git a/Master/texmf-dist/source/latex/stex/xsl/Makefile b/Master/texmf-dist/source/latex/stex/xsl/Makefile new file mode 100644 index 00000000000..1263948fb88 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/Makefile @@ -0,0 +1 @@ +all: diff --git a/Master/texmf-dist/source/latex/stex/xsl/doc.xsl b/Master/texmf-dist/source/latex/stex/xsl/doc.xsl new file mode 100644 index 00000000000..dddb3ab85f8 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/doc.xsl @@ -0,0 +1,109 @@ + + + + + + + + + This OMDoc document is generated from an sTeX-encoded one via LaTeXML, you may want to reconsider editing it. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/xsl/graphics.xsl b/Master/texmf-dist/source/latex/stex/xsl/graphics.xsl new file mode 100644 index 00000000000..9c31fd54581 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/graphics.xsl @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/xsl/listings.xsl b/Master/texmf-dist/source/latex/stex/xsl/listings.xsl new file mode 100644 index 00000000000..eaf706326d4 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/listings.xsl @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + + + + + + + + + + + + + + + + + + lstemph + color: + + + + + + + + + + + cannot deal with element yet! + + +
    diff --git a/Master/texmf-dist/source/latex/stex/xsl/ltxml2cnx.xsl b/Master/texmf-dist/source/latex/stex/xsl/ltxml2cnx.xsl new file mode 100644 index 00000000000..9ee31d4fa18 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/ltxml2cnx.xsl @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + +
    diff --git a/Master/texmf-dist/source/latex/stex/xsl/math.xsl b/Master/texmf-dist/source/latex/stex/xsl/math.xsl new file mode 100644 index 00000000000..9d33b564327 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/math.xsl @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + math.xsl warning: unknown math format + + + + + + + + + + + + + + + math.xsl warning: unknown math format + + + + + + + + + + + + + + + + + + + + + math.xsl warning: unknown math format + + + + + diff --git a/Master/texmf-dist/source/latex/stex/xsl/notations.xsl b/Master/texmf-dist/source/latex/stex/xsl/notations.xsl new file mode 100644 index 00000000000..a1a42a8496f --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/notations.xsl @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/xsl/omdocpost.xsl b/Master/texmf-dist/source/latex/stex/xsl/omdocpost.xsl new file mode 100644 index 00000000000..df733b1b300 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/omdocpost.xsl @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/xsl/owl2post.xsl b/Master/texmf-dist/source/latex/stex/xsl/owl2post.xsl new file mode 100644 index 00000000000..be5cf378409 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/owl2post.xsl @@ -0,0 +1,83 @@ + + + + + + + + + This OWL2 ontology is generated from an sTeX-encoded one via LaTeXML, you may want to reconsider editing it. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/source/latex/stex/xsl/symbols.xsl b/Master/texmf-dist/source/latex/stex/xsl/symbols.xsl new file mode 100644 index 00000000000..23d03cb6472 --- /dev/null +++ b/Master/texmf-dist/source/latex/stex/xsl/symbols.xsl @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/tex/latex/stex/cmath/cmath.sty b/Master/texmf-dist/tex/latex/stex/cmath/cmath.sty new file mode 100644 index 00000000000..c94906d6fd2 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/cmath/cmath.sty @@ -0,0 +1,29 @@ +%% +%% This is file `cmath.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% cmath.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{cmath}[2012/01/28 v0.1 inline content math] +\ProcessOptions + +\newcommand{\vname}[2][]{#2% +\def\@opt{#1}% +\ifx\@opt\@empty\else\expandafter\gdef\csname MOD@name@#1\endcsname{#2}\fi} +\def\vnref#1{\csname MOD@name@#1\endcsname} +\newcommand{\primvar}[2][]{\vname[#1]{#2^\prime}} +\newcommand{\pprimvar}[2][]{\vname[#1]{#2^{\prime\prime}}} +\newcommand{\uivar}[3][]{\vname[#1]{{#2}^{#3}}} +\newcommand{\livar}[3][]{\vname[#1]{{#2}_{#3}}} +\newcommand{\ulivar}[4][]{\vname[#1]{{#2}^{#3}_{#4}}} +\newcommand\nappa[2]{#1\left(#2\right)} +\newcommand\nappe[3]{\nappa{#1}{#2,\ldots,#3}} +\newcommand\nappf[4]{\nappe{#1}{#2{#3}}{#2{#4}}} +\newcommand\nappli[4]{\nappe{#1}{#2_{#3}}{#2_{#4}}} +\newcommand\nappui[4]{\nappe{#1}{#2^{#3}}{#2^{#4}}} +\endinput +%% +%% End of file `cmath.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/cmath/cmath.sty.ltxml b/Master/texmf-dist/tex/latex/stex/cmath/cmath.sty.ltxml new file mode 100644 index 00000000000..d972c961de7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/cmath/cmath.sty.ltxml @@ -0,0 +1,55 @@ +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; + +# return: unique ID for variable +sub cvar_id { + my ($id) = @_; + $id = ToString($id); + if (!$id) { + $id=LookupValue('cvar_id') || 0; + AssignValue('cvar_id', $id + 1, 'global'); } + "cvar.$id"; }#$ +DefConstructor('\vname[]{}', + "#2", + requireMath=>1); +# \vnref{} +DefMacro('\vnref{}','\@XMRef{cvar.#1}'); + +# variants for declaring variables +DefMacro('\uivar[]{}{}', '\vname[#1]{{#2}^{#3}}'); +DefMacro('\livar[]{}{}', '\vname[#1]{{#2}_{#3}}'); +DefMacro('\ulivar[]{}{}{}', '\vname[#1]{{#2}^{#3}_{#4}}'); +DefMacro('\primvar[]{}', '\vname[#1]{#2^\prime}'); +DefMacro('\pprimvar[]{}', '\vname[#1]{#2^{\prime\prime}}'); + +# \nappa{}{<(const)(,\1)*>} +# @#1(#2) +DefConstructor('\nappa{}{}', + "" + ."" + ."#2" + .""); + +# \@napp@seq{}{start }{end } +# @#1(@sequence(#2,sequencefromto,#3)) +DefConstructor('\@napp@seq{}{}{}', + "" + ."" + ."" + ."" + ."" + ."#2" + ."" + ."#3" + ."" + ."" + .""); + +DefMacro('\nappe{}{}{}', '\@napp@seq{#1}{#2}{#3}'); +DefMacro('\nappf{}{}{}{}', '\@napp@seq{#1}{#2{#3}}{#2{#4}}'); +DefMacro('\nappli{}{}{}{}', '\@napp@seq{#1}{#2_{#3}}{#2_{#4}}'); +DefMacro('\nappui{}{}{}{}', '\@napp@seq{#1}{#2^{#3}}{#2^{#4}}'); + +1; diff --git a/Master/texmf-dist/tex/latex/stex/cmathml/cmathml.sty b/Master/texmf-dist/tex/latex/stex/cmathml/cmathml.sty new file mode 100644 index 00000000000..90b215dd2ab --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/cmathml/cmathml.sty @@ -0,0 +1,450 @@ +%% +%% This is file `cmathml.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% cmathml.dtx (with options: `sty') +%% +\RequirePackage{presentation} +\newcommand{\Capply}[3][]{#2(#3)} +\def\CMathML@cn#1{#1} +\newcommand{\Ccn}[2][]{\CMathML@cn{#2}} +\def\CMathML@ci#1{#1} +\newcommand{\Cci}[2][]{\CMathML@ci{#2}} +\def\CMathML@csymbol#1{#1} +\newcommand{\Ccsymbol}[2][]{\CMathML@csymbol{#2}} +\def\CMathML@ccinterval#1#2{[#1,#2]} +\newcommand{\Cccinterval}[3][]{\CMathML@ccinterval{#2}{#3}} +\def\CMathML@cointerval#1#2{[#1,#2)} +\newcommand{\Ccointerval}[3][]{\CMathML@cointerval{#2}{#3}} +\def\CMathML@ocinterval#1#2{(#1,#2]} +\newcommand{\Cocinterval}[3][]{\CMathML@ocinterval{#2}{#3}} +\def\CMathML@oointerval#1#2{(#1,#2)} +\newcommand{\Coointerval}[3][]{\CMathML@oointerval{#2}{#3}} +\newcommand{\Cinverse}[2][]{#2^{-1}} +\def\CMathML@lambda#1#2{\lambda({#1},{#2})} +\newcommand{\Clambda}[3][]{\CMathML@lambda{#2}{#3}} +\def\CMathML@lambdaDA#1#2#3{\lambda({#1}\colon{#2},#3)} +\newcommand{\ClambdaDA}[4][]{\CMathML@lambdaDA{#2}{#3}{#4}} +\def\CMathML@restrict#1#2{\left.#1\right|_{#2}} +\newcommand{\Crestrict}[3][]{\CMathML@restrict{#2}{#3}} +\def\CMathML@composeOp{\circ} +\newcommand{\CcomposeOp}{\CMathML@composeOp} +\def\CMathML@compose#1{\assoc[p=500,pi=500]{\CMathML@composeOp}{#1}} +\newcommand{\Ccompose}[2][]{\CMathML@compose{#2}} +\def\CMathML@ident#1{\mathrm{id}} +\newcommand{\Cident}[1][]{\CMathML@ident{#1}} +\def\CMathML@domain#1{\mbox{dom}(#1)} +\newcommand{\Cdomain}[2][]{\CMathML@domain{#2}} +\def\CMathML@codomain#1{\mbox{codom}(#1)} +\newcommand{\Ccodomain}[2][]{\CMathML@codomain{#2}} +\def\CMathML@image#1{{\mathbf{Im}}(#1)} +\newcommand{\Cimage}[2][]{\CMathML@image{#2}} +\def\CMathML@piecewise#1{\left\{\begin{array}{ll}#1\end{array}\right.} +\newcommand{\Cpiecewise}[2][]{\CMathML@piecewise{#2}} +\def\CMathML@piece#1#2{#1&{\mathrm{if}}\;{#2}\\} +\newcommand{\Cpiece}[3][]{\CMathML@piece{#2}{#3}} +\def\CMathML@otherwise#1{#1&else\\} +\newcommand{\Cotherwise}[2][]{\CMathML@otherwise{#2}} +\def\CMathML@quotient#1#2{\frac{#1}{#2}} +\newcommand{\Cquotient}[3][]{\CMathML@quotient{#2}{#3}} +\def\CMathML@factorialOp{!} +\newcommand{\CfactorialOp}{\CMathML@factorialOp} +\def\CMathML@factorial#1{#1{\CMathML@factorialOp}} +\newcommand{\Cfactorial}[2][]{\CMathML@factorial{#2}} +\def\CMathML@divideOp{\div} +\newcommand{\CdivideOp}{\CMathML@divideOp} +\def\CMathML@divide#1#2{\infix[p=400]{\CMathML@divideOp}{#1}{#2}} +\newcommand{\Cdivide}[3][]{\CMathML@divide{#2}{#3}} +\def\CMathML@maxOp{\mathrm{max}} +\newcommand{\CmaxOp}{\CMathML@maxOp} +\def\CMathML@max#1{{\CMathML@maxOp}(#1)} +\newcommand{\Cmax}[2][]{\CMathML@max{#2}} +\def\CMathML@minOp{\mathrm{min}} +\newcommand{\CminOp}{\CMathML@minOp} +\def\CMathML@min#1{{\CMathML@minOp}(#1)} +\newcommand{\Cmin}[2][]{\CMathML@min{#2}} +\def\CMathML@minusOp{-} +\newcommand{\CminusOp}{\CMathML@minusOp} +\def\CMathML@minus#1#2{\infix[p=500]{\CMathML@minusOp}{#1}{#2}} +\newcommand{\Cminus}[3][]{\CMathML@minus{#2}{#3}} +\def\CMathML@uminus#1{\prefix[p=200]{\CMathML@minusOp}{#1}} +\newcommand{\Cuminus}[2][]{\CMathML@uminus{#2}} +\def\CMathML@plusOp{+} +\newcommand{\CplusOp}{\CMathML@plusOp} +\def\CMathML@plus#1{\assoc[p=500]{\CMathML@plusOp}{#1}} +\newcommand{\Cplus}[2][]{\CMathML@plus{#2}} +\def\CMathML@power#1#2{\infix[p=200]{^}{#1}{#2}} +\newcommand{\Cpower}[3][]{\CMathML@power{#2}{#3}} +\def\CMathML@remOp{\bmod} +\newcommand{\CremOp}{\CMathML@remOp} +\def\CMathML@rem#1#2{#1 \CMathML@remOp #2} +\newcommand{\Crem}[3][]{\CMathML@rem{#2}{#3}} +\def\CMathML@timesOp{\cdot} +\newcommand{\CtimesOp}{\CMathML@timesOp} +\def\CMathML@times#1{\assoc[p=400]{\CMathML@timesOp}{#1}} +\newcommand{\Ctimes}[2][]{\CMathML@times{#2}} +\def\CMathML@rootOp{\sqrt} +\newcommand{\CrootOp}{\CMathML@rootOp{}} +\def\CMathML@root#1#2{\CMathML@rootOp[#1]{#2}} +\newcommand{\Croot}[3][]{\CMathML@root{#2}{#3}} +\def\CMathML@gcd#1{\gcd(#1)} +\newcommand{\Cgcd}[2][]{\CMathML@gcd{#2}} +\def\CMathML@andOp{\wedge} +\newcommand{\CandOp}{\CMathML@andOp} +\def\CMathML@and#1{\assoc[p=400]{\CMathML@andOp}{#1}} +\newcommand{\Cand}[2][]{\CMathML@and{#2}} +\def\CMathML@orOp{\vee} +\newcommand{\CorOp}{\CMathML@orOp} +\def\CMathML@or#1{\assoc[p=500]{\CMathML@orOp}{#1}} +\newcommand{\Cor}[2][]{\CMathML@or{#2}} +\def\CMathML@xorOp{\oplus} +\newcommand{\CxorOp}{\CMathML@xorOp} +\def\CMathML@xor#1{\assoc[p=400]{\CMathML@xorOp}{#1}} +\newcommand{\Cxor}[2][]{\CMathML@xor{#2}} +\def\CMathML@notOp{\neg} +\newcommand{\CnotOp}{\CMathML@notOp} +\def\CMathML@not#1{\CMathML@notOp{#1}} +\newcommand{\Cnot}[2][]{\CMathML@not{#2}} +\def\CMathML@impliesOp{\Longrightarrow} +\newcommand{\CimpliesOp}{\CMathML@impliesOp} +\def\CMathML@implies#1#2{#1\CMathML@impliesOp{#2}} +\newcommand{\Cimplies}[3][]{\CMathML@implies{#2}{#3}} +\def\CMathML@AndDA#1#2{\bigwedge_{#1}{#2}} % set, scope +\newcommand{\CAndDA}[3][]{\CMathML@AndDA{#2}{#3}} +\def\CMathML@AndCond#1#2#3{\bigwedge_{#2}{#3}} % bvars,condition, scope +\newcommand{\CAndCond}[4][]{\CMathML@AndCond{#2}{#2}{#3}} +\def\CMathML@OrDA#1#2{\bigvee_{#1}{#2}} % set, scope +\newcommand{\COrDa}[3][]{\CMathML@OrDA{#2}{#3}} +\def\CMathML@OrCond#1#2#3{\bigvee_{#2}{#3}}% bvars,condition, scope +\newcommand{\COrCond}[4][]{\CMathML@OrCond{#2}{#3}{#4}} +\def\CMathML@XorDA#1#2{\bigoplus_{#1}{#2}} % set, scope +\newcommand{\CXorDA}[3][]{\CMathML@XorDA{#2}{#3}} +\def\CMathML@XorCond#1#2#3{\bigoplus_{#2}{#3}}% bvars,condition, scope +\newcommand{\CXorCond}[4][]{\CMathML@XorCond{#2}{#3}{#4}} +\def\CMathML@forall#1#2{\forall{#1}\colon{#2}} +\newcommand{\Cforall}[3][]{\CMathML@forall{#2}{#3}} +\def\CMathML@forallCond#1#2#3{\forall{#1},{#2}\colon{#3}} % list), condition, scope +\newcommand{\CforallCond}[4][]{\CMathML@forallCond{#2}{#3}{#4}} +\def\CMathML@exists#1#2{\exists{#1}\colon{#2}} +\newcommand{\Cexists}[3][]{\CMathML@exists{#2}{#3}} +\def\CMathML@esistsCont#1#2#3{\exists{#1},{#2}\colon{#3}} +\newcommand{\CexistsCond}[4][]{\CMathML@esistsCont{#2}{#3}{#4}} +\def\CMathML@abs#1{\left|#1\right|} +\newcommand{\Cabs}[2][]{\CMathML@abs{#2}} +\def\CMathML@conjugate#1{\overline{#1}} +\newcommand{\Cconjugate}[2][]{\CMathML@conjugate{#2}} +\def\CMathML@arg#1{\angle #1} +\newcommand{\Carg}[2][]{\CMathML@arg{#2}} +\def\CMathML@real#1{\Re #1} +\newcommand{\Creal}[2][]{\CMathML@real{#2}} +\def\CMathML@imaginary#1{\Im #1} +\newcommand{\Cimaginary}[2][]{\CMathML@imaginary{#2}} +\def\CMathML@lcm#1{\mbox{lcm}(#1)} +\newcommand{\Clcm}[2][]{\CMathML@lcm{#2}} +\def\CMathML@floor#1{\left\lfloor{#1}\right\rfloor} +\newcommand{\Cfloor}[2][]{\CMathML@floor{#2}} +\def\CMathML@ceiling#1{\left\lceil{#1}\right\rceil} +\newcommand{\Cceiling}[2][]{\CMathML@ceiling{#2}} +\def\CMathML@eqOp{=} +\newcommand{\CeqOp}{\CMathML@eqOp} +\def\CMathML@eq#1{\assoc[p=700]{\CMathML@eqOp}{#1}} +\newcommand{\Ceq}[2][]{\CMathML@eq{#2}} +\def\CMathML@neqOp{\neq} +\newcommand{\CneqOp}{\CMathML@neqOp} +\def\CMathML@neq#1#2{\infix[p=700]{\CMathML@neqOp}{#1}{#2}} +\newcommand{\Cneq}[3][]{\CMathML@neq{#2}{#3}} +\def\CMathML@gtOp{>} +\newcommand{\CgtOp}{\CMathML@gtOp} +\def\CMathML@gt#1{\assoc[p=700]{\CMathML@gtOp}{#1}} +\newcommand{\Cgt}[2][]{\CMathML@gt{#2}} +\def\CMathML@ltOp{<} +\newcommand{\CltOp}{\CMathML@ltOp} +\def\CMathML@lt#1{\assoc[p=700]{\CMathML@ltOp}{#1}} +\newcommand{\Clt}[2][]{\CMathML@lt{#2}} +\def\CMathML@geqOp{\geq} +\newcommand{\CgeqOp}{\CMathML@geqOp} +\def\CMathML@geq#1{\assoc[p=700]{\CMathML@geqOp}{#1}} +\newcommand{\Cgeq}[2][]{\CMathML@geq{#2}} +\def\CMathML@leqOp{\leq} +\newcommand{\CleqOp}{\CMathML@leqOp} +\def\CMathML@leq#1{\assoc[p=700]{\CMathML@leqOp}{#1}} +\newcommand{\Cleq}[2][]{\CMathML@leq{#2}} +\def\CMathML@equivalentOp{\equiv} +\newcommand{\CequivalentOp}{\CMathML@equivalentOp} +\def\CMathML@equivalent#1{\assoc[p=700]{\CMathML@equivalentOp}{#1}} +\newcommand{\Cequivalent}[2][]{\CMathML@equivalent{#2}} +\def\CMathML@approxOp{\approx} +\newcommand{\CapproxOp}{\CMathML@approxOp} +\def\CMathML@approx#1#2{#1\CMathML@approxOp{#2}} +\newcommand{\Capprox}[3][]{\CMathML@approx{#2}{#3}} +\def\CMathML@factorofOp{\mid} +\newcommand{\CfactorofOp}{\CMathML@factorofOp} +\def\CMathML@factorof#1#2{#1\CMathML@factorofOp{#2}} +\newcommand{\Cfactorof}[3][]{\CMathML@factorof{#2}{#3}} + +\def\CMathML@intOp{\int} +\newcommand{\CintOp}{\CMathML@intOp} +\def\CMathML@int#1{\CMathML@intOp{#1}} +\newcommand{\Cint}[2][]{\CMathML@int{#2}} +\def\CMathML@intLimits#1#2#3#4{\CMathML@intOp_{#2}^{#3}{#4}d{#1}} %bvars,llimit, ulimit,body +\newcommand{\CintLimits}[5][]{\CMathML@intLimits{#2}{#3}{#4}{#5}} +\def\CMathML@intSet#1#2{\CMathML@intOp_{#1}{#2}}% set,function +\newcommand{\CintDA}[3][]{\CMathML@intSet{#2}{#3}} +\def\CMathML@intCond#1#2#3{\CMathML@intOp_{#2}{#3}d{#1}} %bvars, condition, body +\newcommand{\CintCond}[4][]{\CMathML@intCond{#2}{#3}{#4}} + +\def\CMathML@diff#1{#1'} +\newcommand{\Cdiff}[2][]{\CMathML@diff{#2}} +\def\CMathML@ddiff#1#2{{d{#2}(#1)\over{d{#1}}}} +\newcommand{\Cddiff}[3][]{\CMathML@ddiff{#2}{#3}} +\def\CMathML@partialdiff#1#2#3{{\partial^{#1}\over\partial{#2}}{#3}}% degree, bvars, body +\newcommand{\Cpartialdiff}[4][]{\CMathML@partialdiff{#2}{#3}{#4}} +\newcommand{\Cdegree}[2]{#1^{#2}} +\def\CMathML@limit#1#2#3{\lim_{#1\rightarrow{#2}}{#3}} +\newcommand{\Climit}[4][]{\CMathML@limit{#2}{#3}{#4}} % bvar, lowlimit, scope +\def\CMathML@limitCond#1#2#3{\lim_{#2}{#3}} +\newcommand{\ClimitCond}[4][]{\CMathML@limitCond{#2}{#3}{#4}} % bvars, condition, scope +\def\CMathML@tendstoOp{\rightarrow} +\newcommand{\CtendstoOp}{\CMathML@tendstoOp} +\def\CMathML@tendsto#1#2{#1\CMathML@tendstoOp{#2}} +\newcommand{\Ctendsto}[3][]{\CMathML@tendsto{#2}{#3}} +\def\CMathML@tendstoAboveOp{\searrow} +\newcommand{\CtendstoAboveOp}{\CMathML@tendstoAboveOp} +\def\CMathML@tendstoAbove#1#2{#1\searrow{#2}} +\newcommand{\CtendstoAbove}[3][]{\CMathML@tendstoAbove{#2}{#3}} +\def\CMathML@tendstoBelowOp{\nearrow} +\newcommand{\CtendstoBelowOp}{\CMathML@tendstoBelowOp} +\def\CMathML@tendstoBelow#1#2{#1\CMathML@tendstoBelowOp{#2}} +\newcommand{\CtendstoBelow}[3][]{\CMathML@tendstoBelow{#2}{#3}} +\def\CMathML@divergence#1{\nabla\cdot{#1}} +\newcommand{\Cdivergence}[2][]{\CMathML@divergence{#2}} +\def\CMathML@grad#1{\nabla{#1}} +\newcommand{\Cgrad}[2][]{\CMathML@grad{#2}} +\def\CMathML@curl#1{\nabla\times{#1}} +\newcommand{\Ccurl}[2][]{\CMathML@curl{#2}} +\def\CMathML@laplacian#1{\nabla^2#1} +\newcommand{\Claplacian}[2][]{\CMathML@laplacian{#2}} +\def\CMathML@set#1{\left\{#1\right\}} +\newcommand{\Cset}[2][]{\CMathML@set{#2}} +\def\CMathML@setRes#1#2{\{#1|#2\}} +\newcommand{\CsetRes}[3][]{\CMathML@setRes{#2}{#3}} +\def\CMathML@setCond#1#2#3{\{#2|#3\}} +\newcommand{\CsetCond}[4][]{\CMathML@setCond{#2}{#3}{#4}} +\def\CMathML@setDA#1#2#3{\{#1\in{#2}|#3\}} +\newcommand{\CsetDA}[4][]{\CMathML@setDA{#2}{#3}{#4}} +\def\CMathML@listOp{\mbox{list}} +\newcommand{\ClistOp}{\CMathML@listOp} +\def\CMathML@list#1{\CMathML@listOp({#1})} +\newcommand{\Clist}[2][]{\CMathML@list{#2}} +\def\CMathML@unionOp{\cup} +\newcommand{\CunionOp}{\CMathML@unionOp} +\def\CMathML@union#1{\assoc[p=500]{\CMathML@unionOp}{#1}} +\newcommand{\Cunion}[2][]{\CMathML@union{#2}} +\def\CMathML@intersectOp{\cap} +\newcommand{\CintersectOp}{\CMathML@intersectOp} +\def\CMathML@intersect#1{\assoc[p=400]{\CMathML@intersectOp}{#1}} +\newcommand{\Cintersect}[2][]{\CMathML@intersect{#2}} +\def\CMathML@inOp{\in} +\newcommand{\CinOp}{\CMathML@inOp} +\def\CMathML@in#1#2{#1\CMathML@inOp{#2}} +\newcommand{\Cin}[3][]{\CMathML@in{#2}{#3}} +\def\CMathML@notinOp{\notin} +\newcommand{\CnotinOp}{\CMathML@notinOp} +\def\CMathML@notin#1#2{#1\CMathML@notinOp{#2}} +\newcommand{\Cnotin}[3][]{\CMathML@notin{#2}{#3}} +\def\CMathML@setdiffOp{\setminus} +\newcommand{\CsetdiffOp}{\CMathML@setdiffOp} +\def\CMathML@setdiff#1#2{#1\CMathML@setdiffOp{#2}} +\newcommand{\Csetdiff}[3][]{\CMathML@setdiff{#2}{#3}} +\def\CMathML@cardOp{\#} +\newcommand{\CcardOp}{\CMathML@cardOp} +\def\CMathML@card#1{\CMathML@cardOp #1} +\newcommand{\Ccard}[2][]{\CMathML@card{#2}} +\def\CMathML@cartesianproductOp{\times} +\newcommand{\CcartesianproductOp}{\CMathML@cartesianproductOp} +\def\CMathML@cartesianproduct#1{\assoc[p=400]{\CMathML@cartesianproductOp}{#1}} +\newcommand{\Ccartesianproduct}[2][]{\CMathML@cartesianproduct{#2}} +\def\CMathML@subsetOp{\subseteq} +\newcommand{\CsubsetOp}{\CMathML@subsetOp} +\def\CMathML@subset#1{\assoc[p=700]{\CMathML@subsetOp}{#1}} +\newcommand{\Csubset}[2][]{\CMathML@subset{#2}} +\def\CMathML@prsubsetOp{\subset} +\newcommand{\CprsubsetOp}{\CMathML@prsubsetOp} +\def\CMathML@prsubset#1{\assoc[p=700]{\CMathML@prsubsetOp}{#1}} +\newcommand{\Cprsubset}[2][]{\CMathML@prsubset{#2}} +\def\CMathML@notsubsetOp{\not\subseteq} +\newcommand{\CnotsubsetOp}{\CMathML@notsubsetOp} +\def\CMathML@notsubset#1#2{#1\CMathML@notsubsetOp{#2}} +\newcommand{\Cnotsubset}[3][]{\CMathML@notsubset{#2}{#3}} +\def\CMathML@notprsubsetOp{\not\subset} +\newcommand{\CnotprsubsetOp}{\CMathML@notprsubsetOp} +\def\CMathML@notprsubset#1#2{#1\CMathML@notprsubsetOp{#2}} +\newcommand{\Cnotprsubset}[3][]{\CMathML@notprsubset{#2}{#3}} +\def\CMathML@supsetOp{\supseteq} +\newcommand{\CsupsetOp}{\CMathML@supsetOp} +\def\CMathML@supset#1{\assoc[p=700]{\CMathML@supsetOp}{#1}} +\newcommand{\Csupset}[2][]{\CMathML@supset{#2}} +\def\CMathML@prsupsetOp{\supset} +\newcommand{\CprsupsetOp}{\CMathML@prsupsetOp} +\def\CMathML@prsupset#1{\assoc[p=700]{\CMathML@prsupsetOp}{#1}} +\newcommand{\Cprsupset}[2][]{\CMathML@prsupset{#2}} +\def\CMathML@notsupsetOp{\not\supseteq} +\newcommand{\CnotsupsetOp}{\CMathML@notsupsetOp} +\def\CMathML@notsupset#1#2{#1\CMathML@notsupsetOp{#2}} +\newcommand{\Cnotsupset}[3][]{\CMathML@notsupset{#2}{#3}} +\def\CMathML@notprsupsetOp{\not\supset} +\newcommand{\CnotprsupsetOp}{\CMathML@notprsupsetOp} +\def\CMathML@notprsupset#1#2{#1\CMathML@notprsupsetOp{#2}} +\newcommand{\Cnotprsupset}[3][]{\CMathML@notprsupset{#2}{#3}} +\def\CMathML@UnionDAOp{\bigwedge} +\newcommand{\CUnionDAOp}{\CMathML@UnionDAOp} +\def\CMathML@UnionDA#1#2{\CMathML@UnionDAOp_{#1}{#2}} % set, scope +\newcommand{\CUnionDA}[3][]{\CMathML@UnionDA{#2}{#3}} +\def\CMathML@UnionCond#1#2#3{\CMathML@UnionDAOp_{#2}{#3}} % bvars,condition, scope +\newcommand{\CUnionCond}[4][]{\CMathML@UnionCond{#2}{#2}{#3}} +\def\CMathML@IntersectDAOp{\bigvee} +\newcommand{\CIntersectDAOp}{\CMathML@IntersectDAOp} +\def\CMathML@IntersectDA#1#2{\CMathML@IntersectDAOp_{#1}{#2}} % set, scope +\newcommand{\CIntersectDa}[3][]{\CMathML@IntersectDA{#2}{#3}} +\def\CMathML@IntersectCond#1#2#3{\CMathML@IntersectDAOp_{#2}{#3}}% bvars,condition, scope +\newcommand{\CIntersectCond}[4][]{\CMathML@IntersectCond{#2}{#3}{#4}} +\def\CMathML@CartesianproductDAOp{\bigoplus} +\newcommand{\CCartesianproductDAOp}{\CMathML@CartesianproductDAOp} +\def\CMathML@CartesianproductDA#1#2{\CMathML@CartesianproductDAOp_{#1}{#2}} % set, scope +\newcommand{\CCartesianproductDA}[3][]{\CMathML@CartesianproductDA{#2}{#3}} +\def\CMathML@CartesianproductCond#1#2#3{\CMathML@CartesianproductDAOp_{#2}{#3}}% bvars,condition, scope +\newcommand{\CCartesianproductCond}[4][]{\CMathML@CartesianproductCond{#2}{#3}{#4}} +\def\CMathML@sumOp{\sum} +\newcommand{\CsumOp}{\CMathML@sumOp} +\def\CMathML@sumLimits#1#2#3#4{\CMathML@sumOp_{#1=#2}^{#3}#4}% bvar, llimit, ulimit, body +\newcommand{\CsumLimits}[5][]{\CMathML@sumLimits{#2}{#3}{#4}{#5}} +\def\CMathML@sumCond#1#2#3{\CMathML@sumOp_{#1\in{#2}}#3} % bvar, condition, body +\newcommand{\CsumCond}[4][]{\CMathML@sumCond{#2}{#3}{#4}} +\def\CMathML@sumDA#1#2{\CMathML@sumOp_{#1}#2} % set, body +\newcommand{\CsumDA}[3][]{\CMathML@sumDA{#2}{#3}} +\def\CMathML@prodOp{\prod} +\newcommand{\CprodOp}{\CMathML@prodOp} +\def\CMathML@prodLimits#1#2#3#4{\CMathML@prodOp_{#1=#32^{#3}#4}}% bvar, llimit, ulimit, body +\newcommand{\CprodLimits}[5][]{\CMathML@prodLimits{#2}{#3}{#4}{#5}} +\def\CMathML@prodCond#1#2#3{\CMathML@prodOp_{#1\in{#2}}#3} % bvar, condition, body +\newcommand{\CprodCond}[4][]{\CMathML@prodCond{#2}{#3}{#4}} +\def\CMathML@prodDA#1#2{\CMathML@prodOp_{#1}#2} % set, body +\newcommand{\CprodDA}[3]{\CMathML@prodDA{#2}{#3}} +\def\CMathML@sin#1{\sin(#1)} +\newcommand{\Csin}[2][]{\CMathML@sin{#2}} +\def\CMathML@cos#1{\cos(#1)} +\newcommand{\Ccos}[2][]{\CMathML@cos{#2}} +\def\CMathML@tan#1{\tan(#1)} +\newcommand{\Ctan}[2][]{\CMathML@tan{#2}} +\def\CMathML@sec#1{\sec(#1)} +\newcommand{\Csec}[2][]{\CMathML@sec{#2}} +\def\CMathML@csc#1{\csc(#1)} +\newcommand{\Ccsc}[2][]{\CMathML@csc{#2}} +\def\CMathML@cot#1{\cot(#1)} +\newcommand{\Ccot}[2][]{\CMathML@cot{#2}} +\def\CMathML@sinh#1{\sinh(#1)} +\newcommand{\Csinh}[2][]{\CMathML@sinh{#2}} +\def\CMathML@cosh#1{\cosh(#1)} +\newcommand{\Ccosh}[2][]{\CMathML@cosh{#2}} +\def\CMathML@tanh#1{\tanh(#1)} +\newcommand{\Ctanh}[2][]{\CMathML@tanh{#2}} +\def\CMathML@sech#1{\mbox{sech}(#1)} +\newcommand{\Csech}[2][]{\CMathML@sech{#2}} +\def\CMathML@csch#1{\mbox{csch}(#1)} +\newcommand{\Ccsch}[2][]{\CMathML@csch{#2}} +\def\CMathML@coth#1{\mbox{coth}(#1)} +\newcommand{\Ccoth}[2][]{\CMathML@coth{#2}} +\def\CMathML@arcsin#1{\arcsin(#1)} +\newcommand{\Carcsin}[2][]{\CMathML@arcsin{#2}} +\def\CMathML@arccos#1{\arccos(#1)} +\newcommand{\Carccos}[2][]{\CMathML@arccos{#2}} +\def\CMathML@arctan#1{\arctan(#1)} +\newcommand{\Carctan}[2][]{\CMathML@arctan{#2}} +\def\CMathML@arccosh#1{\mbox{arccosh}(#1)} +\newcommand{\Carccosh}[2][]{\CMathML@arccosh{#2}} +\def\CMathML@arccot#1{\mbox{arccot}(#1)} +\newcommand{\Carccot}[2][]{\CMathML@arccot{#2}} +\def\CMathML@arccoth#1{\mbox{arccoth}(#1)} +\newcommand{\Carccoth}[2][]{\CMathML@arccoth{#2}} +\def\CMathML@arccsc#1{\mbox{arccsc}(#1)} +\newcommand{\Carccsc}[2][]{\CMathML@arccsc{#2}} +\def\CMathML@arcsinh#1{\mbox{arcsinh}(#1)} +\newcommand{\Carcsinh}[2][]{\CMathML@arcsinh{#2}} +\def\CMathML@arctanh#1{\mbox{arctanh}(#1)} +\newcommand{\Carctanh}[2][]{\CMathML@arctanh{#2}} + +\def\CMathML@exp#1{\exp(#1)} +\newcommand{\Cexp}[2][]{\CMathML@exp{#2}} +\def\CMathML@ln#1{\ln(#1)} +\newcommand{\Cln}[2][]{\CMathML@ln{#2}} +\def\CMathML@log#1#2{\log_{#1}(#2)} +\newcommand{\Clog}[3][]{\CMathML@log{#2}{#3}} +\def\CMathML@mean#1{\mbox{mean}(#1)} +\newcommand{\Cmean}[2][]{\CMathML@mean{#2}} +\def\CMathML@sdev#1{\mbox{std}(#1)} +\newcommand{\Csdev}[2][]{\CMathML@sdev{#2}} +\def\CMathML@var#1{\mbox{var}(#1)} +\newcommand{\Cvar}[2][]{\CMathML@var{#2}} +\def\CMathML@median#1{\mbox{median}(#1)} +\newcommand{\Cmedian}[2][]{\CMathML@median{#2}} +\def\CMathML@mode#1{\mbox{mode}(#1)} +\newcommand{\Cmode}[2][]{\CMathML@mode{#2}} +\def\CMathML@moment#1#2{\langle{#2}^{#1}\rangle}% degree, momentabout, scope +\newcommand{\Cmoment}[3][]{\CMathML@moment{#2}{#3}} +\def\CMathML@momentA#1#2{\langle{#2}^{#1}\rangle}% degree, momentabout, scope +\newcommand{\CmomentA}[4][]{\CMathML@momentA{#2}{#3}{#4}} +\def\CMathML@vector#1{(#1)} +\newcommand{\Cvector}[2][]{\CMathML@vector{#2}} +\def\CMathML@matrix#1#2{\left(\begin{array}{#1}#2\end{array}\right)}% row pattern, body +\newcommand{\Cmatrix}[3][]{\CMathML@matrix{#2}{#3}} +\def\CMathML@determinant#1{\left|#1\right|} +\newcommand{\Cdeterminant}[2][]{\CMathML@determinant{#2}} +\def\CMathML@transpose#1{#1^\top} +\newcommand{\Ctranspose}[2][]{\CMathML@transpose{#2}} +\def\CMathML@selector#1#2{#1_{#2}} +\newcommand{\Cselector}[3][]{\CMathML@selector{#2}{#3}} +\def\CMathML@vectproductOp{\cdot} +\newcommand{\CvectproductOp}{\CMathML@vectproductOp} +\def\CMathML@vectproduct#1#2{#1\CMathML@vectproductOp{#2}} +\newcommand{\Cvectproduct}[3][]{\CMathML@vectproduct{#2}{#3}} +\def\CMathML@scalarproduct#1#2{{#1}#2} +\newcommand{\Cscalarproduct}[3][]{\CMathML@scalarproduct{#2}{#3}} +\def\CMathML@outerproductOp{\times} +\newcommand{\CouterproductOp}{\CMathML@outerproductOp} +\def\CMathML@outerproduct#1#2{#1\CMathML@outerproductOp{#2}} +\newcommand{\Couterproduct}[3][]{\CMathML@outerproduct{#2}{#3}} +\def\CMathML@integers{{\mathbb{Z}}} +\newcommand{\Cintegers}[1][]{\CMathML@integers} +\def\CMathML@reals{{\mathbb{R}}} +\newcommand{\Creals}[1][]{\CMathML@reals} +\def\CMathML@rationals{{\mathbb{Q}}} +\newcommand{\Crationals}[1][]{\CMathML@rationals} +\def\CMathML@naturalnumbers{{\mathbb{N}}} +\newcommand{\Cnaturalnumbers}[1][]{\CMathML@naturalnumbers} +\def\CMathML@complexes{{\mathbb{C}}} +\newcommand{\Ccomplexes}[1][]{\CMathML@complexes} +\def\CMathML@primes{{\mathbb{P}}} +\newcommand{\Cprimes}[1][]{\CMathML@primes} +\def\CMathML@exponemtiale{e} +\newcommand{\Cexponemtiale}[1][]{\CMathML@exponemtiale} +\def\CMathML@imaginaryi{i} +\newcommand{\Cimaginaryi}[1][]{\CMathML@imaginaryi} +\def\CMathML@notanumber{{\mathrm{NaN}}} +\newcommand{\Cnotanumber}[1][]{\CMathML@notanumber} +\def\CMathML@true{{\mathrm{true}}} +\newcommand{\Ctrue}[1][]{\CMathML@true} +\def\CMathML@false{{\mathrm{false}}} +\newcommand{\Cfalse}[1][]{\CMathML@false} +\def\CMathML@emptyset{\emptyset} +\newcommand{\Cemptyset}[1][]{\CMathML@emptyset} +\def\CMathML@pi{\pi} +\newcommand{\Cpi}[1][]{\CMathML@pi} +\def\CMathML@eulergamma{\gamma} +\newcommand{\Ceulergamma}[1][]{\CMathML@eulergamma} +\def\CMathML@infinit{\infty} +\newcommand{\Cinfinit}[1][]{\CMathML@infinit} +\endinput +%% +%% End of file `cmathml.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/cmathml/cmathml.sty.ltxml b/Master/texmf-dist/tex/latex/stex/cmathml/cmathml.sty.ltxml new file mode 100644 index 00000000000..fdc0b2eae33 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/cmathml/cmathml.sty.ltxml @@ -0,0 +1,974 @@ +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +use LaTeXML::Document; +RequirePackage('LaTeX'); +sub remove_tokens_from_list { + my ($list, $pattern, $math) = @_; + if (ref $list) { + my @toks = $list->unlist; + @toks = grep($_->toString !~ /$pattern/, @toks); + ($math ? (LaTeXML::MathList->new(@toks)) : (LaTeXML::List)->new(@toks)); } + else { undef; } } + +sub remove_math_commas { + my ($whatsit, $argno) = @_; + my @args = $whatsit ? $whatsit->getArgs() : undef; + $argno--; + if ($args[$argno]) { + $args[$argno] = remove_tokens_from_list($args[$argno], ',', 1); + $whatsit->setArgs(@args); + } + return; +} +DefConstructor('\Capply [] {} {}', + "#2 #3"); +DefConstructor('\Ccn [] {}',"#2"); +DefConstructor('\Cci [] {}',"#2"); +DefConstructor('\Ccsymbol [] {}', + ""); +DefConstructor('\Cccinterval [] {}{}', + "" + . "" + . "#2" + . "#3"); +DefConstructor('\Ccointerval [] {}{}', + "" + . "" + . "#2" + . "#3"); +DefConstructor('\Cocinterval [] {}{}', + "" + . "" + . "#2" + . "#3"); +DefConstructor('\Coointerval [] {}{}', + "" + . "" + . "#2" + . "#3"); +DefConstructor('\Cinverse [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Clambda [] {}{}', + "" + . "" + . "#2" + . "#2" + . ""); +DefConstructor('\ClambdaDA [] {}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\Crestrict [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CcomposeOp []', + ""); +DefConstructor('\Ccompose [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\Cident []', + ""); +DefConstructor('\Cdomain [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ccodomain [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cimage [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cpiecewise [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cpiece [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\Cotherwise [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cquotient [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CfactorialOp []', + ""); +DefConstructor('\Cfactorial [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CdivideOp []', + ""); +DefConstructor('\Cdivide [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CmaxOp []', + ""); +DefConstructor('\Cmax [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CminOp []', + ""); +DefConstructor('\Cmin [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CminusOp []', + ""); +DefConstructor('\Cminus [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\Cuminus [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CplusOp []', + ""); +DefConstructor('\Cplus [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\Cpower [] {} {}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CremOp []', + ""); +DefConstructor('\Crem [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CtimesOp []', + ""); +DefConstructor('\Ctimes [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CrootOp []', + ""); +DefConstructor('\Croot [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\Cgcd [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CandOp []', + ""); +DefConstructor('\Cand [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CorOp []', + ""); +DefConstructor('\Cor [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CxorOp []', + ""); +DefConstructor('\Cxor [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CnotOp []', + ""); +DefConstructor('\Cnot [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CimpliesOp []', + ""); +DefConstructor('\Cimplies [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CAndDa [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CAndCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\COrDa [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\COrCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\CXorDa [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CXorCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\Cforall [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CforallCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\Cexists [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CexistsCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\Cabs [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cconjugate [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carg [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Creal [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cimaginary [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Clcm [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cfloor [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cceiling [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CeqOp []', + ""); +DefConstructor('\Ceq [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CneqOp []', + ""); +DefConstructor('\Cneq [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CgtOp []', + ""); +DefConstructor('\Cgt [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CltOp []', + ""); +DefConstructor('\Clt [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CgeqOp []', + ""); +DefConstructor('\Cgeq [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CleqOp []', + ""); +DefConstructor('\Cleq [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CequivalentOp []', + ""); +DefConstructor('\Cequivalent [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CapproxOp []', + ""); +DefConstructor('\Capprox [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CfactorofOp []', + ""); +DefConstructor('\Cfactorof [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CintOp []', + ""); +DefConstructor('\Cint [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CintLimits [] {}{}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . "#5" + . ""); +DefConstructor('\CintDA [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CintCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\Cdiff [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cddiff [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\Cpartialdiff [] {}{}{}', + "" + . "" + . "#3" + . "?#2(#2)()" + . "#4" + . ""); +DefConstructor('\Cdegree {}{}', + "" + . "" + . "#2" + . "#1" + . ""); +DefConstructor('\Climit [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\ClimitCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\CtendstoOp []', + ""); +DefConstructor('\Ctendsto [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CtendstoAboveOp []', + ""); +DefConstructor('\CtendstoAbove [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CtendstoBelowOp []', + ""); +DefConstructor('\CtendstoBelow [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\Cdivergence [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cgrad [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Curl [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Claplacian [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cset [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CsetRes [] {}{}', + "" + . "" + . "#2" + . "#3" + . "#2" + . ""); +DefConstructor('\CsetCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\CsetDA [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\ClistOp []', + ""); +DefConstructor('\Clist [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CunionOp []', + ""); +DefConstructor('\Cunion [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CintersectOp []', + ""); +DefConstructor('\Cintersect [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CinOp []', + ""); +DefConstructor('\Cin [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CnotinOp []', + ""); +DefConstructor('\Cnotin [] {}{}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CsubsetOp []', + ""); +DefConstructor('\Csubset [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CprsubsetOp []', + ""); +DefConstructor('\Cprsubset [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CnotsubsetOp []', + ""); +DefConstructor('\Cnotsubset [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CnotprsubsetOp []', + ""); +DefConstructor('\Cnotprsubset [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CsetdiffOp []', + ""); +DefConstructor('\Csetdiff [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CcardOp []', + ""); +DefConstructor('\Ccard [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\CcartesianproductOp []', + ""); +DefConstructor('\Ccartesianproduct [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\CsupsetOp []', + ""); +DefConstructor('\CprsupsetOp []', + ""); +DefConstructor('\CnotsupsetOp []', + ""); +DefConstructor('\CnotprsupsetOp []', + ""); +DefMacro('\Csupset[]{}','\Csubset[#1]{#2}'); +DefMacro('\Cprsupset[]{}','\Cprsubset[#1]{#2}'); +DefMacro('\Cnotsupset[]{}{}','\Cnotsubset[#1]{#3}{#2}'); +DefMacro('\Cnotprsupset[]{}{}','\Cnotprsubset[#1]{#3}{#2}'); +DefConstructor('\CUnionDAOp []', + ""); +DefConstructor('\CUnionDA [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CUnionCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\CIntersectDaOp []', + ""); +DefConstructor('\CIntersectDa [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CIntersectCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\CCartesianproductDaOp []', + ""); +DefConstructor('\CCartesianproductDa [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CCartesianproductCond [] {}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . ""); +DefConstructor('\CsumOp []', + ""); +DefConstructor('\CsumLimits [] {}{}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . "#5"); +DefConstructor('\CprodOp []', + ""); +DefConstructor('\CprodLimits [] {}{}{}{}', + "" + . "" + . "#2" + . "#3" + . "#4" + . "#5"); +DefConstructor('\Csin [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ccos [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ctan [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Csec [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ccsc [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ccot [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Csinh [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ccosh [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ctanh [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Csech [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ccsch [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ccoth [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carcsin [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carccos [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carctan [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carcsec [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carccsc [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carccot [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carcsinh [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carccosh [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carctanh [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carcsech [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carccsch [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Carccoth [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cexp [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cln [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Clog [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\Cmean [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Csdev [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cvar [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cmedian [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cmode [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cmoment [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cvector [] {}', + "" + . "" + . "#2" + . "", + afterDigest=>sub { remove_math_commas($_[1], 2); }); +DefConstructor('\Cmatrix [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\Cdeterminant [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Ctranspose [] {}', + "" + . "" + . "#2" + . ""); +DefConstructor('\Cselector [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CvectorproductOp []', + ""); +DefConstructor('\Cvectorproduct [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\Cscalarproduct [] {}{}', + "" + . "" + . "#2" + . "#3" + . ""); +DefConstructor('\CouterproductOp []', + ""); +DefConstructor('\Couterproduct [] {}{}', + "" + . "" + . "#2" + . "#3" + . "");#$ +DefConstructor('\Cintegers []', + ""); +DefConstructor('\Creals []', + ""); +DefConstructor('\Crationals []', + ""); +DefConstructor('\Cnaturalnumbers []', + ""); +DefConstructor('\Ccomplexes []', + ""); +DefConstructor('\Cprimes []', + ""); +DefConstructor('\Cexponentiale []', + ""); +DefConstructor('\Cimaginaryi []', + ""); +DefConstructor('\Cnotanumber []', + ""); +DefConstructor('\Ctrue []', + ""); +DefConstructor('\Cfalse []', + ""); +DefConstructor('\Cemptyset []', + ""); +DefConstructor('\Cpi []', + ""); +DefConstructor('\Ceulergamma []', + ""); +DefConstructor('\Cinfinit []', + ""); +1; diff --git a/Master/texmf-dist/tex/latex/stex/cmathml/cmathmlx.sty b/Master/texmf-dist/tex/latex/stex/cmathml/cmathmlx.sty new file mode 100644 index 00000000000..dd9f04945f4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/cmathml/cmathmlx.sty @@ -0,0 +1,14 @@ +%% +%% This is file `cmathmlx.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% cmathml.dtx (with options: `styx') +%% +\RequirePackage{presentation} +\def\CMathML@complement#1{#1^c} +\newcommand{\Ccomplement}[2][]{\CMathML@complement{#2}} +\endinput +%% +%% End of file `cmathmlx.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/cmathml/cmathmlx.sty.ltxml b/Master/texmf-dist/tex/latex/stex/cmathml/cmathmlx.sty.ltxml new file mode 100644 index 00000000000..93025278369 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/cmathml/cmathmlx.sty.ltxml @@ -0,0 +1,22 @@ +%% +%% This is file `cmathmlx.sty.ltxml', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% cmathml.dtx (with options: `ltxmlx') +%% +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +use LaTeXML::Document; +RequirePackage('LaTeX'); +DefConstructor('\Ccomplement [] {}', + "" + . "" + . "#2" + . ""); +\endinput +%% +%% End of file `cmathmlx.sty.ltxml'. diff --git a/Master/texmf-dist/tex/latex/stex/cnx/cnx.cls b/Master/texmf-dist/tex/latex/stex/cnx/cnx.cls new file mode 100644 index 00000000000..3908c72b577 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/cnx/cnx.cls @@ -0,0 +1,142 @@ +%% +%% This is file `cnx.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% cnx.dtx (with options: `cls') +%% +\RequirePackage{sref} +\RequirePackage{graphicx} +\DeclareOption{letterpaper} + {\setlength\paperheight {11in}% + \setlength\paperwidth {8.5in}} +\DeclareOption{a4paper} + {\setlength\paperheight {297mm}% + \setlength\paperwidth {210mm}} +\ExecuteOptions{letterpaper} +\ProcessOptions +\input{size10.clo} +\pagenumbering{roman} +\addmetakey{cnxmodule}{name} +\srefaddidkey{cnxmodule}{id} +\newenvironment{cnxmodule}[1][]{\metasetkeys{cnxmodule}{#1}}{} +\newenvironment{ccontent}{}{} +\newcounter{section} +\srefaddidkey{sectioning}{id} +\newenvironment{csection}[2][]% +{\stepcounter{section}\strut\\[1.5ex]\noindent% +{\Large\bfseries\arabic{section}.~{#2}}\\[1.5ex] +\metasetkeys{sectioning}{#1}} +{} +\newcounter{subsection}[section] +\newenvironment{csubsection}[2][] +{\refstepcounter{subsection}\strut\\[1ex]\noindent% +{\large\bfseries{\arabic{section}.\arabic{subsection}.~#2\\[1ex]}}% +\metasetkeys{sectioning}{#1}}% +{} +\newcounter{subsubsection}[subsection] +\newenvironment{csubsubsection}[2][] +{\refstepcounter{subsubsection}\strut\\[.5ex]\noindent +{\bfseries\arabic{section}.\arabic{subsection}.\arabic{subsubsecction}~#2\\[.5ex]}% +\metasetkeys{sectioning}{#1}}{} +\srefaddidkey{para}{id} +\newenvironment{cpara}[1][]{\metasetkeys{para}{#1}}{\par} +\srefaddidkey{note} +\addmetakey{note}{type} +\newenvironment{cnote}[1][]% +{\metasetkeys{note}{#1}\par\noindent\strut\hfill\begin{minipage}{10cm}{\bfseries\note@type}:~}% +{\end{minipage}\hfill\strut\par} +\srefaddidkey{equation}{id} +\newenvironment{cequation}[1][]% +{\metasetkeys{equation}{#1}\begin{displaymath}} +{\end{displaymath}} +\srefaddidkey{cquote} +\addmetakey{cquote}{type} +\addmetakey{cquote}{src} +\newenvironment{cquote}[1][]{% +\metasetkeys{cquote}{#1}\begin{center}\begin{minipage}{.8\textwidth}}{\end{minipage}\end{center}} +\newcommand{\litem}[2][]{\item[#1]\label{#2}} +\srefaddidkey{example} +\addmetakey{example}{name} +\newenvironment{cexample}[1][]{\metasetkeys{example}{#1} +{\ifx\example@name\@empty\else\noindent\bfseries{\example@name}\fi}} +{} +\newcounter{cexercise} +\srefaddidkey{cexercise} +\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][]{\metasetkeys{cproblem}{#1}}{}{} +\srefaddidkey{csolution} +\newenvironment{csolution}[1][]{\metasetkeys{csolution}{#1}}{\par\noindent\bfseries{Solution}}{} +\srefaddidkey{rule} +\addmetakey{rule}{name} +\addmetakey{rule}{type} +\newenvironment{crule}[1][]{\metasetkeys{rule}{#1}% +{\noindent\bfseries{\rule@type:}\ifx\rule@name\@empty\else~(\rule@name)\fi}}% +{} +\srefaddidkey{statement} +\newenvironment{statement}[1][]{\metasetkeys{statement}{#1}}{} +\srefaddidkey{proof} +\newenvironment{proof}[1][]{\metasetkeys{proof}{#1}}{} +\srefaddidkey{definition} +\addmetakey{definition}{term} +\addmetakey{definition}{seealso} +\newenvironment{definition}[1][]{\metasetkeys{definition}{#1}{\noindent\bfseries{Definition:}}}{} +\srefaddidkey{meaning} +\newenvironment{cmeaning}[1][]{\metasetkeys{meaning}{#1}}{} +\addmetakey{cnxn}{document} +\addmetakey{cnxn}{target} +\addmetakey{cnxn}{strength} +\newcommand{\cnxn}[2][]% keys, link text +{\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} +\addmetakey{link}{src} +\newcommand{\link}[2][]{\metasetkeys{link}{#1}\underline{#2}} +\srefaddidkey{cfigure} +\addmetakey{cfigure}{type} +\addmetakey{cfigure}{caption} +\newcounter{figure} +\newcommand{\cfigure}[3][]{% cnx_keys, graphicx_keys, path +\begin{center}% +\includegraphics[#2]{#3}% +\metasetkeys{cfigure}{#1}\sref@target% +\ifx\cfigure@caption\@empty\else +\par\noindent Figure\refstepcounter{figure} {\arabic{figure}}: \cfigure@caption% +\protected@edef\@currentlabel{\arabic{figure}}% +\sref@label@id{Figure \thefigure}\fi +\end{center}} +\addmetakey{ccite}{src} +\newcommand{\ccite}[2][]{\metasetkeys{ccite}{#1}\emph{#2}} +\newcommand{\term}[1]{{\bfseries\underline{#1}}} +\addmetakey{metadata}{version} +\addmetakey{metadata}{created} +\addmetakey{metadata}{revised} +\newsavebox{\metadatabox} +\newenvironment{metadata}[1][]% +{\noindent\hfill\begin{lrbox}{\metadatabox} +\begin{minipage}{.8\textwidth}% +{\Large\bfseries CNX Module: \cnx@name\hfill\strut}\\[2ex]}% +{\end{minipage}\end{lrbox}\fbox{\usebox\metadatabox}\hfill} +\newenvironment{authorlist}{{\bfseries{Authors}:~}}{\\[1ex]} +\newenvironment{maintainerlist}{{\bfseries{Maintainers}:~}}{\\[1ex]} +\srefaddidkey{auth} +\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,} +\newcommand{\maintainer}[1][]{\metasetkeys{auth}{#1}\auth@first~\auth@sur,} +\newenvironment{keywordlist}{\bfseries{Keywords}:~}{\\[1ex]} +\newcommand{\keyword}[1]{#1,} +\newenvironment{cnxabstract}% +{\par\noindent\strut\hfill\begin{minipage}{10cm}{\bfseries{Abstract}:~}}% +{\end{minipage}\hfill} +\endinput +%% +%% End of file `cnx.cls'. diff --git a/Master/texmf-dist/tex/latex/stex/cnx/cnx.cls.ltxml b/Master/texmf-dist/tex/latex/stex/cnx/cnx.cls.ltxml new file mode 100644 index 00000000000..9dc46bd071f --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/cnx/cnx.cls.ltxml @@ -0,0 +1,280 @@ +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +RequirePackage('metakeys'); +RegisterNamespace('cnx'=>"http://cnx.rice.edu/cnxml"); +RegisterNamespace('md'=>"http://cnx.rice.edu/mdml/0.4"); +RegisterNamespace('bib'=>"http://bibtexml.sf.net/"); +RegisterNamespace('m'=>"http://www.w3.org/1998/Math/MathML"); +DocType("cnx:document", +"-//CNX//DTD CNXML 0.5 plus LaTeXML//EN", +"../dtd/cnxml+ltxml.dtd", +'#default'=>"http://cnx.rice.edu/cnxml", + 'md'=>"http://cnx.rice.edu/mdml/0.4", + 'bib'=>"http://bibtexml.sf.net/", + 'm'=>"http://www.w3.org/1998/Math/MathML", + 'ltx'=>"http://dlmf.nist.gov/LaTeXML"); +NewCounter('@itemizei', 'document', idprefix=>'I'); +NewCounter('@itemizeii', '@itemizei', idprefix=>'I'); +NewCounter('@itemizeiii', '@itemizeii', idprefix=>'I'); +NewCounter('@itemizeiv', '@itemizeiii',idprefix=>'I'); +NewCounter('@itemizev', '@itemizeiv', idprefix=>'I'); +NewCounter('@itemizevi', '@itemizev', idprefix=>'I'); + +NewCounter('enumi', '@itemizei', idprefix=>'i'); +NewCounter('enumii', '@itemizeii', idprefix=>'i'); +NewCounter('enumiii','@itemizeiii', idprefix=>'i'); +NewCounter('enumiv', '@itemizeiv', idprefix=>'i'); +# A couple of more levels, since we use these for ID's! +NewCounter('enumv', '@itemizev', idprefix=>'i'); +NewCounter('enumvi', '@itemizevi', idprefix=>'i'); + +DefMacro('\theenumi', '\arabic{enumi}'); +DefMacro('\theenumii', '\alph{enumii}'); +DefMacro('\theenumiii', '\roman{enumiii}'); +DefMacro('\theenumiv', '\Alph{enumiv}'); + +NewCounter('equation', 'document', idprefix=>'E'); +DefMacro('\theequation', '\arabic{equation}'); +DefMacro('\textwidth','16cm'); +Let('\thedocument@ID','\@empty'); +DefKeyVal('cnxmodule','name','Semiverbatim'); +DefKeyVal('cnxmodule','id','Semiverbatim'); +DefEnvironment('{document}','#body', + beforeDigest=> sub { AssignValue(inPreamble=>0); }, + afterDigest=> sub { $_[0]->getGullet->flush; return; }); +DefEnvironment('{cnxmodule} OptionalKeyVals:cnxmodule', + "&KeyVal('#1','name')\n#body\n", + afterDigestBegin => sub { + AssignValue('cnxmodule_id', + KeyVal($_[1]->getArg(1), 'id')->toString, + 'global'); + });#$ +Tag('cnx:document', afterClose => sub { + $_[1]->setAttribute('id', LookupValue('cnxmodule_id')); + }); +DefEnvironment('{ccontent}',"#body"); +DefKeyVal('sectioning','id','Semiverbatim'); +DefEnvironment('{csection}OptionalKeyVals:sectioning{}', + "\n" + . "?#2(#2\n)()" + . "#body\n\n"); +DefEnvironment('{csubsection}OptionalKeyVals:sectioning{}', + "\n" + . "?#2(#2\n)()" + . "#body\n\n"); +DefEnvironment('{csubsubsection}OptionalKeyVals:sectioning{}', + "\n" + . "?#2(#2\n)()" + . "#body\n\n"); +DefKeyVal('para','id','Semiverbatim'); +DefEnvironment('{cpara} OptionalKeyVals:para','#body'); +sub number_para { + my($document,$node,$whatsit)=@_; + # Get prefix from first parent with an id. + my(@parents)=$document->findnodes('ancestor::*[@id]',$node); # find 1st id'd parent. + my $prefix= (@parents ? $parents[$#parents]->getAttribute('id')."." : ''); + # Get the previous number within parent; Worried about intervening elements around para's, but... + my(@siblings)=$document->findnodes("preceding-sibling::cnx:para",$node); + my $n=1; + $n = $1+1 if(@siblings && $siblings[$#siblings]->getAttribute('id')=~/(\d+)$/); + $node->setAttribute(id=>$prefix."p$n"); } +Tag('cnx:para',afterOpen=>\&number_para); +DefConstructor('\par',sub { $_[0]->maybeCloseElement('cnx:para'); },alias=>"\\par\n"); +Tag('cnx:para', autoClose=>1, autoOpen=>1); +DefKeyVal('note','id','Semiverbatim'); +DefKeyVal('note','type','Semiverbatim'); +DefEnvironment('{cnote}OptionalKeyVals:note','#body'); +DefKeyVal('equation','id','Semiverbatim'); +DefEnvironment('{cequation} OptionalKeyVals:equation', + "" + . "" + . "#body" + . "", + mode=>'display_math'); +DefKeyVal('cquote','id','Semiverbatim'); +DefKeyVal('cquote','type','Semiverbatim'); +DefKeyVal('cquote','src','Semiverbatim'); +DefEnvironment('{cquote} OptionalKeyVals:cquote', + "#body"); +DefConstructor('\footnote[]{}',"#2"); +DefConstructor('\emph{}',"#1"); +DefConstructor('\[', + "" + . "" + . "" + . "#body" + . "" + . "" + ."", + beforeDigest=> sub{ $_[0]->beginMode('display_math'); }, + captureBody=>1, + properties=> sub { RefStepID('equation') }); +DefConstructor('\]' ,"",beforeDigest=> sub{ $_[0]->endMode('display_math'); }); +DefConstructor('\[', + "" + . "" + . "" + . "#body" + . "" + . "" + ."", + beforeDigest=> sub{ $_[0]->beginMode('display_math'); }, + captureBody=>1, + properties=> sub { RefStepID('equation') }); +DefConstructor('\]' ,"",beforeDigest=> sub{ $_[0]->endMode('display_math'); }); + +DefMacro('\eqnarray', '\@@eqnarray\@start@alignment'); +DefMacro('\endeqnarray', '\@finish@alignment\end@eqnarray'); +DefMacro('\csname eqnarray*\endcsname', '\@@eqnarray*\@start@alignment'); +DefMacro('\csname endeqnarray*\endcsname', '\@finish@alignment\end@eqnarray'); +DefConstructor('\@@eqnarray OptionalMatch:* AlignmentBody:\end@eqnarray', + sub { + my($document,$star,$body,%props)=@_; + $document->openElement('cnx:equation',refnum=>$props{refnum},id=>$props{id}); + $document->openElement('ltx:Math',mode=>'display'); + $document->openElement('ltx:XMath'); + constructAlignment($document,$body,attributes=>{name=>'eqnarray'}); + $document->closeElement('ltx:XMath'); + $document->closeElement('ltx:Math'); + $document->closeElement('cnx:equation'); }, + mode=>'display_math', + beforeDigest=>sub { alignmentBindings('rcl'); }, + properties=> sub { ($_[1] ? RefStepID('equation') : RefStepCounter('equation')); }, + afterDigest=>sub { + $_[1]->setProperty(body=>$_[1]->getArg(2));}, # So we get TeX + reversion=>'\begin{eqnarray#1}#2\end{eqnarray#1}'); +Tag('cnx:item', autoClose=>1); +DefConstructor('\item[]',"?#1(#1)"); +DefConstructor('\litem[]{}',"?#1(#1)"); +DefConstructor('\itemize@item[]', + "?#1(#1)", + properties=>sub{ RefStepItemCounter(); }); +DefConstructor('\enumerate@item[]', + "?#1(#1)", + properties=>sub{ RefStepItemCounter(); }); +DefConstructor('\description@item[]', + "?#1(#1)", + properties=>sub{ RefStepItemCounter(); }); +AssignValue(itemlevel=>0); +DefEnvironment('{itemize}', + "#body", + properties=>sub { beginItemize('itemize'); }); +DefEnvironment('{enumerate}', + "#body", + properties=>sub { beginItemize('enumerate'); }); +DefEnvironment('{description}', + "#body", + properties=>sub { beginItemize('description'); }); +DefEnvironment('{center}','#body'); +DefEnvironment('{minipage}{}','#body'); +DefEnvironment('{small}','#body'); +DefEnvironment('{footnotesize}','#body'); +DefEnvironment('{tiny}','#body'); +DefEnvironment('{scriptsize}','#body'); +DefConstructor('\ref Semiverbatim', "&LookupValue('LABEL@#1')"); +DefKeyVal('example','id','Semiverbatim'); +DefEnvironment('{cexample}OptionalKeyVals:example', + "#body"); +DefKeyVal('cexercise','id','Semiverbatim'); +DefKeyVal('cexercise','name','Semiverbatim'); +DefEnvironment('{cexercise}OptionalKeyVals:exercise', + "" + . "#body" + . ""); +DefKeyVal('cproblem','id','Semiverbatim'); +DefKeyVal('cproblem','name','Semiverbatim'); +DefEnvironment('{cproblem}OptionalKeyVals:cproblem', + "" + . "?&defined(&KeyVal(#1,'name'))(&KeyVal(#1,'name')\n)()" + . "#body" + . ""); +DefKeyVal('csolution','id','Semiverbatim'); +DefKeyVal('csolution','name','Semiverbatim'); +DefEnvironment('{csolution}OptionalKeyVals:cproblem', + "" + . "?&defined(&KeyVal(#1,'name'))(&KeyVal(#1,'name')\n)()" + . "#body" + . ""); +DefKeyVal('rule','id','Semiverbatim'); +DefKeyVal('rule','name','Semiverbatim'); +DefKeyVal('rule','type','Semiverbatim'); +DefEnvironment('{crule}OptionalKeyVals:rule', + "\n" + . "?&defined(&KeyVal(#1,'name'))(&KeyVal(#1,'name')\n)()" + . "\n#body\n" + . "\n"); +DefKeyVal('statement','id','Semiverbatim'); +DefEnvironment('{statement} OptionalKeyVals:statement','#body'); +DefKeyVal('proof','id','Semiverbatim'); +DefEnvironment('{proof}OptionalKeyVals:proof','#body'); +DefKeyVal('definition','id','Semiverbatim'); +DefKeyVal('definition','term','Semiverbatim'); +DefKeyVal('definition','seealso','Semiverbatim'); +DefEnvironment('{definition}OptionalKeyVals:definition', + "\n" + . "?&defined(&KeyVal(#1,'term'))(&KeyVal(#1,'term')\n)()" + . "\n#body\n" + . "?&defined(&KeyVal(#1,'seealso'))(&KeyVal(#1,'term')\n)()" + . "\n"); +DefKeyVal('meaning','id','Semiverbatim'); +DefEnvironment('{cmeaning}OptionalKeyVals:meaning','#body'); +DefKeyVal('cnxn','document','Semiverbatim'); +DefKeyVal('cnxn','target','Semiverbatim'); +DefKeyVal('cnxn','strength','Semiverbatim'); +DefConstructor('\cnxn OptionalKeyVals:cnxn {}','#1'); +DefKeyVal('link','src','Semiverbatim'); +DefConstructor('\link OptionalKeyVals:link {}','#2'); +DefKeyVal('cfigure','id','Semiverbatim'); +DefKeyVal('cfigure','name','Semiverbatim'); +DefKeyVal('cfigure','type','Semiverbatim'); +DefKeyVal('cfigure','caption','Semiverbatim'); +DefConstructor('\cfigure OptionalKeyVals:cfigure Semiverbatim Semiverbatim', + "" + . "?&defined(&KeyVal(#1,'name'))(&KeyVal(#1,'name')\n)()" + . "" + . "?&defined(&KeyVal(#1,'caption'))(&KeyVal(#1,'caption')\n)()" + . ""); +DefKeyVal('ccite','src','Semiverbatim'); +DefConstructor('\ccite OptionalKeyVals:ccite {}','#2'); +DefConstructor('\term[]{}',"#2"); +DefKeyVal('metadata','version','Semiverbatim'); +DefKeyVal('metadata','created','Semiverbatim'); +DefKeyVal('metadata','revised','Semiverbatim'); +DefEnvironment('{metadata}OptionalKeyVals:metadata', + "\n" + . "&KeyVal('#1','version')\n" + . "&KeyVal('#1','created')\n" + . "&KeyVal('#1','revised')\n" + . "#body\n" + . ""); +DefEnvironment('{authorlist}',"#body"); +DefEnvironment('{maintainerlist}',"#body"); +DefKeyVal('auth','id','Semiverbatim'); +DefKeyVal('auth','firstname','Semiverbatim'); +DefKeyVal('auth','surname','Semiverbatim'); +DefKeyVal('auth','email','Semiverbatim'); +DefConstructor('\cnxauthor OptionalKeyVals:auth', + "\n" + . "?&defined(&KeyVal(#1,'honorific'))(&KeyVal('#1','honorific')\n)()" + . "?&defined(&KeyVal(#1,'firstname'))(&KeyVal('#1','firstname')\n)()" + . "?&defined(&KeyVal(#1,'other'))(&KeyVal('#1','other')\n)()" + . "?&defined(&KeyVal(#1,'surname'))(&KeyVal('#1','surname')\n)()" + . "?&defined(&KeyVal(#1,'lineage'))(&KeyVal('#1','lineage')\n)()" + . "?&defined(&KeyVal(#1,'email'))(&KeyVal('#1','email')\n)()" + . "\n"); +DefConstructor('\maintainer OptionalKeyVals:auth', + "\n" + . "?&defined(&KeyVal(#1,'honorific'))(&KeyVal('#1','honorific')\n)()" + . "?&defined(&KeyVal(#1,'firstname'))(&KeyVal('#1','firstname')\n)()" + . "?&defined(&KeyVal(#1,'other'))(&KeyVal('#1','other')\n)()" + . "?&defined(&KeyVal(#1,'surname'))(&KeyVal('#1','surname')\n)()" + . "?&defined(&KeyVal(#1,'lineage'))(&KeyVal('#1','lineage')\n)()" + . "?&defined(&KeyVal(#1,'email'))(&KeyVal('#1','email')\n)()" + . "\n"); +DefEnvironment('{keywordlist}',"\n#body\n"); +DefConstructor('\keyword {}',"#1"); +DefEnvironment('{cnxabstract} OptionalKeyVals:cnxabstract', + "\n#body\n\n"); +1; diff --git a/Master/texmf-dist/tex/latex/stex/ctansvn.sty b/Master/texmf-dist/tex/latex/stex/ctansvn.sty new file mode 100644 index 00000000000..5ddfe7667e1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/ctansvn.sty @@ -0,0 +1,2 @@ +\def\ctancitesuffix{:ctan} +\def\ctancite#1{\cite{#1\ctancitesuffix}} diff --git a/Master/texmf-dist/tex/latex/stex/dcm/dcm.sty b/Master/texmf-dist/tex/latex/stex/dcm/dcm.sty new file mode 100644 index 00000000000..d6bab773306 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/dcm/dcm.sty @@ -0,0 +1,86 @@ +%% +%% This is file `dcm.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% dcm.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{dcm}[2012/01/28 v0.3 Dublin Core Metadata] +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\ProcessOptions +\RequirePackage{workaddress} +\RequirePackage[sectioning]{rdfmeta} +\newenvironment{DCmetadata}[1][]% +{\def\@style{#1}}% to set the way things are presented. +{\@ifundefined{dcm@\@style @block}% +{\message{style {\@style} not defined}}% +{\csname dcm@\@style @block\endcsname}} +\def\DCMcreators#1{\@for\@I:=#1\do{\wa@ref@test{person}\@I{id}} +\gdef\dcm@creators{#1}} +\def\DCMcontributors#1{\@for\@I:=#1\do{\wa@ref@test{person}\@I{id}}% +\def\dcm@contributors{#1}} +\def\DCMtitle#1{\def\dcm@title{#1}\providecommand{\dcm@shorttitle}{#1}} +\def\dcm@subtitle{} +\def\DCMsubtitle#1{\def\dcm@subtitle{#1}} +\def\dcm@shorttitle{} +\def\DCMshorttitle#1{\def\dcm@shorttitle{#1}} +\def\DCMsubject#1{\def\dcm@subject{#1}} +\long\def\DCMdescription#1{\long\def\dcm@description{#1}} +\def\DCMpublisher#1{\def\dcm@publisher{#1}} +\def\dcm@date{\today} +\def\DCMdate#1{\def\dcm@date{#1}} +\def\DCMtype#1{\def\dcm@type{#1}} +\def\DCMidentifier#1#2{\def\dcm@scheme{#1}\def\dcm@identifier{#2}} +\def\DCMsource#1{\def\dcm@source{#1}} +\def\DCMlanguage#1{\def\dcm@language{#1}} +\def\DCMrelation#1{\def\dcm@relation{#1}} +\def\DCMrights#1{\long\def\dcm@rights{#1}} +\def\DCMlicense#1{\def\dcm@license{#1}} +\def\dcm@license{All rights reserved} +\def\DCMlicensenotice#1{\long\def\dcm@license{\\[1ex]License: #1}} +\def\DCMcopyrightnotice#1#2{\DCMrights{Copyright {\copyright} #1: #2}} +\def\cclicense#1{\def\attribution{\def\dcm@by{yes}} + \def\noncommercial{\def\dcm@nc{yes}} + \def\sharealike{\defdcm@sharealike{yes}} + \def\noderivativeworks{\def\dcm@derivatives{no}}} +\long\def\DCMabstract#1{\long\def\dcm@abstract{#1}} +\def\dcm@titlepage@block{\begin{titlepage} + \null\vfil\vskip 60\p@ + \begin{center} + \ifx\dcm@title\@empty + \PackageWarning{dcm}{No title specified}{\LARGE Add title here\par} + \else\LARGE \dcm@title \par\fi + \ifx\dcm@subtitle\@empty + \vskip 3em\Large \dcm@subtitle \par\vskip 3em + \else\large\lineskip .75em\WAauthorblock\dcm@creators\vskip 1.5em\fi + \ifx\dcm@date\@empty + \PackageWarning{dcm}{No date specified}{\large\today\par} + \else{\large\dcm@date\par}\vskip 2em\fi + \end{center}\vskip2em + \ifx\dcm@abstract\@empty + \PackageWarning{dcm}{No Abstract specified}\else + \begin{quote}\textbf\dcm@abstract@heading:\dcm@abstract\end{quote}\fi + \vskip 2em\par\vfil\noindent + {\small\noindent\dcm@rights\dcm@license} + \end{titlepage}} +\def\dcm@maketitle@block{\def\@title{\dcm@title\ifx\dcm@subtitle\empty\else\newline\dcm@subtitle\fi}% +\def\@author{\WAauthorblock\dcm@creators}% +\def\@date{\dcm@date}\maketitle} +\def\ISOtimestamp{\count1=\time\divide\count1 by 60 % hours +\count2=\count1\multiply\count2 by 60% minutes in \count1 hours +\count3=\time\advance\count3 by -\count2 % minutes +\the\year -\ifnum\month>9\else0\fi\the\month-\ifnum\day>9\else0\fi\the\day +T\ifnum\count1>9\else0\fi\the\count1:\ifnum\count3>9\else0\fi\the\count3:00Z} +\def\dcm@abstract@heading{Abstract} +\def\dcm@creators@heading{Author(s)} +\def\dcm@contributors@connector{with contributions from} +\def\dcm@chapter@heading{Chapter} +\def\dcm@section@heading{Section} +\def\dcm@subsection@heading{Subsection} +\def\dcm@subsubsection@heading{Subsubsection} +\def\dcm@paragraph@heading{Paragraph} +\endinput +%% +%% End of file `dcm.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/dcm/dcm.sty.ltxml b/Master/texmf-dist/tex/latex/stex/dcm/dcm.sty.ltxml new file mode 100644 index 00000000000..cdd386bbc6f --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/dcm/dcm.sty.ltxml @@ -0,0 +1,72 @@ +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Global; +use LaTeXML::Package; +RequirePackage('rdfmeta'); +RequirePackage('workaddress'); +sub FishOutMetadata { + my ($document,$keyvals)=@_; + foreach my $role(qw(creators contributors)) { + my $idlist_string=getKeyValue_noDelim($keyvals,$role); + my @ids = split(/,\s*/, $idlist_string); + foreach my $id(@ids) { + my $name = LookupValue('DCM_'.$id.'_name'); + if ($name) { + my $prop_role = $role; +chop $prop_role if $prop_role; + $document->insertElement("dc:$prop_role",$name) if $role; + } else {print STDERR "Warning: no $role with 'id' $id !\n";} + } + } + return;}#$ +DefEnvironment('{DCmetadata}[]', "#body"); +DefConstructor('\DCMcreators{}',sub{ + my ($document,$args,%properties) = @_; + my $keyval = LaTeXML::KeyVals->new('wa@person',T_BEGIN,T_END,('creators'=>$args)); + FishOutMetadata($document,$keyval); + return;}); +DefConstructor('\DCMcontributors{}',sub{ + my ($document,$args,%properties) = @_; + my $keyval = LaTeXML::KeyVals->new('wa@person',T_BEGIN,T_END,('contributors'=>$args)); + FishOutMetadata($document,$keyval); + return;}); +DefConstructor('\DCMtitle{}',"#1"); +DefConstructor('\DCMsubject{}',"#1"); +DefConstructor('\DCMdescription{}',"#1"); +DefConstructor('\DCMpublisher{}',"#1"); +DefConstructor('\DCMdate{}',"#1"); +DefConstructor('\DCMtype{}',"#1"); +DefConstructor('\DCMidentifier{}{}',"#2"); +DefConstructor('\DCMsource{}',"#1"); +DefConstructor('\DCMlanguage{}',"#1"); +DefConstructor('\DCMrelation{}',"#1"); +DefConstructor('\DCMrights{}',"#1"); +DefMacro('\DCMlicensenotice{}','\DCMrights{#1}'); +DefMacro('\DCMcopyrightnotice{}{}','\DCMrights{Copyright {\copyright} #1: #2}'); +DefConstructor('\cclicense{}',"#1"); +DefConstructor('\attribution',""); +DefConstructor('\noncommercial',""); +DefConstructor('\sharealike',""); +DefConstructor('\noderivativeworks',""); +DefConstructor('\DCMabstract{}',"#1"); +Tag('dc:description',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:date',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:creator',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:contributor',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:title',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:subject',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:publisher',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:type',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:identifier',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:language',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +Tag('dc:rights',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1); +RawTeX(' +\def\ISOtimestamp{\count1=\time\divide\count1 by 60 % hours +\count2=\count1\multiply\count2 by 60% minutes in \count1 hours +\count3=\time\advance\count3 by -\count2 % minutes +\the\year -\ifnum\month>9\else0\fi\the\month-\ifnum\day>9\else0\fi\the\day +T\ifnum\count1>9\else0\fi\the\count1:\ifnum\count3>9\else0\fi\the\count3:00Z} +'); +Tag('dc:title',afterOpen=>\&numberIt,afterClose=>\&locateIt); +1; diff --git a/Master/texmf-dist/tex/latex/stex/hwexam/hwexam.cls b/Master/texmf-dist/tex/latex/stex/hwexam/hwexam.cls new file mode 100644 index 00000000000..1408b9918f6 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/hwexam/hwexam.cls @@ -0,0 +1,34 @@ +%% +%% This is file `hwexam.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% hwexam.dtx (with options: `cls') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesClass{hwexam}[2012/01/28 v0.9b assignment and exam documents] +\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 +\LoadClass{omdoc} +\RequirePackage{stex} +\RequirePackage{hwexam} +\RequirePackage{graphicx} +\RequirePackage{a4wide} +\RequirePackage{amssymb} +\RequirePackage{amstext} +\RequirePackage{amsmath} +\endinput +%% +%% End of file `hwexam.cls'. diff --git a/Master/texmf-dist/tex/latex/stex/hwexam/hwexam.cls.ltxml b/Master/texmf-dist/tex/latex/stex/hwexam/hwexam.cls.ltxml new file mode 100644 index 00000000000..885ada472b4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/hwexam/hwexam.cls.ltxml @@ -0,0 +1,26 @@ +# -*- 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(); +LoadClass('omdoc'); +RequirePackage('stex'); +RequirePackage('hwexam'); +RequirePackage('graphicx'); +RequirePackage('amssymb'); +RequirePackage('amstext'); +RequirePackage('amsmath'); diff --git a/Master/texmf-dist/tex/latex/stex/hwexam/hwexam.sty b/Master/texmf-dist/tex/latex/stex/hwexam/hwexam.sty new file mode 100644 index 00000000000..db290659ffe --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/hwexam/hwexam.sty @@ -0,0 +1,126 @@ +%% +%% This is file `hwexam.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% hwexam.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{hwexam}[2012/01/28 v0.9b homework assignments and exams] +\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 +\RequirePackage{keyval}[1997/11/10] +\RequirePackage{problem} +\addmetakey{assig}{number} +\addmetakey*{assig}{title} +\addmetakey{assig}{type} +\addmetakey{assig}{given} +\addmetakey{assig}{due} +\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} +\ifmultiple +\def\assignment@titleblock{% +\@ifundefined{assig@number}{\stepcounter{section}}{\setcounter{section}{\assig@number}}% +\section*{\protect\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 +\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} +\def\inclassig@title{} +\def\inclassig@type{} +\def\inclassig@number{} +\def\inclassig@due{} +\def\inclassig@given{} +\newenvironment{assignment}[1][]{\assignment@process@keys{#1}% +\assignment@titleblock}{} +\def\assig@default@type{Assignment} +\addmetakey[\assig@default@type]{document}{hwexamtype} +\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}} +\addmetakey{quizheading}{tas} +\newcommand\quizheading[1]{\def\@tas{#1}% +\large\noindent NAME: \hspace{8cm} MAILBOX:\\[2ex]% +\ifx\@tas\@empty\else% +\noindent TA: \@for\@I:=\@tas\do{{\Large$\Box$}\@I\hspace*{1em}}\\[2ex]\fi} +\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 + Different problems test different skills and knowledge, so do not get stuck on + one problem.}\vfill\par\correction@table \\[3ex] +\end{center}} +{\newpage} +\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} +\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 &}} +\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}} +\endinput +%% +%% End of file `hwexam.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/hwexam/hwexam.sty.ltxml b/Master/texmf-dist/tex/latex/stex/hwexam/hwexam.sty.ltxml new file mode 100644 index 00000000000..4532b9f2fb1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/hwexam/hwexam.sty.ltxml @@ -0,0 +1,40 @@ +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +RequirePackage('problem'); +RegisterNamespace('assig'=>"http://omdoc.org/ontology/assignments#"); +RegisterDocumentNamespace('assig'=>"http://omdoc.org/ontology/assignments#"); +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", + afterDigest=> sub { + my ($stomach, $kv) = @_; + my $kvi = LookupValue('inclassig'); + my @keys = qw(id num title pts given due); + my @vals = $kvi && map($kvi->getValue($_), @keys); + foreach my $i(0..$#vals) { + $kv->setValue($keys[$i],$vals[$i]) if $vals[$i]; + }});#$ +DefMacro('\includeassignment [] {}', sub { + my ($stomach, $arg1, $arg2) = @_; + AssignValue('inclassig',$arg1) if $arg1; + (Invocation(T_CS('\input'),$arg2)->unlist); +}); +DefMacro('\inputassignment [] {}','\input{#2}'); +DefEnvironment('{testheading}OptionalKeyVals:omdoc',''); +DefConstructor('\testspace{}',''); +DefConstructor('\testnewpage',''); +DefConstructor('\testemptypage',''); +1; diff --git a/Master/texmf-dist/tex/latex/stex/metakeys/metakeys.sty b/Master/texmf-dist/tex/latex/stex/metakeys/metakeys.sty new file mode 100644 index 00000000000..b499384e139 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/metakeys/metakeys.sty @@ -0,0 +1,63 @@ +%% +%% This is file `metakeys.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% metakeys.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{metakeys}[2012/01/28 v0.9 Framework for Metadata Keys] +\newif\ifmetakeys@showmeta\metakeys@showmetafalse +\DeclareOption{showmeta}{\metakeys@showmetatrue} +\ProcessOptions +\RequirePackage{keyval}[1997/11/10] +\newcommand\addmetakey{\@ifstar\addmetakey@star\addmetakey@nostar} +\newcommand\addmetakey@star[3][]% +{\@ifnextchar[{\addmetakey@star@aux[#1]{#2}{#3}}{\addmetakey@star@aux[#1]{#2}{#3}[]}} +\def\addmetakey@star@aux[#1]#2#3[#4]{\metakeys@ext@clear@keys{#2}{#3}{#1}% +\metakeys@initialize@showkeys{#2}% +\define@key{#2}{#3}[#4]{\expandafter\gdef\csname #2@#3\endcsname{##1}}} +\newcommand\addmetakey@nostar[3][]% +{\metakeys@ext@showkeys{#2}{#3}\addmetakey@star[#1]{#2}{#3}} +\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} +\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\gdef\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}}}} +\newcommand\addmetalistkey{\@ifstar\addmetalistkey@star\addmetalistkey@nostar} +\newcommand\addmetalistkey@star[3][]{\metakeys@ext@clear@keys{#2}{#3}{#1}% +\metakeys@initialize@showkeys{#2}% +\expandafter\gdef\csname #2@#3s\endcsname{} +\define@key{#2}{#3}[#1]{% +\expandafter\ifx\csname #2@#3s\endcsname\@empty\expandafter\gdef\csname #2@#3s\endcsname{##1}% +\else\expandafter\xdef\csname #2@#3s\endcsname{\csname #2@#3s\endcsname,##1}% +\fi}} +\newcommand\addmetalistkey@nostar[3][]% +{\metakeys@ext@showkeys{#2}{#3}\addmetalistkey@star[#1]{#2}{#3}} +\newcommand\metakeys@initialize@showkeys[1]% +{\@ifundefined{#1@showkeys}{\expandafter\def\csname #1@showkeys\endcsname{}}{}}% +\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}}} +\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} +\newcommand\metakeys@show@keys[2]{\marginpar{{\scriptsize #2}}} +\newcommand\metakeys@show@keyval[2]% +{\expandafter\@metakeys@show@key\csname #1@#2\endcsname{#2}} +\newcommand\showmetakeys{\metakeys@showmetatrue} +\newcommand\hidemetakeys{\metakeys@showmetafalse} +\newcommand\addmetakeynew[3][]{\metakeys@ext@clear@keys{#2}{#3}{#1}% +\define@key{#2}{#3}{\expandafter\gdef\csname #2@#3\endcsname{##1}}} +\newcommand\metakeys@unspecified{an metakeys-defined key left unspecified} +\newcommand\metakeysifus[4]{\message{testing #1@#2=\csname#1@#2\endcsname}% +\expandafter\ifx\csname #1@#2\endcsname\metakeys@unspecified{#3}\else{#4}\fi} +\endinput +%% +%% End of file `metakeys.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/metakeys/metakeys.sty.ltxml b/Master/texmf-dist/tex/latex/stex/metakeys/metakeys.sty.ltxml new file mode 100644 index 00000000000..b07f809f8e9 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/metakeys/metakeys.sty.ltxml @@ -0,0 +1,3 @@ +DefConstructor('\showmetakeys',''); +DefConstructor('\hidemetakeys',''); +1; diff --git a/Master/texmf-dist/tex/latex/stex/mikoslides/beamerthemeJacobs.sty b/Master/texmf-dist/tex/latex/stex/mikoslides/beamerthemeJacobs.sty new file mode 100644 index 00000000000..dac52637b13 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/mikoslides/beamerthemeJacobs.sty @@ -0,0 +1,64 @@ +% Beamer Jacobs slide theme; some hints from CXL's DFKI theme included +% +% (C) 2009 Michael Kohlhase + +%% Shadings and logo images +\pgfdeclareimage[height=.5ex,width=113mm]{shade-l2r}{shading-l2r} +\pgfdeclareimage[height=2ex]{jacobslogo}{jacobs-logo} +\pgfdeclareimage[height=2ex]{cclogo}{cc_somerights} + +%% Headers flushed to the left. +\setbeamertemplate{frametitle}[default][left] + + +%% Add the line below the header +\addtobeamertemplate{frametitle}{}{\hspace*{-1cm} % + \begin{pgfpicture}{0cm}{0cm}{128mm}{2mm} + \pgfputat{\pgforigin}{\pgfbox[left,bottom]{\pgfuseimage{shade-l2r}}} + \end{pgfpicture} + } + +\setbeamertemplate{footline}[text line]{% + \usebeamercolor[fg]{titlelike} + \strut\hspace*{2cm}\insertshortauthor: \insertshorttitle\hfill{}% + \insertframenumber\hfill\insertshortdate\hspace*{3cm}% + } + \addtobeamertemplate{footline}{ % + \begin{pgfpicture}{0cm}{0cm}{128mm}{0mm} % + \pgfputat{\pgfpoint{126mm}{1mm}}{\pgfbox[right,top]{\pgfuseimage{jacobslogo}}} % + \pgfputat{\pgfpoint{10mm}{1mm}}{\pgfbox[right,top]{\pgfuseimage{cclogo}}} % + \end{pgfpicture}}{} + +%% Turn off the navigation symbols +\setbeamertemplate{navigation symbols}{} + +%% Inner theme +\useinnertheme{circles} + +%% Big logo for the title page. +%\pgfdeclareimage[height=1cm]{biglogo}{beamer/img/DFKI-SKS} +%\titlegraphic{\pgfuseimage{biglogo}} + + +\mode + + +%% Redefine various margin sizes +\setbeamersize{text margin left=3mm} +\setbeamersize{text margin right=3mm} +\setlength\leftmargini{1em} +\setlength\leftmarginii{1em} +\setlength\leftmarginiii{1em} +\newcommand{\vstretch}[1]{\vspace*{\stretch{#1}}} +\beamer@descriptionwidth=1cm + + diff --git a/Master/texmf-dist/tex/latex/stex/mikoslides/cc-by-sa.png b/Master/texmf-dist/tex/latex/stex/mikoslides/cc-by-sa.png new file mode 100644 index 00000000000..f0a944e0b89 Binary files /dev/null and b/Master/texmf-dist/tex/latex/stex/mikoslides/cc-by-sa.png differ diff --git a/Master/texmf-dist/tex/latex/stex/mikoslides/cc_somerights.png b/Master/texmf-dist/tex/latex/stex/mikoslides/cc_somerights.png new file mode 100644 index 00000000000..fd7d3c7f33c Binary files /dev/null and b/Master/texmf-dist/tex/latex/stex/mikoslides/cc_somerights.png differ diff --git a/Master/texmf-dist/tex/latex/stex/mikoslides/dangerous-bend.png b/Master/texmf-dist/tex/latex/stex/mikoslides/dangerous-bend.png new file mode 100644 index 00000000000..fbcfefa5d97 Binary files /dev/null and b/Master/texmf-dist/tex/latex/stex/mikoslides/dangerous-bend.png differ diff --git a/Master/texmf-dist/tex/latex/stex/mikoslides/jacobs-logo.png b/Master/texmf-dist/tex/latex/stex/mikoslides/jacobs-logo.png new file mode 100644 index 00000000000..0bbe28c44fc Binary files /dev/null and b/Master/texmf-dist/tex/latex/stex/mikoslides/jacobs-logo.png differ diff --git a/Master/texmf-dist/tex/latex/stex/mikoslides/mikoaffiliation.sty b/Master/texmf-dist/tex/latex/stex/mikoslides/mikoaffiliation.sty new file mode 100644 index 00000000000..3004b99b7ba --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/mikoslides/mikoaffiliation.sty @@ -0,0 +1,54 @@ +\RequirePackage[ngerman,USenglish]{babel} + +\newcommand{\mikoand}[1]% joint work with +{{\large\sc Michael Kohlhase}\\{\normalsize\green{joint work with #1}}\\[1ex]\mikoaffiliation} + +\newcommand{\miko} +{{\large\sc Michael Kohlhase}\\[1ex] +\JacobsAffiliation} + +\newcommand{\mikoJacobsDFKI}{\mikoJacobsDfki} +\newcommand{\mikoJacobsDfki} +{{\large\sc Michael Kohlhase}\\[1ex] +\JacobsDfkiAffiliation} + +\newcommand{\JacobsAffiliation} +{{\begin{small} + Computer Science\\ + School of Engineering \& Science \\ + Jacobs University Bremen, Germany \\ + \end{small}} +{\color{black}\normalsize\url{http://kwarc.info/kohlhase}}} + +\newcommand{\mikoboth} +{\begin{creator} +{\large\sc Michael Kohlhase}\\[1ex] +{\small\begin{tabular}{c@{\qquad}c} +School of Engineering \& Science & School of Computer Science \\ +Jacobs University Bremen & Carnegie Mellon yUniversity +\end{tabular}} +{\color{black}\normalsize\url{http://kwarc.info/kohlhase}} +\end{creator}} + +\newcommand{\JacobsDfkiAffiliation} +{\begin{small} +\begin{tabular}{c@{\qquad}c} +Computer Science +&\iflanguage{german}{Sichere Kognitive Systeme}{Safe and Secure Cognitive Systems} \\ +%School of Engineering \& Science +%& DFKI Bremen\\ +Jacobs University, Bremen +&\iflanguage{german}{Deutsches Forschungszentrum f\"ur KI}{German Research Center for AI}\\ +\end{tabular} +\end{small} +{\color{black}\normalsize\url{http://kwarc.info/kohlhase}}} + +\newcommand{\mikocmu} +{\begin{creator} +{\large\sc Michael Kohlhase}\\[1ex] +{\small\begin{tabular}{c} +School of Computer Science \\ +Carnegie Mellon University \\ +\end{tabular}}\\ +{\color{black}\normalsize\url{http://kwarc.info/kohlhase}} +\end{center}} diff --git a/Master/texmf-dist/tex/latex/stex/mikoslides/mikoaffiliation.sty.ltxml b/Master/texmf-dist/tex/latex/stex/mikoslides/mikoaffiliation.sty.ltxml new file mode 100644 index 00000000000..591d7469f24 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/mikoslides/mikoaffiliation.sty.ltxml @@ -0,0 +1,25 @@ +# -*- CPERL -*- +# /=====================================================================\ # +# | quiz.sty | # +# | Implementation for LaTeXML | # +# |=====================================================================| # +# | Not (yet) Part of LaTeXML: | # +# | Copyright (c) 2004 Michael Kohlhase, released under the | # +# |---------------------------------------------------------------------| # +# | $URL: svn://kwarc.faculty.iu-bremen.de/kohlhase/kwarc/projects/content/cnx/xsl/latexml.xsl$ +# | $Revision: 9990 $; last modified by $Author: $ +# | $Date: 2006-09-20 13:31:37 +0200 (Wed, 20 Sep 2006) $ +# |---------------------------------------------------------------------| # +# | Michael Kohlhase #_# | # +# | http://dlmf.nist.gov/LaTeXML/ (o o) | # +# \=========================================================ooo==U==ooo=/ # +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; + +DefConstructor('\miko',"Michael KohlhaseSchool of Engineering & Sciences International University Bremen, Germany "); +#********************************************************************** +# To be extended/experimental + +#********************************************************************** +1; diff --git a/Master/texmf-dist/tex/latex/stex/mikoslides/mikoslides.cls b/Master/texmf-dist/tex/latex/stex/mikoslides/mikoslides.cls new file mode 100644 index 00000000000..1c835a37c29 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/mikoslides/mikoslides.cls @@ -0,0 +1,115 @@ +%% +%% This is file `mikoslides.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% mikoslides.dtx (with options: `cls') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesClass{mikoslides}[2012/01/28 v0.9 Jacobs slides] +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\newif\ifnotes\notesfalse +\newif\ifsectocframes\sectocframesfalse +\newif\ifproblems\problemstrue +\DeclareOption{notes}{\notestrue} +\DeclareOption{slides}{\notesfalse} +\DeclareOption{noproblems}{\problemsfalse} +\DeclareOption{sectocframes}{\sectocframestrue} +\ifnotes +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{omdoc}} +\else +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{beamer}} +\fi +\ProcessOptions +\ifnotes +\LoadClass{omdoc} +\RequirePackage{a4wide} +\RequirePackage{marginnote} +\RequirePackage[notheorems,noamsthm]{beamerarticle} +\else +\LoadClass[notheorems,noamsthm,10pt]{beamer} +\newcounter{Item} +\newcounter{paragraph} +\newcounter{subparagraph} +\newcounter{Hfootnote} +\usetheme{Jacobs} +\fi +\RequirePackage{stex} +\RequirePackage{latexml} +\RequirePackage{amssymb} +\RequirePackage{tikz} +\usepgflibrary{shapes}\usetikzlibrary{arrows} +\RequirePackage{url} +\RequirePackage{amsmath} +\RequirePackage{comment} +\RequirePackage{standalone} +\newcounter{slide} +\newlength{\slidewidth}\setlength{\slidewidth}{13.5cm} +\newlength{\slideheight}\setlength{\slideheight}{9cm} +\ifnotes\renewenvironment{note}{}{}\else\excludecomment{note}\fi +\ifnotes +\newlength{\slideframewidth}\setlength{\slideframewidth}{2pt} +\newsavebox{\myframebox} +\renewenvironment{frame}[1][]% +{\stepcounter{slide} +\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 + \begin{list} + {\itemize@label} + {\setlength{\labelsep}{.3em}\setlength{\labelwidth}{.5em}\setlength{\leftmargin}{1.5em}} + \edef\itemize@level{\itemize@inner}} +{\end{list}} + \noindent\hfill\begin{lrbox}{\myframebox} + \begin{minipage}{\slidewidth}\sf}% + {\miko@slidelabel\end{minipage}\end{lrbox}% + \begin{center}\fbox{\usebox\myframebox}\end{center}\hfill} +\renewcommand{\frametitle}[1]{{\Large\bf\sf\color{blue}{#1}}} +\fi +\makeindex +\ifproblems\newenvironment{problems}{}{}\else\excludecomment{problems}\fi +\newlength{\slidelogoheight} +\ifnotes\setlength{\slidelogoheight}{.4cm}\else\setlength{\slidelogoheight}{1cm}\fi +\newsavebox{\slidelogo}\sbox{\slidelogo}{\includegraphics[height=\slidelogoheight]{jacobs-logo}} +\def\source{Michael Kohlhase}% customize locally +\def\copyrightnotice{\footnotesize\copyright:\hspace{.3ex}{\source}} +\newsavebox{\cclogo}\sbox{\cclogo}{\includegraphics[height=\slidelogoheight]{cc_somerights}} +\newif\ifcchref\cchreffalse +\AtBeginDocument{\@ifpackageloaded{hyperref}{\cchreftrue}{\cchreffalse}} +\def\licensing{\ifcchref\href{http://creativecommons.org/licenses/by-sa/2.5/}{\usebox{\cclogo}}\else{\usebox{\cclogo}}\fi} +\newcommand{\miko@slidelabel}% +{\vbox to \slidelogoheight{\vss\hbox to \slidewidth% +{\licensing\hfill\copyrightnotice\hfill\arabic{slide}\hfill\usebox{\slidelogo}}}} +\AtBeginDocument{\definecolor{green}{rgb}{0,.5,0}\definecolor{purple}{cmyk}{.3,1,0,.17}} +\def\defemph#1{{\textcolor{magenta}{#1}}} +\def\notemph#1{{\textcolor{magenta}{#1}}} +\def\stDMemph#1{{\textcolor{blue}{#1}}} +\def\@@lec#1{(\textcolor{green}{#1})} +\pgfdeclareimage[width=1.5em]{miko@dbend}{dangerous-bend} +\def\textwarning{\raisebox{-.05cm}{\pgfuseimage{miko@dbend}}\xspace} +\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]% +{\newbox\boxwith\setbox\boxwith\hbox{\begin{tabular}{c}{\em joint work with}\\#1\end{tabular}}% +\begin{center}\LARGE\begin{tabular}{c}\color{red}}% +{\\\box\boxwith\end{tabular}\end{center}% +\vspace{1ex minus 1ex}} +\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}} +\ifsectocframes +\def\at@begin@omgroup#1{\message{atbeginomgroup}\begin{frame}\frametitle{Outline}\tableofcontents[section]\end{frame}} +\fi +\newcommand\tikzinput[2][]{\input{#2}} + +\ifnotes\else\sf\fi +\endinput +%% +%% End of file `mikoslides.cls'. diff --git a/Master/texmf-dist/tex/latex/stex/mikoslides/mikoslides.cls.ltxml b/Master/texmf-dist/tex/latex/stex/mikoslides/mikoslides.cls.ltxml new file mode 100644 index 00000000000..c08d03888b1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/mikoslides/mikoslides.cls.ltxml @@ -0,0 +1,94 @@ +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +RawTeX('\newif\ifnotes\notesfalse'); +RawTeX('\newif\ifproblems\problemsfalse'); +LoadClass('omdoc'); +DefConstructor('\usetheme{}',''); +RequirePackage('stex'); +RequirePackage('latexml'); +RequirePackage('amssymb'); +RequirePackage('graphicx'); +RequirePackage('tikz'); +RequirePackage('amsmath'); +DefRegister('\slidewidth' => Dimension('13.5cm')); +DefRegister('\slideheight' => Dimension('9cm')); +DefEnvironment('{note}','#body'); +DefEnvironment('{frame}[]', + "" + . "#body\n" + ."\n\n", + afterDigestBegin=>sub { + $_[1]->setProperty(theory=>LookupValue('current_module')); }); +DefConstructor('\frametitle{}', + "\n#1"); +DefEnvironment('{problems}','#body'); +#DefMacro('\defemph{}','{\textcolor{magenta}{#1}}'); +#DefMacro('\notemph{}','{\textcolor{magenta}{#1}}'); +DefMacro('\textwarning',""); +DefMacro('\title[]{}', '\@add@frontmatter{ltx:title}{#1}'); +DefMacro('\date[]{}', '\@add@frontmatter{ltx:date}[role=creation]{#1}'); +DefMacro('\author[]{}', sub { andSplit(T_CS('\@author'),$_[1]); });#$ +DefConstructor('\titleframe',"titleframe elided here"); +DefEnvironment('{titleframewith}', + "begin elided titleframe" + . "#body" + ."end elided titleframe"); +DefEnvironment('{titleslide}',""); +DefEnvironment('{titleslide}',"#body"); +DefEnvironment('{ttitle}', "\n#body"); +DefMacro('\tikzinput[] {}','\includegraphics[#1]{#2}'); + +DefEnvironment('{columns}','#body'); +DefEnvironment('{column}{}','#body'); +DefConstructor('\uncover','#1'); +#Define a Beamer Overlay Parameter type + DefParameterType('BeamerOverlay', sub { + my ($gullet) = @_; + my $tok = $gullet->readXToken; + if (ref $tok && ToString($tok) eq '<') { + $gullet->readUntil(T_OTHER('>')); + } else { + $gullet->unread($tok) if ref $tok; + undef; }}, + reversion=> sub { + (T_OTHER('<'), $_[0]->revert, T_OTHER('>')); + }); + +#Take the "from" field of the overlay range +sub overlayFrom { + return "" unless defined $_[0]; + my $overlay=ToString($_[0]); $overlay =~ /^(\d+)/; $1;} + +#Reuse the CMP itemizations, only adjust the \item constructors. +DefMacro('\beamer@group@item[] OptionalBeamerOverlay IfBeginFollows', sub { + my($gullet,$tag,$overlay,$needwrapper)=@_; + $overlay=$overlay||T_OTHER(""); + ( T_CS('\group@item@maybe@unwrap'), + ($needwrapper ? (Invocation(T_CS('\beamer@group@item@wrap'),$tag,$overlay)->unlist) : ()) ); }); +DefConstructor('\beamer@group@item@wrap {} OptionalBeamerOverlay', + "" + . "?#1(#1)()" + . "", + beforeDigest=>sub { + Let('\group@item@maybe@unwrap','\group@item@unwrap'); + #$_[0]->bgroup; +return; }, + properties=>sub{ RefStepItemCounter(); }); + +#DefConstructor('\beamer@itemize@item[] OptionalBeamerOverlay', +# "" +# . "?#1(#1)()", +# properties=>sub{ RefStepItemCounter(); }); +DefConstructor('\beamer@enumerate@item[] OptionalBeamerOverlay', + "" + . "?#1(#1)()", + properties=>sub{ RefStepItemCounter(); }); +DefConstructor('\beamer@description@item[] OptionalBeamerOverlay', + "" + . "?#1(#1)()", # trust di and dt to autoclose + properties=>sub{ RefStepItemCounter(); }); +DefMacro('\putgraphicsat{}{}{}','\mygraphics[#2]{#3}'); +DefMacro('\putat{}{}','#2'); +1; diff --git a/Master/texmf-dist/tex/latex/stex/mikoslides/shading-l2r.png b/Master/texmf-dist/tex/latex/stex/mikoslides/shading-l2r.png new file mode 100644 index 00000000000..2eabe7a8b17 Binary files /dev/null and b/Master/texmf-dist/tex/latex/stex/mikoslides/shading-l2r.png differ diff --git a/Master/texmf-dist/tex/latex/stex/modules/modules.sty b/Master/texmf-dist/tex/latex/stex/modules/modules.sty new file mode 100644 index 00000000000..8ee9fda5172 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/modules/modules.sty @@ -0,0 +1,262 @@ +%% +%% This is file `modules.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% modules.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{modules}[2012/01/28 v1.1 Semantic Markup] +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\newif\ifmod@show\mod@showfalse +\DeclareOption{showmods}{\mod@showtrue} +\newif\ifmod@qualified\mod@qualifiedfalse +\DeclareOption{qualifiedimports}{\mod@qualifiedtrue} +\ProcessOptions +\RequirePackage{sref} +\RequirePackage{xspace} +\RequirePackage{xcomment} +\addmetakey{module}{cd} +\addmetakey{module}{title} +\define@key{module}{id}{% +\edef\this@module{\expandafter\noexpand\csname module@defs@#1\endcsname}% +\global\@namedef{module@defs@#1}{}% +\ifmod@qualified +\edef\this@qualified@module{\expandafter\noexpand\csname module@defs@qualified@#1\endcsname}% +\global\@namedef{module@defs@qualified@#1}{}% +\fi +\def\mod@id{#1}% +\expandafter\edef\csname #1@cd@file@base\endcsname{\mod@path}% +\expandafter\g@addto@macro\csname module@defs@#1\expandafter\endcsname\expandafter% +{\expandafter\def\csname #1@cd@file@base\expandafter\endcsname\expandafter{\mod@path}}} +\newcounter{module}[section] +\newcommand\module@heading{\stepcounter{module}% +\noindent{\textbf{Module} \thesection.\themodule [\mod@id]}% +\sref@label@id{Module \thesection.\themodule [\mod@id]}% +\ifx\module@title\@empty :\quad\else\quad(\module@title)\hfill\\\fi} +\newcommand\module@footer{\noindent{\textbf{EndModule} \thesection.\themodule}} +\newenvironment{module}[1][]% +{\metasetkeys{module}{#1}\ifmod@show\module@heading\fi} +{\ifmod@show\module@footer\fi} +\def\activate@defs#1{\csname module@defs@#1\endcsname} +\def\export@defs#1{\@ifundefined{mod@id}{}% +{\expandafter\expandafter\expandafter\g@addto@macro\expandafter% +\this@module\expandafter{\csname module@defs@#1\endcsname}}} +\def\coolurion{} +\def\coolurioff{} +\newcommand{\importmodule}[2][]{{\def\mod@path{#1}% +\ifx\mod@path\@empty\else\requiremodules{#1}\fi}% +\activate@defs{#2}\export@defs{#2}} +\newenvironment{importmodulevia}[2][]{\gdef\@@doit{\importmodule[#1]{#2}}% +\ifmod@show\par\noindent importing module #2 via \@@doit\fi} +{\aftergroup\@@doit\ifmod@show end import\fi} +\newcommand\vassign[2]{\ifmod@show\ensuremath{#1\mapsto #2}, \fi} +\newcommand\tassign[3][]{\ifmod@show #2\ensuremath{\mapsto} #3, \fi} +\newcommand\ttassign[3][]{\ifmod@show #1\ensuremath{\mapsto} ``#2'', \fi} +\newcommand{\importOMDocmodule}[3][]{\importmodule[#1]{#3}} +\let\metalanguage=\importmodule +\def\mod@newcommand{\@star@or@long\mod@new@command} +\def\mod@new@command#1{\@testopt{\@mod@newcommand#1}0} +\def\@mod@newcommand#1[#2]{\kernel@ifnextchar [{\mod@xargdef#1[#2]}{\mod@argdef#1[#2]}} +\long\def\mod@argdef#1[#2]#3{\@yargdef#1\@ne{#2}{#3}} +\long\def\mod@xargdef#1[#2][#3]#4{\expandafter\def\expandafter#1\expandafter{% +\expandafter\@protected@testopt\expandafter #1\csname\string#1\endcsname{#3}}% +\expandafter\@yargdef\csname\string#1\endcsname\tw@{#2}{#4}} +\newif\if@symdeflocal +\define@key{symdef}{local}[true]{\@symdeflocaltrue} +\define@key{symdef}{name}{} +\define@key{symdef}{assocarg}{} +\define@key{symdef}{bvars}{} +\define@key{symdef}{bvar}{} +\define@key{symdef}{bindargs}{} +\def\symdef{\@ifnextchar[{\@symdef}{\@symdef[]}} +\def\@symdef[#1]#2{\@ifnextchar[{\@@symdef[#1]{#2}}{\@@symdef[#1]{#2}[0]}} +\def\@mod@nc#1{\mod@newcommand{#1}[1]} +\def\@@symdef[#1]#2[#3]#4{% +\@symdeflocalfalse\setkeys{symdef}{#1}% +\expandafter\mod@newcommand\csname modules@#2@pres@\endcsname[#3]{#4}% +\expandafter\def\csname #2\endcsname% +{\@ifnextchar[{\csname modules@#2\endcsname}{\csname modules@#2\endcsname[]}}% +\expandafter\def\csname modules@#2\endcsname[##1]% +{\csname modules@#2@pres@##1\endcsname}% +\expandafter\@mod@nc\csname mod@symref@#2\expandafter\endcsname\expandafter% +{\expandafter\mod@termref\expandafter{\mod@id}{#2}{##1}}% +\if@symdeflocal\else% +\@ifundefined{mod@id}{}{% +\expandafter\g@addto@macro\this@module% +{\expandafter\mod@newcommand\csname modules@#2@pres@\endcsname[#3]{#4}}% +\expandafter\g@addto@macro\this@module% +{\expandafter\def\csname#2\endcsname% +{\@ifnextchar[{\csname modules@#2\endcsname}{\csname modules@#2\endcsname[]}}}% +\expandafter\g@addto@macro\this@module% +{\expandafter\def\csname modules@#2\endcsname[##1]% +{\csname modules@#2@pres@##1\endcsname}}% +\expandafter\g@addto@macro\csname module@defs@\mod@id\expandafter\endcsname\expandafter% +{\expandafter\@mod@nc\csname mod@symref@#2\expandafter\endcsname\expandafter% +{\expandafter\mod@termref\expandafter{\mod@id}{#2}{##1}}}% +\ifmod@qualified% +\expandafter\g@addto@macro\this@qualified@module% +{\expandafter\mod@newcommand\csname modules@#2@pres@qualified\endcsname[#3]{#4}}% +\expandafter\g@addto@macro\this@qualified@module% +{\expandafter\def\csname#2atqualified\endcsname{\csname modules@#2@pres@qualified\endcsname}}% +\fi% +}\fi} +\define@key{DefMathOp}{name}{\def\defmathop@name{#1}} +\newcommand\DefMathOp[2][]{% +\setkeys{DefMathOp}{#1}% +\symdef[#1]{\defmathop@name}{#2}} +\def\symvariant#1{\@ifnextchar[{\@symvariant{#1}}{\@symvariant{#1}[0]}} +\def\@symvariant#1[#2]#3#4{% +\expandafter\mod@newcommand\csname modules@#1@pres@#3\endcsname[#2]{#4}% +\@ifundefined{mod@id}{}{% +\expandafter\g@addto@macro\this@module% +{\expandafter\mod@newcommand\csname modules@#1@pres@#3\endcsname[#2]{#4}}}}% +\def\resymdef{\@ifnextchar[{\@resymdef}{\@resymdef[]}} +\def\@resymdef[#1]#2{\@ifnextchar[{\@@resymdef[#1]{#2}}{\@@resymdef[#1]{#2}[0]}} +\def\@@resymdef[#1]#2[#3]#4{\PackageError{modules} + {The \protect\resymdef macro is deprecated,\MessageBreak + use the \protect\symvariant instead!}} +\let\abbrdef\symdef +\def\mod@path{} +\def\mod@true{true} +\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% +{\expandafter\mod@newcommand\csname#2\endcsname[0]{#3\xspace}}}% +\fi} +\def\@captitalize#1{\uppercase{#1}} +\newcommand\capitalize[1]{\expandafter\@captitalize #1} +\def\mod@termref#1#2#3{\def\@test{#3} +\@ifundefined{#1@cd@file@base} + {\protect\G@refundefinedtrue + \@latex@warning{\protect\termref with unidentified cd "#1": the cd key must + reference an active module} + \def\@label{sref@#2 @target}} + {\def\@label{sref@#2@#1@target}}% +\expandafter\ifx\csname #1@cd@file@base\endcsname\@empty% local reference +\sref@hlink@ifh{\@label}{\ifx\@test\@empty #2\else #3\fi}\else% +\def\@uri{\csname #1@cd@file@base\endcsname.pdf\#\@label}% +\sref@href@ifh{\@uri}{\ifx\@test\@empty #2\else #3\fi}\fi} +\def\mod@simplify#1{\expandafter\mod@simpl#1/\relax} +\def\mod@simpl#1/#2\relax{\def\@second{#2}% +\ifx\mod@blaaaa\@empty\edef\mod@savedprefix{}\def\mod@blaaaa{aaa}\else\fi% +\ifx\@second\@empty\edef\mod@savedprefix{\mod@savedprefix#1}% +\else\mod@simplhelp#1/#2\relax\fi} +\def\mod@updir{..} +\def\mod@simplhelp#1/#2/#3\relax{\def\@first{#1}\def\@second{#2}\def\@third{#3}% +\ifx\@third\@empty% base case +\ifx\@second\mod@updir\else% + +\ifx\mod@second\@empty\edef\mod@savedprefix{\mod@savedprefix#1}% +\else\edef\mod@savedprefix{\mod@savedprefix#1/#2}% +\fi% +\fi% +\else% +\ifx\@first\mod@updir% +\edef\mod@savedprefix{\mod@savedprefix#1/}\mod@simplhelp#2/#3\relax% +\else% +\ifx\@second\mod@updir\mod@simpl#3\relax% +\else\edef\mod@savedprefix{\mod@savedprefix#1/}\mod@simplhelp#2/#3\relax% +\fi% +\fi% +\fi}% +\newcommand{\defpath}[2]{\expandafter\newcommand\csname #1\endcsname[1]{#2/##1}} +\newif\ifmodules +\gdef\mod@reg{} +\def\mod@update#1{\ifx\mod@reg\@empty\xdef\mod@reg{#1}\else\xdef\mod@reg{#1@\mod@reg}\fi} +\def\mod@check#1@#2///#3\relax{% +\def\mod@one{#1}\def\mod@two{#2}\def\mod@three{#3}% +\expandafter% +\ifx\mod@three\mod@one\modulestrue% +\else% +\ifx\mod@two\@empty\modulesfalse\else\mod@check#2///#3\relax\fi% +\fi} +\def\mod@search#1{% +\modulesfalse\expandafter\mod@check\mod@reg @///#1\relax% +\ifmodules\else\mod@update{#1}\fi} +\def\mod@reguse#1{\modulesfalse\expandafter\mod@check\mod@reg @///#1\relax} +\def\mod@prefix{} +\def\mod@updatedpre#1{% +\edef\mod@prefix{\mod@prefix\mod@pathprefix@check#1/\relax}} +\def\mod@pathprefix@check#1/#2\relax{% +\ifx\\#2\\% no slash in string +\else\mod@ReturnAfterFi{#1/\mod@pathprefix@help#2\relax}% +\fi} +\def\mod@pathprefix@help#1/#2\relax{% +\ifx\\#2\\% end of recursion +\else\mod@ReturnAfterFi{#1/\mod@pathprefix@help#2\relax}% +\fi} +\long\def\mod@ReturnAfterFi#1\fi{\fi#1} +\def\mod@pathpostfix@check#1/#2\relax{% slash +\ifx\\#2\\%no slash in string +#1\else\mod@ReturnAfterFi{\mod@pathpostfix@help#2\relax}% +\fi} +\def\mod@pathpostfix@help#1/#2\relax{% +\ifx\\#2\\% +#1\else\mod@ReturnAfterFi{\mod@pathpostfix@help#2\relax}% +\fi} +\def\mod@updatedpost#1{% +\edef\mod@savedprefix{\mod@savedprefix\mod@pathpostfix@check#1/\relax}} +\def\mod@updatesms{\edef\mod@savedprefix{\mod@savedprefix.sms}} +\newcommand\requiremodules[1]{% +{\mod@showfalse% save state and ensure silence while reading sms +\mod@updatedpre{#1}% add the new file to the already existing path +\let\mod@savedprefix\mod@prefix% add the path to the new file to the prefix +\mod@updatedpost{#1}% +\def\mod@blaaaa{}% macro used in the simplify function (remove .. from the prefix) +\mod@simplify{\mod@savedprefix}% remove |xxx/..| from the path (in case it exists) +\mod@reguse{\mod@savedprefix}% +\ifmodules\else% +\mod@updatesms% update the file to contain the .sms extension +\let\newreg\mod@reg% use to compare, in case the .sms file was loaded before +\mod@search{\mod@savedprefix}% update registry +\ifx\newreg\mod@reg\else\input{\mod@savedprefix}\fi% check if the registry was updated and load if necessary +\fi}} +\def\sinput#1{ +{\mod@updatedpre{#1}% add the new file to the already existing path +\let\mod@savedprefix\mod@prefix% add the path to the new file to the prefix +\mod@updatedpost{#1}% +\def\mod@blaaaa{}% macro used in the simplify function (remove .. from the prefix) +\mod@simplify{\mod@savedprefix}% remove |xxx/..| from the path (in case it exists) +\mod@reguse{\mod@savedprefix}% +\let\newreg\mod@reg% use to compare, in case the .sms file was loaded before +\mod@search{\mod@savedprefix}% update registry +\ifx\newreg\mod@reg%\message{This file has been previously introduced} +\else\input{\mod@savedprefix}% +\fi}} +\let\sinputref=\sinput +\let\inputref=\input +\def\requirepackage#1#2{\makeatletter\input{#1.sty}\makeatother} +\srefaddidkey{view} +\addmetakey*{view}{title} +\define@key{view}{load}{\requiremodules{#1}} +\newcounter{view}[section] +\newcommand\view@heading[2]{\stepcounter{view}% +{\textbf{View} \thesection.\theview: from #1 to #2}% +\sref@label@id{View \thesection.\theview}% +\ifx\view@title\@empty :\quad\else\quad(\view@title)\hfill\\\fi} +\ifmod@show\newsavebox{\viewbox} +\newenvironment{view}[3][]{\metasetkeys{view}{#1}\sref@target\stepcounter{view} +\begin{lrbox}{\viewbox}\begin{minipage}{.9\textwidth} +\importmodule{#1}\importmodule{#2}\gdef\view@@heading{\view@heading{#2}{#3}}} +{\end{minipage}\end{lrbox} +\setbox0=\hbox{\begin{minipage}{.9\textwidth}% +\noindent\view@@heading\rm% +\end{minipage}} +\smallskip\noindent\fbox{\vbox{\box0\vspace*{.2em}\usebox\viewbox}}\smallskip} +\else\newxcomment[]{view}\fi%ifmod@show +\define@key{module}{uses}{% +\@for\module@tmp:=#1\do{\activate@defs\module@tmp\export@defs\module@tmp}} +\define@key{module}{usesqualified}{% +\@for\module@tmp:=#1\do{\activate@defs{qualified@\module@tmp}\export@defs\module@tmp}} +\def\csymdef{\@ifnextchar[{\@csymdef}{\@csymdef[]}} +\def\@csymdef[#1]#2{\@ifnextchar[{\@@csymdef[#1]{#2}}{\@@csymdef[#1]{#2}[0]}} +\def\@@csymdef[#1]#2[#3]#4#5{\@@symdef[#1]{#2}[#3]{#4}} +\def\notationdef[#1]#2#3{} +\endinput +%% +%% End of file `modules.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/modules/modules.sty.ltxml b/Master/texmf-dist/tex/latex/stex/modules/modules.sty.ltxml new file mode 100644 index 00000000000..23da85ab9ea --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/modules/modules.sty.ltxml @@ -0,0 +1,624 @@ +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Global; +use LaTeXML::Package; +DefKeyVal('Module','id','Semiverbatim'); +DefKeyVal('Module','cd','Semiverbatim'); +DefEnvironment('{module} OptionalKeyVals:Module', + "?#excluded()(#body)", +# beforeDigest=>\&useTheoryItemizations, + afterDigestBegin=>sub { + my($stomach, $whatsit)=@_; + $whatsit->setProperty(excluded=>LookupValue('excluding_modules')); + + my $keys = $whatsit->getArg(1); + my($id, $cd)=$keys + && map(ToString($keys->getValue($_)),qw(id cd)); + #make sure we have an id or give a stub one otherwise: +if (not $id) { +#do magic to get a unique id for this theory +#$whatsit->setProperties(beginItemize('theory')); +#$id = ToString($whatsit->getProperty('id')); + # changed: beginItemize returns the hash returned by RefStepCounter. + # RefStepCounter deactivates any scopes for the current value of the + # counter which causes the stored prop. of the env. not to be + # visible anymore. + $id = LookupValue('stex:theory:id') || 0; + AssignValue('stex:theory:id', $id+1); + $id = "I$id"; +} + $cd = $id unless $cd; + # update the catalog with paths for modules + my $module_paths = LookupValue('module_paths') || {}; + $module_paths->{$id} = LookupValue('last_module_path'); + AssignValue('module_paths', $module_paths, 'global'); + + #Update the current module position + AssignValue(current_module => $id); + AssignValue(module_cd => $cd) if $cd; + + #activate the module in our current scope + $STATE->activateScope("module:".$id); + + #Activate parent scope, if present + my $parentmod = LookupValue('parent_module'); + use_module($parentmod) if $parentmod; + #Update the current parent module + AssignValue("parent_of_$id"=>$parentmod,'global'); + AssignValue("parent_module" => $id); + return; }, + afterDigest => sub { + #Move a step up on the module ancestry + AssignValue("parent_module" => LookupValue("parent_of_".LookupValue("parent_module"))); + return; + }); +sub use_module { + my($module,%ancestors)=@_; + $module = ToString($module); + if (defined $ancestors{$module}) { + Fatal(":module \"$module\" leads to import cycle!"); + } + $ancestors{$module}=1; + # Depth-first load definitions from used modules, disregarding cycles + foreach my $used_module (@{ LookupValue("module_${module}_uses") || []}){ + use_module($used_module,%ancestors); + } + # then load definitions for this module + $STATE->activateScope("module:$module"); }#$ +DefMacro('\coolurion',sub {AssignValue('cooluri'=>1);}); +DefMacro('\coolurioff',sub {AssignValue('cooluri'=>0);}); +sub omext { + my ($mod)=@_; my $dest=''; + $mod = ToString($mod); + if ($mod) { + #We need a constellation of abs_path invocations + # to make sure that all symbolic links get resolved + if ($mod=~/^(\w)+:\/\//) { $dest=$mod; } else { + my ($d,$f,$t) = pathname_split(abs_path($mod)); + $d = pathname_relative(abs_path($d),abs_path(cwd())); + $dest=$d."/".$f; + } + } + $dest.=".omdoc" if (ToString($mod) && !LookupValue('cooluri')); + return Tokenize($dest);} +sub importmoduleI { + my($stomach,$whatsit)=@_; + my $file = ToString($whatsit->getArg(1)); + my $omdocmod = $file.".omdoc" if $file; + my $module = ToString($whatsit->getArg(2)); + my $containing_module = LookupValue('current_module'); + AssignValue('last_import_module',$module); + #set the relation between the current module and the one to be imported + PushValue("module_".$containing_module."_uses"=>$module) if $containing_module; + #check if we've already loaded this module file or no file path given + if((!$file) || (LookupValue('file_'.$module.'_loaded'))) {use_module($module);} #if so activate it! + else { + #if not: + my $gullet = $stomach->getGullet; + #1) mark as loaded + AssignValue('file_'.$module.'_loaded' => 1, 'global'); + #open a group for its definitions so that they are localized + $stomach->bgroup; + #update the last module path + AssignValue('last_module_path', $file); + #queue the closing tag for this module in the gullet where it will be executed + #after all other definitions of the imported module have been taken care of + $gullet->unread(Invocation(T_CS('\end@requiredmodule'), Tokens(Explode($module)))->unlist); + #we only need to load the sms definitions without generating any xml output, so we set the flag to 1 + AssignValue('excluding_modules' => 1); + #queue this module's sms file in the gullet so that its definitions are imported + $gullet->input($file,['sms']); + } + return;} +DefConstructor('\importmodule OptionalSemiverbatim {}', + "", + afterDigest=>sub{ importmoduleI(@_)}); +DefMacro('\importmodulevia OptionalSemiverbatim {}','\endgroup\importmoduleI[#1]{#2}\begin{importmoduleenv}[#1]{#2}'); +DefMacroI('\end{importmodulevia}',undef,'\end{importmoduleenv}'); +DefEnvironment('{importmoduleenv} OptionalSemiverbatim {}', + "" + . "#body" + .""); +DefConstructor('\importmoduleI OptionalSemiverbatim {}', '', + afterDigest=>sub{ importmoduleI(@_)}); +DefConstructor('\vassign{}{}', + "" + . "#1" + . "#2" + .""); +DefConstructor('\tassign[]{}{}', + "" + . "" + . "" + ."", + afterDigest=> sub { + my ($stomach,$whatsit) = @_; + $whatsit->setProperty('currentModule',LookupValue("current_module")); + $whatsit->setProperty('lastImportModule',LookupValue("last_import_module")); + }); +DefConstructor('\ttassign{}{}', + "" + . "#1" + . "#2" + .""); +DefConstructor('\importOMDocmodule OptionalSemiverbatim {}{}',"", +afterDigest=>sub{ + #Same as \importmodule, just switch second and third argument. + my ($stomach,$whatsit) = @_; + my $path = $whatsit->getArg(1); + my $ouri = $whatsit->getArg(2); + my $module = $whatsit->getArg(3); + $whatsit->setArgs(($path, $module,$ouri)); + importmoduleI($stomach,$whatsit); + return; +}); +DefConstructor('\metalanguage OptionalSemiverbatim {}', + "", + afterDigest=>sub{ importmoduleI(@_)}); +DefMacro('\DefMathOp OptionalKeyVals:symdef {}', + sub { + my($self,$keyval,$pres)=@_; + my $name = KeyVal($keyval,'name') if $keyval; + #Rewrite this token + my $scopes = $STATE->getActiveScopes; + 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,$pres)->unlist); + }); +DefMacro('\symdef OptionalKeyVals:symdef {}[]{}', + sub { + my($self,@args)=@_; + ((Invocation(T_CS('\@symdef'),@args)->unlist), + (LookupValue('excluding_modules') ? () + : (Invocation(T_CS('\@symdef@pres'), @args)->unlist))); }); + +#Current list of recognized formatter command sequences: +our @PresFormatters = qw (infix prefix postfix assoc mixfixi mixfixa mixfixii mixfixia mixfixai mixfixaii mixfixiii); +DefPrimitive('\@symdef OptionalKeyVals:symdef {}[]{}', sub { + my($stomach,$keys,$cs,$nargs,$presentation)=@_; + my($name,$cd,$role,$bvars,$bvar)=$keys + && map($_ && $_->toString,map($keys->getValue($_), qw(name cd role + bvars bvar))); + $cd = LookupValue('module_cd') unless $cd; + $name = $cs unless $name; + #Store for later lookup + AssignValue("symdef.".ToString($cs).".cd"=>ToString($cd),'global'); + AssignValue("symdef.".ToString($cs).".name"=>ToString($name),'global'); + $nargs = (ref $nargs ? $nargs->toString : $nargs || 0); + my $module = LookupValue('current_module'); + my $scope = (($keys && ($keys->getValue('local') || '' eq 'true')) ? 'module_local' : 'module').":".$module; + #The DefConstructorI Factory is responsible for creating the \symbol command sequences as dictated by the \symdef + DefConstructorI("\\".$cs->toString,convertLaTeXArgs($nargs+1,'default'), sub { + my ($document,@args) = @_; + my $icvariant = shift @args; + my @props = @args; + #Lookup the presentation from the State, if a variant: + @args = splice(@props,0,$nargs); + my %prs = @props; + my $localpres = $prs{presentation}; + $prs{isbound} = "BINDER" if ($bvars || $bvar); + my $wrapped; + my $parent=$document->getNode; + if(! defined $parent->lookupNamespacePrefix("http://omdoc.org/ns")){ # namespace not already declared? + $document->getDocument->documentElement->setNamespace("http://omdoc.org/ns","omdoc",0); } + my $symdef_scope=$parent->exists('ancestor::omdoc:rendering'); #Are we in a \symdef rendering? + if (($localpres =~/^LaTeXML::Token/) && $symdef_scope) { + #Note: We should probably ask Bruce whether this maneuver makes sense + # We jump back to digestion, at a processing stage where it has been already completed + # Hence need to reinitialize all scopes and make a new group. This is probably expensive to do. + + my @toks = $localpres->unlist; + while(@toks && $toks[0]->equals(T_SPACE)){ shift(@toks); } # Remove leading space + my $formatters = join("|",@PresFormatters); + $formatters = qr/$formatters/; + $wrapped = (@toks && ($toks[0]->toString =~ /^\\($formatters)$/)); + $localpres = Invocation(T_CS('\@use'),$localpres) unless $wrapped; + # Plug in the provided arguments, doing a nasty reversion: + my @sargs = map (Tokens($_->revert), @args); + $localpres = Tokens(LaTeXML::Expandable::substituteTokens($localpres,@sargs)) if $nargs>0; + #Digest: + my $stomach = $STATE->getStomach; + $stomach->beginMode('inline-math'); + $STATE->activateScope($scope); + use_module($module); + use_module(LookupValue("parent_of_".$module)) if LookupValue("parent_of_".$module); + $localpres=$stomach->digest($localpres); + $stomach->endMode('inline-math'); + } + else { #Some are already digested to Whatsit, usually when dropped from a wrapping constructor + } + if ($nargs == 0) { + if (!$symdef_scope) { #Simple case - discourse flow, only a single XMTok + #Referencing XMTok when not in \symdefs: + $document->insertElement('ltx:XMTok',undef,(name=>$cs->toString, meaning=>$name,omcd=>$cd,role => $role,scriptpos=>$prs{'scriptpos'})); + } + else { + if ($symdef_scope && ($localpres =~/^LaTeXML::Whatsit/) && (!$wrapped)) {#1. Simple case: converts to a single token + $localpres->setProperties((name=>$cs->toString, meaning=>$name,omcd=>$cd,role => $role,scriptpos=>$prs{'scriptpos'})); + } + else { + #Experimental treatment - COMPLEXTOKEN + #$role=$role||'COMPLEXTOKEN'; + #$document->openElement('ltx:XMApp',role=>'COMPLEXTOKEN'); + #$document->insertElement('ltx:XMTok',undef,(name=>$cs->toString, meaning=>$name, omcd=>$cd, role=>$role, scriptpos=>$prs{'scriptpos'})); + #$document->openElement('ltx:XMWrap'); + #$document->absorb($localpres); + #$document->closeElement('ltx:XMWrap'); + #$document->closeElement('ltx:XMApp'); + } + #We need expanded presentation when invoked in \symdef scope: + + #Suppress errors from rendering attributes when absorbing. + #This is bad style, but we have no way around it due to the digestion acrobatics. + my $verbosity = $LaTeXML::Global::STATE->lookupValue('VERBOSITY'); + my $errors = $LaTeXML::Global::STATE->getStatus('error'); + $LaTeXML::Global::STATE->assignValue('VERBOSITY',-5); + + #Absorb presentation: + $document->absorb($localpres); + + #Return to original verbosity and error state: + $LaTeXML::Global::STATE->assignValue('VERBOSITY',$verbosity); + $LaTeXML::Global::STATE->setStatus('error',$errors); + + #Strip all/any wrappers: + #TODO: Ugly LibXML work, possibly do something smarter + my $parent = $document->getNode; + my @renderings=$parent->findnodes(".//omdoc:rendering"); + foreach my $render(@renderings) { + my $content=$render; + while ($content && $content->localname =~/^rendering|[X]?Math/) { + $content = $content->firstChild; + } + my $sibling = $content->parentNode->lastChild; + my $localp = $render->parentNode; + while ((defined $sibling) && (!$sibling->isSameNode($content))) { + my $clone = $sibling->cloneNode(1); + $localp->insertAfter($clone,$render); + $sibling = $sibling->previousSibling; + } + $render->replaceNode($content); + } + } + } + else {#2. Constructors with arguments + if (!$symdef_scope) { #2.1 Simple case, outside of \symdef declarations: + #Referencing XMTok when not in \symdefs: + my %ic = ($icvariant ne 'default') ? (ic=>'variant:'.$icvariant) : (); + $document->openElement('ltx:XMApp',%ic,scriptpos=>$prs{'scriptpos'},role=>$prs{'isbound'}); + $document->insertElement('ltx:XMTok',undef,(name=>$cs->toString, meaning=>$name, omcd=>$cd, role=>$role, scriptpos=>$prs{'operator_scriptpos'})); + foreach my $carg (@args) { + if ($carg =~/^LaTeXML::Token/) { + my $stomach = $STATE->getStomach; + $stomach->beginMode('inline-math'); + $carg=$stomach->digest($carg); + $stomach->endMode('inline-math'); + } + $document->openElement('ltx:XMArg'); + $document->absorb($carg); + $document->closeElement('ltx:XMArg'); + } + $document->closeElement('ltx:XMApp'); + } + else { #2.2 Complex case, inside a \symdef declaration + #We need expanded presentation when invoked in \symdef scope: + + #Suppress errors from rendering attributes when absorbing. + #This is bad style, but we have no way around it due to the digestion acrobatics. + my $verbosity = $LaTeXML::Global::STATE->lookupValue('VERBOSITY'); + my $errors = $LaTeXML::Global::STATE->getStatus('error'); + $LaTeXML::Global::STATE->assignValue('VERBOSITY',-5); + + #Absorb presentation: + $document->absorb($localpres); + + #Return to original verbosity and error state: + $LaTeXML::Global::STATE->assignValue('VERBOSITY',$verbosity); + $LaTeXML::Global::STATE->setStatus('error',$errors); + + #Strip all/any wrappers: + #TODO: Ugly LibXML work, possibly do something smarter? + my $parent = $document->getNode; + if(! defined $parent->lookupNamespacePrefix("http://omdoc.org/ns")){ # namespace not already declared? + $document->getDocument->documentElement->setNamespace("http://omdoc.org/ns","omdoc",0); } + my @renderings=$parent->findnodes(".//omdoc:rendering"); + foreach my $render(@renderings) { + my $content=$render; + while ($content && $content->localname =~/^rendering|[X]?Math/) { + $content = $content->firstChild; + } + my $sibling = $content->parentNode->lastChild; + my $localp = $render->parentNode; + while ((defined $sibling) && (!$sibling->isSameNode($content))) { + my $clone = $sibling->cloneNode(1); + $localp->insertAfter($clone,$render); + $sibling = $sibling->previousSibling; + } + $render->replaceNode($content); + } + } + }}, + properties => {name=>$cs->toString, meaning=>$name,omcd=>$cd,role => $role}, + scope=>$scope, + beforeDigest => sub{ + my ($gullet, $variant) = @_; + my $icvariant = ToString($variant); + my $localpres = $presentation; + if ($icvariant && $icvariant ne 'default') { + $localpres = LookupValue($cs->toString."$icvariant:pres"); + if (!$localpres) { + Error("No variant named '$icvariant' found! Falling back to ". + "default.\n Please consider introducing \\symvariant{". + $cs->toString."}[$nargs]{$icvariant}{... your presentation ...}"); + $localpres = $presentation; + } + } + my $count = LookupValue(ToString($cs).'_counter') || 0; + AssignValue(ToString($cs).":pres:$count",$localpres); + AssignValue(ToString($cs).'_counter',$count+1); + return; + }, + afterDigest => sub{ + my ($stomach,$whatsit) = @_; + my $count = LookupValue(ToString($cs).'_aftercounter') || 0; + $whatsit->setProperty('presentation',LookupValue(ToString($cs).":pres:$count")); + AssignValue(ToString($cs).'_aftercounter',$count+1); + }); + return; }); + DefMacro('\symvariant{}[]{}{}', sub { + my($self,@args)=@_; + my $prestok = Invocation(T_CS('\@symvariant@pres'), @args); + pop @args; push @args, $prestok; + Invocation(T_CS('\@symvariant@construct'),@args)->unlist; +}); + DefMacro('\@symvariant@pres{}[]{}{}', sub { + my($self,$cs,$nargs,$ic,$presentation)=@_; + symdef_presentation_pmml($cs,ToString($nargs)||0,$presentation); + }); + DefConstructor('\@symvariant@construct{}[]{}{}', sub { + my($document,$cs,$nargs,$icvariant,$presentation)=@_; + $cs = ToString($cs); + $nargs = ToString($nargs); + $icvariant = ToString($icvariant); + # Save presentation for future reference: + #Notation created by \symdef + #Create the rendering at the right place: + my $cnode = $document->getNode; + my $root = $document->getDocument->documentElement; + my $name = LookupValue("symdef.".ToString($cs).".name") || $cs; + # Fix namespace (the LibXML XPath problems...) + $root->setNamespace("http://omdoc.org/ns","omdoc",0); + my ($notation) = $root->findnodes(".//omdoc:notation[\@name='$name' and ". + "preceding-sibling::omdoc:symbol[1]/\@name + = '$name']"); + if (!$notation) { + #No symdef found, raise error: + Error("No \\symdef found for \\$cs! Please define symbol prior to introducing variants!"); + return; + } + $document->setNode($notation); + $document->absorb($presentation); + $notation->lastChild->setAttribute("ic","variant:$icvariant"); + $document->setNode($cnode); + return; + }, + beforeDigest => sub { + my($gullet,$cs,$nargs,$icvariant,$presentation)=@_; + $cs = ToString($cs); + $icvariant = ToString($icvariant); + AssignValue("$cs:$icvariant:pres",Digest($presentation),'module:'.LookupValue('current_module')); + }); + #mode=>'math' +DefPrimitive('\abbrdef OptionalKeyVals:symdef {}[]{}', sub { + my($stomach,$keys,$cs,$nargs,$presentation)=@_; + my $module = LookupValue('current_module'); + my $scope = (($keys && ($keys->getValue('local') || '' eq 'true')) ? 'module_local' : 'module').":$module"; + DefMacroI("\\".$cs->toString,convertLaTeXArgs($nargs,''),$presentation, + scope=>$scope); + return; }); +DefMacro('\defpath{}{}', sub { + my ($gullet,$arg1,$arg2)=@_; + $arg1 = ToString($arg1); + $arg2 = ToString($arg2); + my $paths = LookupValue('defpath')||{}; + $$paths{"$arg1"}=$arg2; + AssignValue('defpath'=>$paths,'global'); + DefMacro('\\'.$arg1.' Semiverbatim',$arg2."/#1"); + });#$ +DefPrimitive('\requiremodules{}', sub { + my($stomach,$module)=@_; + my $GULLET = $stomach->getGullet; + $module = Digest($module)->toString; + if(LookupValue('file_'.$module.'_loaded')) {} + else { + AssignValue('file_'.$module.'_loaded' => 1, 'global'); + $stomach->bgroup; + AssignValue('last_module_path', $module); + $GULLET->unread(T_CS('\end@requiredmodule')); + AssignValue('excluding_modules' => 1); + $GULLET->input($module,['sms']); + } + return;}); + +DefPrimitive('\end@requiredmodule{}',sub { + #close the group + $_[0]->egroup; + #print STDERR "END: ".ToString(Digest($_[1])->toString); + #Take care of any imported elements in this current module by activating it and all its dependencies + #print STDERR "Important: ".ToString(Digest($_[1])->toString)."\n"; + use_module(ToString(Digest($_[1])->toString)); + return; });#$ +DefPrimitive('\sinput Semiverbatim', sub { + my($stomach,$module)=@_; + my $GULLET = $stomach->getGullet; + $module = Digest($module)->toString; + AssignValue('file_'.$module.'_loaded' => 1, 'global'); + $stomach->bgroup; + AssignValue('last_module_path', $module); + $GULLET->unread(Invocation(T_CS('\end@requiredmodule'),Tokens(Explode($module)))->unlist); + $GULLET->input($module,['tex']); + return;});#$ +DefConstructor('\sinputref{}',""); +DefConstructor('\inputref{}',""); +DefMacro('\@symdef@pres OptionalKeyVals:symdef {}[]{}', sub { + my($self,$keys, $cs,$nargs,$presentation)=@_; + + my($name,$cd,$role)=$keys + && map($_ && $_->toString,map($keys->getValue($_), qw(name cd role))); + $cd = LookupValue('module_cd') unless $cd; + $name = $cs unless $name; + AssignValue('module_name'=>$name) if $name; + $nargs = 0 unless ($nargs); + my $nargkey = ToString($name).'_args'; + AssignValue($nargkey=>ToString($nargs)) if $nargs; + $name=ToString($name); + + Invocation(T_CS('\@symdef@pres@aux'), + $cs, + ($nargs || Tokens(T_OTHER(0))), + symdef_presentation_pmml($cs,ToString($nargs)||0,$presentation), + (Tokens(Explode($name))), + (Tokens(Explode($cd))), + $keys)->unlist; });#$ +sub symdef_presentation_pmml { + my($cs,$nargs,$presentation)=@_; + my @toks = $presentation->unlist; + while(@toks && $toks[0]->equals(T_SPACE)){ shift(@toks); } # Remove leading space + $presentation = Tokens(@toks); + # Wrap with \@use, unless already has a recognized formatter. + my $formatters = join("|",@PresFormatters); + $formatters = qr/$formatters/; + $presentation = Invocation(T_CS('\@use'),$presentation) + unless (@toks && ($toks[0]->toString =~ /^\\($formatters)$/)); + # Low level substitution. + my @args = + map(Invocation(T_CS('\@SYMBOL'),T_OTHER("arg:".($_))),1..$nargs); + $presentation = Tokens(LaTeXML::Expandable::substituteTokens($presentation,@args)); + $presentation; }#$ +sub getSymmdefProperties { + my $cd = LookupValue('module_cd'); + my $name = LookupValue('module_name'); + my $nargkey = ToString($name).'_args'; + my $nargs = LookupValue($nargkey); + $nargs = 0 unless ($nargs); + my %props = ('cd'=>$cd,'name'=>$name,'nargs'=>$nargs); + return %props;} +DefConstructor('\@use{}', sub{ + my ($document,$args,%properties) = @_; + #Notation created at \@symdef@pres@aux + #Create the rendering: + $document->openElement('omdoc:rendering'); + $document->openElement('ltx:Math'); + $document->openElement('ltx:XMath'); + if ($args->isMath) {$document->absorb($args);} + else { $document->insertElement('ltx:XMText',$args);} + $document->closeElement('ltx:XMath'); + $document->closeElement('ltx:Math'); + $document->closeElement('omdoc:rendering'); +}, +properties=>sub { getSymmdefProperties($_[1]);}, + mode=>'inline_math'); +sub get_cd { + my($name,$cd,$role)=@_; + return $cd;} +DefConstructor('\@symdef@pres@aux{}{}{}{}{} OptionalKeyVals:symdef', sub { + my ($document,$cs,$nargs,$pmml,$name,$cd,$keys)=@_; + my $assocarg = ToString($keys->getValue('assocarg')) if $keys; + $assocarg = $assocarg||"0"; + my $bvars = ToString($keys->getValue('bvars')) if $keys; + $bvars = $bvars||"0"; + my $bvar = ToString($keys->getValue('bvar')) if $keys; + $bvar = $bvar||"0"; + my $appElement = 'om:OMA'; $appElement = 'om:OMBIND' if ($bvars || $bvar); + my $root = $document->getDocument->documentElement; + my $name_str = ToString($name); + my ($notation) = $root->findnodes(".//omdoc:notation[\@name='$name_str' and ". + "preceding-sibling::omdoc:symbol[1]/\@name + = '$name_str']"); + if (!$notation) { + $document->insertElement("omdoc:symbol",undef,(name=>$name,"xml:id"=>$name_str.".sym")); + } + $document->openElement("omdoc:notation",(name=>$name,cd=>$cd)); + #First, generate prototype: + $nargs = ToString($nargs)||0; + $document->openElement('omdoc:prototype'); + $document->openElement($appElement) if $nargs; + my $cr="fun" if $nargs; + $document->insertElement('om:OMS',undef, + (cd=>$cd, + name=>$name, + "cr"=>$cr)); + if ($bvar || $bvars) { + $document->openElement('om:OMBVAR'); + if ($bvar) { + $document->insertElement('omdoc:expr',undef,(name=>"arg$bvar")); + } else { + $document->openElement('omdoc:exprlist',(name=>"args")); + $document->insertElement('omdoc:expr',undef,(name=>"arg")); + $document->closeElement('omdoc:exprlist'); + } + $document->closeElement('om:OMBVAR'); + } + for my $id(1..$nargs) { + next if ($id==$bvars || $id==$bvar); + if ($id!=$assocarg) { + my $argname="arg$id"; + $document->insertElement('omdoc:expr',undef,(name=>"$argname")); + } + else { + $document->openElement('omdoc:exprlist',(name=>"args")); + $document->insertElement('omdoc:expr',undef,(name=>"arg")); + $document->closeElement('omdoc:exprlist'); + } + } + $document->closeElement($appElement) if $nargs; + $document->closeElement('omdoc:prototype'); + #Next, absorb rendering: + $document->absorb($pmml); + $document->closeElement("omdoc:notation"); + }, afterDigest=>sub { my ($stomach, $whatsit) = @_; + my $keys = $whatsit->getArg(6); + my $module = LookupValue('current_module'); + $whatsit->setProperties(for=>ToString($whatsit->getArg(1))); + $whatsit->setProperty(role=>($keys ? $keys->getValue('role') + : (ToString($whatsit->getArg(2)) ? 'applied' + : undef))); }); +sub symdef_presentation_TeX { + my($presentation)=@_; + my @tokens = $presentation->unlist; + my(@frag,@frags) = (); + while(my $tok = shift(@tokens)){ + if($tok->equals(T_PARAM)){ + push(@frags,Invocation(T_CS('\@symdef@pres@text'),Tokens(@frag))) if @frag; + @frag=(); + my $n = shift(@tokens)->getString; + push(@frags,Invocation(T_CS('\@symdef@pres@arg'),T_OTHER($n+1))); } + else { + push(@frag,T_OTHER($tok->getString)); }} # IMPORTANT! Neutralize the tokens! + push(@frags,Invocation(T_CS('\@symdef@pres@text'),Tokens(@frag))) if @frag; + Tokens(map($_->unlist,@frags)); } +DefConstructor('\@symdef@pres@arg{}', "", + afterDigest=>sub { my ($stomach, $whatsit) = @_; + my $select = $whatsit->getArg(1); + $select = ref $select ? $select->toString : ''; + $whatsit->setProperty(select=>"*[".$select."]"); }); +DefConstructor('\@symdef@pres@text{}', "#1"); +DefConstructor('\requirepackage{} Semiverbatim',"", + afterDigest=>sub { my ($stomach, $whatsit) = @_; + my $select = $whatsit->getArg(1); + RequirePackage($select->toString); });#$ +DefKeyVal('view','id','Semiverbatim'); +DefEnvironment('{view} OptionalKeyVals:view {}{}', + "" + . "#body" + .""); +Tag('omdoc:recurse',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:imports',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:theory',afterOpen=>\&numberIt,afterClose=>\&locateIt); +1; diff --git a/Master/texmf-dist/tex/latex/stex/omdoc/omdoc.cls b/Master/texmf-dist/tex/latex/stex/omdoc/omdoc.cls new file mode 100644 index 00000000000..6cb3c77a74b --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/omdoc/omdoc.cls @@ -0,0 +1,28 @@ +%% +%% This is file `omdoc.cls', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% omdoc.dtx (with options: `cls') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesClass{omdoc}[2012/01/28 v1.0 OMDoc Documents] +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\def\omdoc@class{article} +\DeclareOption{report}{\def\omdoc@class{report}\PassOptionsToPackage{\CurrentOption}{omdoc}} +\DeclareOption{book}{\def\omdoc@class{book}\PassOptionsToPackage{\CurrentOption}{omdoc}} +\DeclareOption{chapter}{\PassOptionsToPackage{\CurrentOption}{omdoc}} +\DeclareOption{part}{\PassOptionsToPackage{\CurrentOption}{omdoc}} +\DeclareOption{showignores}{\PassOptionsToPackage{\CurrentOption}{omdoc}} +\DeclareOption{extrefs}{\PassOptionsToPackage{\CurrentOption}{sref}} +\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} +\ProcessOptions +\LoadClass{\omdoc@class} +\RequirePackage{omdoc} +\let\orig@document=\document +\srefaddidkey{document} +\renewcommand{\document}[1][]{\metasetkeys{document}{#1}\orig@document} +\endinput +%% +%% End of file `omdoc.cls'. diff --git a/Master/texmf-dist/tex/latex/stex/omdoc/omdoc.cls.ltxml b/Master/texmf-dist/tex/latex/stex/omdoc/omdoc.cls.ltxml new file mode 100644 index 00000000000..56d43b7138e --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/omdoc/omdoc.cls.ltxml @@ -0,0 +1,58 @@ +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +use LaTeXML::Util::Pathname; +use Cwd qw(cwd abs_path); +DeclareOption('report',sub {PassOptions('omdoc','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('book',sub {PassOptions('omdoc','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('chapter',sub {PassOptions('omdoc','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('part',sub {PassOptions('omdoc','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('showignores',sub {PassOptions('omdoc','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption('extrefs',sub {PassOptions('sref','sty',ToString(Digest(T_CS('\CurrentOption')))); }); +DeclareOption(undef,sub {PassOptions('article','cls',ToString(Digest(T_CS('\CurrentOption')))); }); +ProcessOptions(); +LoadClass('article'); +RequirePackage('sref'); +RegisterNamespace('omdoc'=>"http://omdoc.org/ns"); +RegisterNamespace('om'=>"http://www.openmath.org/OpenMath"); +RegisterNamespace('m'=>"http://www.w3.org/1998/Math/MathML"); +RegisterNamespace('dc'=>"http://purl.org/dc/elements/1.1/"); +RegisterNamespace('cc'=>"http://creativecommons.org/ns"); +RegisterNamespace('stex'=>"http://kwarc.info/ns/sTeX"); +RegisterNamespace('ltx'=>"http://dlmf.nist.gov/LaTeXML"); +RelaxNGSchema('omdoc+ltxml', + '#default'=>"http://omdoc.org/ns", + 'om'=>"http://www.openmath.org/OpenMath", + 'm'=>"http://www.w3.org/1998/Math/MathML", + 'dc'=>"http://purl.org/dc/elements/1.1/", + 'cc'=>"http://creativecommons.org/ns", + 'stex'=>"http://kwarc.info/ns/sTeX", + 'ltx'=>"http://dlmf.nist.gov/LaTeXML"); +RequirePackage('omdoc'); +sub xmlBase { + my $baseuri = LookupValue('baseuri'); + my $baselocal = LookupValue('baselocal'); + my $cdir = abs_path(cwd()); + $cdir =~ s/^$baselocal// if $baselocal; + #DG: Make this more robust! + my ($d,$f,$t); + my $srcf = LookupValue('SOURCEFILE'); + if ( $srcf =~ /^(\w+):\/\//) { + $srcf =~ s/^(\w+):\///; + } # TODO: Hacky, do something better + ($d, $f,$t) = pathname_split(LookupValue('SOURCEFILE')); + $t = '' if LookupValue('cooluri'); + Tokenize($baseuri.$cdir.'/'.$f.$t); } +DefEnvironment('{document} OptionalKeyVals:omdoc', + "" + . "#body" + ."", + beforeDigest=> sub { AssignValue(inPreamble=>0); }, + afterDigest=> sub { $_[0]->getGullet->flush; return; });#$ +1; diff --git a/Master/texmf-dist/tex/latex/stex/omdoc/omdoc.sty b/Master/texmf-dist/tex/latex/stex/omdoc/omdoc.sty new file mode 100644 index 00000000000..54f275d7c46 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/omdoc/omdoc.sty @@ -0,0 +1,85 @@ +%% +%% This is file `omdoc.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% omdoc.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{omdoc}[2012/01/28 v1.0 OMDoc document Structure] +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\newif\if@chapter\@chapterfalse +\newif\if@part\@partfalse +\newcount\section@level\section@level=3 +\newif\ifshow@ignores\show@ignoresfalse +\def\omdoc@class{article} +\DeclareOption{report}{\def\omdoc@class{report}\section@level=2} +\DeclareOption{book}{\def\omdoc@class{book}\section@level=1} +\DeclareOption{chapter}{\section@level=2\@chaptertrue} +\DeclareOption{part}{\section@level=1\@chaptertrue\@parttrue} +\DeclareOption{showignores}{\show@ignorestrue} +\DeclareOption{extrefs}{\PassOptionsToPackage{\CurrentOption}{sref}} +\ProcessOptions +\RequirePackage{sref} +\RequirePackage{xspace} +\RequirePackage{comment} +\def\level@section#1{\ifcase#1\or{part}\or{chapter}\or{section}\or{subsection}\or{subsubsection}\or{paragraph}\or{subparagraph}\fi} +\def\Level@Section#1{\ifcase#1\or{Part}\or{Chapter}\or{Section}\or{Subsection}\or{Subsubsection}\or{Paragraph}\or{Subparagraph}\fi} +\def\in@level@section#1{\ifcase#1\or{this document}\or{part}\or{chapter}\or{section}\or{subsection}\or{subsubsection}\or{paragraph}\or{subparagraph}\fi} +\def\In@Level@Section#1{\ifcase#1\or{This document}\or{Part}\or{Chapter}\or{Section}\or{Subsection}\or{Subsubsection}\or{Paragraph}\or{Subparagraph}\fi} +\def\currentsectionlevel{\in@level@section\section@level\xspace} +\def\CurrentSectionLevel{\In@Level@Section\section@level\xspace} +\srefaddidkey{omgroup} +\addmetakey{omgroup}{creators} +\addmetakey{omgroup}{date} +\addmetakey{omgroup}{contributors} +\addmetakey{omgroup}{type} +\addmetakey*{omgroup}{short} +\addmetakey*{omgroup}{display} +\def\at@begin@omgroup#1{} +\newenvironment{omgroup}[2][]% keys, title +{\metasetkeys{omgroup}{#1}\sref@target% +\ifx\omgroup@display\st@flow\noindent{\Large\textbf{#2}\\[.3ex]\noindent\ignorespaces}% +\else% +\if@part\ifnum\section@level=1\part{#2}\sref@label@id{Part \thepart}\fi\fi% +\if@chapter\ifnum\section@level=2\chapter{#2}\sref@label@id{Chapter \thechapter}\fi\fi% +\ifnum\section@level=3\section{#2}\sref@label@id{Section \thesection}\fi% +\ifnum\section@level=4\subsection{#2}\sref@label@id{Subsection \thesubsection}\fi% +\ifnum\section@level=5\subsubsection{#2}\sref@label@id{Subsubsection \thesubsubsection}\fi% +\ifnum\section@level=6\paragraph{#2}\sref@label@id{this paragraph}\fi% +\ifnum\section@level=7\subparagraph{#2}\sref@label@id{this subparagraph}\fi% +\at@begin@omgroup\section@level% for customization +\advance\section@level by 1% +\fi}{\advance\section@level by -1} +\providecommand\printindex{\IfFileExists{\jobname.ind}{\input{\jobname.ind}}{}} +\ifshow@ignores +\addmetakey{ignore}{type} +\addmetakey{ignore}{comment} +\newenvironment{ignore}[1][] +{\metasetkeys{ignore}{#1}\textless\ignore@type\textgreater\bgroup\itshape} +{\egroup\textless/\ignore@type\textgreater} +\renewenvironment{ignore}{}{}\else\excludecomment{ignore}\fi +\long\def\STRlabel#1#2{\STRlabeldef{#1}{#2}{#2}} +\def\STRcopy#1{\expandafter\ifx\csname STR@#1\endcsname\relax +\message{STR warning: reference #1 undefined!} +\else\csname STR@#1\endcsname\fi} +\newcommand{\STRsemantics}[3][]{#2\def\@test{#1}\ifx\@test\@empty\STRlabeldef{#1}{#2}\fi} +\def\STRlabeldef#1{\expandafter\gdef\csname STR@#1\endcsname} +\def\black#1{\textcolor{black}{#1}} +\def\gray#1{\textcolor{gray}{#1}} +\def\blue#1{\textcolor{blue}{#1}} +\def\red#1{\textcolor{red}{#1}} +\def\green#1{\textcolor{green}{#1}} +\def\cyan#1{\textcolor{cyan}{#1}} +\def\magenta#1{\textcolor{magenta}{#1}} +\def\brown#1{\textcolor{brown}{#1}} +\def\yellow#1{\textcolor{yellow}{#1}} +\def\orange#1{\textcolor{orange}{#1}} +\newcommand\hateq{\ensuremath{\hat=}\xspace} +\newcommand\hatequiv{\ensuremath{\hat\equiv}\xspace} +\newcommand\textleadsto{\ensuremath{\leadsto}\xspace} +\newcommand{\baseURI}[2][]{} +\endinput +%% +%% End of file `omdoc.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/omdoc/omdoc.sty.ltxml b/Master/texmf-dist/tex/latex/stex/omdoc/omdoc.sty.ltxml new file mode 100644 index 00000000000..207a53b6f2b --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/omdoc/omdoc.sty.ltxml @@ -0,0 +1,67 @@ +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +use Cwd qw(cwd abs_path); +DeclareOption('report',''); +DeclareOption('book',''); +DeclareOption('chapter',''); +DeclareOption('part',''); +DeclareOption('showignores',''); +DeclareOption('extrefs',''); +RequirePackage('sref'); +RequirePackage('xspace'); +RequirePackage('omtext'); +DefEnvironment('{omgroup} OptionalKeyVals:omgroup {}', + "\n" + . "#2\n" + . "#body\n" + . ""); +DefConstructor('\printindex',''); +DefConstructor('\tableofcontents',""); +DefConstructor('\bibliography{}',""); +DefKeyVal('ignore','type','Semiverbatim'); +DefKeyVal('ignore','comment','Semiverbatim'); +DefEnvironment('{ignore} OptionalKeyVals:ignore', + "#body"); +DefConstructor('\STRlabel{}{}', sub { + my($document,$label,$object)=@_; + $document->absorb($object); + $document->addAttribute('xml:id'=>ToString($label)) if $label; }); +DefConstructor('\STRcopy{}',""); +DefConstructor('\STRsemantics[]{}{}', sub { + my($document,$label,$ignore,$object)=@_; + $document->absorb($object); + $document->addAttribute('xml:id'=>ToString($label)) if $label; }); +DefMacro('\STRlabeldef{}{}', ""); +sub omdocColorMacro { + my ($color, @args) = @_; + my $tok_color = TokenizeInternal($color); + (T_BEGIN, T_CS('\@omdoc@color'), T_BEGIN, $tok_color->unlist, + T_END, T_CS('\@omdoc@color@content'), T_OTHER('['), $tok_color->unlist, T_OTHER(']'), + T_BEGIN, $args[1]->unlist, T_END, T_END); } +DefMacro('\@omdoc@color{}', sub { MergeFont(color=>$_[1]->toString); return; });#$ +DefConstructor('\@omdoc@color@content[]{}', + "?#isMath(#2)(#2)"); +foreach my $color(qw(black gray blue red green cyan magenta brown yellow orange)) { + DefMacro("\\".$color.'{}', sub { omdocColorMacro($color, @_); }); }#$ +DefConstructor('\newpage',''); +Tag('omdoc:ignore',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:ref',afterOpen=>\&numberIt,afterClose=>\&locateIt); +DefConstructor('\hateq',"\x{2259}"); +DefConstructor('\hatequiv',"\x{2A6F}"); +DefConstructor('\textleadsto',"\x{219D}"); +DefMacro('\baseURI []Semiverbatim', sub { + if (LookupValue('SOURCEFILE')!~/^(\w+):\/\//) { + my $baselocal = ToString(Expand($_[1])); + $baselocal = abs_path($baselocal) unless $baselocal=~/^(\w+):\/\//; + AssignValue('baselocal'=>$baselocal); + AssignValue('baseuri'=>ToString(Expand($_[2])));} + else { + AssignValue('baselocal'=>undef); + AssignValue('baseuri'=>ToString(Expand($_[2]))); + }}); +DefConstructor('\url Semiverbatim',"#1"); +DefConstructor('\href Semiverbatim {}',"#2"); +1; diff --git a/Master/texmf-dist/tex/latex/stex/omtext/omtext.sty b/Master/texmf-dist/tex/latex/stex/omtext/omtext.sty new file mode 100644 index 00000000000..d57be46a147 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/omtext/omtext.sty @@ -0,0 +1,96 @@ +%% +%% This is file `omtext.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% omtext.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{omtext}[2012/01/28 v1.0 OMDoc Text Fragments] +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\newif\ifindex\indextrue +\DeclareOption{noindex}{\indexfalse} +\ProcessOptions +\ifindex\makeindex\fi +\RequirePackage{sref} +\RequirePackage{comment} +\srefaddidkey{omtext} +\addmetakey[]{omtext}{functions} +\addmetakey*{omtext}{display} +\addmetakey{omtext}{for} +\addmetakey{omtext}{from} +\addmetakey{omtext}{type} +\addmetakey*{omtext}{title} +\addmetakey*{omtext}{start} +\addmetakey{omtext}{theory} +\addmetakey{omtext}{continues} +\addmetakey{omtext}{verbalizes} +\addmetakey{omtext}{subject} +\def\st@flow{flow} +\def\omtext@pre@skip{\smallskip} +\def\omtext@post@skip{} +\providecommand{\stDMemph}[1]{\textbf{#1}} +\newenvironment{omtext}[1][]{\bgroup\metasetkeys{omtext}{#1}\sref@label@id{this paragraph}% +\def\lec##1{\@lec{##1}} +\ifx\omtext@display\st@flow\else\omtext@pre@skip\par\noindent% +\ifx\omtext@title\@empty\else\stDMemph{\omtext@title}: \fi\fi\ignorespaces} +{\egroup\omtext@post@skip} +\srefaddidkey{phrase} +\addmetakey{phrase}{style} +\addmetakey{phrase}{class} +\addmetakey{phrase}{index} +\addmetakey{phrase}{verbalizes} +\addmetakey{phrase}{type} +\newenvironment{phrase}[1][]{\metasetkeys{phrase}{#1}}{} +\def\nlex#1{\green{\sl{#1}}} +\def\nlcex#1{*\green{\sl{#1}}} +\def\@sinlinequote#1{``{\sl{#1}}''} +\def\@@sinlinequote#1#2{\@sinlinequote{#2}~#1} +\newcommand{\sinlinequote}[2][] +{\def\@opt{#1}\ifx\@opt\@empty\@sinlinequote{#2}\else\@@sinlinequote\@opt{#2}\fi} +\def\begin@sblockquote{\begin{quote}\sl} +\def\end@sblockquote{\end{quote}} +\def\begin@@sblockquote#1{\begin@sblockquote} +\def\end@@sblockquote#1{\def\@@lec##1{{\rm ##1}}\@lec{#1}\end@sblockquote} +\newenvironment{sblockquote}[1][] + {\def\@opt{#1}\ifx\@opt\@empty\begin@sblockquote\else\begin@@sblockquote\@opt\fi} + {\ifx\@opt\@empty\end@sblockquote\else\end@@sblockquote\@opt\fi} +\providecommand{\@@lec}[1]{(#1)} +\def\@lec#1{\strut\hfil\strut\null\nobreak\hfill\hbox{\@@lec{#1}}} +\def\lec#1{\@lec{#1}\par} +\newcommand\mygraphics[2][]{\includegraphics[#1]{#2}} +\newcommand\mycgraphics[2][]{\begin{center}\includegraphics[#1]{#2}\end{center}} +\newcommand\mybgraphics[2][]{\fbox{\includegraphics[#1]{#2}\end{center}}} +\newcommand{\omdoc@index}[2][]{\ifindex\def\@test{#1}%% +\ifx\@test\@empty\def\@@idx{#2}\else\def\@@idx{#1}\fi% +\@ifundefined{mod@id}{\index{\@@idx @#2}}% +{\index{\@@idx @{\importmodule{\mod@id} #2}}\fi}} +\newcommand{\indexalt}[3][]{{#2}\omdoc@index[#1]{#3}} % word in text and index +\newcommand{\indextoo}[2][]{{#2}\omdoc@index[#1]{#2}} % word in text and index +\newcommand{\@twin}[3][]{\ifindex\def\@test{#1}%% +\ifx\@test\@empty\def\@@idx{#2}\else\def\@@idx{#1}\fi% +\@ifundefined{mod@id} +{\index{\@@idx @#2!#3}% +\ifx\@test\@empty\def\@@idx{#3}\else\def\@@idx{#1}\fi% +\index{\@@idx @#2!#3}}% +{\index{\@@idx @{\importmodule{\mod@id} #2}!{\importmodule{\mod@id} #3}}% +\ifx\@test\@empty\def\@@idx{#3}\else\def\@@idx{#1}\fi% +\index{\@@idx @{\importmodule{\mod@id} #3}!{\importmodule{\mod@id} #2}}\fi}} +\newcommand{\twinalt}[4][]{#2\@twin[#1]{#3}{#4}} +\newcommand{\twintoo}[3][]{{#2 #3}\@twin[#1]{#2}{#3}} % and use the word compound too +\newcommand{\@atwin}[4][]{\ifindex\def\@test{#1}%% +\ifx\@test\@empty\def\@@idx{#2}\else\def\@@idx{#1}\fi% +\@ifundefined{mod@id}% +{\index{\@@idx @#2!#3!#4}% +\ifx\@test\@empty\def\@@idx{#3}\else\def\@@idx{#1}\fi +\index{\@@idx @#3!#2 (#4)}}% +{\index{\@@idx @{\importmodule{\mod@id} #2}!{\importmodule{\mod@id} #3}!{\importmodule{\mod@id} #4}} +\ifx\@test\@empty\def\@@idx{#3}\else\def\@@idx{#1}\fi% +\index{\@@idx @{\importmodule{\mod@id} #3}!{\importmodule{\mod@id} #2} ({\importmodule{\mod@id} #4})}\fi}} +\newcommand{\atwinalt}[5][]{#2\@atwin[#1]{#3}{#4}{#4}} +\newcommand{\atwintoo}[4][]{{#2 #3 #4}\@atwin[#1]{#2}{#3}{#4}} % and use it too +\def\omspace#1{\hspace*{#1}} +\endinput +%% +%% End of file `omtext.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/omtext/omtext.sty.ltxml b/Master/texmf-dist/tex/latex/stex/omtext/omtext.sty.ltxml new file mode 100644 index 00000000000..7d781b74e53 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/omtext/omtext.sty.ltxml @@ -0,0 +1,223 @@ +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +use Cwd qw(cwd abs_path); +DeclareOption('noindex',''); +RequirePackage('sref'); +Tag('omdoc:metadata',afterOpen=>\&numberIt,afterClose=>\&locateIt,autoClose=>1,autoOpen=>1); +sub declareFunctions{ + my ($stomach,$whatsit) = @_; + my $keyval = $whatsit->getArg(1); + my $funval = KeyVal($keyval,'functions') if KeyVal($keyval,'functions'); + my @funsymbs = ParseKeyValList($funval); + #Unread the function declarations at the Gullet + foreach (@funsymbs) { + $stomach->getGullet->unread(Tokenize('\lxDeclare[role=FUNCTION]{$'.$_.'$}')->unlist); + } + return; +} +Tag('omdoc:CMP', afterOpen => sub {AssignValue('_LastSeenCMP', $_[1], 'global');return;});#$ +DefParameterType('IfBeginFollows', sub { + my ($gullet) = @_; + $gullet->skipSpaces; + my $next = $gullet->readToken; + $gullet->unread($next); + $next = ToString($next); + #Hm, falling back to regexp handling, the $gullet->ifNext approach didn't work properly + return 1 unless ($next=~/^\\begin/); + return; + }, + reversion=>'', optional=>1); +DefKeyVal('omtext','functions','Undigested'); +DefKeyVal('omtext','display','Semiverbatim'); +DefKeyVal('omtext','for','Semiverbatim'); +DefKeyVal('omtext','from','Semiverbatim'); +DefKeyVal('omtext','type','Semiverbatim'); +DefKeyVal('omtext','title','Plain'); #Math mode in titles. +DefKeyVal('omtext','start','Plain'); #Math mode in start phrases +DefKeyVal('omtext','theory','Semiverbatim'); +DefKeyVal('omtext','continues','Semiverbatim'); +DefKeyVal('omtext','verbalizes','Semiverbatim'); +DefEnvironment('{omtext} OptionalKeyVals:omtext', + "" + . "?&KeyVal(#1,'title')(&KeyVal(#1,'title'))()" + . "" + . "?&KeyVal(#1,'start')(&KeyVal(#1,'start'))()" + . "#body" + .""); +sub DefCMPEnvironment { + my ($proto, $replacement, %options) = @_; + my @before = $options{beforeDigest} ? ($options{beforeDigest}) : (); + push(@before, \&useCMPItemizations); + $options{beforeDigest} = \@before; + my @after = $options{afterDigestBegin} ? ($options{afterDigestBegin}) : (); + push(@after, \&declareFunctions); + $options{afterDigestBegin} = \@after; + DefEnvironment($proto, $replacement, %options); +} +sub DefCMPConstructor { + my ($proto, $replacement, %options) = @_; + my @before = $options{beforeDigest} ? ($options{beforeDigest}) : (); + push(@before, \&useCMPItemizations); + $options{beforeDigest} = \@before; + DefConstructor($proto, $replacement, %options); +}#$ +DefKeyVal('phrase','id','Semiverbatim'); +DefKeyVal('phrase','style','Semiverbatim'); +DefKeyVal('phrase','class','Semiverbatim'); +DefKeyVal('phrase','index','Semiverbatim'); +DefKeyVal('phrase','verbalizes','Semiverbatim'); +DefKeyVal('phrase','type','Semiverbatim'); +DefConstructor('\phrase OptionalKeyVals:phrase {}', + "#2"); +DefConstructor('\nlex{}', + "#1"); +DefConstructor('\nlcex{}', + "#1"); +DefConstructor('\sinlinequote [] {}', + "" + . "?#1(#1\n)()" + . "#2" + . ""); +DefEnvironment('{sblockquote} []', + "?#1(" + . "#1" + . "#body" + . " )" + . "(#body)"); +DefConstructor('\lec{}', + "\n#1"); +RawTeX(' +\newcommand\mygraphics[2][]{\includegraphics[#1]{#2}} +\newcommand\mycgraphics[2][]{\begin{center}\includegraphics[#1]{#2}\end{center}} +\newcommand\mybgraphics[2][]{\fbox{\includegraphics[#1]{#2}\end{center}}} +'); +DefConstructor('\indextoo[]{}', + "" + . "#2" + . "" + . "#2" + . "" + .""); +DefConstructor('\indexalt[]{}{}', + "" + . "#2" + . "" + . "#3" + . "" + .""); +DefConstructor('\twintoo[]{}{}', + "" + . "#2 #3" + . "" + . "#2" + . "#3" + . "" + .""); +DefConstructor('\twinalt[]{}{}{}', + "" + . "#2" + . "" + . "#2" + . "#3" + . "" + .""); +DefConstructor('\atwintoo[]{}{}{}', + "" + . "#2 #3" + . "" + . "#2" + . "#3" + . "#4" + . "" + .""); + +DefConstructor('\atwinalt[]{}{}{}{}', + "" + . "#2" + . "" + . "#2" + . "#3" + . "#4" + . "" + .""); +# needed? DefConstructor('\par',sub { $_[0]->maybeCloseElement('ltx:p'); },alias=>"\\par\n"); +Tag('omdoc:CMP', autoClose=>1, autoOpen=>1); +Tag('omdoc:omtext', autoClose=>1, autoOpen=>1); +DefConstructor('\footnote[]{}', + "#2"); +DefConstructor('\footnotemark[]',""); +DefConstructor('\footnotetext[]{}', + "#2"); +Tag('omdoc:omtext',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:omgroup',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:CMP',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:idx',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:ide',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:idt',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:note',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:metadata',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:meta',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:resource',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('ltx:p',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('ltx:tabular',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('ltx:thead',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('ltx:td',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('ltx:tr',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('ltx:caption',afterOpen=>\&numberIt,afterClose=>\&locateIt); +sub numberIt { + my($document,$node,$whatsit)=@_; + my(@parents)=$document->findnodes('ancestor::*[@xml:id]',$node); + my $prefix= (@parents ? $parents[$#parents]->getAttribute('xml:id')."." : ''); + my(@siblings)=$document->findnodes('preceding-sibling::*[@xml:id]',$node); + my $n = scalar(@siblings)+1; + my $id = ($node -> getAttribute('xml:id')); + my $localname = $node->localname; + $node->setAttribute('xml:id'=>$prefix."$localname$n") unless $id; + my $about = $node -> getAttribute('about'); + $node->setAttribute('about'=>'#'.$node->getAttribute('xml:id')) unless $about; + #Also, provide locators: + my $locator = $whatsit->getProperty('locator'); + #Need to inherit locators if missing: + $locator = (@parents ? $parents[$#parents]->getAttribute('stex:srcref') : '') unless $locator; + if ($locator) { + # There is a BUG with namespace declarations (or am I using the API wrongly??) which + # does not recognize the stex namespace. Hence, I need to redeclare it... + my $parent=$document->getNode; + if(! defined $parent->lookupNamespacePrefix("http://kwarc.info/ns/sTeX")) + { # namespace not already declared? + $document->getDocument->documentElement->setNamespace("http://kwarc.info/ns/sTeX","stex",0); + } + $node->setAttribute('stex:srcref'=>$locator); + }return;} + +sub locateIt { + my($document,$node,$whatsit)=@_; + #Estimate trailer locator: + my $trailer = $whatsit->getProperty('trailer'); + return unless $trailer; #Nothing we can do if the trailer isn't defined + $trailer = $trailer->getLocator; + return unless ($trailer && $trailer!~/^\s*$/); #Useless if broken + my $locator = $node->getAttribute('stex:srcref'); + if ($locator) { + $locator =~ /^(.+from=\d+;\d+)/; + my $from = $1; + $trailer =~ /(,to=\d+;\d+.+)$/; + my $to = $1; + $locator = $from.$to; + } else { + $locator = $trailer; #This should never happen + } + my $parent = $document->getNode; + if(! defined $parent->lookupNamespacePrefix("http://kwarc.info/ns/sTeX")) + { # namespace not already declared? + $document->getDocument->documentElement->setNamespace("http://kwarc.info/ns/sTeX","stex",0); + } + $node->setAttribute('stex:srcref' => $locator); + return; +} +1; diff --git a/Master/texmf-dist/tex/latex/stex/presentation/presentation.sty b/Master/texmf-dist/tex/latex/stex/presentation/presentation.sty new file mode 100644 index 00000000000..0b0362bf30c --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/presentation/presentation.sty @@ -0,0 +1,157 @@ +%% +%% This is file `presentation.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% presentation.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{presentation}[2012/01/28 v1.0 presentation for semantic macros] +\ProcessOptions +\RequirePackage{keyval}[1997/11/10] +\def\pres@default@precedence{0} +\def\pres@infty{1000000} +\def\iprec{\pres@infty} +\def\niprec{-\pres@infty} +\def\pres@initial@precedence{0} +\def\pres@current@precedence{\pres@initial@precedence} +\def\pres@default@lbrack{(}\def\pres@lbrack{\pres@default@lbrack} +\def\pres@default@rbrack{)}\def\pres@rbrack{\pres@default@rbrack} +\def\PrecSet#1{\def\pres@default@precedence{#1}} +\def\PrecWrite#1{\ifnum\pres@p>\pres@current@precedence\else{#1}\fi} +\def\prepost@clearkeys{\def\pres@p@key{\pres@default@precedence}\def\pres@pi@key{\niprec} +\def\pres@lbrack{\pres@default@lbrack}\def\pres@rbrack{\pres@default@rbrack}} +\define@key{prepost}{lbrack}{\def\pres@lbrack{#1}} +\define@key{prepost}{rbrack}{\def\pres@lbrack{#1}} +\define@key{prepost}{p}{\def\pres@p@key{#1}} +\define@key{prepost}{pi}{\def\pres@pi@key{#1}} +\newcommand{\prefix}[3][]%key, fn, arg +{\prepost@clearkeys\setkeys{prepost}{#1} +{#2}\pres@lbrack{\edef\pres@current@precedence{\pres@pi@key}#3}\pres@rbrack} +\newcommand{\postfix}[3][]%key, fn, arg +{\prepost@clearkeys\setkeys{prepost}{#1} +\pres@lbrack{\edef\pres@current@precedence{\pres@pi@key}#3}\pres@rbrack{#2}} +\newcommand{\funapp}[2]{\prefix{#1}{#2}} +\def\clearkeys{\let\pres@p@key=\relax +\let\pres@pi@key=\relax% +\let\pres@pi@key=\relax% +\let\pres@pii@key=\relax% +\let\pres@piii@key=\relax} +\define@key{mi}{nobrackets}[yes]{\def\pres@p@key{\pres@infty}% +\def\pres@pi@key{-\pres@infty}} +\define@key{mi}{lbrack}{\def\pres@lbrack@key{#1}} +\define@key{mi}{rbrack}{\def\pres@lbrack@key{#1}} +\define@key{mi}{p}{\def\pres@p@key{#1}} +\define@key{mi}{pi}{\def\pres@pi@key{#1}} +\def\prep@keys@mi% +{\edef\pres@lbrack{\@ifundefined{pres@lbrack@key}\pres@default@lbrack\pres@lbrack@key} +\edef\pres@rbrack{\@ifundefined{pres@rbrack@key}\pres@default@rbrack\pres@rbrack@key} +\edef\pres@p{\@ifundefined{pres@p@key}\pres@default@precedence\pres@p@key} +\edef\pres@pi{\@ifundefined{pres@pi@key}\pres@p\pres@pi@key}} +\newcommand{\mixfixi}[4][]%key, pre, arg, post +{\clearkeys\setkeys{mi}{#1}\prep@keys@mi% +\PrecWrite\pres@lbrack% +#2{\edef\pres@current@precedence{\pres@pi}#3}#4% +\PrecWrite\pres@rbrack} +\def\@assoc#1#2#3{% precedence, function, argv +\let\@tmpop=\relax% do not print the function the first time round +\@for\@I:=#3\do{\@tmpop% print the function +{\edef\pres@current@precedence{#1}\@I}% +\let\@tmpop=#2}}%update the function +\newcommand{\mixfixa}[5][]%key, pre, arg, post, assocop +{\clearkeys\setkeys{mi}{#1}\prep@keys@mi% +\PrecWrite\pres@lbrack{#2}{\@assoc\pres@pi{#5}{#3}}{#4}\PrecWrite\pres@rbrack} +\define@key{mii}{nobrackets}[yes]{\def\pres@p@key{\pres@infty}% +\def\pres@pi@key{-\pres@infty}\def\pres@pii@key{-\pres@infty}} +\define@key{mii}{lbrack}{\def\pres@lbrack@key{#1}} +\define@key{mii}{rbrack}{\def\pres@lbrack@key{#1}} +\define@key{mii}{p}{\def\pres@p@key{#1}} +\define@key{mii}{pi}{\def\pres@pi@key{#1}} +\define@key{mii}{pii}{\def\pres@pii@key{#1}} +\def\prep@keys@mii{\prep@keys@mi% +\edef\pres@pii{\@ifundefined{pres@pii@key}\pres@p\pres@pii@key}} +\newcommand{\mixfixii}[6][]%key, pre, arg1, mid, arg2, post +{\clearkeys\setkeys{mii}{#1}\prep@keys@mii% +\PrecWrite\pres@lbrack% write bracket if necessary +#2{\edef\pres@current@precedence{\pres@pi}#3}% +#4{\edef\pres@current@precedence{\pres@pii}#5}#6% +\PrecWrite\pres@rbrack} +\newcommand{\mixfixia}[7][]%key, pre, arg1, mid, arg2, post, assocop +{\clearkeys\setkeys{mii}{#1}\prep@keys@mii% +\PrecWrite\pres@lbrack% write bracket if necessary +#2{\edef\pres@current@precedence{\pres@pi}#3}% +#4{\@assoc\pres@pii{#7}{#5}}#6% +\PrecWrite\pres@rbrack} +\newcommand{\mixfixai}[7][]%key, pre, arg1, mid, arg2, post, assocop +{\clearkeys\setkeys{mii}{#1}\prep@keys@mii% +\PrecWrite\pres@lbrack% write bracket if necessary +#2{\@assoc\pres@pi{#7}{#3}}% +#4{\edef\pres@current@precedence{\pres@pii}#5}#6% +\PrecWrite\pres@rbrack} +\define@key{miii}{nobrackets}[yes]{\def\pres@p@key{\pres@infty}% +\def\pres@pi@key{-\pres@infty} +\def\pres@pii@key{-\pres@infty} +\def\pres@pii@key{-\pres@infty}} +\define@key{miii}{lbrack}{\def\pres@lbrack@key{#1}} +\define@key{miii}{rbrack}{\def\pres@lbrack@key{#1}} +\define@key{miii}{p}{\def\pres@p@key{#1}} +\define@key{miii}{pi}{\def\pres@pi@key{#1}} +\define@key{miii}{pii}{\def\pres@pii@key{#1}} +\define@key{miii}{piii}{\def\pres@piii@key{#1}} +\def\prep@keys@miii{\prep@keys@mii% +\edef\pres@piii{\@ifundefined{pres@piii@key}{\pres@p}{\pres@piii@key}}} +\newcommand{\mixfixiii}[8][]%key, pre, arg1, mid1, arg2, mid2, arg3, post +{\clearkeys\setkeys{miii}{#1}\prep@keys@miii% +\PrecWrite\pres@lbrack% write bracket if necessary +#2{\edef\pres@current@precedence{\pres@pi}#3}% +#4{\edef\pres@current@precedence{\pres@pii}#5}% +#6{\edef\pres@current@precedence{\pres@pii}#7}#8% +\PrecWrite\pres@rbrack} +\newcommand{\mixfixaii}[9][]%key, pre, arg1, mid1, arg2, mid2, arg3, post, sep +{\clearkeys\setkeys{miii}{#1}\prep@keys@miii% +\PrecWrite\pres@lbrack% write bracket if necessary +#2{\@assoc\pres@pi{#9}{#3}}% +#4{\edef\pres@current@precedence{\pres@pii}#5}% +#6{\edef\pres@current@precedence{\pres@pii}#7}#8% +\PrecWrite\pres@rbrack} +\newcommand{\mixfixiai}[9][]%key, pre, arg1, mid1, arg2, mid2, arg3, post, assocop +{\clearkeys\setkeys{miii}{#1}\prep@keys@miii% +\PrecWrite\pres@lbrack% write bracket if necessary +#2{\edef\pres@current@precedence{\pres@pi}#3}% +#4{\@assoc\pres@pi{#9}{#5}}% +#6{\edef\pres@current@precedence{\pres@pii}#7}#8% +\PrecWrite\pres@rbrack} +\newcommand{\mixfixiia}[9][]%key, pre, arg1, mid1, arg2, mid2, arg3, post,assocop +{\clearkeys\setkeys{miii}{#1}\prep@keys@miii% +\PrecWrite\pres@lbrack% write bracket if necessary +#2{\edef\pres@current@precedence{\pres@pi}#3}% +#4{\edef\pres@current@precedence{\pres@pii}#5}% +#6{\@assoc\pres@pi{#9}{#7}}#8% +\PrecWrite\pres@rbrack} +\newcommand{\prefixa}[4][]%keys, fn, arg, sep +{\prepost@clearkeys\setkeys{prepost}{#1} +{#2}\pres@lbrack{\@assoc\pres@pi@key{#3}{#4}}\pres@rbrack} +\newcommand{\postfixa}[4][]%keys, fn, arg, sep +{\prepost@clearkeys\setkeys{prepost}{#1} +\pres@lbrack{\@assoc\pres@pi@key{#3}{#4}}\pres@rbrack{#2}} +\newcommand{\infix}[4][]{\mixfixii[#1]{}{#3}{#2}{#4}{}} +\newcommand{\assoc}[3][]{\mixfixa[#1]{}{#3}{}{#2}} +\def\setegroup#1#2{\expandafter\def\csname #1@egroup\endcsname{#2}} +\def\elide#1#2#3{\@ifundefined{#1@egroup}% +{\def\@elevel{0} +\PackageError{presentation}{undefined egroup #1, assuming value 0}% +{When calling \protect\elide{#1}... the elision group #1 has be have\MessageBreak +been set by \protect\setegroup before, e.g. by \protect\setegroup{an}{0}.}}% +{\edef\@elevel{\csname #1@egroup\endcsname}}% +\ifnum\@elevel>#2\else{#3}\fi} +\def\provideEdefault#1#2{\expandafter\def\csname#1@edefault\endcsname{#2} +\@ifundefined{this@module}{}% +{\expandafter\g@addto@macro\this@module{\expandafter\def\csname#1@edefault\endcsname{#2}}}} +\def\setEdefault#1#2{\expandafter\def\csname #1@edfault\endcsname{#2}} +\def\fromEcontext#1{\csname #1@edefault\endcsname} +\newcommand{\arrayline}[2]{#1#2\\} +\newcommand{\arraycell}[1]{#1&} +\endinput +%% +%% End of file `presentation.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/presentation/presentation.sty.ltxml b/Master/texmf-dist/tex/latex/stex/presentation/presentation.sty.ltxml new file mode 100644 index 00000000000..c0154aaa9b3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/presentation/presentation.sty.ltxml @@ -0,0 +1,364 @@ +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +DefMacro('\iprec','1000000'); +DefMacro('\niprec','-1000000'); +DefConstructor('\crossrefOp[]{}', + "?#2(" + . "" + . "#2" + .")()", + requireMath=>1); + +DefMacro('\prefix[]{}{}','\@prefix[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}'); +DefConstructor('\@prefix OptionalKeyVals:mi {}{}', + "" + . "" + . "#2" + . "" + . "(" + . "#3" + . ")" + . "" + . "" + ."", + afterDigest=>sub { + #Default argument precedence is -\infty + my $keyval = $_[1]->getArg(1); + $keyval->setValue('pi',-1000000) unless ($keyval && defined($keyval->getValue('pi'))); + applyPrecedencePreferences(@_); + }, + properties=>sub { getSymmdefProperties($_[1]); }); +DefMacro('\postfix []{}{}','\@postfix[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}'); +DefConstructor('\@postfix OptionalKeyVals:mi {}{}', + "" + . "" + . "" + . "(" + . "#3" + . ")" + . "" + . "#2" + . "" + ."", + afterDigest=>sub { + #Default argument precedence is -\infty + my $keyval = $_[1]->getArg(1); + $keyval->setValue('pi',-1000000) unless ($keyval && defined($keyval->getValue('pi'))); + applyPrecedencePreferences(@_); + }, + properties=>sub { getSymmdefProperties($_[1]); }); +DefConstructor('\funapp{}{}','#1#2'); +our $max_arguments = 10; #Currently max 10 arguments to \symdef. +DefKeyVal('mi','lbrack','Semiverbatim'); +DefKeyVal('mi','rbrack','Semiverbatim'); +DefKeyVal('mi','p','Semiverbatim'); +DefKeyVal('mi','pi','Semiverbatim'); +DefKeyVal('mi','pii','Semiverbatim'); #Why are we using this at mixfixai ? +DefKeyVal('mi','cd','Semiverbatim'); +DefKeyVal('mi','name','Semiverbatim'); +DefKeyVal('mi','nobrackets','Semiverbatim'); +sub argument_precedence { + my ($keyval) = @_; + my $attr = 'pi'; + my @precs = (); + foreach (1..$max_arguments) { + if (defined KeyVal($keyval,$attr)) { + push @precs, ToString(KeyVal($keyval,$attr)) + } else { + push @precs, ""; + } + $attr = $attr.'i'; + } + return join(" ",@precs)." "; +} +sub applyPrecedencePreferences { + my ($stomach,$whatsit) = @_; + my @args = $whatsit->getArgs; + my $keyvals = shift @args; + return unless (defined $keyvals); + my %kvhash = %{$keyvals->getKeyVals}; + #Default p (operator precedence) if not set: + my $default_precedence = LookupValue('default_precedence'); + $keyvals->setValue('p',$default_precedence) unless defined($keyvals->getValue('p')); + return unless (exists $kvhash{'nobrackets'}); + $keyvals->setValue('p',1000000); + $keyvals->setValue('pi',-1000000); + $keyvals->setValue('pii',-1000000); + $keyvals->setValue('piii',-1000000); + return; +}#$ +DefMacro('\mixfixi[]{}{}{}', + '\@mixfixi[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + . '{\ensuremath{\crossrefOp[fun]{#4}}}'); +DefConstructor('\@mixfixi OptionalKeyVals:mi {}{}{}', + "" + . "" + . "(" + . "#2 #3 #4" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +DefMacro('\mixfixa[]{}{}{}{}', + '\@mixfixa[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + . '{\ensuremath{\crossrefOp[fun]{#4}}}' + . '{\ensuremath{\crossrefOp[fun]{\ensuremath{#5 }}}}'); +DefConstructor('\@mixfixa OptionalKeyVals:mi {}{}{}{}', + "" + . "" + . "(" + . "#2" + . "" + . "#5" + . "" + . "" + . "#4" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +DefKeyVal('mii','lbrack','Semiverbatim'); +DefKeyVal('mii','rbrack','Semiverbatim'); +DefKeyVal('mii','p','Semiverbatim'); +DefKeyVal('mii','pi','Semiverbatim'); +DefKeyVal('mii','pii','Semiverbatim'); +DefKeyVal('mii','cd','Semiverbatim'); +DefKeyVal('mii','name','Semiverbatim'); +DefKeyVal('mii','nobrackets','Semiverbatim'); +DefMacro('\mixfixii[]{}{}{}{}{}', + '\@mixfixii[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' + . '{\ensuremath{\crossrefOp[fun]{#6}}}'); +DefConstructor('\@mixfixii OptionalKeyVals:mi {}{}{}{}{}', + "" + . "" + . "(" + . "#2 #3 #4 #5 #6" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +DefMacro('\mixfixia[]{}{}{}{}{}{}', + '\@mixfixia[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' + . '{\ensuremath{\crossrefOp[fun]{#6}}}' + . '{\ensuremath{\crossrefOp[fun]{#7}}}'); +DefConstructor('\@mixfixia OptionalKeyVals:mii {}{}{}{}{}{}', + "" + . "" + . "(" + . "#2 #3 #4" + . "" + . "#7" + . "" + . "" + . "#6" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +DefMacro('\mixfixai[]{}{}{}{}{}{}', + '\@mixfixai[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + .'{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' + .'{\ensuremath{\crossrefOp[fun]{#6}}}' + .'{\ensuremath{\crossrefOp[fun]{#7}}}'); +DefConstructor('\@mixfixai OptionalKeyVals:mi {}{}{}{}{}{}', + "" + . "" + . "(" + . "#2" + . "" + . "#7" + . "" + . "" + . "#4 #5 #6" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +DefKeyVal('miii','lbrack','Semiverbatim'); +DefKeyVal('miii','rbrack','Semiverbatim'); +DefKeyVal('miii','p','Semiverbatim'); +DefKeyVal('miii','pi','Semiverbatim'); +DefKeyVal('miii','pii','Semiverbatim'); +DefKeyVal('miii','piii','Semiverbatim'); +DefKeyVal('miii','cd','Semiverbatim'); +DefKeyVal('miii','name','Semiverbatim'); +DefKeyVal('miii','nobrackets','Semiverbatim'); +DefMacro('\mixfixiii[]{}{}{}{}{}{}{}', + '\@mixfixiii[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' + . '{\ensuremath{\crossrefOp[fun]{#6}}}{\ensuremath{#7 }}' + . '{\ensuremath{\crossrefOp[fun]{#8}}}'); +DefConstructor('\@mixfixiii OptionalKeyVals:mi {}{}{}{}{}{}{}', + "" + . "" + . "(" + . "#2 #3 #4 #5 #6 #7 #8" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +DefMacro('\mixfixaii[]{}{}{}{}{}{}{}{}', + '\@mixfixaii[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' + . '{\ensuremath{\crossrefOp[fun]{#6}}}{\ensuremath{#7 }}' + . '{\ensuremath{\crossrefOp[fun]{#8}}}' + . '{\ensuremath{\crossrefOp[fun]{#9}}}'); +DefConstructor('\@mixfixaii OptionalKeyVals:mi {}{}{}{}{}{}{}{}', + "" + . "" + . "(" + . "#2" + . "" + . "#9" + . "" + . "" + . "#4 #5 #6 #7 #8" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +DefMacro('\mixfixiai[]{}{}{}{}{}{}{}{}', + '\@mixfixiai[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' + . '{\ensuremath{\crossrefOp[fun]{#6}}}{\ensuremath{#7 }}' + . '{\ensuremath{\crossrefOp[fun]{#8}}}' + . '{\ensuremath{\crossrefOp[fun]{#9}}}'); +DefConstructor('\@mixfixiai OptionalKeyVals:mi {}{}{}{}{}{}{}', + "" + . "" + . "(" + . "#2 #3 #4" + . "" + . "#9" + . "" + . "" + . "#6 #7 #8" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +DefMacro('\mixfixiia[]{}{}{}{}{}{}{}{}', + '\@mixfixiia[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}' + . '{\ensuremath{\crossrefOp[fun]{#4}}}{\ensuremath{#5 }}' + . '{\ensuremath{\crossrefOp[fun]{#6}}}{\ensuremath{#7 }}' + . '{\ensuremath{\crossrefOp[fun]{#8}}}' + . '{\ensuremath{\crossrefOp[fun]{#9}}}'); +DefConstructor('\@mixfixiia OptionalKeyVals:mi {}{}{}{}{}{}{}', + "" + . "" + . "(" + . "#2 #3 #4 #5 #6" + . "" + . "#9" + . "" + . "" + . "#8" + . ")" + . "" + ."", + afterDigest=>sub { applyPrecedencePreferences(@_);}, + properties=>sub { getSymmdefProperties($_[1]); });#$ +DefMacro('\prefixa[]{}{}{}','\@prefixa[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}{\ensuremath{#4 }}'); +DefConstructor('\@prefixa OptionalKeyVals:mi {}{}{}', + "" + . "" + . "#2" + . "" + . "(" + . "" + . "#4" + . "" + . "" + . ")" + . "" + . "" + ."", + afterDigest=>sub { + #Default argument precedence is -\infty + my $keyval = $_[1]->getArg(1); + $keyval->setValue('pi',-1000000) unless ($keyval && defined($keyval->getValue('pi'))); + applyPrecedencePreferences(@_); + }, + properties=>sub { getSymmdefProperties($_[1]); }); +DefMacro('\postfixa []{}{}{}','\@postfixa[#1]{\ensuremath{\crossrefOp[fun]{#2}}}{\ensuremath{#3 }}{\ensuremath{#4 }}'); +DefConstructor('\@postfixa OptionalKeyVals:mi {}{}{}', + "" + . "" + . "" + . "(" + . "" + . "#4" + . "" + . "" + . ")" + . "" + . "#2" + . "" + ."", + afterDigest=>sub { + #Default argument precedence is -\infty + my $keyval = $_[1]->getArg(1); + $keyval->setValue('pi',-1000000) unless ($keyval && defined($keyval->getValue('pi'))); + applyPrecedencePreferences(@_); + }, + properties=>sub { getSymmdefProperties($_[1]); }); +RawTeX(' +\newcommand{\infix}[4][]{\mixfixii[#1]{}{#3}{#2}{#4}{}} +\newcommand{\assoc}[3][]{\mixfixa[#1]{}{#3}{}{#2}} +'); +DefConstructor('\arrayline{}{}','#1#2'); +DefConstructor('\arraycell{}','#1'); +1; diff --git a/Master/texmf-dist/tex/latex/stex/problem/problem.sty b/Master/texmf-dist/tex/latex/stex/problem/problem.sty new file mode 100644 index 00000000000..220ad52bb29 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/problem/problem.sty @@ -0,0 +1,117 @@ +%% +%% This is file `problem.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% problem.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{problem}[2012/01/28 v0.9c Semantic Markup for Problems] +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\newif\ifexnotes\exnotesfalse\DeclareOption{notes}{\exnotestrue} +\newif\ifhints\hintsfalse\DeclareOption{hints}{\hintstrue} +\newif\ifsolutions\solutionsfalse\DeclareOption{solutions}{\solutionstrue} +\newif\ifpts\ptsfalse\DeclareOption{pts}{\ptstrue} +\newif\ifmin\minfalse\DeclareOption{min}{\mintrue} +\newif\ifboxed\boxedfalse\DeclareOption{boxed}{\boxedtrue} +\newif\ifextract\extractfalse\DeclareOption{extract}{\extracttrue} +\ProcessOptions +\RequirePackage{keyval}[1997/11/10] +\RequirePackage{xcomment} +\RequirePackage{sref} +\srefaddidkey[prefix=prob.]{problem} +\addmetakey{problem}{pts} +\addmetakey{problem}{min} +\addmetakey*{problem}{title} +\addmetakey{problem}{refnum} +\newsavebox{\probbox} +\newcounter{problem}[section] +\def\prob@number{\ifx\inclprob@refnum\@empty +\ifx\problem@refnum\@empty\thesection.\theproblem\else\problem@refnum\fi +\inclprob@refnum\fi} +\def\prob@heading{Problem \prob@number% +\ifx\sref@id\@empty\else{\sref@label@id{Problem \thesection.\theproblem}}\fi% +\ifx\inclprob@title\@empty% if there is no outside title +\ifx\problem@title\@empty{:\quad}\else{\quad(\problem@title)\hfill\\}\fi +\else\quad(\inclprob@title)\hfill\\\fi}% else show the outside title +\ifboxed +\newenvironment{problem}[1][]{\metasetkeys{problem}{#1}\sref@target% +\stepcounter{problem}\show@pts\show@min\record@problem% +\begin{lrbox}{\probbox}\begin{minipage}{.9\textwidth}\ignorespaces} +{\end{minipage}\end{lrbox} +\setbox0=\hbox{\begin{minipage}{.9\textwidth}% +\noindent\textbf\prob@heading\rm% +\end{minipage}} +\smallskip\noindent\fbox{\vbox{\box0\vspace*{.2em}\usebox\probbox}}\smallskip} +\else +\newenvironment{problem}[1][]{\metasetkeys{problem}{#1}\sref@target% +\stepcounter{problem}\show@pts\show@min\record@problem% +\par\noindent\textbf\prob@heading\rm\ignorespaces} +{\smallskip} +\fi%boxed +\def\record@problem{\protected@write\@auxout{}% +{\string\@problem{\prob@number}% +{\ifx\inclprob@pts\@empty\problem@pts\else\inclprob@pts\fi}% +{\ifx\inclprob@min\@empty\problem@min\else\inclprob@min\fi}}} +\def\@problem#1#2#3{} +\define@key{soln}{id}{\def\soln@id{#1}} +\define@key{soln}{for}{\def\soln@for{#1}} +\define@key{soln}{height}{\def\soln@height{#1}} +\ifsolutions +\newenvironment{solution}[1][]% +{\hrule\smallskip{\bf Solution: }\begin{small}}% +{\hrule\end{small}} +\else\newxcomment[]{solution}\fi +\ifexnotes +\newenvironment{exnote}[1][]% +{\par\noindent\hrule\smallskip{\bf Note: }\small} +{\smallskip\hrule} +\else%ifexnotes +\newxcomment[]{exnote} +\fi%ifexnotes +\ifhints +\newenvironment{hint}[1][]% +{\par\noindent\hrule\smallskip{\bf Hint: }\small} +{\smallskip\hrule} +\else%ifhints +\newxcomment[]{hint} +\fi%ifhints +\ifextract +\newwrite\problem@file +\immediate\openout\problem@file=\jobname-problems.tex +\AtEndDocument{\closeout\problem@file} +\fi +\addmetakey{inclprob}{pts} +\addmetakey{inclprob}{min} +\addmetakey*{inclprob}{title} +\addmetakey{inclprob}{refnum} +\clear@inclprob@keys +\newcommand{\includeproblem}[2][]{% +\bgroup\metasetkeys{inclprob}{#1}\input{#2}\ifsolutions\newpage\fi\egroup +\ifextract\def\@test{#1} +\def\prob@num{\ifx\inclprob@refnum\@empty\thesection.\theproblem\else\inclprob@refnum\fi} +\def\inclprob@keys{#1\ifx\@test\@empty\else,\fi refnum=\prob@num} +\protected@write\problem@file{}{\string\includeproblem[\inclprob@keys]{#2}} +\fi} +\def\pts#1{\ifpts\marginpar{#1 pt}\fi} +\def\min#1{\ifmin\marginpar{#1 min}\fi} +\AtEndDocument{\ifpts\message{Total: \arabic{pts} points}\fi +\ifmin\message{Total: \arabic{min} minutes}\fi} +\newcounter{pts} +\def\show@pts{\ifx\inclprob@pts\@empty% +\ifx\problem@pts\@empty\else% +\ifpts\marginpar{\problem@pts pt\smallskip}\addtocounter{pts}{\problem@pts}\fi% +\fi\else% +\ifpts\marginpar{\inclprob@pts pt\smallskip}\addtocounter{pts}{\inclprob@pts}\fi% +\fi} +\newcounter{min} +\def\show@min{\ifx\inclprob@min\@empty% +\ifx\problem@min\@empty\else% +\ifmin\marginpar{\problem@min min}\addtocounter{min}{\problem@min}\fi% +\fi\else% +\ifmin\marginpar{\inclprob@min min}\addtocounter{min}{\inclprob@min}\fi +\fi} +\endinput +%% +%% End of file `problem.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/problem/problem.sty.ltxml b/Master/texmf-dist/tex/latex/stex/problem/problem.sty.ltxml new file mode 100644 index 00000000000..85fb12e7bbe --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/problem/problem.sty.ltxml @@ -0,0 +1,75 @@ +RawTeX(' +\newif\ifexnotes\exnotesfalse +\newif\ifhints\hintsfalse +\newif\ifsolutions\solutionsfalse +\newif\ifpts\ptsfalse +\newif\ifmin\minfalse +\newif\ifboxed\boxedfalse +\newif\ifextract\extractfalse +'); +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +RequirePackage('sref'); +RegisterNamespace('prob'=>"http://omdoc.org/ontology/problems#"); +RegisterDocumentNamespace('prob'=>"http://omdoc.org/ontology/problems#"); +DefEnvironment('{problem} OptionalKeyVals:problem', + "" + . "?&KeyVal(#1,'title')(&KeyVal(#1,'title'))()" + . "?&KeyVal(#1,'min')(" + . "" + . "&KeyVal(#1,'min')" + . ")()" + . "?&KeyVal(#1,'pts')(" + . "" + . "&KeyVal(#1,'pts')" + . ")()" + . "#body" + ."", + afterDigest => sub { + my ($stomach,$kv)=@_; + my $kvi = LookupValue('inclprob'); + my @keys = qw(id title min pts); + my @vals = $kvi && map($kvi->getValue($_), @keys); + foreach my $i(0..$#vals) { + $kv->setValue($keys[$i],$vals[$i]) if $vals[$i]; + } + return;});#$ +DefKeyVal('soln','id','Semiverbatim'); +DefKeyVal('soln','height','Semiverbatim'); +DefKeyVal('soln','for','Semiverbatim'); +DefEnvironment('{solution} OptionalKeyVals:soln', + "" + . "#body" + . ""); +DefEnvironment('{exnote}',"#body"); +DefEnvironment('{hint}',"#body"); +DefConstructor('\pts{}',""); +DefConstructor('\min{}',""); +DefKeyVal('prob','pts','Semiverbatim'); +DefKeyVal('prob','min','Semiverbatim'); +DefKeyVal('prob','title','Semiverbatim'); +DefConstructor('\includeproblem OptionalKeyVals:prob Semiverbatim', + "" + . "?&KeyVal(#1,'title')(&KeyVal(#1,'title'))()" + . "?&KeyVal(#1,'min')(" + . "" + . "&KeyVal(#1,'min')" + . ")()" + . "?&KeyVal(#1,'pts')(" + . "" + . "&KeyVal(#1,'pts')" + . ")()" + ."", + afterDigest => sub{ + my ($stomach,$kv) = @_; + AssignValue('inclprob',$kv) if $kv; + }); +Tag('omdoc:exercise',afterOpen=>\&numberIt); +Tag('omdoc:solution',afterOpen=>\&numberIt); +Tag('omdoc:hint',afterOpen=>\&numberIt); +Tag('omdoc:exercise',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:solution',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:hint',afterOpen=>\&numberIt,afterClose=>\&locateIt); +1; diff --git a/Master/texmf-dist/tex/latex/stex/rdfmeta/rdfmeta.sty b/Master/texmf-dist/tex/latex/stex/rdfmeta/rdfmeta.sty new file mode 100644 index 00000000000..cdfd81223cc --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/rdfmeta/rdfmeta.sty @@ -0,0 +1,68 @@ +%% +%% This is file `rdfmeta.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% rdfmeta.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{rdfmeta}[2012/01/28 v0.2 Metadata key upgrades] +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\newif\if@rdfmeta@sectioning\@rdfmeta@sectioningfalse +\DeclareOption{sectioning}{\@rdfmeta@sectioningtrue} +\ProcessOptions +\RequirePackage{sref,modules} +\newcommand\keydef[2]{\addmetakey{#1}{#2}% +\expandafter\g@addto@macro\this@module{\addmetakey{#1}{#2}}} +\newcommand\listkeydef[2]{\addmetalistkey{#1}{#2}% +\expandafter\g@addto@macro\this@module{\addmetalistkey{#1}{#2}}} +\def\@yes@{yes} +\addmetakey*{upgrade}{idlabel} +\addmetakey*{upgrade}{optarg} +\addmetakey*[yes]{upgrade}{optargstar} +\addmetakey*{upgrade}{keygroup} +\def\rdfmeta@upgrade{\@ifstar\rdfmeta@upgrade@star\rdfmeta@upgrade@nostar} +\newcommand\rdfmeta@upgrade@nostar[2][]{\metasetkeys{upgrade}{#1}% +\ifx\upgrade@keygroup\@empty\def\@@group{#2}\else\def\@@group{\upgrade@keygroup}\fi +\rdfmeta@upgrade@base{#2}{\@nameuse{\@@group @\upgrade@optarg}}} +\newcommand\rdfmeta@upgrade@star[2][]{\metasetkeys{upgrade}{#1}% +\ifx\upgrade@keygroup\@empty\def\@@group{#2}\else\def\@@group{\upgrade@keygroup}\fi +\rdfmeta@upgrade@base@star{#2}{\@nameuse{\@@group @\upgrade@optarg}}} +\newcommand{\rdfmeta@upgrade@base}[2]{\@ifundefined{#1}{}% +{\message{redefining macro #1,} +\ifx\upgrade@idlabel\@empty\srefaddidkey{#1}\else\srefaddidkey[prefix=\upgrade@idlabel]{#1}\fi% +\expandafter\let\csname rdfmeta@#1@old\expandafter\endcsname\csname #1\endcsname% +\expandafter\renewcommand\csname #1\endcsname[2][]% +{\metasetkeys{#1}{##1}\@nameuse{rdfmeta@#1@old}[#2]{##2}} +\addmetakey*\@@group{\upgrade@optarg}}} +\newcommand\rdfmeta@upgrade@base@star[2]{\@ifundefined{#1}{}% +{\message{redefining macros #1 and #1*,} +\ifx\upgrade@idlabel\@empty\srefaddidkey{#1}\else\srefaddidkey[prefix=\upgrade@idlabel]{#1}\fi% +\expandafter\let\csname rdfmeta@#1@old\expandafter\endcsname\csname #1\endcsname% +\expandafter\renewcommand\csname #1\endcsname% +{\@ifstar{\@nameuse{rdfmeta@#1@star}}{\@nameuse{rdfmeta@#1@nostar}}}% +\expandafter\newcommand\csname rdfmeta@#1@nostar\endcsname[2][]% +{\metasetkeys{#1}{##1}\edef\@test{#2}% +\ifx\@test\@empty\@nameuse{rdfmeta@#1@old}{##2}% +\else\@nameuse{rdfmeta@#1@old}[#2]{##2}\fi}% +\ifx\upgrade@optargstar\@yes@% +\expandafter\newcommand\csname rdfmeta@#1@star\endcsname[2][]% +{\metasetkeys{#1}{##1}\@nameuse{rdfmeta@#1@old}*[#2]{##2}}% +\else% +\expandafter\newcommand\csname rdfmeta@#1@star\endcsname[2][]% +{\metasetkeys{#1}{##1}\@nameuse{rdfmeta@#1@old}*{##2}}% +\fi% +\addmetakey*\@@group{\upgrade@optarg}}} +\if@rdfmeta@sectioning +\message{redefining sectioning commands!} +\rdfmeta@upgrade*[optarg=short,optargstar=no]{part} +\rdfmeta@upgrade*[optarg=short,optargstar=no]{chapter} +\rdfmeta@upgrade*[optarg=short,optargstar=no]{section} +\rdfmeta@upgrade*[optarg=short,optargstar=no]{subsection} +\rdfmeta@upgrade*[optarg=short,optargstar=no]{subsubsection} +\rdfmeta@upgrade*[optarg=short,optargstar=no]{paragraph} +\fi +\endinput +%% +%% End of file `rdfmeta.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/rdfmeta/rdfmeta.sty.ltxml b/Master/texmf-dist/tex/latex/stex/rdfmeta/rdfmeta.sty.ltxml new file mode 100644 index 00000000000..f4683274c06 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/rdfmeta/rdfmeta.sty.ltxml @@ -0,0 +1,8 @@ +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +DeclareOption('showmeta',''); +DeclareOption('sectioning',''); +DefConstructor('\keydef',''); +DefConstructor('\listkeydef',''); +1; diff --git a/Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty b/Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty new file mode 100644 index 00000000000..f8cb314b7c3 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty @@ -0,0 +1,66 @@ +%% +%% This is file `reqdoc.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% reqdoc.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{reqdoc}[2012/01/28 v0.3 Semantic Requirement Documents] +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\newif\if@deps\@depsfalse +\DeclareOption{recorddeps}{\@depstrue} +\ProcessOptions +\RequirePackage{sref} +\RequirePackage{longtable} +\newif\ifreqsnum\reqsnumfalse +\addmetakey{reqs}{numbering} +\addmetakey[R]{reqs}{prefix} +\def\reqs@no{no} +\newenvironment{requirements}[1][]% +{\metasetkeys{reqs}{#1}\ifx\reqs@numbering\reqs@no\reqsnumfalse\else\reqsnumtrue\fi}{} +\addmetakey{req}{id} +\addmetakey{req}{prio} +\addmetakey{req}{refs} +\addmetakey{req}{num} +\newcounter{reqnum}[section] +\def\req@do@refs#1#2{\let\@tmpop=\relax\@for\@I:=#1\do{\@tmpop\req@do@ref{\@I}\let\@tmpop=#2}} +\def\req@do@ref#1{\sref@hlink@ifh{#1}{\req@ref{#1}{number}}} +\def\req@def@aux#1#2#3{\expandafter\xdef\csname req@#1@#2\endcsname{#3}} +\def\req@write@aux#1#2#3{\protected@write\@auxout{}{\string\req@def@aux{#1}{#2}{\thesection.#3}}} +\def\req@def#1#2#3{\req@def@aux{#1}{#2}{#3}\req@write@aux{#1}{#2}{#3}} +\def\req@ref#1#2{\csname req@#1@#2\endcsname} +\def\print@req@prio{\ifx\req@prio\@empty\else(Priority: \req@prio)\fi} +\def\print@req@label{\sref@target@ifh\req@id{\reqs@prefix\arabic{reqnum}: }} +\def\print@req@refs{\ifx\req@refs\@empty\else\hfill [from~\req@do@refs{\req@refs}{,}]\fi} +\newenvironment{requirement}[1][]% +{\metasetkeys{req}{#1}\stepcounter{reqnum} +\ifreqsnum\ifx\req@id\@empty\else\req@def\req@id{number}\thereqnum\fi +\noindent\textbf{\print@req@label}\fi +\newcommand{\reqnote}[1]{\par\noindent Note: ##1} +\print@req@prio} +{\medskip\print@req@refs} +\newenvironment{reqtable}[1][]{\metasetkeys{reqs}{#1} +\begin{center}\begin{longtable}{|l|l|p{6cm}|p{5cm}|l|}\hline +\# & Prio & Requirement & Notes & Refs\\\hline\hline} +{\end{longtable}\end{center}} +\newcommand{\reqline}[3][]% +{\metasetkeys{req}{#1}\stepcounter{reqnum} +\req@def\req@id{number}\thereqnum% remember the number for reference +\textbf{\sref@target@ifh\req@id{\reqs@prefix\arabic{reqnum}}}& +\req@prio &\req@do@refs\req@refs{,}\tabularnewline\hline} +\newcommand{\importreqs}[1]{\req@dep@write{"#1.tex"}{IMPORTREQS}\makeatletter\input{#1.aux}\makeatother} +\newcommand{\rinput}[1]{\req@dep@write{"#1.tex"}{[dt="input"]}\bgroup\@depsfalse\input{#1}\egroup} +\if@deps\newwrite\req@depfile +\immediate\openout\req@depfile=\jobname.deps +\AtEndDocument{\closeout\req@depfile} +\renewcommand{\importmodule}[2][]{\req@dep@write{"#1.tex"}{[dt="importmodule"]}\def\@test{#1}% +\ifx\@test\@empty\else\requiremodules{#1}\fi +\expandafter\gdef\csname#2@cd@file@base\endcsname{#1} +\activate@defs{#2}\export@defs{#2}} +\fi +\def\req@dep@write#1#2{\if@deps\protected@write\req@depfile{}{#1 #2}\fi} +\endinput +%% +%% End of file `reqdoc.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty.ltxml b/Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty.ltxml new file mode 100644 index 00000000000..fd9fa13a7b8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/reqdoc/reqdoc.sty.ltxml @@ -0,0 +1,23 @@ +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +RegisterNamespace('r'=>"http://omdoc.org/ontology/requirements#"); +RegisterDocumentNamespace('r'=>"http://omdoc.org/ontology/requirements#"); +DefEnvironment('{requirements} OptionalKeyVals:reqs', + "#body"); +DefEnvironment('{requirement} OptionalKeyVals:req', + "" + . "" + . "?&KeyVal(#1,'refs')()()" + . "#body" + .""); +DefConstructor('\reqnote{}', + "#1"); +DefEnvironment('{reqtable} OptionalKeyVals:reqs', + "#body"); +DefConstructor('\reqline OptionalKeyVals:req{}{}', + "#2" + ."#3"); +DefConstructor('\importreqs {}',""); +DefMacro('\rinput','\input'); +1; diff --git a/Master/texmf-dist/tex/latex/stex/sproof/sproof.sty b/Master/texmf-dist/tex/latex/stex/sproof/sproof.sty new file mode 100644 index 00000000000..35d2470cd02 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/sproof/sproof.sty @@ -0,0 +1,84 @@ +%% +%% This is file `sproof.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sproof.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{sproof}[2012/01/28 v1.0 Semantic Markup for Proofs] +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\ProcessOptions +\RequirePackage{sref} +\srefaddidkey{spf} +\addmetakey*{spf}{display} +\addmetakey{spf}{for} +\addmetakey{spf}{from} +\addmetakey*[\sproof@box]{spf}{proofend} +\addmetakey{spf}{type} +\addmetakey*{spf}{title} +\addmetakey{spf}{continues} +\addmetakey{spf}{functions} +\def\spf@flow{flow} +\newenvironment{pst@with@label}[1]% +{\edef\pst@label{#1}\advance\count10 by 1\count\count10=1} +{\advance\count10 by -1} +\def\the@pst@label{\pst@make@label\pst@label{\number\count\count10}} +\def\pst@make@label@long#1#2{\@for\@I:=#1\do{\@I.}#2} +\def\pst@make@label@angles#1#2{\ensuremath{\@for\@I:=#1\do{\rangle}}#2} +\def\pst@make@label@short#1#2{#2} +\def\pst@make@label@empty#1#2{} +\def\pstlabelstyle#1{\def\pst@make@label{\@nameuse{pst@make@label@#1}}} +\pstlabelstyle{long} +\def\next@pst@label{\global\advance\count\count10 by 1} +\def\sproof@box{\hbox{\vrule\vbox{\hrule width 6 pt\vskip 6pt\hrule}\vrule}} +\def\spf@proofend{\sproof@box} +\def\sproofend{\ifx\spf@proofend\@empty\else\hfil\null\nobreak\hfill\spf@proofend\par\smallskip\fi} +\def\sProofEndSymbol#1{\def\sproof@box{#1}} +\def\spf@proofsketch@kw{Proof Sketch} +\def\spf@proof@kw{Proof} +\newcommand{\spfsketch}[2][]{\metasetkeys{spf}{#1}\sref@target +\ifx\spf@display\spf@flow\else{\stDMemph{\ifx\spf@type\@empty\spf@proofsketch@kw\else\spf@type\fi}:}\fi{ #2}% +\sref@label@id{this \ifx\spf@type\@empty\spf@proofsketch@kw\else\spf@type\fi}} +\newenvironment{spf@proof}[2][]{\metasetkeys{spf}{#1}\sref@target +\count10=10 +\ifx\spf@display\spf@flow\else{\stDMemph{\ifx\spf@type\@empty\spf@proof@kw\else\spf@type\fi}:}\fi{ #2}% +\sref@label@id{this \ifx\spf@type\@empty\spf@proof@kw\else\spf@type\fi} +\def\pst@label{}\newcount\pst@count% initialize the labeling mechanism +\begin{description}\begin{pst@with@label}{P}} +{\end{pst@with@label}\end{description}} +\newenvironment{sproof}[2][]{\begin{spf@proof}[#1]{#2}}{\sproofend\end{spf@proof}} +\newenvironment{sProof}[2][]{\begin{spf@proof}[#1]{#2}}{\end{spf@proof}} +\newcommand{\spfidea}[2][]{\metasetkeys{spf}{#1}% +\stDMemph{\ifx\spf@type\@empty{Proof Idea}\else\spf@type\fi:} #2\sproofend} +\newenvironment{spfstep}[1][]{\metasetkeys{spf}{#1} +\ifx\spf@display\spf@flow\else\item[\the@pst@label]\fi +\ifx\spf@title\@empty\else{(\stDMemph{\spf@title})}\fi} +{\next@pst@label} +\newenvironment{sproofcomment}[1][]{\metasetkeys{spf}{#1} +\ifx\spf@display\spf@flow\else\item[\the@pst@label]\fi} +{\next@pst@label} +\newenvironment{spfcases}[2][]{\metasetkeys{spf}{#1} +\def\@test{#2}\ifx\@test\empty\else +\ifx\spf@display\spf@flow {#2}\else\item[\the@pst@label]{#2} \fi\fi +\begin{pst@with@label}{\pst@label,\number\count\count10}} +{\end{pst@with@label}\next@pst@label} +\newenvironment{spfcase}[2][]{\metasetkeys{spf}{#1} +\ifx\spf@display\spf@flow\else\item[\the@pst@label]\fi +\def\@test{#2}\ifx\@test\@empty\else{\stDMemph{#2}:}\fi +\begin{pst@with@label}{\pst@label,\number\count\count10}} +{\ifx\spf@display\spf@flow\else\sproofend\fi\end{pst@with@label}\next@pst@label} +\newenvironment{subproof}[1][]% +{\begin{pst@with@label}{\pst@label,\number\count\count10}} +{\ifx\spf@display\spf@flow\else\sproofend\fi\end{pst@with@label}} +\srefaddidkey{just} +\addmetakey{just}{method} +\addmetakey{just}{premises} +\addmetakey{just}{args} +\newenvironment{justification}[1][]{}{} +\newcommand{\premise}[2][]{#2} +\newcommand{\justarg}[2][]{#2} +\endinput +%% +%% End of file `sproof.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/sproof/sproof.sty.ltxml b/Master/texmf-dist/tex/latex/stex/sproof/sproof.sty.ltxml new file mode 100644 index 00000000000..042ba7f7dc7 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/sproof/sproof.sty.ltxml @@ -0,0 +1,125 @@ +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +RequirePackage('sref'); +DeclareOption('showmeta',''); +DefConstructor('\sproofend',""); +DefConstructor('\spfsketch OptionalKeyVals:pf{}', + "\n" + . "?#2(#2\n)()" + . "\n"); +DefConstructor('\sProofEndSymbol {}',''); +DefEnvironment('{sproof} OptionalKeyVals:pf{}', + "\n" + . "?#2(" + . "#2" + . "\n)()" + . "#body" + . "\n"); +DefMacro('\sProof','\sproof'); +DefMacro('\endsProof','\endsproof'); +DefConstructor('\spfidea OptionalKeyVals:pf {}', + "\n" + . "#2\n" + . "\n"); +DefEnvironment('{spfstep} OptionalKeyVals:pf', + "" + . "#body\n", + beforeConstruct=>sub { + $_[0]->maybeCloseElement('omdoc:CMP'); + });#$ +DefEnvironment('{sproofcomment} OptionalKeyVals:pf', + "" + . "#body" + . ""); +DefEnvironment('{spfcases} OptionalKeyVals:pf {}', + "\n" + . "#2\n" + . "#body" + . "\n"); +DefEnvironment('{spfcase} OptionalKeyVals:pf{}', + "\n" + . "?#2(" + . "#2" + . "\n)()" + . "#body" + . "\n"); +DefEnvironment('{subproof}[]', + "" + . "?#1(#1)()" + . "" + . "\n #body\n" + . "" + .""); +DefKeyVal('just','id','Semiverbatim'); +DefKeyVal('just','method','Semiverbatim'); +DefKeyVal('just','premises','Semiverbatim'); +DefKeyVal('just','args','Semiverbatim'); +sub extractBodyText { + my ($box, $remove) = @_; + my $str = ''; + my @boxes = $box->unlist; + foreach my $b(@boxes) { + my $s = ''; + if ($b =~ /LaTeXML::Whatsit/) { + my $body = $b->getBody; + $s = $body ? extractBodyText($body, $remove) : ''; + } elsif ($b =~ /LaTeXML::Box/) { + $s = $b->toString || ''; + @{$b}[0] = '' if $remove; } + $str .= $s; } + $str =~ s/\s+/ /g; + $str; } + +DefEnvironment('{justification} OptionalKeyVals:just', sub { + my ($doc, $keys, %props) = @_; + my $text = extractBodyText($props{body}, 1); + my $node = LookupValue('_LastSeenCMP'); + #$node->appendText($text) if $node; + my $method = $keys ? $keys->getValue('method') : undef; + $doc->openElement("omdoc:method", $method ? (xref => $method) : ()); + $doc->absorb($props{body}) if $props{body}; + $doc->closeElement("omdoc:method"); + return; }); +DefMacro('\premise[]{}', sub { + my ($xref, $text) = ($_[1], $_[2]); + my @res = (T_CS('\premise@content')); + push(@res, T_OTHER('['), $xref->unlist, T_OTHER(']')) if $xref; + push(@res, T_SPACE, $text->unlist) if $text; + @res; }); +DefConstructor('\premise@content[]', + ""); +DefMacro('\justarg[]{}', sub { (($_[1] ? $_[1]->unlist : ()), +T_SPACE, $_[2]->unlist, T_SPACE); }); +Tag('omdoc:derive', afterClose=>sub { + my ($doc, $node) = @_; + my @children = grep($_->nodeType == XML_ELEMENT_NODE, $node->childNodes); + my $firstCMP = undef; + foreach my $child(@children) { + next unless ($child->localname || '') eq 'CMP'; + if ($child->hasChildNodes()) { + next unless $#{$child->childNodes} == 0; + next unless $child->firstChild->nodeType == XML_TEXT_NODE; } + + if ($firstCMP) { + $firstCMP->appendText($child->textContent); + $node->removeChild($child); + } else { $firstCMP = $child; } + } + });#$ +Tag('omdoc:proof',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:derive',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:method',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:premise',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:derive',afterOpen=>\&numberIt,afterClose=>\&locateIt); +1; diff --git a/Master/texmf-dist/tex/latex/stex/sref/sref.sty b/Master/texmf-dist/tex/latex/stex/sref/sref.sty new file mode 100644 index 00000000000..1cc4034f812 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/sref/sref.sty @@ -0,0 +1,105 @@ +%% +%% This is file `sref.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% sref.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{sref}[2012/01/28 v1.0 Semantic Cross-References] +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\newif\ifextrefs\extrefsfalse +\DeclareOption{extrefs}{\extrefstrue} +\ProcessOptions +\RequirePackage{metakeys} +\newcommand{\sref}[2][]{% +\@ifundefined{sref@part}{\sref@hlink[#1]{#2}}{\sref@hlink[#1]{\sref@part @#2}}} +\newcommand{\srefs}[3][]{% +\def\@test{#1}\ifx\@test\@empty\sref{#2} and \sref{#3}\else #1\fi} +\newcommand{\srefl}[3][]{% +\def\@test{#1}\ifx\@test\@empty\sref{#2} to \sref{#3}\else #1\fi} +\newcommand{\spageref}[1]{% +\@ifundefined{sref@part}{\sref@pageref{#1}}{\sref@pageref{\sref@part @#1}}} +\newif\ifhref\hreffalse +\AtBeginDocument{\@ifpackageloaded{hyperref}{\hreftrue}{\hreffalse}} +\newcommand\sref@href@ifh[2]{\ifhref\href{#1}{#2}\else#2\fi} +\newcommand\sref@hlink@ifh[2]{\ifhref\hyperlink{#1}{#2}\else#2\fi} +\newcommand\sref@target@ifh[2]{\ifhref\hypertarget{#1}{#2}\else#2\fi} +\def\sref@target% +{\ifx\sref@id\@empty\else% +\edef\@target{sref@\@ifundefined{sref@part}{}{\sref@part @}\sref@id @target} +\sref@target@ifh\@target{}\fi} +\newcommand\@sref@def[3]{\expandafter\gdef\csname sref@#1@#2\endcsname{#3}} +\ifextrefs\newwrite\refs@file\else\def\refs@file{\@auxout}\fi +\newcommand\sref@def[3]{%\@sref@def{#1}{#2}{#3}% +\protected@write\refs@file{}{\string\@sref@def{#1}{#2}{#3}}} +\addmetakey{srefaddidkey}{prefix} +\newcommand\srefaddidkey[2][]{\metasetkeys{srefaddidkey}{#1}% +\@metakeys@ext@clear@keys{#2}{sref@id}{}% id cannot have a default +\metakeys@ext@clear@keys{#2}{id}{}% +\metakeys@ext@showkeys{#2}{id}% +\define@key{#2}{id}{\edef\sref@id{\srefaddidkey@prefix ##1}% +\expandafter\edef\csname #2@id\endcsname{\srefaddidkey@prefix ##1}}} +\newcommand\makeextrefs[1]{\gdef\sref@part{#1}% +\makeatletter +\IfFileExists{\jobname.refs}{\input{\jobname.refs}}{}% +\immediate\openout\refs@file=\jobname.refs +\makeatother} +\newcommand\sref@label[2]{% +\sref@def{\@ifundefined{sref@part}{}{\sref@part @}#2}{page}{\thepage}% +\sref@def{\@ifundefined{sref@part}{}{\sref@part @}#2}{label}{#1}} +\newcommand\sreflabel[2]{\message{sreflabel: #1, #2}\sref@label{#1 \@currentlabel}{#2}} +\newcommand\sref@label@id[1]{\ifx\sref@id\@empty\else\sref@label{#1}{\sref@id}\fi} +\newcommand{\sref@hlink}[2][]{\def\@test{#1}% +\@ifundefined{sref@#2@label}% +{\protect\G@refundefinedtrue\@latex@warning{reference #2 undefined}??}% +{\sref@hlink@ifh{sref@#2@target}{\ifx\@test\@empty\@nameuse{sref@#2@label}\else #1\fi}}} +\newcommand{\sref@page@label}[1]{p.~{#1}} +\newcommand{\sref@pageref}[1]{\@ifundefined{sref@#1@page}% +{\protect\G@refundefinedtrue\@latex@warning{reference #1 undefined}\sref@page@label{??}}% +{\sref@hlink@ifh{sref@#1@target}{\sref@page@label{\@nameuse{sref@#1@page}}}}} +\newcommand{\sref@href}[3][]{\def\@test{#1}% +\@ifundefined{sref@#2@label}% +{\protect\G@refundefinedtrue\@latex@warning{reference #2 undefined}??}% +{\@ifundefined{sref@#3@URI}% +{\protect\G@refundefinedtrue\@latex@warning{external refs of type #3 undefined}??}% +{\edef\@uri{\@nameuse{sref@#3@URI}.pdf\#sref@#2@target} +\edef\@label{\ifx\@test\@empty\@nameuse{sref@#2@label}\else #1\fi} +\sref@href@ifh\@uri\@label}}} +\ifextrefs +\newcommand{\extref}[3][]{\def\theextref{\sref@href[#1]{#2@#3}{#2}}% +\csname doextref@#2\endcsname} +\else +\newcommand{\extref}[3][]{\sref[#1]{#3}} +\fi +\ifextrefs +\newcommand{\extpageref}[3][]{\def\theextref{\sref@pageref[#1]{#2@#3}{#2}}% +\csname doextpageref@#2\endcsname} +\else +\newcommand{\extpageref}[3][]{\spageref[#1]{#3}} +\fi +\newcommand\extrefstyle[2]{\expandafter\gdef\csname doextref@#1\endcsname{#2}} +\newcommand\extpagerefstyle[2]{\expandafter\gdef\csname doextpageref@#1\endcsname{#2}} +\newcommand{\inputrefs}[2]{% +\@namedef{sref@#1@URI}{#2} +\makeatletter% +\IfFileExists{#2.refs}{\input{#2.refs}} + {\PackageError{sref}{Reference file #1.refs does not exist} + {Maybe you have to run LaTeX on #2.tex first}} +\makeatother} +\srefaddidkey{sequation} +\def\sref@sequation@heading{equation} +\newenvironment{sequation}[1][]{\metasetkeys{sequation}{#1}% +\ifx\sref@id\@empty\begin{displaymath}\else% no id, using equation* +\begin{equation}\sref@target\sref@label@id{\sref@sequation@heading~(\theequation)}\fi} +{\ifx\sref@id\@empty\end{displaymath}\else\end{equation}\fi} +\newenvironment{seqnarray}[1][]% +{\metasetkeys{sequation}{#1}\begin{eqnarray*}\sref@target% +\sref@label@id{\sref@sequation@heading~(\theequation)}} +{\end{eqnarray*}} +\newcommand\withcite[2]{#2~\cite{#1}} +\newenvironment{withcitation}[1]{\def\citeit{\cite{#1}}}{} +\endinput +%% +%% End of file `sref.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/sref/sref.sty.ltxml b/Master/texmf-dist/tex/latex/stex/sref/sref.sty.ltxml new file mode 100644 index 00000000000..5d888c6715a --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/sref/sref.sty.ltxml @@ -0,0 +1,56 @@ +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +DeclareOption('extrefs',''); +RequirePackage('metakeys'); +sub withhash {'#';} +DefConstructor('\sref[]{}', + ""); +DefConstructor('\srefs[]{}', + ""); +DefConstructor('\srefl[]{}', + ""); +DefConstructor('\spageref{}', + ""); +DefConstructor('\makeextrefs{}',''); +DefConstructor('\extref[]{}{}', + ""); +DefConstructor('\theextref',''); +DefConstructor('\extpageref[]{}{}', + ""); +DefConstructor('\theextref',''); +DefConstructor('\extrefstyle{}{}',""); +DefConstructor('\extrefstyle{}{}',""); +DefConstructor('\inputrefs{}{}',''); +DefEnvironment('{sequation} OptionalKeyVals', + "" + . "" + . "#body" + . "" + . "", + mode=>'display_math', + properties=> sub { RefStepCounter('equation') }, + locked=>1); +DefMacro('\seqnarray OptionalKeyVals','\begin{eqnarray*}'); +DefMacro('\endseqnarray','\end{eqnarray*}'); +DefMacro('\withcite{}{}','\begin{withcitation}{#1}#2\citeit\end{withcitation}'); +DefConstructor('\citeit'," ", +afterConstruct => sub { + my ($document,$whatsit) = @_; + # LibXML acrobatics, since we can't talk about the xml:id prior to construction's end + # (and please do correct me if this is inaccurate) + my $node = $document->getNode; + my ($citenode) = $document->findnodes('preceding-sibling::omdoc:citation',$node); + my ($phrase_parent) = $document->findnodes('ancestor::ltx:text[@xml:id]',$node); + return unless (defined $phrase_parent) && (defined $citenode); + my $id = $phrase_parent->getAttribute('xml:id'); + my $refs = $phrase_parent->getAttribute('citeit-refs'); + $phrase_parent->removeAttribute('citeit-refs'); + $citenode->setAttribute('for',$id); + $citenode->setAttribute('refs',$refs); +});#$ +DefEnvironment('{withcitation}{}', + "#body"); +1; diff --git a/Master/texmf-dist/tex/latex/stex/statements/statements.sty b/Master/texmf-dist/tex/latex/stex/statements/statements.sty new file mode 100644 index 00000000000..4c8f57560e8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/statements/statements.sty @@ -0,0 +1,171 @@ +%% +%% This is file `statements.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% statements.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{statements}[2012/01/28 v1.1 Semantic Markup for Statements] +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{omdoc}} +\ProcessOptions +\RequirePackage{omtext} +\RequirePackage{modules} +\RequirePackage[hyperref]{ntheorem} +\theoremstyle{plain} +\providecommand\STpresent[1]{#1} +\def\define@statement@env#1{% +\newenvironment{#1}[1][]{\metasetkeys{omtext}{##1}\sref@target% +\ifx\omtext@display\st@flow\else% +\ifx\omtext@title\@empty\begin{ST#1Env}\else\begin{ST#1Env}[\omtext@title]\fi% +\ifx\sref@id\@empty\else\label{#1.\sref@id}\fi +\csname st@#1@initialize\endcsname\fi +\ifx\sref@id\@empty\sref@label@id{here}\else% +\sref@label@id{\STpresent{\csname ST#1EnvKeyword\endcsname}~\@currentlabel}\fi} +{\csname st@#1@terminate\endcsname\ifx\omtext@display\st@flow\else\end{ST#1Env}\fi}} +\newenvironment{assertion}[1][]{\metasetkeys{omtext}{#1}\sref@target% +\ifx\omtext@display\st@flow\else% +\ifx\omtext@title\@empty\begin{ST\omtext@type AssEnv}% +\else\begin{ST\omtext@type AssEnv}[\omtext@title]\fi\fi% +\ifx\omtext@type\@empty\sref@label@id{here}\else% +\sref@label@id{\STpresent{\csname ST\omtext@type AssEnvKeyword\endcsname}~\@currentlabel}\fi} +{\ifx\omtext@display\st@flow\else\end{ST\omtext@type AssEnv}\fi} +\def\st@theorem@kw{Theorem} +\def\st@lemma@kw{Lemma} +\def\st@proposition@kw{Proposition} +\def\st@corollary@kw{Corollary} +\def\st@conjecture@kw{Conjecture} +\def\st@falseconjecture@kw{Conjecture (false)} +\def\st@postulate@kw{Postulate} +\def\st@obligation@kw{Obligation} +\def\st@assumption@kw{Assumption} +\def\st@observation@kw{Observation} +\theorembodyfont{\itshape} +\theoremheaderfont{\normalfont\bfseries} +\newtheorem{STtheoremAssEnv}{\st@theorem@kw} +\newtheorem{STlemmaAssEnv}[STtheoremAssEnv]{\st@lemma@kw} +\newtheorem{STpropositionAssEnv}[STtheoremAssEnv]{\st@proposition@kw} +\newtheorem{STcorollaryAssEnv}[STtheoremAssEnv]{\st@corollary@kw} +\newtheorem{STconjectureAssEnv}[STtheoremAssEnv]{\st@conjecture@kw} +\newtheorem{STfalseconjectureAssEnv}[STtheoremAssEnv]{\st@falseconjecture@kw} +\newtheorem{STpostulateAssEnv}[STtheoremAssEnv]{\st@postulate@kw} +\newtheorem{STobligationAssEnv}[STtheoremAssEnv]{\st@obligation@kw} +\newtheorem{STassumptionAssEnv}[STtheoremAssEnv]{\st@assumption@kw} +\newtheorem{STobservationAssEnv}[STtheoremAssEnv]{\st@observation@kw} +\def\st@example@initialize{}\def\st@example@terminate{} +\define@statement@env{example} +\def\st@example@kw{Example} +\theorembodyfont{\upshape} +\newtheorem{STexampleEnv}[STtheoremAssEnv]{\st@example@kw} +\def\st@axiom@initialize{}\def\st@axiom@terminate{} +\define@statement@env{axiom} +\def\st@axiom@kw{Axiom} +\theorembodyfont{\upshape} +\newtheorem{STaxiomEnv}[STtheoremAssEnv]{\st@axiom@kw} +\srefaddidkey{symboldec} +\addmetakey{symboldec}{functions} +\addmetakey{symboldec}{role} +\addmetakey*{symboldec}{title} +\addmetakey{symboldec}{name} +\addmetakey{symboldec}{subject} +\addmetakey*{symboldec}{display} +\def\symboldec@type{Symbol} +\newenvironment{symboldec}[1][]{\metasetkeys{symboldec}{#1}\sref@target\st@indeftrue% +\ifx\symboldec@display\st@flow\else{\stDMemph{\symboldec@type} \symboldec@name:}\fi% +\ifx\symboldec@title\@empty~\else~(\stDMemph{\symboldec@title})\par\fi}{} +\newcommand{\symtype}[2]{Type (#1): $#2$} +\newif\ifst@indef\st@indeffalse +\newenvironment{definition}[1][]{\metasetkeys{omtext}{#1}\sref@target\st@indeftrue% +\ifx\omtext@display\st@flow\else% +\ifx\omtext@title\@empty\begin{STdefinitionEnv}\else\begin{STdefinitionEnv}[\omtext@title]\fi\fi% +\ifx\sref@id\@empty\sref@label@id{here}\else% +\sref@label@id{\STpresent{\csname STdefinitionEnvKeyword\endcsname}~\@currentlabel}\fi} +{\ifx\omtext@display\st@flow\else\end{STdefinitionEnv}\fi} +\def\st@definition@kw{Definition} +\theorembodyfont{\upshape} +\newtheorem{STdefinitionEnv}[STtheoremAssEnv]{\st@definition@kw} +\def\notemph#1{{\bf{#1}}} +\def\st@notation@terminate{} +\def\st@notation@initialize{} +\define@statement@env{notation} +\def\st@notation@kw{Notation} +\theorembodyfont{\upshape} +\newtheorem{STnotationEnv}[STtheoremAssEnv]{\st@notation@kw} +\def\st@def@target#1#2{\def\@test{#1}% +\ifst@indef% if we are in a definition or such +\ifx\omtext@theory\@empty% if there is no theory attribute +\@ifundefined{mod@id}% if we are not in a module +{\PackageWarning{statements}{definiendum in unidentified module\MessageBreak +\protect\definiendum, \protect\defi, +\protect\defii, \protect\defiii\MessageBreak +can only be referenced when called in a module with id key}}% +{\ifx\@test\@empty% +\expandafter\sref@target@ifh{sref@#2@\mod@id @target}{}\else% +\expandafter\sref@target@ifh{sref@#1@\mod@id @target}{}\fi}% +\else\expandafter\sref@target@ifh{sref@#1@\omtext@theory @target}{}\fi% +\else\PackageError{statements}% +{definiendum outside definition context\MessageBreak +\protect\definiendum, \protect\defi, +\protect\defii, \protect\defiii\MessageBreak +do not make sense semantically outside a definition.\MessageBreak +Consider wrapping the defining phrase in a \protect\inlinedef}% +\fi} +\newcommand\@termdef[2][]{\def\@test{#1}% +\@ifundefined{mod@id}{}{\ifx\@test\@empty\def\@@name{#2}\else\def\@@name{#1}\fi% +\termdef{\mod@id @\@@name}{#2}}} +\newcommand\definiendum[2][]{\st@def@target{#1}{#2}\defemph{#2}} +\newcommand{\notatiendum}[2][]{\notemph{#2}} +\newcommand{\defi}[2][]{\definiendum[#1]{#2}\omdoc@index[#1]{#2}} +\newcommand{\adefi}[3][]{\def\@test{#1}% +\ifx\@test\@empty\definiendum[#3]{#2}% +\else\definiendum[#1]{#2}\omdoc@index[#1]{#3}\fi} +\newcommand{\defii}[3][]{\st@def@target{#1}{#2-#3}\defemph{#2 #3}\@twin[#1]{#2}{#3}} +\newcommand{\adefii}[4][]{\def\@test{#1}% +\ifx\@test\@empty\definiendum[#3-#4]{#2}% +\else\definiendum[#1]{#2}\@twin[#1]{#3}{#4}\fi} +\newcommand{\defiii}[4][]{\st@def@target{#1}{#2-#3-#4}\defemph{#2 #3 #4}\@atwin[#1]{#2}{#3}{#4}} +\newcommand{\adefiii}[5][]{\def\@test{#1}% +\ifx\@test\@empty\definiendum[#3-#4-#5]{#2}% +\else\definiendum[#1]{#2}\@atwin[#1]{#3}{#4}{#5}\fi} +\newcommand{\inlineex}[2][]{\metasetkeys{omtext}{#1}\sref@target\sref@label@id{here}#2} +\newcommand{\inlinedef}[2][]{\metasetkeys{omtext}{#1}\sref@target\sref@label@id{here}\st@indeftrue #2} +\addmetakey[\mod@id]{termref}{cd} +\addmetakey{termref}{cdbase} +\addmetakey{termref}{name} +\addmetakey{termref}{role} +\def\termref@set#1#2{\def\termref@name{#2}\metasetkeys{termref}{#1}} +\newcommand{\termref}[2][]{\metasetkeys{termref}{#1}\st@termref{#2}} +\def\st@termref#1{\ifx\termref@name\@empty\def\termref@name{#1}\fi% +\ifx\termref@cdbase\@empty\mod@termref\termref@cd\termref@name{#1}% +\else\sref@href@ifh\termref@cdbase{#1}\fi} +\newcommand\atrefi[3][]{\def\@test{#1}\ifx\@test\@empty\termref[name=#3]{#2}\else\termref[cd=#1,name=#3]{#2}\fi} +\newcommand\atrefii[4][]{\atrefi[#1]{#2}{#3-#4}} +\newcommand\atrefiii[5][]{\atrefi[#1]{#2}{#3-#4-#5}} +\newcommand{\trefi}[2][]{\atrefi[#1]{#2}{#2}} +\newcommand{\trefii}[3][]{\atrefi[#1]{#2 #3}{#2-#3}} +\newcommand{\trefiii}[4][]{\atrefi[#1]{#2 #3 #4}{#2-#3-#4}} +\providecommand{\termemph}[1]{#1} +\providecommand{\defemph}[1]{{\textbf{#1}}} +\providecommand{\stDMemph}[1]{{\textbf{#1}}} +\newcommand{\symref}[2]{\@nameuse{mod@symref@#1}{#2}} +\newcommand\defin[2][]{\defi[#1]{#2}% +\PackageWarning{statements}{\protect\defin\space is deprecated, use \protect\defi\space instead}} +\newcommand\twindef[3][]{\defii[#1]{#2}{#3}% +\PackageWarning{statements}{\protect\twindef\space is deprecated, use \protect\defii\space instead}} +\newcommand\atwindef[4][]{\defiii[#1]{#2}{#3}{#4}% +\PackageWarning{statements}{\protect\atwindef\space is deprecated, use \protect\defiii\space instead}} +\newcommand\definalt[3][]{\adefi[#1]{#2}{#3}% +\PackageWarning{statements}{\protect\definalt\space is deprecated, use \protect\adefi\space instead}} +\newcommand\twindefalt[4][]{\adefii[#1]{#2}{#3}{#4}% +\PackageWarning{statements}{\protect\twindefalt\space is deprecated, use \protect\adefii\space instead}} +\newcommand\atwindefalt[5][]{\adefiii[#1]{#2}{#3}{#4}{#5}% +\PackageWarning{statements}{\protect\atwindefalt\space is deprecated, use \protect\adefiii\space instead}} +\newcommand\twinref[3][]{\trefii[#1]{#2}{#3}% +\PackageWarning{statements}{\protect\twinref\space is deprecated, use \protect\trefii\space instead}} +\newcommand\atwinref[4][]{\atrefiii[#1]{#2}{#3}{#4}% +\PackageWarning{statements}{\protect\atwindef\space is deprecated, use \protect\trefiii\space instead}} +\endinput +%% +%% End of file `statements.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/statements/statements.sty.ltxml b/Master/texmf-dist/tex/latex/stex/statements/statements.sty.ltxml new file mode 100644 index 00000000000..92d7f8d8b84 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/statements/statements.sty.ltxml @@ -0,0 +1,365 @@ +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +RequirePackage('omtext'); +RequirePackage('modules'); +sub lowcase {my ($string) = @_; $string ? return lc(ToString($string)) : return('')}#$ +sub dashed { join('-',map($_->toString,@_));}#$ +sub makeNCName { + my ($name) = @_; + my $ncname=$name; + $ncname=~s/\s/_/g; #Spaces to underscores + $ncname="_$ncname" if $ncname!~/^(\w|_)/; #Ensure start with letter or underscore + ##More to come... + $ncname; +} +sub simple_wrapper { + #Deref if array reference + my @input; + foreach (@_) { + if (ref $_ && $_ =~ /ARRAY/ && $_ !~ /LaTeXML/) { + @input=(@input,@$_); + } else + { push (@input,$_); } + } + return '' if (!@input); + @input = map(split(/\s*,\s*/,ToString($_)),@input); + my $output=join(" ",@input); + $output=~s/(^ )|[{}]//g; #remove leading space and list separator brackets + $output||''; +} +sub hash_wrapper{ + #Deref if array reference + my @input; + foreach (@_) { + if (ref $_ && $_ =~ /ARRAY/ && $_ !~ /LaTeXML/) { + @input=(@input,@$_); + } else + { push (@input,$_); } + } + return '' if (!@input); + @input = map(split(/\s*,\s*/,ToString($_)),@input); + my $output=join(".sym #",@input); + $output=~s/(^\.sym )|[{}]//g; #remove leading space and list separator brackets + "#$output"||''; +} +DefEnvironment('{assertion} OptionalKeyVals:omtext', + "" + . "?&KeyVal(#1,'title')(&KeyVal(#1,'title'))()" + . "#body" + ."\n"); +DefEnvironment('{example} OptionalKeyVals:omtext', + "" + . "?&KeyVal(#1,'title')(&KeyVal(#1,'title'))()" + . "#body" + . "\n"); +DefEnvironment('{axiom} OptionalKeyVals:omtext', + "" + . "?&KeyVal(#1,'title')(&KeyVal(#1,'title'))()" + . "#body" + . "\n"); +DefEnvironment('{symboldec} OptionalKeyVals:symboldec', + "" + . "?&KeyVal(#1,'title')(&KeyVal(#1,'title'))()" + . "#body" + ."\n"); +DefConstructor('\symtype{}{}', + "#2"); +sub definitionBody { + my ($doc, $keyvals, %props) = @_; + my $for = $keyvals->getValue('for') if $keyvals; + my $type = $keyvals->getValue('type') if $keyvals; + my %for_attr=(); + if (ToString($for)) { + $for = ToString($for); + $for =~ s/^{(.+)}$/$1/eg; + foreach (split(/,\s*/,$for)) { + $for_attr{$_}=1; + }} + if ($props{theory}) { + my @symbols = @{$props{defs} || []}; + foreach my $symb(@symbols) { + next if $for_attr{$symb}; + $for_attr{$symb}=1; + $doc->insertElement('omdoc:symbol', undef, (name=>$symb, "xml:id"=>makeNCName("$symb.def.sym"))); + } + } + my %attrs = (); + $for = join(" ",(keys %for_attr)); + $attrs{'for'} = $for if $for; + my $id = $keyvals->getValue('id') if $keyvals; + $attrs{'xml:id'} = $id if $id; + $attrs{'type'} = $type if $type; + if ($props{theory}) { + $doc->openElement('omdoc:definition', %attrs); + } else { + $attrs{'type'}='definition'; + $doc->openElement('omdoc:omtext', %attrs); + } + my $title = $keyvals->getValue('title') if $keyvals; + if ($title) { + $doc->openElement('omdoc:metadata'); + $doc->openElement('dc:title'); + $doc->absorb($title); + $doc->closeElement('dc:title');} + $doc->openElement('omdoc:CMP'); + $doc->absorb($props{body}) if $props{body}; + $doc->maybeCloseElement('omdoc:CMP'); + if ($props{theory}) { + $doc->closeElement('omdoc:definition'); + } else { + $doc->closeElement('omdoc:omtext'); + } + return; } +DefEnvironment('{definition} OptionalKeyVals:omtext', sub{definitionBody(@_)}, + afterDigestBegin=>sub { + my ($stomach, $whatsit) = @_; + my @symbols = (); + $whatsit->setProperty(theory=>LookupValue('current_module')); + $whatsit->setProperty(defs=>\@symbols); + AssignValue('defs', \@symbols); return; }, + afterDigest => sub { AssignValue('defs', undef); return; });#$ +DefEnvironment('{notation} OptionalKeyVals:omtext', + "" + . "?&KeyVal(#1,'title')(&KeyVal(#1,'title'))()" + . "#body" + . "\n"); +DefConstructor('\notatiendum OptionalKeyVals:notation {}', + "#2"); +DefConstructor('\definiendum [] {}', + "#2", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $whatsit->getArg(2) unless $name; + $whatsit->setProperty(name=>$name->toString); + push(@$addr, $name->toString) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module')); + return; });#$ +DefConstructor('\defi[]{}', + "" + . "" + . "#2" + . "" + . "#2" + ."", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $whatsit->getArg(2) unless $name; + push(@$addr, $name->toString) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module'));#$ + return; }, + alias=>'\defi'); +DefConstructor('\adefi[]{}{}', + "" + . "" + . "#2" + . "" + . "#3" + ."", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $whatsit->getArg(3) unless $name; + push(@$addr, $name->toString) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module'));#$ + return; }, + alias=>'\adefi'); +DefConstructor('\defii[]{}{}', + "" + . "" + . "" + . "#2 #3" + . "" + . "" + . "" + . "#2" + . "#3" + . "" + ."", + afterDigest => sub { + my ($stomach, $whatsit) = @_; +my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $name->toString if $name; + $name = $whatsit->getArg(2)->toString.'-'.$whatsit->getArg(3)->toString unless $name; + push(@$addr, $name) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module')); + return; }, + alias=>'\defii');#$ +DefConstructor('\adefii[]{}{}{}', + "" + . "" + . "" + . "#2" + . "" + . "" + . "" + . "#3" + . "#4" + . "" + ."", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $name->toString if $name; + $name = $whatsit->getArg(3)->toString.'-'.$whatsit->getArg(4)->toString unless $name; + push(@$addr, $name) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module')); + return; }, + alias=>'\defii');#$ +DefConstructor('\defiii[]{}{}{}', + "" + . "" + . "#2 #3 #4" + . "" + . "" + . "#2" + . "#3" + . "#4" + . "" + . "", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $name->toString if $name; + $name = $whatsit->getArg(2)->toString.'-'.$whatsit->getArg(3)->toString.'-'.$whatsit->getArg(4)->toString unless $name; + push(@$addr, $name) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module')); + return; }, + alias=>'\defiii'); +DefConstructor('\adefiii[]{}{}{}{}', + "" + . "" + . "#2" + . "" + . "" + . "#3" + . "#4" + . "#5" + . "" + . "", + afterDigest => sub { + my ($stomach, $whatsit) = @_; + my $addr = LookupValue('defs'); + my $name = $whatsit->getArg(1); + $name = $name->toString if $name; + $name = $whatsit->getArg(3)->toString.'-'.$whatsit->getArg(4)->toString.'-'.$whatsit->getArg(5)->toString unless $name; + push(@$addr, $name) if ($addr and $name); + $whatsit->setProperty(theory=>LookupValue('current_module')); + return; }, + alias=>'\defiii'); +DefConstructor('\inlineex OptionalKeyVals:omtext {}', + "#2"); +DefConstructor('\inlinedef OptionalKeyVals:omtext {}', sub { + my ($document, $keyvals, $body, %props) = @_; + my $for = $keyvals->getValue('for') if $keyvals; + my %for_attr=(); + if (ToString($for)) { + $for = ToString($for); + $for =~ s/^{(.+)}$/$1/eg; + foreach (split(/,\s*/,$for)) { + $for_attr{$_}=1; + }} + my @symbols = @{$props{defs} || []}; + #Prepare for symbol insertion -insert before the parent of the closest ancestor CMP element + my $original_node = $document->getNode; + my $xc = XML::LibXML::XPathContext->new( $original_node ); + $xc->registerNs('omdoc', 'http://omdoc.org/ns'); + my ($statement_ancestor) = $xc->findnodes('./ancestor::omdoc:CMP/..'); + foreach my $symb(@symbols) { + next if $for_attr{$symb}; + $for_attr{$symb}=1; + my $symbolnode = XML::LibXML::Element->new('symbol'); + $symbolnode->setAttribute(name=>$symb); + $symbolnode->setAttribute("xml:id"=>makeNCName("$symb.def.sym")); + $statement_ancestor->parentNode->insertBefore($symbolnode,$statement_ancestor); + } + #Restore the insertion point + $document->setNode($original_node); + my %attrs = (); + $for = join(" ",(keys %for_attr)); + $attrs{'for'} = $for if $for; + my $id = $keyvals->getValue('id') if $keyvals; + $attrs{'xml:id'} = $id if $id; +$attrs{'class'} = 'inlinedef'; + $document->openElement('ltx:text',%attrs); + $document->absorb($body); +$document->closeElement('ltx:text'); }, + #Prepare 'defs' hooks for \defi and \definiendum symbol names + beforeDigest=>sub { + my @symbols = (); + AssignValue('defs', \@symbols); return; }, + #Adopt collected names as 'defs' property, remove hooks + afterDigest=>sub { + my ($stomach, $whatsit) = @_; + my $defsref = LookupValue('defs'); + my @defs = @$defsref; + $whatsit->setProperty('defs',\@defs); + AssignValue('defs',undef); + return; }); +DefConstructor('\termref OptionalKeyVals:termref {}', + "" + . "#2" + ."", + afterDigest=>sub{$_[1]->setProperty(module=>LookupValue('current_module'))}); +RawTeX(' +\newcommand\atrefi[3][]{\def\@test{#1}\ifx\@test\@empty\termref[name=#3]{#2}\else\termref[cd=#1,name=#3]{#2}\fi} +\newcommand\atrefii[4][]{\atrefi[#1]{#2}{#3-#4}} +\newcommand\atrefiii[5][]{\atrefi[#1]{#2}{#3-#4-#5}} +\newcommand{\trefi}[2][]{\atrefi[#1]{#2}{#2}} +\newcommand{\trefii}[3][]{\atrefi[#1]{#2 #3}{#2-#3}} +\newcommand{\trefiii}[4][]{\atrefi[#1]{#2 #3 #4}{#2-#3-#4}} +'); +DefConstructor('\symref{}{}', + "" + . "#2" + .""); +Tag('omdoc:assertion',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:definition',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:example',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:requation',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:axiom',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:symbol',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:type',afterOpen=>\&numberIt,afterClose=>\&locateIt); +Tag('omdoc:term',afterOpen=>\&numberIt,afterClose=>\&locateIt); +RawTeX(' +\newcommand\defin[2][]{\defi[#1]{#2}% +\PackageWarning{statements}{\protect\defin\space is deprecated, use \protect\defi\space instead}} +\newcommand\twindef[3][]{\defii[#1]{#2}{#3}% +\PackageWarning{statements}{\protect\twindef\space is deprecated, use \protect\defii\space instead}} +\newcommand\atwindef[4][]{\defiii[#1]{#2}{#3}{#4}% +\PackageWarning{statements}{\protect\atwindef\space is deprecated, use \protect\defiii\space instead}} +\newcommand\definalt[3][]{\adefi[#1]{#2}{#3}% +\PackageWarning{statements}{\protect\definalt\space is deprecated, use \protect\adefi\space instead}} +\newcommand\twindefalt[4][]{\adefii[#1]{#2}{#3}{#4}% +\PackageWarning{statements}{\protect\twindefalt\space is deprecated, use \protect\adefii\space instead}} +\newcommand\atwindefalt[5][]{\adefiii[#1]{#2}{#3}{#4}{#5}% +\PackageWarning{statements}{\protect\atwindefalt\space is deprecated, use \protect\adefiii\space instead}} +\newcommand\twinref[3][]{\trefii[#1]{#2}{#3}% +\PackageWarning{statements}{\protect\twinref\space is deprecated, use \protect\trefii\space instead}} +\newcommand\atwinref[4][]{\atrefiii[#1]{#2}{#3}{#4}% +\PackageWarning{statements}{\protect\atwindef\space is deprecated, use \protect\trefiii\space instead}} +'); +1; diff --git a/Master/texmf-dist/tex/latex/stex/stex-logo.sty b/Master/texmf-dist/tex/latex/stex/stex-logo.sty new file mode 100644 index 00000000000..229aa300eb5 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/stex-logo.sty @@ -0,0 +1,5 @@ +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{stex-logo}[2009/08/07 v1.0 sTeX Logo] +\RequirePackage{xspace} +\def\stex{\@ifundefined{texorpdfstring}{\let\texorpdfstring\@firstoftwo}{}\texorpdfstring{\raisebox{-.5ex}S\kern-.5ex\TeX}{sTeX}\xspace} +\def\sTeX{\stex} diff --git a/Master/texmf-dist/tex/latex/stex/stex-logo.sty.ltxml b/Master/texmf-dist/tex/latex/stex/stex-logo.sty.ltxml new file mode 100644 index 00000000000..cd3ed6d0df4 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/stex-logo.sty.ltxml @@ -0,0 +1,18 @@ +# -*- CPERL -*- +# /=======================================================\ # +# | stex.sty - Implementation for LaTeXML | # +# | | # +# |=======================================================| # +# | Not Part of LaTeXML : http://dlmf.nist.gov/LaTeXML/ | # +# | Copyright (c) 2006 arXMLiv group | # +# | Released under the GNU Public License | # +# \=======================================================/ # + +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; +RequirePackage('xspace'); +DefConstructor('\stex', + "sTeX"); +RawTeX('\def\sTeX{\stex}'); +1; diff --git a/Master/texmf-dist/tex/latex/stex/stex.sty b/Master/texmf-dist/tex/latex/stex/stex.sty new file mode 100644 index 00000000000..3e402a40932 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/stex.sty @@ -0,0 +1,24 @@ +% sTeX: a package for semantic markup in LaTeX +% Copyright (c) 2009 Michael Kohlhase, all rights reserved +% this file is released under the +% LaTeX Project Public License (LPPL) +% +% The development version of this file can be found at +% $HeadURL: https://svn.kwarc.info/repos/stex/trunk/sty/stex.sty $ +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{stex}[2010/02/04 v0.9b Semantic Markup] +% we pass the options to the appropriate packages +\DeclareOption{extrefs}{\PassOptionsToPackage{\CurrentOption}{sref}} +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{omd}} +\DeclareOption{showmods}{\PassOptionsToPackage{\CurrentOption}{modules}} +\ProcessOptions +% now we require the respective packages. +\RequirePackage{stex-logo} +\RequirePackage{modules} +\RequirePackage{statements} +\RequirePackage{sproof} +\RequirePackage{omdoc} +\RequirePackage{presentation} +\RequirePackage{cmath} +\RequirePackage{dcm} + diff --git a/Master/texmf-dist/tex/latex/stex/stex.sty.ltxml b/Master/texmf-dist/tex/latex/stex/stex.sty.ltxml new file mode 100644 index 00000000000..ab396e36c6f --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/stex.sty.ltxml @@ -0,0 +1,24 @@ +# -*- CPERL -*- +# /=======================================================\ # +# | stex.sty - Implementation for LaTeXML | # +# | | # +# |=======================================================| # +# | Not Part of LaTeXML : http://dlmf.nist.gov/LaTeXML/ | # +# | Copyright (c) 2006 arXMLiv group | # +# | Released under the GNU Public License | # +# \=======================================================/ # + +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Package; + +RequirePackage('stex-logo'); +RequirePackage('modules'); +RequirePackage('statements'); +RequirePackage('sproof'); +RequirePackage('omdoc'); +RequirePackage('presentation'); +RequirePackage('cmath'); +RequirePackage('dcm'); + +1; diff --git a/Master/texmf-dist/tex/latex/stex/stex.tex b/Master/texmf-dist/tex/latex/stex/stex.tex new file mode 100644 index 00000000000..325128d4ddd --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/stex.tex @@ -0,0 +1,417 @@ +\documentclass{article} +\usepackage{a4wide,stex-logo} +\usepackage{textcomp,url,array,float,amsfonts} +\usepackage{listings} +\usepackage[show]{ed} +\usepackage[backref=true,hyperref=auto,style=alphabetic]{biblatex} +\bibliography{kwarc} +\usepackage{hyperref} +\makeindex +\floatstyle{boxed} +\newfloat{exfig}{thp}{lop} +\floatname{exfig}{Example} + +\def\ctancitesuffix{:ctan} +\def\ctancite#1{\cite{#1\ctancitesuffix}} +\def\meta#1{\textlangle\textit{#1}\textrangle} +\def\scsys#1{{{\sc #1}}\index{#1@{\sc #1}}} +\def\xslt{{\scsys{xslt}}} +\def\xml{\scsys{Xml}} +\def\mathml{\scsys{MathML}} +\def\omdoc{\scsys{OMDoc}} +\def\physml{\scsys{PhysML}} +\def\openmath{\scsys{OpenMath}} +\def\connexions{\scsys{Connexions}} +\def\latexml{\scsys{LaTeXML}} +\def\perl{\scsys{Perl}} +\def\cmathml{Content-{\sc MathML}\index{Content {\sc MathML}}\index{MathML@{\sc MathML}!content}} +\def\activemath{\scsys{ActiveMath}} +\def\twin#1#2{\index{#1!#2}\index{#2!#1}} +\def\twintoo#1#2{{#1 #2}\twin{#1}{#2}} +\def\atwin#1#2#3{\index{#1!#2!#3}\index{#3!#2 (#1)}} +\def\atwintoo#1#2#3{{#1 #2 #3}\atwin{#1}{#2}{#3}} + +% these macros are used in the short descriptions +\def\connexions{\scshape{Connexions}} +\def\cnxlatex{CNX\LaTeX} +\def\cnxml{\scshape{CNXml}} + +\title{{\stex}: Semantic Markup in {\TeX/\LaTeX}} +\author{Michael Kohlhase\\ + Jacobs University, Bremen\\ + \url{http://kwarc.info/kohlhase}} +\lstdefinelanguage{MathML}[]{XML}% +{morekeywords={math,semantics,annotation-xml,annotation, + maction, + mrow,mo,mi,mn, + apply,bvar,ci,cn,sep,csymbol, + condition,domainofapplication,lowlimit,uplimit,degree, + interval,inverse,lambda,compose,ident,domain,codomain,image, + piecewise, piece, otherwise, + quotient,factorial,divide,max,min,minus,plus,power,rem,times, root,gcd,lcm, + and,or,xor,not,implies,forall,exists, + abs,conjugate,arg,real,imaginary,floor,ceiling, + sin,cos,tan,sec,csc,cot,sinh,cosh,tanh,sech,csch,coth, + arcsin,arccos,arctan,arccosh,arccot,arccoth,arccsc,arccsch,arcsec,arcsech,arcsinh,arctanh, + eq,neq,gt,lt,geq,leq,equivalent,approx,factorof, + int,diff,partialdiff,divergence,grad,curl,laplacian, + set,list,union,intersect,in,notin,subset,prsubset,notsubset,notprsubset,setdiff,card,cartesianproduct, + sum,product,limit,tendsto,exp,ln,log,mean,sdev,variance,median,mode,moment,momentabout, + vector,matrix,matrixrow,determinant,transpose,selector,vectorproduct,scalarproduct,outerproduct, + integers,reals,rationals,naturalnumbers,complexes,primes, + exponentiale,imaginaryi,notanumber,true,false,emptyset,pi,eulergamma,infinity, + reln,fn,declare}, + sensitive=true} + +\begin{document} + \pagenumbering{roman} + \maketitle +\begin{abstract} + We present a collection of {\TeX} macro packages that allow to markup + {\TeX/\LaTeX} documents semantically without leaving the document format, + essentially turning {\TeX/\LaTeX} into a document format for mathematical + knowledge management (MKM). + \end{abstract} +\setcounter{tocdepth}{2}\tableofcontents +\clearpage +\pagenumbering{arabic} + +\section{Introduction} + +The last few years have seen the emergence of various content-oriented {\xml}-based, +content-oriented markup languages for mathematics on the web, e.g. +{\openmath}~\cite{BusCapCar:2oms04}, {\cmathml}~\cite{CarIon:MathML03}, or our own +{\omdoc}~\cite{Kohlhase:omfmd05}. These representation languages for mathematics, that +make the structure of the mathematical knowledge in a document explicit enough that +machines can operate on it. Other examples of content-oriented formats for mathematics +include the various logic-based languages found in automated reasoning tools +(see~\cite{RobVor:hoar01} for an overview), program specification languages (see +e.g.~\cite{Bergstra:as89}). + +The promise if these content-oriented approaches is that various tasks involved in ``doing +mathematics'' (e.g. search, navigation, cross-referencing, quality control, user-adaptive +presentation, proving, simulation) can be machine-supported, and thus the working +mathematician is relieved to do what humans can still do infinitely better than machines: +The creative part of mathematics --- inventing interesting mathematical objects, +conjecturing about their properties and coming up with creative ideas for proving these +conjectures. However, before these promises can be delivered upon (there is even a +conference series~\cite{MKM-IG-Meetings:online} studying ``Mathematical Knowledge +Management (MKM)''), large bodies of mathematical knowledge have to be converted into +content form. + +Even though {\mathml} is viewed by most as the coming standard for representing +mathematics on the web and in scientific publications, it has not not fully taken off in +practice. One of the reasons for that may be that the technical communities that need +high-quality methods for publishing mathematics already have an established method which +yields excellent results: the {\TeX/\LaTeX} system: and a large part of mathematical +knowledge is prepared in the form of {\TeX}/{\LaTeX} documents. + +{\TeX}~\cite{Knuth:ttb84} is a document presentation format that combines complex +page-description primitives with a powerful macro-expansion facility, which is utilized in +{\LaTeX} (essentially a set of {\TeX} macro packages, see~\cite{Lamport:ladps94}) to +achieve more content-oriented markup that can be adapted to particular tastes via +specialized document styles. It is safe to say that {\LaTeX} largely restricts content +markup to the document structure\footnote{supplying macros e.g. for sections, paragraphs, + theorems, definitions, etc.}, and graphics, leaving the user with the presentational +{\TeX} primitives for mathematical formulae. Therefore, even though {\LaTeX} goes a great +step into the direction of an MKM format, it is not, as it lacks infrastructure for +marking up the functional structure of formulae and mathematical statements, and their +dependence on and contribution to the mathematical context. + +\subsection{The {\xml} vs. {\TeX/\LaTeX} Formats and Workflows} + +{\mathml} is an {\xml}-based markup format for mathematical formulae, it is standardized +by the World Wide Web Consortium in {\cite{CarIon:MathML03}}, and is supported by the +major browsers. The {\mathml} format comes in two integrated components: presentation +{\mathml}\twin{presentation}{MathML} and content {\mathml}\twin{content}{MathML}. The +former provides a comprehensive set of layout primitives for presenting the visual +appearance of mathematical formulae, and the second one the functional/logical structure +of the conveyed mathematical objects. For all practical concerns, presentation {\mathml} +is equivalent to the math mode of {\TeX}. The text mode facilitates of {\TeX} (and the +multitude of {\LaTeX} classes) are relegated to other {\xml} formats, which embed +{\mathml}. + +The programming language constructs of {\TeX} (i.e. the macro definition +facilities\footnote{We count the parser manipulation facilities of {\TeX}, e.g. category + code changes into the programming facilities as well, these are of course impossible for + {\mathml}, since it is bound to {\xml} syntax.}) are relegated to the {\xml} +programming languages that can be used to develop language extensions. +transformation language {\xslt}~\cite{Deach:exls99,Kay:xpr00} or proper {\xml}-enabled +The {\xml}-based syntax and the separation of the presentational-, functional- and +programming/extensibility concerns in {\mathml} has some distinct advantages over the +integrated approach in {\TeX/\LaTeX} on the services side: {\mathml} gives us better +\begin{itemize} +\item integration with web-based publishing, +\item accessibility to disabled persons, e.g. (well-written) {\mathml} contains enough + structural information to supports screen readers. +\item reusability, searchabiliby and integration with mathematical software systems + (e.g. copy-and-paste to computer algebra systems), and +\item validation and plausibility checking. +\end{itemize} + +On the other hand, {\TeX/\LaTeX}/s adaptable syntax and tightly integrated programming +features within has distinct advantages on the authoring side: + +\begin{itemize} +\item The {\TeX/\LaTeX} syntax is much more compact than {\mathml} (see the difference in + Figure~\ref{fig:mathml-sum} and Equation ~\ref{eq:cmathml-sum}), and if needed, the + community develops {\LaTeX} packages that supply new functionality in with a succinct + and intuitive syntax. +\item The user can define ad-hoc abbreviations and bind them to new control sequences to + structure the source code. +\item The {\TeX/\LaTeX} community has a vast collection of language extensions and best + practice examples for every conceivable publication purpose and an established and very + active developer community that supports these. +\item There is a host of software systems centered around the {\TeX/\LaTeX} language that + make authoring content easier: many editors have special modes for {\LaTeX}, there are + spelling/style/grammar checkers, transformers to other markup formats, etc. +\end{itemize} + +In other words, the technical community is is heavily invested in the whole +{\index*{workflow}}, and technical know-how about the format permeates the +community. Since all of this would need to be re-established for a {\mathml}-based +workflow, the technical community is slow to take up {\mathml} over {\TeX/\LaTeX}, even in +light of the advantages detailed above. + +\subsection{A {\LaTeX}-based Workflow for {\xml}-based Mathematical Documents} + +An elegant way of sidestepping most of the problems inherent in transitioning from a +{\LaTeX}-based to an {\xml}-based workflow is to combine both and take advantage of the +respective advantages. + +The key ingredient in this approach is a system that can transform {\TeX\LaTeX} documents +to their corresponding {\xml}-based counterparts. That way, {\xml}-documents can be +authored and prototyped in the {\LaTeX} workflow, and transformed to {\xml} for +publication and added-value services, combining the two workflows. + +There are various attempts to solve the {\TeX/\LaTeX} to {\xml} transformation problem; the +most mature is probably Bruce Miller's {\latexml} system~\cite{Miller:latexml:online}. It +consists of two parts: a re-implementation of the {\TeX} {\index*{analyzer}} with all of +it's intricacies, and a extensible {\xml} emitter (the component that assembles the output +of the parser). Since the {\LaTeX} style files are (ultimately) programmed in {\TeX}, the +{\TeX} analyzer can handle all {\TeX} extensions, including all of {\LaTeX}. Thus the +{\latexml} parser can handle all of {\TeX/\LaTeX}, if the emitter is extensible, which is +guaranteed by the {\latexml} binding language: To transform a {\TeX/\LaTeX} document to a +given {\xml} format, all {\TeX} extensions\footnote{i.e. all macros, environments, and + syntax extensions used int the source document} must have ``{\latexml} +bindings''\index{LaTeXML}{binding}, i.e. a directive to the {\latexml} emitter that +specifies the target representation in {\xml}. + +\section{The Packages of the \protect\stex Collection}\label{sec:packages} + +In the following, we will shortly preview the packages and classes in the {\stex} +collection. They all provide part of the solution of representing semantic structure in +the {\TeX/\LaTeX} workflow. We will group them by the conceptual level they +address\ednote{come up with a nice overview figure here!} + +\subsection{Content Markup of Mathematical Formulae in {\TeX/\LaTeX}} + +The first two packages are concerned basically with the math mode in {\TeX}, +i.e. mathematical formulae. The underlying problem is that run-of-the-mill {\TeX/\LaTeX} +only specifies the presentation (i.e. what formulae look like) and not their content +(their functional structure). Unfortunately, there are no good methods (yet) to infer the +latter from the former, but there are ways to get presentation from content. + +Consider for instance the following ``standard notations''\footnote{The first one is + standard e.g. in Germany and the US, and the last one in France} for binomial +coefficients: $\left(n\atop k\right)$, $_nC^k$, $\mathcal{C}^n_k$ all mean the same thing: +$n!\over k!(n-k)!$. This shows that we cannot hope to reliably recover the functional +structure (in our case the fact that the expression is constructed by applying the +binomial function to the arguments $n$ and $k$) from the presentation alone. + +The solution to this problem is to dump the extra work on the author (after all she knows +what she is talking about) and give them the chance to specify the intended structure. The +markup infrastructure supplied by the {\stex} collection lets the author do this without +changing\footnote{However, semantic annotation will make the author more aware of the + functional structure of the document and thus may in fact entice the author to use + presentation in a more consistent way than she would usually have.} the visual +appearance, so that the {\LaTeX} workflow is not disrupted. . We speak of +{\twintoo{semantic}{preloading}} for this process and call our collection of macro +packages {\stex} (Semantic {\TeX}). For instance, we can now write +\begin{equation}\label{eq:cmathml-sum} + \verb|\CSumlLimits{k}1\infty{\Cexp{x}k}| \qquad\hbox{instead of the usual}\qquad + \verb|\sum_{k=1}^\infty x^k| +\end{equation} + +In the first form, we specify that you are applying a function (|CSumLimits| $\hat=$ Sum +with Limits) to 4 arguments: ({\sl{i}}) the bound variable $k$ (that runs from) +({\sl{ii}}) the number 1 (to) ({\sl{iii}}) $\infty$ (to infinity summing the terms) +({\sl{iv}}) \verb|\Cexp{x}k| (i.e. x to the power k). In the second form, we merely specify +hat {\LaTeX} should draw a capital Sigma character ($\sigma$) with a lower index which is +an equation $k=1$ and an upper index $\infty$. Then it should place next to it an $x$ with +an upper index $k$. + +Of course human readers (that understand the math) can infer the content structure from +this presentation, but the {\latexml} converter (who does not understand the math) cannot, +but we want to have the content {\mathml} expression in Figure~\ref{fig:mathml-sum} +\begin{exfig} +\begin{lstlisting}[language=MathML,belowskip=-1ex,aboveskip=-1ex] + + + + k + 1 + + xk + + +\end{lstlisting} + \caption{Content {\mathml} Form of $\sum_{k=1}^\infty x^k$}\label{fig:mathml-sum} +\end{exfig} + +Obviously, a converter can infer this from the first {\LaTeX} structure with the help of +the curly braces that indicate the argument structure, but not from the second (because it +does not understand the math). The nice thing about the |cmathml| infrastructure is that +you can still run {\LaTeX} over the first form and get the same formula in the DVI file +that you would have gotten from running it over the second form. That means, if the author +is prepared to write the mathematical formulae a little differently in her {\LaTeX} +sources, then she can use them in {\xml} and {\LaTeX} at the same time. + + +\subsubsection{{\texttt{cmathml}}: Encoding Content {\mathml} in {\TeX/\LaTeX}} + +The {\texttt{cmathml}} package (see~\ctancite{Kohlhase:tbscml}) provides a set of macros that +correspond to the K-14 fragment of mathematics (Kindergarten to undergraduate college +level ($\hat=14^{th}$ grade)). We have already seen an example above in equation +(\ref{eq:cmathml-sum}), where the content markup in {\TeX} corresponds to a content +{\mathml}-expression (and can actually be translated to this by the {\latexml} system.) +However, the content {\mathml} vocabulary is fixed in the {\mathml} specification and +limited to the K-14 fragment; the notation of mathematics of course is much larger and +extensible on the fly. + + +\subsubsection{{\tt{presentation}}: Flexible Presentation for Semantic Macros} + +The {\texttt{presentation}} package (see~\ctancite{Kohlhase:ipsmsl}) supplies an +infrastructure that allows to specify the presentation of semantic macros, including +preference-based bracket elision. This allows to markup the functional structure of +mathematical formulae without having to lose high-quality human-oriented presentation in +{\LaTeX}. Moreover, the notation definitions can be used by MKM systems for added-value +services, either directly from the {\sTeX} sources, or after translation. + +\subsection{Mathematical Statements} + +\subsubsection{{\tt{statements}}: Extending Content Macros for Mathematical Notation} + +The \texttt{statements} package (see\ctancite{Kohlhase:smms}) provides semantic markup +facilities for mathematical statements like Theorems, Lemmata, Axioms, Definitions, +etc. in {\stex} files. This structure can be used by MKM systems for added-value services, +either directly from the {\sTeX} sources, or after translation. + +\subsubsection{{\tt{sproof}}: Extending Content Macros for Mathematical Notation} + +The \texttt{sproof} package (see~\ctancite{Kohlhase:smp})supplies macros and environment +that allow to annotate the structure of mathematical proofs in {\stex} files. This +structure can be used by MKM systems for added-value services, either directly from the +{\sTeX} sources, or after translation. + + +\subsection{Context Markup for Mathematics} + +\subsubsection{{\tt{modules}}: Extending Content Macros for Mathematical Notation} + +The \texttt{modules} package (see~\ctancite{KohAmb:smmssl}) supplies a definition +mechanism for semantic macros and a non-standard scoping construct for them, which is +oriented at the semantic dependency relation rather than the document structure. This +structure can be used by MKM systems for added-value services, either directly from the +{\sTeX} sources, or after translation. + +\subsection{Mathematical Document Classes} + +\subsubsection{Connexions Modules} + +{\cnxlatex} (see~\ctancite{Kohlhase:clbscm}) is a collection of {\LaTeX} macros that allow +to write {\connexions} modules without leaving the {\LaTeX} workflow. Modules are authored +in {\cnxlatex} using only a text editor, transformed to PDF and proofread as usual. In +particular, the {\LaTeX} workflow is independent of having access to the {\connexions} +system, which makes {\cnxlatex} attractive for the initial version of single-author +modules. + + +For publication, {\cnxlatex} modules are transformed to {\cnxml} via the {\latexml} +translator and can be uploaded to the {\connexions} system. + +\subsubsection{OMDoc Documents} + +The \texttt{omdoc} package provides an infrastructure that allows to markup {\omdoc} +documents in {\LaTeX}. It provides \texttt{omdoc.cls}, a class with the and +{\texttt{omdocdoc.sty}} + +\subsection{Conclusion}\label{sec:concl} + +The {\stex} collection provides a set of semantic macros that extends the familiar and +time-tried {\LaTeX} workflow in academics until the last step of Internet publication of +the material. For instance, a {\connexions} module can be authored and maintained in +{\LaTeX} using a simple text editor, a process most academics in technical subjects are +well familiar with. Only in a last publishing step (which is fully automatic) does it get +transformed into the {\xml} world, which is unfamiliar to most academics. + +Thus, {\stex} can serve as a conceptual interface between the document author and MKM +systems: Technically, the semantically preloaded {\LaTeX} documents are transformed into +the (usually {\xml}-based) MKM representation formats, but conceptually, the ability to +semantically annotate the source document is sufficient. + +The {\stex} macro packages have been validated together with a case +study~\cite{Kohlhase04:stex}, where we semantically preload the course materials for a +two-semester course in Computer Science at Jacobs University Bremen and transform them to +the {\omdoc} MKM format. + +\subsection{Licensing, Download and Setup}\label{sec:setup} + +The {\stex} packages are licensed under the {\LaTeX} Project Public License~\cite{LPPL}, +which basically means that they can be downloaded, used, copied, and even modified by +anyone under a set of simple conditions (e.g. if you modify you have to distribute under a +different name). + +The {\stex} packages and classes can be obtained as a self-documenting {\LaTeX} packages: +To obtain a package {\meta{package}} download the files \meta{package}\texttt{.dtx} and +\meta{package}\texttt{.ins} from +\begin{center} + {\url{https://svn.kwarc.info/repos/kwarc/projects/stex/sty/stex/}\meta{package}/} +\end{center} +To extract the {\LaTeX} package \meta{package}\texttt{.sty} and the {\latexml} bindings in +\meta{package}\texttt{.ltxml}, run the {\LaTeX} formatter on \texttt{cmathml.ins}, e.g. by typing +\texttt{latex cmathml.ins} to a shell. To extract the documentation (the version of this document that +goes with the extracted package) run the {\LaTeX} formatter on \texttt{cmathml.dtx} e.g. by +typing \texttt{latex }\meta{package}\texttt{.dtx} to a shell. + +Usually, the {\stex} distribution will also have the newest versions of the files +\meta{package}\texttt{.sty}, \meta{package}\texttt{.ltxml}, and the documentation \meta{package}\texttt{.pdf} +pre-generated for convenience, so they can be downloaded directly from the URL above. + +To install the package, copy the file \meta{package}\texttt{.sty} somewhere, where +{\TeX}/{\LaTeX} can find it and rebuild {\TeX}'s file name database. This is done by +running the command \texttt{texhash} or \texttt{mktexlsr} (they are the same). In \texttt{MikTEX}, there is a +menu option to do this. + +\section{Utilities}\label{sec:utilities} + +To simplify dealing with {\stex} documents, we are providing a small collection of command +line utilities, which we will describe here. For details and downloads go to +{\url{http://kwarc.info/projects/stex}}. + +\begin{description} +\item[{\tt{msplit}}] splits an {\stex} file into smaller ones (one module per file) +\item[{\tt{rf}}] computes the ``reuse factor'', i.e. how often {\stex} modules are reused + over a collection of documents +\item[{\tt{sgraph}}] visualizes the module graph +\item[{\tt{sms}}] computes the {\stex} module signatures for a give {\stex} file +\item[{\tt{bms}}] proposes a sensible module structure for an un-annotated {\stex} file +\end{description} +\printbibliography +\end{document} +%%% Local Variables: +%%% mode: LaTeX +%%% TeX-master: t +%%% End: + +% LocalWords: hoc LaTeXML nC CSumLimits cmathml DVI th sproof dtx mikoslides +% LocalWords: ltxml pdf texhash mktexlsr MikTEX msplit rf sgraph sms bms un eq +% LocalWords: cnx omdoc pagenumbering maketitle setcounter tocdepth clearpage +% LocalWords: tableofcontents openmath omfmd05 Bergstra mathml ttb84 ladps94 +% LocalWords: xslt Deach exls99 xpr00 stex ednote mathcal twintoo CSumlLimits +% LocalWords: infty Cexp qquad hbox qquad exfig lstlisting belowskip aboveskip +% LocalWords: xmlns bvar bvar lowlimit cn cn lowlimit uplimit uplimit exp tt +% LocalWords: subsubsection texttt ctancite tbscml ipsmsl smms smp KohAmb +% LocalWords: smmssl cnxlatex clbscm cnxml omdoc.cls omdocdoc.sty concl +% LocalWords: printbibliography diff --git a/Master/texmf-dist/tex/latex/stex/workaddress/workaddress.sty b/Master/texmf-dist/tex/latex/stex/workaddress/workaddress.sty new file mode 100644 index 00000000000..4dc956dd97f --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/workaddress/workaddress.sty @@ -0,0 +1,136 @@ +%% +%% This is file `workaddress.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% workaddress.dtx (with options: `package') +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{workaddress}[2012/01/28 v0.4 WorkAddress] +\DeclareOption{showmeta}{\PassOptionsToPackage{\CurrentOption}{metakeys}} +\ProcessOptions +\RequirePackage{sref} +\RequirePackage{pgf} +\addmetakey{wa@person}{id} +\addmetakey{wa@person}{birthdate} +\addmetakey{wa@person}{email} +\addmetakey{wa@person}{url} +\addmetakey{wa@person}{affiliation} +\addmetakey{wa@person}{personaltitle} +\addmetakey{wa@person}{academictitle} +\addmetakey{wa@person}{department} +\addmetakey{wa@person}{workaddress} +\addmetakey{wa@person}{privaddress} +\addmetakey{wa@person}{worktel} +\addmetakey{wa@person}{privtel} +\addmetakey{wa@person}{workfax} +\addmetakey{wa@person}{privfax} +\addmetakey{wa@person}{worktelfax} +\addmetakey{wa@person}{privtelfax} +\def\wa@def#1#2#3#4{\expandafter\xdef\csname wa@#1@#2@#3\endcsname{#4}} +\def\wa@ref@test#1#2#3{% +\@ifundefined{wa@#1@#2@#3}% +{\PackageError{workaddress}{reference to undefined #3 of #1 #2}% +{you must define a #1 with #2=#3\MessageBreak% +via the macro \protect\WA#1, before you can use it!}} +{}} +\def\wa@ref#1#2#3{\wa@ref@test{#1}{#2}{#3}\csname wa@#1@#2@#3\endcsname} +\let\wa@persons=\relax +\newcommand{\WAperson}[2][]{\metasetkeys{wa@person}{#1} +\ifx\wa@person@id\@empty\@latex@warning{key 'id' undefined in WAperson}\else +\wa@def{person}\wa@person@id{id}{\wa@person@id}% redundant, but useful for checking +\wa@def{person}\wa@person@id{name}{#2} +\wa@def{person}\wa@person@id{email}{\wa@person@email} +\wa@def{person}\wa@person@id{birthdate}{\wa@person@birthdate} +\wa@def{person}\wa@person@id{url}{\wa@person@url} +\wa@def{person}\wa@person@id{affiliation}{\wa@person@affiliation} +\wa@def{person}\wa@person@id{workaddress}{\wa@person@workaddress} +\wa@def{person}\wa@person@id{privaddress}{\wa@person@privaddress} +\wa@def{person}\wa@person@id{personaltitle}{\wa@person@personaltitle} +\wa@def{person}\wa@person@id{academictitle}{\wa@person@academictitle} +\wa@def{person}\wa@person@id{department}{\wa@person@department} +\wa@def{person}\wa@person@id{workaddress}{\wa@person@workaddress} +\wa@def{person}\wa@person@id{privaddress}{\wa@person@privaddress} +\wa@def{person}\wa@person@id{worktel}{\wa@person@worktel} +\wa@def{person}\wa@person@id{privtel}{\wa@person@privtel} +\wa@def{person}\wa@person@id{workfax}{\wa@person@workfax} +\wa@def{person}\wa@person@id{privfax}{\wa@person@privfax} +\wa@def{person}\wa@person@id{worktelfax}{\wa@person@worktelfax} +\wa@def{person}\wa@person@id{privtelfax}{\wa@person@privtelfax} +\@ifundefined{wa@persons} +{\xdef\wa@persons{\wa@person@id}} +{\xdef\wa@persons{\wa@persons,\wa@person@id}} +\fi} +\newcommand\DCMperson[2][]{\WAperson[#1]{#2}% +\PackageWarning{workaddress}{\protect\DCMperson\space is deprecated, use \protect\WAperson\space instead}} +\addmetakey{wa@institution}{id} +\addmetakey{wa@institution}{shortname} +\addmetakey{wa@institution}{acronym} +\addmetakey{wa@institution}{url} +\addmetakey{wa@institution}{partof} +\addmetakey{wa@institution}{countryshort} +\addmetakey{wa@institution}{logo} +\addmetakey{wa@institution}{streetaddress} +\addmetakey{wa@institution}{townzip} +\addmetakey{wa@institution}{type} +\addmetakey{wa@institution}{country} +\let\wa@institutions=\relax +\newcommand{\WAinstitution}[2][]{\metasetkeys{wa@institution}{#1} +\ifx\wa@institution@id\@empty\@latex@warning{key 'id' undefined in WAinstitution}\else +\wa@def{institution}\wa@institution@id{id}{\wa@institution@id}% redundant, but useful for checking +\wa@def{institution}\wa@institution@id{name}{#2} +\wa@def{institution}\wa@institution@id{shortname}{\wa@institution@shortname} +\wa@def{institution}\wa@institution@id{acronym}{\wa@institution@acronym} +\wa@def{institution}\wa@institution@id{url}{\wa@institution@url} +\wa@def{institution}\wa@institution@id{partof}{\wa@institution@partof} +\wa@def{institution}\wa@institution@id{countryshort}{\wa@institution@countryshort} +\wa@def{institution}\wa@institution@id{logo}{\wa@institution@logo} +\wa@def{institution}\wa@institution@id{townzip}{\wa@institution@townzip} +\wa@def{institution}\wa@institution@id{streetaddress}{\wa@institution@streetaddress} +\wa@def{institution}\wa@institution@id{country}{\wa@institution@country} +\wa@def{institution}\wa@institution@id{type}{\wa@institution@type} +\@ifundefined{wa@institutions} +{\xdef\wa@institutions{\wa@institution@id}} +{\xdef\wa@institutions{\wa@institutions,\wa@institution@id}} +\fi} +\newcommand\DCMinstitution[2][]{\WAinstitution[#1]{#2}% +\PackageWarning{workaddress}{\protect\DCMinstitution\space is deprecated, use \protect\WAinstitution\space instead}} +\addmetakey[false]{WAauthorblock}{dept}[true] +\addmetakey[false]{WAauthorblock}{aff}[true] +\addmetakey[false]{WAauthorblock}{url}[true] +\def\@true{true} +\newcounter{authors} +\newcommand\WAauthorblock[2][]{% +\metasetkeys{WAauthorblock}{#1} +{\let\tabularnewline\relax + \@for\@I:=#2\do{\stepcounter{authors}} + \def\@authors{}\def\@affs{}\def\@depts{}\def\@urls{} + \@for\@I:=#2\do + {\xdef\@authors{\@authors&\wa@ref{person}\@I{name}} + \xdef\@@dept{\wa@ref{person}\@I{department}} + \xdef\@shortname{\csname wa@institution@\@@dept @shortname\endcsname} + \xdef\@dept{\ifx\@shortname\@empty\wa@ref{institution}\@@dept{name}\else\@shortname\fi} + \xdef\@depts{\@depts&\@dept} + \xdef\@@aff{\wa@ref{person}\@I{affiliation}} + \xdef\@shortname{\csname wa@institution@\@@aff @shortname\endcsname} + \xdef\@aff{\ifx\@shortname\@empty\wa@ref{institution}\@@aff{name}\else\@shortname\fi} + \xdef\@affs{\@affs&\@aff} + \xdef\@urls{\@urls&\wa@ref{person}\@I{url}}} + \message{\theauthors authors: \@authors}} + \begin{tabular}[t]{l*{\theauthors}{c}} + \@authors\\ + \ifx\WAauthorblock@dept\@true\@depts\\\fi + \ifx\WAauthorblock@aff\@true\@affs\\\fi + \ifx\WAauthorblock@url\@true\@urls\\\fi +\end{tabular}} +\newcommand\wapname[1]{\wa@ref{person}{#1}{name}} +\newcommand\waptname[1]{\wa@ref{person}{#1}{personaltitle} \wa@ref{person}{#1}{name}} +\newcommand\wa@institution@logo[2][]{% +\pgfdeclareimage[#1]{logo}{\wa@ref{institution}{#2}{logo}} +\IfFileExists{\wa@ref{institution}{#2}{logo}}% +{\pgfuseimage{logo}} +{\fbox{#2 logo}\message{still need logo for #2}}} +\endinput +%% +%% End of file `workaddress.sty'. diff --git a/Master/texmf-dist/tex/latex/stex/workaddress/workaddress.sty.ltxml b/Master/texmf-dist/tex/latex/stex/workaddress/workaddress.sty.ltxml new file mode 100644 index 00000000000..be79b087423 --- /dev/null +++ b/Master/texmf-dist/tex/latex/stex/workaddress/workaddress.sty.ltxml @@ -0,0 +1,63 @@ +# -*- CPERL -*- +package LaTeXML::Package::Pool; +use strict; +use LaTeXML::Global; +use LaTeXML::Package; +RequirePackage('sref'); + sub getKeyValue_noDelim { + my ($keyval,$key)=@_; + my $valuelist = $keyval && ToString($keyval->getValue($key)); + $valuelist =~ s/^{(.*)}$/$1/g if $valuelist; + return $valuelist; +} +sub ExportMetadata { + my $keys = shift; + my($id, $email,$affill,$address,$url,$name)=$keys + && map(getKeyValue_noDelim($keys,$_),qw(id email affiliation address url name)); + if ($id) { + AssignValue('WA_'.$id.'_email',$email,'global') if $email; + AssignValue('WA_'.$id.'_affiliation',$affill,'global') if $affill; + AssignValue('WA_'.$id.'_address',$email,'global') if $email; + AssignValue('WA_'.$id.'_url',$url,'global') if $url; + AssignValue('WA_'.$id.'_name',$name,'global') if $name; + } else {print STDERR "Warning: key 'id' undefined in \\WAperson\n"}; + return;}#$ +DefKeyVal('wa@person','id','Semiverbatim'); +DefKeyVal('wa@person','birthdate','Semiverbatim'); +DefKeyVal('wa@person','email','Semiverbatim'); +DefKeyVal('wa@person','url','Semiverbatim'); +DefKeyVal('wa@person','affiliation','Semiverbatim'); +DefKeyVal('wa@person','personaltitle','Semiverbatim'); +DefKeyVal('wa@person','academictitle','Semiverbatim'); +DefKeyVal('wa@person','department','Semiverbatim'); +DefKeyVal('wa@person','workaddress','Semiverbatim'); +DefKeyVal('wa@person','privaddress','Semiverbatim'); +DefKeyVal('wa@person','worktel','Semiverbatim'); +DefKeyVal('wa@person','privtel','Semiverbatim'); +DefKeyVal('wa@person','workfax','Semiverbatim'); +DefKeyVal('wa@person','privfax','Semiverbatim'); +DefKeyVal('wa@person','worktelfax','Semiverbatim'); +DefKeyVal('wa@person','privtelfax','Semiverbatim'); + +DefConstructor('\WAperson OptionalKeyVals:wa@person {}','', +afterDigest=>sub { + my ($stomach,$whatsit)=@_; + my $keys=$whatsit->getArg(1); + my $name=ToString($whatsit->getArg(2)); + $keys->setValue('name',$name); + ExportMetadata($keys); + return; +});#$ +DefKeyVal('wa@institution','id','Semiverbatim'); +DefKeyVal('wa@institution','url','Semiverbatim'); +DefKeyVal('wa@institution','partof','Semiverbatim'); +DefConstructor('\WAinstitution OptionalKeyVals:wa@institution {}','', +afterDigest=>sub { + my ($stomach,$whatsit)=@_; + my $keys=$whatsit->getArg(1); + my $name=ToString($whatsit->getArg(2)); + $keys->setValue('name',$name); + ExportMetadata($keys); + return; +});#$ +1; -- cgit v1.2.3