tridefs.tex 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. \relax
  2. % ======================================================================
  3. % T h e T e X - R e d u c e - I n t e r f a c e: TeX-Module
  4. % ======================================================================
  5. % (C) 1987 by Rechenzentrum der Universitaet zu Koeln
  6. % (University of Cologne Computer Center)
  7. % Abt. Anwendungssoftware
  8. % (Application Software Department)
  9. % Robert-Koch-Str. 10
  10. % 5000 Koeln 41
  11. % Federal Republic of Germany
  12. % e-mail: reduce@rrz.uni-koeln.de
  13. % All rights reserved. Permission to copy without fee all or part of
  14. % this software product is hereby granted provided that the copies are
  15. % not made or distributed for direct commercial advantage, this copy-
  16. % right notice and its date appear, and notice is given that copying is
  17. % by permission of the authors. To copy otherwise requires a fee and/or
  18. % specific permission.
  19. % ======================================================================
  20. % 25-Jul-89 Author: Werner Antweiler Version 0.10
  21. % ======================================================================
  22. %
  23. \def\frac#1#2{{#1\over#2}}
  24. \def\CO{,}\def\<{\langle}\def\>{\rangle}\def\d{\hbox{\rm d}}
  25. \newcount\parenthesis \parenthesis=0 \newcount\n
  26. \def\({\global\advance\parenthesis by1\left(}
  27. \def\){\global\advance\parenthesis by-1\right)}
  28. \def\{{\global\advance\parenthesis by1\left\lbrace}
  29. \def\}{\global\advance\parenthesis by-1\right\rbrace}
  30. \def\[{\relax} % dummy parenthesis
  31. \def\]{\relax} % dummy parenthesis
  32. \def\Loop#1\Repeat{\global\n=0\global\let\body=#1\iterate}
  33. \def\iterate{\body\let\next=\iterate\else\let\next=\relax\fi\next}
  34. \def\ldd{\ifnum\n<\parenthesis\global\advance\n by1
  35. \left.\nulldelimiterspace=0pt\mathsurround=0pt}
  36. \def\rdd{\ifnum\n<\parenthesis\global\advance\n by1
  37. \right.\nulldelimiterspace=0pt\mathsurround=0pt}
  38. \def\nl{\Loop\rdd\Repeat\hfill\cr\qdd\Loop\ldd\Repeat{}}
  39. \def\OFF#1{\hskip#1sp\relax}
  40. \def\off#1{\hskip#1sp\relax}
  41. \def\Nl{\hfill\cr}
  42. \def\qdd{\quad\quad}
  43. % ---------------- special code for TRI examples --------------
  44. \newcount\exacount\exacount=0\font\caps=cmcsc10
  45. \def\Istrut{\vrule height11pt depth4pt width0pt}
  46. \def\TRIexa#1#2#3#4{\global\advance\exacount by1\par\filbreak
  47. {\offinterlineskip
  48. \vbox{\hrule\hbox to\hsize{\Istrut\vrule
  49. \hbox to 8mm{\hfil\caps\the\exacount\hfil}\vrule
  50. \quad\rm#1\hfill\vrule
  51. \hbox to 32mm{\hfill{\caps Mode: }{\tt #2}\hfill}\vrule
  52. \hbox to 32mm{\hfill{\caps Tolerance: }{\tt #3}\hfill}\vrule}
  53. \hrule\hbox to\hsize{\Istrut\vrule\hfill#4\hfill\vrule}\hrule}
  54. }\nobreak}
  55. % End.