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/tex/latex/stex/cmath/cmath.sty | 29 ++++++++++++ .../tex/latex/stex/cmath/cmath.sty.ltxml | 55 ++++++++++++++++++++++ 2 files changed, 84 insertions(+) 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 (limited to 'Master/texmf-dist/tex/latex/stex/cmath') 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; -- cgit v1.2.3