summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/onlyamsmath
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-12-31 22:36:12 +0000
committerKarl Berry <karl@freefriends.org>2006-12-31 22:36:12 +0000
commit4bce4544a9d409cae7156a9e8ec7c5cd83d03aee (patch)
tree40be61d36f6017c972004b7ebfe375423bb410e1 /Master/texmf-dist/tex/latex/onlyamsmath
parente7c4147cc5e3ed9a9baa218d7eebad637ff38800 (diff)
new (old) package onlyamsmath
git-svn-id: svn://tug.org/texlive/trunk@3067 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/onlyamsmath')
-rw-r--r--Master/texmf-dist/tex/latex/onlyamsmath/onlyamsmath.sty80
1 files changed, 80 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/onlyamsmath/onlyamsmath.sty b/Master/texmf-dist/tex/latex/onlyamsmath/onlyamsmath.sty
new file mode 100644
index 00000000000..adece4e23d6
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/onlyamsmath/onlyamsmath.sty
@@ -0,0 +1,80 @@
+%%
+%% This is file `onlyamsmath.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% onlyamsmath.dtx (with options: `package')
+%%
+%% onlyamsmath package
+%%
+%% Copyright 2001 Harald Harders
+%%
+%% This program can be redistributed and/or modified under the terms
+%% of the LaTeX Project Public License Distributed from CTAN
+%% archives in directory macros/latex/base/lppl.txt; either
+%% version 1 of the License, or any later version.
+%%
+%% h.harders@tu-bs.de
+%%
+\def\onlyamspackagename{onlyams}
+\def\onlyamsversion{0.04}
+\def\onlyamsfiledate{2001/10/04}
+\def\onlyamsdocdate{2001/10/04}
+\ProvidesPackage{onlyamsmath}[\onlyamsfiledate\space
+v\onlyamsversion\space destroy the standard math environments]
+\RequirePackage{amsmath}
+\newif\ifonlyams@eqnarray
+\DeclareOption{eqnarray}{\onlyams@eqnarraytrue}
+\newif\ifonlyams@all
+\DeclareOption{all}{
+ \onlyams@alltrue
+ \onlyams@eqnarraytrue
+}
+\newif\ifonlyams@error
+\onlyams@errortrue
+\DeclareOption{error}{\onlyams@errortrue}
+\DeclareOption{warning}{\onlyams@errorfalse}
+\ExecuteOptions{error}
+\ProcessOptions\relax
+\newcommand{\onlyams@error}[1]{%
+ \ifonlyams@error
+ \PackageError{onlyamsmath}{Environment #1 used}{Please use only the
+ environments provided by the amsmath package.}%
+ \else
+ \PackageWarning{onlyamsmath}{Environment #1 used, please use
+ \MessageBreak only the environments provided by the amsmath
+ \MessageBreak package}%
+ \fi
+}
+\ifonlyams@eqnarray
+ \let\onlyams@eqnarray\eqnarray
+ \def\eqnarray{%
+ \onlyams@error{eqnarray or eqnarray*}%
+ \onlyams@eqnarray}
+\fi
+\ifonlyams@all
+ \def\displaymath{%
+ \onlyams@error{displaymath}%
+ \[}
+\fi
+\def\dollarcode{\ifx\protect\@typeset@protect
+ \expandafter\futurelet\expandafter\next\expandafter\checkdsp
+ \else \expandafter$\fi}
+\begingroup
+\lccode`\~=`\$
+\lowercase{\endgroup\let~}\dollarcode
+\def\checkdsp{\ifx\next\dollarcode\expandafter\dspcomplain
+ \else\expandafter$\fi}
+\def\dspcomplain#1{%
+ \ifmmode
+ \expandafter \]%
+ \else
+ \onlyams@error{$$ $$}%
+ \expandafter \[
+ \fi}
+\AtBeginDocument{\catcode`\$=13 }
+
+\endinput
+%%
+%% End of file `onlyamsmath.sty'.