From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- info/examples/tip/mathenv.tip | 77 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 info/examples/tip/mathenv.tip (limited to 'info/examples/tip/mathenv.tip') diff --git a/info/examples/tip/mathenv.tip b/info/examples/tip/mathenv.tip new file mode 100644 index 0000000000..098d040c40 --- /dev/null +++ b/info/examples/tip/mathenv.tip @@ -0,0 +1,77 @@ +% This macro source file is from the four volume series +% "TeX in Practice" by Stephan von Bechtolsheim, published +% 1993 by Springer-Verlag, New York. +% Copyright 1993 Stephan von Bechtolsheim. +% No warranty or liability is assumed. +% This macro may be copied freely if no fees other than +% media cost or shipping charges are charged and as long +% as this copyright and the following source code itself +% is not changed. Please see the series for further information. +% +% Version: 1.0 +% Date: May 1, 1993 +% +% +% This source code is documented in 13.1.4, p. II-158. +% Original source in file "math1.TEX", starting line 211. +\wlog{L: "mathenv.tip" ["math1.TEX," l. 211, p. II-158]}% +% This file DOES belong to format "texip." +\def\BeginMath{% + \ifmath + \ifinner + \errmessage{\string\BeginMath: already in math + mode, \string\BeginMath ignored.}% + \else + \errmessage{\string\BeginMath: in display math + mode, terminated and math mode started.}% + $$ + $ + \fi + \else + $\relax + \fi +} +\def\EndMath{% + \ifmath + \ifinner + $% + \else + \errmessage{\string\EndMath: you are in display math + mode! Should have used \string\EndDisplayMath!}% + $$ + \fi + \else + \errmessage{\string\EndMath: already in math + mode, \string\EndMath ignored.}% + \fi +} +\def\BeginDisplayMath{% + \ifmath + \ifinner + \errmessage{\string\BeginDisplayMath: in inline + math mode, terminate it, start display math.}% + $ + $$ + \else + \errmessage{\string\BeginDisplayMath: already in math + mode, \string\BeginDisplayMath ignored.}% + \fi + \else + $$ + \fi +} +\def\EndDisplayMath{% + \ifmath + \ifinner + \errmessage{\string\EndDisplayMath: inline + math mode in effect, did you intend to + write \string\EndMath?}% + $% + \else + $$ + \fi + \else + \errmessage{\string\EndDisplayMath: not in math + mode, \string\EndDisplayMath ignored.}% + \fi +} -- cgit v1.2.3