~ubuntu-branches/ubuntu/karmic/maxima/karmic

« back to all changes in this revision

Viewing changes to interfaces/emacs/imaxima/breqn097a/mathstyle.sty

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Sauthier
  • Date: 2009-07-13 15:38:41 UTC
  • mfrom: (3.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090713153841-gtux06oun30kuuo7
Tags: 5.17.1-1ubuntu1
* Merge from debian unstable, remaining changes (LP: #296643, LP: #242243):
   - debian/maxima-doc.doc-base.{tips, plotting}:
    + Use .shtml instead of .html to fix lintian errors.
   - debian/maxima-emacs.emacsen-install:
    + Install symlinks for source files rather than copying them.  This
      makes find-function work.
    + Install symlink for *.lisp so that we don't need to add
      /usr/share/emacs/site-lisp/maxima to load-path.
  - debian/maxima-emacs.emacsen-startup:
    + Remove use of /usr/share/emacs/site-lisp/maxima, since this
      causes load-path shadows and is not needed anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%%
 
2
%% This is file `mathstyle.sty',
 
3
%% generated with the docstrip utility.
 
4
%%
 
5
%% The original source files were:
 
6
%%
 
7
%% mathstyle.dtx  (with options: `package')
 
8
%% 
 
9
%% This is a generated file.
 
10
%% 
 
11
%% Copyright (C) 1997-2003 by Michael J. Downes
 
12
%% Copyright (C) 2007 by Morten Hoegholm <mh.ctan@gmail.com>
 
13
%% 
 
14
%% This work may be distributed and/or modified under the
 
15
%% conditions of the LaTeX Project Public License, either
 
16
%% version 1.3 of this license or (at your option) any later
 
17
%% version. The latest version of this license is in
 
18
%%    http://www.latex-project.org/lppl.txt
 
19
%% and version 1.3 or later is part of all distributions of
 
20
%% LaTeX version 2005/12/01 or later.
 
21
%% 
 
22
%% This work has the LPPL maintenance status "maintained".
 
23
%% 
 
24
%% This Current Maintainer of this work is Morten Hoegholm.
 
25
%% 
 
26
%% This work consists of the main source file mathstyle.dtx
 
27
%% and the derived files
 
28
%%    mathstyle.sty, mathstyle.pdf, mathstyle.ins, mathstyle.drv.
 
29
%% 
 
30
\ProvidesPackage{mathstyle}[2007/12/19 v0.84]
 
31
\providecommand\@saveprimitive[2]{%
 
32
  \begingroup
 
33
  \edef\@tempa{\string#1}\edef\@tempb{\meaning#1}%
 
34
  \ifx\@tempa\@tempb \global\let#2#1%
 
35
  \else
 
36
    \edef\@tempb{\meaning#2}%
 
37
    \ifx\@tempa\@tempb
 
38
    \else \@saveprimitive@a#1#2%
 
39
    \fi
 
40
  \fi
 
41
  \endgroup
 
42
}
 
43
\providecommand\@saveprimitive@a[2]{%
 
44
  \begingroup
 
45
  \def\@tempb##1#1##2{\edef\@tempb{##2}\@car{}}%
 
46
  \@tempb\nullfont{select font nullfont}%
 
47
    \topmark{\string\topmark:}%
 
48
    \firstmark{\string\firstmark:}%
 
49
    \botmark{\string\botmark:}%
 
50
    \splitfirstmark{\string\splitfirstmark:}%
 
51
    \splitbotmark{\string\splitbotmark:}%
 
52
    #1{\string#1}%
 
53
  \edef\@tempa{\expandafter\strip@prefix\meaning\@tempb}%
 
54
  \edef\@tempb{\meaning#1}%
 
55
  \ifx\@tempa\@tempb \global\let#2#1%
 
56
  \else
 
57
    \PackageError{mathstyle}%
 
58
      {Unable to properly define \string#2; primitive
 
59
      \noexpand#1no longer primitive}\@eha
 
60
    \fi
 
61
  \fi
 
62
  \endgroup
 
63
}
 
64
\chardef\mathstyle=\z@
 
65
\@saveprimitive\displaystyle\@@displaystyle
 
66
\@saveprimitive\textstyle\@@textstyle
 
67
\@saveprimitive\scriptstyle\@@scriptstyle
 
68
\@saveprimitive\scriptscriptstyle\@@scriptscriptstyle
 
69
\@saveprimitive\mathchoice\@@mathchoice
 
70
\@saveprimitive\over\@@over
 
71
\@saveprimitive\atop\@@atop
 
72
\@saveprimitive\above\@@above
 
73
\@saveprimitive\overwithdelims\@@overwithdelims
 
74
\@saveprimitive\atopwithdelims\@@atopwithdelims
 
75
\@saveprimitive\abovewithdelims\@@abovewithdelims
 
76
\DeclareRobustCommand{\displaystyle}{%
 
77
  \@@displaystyle \chardef\mathstyle\z@}
 
78
\DeclareRobustCommand{\textstyle}{%
 
79
  \@@textstyle \chardef\mathstyle\@ne}
 
80
\DeclareRobustCommand{\scriptstyle}{%
 
81
  \@@scriptstyle \chardef\mathstyle\tw@}
 
82
\DeclareRobustCommand{\scriptscriptstyle}{%
 
83
  \@@scriptscriptstyle \chardef\mathstyle\thr@@}
 
84
\begingroup \catcode`\^=7\relax \catcode`\_=8\relax % just in case
 
85
\lowercase{\endgroup
 
86
\let\@@superscript=^ \let\@@subscript=_
 
87
}%
 
88
\def\subsupstyle{%
 
89
  \ifnum\mathstyle<\tw@ \chardef\mathstyle\tw@
 
90
  \else \chardef\mathstyle\thr@@
 
91
  \fi
 
92
}
 
93
\let\mathsup=\@@superscript
 
94
\let\mathsub=\@@subscript
 
95
\def\sb#1{\mathsub{\protect\subsupstyle#1}}%
 
96
\def\sp#1{\mathsup{\protect\subsupstyle#1}}%
 
97
\def\mathchoice{%
 
98
  \relax\ifcase\mathstyle
 
99
    \expandafter\@firstoffour
 
100
  \or
 
101
    \expandafter\@secondoffour
 
102
  \or
 
103
    \expandafter\@thirdoffour
 
104
  \else
 
105
    \expandafter\@fourthoffour
 
106
  \fi
 
107
}
 
108
\providecommand\@firstoffour[4]{#1}
 
109
\providecommand\@secondoffour[4]{#2}
 
110
\providecommand\@thirdoffour[4]{#3}
 
111
\providecommand\@fourthoffour[4]{#4}
 
112
\DeclareRobustCommand\genfrac[6]{%
 
113
  {\fracstyle #1%
 
114
    {\begingroup #5\endgroup
 
115
      \csname @@\ifx\maxdimen#4\maxdimen over\else above\fi
 
116
        \if @#2@\else withdelims\fi\endcsname #2#3#4\relax
 
117
     #6}%
 
118
  }%
 
119
}
 
120
\renewcommand{\frac}{\genfrac{}{}{}{}}
 
121
\providecommand{\dfrac}{}
 
122
\providecommand{\tfrac}{}
 
123
\renewcommand{\dfrac}{\genfrac\displaystyle{}{}{}}
 
124
\renewcommand{\tfrac}{\genfrac\textstyle{}{}{}}
 
125
\providecommand{\binom}{}
 
126
\providecommand{\tbinom}{}
 
127
\providecommand{\dbinom}{}
 
128
\renewcommand{\binom}{\genfrac{}(){0pt}}
 
129
\renewcommand{\dbinom}{\genfrac\displaystyle(){0pt}}
 
130
\renewcommand{\tbinom}{\genfrac\textstyle(){0pt}}
 
131
\def\fracstyle{\ifcase\mathstyle
 
132
    \chardef\mathstyle=\@ne
 
133
  \or
 
134
    \chardef\mathstyle=\tw@
 
135
  \else
 
136
    \chardef\mathstyle=\thr@@
 
137
  \fi
 
138
}
 
139
\def\currentmathstyle{%
 
140
  \ifcase\mathstyle
 
141
    \@@displaystyle
 
142
  \or
 
143
    \@@textstyle
 
144
  \or
 
145
    \@@scriptstyle
 
146
  \or
 
147
    \@@scriptscripstyle
 
148
  \fi}
 
149
\DeclareOption{mathactivechars}{\catcode`\^=7\relax \catcode`\_=8\relax }
 
150
\DeclareOption{activechars}{\catcode`\^=13\relax \catcode`\_=13\relax }
 
151
\ProcessOptions\relax
 
152
\ifnum\catcode`\^=13\relax
 
153
  \let^=\sp \let_=\sb
 
154
\else
 
155
  \mathcode`\^="8000\relax \mathcode`\_="8000\relax
 
156
  \begingroup \catcode`\^=\active \catcode`\_=\active
 
157
  \global\let^=\sp \global\let_=\sb
 
158
  \endgroup
 
159
\fi
 
160
\endinput
 
161
%%
 
162
%% End of file `mathstyle.sty'.