diff options
author | Karl Berry <karl@freefriends.org> | 2012-03-30 23:23:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-03-30 23:23:02 +0000 |
commit | 849996eca72af498b48b10fbea7f14c4b9d21b8f (patch) | |
tree | 2d40d42dfc9fc0b0622212cc220868f98345305f /Master/texmf-dist/tex/latex/stex/cmath | |
parent | d82e1c23973fd0271f93686f487bd1cee8dcd947 (diff) |
restore stex (ca. 28jan12)
git-svn-id: svn://tug.org/texlive/trunk@25792 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/stex/cmath')
-rw-r--r-- | Master/texmf-dist/tex/latex/stex/cmath/cmath.sty | 29 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/stex/cmath/cmath.sty.ltxml | 55 |
2 files changed, 84 insertions, 0 deletions
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[]{}', + "<ltx:XMWrap role='ID' xml:id='&cvar_id(#1)'>#2</ltx:XMWrap>", + requireMath=>1); +# \vnref{<reference>} +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{<function>}{<(const)(,\1)*>} +# @#1(#2) +DefConstructor('\nappa{}{}', + "<ltx:XMApp>" + ."<ltx:XMTok meaning='#1' />" + ."<ltx:XMArg>#2</ltx:XMArg>" + ."</ltx:XMApp>"); + +# \@napp@seq{<function>}{start <const>}{end <const>} +# @#1(@sequence(#2,sequencefromto,#3)) +DefConstructor('\@napp@seq{}{}{}', + "<ltx:XMApp>" + ."<ltx:XMTok meaning='#1' />" + ."<ltx:XMArg>" + ."<ltx:XMApp>" + ."<ltx:XMTok meaning='sequence' />" + ."<ltx:XMArg>#2</ltx:XMArg>" + ."<ltx:XMArg><ltx:XMTok meaning='sequencefromto' /></ltx:XMArg>" + ."<ltx:XMArg>#3</ltx:XMArg>" + ."</ltx:XMApp>" + ."</ltx:XMArg>" + ."</ltx:XMApp>"); + +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; |