-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexmath.sty
More file actions
executable file
·427 lines (365 loc) · 18.2 KB
/
exmath.sty
File metadata and controls
executable file
·427 lines (365 loc) · 18.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
% This file defines the `exmath` package
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{exmath}[2020/11/12 Extended math commands]
\DeclareOption{english}{%
\def\@theorem@mark{Theorem}
\def\@definition@mark{Definition}
\def\@proposition@mark{Proposition}
\def\@lemma@mark{Lemma}
\def\@corollary@mark{Corollary}
\def\@proof@mark{Proof}
\def\@example@mark{Example}
\def\@note@mark{Note}
\def\@notation@mark{Notation}
\def\@remark@mark{Remark}
\def\@claim@mark{Afirmación}
}
\DeclareOption{spanish}{%
\def\@theorem@mark{Teorema}
\def\@definition@mark{Definición}
\def\@proposition@mark{Proposición}
\def\@lemma@mark{Lema}
\def\@corollary@mark{Corolario}
\def\@proof@mark{Demostración}
\def\@example@mark{Ejemplo}
\def\@note@mark{Nota}
\def\@notation@mark{Notación}
\def\@remark@mark{Observación}
\def\@claim@mark{Claim}
}
\DeclareOption{usechapters}{\def\@usechapters{true}}
\DeclareOption{nochapters}{\def\@usechapters{false}}
\DeclareOption{theoremnoframe}{\def\@theoremstyle{noframe}}
\DeclareOption{theoremframed}{\def\@theoremstyle{framed}}
\DeclareOption{theoremhighlight}{\def\@theoremstyle{highlight}}
\DeclareOption{boldvec}{\def\@vectorstyle{bold}}
\DeclareOption{arrowvec}{\def\@vectorstyle{arrow}}
\DeclareOption{boldarrowvec}{\def\@vectorstyle{boldarrow}}
\ExecuteOptions{english, usechapters, theoremframed}
\ProcessOptions\relax
\RequirePackage{amsmath, amssymb, amsthm, amsfonts} % Meth stuff
\RequirePackage{systeme} % Systems of equations
\RequirePackage{cancel} % Cancel an expression with an arrow
\RequirePackage{physics} % Cool things used in physics
\RequirePackage{siunitx} % Units
\RequirePackage{bm} % Bold math
\RequirePackage{bbm} % More bold math
\RequirePackage[osf, sc]{mathpazo} % Fixes stuff
\RequirePackage{mathtools} % Fixes more stuff
\RequirePackage[framemethod=TikZ]{mdframed} % Frames for theorems, proofs, etc.
\RequirePackage{xargs}
\RequirePackage{imakeidx} % Create indexes
\RequirePackage{tocloft} % Tables of content
\RequirePackage{ifthen} % If then else structure
\RequirePackage{xspace} % Fix space after some commands
\RequirePackage{etoolbox} % Fix stuff
\RequirePackage{xstring} % Macros to work with strings
%\RequirePackage{fdsymbol} % Better QED symbol. This breaks the code.
% ----- General corrections and redefinitions
\DeclareSymbolFont{bbold}{U}{bbold}{m}{n}
\DeclareSymbolFontAlphabet{\mathbbold}{bbold}
\let\svlim\lim\def\lim{\svlim\limits} % Put x\to\infty below \lim
\let\epsilon\varepsilon
\let\oldstylenums\oldstyle
\let\oldensuremath\ensuremath
\renewcommand{\ensuremath}[1]{\oldensuremath{#1}\xspace}
\newcommand{\dm}[1]{\(#1\xspace\)}
% Easily define new math operators
\newcommand\argp[1]{\argopen(#1\argclose)}
\newcommand\mop[2]{\operatorname{#1}\argp{#2}}
\let\oldexists\exists\renewcommand\exists{\oldexists\,}
%\let\oldforall\forall\renewcommand\forall{\oldforall\,}
% ----- Operators and quantifiers
\newcommand{\bydef}{\triangleq} % By definition
\newcommand{\qeq}{\overset{?}{=}} % Equal?
\newcommand{\st}{\; | \;} % Such that
%\newcommand{\st*}{\; : \;} % Alternative such that
\newcommand{\uexists}{\exists\, !\;} % Exists and it's unique
\newcommand{\conj}[1]{\overline{#1}} % Conjugate
\newcommand{\floor}[1]{\left\lfloor #1 \right\rfloor} % Floor
\newcommand{\rela}{\mathcal{R}} % Relation
%\renewcommand{\abs}[1]{\left\vert #1 \right\vert} % Absolute value
\newcommand{\invers}[1]{#1 ^{-1}} % Inverse
\renewcommand\neg{\lnot} % Logic negation
% Cooler greater (lower) or equal to symbols
\let\leq\leqslant
\let\nleq\nleqslant
\let\geq\geqslant
\let\ngeq\ngeqslant
% ----- Logical operators
\renewcommand\implies{\Longrightarrow} % Implies
\newcommand\impliesdef{\overset{\textrm{def}}{\implies}} % Implies by definition
\newcommand\nimplies{\not\implies} % Not implies
\newcommand\qimplies{\quad\implies\quad} % Implies, but with extra space
\renewcommand\impliedby{\Longleftarrow} % Implied by
\newcommand\impliedbydef{\overset{\textrm{def}}{\impliedby}} % Implied by definition
\newcommand\nimpliedby{\not\impliedby} % Not implied by
\newcommand\qimpliedby{\quad\impliedby\quad} % Implied by, but with extra space
\renewcommand\iff{\Longleftrightarrow} % If and only if / Equivalent
\newcommand\iffdef{\overset{\textrm{def}}{\iff}} % Equivalent by definition
\renewcommand\land{\wedge} % Logical AND
\renewcommand\lor{\vee} % Logical OR
% ----- Discrete math
\newcommand\N{\ensuremath{\mathbb{N}}\xspace} % Naturals
\newcommand\Z{\ensuremath{\mathbb{Z}}\xspace} % Integers
\newcommand\Q{\ensuremath{\mathbb{Q}}\xspace} % Rationals
\newcommand\R{\ensuremath{\mathbb{R}}\xspace} % Reals
\newcommand\C{\ensuremath{\mathbb{C}}\xspace} % Complex
\renewcommand\O{\ensuremath{\varnothing}\xspace} % Empty set
\newcommand\set[1]{\{ #1 \}} % Set
\newcommand\appl[3]{#1 : #2\longrightarrow #3} % Application
\newcommand\stdf{\ensuremath{\appl{f}{X}{Y}}\xspace} % Standard function
\newcommand\vappl[3]{\vec{#1} : #2\longrightarrow #3} % Vector-valued function
\newcommand\dom[1]{\mathcal{D}\argp{#1}} % Cooler domain
\newcommand\image[1]{\mathcal{R}\argp{#1}} % Range / Image
\newcommand\parts[1]{\mathcal{P}\left( #1 \right)} % Partitions of a set / Power set
\newcommand\uset{\mathcal{U}} % Universal set
\newcommand\SP[1]{\ensuremath{\mathcal{P}}\argp{#1}} % Super set
\newcommand\minuszero{\setminus\set{0}} % Set minus 0
\newcommand\cset[1]{\overline{#1}} % Complementary set
\newcommand\ccset[1]{{#1}^C} % Complementary set
\newcommand\comb[2]{\left( \begin{matrix} #1 \\ #2 \end{matrix} \right)} % Binomial coefficient
\newcommand{\Rtn}{\R^n} % n-dimensional Euclidean space
\newcommand{\field}{\ensuremath{\mathbb{F}}\xspace} % Field
% ----- Vectors and vector analysis macros
\renewcommand\vec[1]{\mathbf{#1}}
\newcommand{\cvec}[1]{\begin{bmatrix} #1 \end{bmatrix}}
\newcommand{\rvec}[1]{\begin{bmatrix} #1 \end{bmatrix}^T}
\newcommand{\tvec}[1]{\left( #1 \right)^T}
\newcommand\uvec[1]{\vec{\hat{#1}}}
\newcommand\stdvf{\appl{f}{\R^n}{\R^m}} % Standard vector-valued function
\newcommand\gmvf{f\left(x_1, \ldots, x_n\right)} % f(x_1, ..., x_n)
\newcommand\fgraph[1]{\mathcal{G}\argopen(#1\argclose)} % Graph of a function
\newcommand\levelset[2]{L_{#1}\argopen(#2\argclose)} % Level set of value #1 for the function #2
\newcommand\ihat{\uvec{i}}
\newcommand\jhat{\uvec{j}}
\newcommand\khat{\uvec{k}}
\newcommand\Jac[1]{\vec{J}\argopen(#1\argclose)} % Jacobian
\newcommand\Hes[1]{\mathbf{H}\argopen(#1\argclose)} % Hessian
% Calculus / Analysis
% \newcommand{\deriv}[2]{\frac{\dif #1}{\dif #2}} % 1: f; 2: var
\newcommand\partialdv[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\liminft}[1]{\lim_{{#1}\rightarrow\infty}}
\newcommand{\mylim}[3]{\lim_{#1 \rightarrow #2} #3} % 1: vec; 2: to; 3: var;
\DeclareMathOperator{\rot}{rot}
\DeclareMathOperator{\diver}{div}
% ----- Topology
\newcommand\oball[2]{B_{#1}\argp{#2}} % Open ball of radius #1 centered at #2
\newcommand\cball[2]{\overline{B_{#1}}\argp{#2}} % Closed ball of radius #1 centered at #2
\newcommand\interior[1]{\mop{int}{#1}} % Interior of a set
\newcommand\exterior[1]{\mop{ext}{#1}} % Exterior of a set
\newcommand\frontier[1]{\partial #1} % Frontier / boundary of a set
\newcommand\closure[1]{\overline{#1}} % Closure of a set
% ----- Linear algebra macros
\let\kernel\ker\renewcommand\ker[1]{\mop{ker}{#1}} % Kernel
\newcommand\nullity[1]{\mop{nullity}{#1}} % Nullity
\newcommand\nullsp[1]{\mop{Null}{#1}} % Null space
\renewcommand\rank[1]{\mop{rank}{#1}} % Rank
\newcommand\rg[1]{\mop{rg}{#1}} % Range
\newcommand\range[1]{\mop{range}{#1}} % Range
\newcommand\ensp[1]{\mop{End}{#1}} % Space of endomorphisms
\let\dimension\dim\renewcommand\dim[1]{\mop{dim}{#1}} % Dimension
\newcommand\gen[1]{\langle #1 \rangle} % Generated by
\newcommand\stdlt{\ensuremath{\appl{T}{V}{W}}\xspace} % Standard linear transformation
\newcommand\gea[1]{\underset{\longrightarrow}{\scriptsize #1}} % Gaussian elimination arrow
\newcommand\mtrans[1]{{#1}^{T}} % Transposed matrix
\newcommand\ovproj[2]{\operatorname{proj}_{#1}\argp{#2}} % Orthogonal vector projection of #2 over #1
% BACKUP DEFINITIONS FOR TESTING
%\newcommand\gen[1]{\langle #1 \rangle} % Generated by
%\newcommand\stdlt{\ensuremath{\appl{T}{V}{W}}\xspace} % Standard linear transformation
%\let\kernel\ker % Redefine old kernel macro
%\renewcommand\ker[1]{\operatorname{ker}\left( #1 \right)} % Kernel
%\newcommand\nullity[1]{\operatorname{nullity}\left( #1 \right)} % Nullity
%\newcommand\nullsp[1]{\operatorname{null}\left( #1 \right)} % Null space
%\renewcommand\rank[1]{\operatorname{rank}\left( #1 \right)} % Rank
%\newcommand\rg[1]{\operatorname{rg}\left( #1 \right)} % Range
%\newcommand\range[1]{\operatorname{range}\left( #1 \right)} % Range
%\renewcommand\endosp[1]{\operatorname{End}\left( #1 \right)} % Space of endomorphisms
%\newcommand\gea[1]{\underset{\longrightarrow}{\scriptsize #1}} % Gaussian elimination arrow
%\newcommand{\mtrans}[1]{{#1}^{T}}
%\let\dimension\dim % Refine old dimension macro
%\renewcommand{\dim}[1]{\operatorname{dim}\left( #1 \right)} % Dimension
%\DeclareMathOperator{\rg}{Rg}
%\DeclareMathOperator{\kernel}{Ker}
%\DeclareMathOperator{\rankm}{Rank}
%\DeclareMathOperator{\image}{Im}
%\newcommand{\nullity}[1]{\mop{nullity}\left( #1 \right)}
%\renewcommand{\rank}[1]{\mop{rank}\left( #1 \right)}
\newcommand\bigzero{\text{\Large O}}
\newcommand\innerp[1]{\langle #1 \rangle} % Inner product
\newcommand\vnorm[1]{\left\Vert #1 \right\Vert} % Norm
% ----- Miscellanea
\newcommand\wtf{(\textrm{wtf}?)}
\newcommand\brackets[1]{\left[ #1 \right]}
% ----- Other
\newcommand{\eqreason}[2][=]{\underset{\substack{\vspace{6pt} \uparrow \\ \mathrlap{\wrapreasontext{#2}}}}{#1}}
\newcommand{\eqreasonup}[2][=]{\overset{\substack{\mathrlap{\wrapreasontext{#2}} \\ \vspace{4pt} \downarrow}}{#1}}
% ----- Theorem-like environments
\newcommand{\IS}{}
\def\toggle@IS@print{\renewcommand{\IS}{ }}
\def\toggle@IS@index{\renewcommand{\IS}{!}}
\ifthenelse{\equal{\@usechapters}{false}}{%
\newcounter{thm}[section]\setcounter{thm}{0}
\newcounter{def}[section]\setcounter{def}{0}
\renewcommand{\thethm}{\thesection.\arabic{thm}}
\renewcommand{\thedef}{\thesection.\arabic{def}}
\numberwithin{thm}{section}
\numberwithin{def}{section}
\numberwithin{equation}{section}
\message{Using section numbering for theorems and definitions}
}{%
\newcounter{thm}[chapter] \setcounter{thm}{0}
\newcounter{def}[chapter] \setcounter{def}{0}
\renewcommand{\thethm}{\thechapter.\arabic{thm}}
\renewcommand{\thedef}{\thechapter.\arabic{def}}
\numberwithin{thm}{chapter}
\numberwithin{def}{chapter}
\numberwithin{equation}{chapter}
\message{Using chapter numbering for theorems and definitions}
}
% https://tex.stackexchange.com/a/17551
\newtheoremstyle{defi}{\topsep}{\topsep}{}{0pt}{}{}{5pt plus 1pt minus 1pt}{\fontfamily{cmss}\selectfont\textbf{\thmname{#1}\thmnumber{ #2}}\thmnote{ (\textbf{#3})}}
\newtheoremstyle{thm}{\topsep}{\topsep}{\itshape}{0pt}{}{}{5pt plus 1pt minus 1pt}{\fontfamily{cmss}\selectfont\textbf{\thmname{#1}\thmnumber{ #2}}\thmnote{ (\textbf{#3})}}}
\theoremstyle{remark}
%\newtheorem*{note}{\@note@mark}
\newtheorem*{notation}{\@notation@mark}
\newtheorem*{claim}{\@claim@mark}
% Define a List of Theorems. ithm is a special counter which
% is incremented when a new item is added to this list, that
% is saved in the master.ithmc file. To this list is only added
% the theorems, lemmas and propositions that have a special name.
%\newcommand{\listtheoremname}{List of Theorems}
%\newlistof[\ifthenelse{\equal{\@usechapters}{false}}{section}{chapter}]{ithm}{ithmc}{\listtheoremname}
%\newcommand{\listoftheorems}{\listofithm}
% Helper macro to increment the ithm counter and add the entry to the list.
%\newcommand{\ithm}[1]{%
% \refstepcounter{ithm}
% \addcontentsline{ithmc}{ithm}{\protect\numberline{\theithm}#1}\par
%}
% This macro let us use references with names in commands such as
% \nref{ref}, which will write in the document something like
% "Theorem name of the theorem (1.15)".
\newcommand{\set@labelname}[1]{%
\ifthenelse{\equal{#1}{}}{}{%
\toggle@IS@print\protected@edef\@currentlabelname{#1}%
\renewcommand{\label@hook}{}
}
}
\def\@restore@itemlabels{%
\renewcommand{\labelenumi}{\alph{enumi}. }
\renewcommand{\theenumi}{\alph{enumi}}
}
\def\@set@theorem@itemlabels{%
\renewcommand{\labelenumi}{\alph{enumi}. }
\renewcommand{\theenumi}{\thethm\ - (\alph{enumi})}
}
\mdfsetup{skipabove=1em, skipbelow=0em}
% mdframed styles for the different frames
\mdfdefinestyle{framed}{nobreak=true}
\mdfdefinestyle{highlight}{nobreak=true, linewidth=2pt, topline=false, rightline=false, bottomline=false}
\mdfdefinestyle{noframe}{%
nobreak=true, hidealllines=true, innertopmargin=0pt, innerleftmargin=0pt, innerrightmargin=0pt, innerbottommargin=0pt
}
\theoremstyle{thm}
% {theorem} environment definition.
\newmdtheoremenv[stlye=\@theoremstyle]{itheorem}[thm]{\@theorem@mark}
\newenvironment{theorem}[1][]{%
\vspace{2pt}
\set@labelname{#1}
\@set@theorem@itemlabels
\begin{itheorem}[#1]
}{\end{itheorem}\@restore@itemlabels}
\theoremstyle{defi}
% {defn} environment definition
\newmdtheoremenv[style=\@theoremstyle]{definition}[def]{\@definition@mark}
\newenvironment{defn}[1][]{\set@labelname{#1}\begin{definition}[#1]}{\end{definition}\@restore@itemlabels}
% {prop} environment definition.
\newmdtheoremenv[style=\@theoremstyle]{iprop}[def]{\@proposition@mark}
\newenvironment{prop}[1][]{\set@labelname{#1}\begin{iprop}[#1]}{\end{iprop}\@restore@itemlabels}
% {lemma} environment definition.
\newmdtheoremenv[style=\@theoremstyle]{ilemma}[def]{\@lemma@mark}
\newenvironment{lemma}[1][]{\set@labelname{#1}\begin{ilemma}[#1]}{\end{ilemma}\@restore@itemlabels}
% {coro} environment definition.
\newmdtheoremenv[style=\@theoremstyle]{coro}[def]{\@corollary@mark}
% This macro changes the equation numbering from (\theequation)
% to (\thesection.\theequation). The equation counter is reseted
% when the section counter is incremented.
% Note: If using a LaTeX distribution older than April 2018 this
% macro won't work unless the chngctr package is used.
%
% https://tex.stackexchange.com/questions/207532/reset-equation-numbering-after-each-section
% \counterwithin{equation}{chapter}
\renewcommand{\qedsymbol}{$\blacksquare$} % \medblacksquare with fdsymbol
\newenvironment{example}{{\fontfamily{cmss}\selectfont\par\noindent\textbf{\@example@mark}}~}{\null\hfill$\diamond$} % Examples
\newenvironment{remark}{{\fontfamily{cmss}\selectfont\par\noindent\textbf{\@remark@mark}}~}{} % Remarks
\newenvironment{note}{{\fontfamily{cmss}\selectfont\par\noindent\textbf{\@note@mark}}~}{} % Notes
\renewenvironment{proof}{{\fontfamily{cmss}\selectfont\par\noindent\textbf{\@proof@mark}}~}{\qed} % Proofs
\newcounter{problem}\setcounter{problem}{0}
\renewcommand{\theproblem}{\arabic{problem}}
\newenvironment{problem}[1]{%
\refstepcounter{problem}\vspace{5pt}\par\noindent\textrm{\textcolor{blue!60!black}{H2-P\theproblem.} \textbf{#1}}}{}
% Fix some weird spacing on boxes created by the mdframed package
% http://tex.stackexchange.com/a/22119
\makeatletter
\def\thm@space@setup{%
\thm@preskip=\parskip \thm@postskip=0pt
}
% ----- Fancy references
\def\ref@prefix@definition{def:}
\def\ref@name@definition{Definition}
\def\ref@lname@definition{\MakeLowercase{\ref@name@definition}}
\newcommand\exrefdefname[1]{\def\ref@name@definition{#1}}
\newcommand\exrefdefprefix[1]{\def\ref@prefix@definition{#1}}
\def\ref@prefix@theorem{thm:}
\def\ref@name@theorem{Theorem}
\def\ref@lname@theorem{\MakeLowercase{\ref@name@theorem}}
\newcommand\exrefthmname[1]{\def\ref@name@theorem{#1}}
\newcommand\exrefthmprefix[1]{\def\ref@prefix@theorem{#1}}
\def\ref@prefix@proposition{prop:}
\def\ref@name@proposition{Proposition}
\def\ref@lname@proposition{\MakeLowercase{\ref@name@proposition}}
\newcommand\exrefpropname[1]{\def\ref@name@proposition{#1}}
\newcommand\exrefpropprefix[1]{\def\ref@prefix@proposition{#1}}
\def\ref@prefix@lemma{lem:}
\def\ref@name@lemma{Lemma}
\def\ref@lname@lemma{\MakeLowercase{\ref@name@lemma}}
\newcommand\exreflemname[1]{\def\ref@name@lemma{#1}}
\newcommand\exreflemprefix[1]{\def\ref@prefix@proposition{#1}}
\def\ref@prefix@corollary{coro:}
\def\ref@name@corollary{Corollary}
\def\ref@lname@corollary{\MakeLowercase{\ref@name@corollary}}
\newcommand\exrefcoroname[1]{\def\ref@name@corollary{#1}}
\newcommand\exrefcoroprefix[1]{\def\ref@prefix@corollary{#1}}
\newcommand\getrefname[1]{\getrefbykeydefault{#1}{name}{??}}
\newcommand\nref[1]{\refused{#1}\hyperref[#1]{\getrefname{#1}}~(\ref{#1})}
\newcommand\nlref[1]{\MakeLowercase{\nref{#1}}}
\newcommand\reflink[2]{\hyperref[#2]{#1}~\ref{#2}}
\newcommand\fullreflink[2]{\hyperref[#2]{#1}~\ref{#2}~\hyperref[#2]{(\getrefname{#2})}~}
\newcommand\eref[1]{%
\IfSubStr{#1}{\ref@prefix@definition}{\reflink{\ref@lname@definition}{#1}}{}%
\IfSubStr{#1}{\ref@prefix@theorem}{\reflink{\ref@lname@theorem}{#1}}{}%
\IfSubStr{#1}{\ref@prefix@proposition}{\reflink{\ref@lname@proposition}{#1}}{}%
\IfSubStr{#1}{\ref@prefix@lemma}{\reflink{\ref@lname@lemma}{#1}}{}%
\IfSubStr{#1}{\ref@prefix@corollary}{\reflink{\ref@lname@corollary}{#1}}{}%
}
\newcommand\Eref[1]{%
\IfSubStr{#1}{\ref@prefix@definition}{\reflink{\ref@name@definition}{#1}}{}%
\IfSubStr{#1}{\ref@prefix@theorem}{\reflink{\ref@name@theorem}{#1}}{}%
\IfSubStr{#1}{\ref@prefix@proposition}{\reflink{\ref@name@proposition}{#1}}{}%
\IfSubStr{#1}{\ref@prefix@lemma}{\reflink{\ref@name@lemma}{#1}}{}%
\IfSubStr{#1}{\ref@prefix@corollary}{\reflink{\ref@name@corollary}{#1}}{}%
}
\newcommand\fulleref[1]{%
\IfSubStr{#1}{\ref@prefix@definition}{\fullreflink{\ref@lname@definition}{#1}}{}%
\IfSubStr{#1}{\ref@prefix@theorem}{\fullreflink{\ref@lname@theorem}{#1}}{}%
\IfSubStr{#1}{\ref@prefix@proposition}{\fullreflink{\ref@lname@proposition}{#1}}{}%
\IfSubStr{#1}{\ref@prefix@lemma}{\fullreflink{\ref@lname@lemma}{#1}}{}%
\IfSubStr{#1}{\ref@prefix@corollary}{\fullreflink{\ref@lname@corollary}{#1}}{}%
}
\newcommand\Fulleref[1]{%
\IfSubStr{#1}{\ref@prefix@definition}{\fullreflink{\ref@name@definition}{#1}}{}%
\IfSubStr{#1}{\ref@prefix@theorem}{\fullreflink{\ref@name@theorem}{#1}}{}%
\IfSubStr{#1}{\ref@prefix@proposition}{\fullreflink{\ref@name@proposition}{#1}}{}%
\IfSubStr{#1}{\ref@prefix@lemma}{\fullreflink{\ref@name@lemma}{#1}}{}%
\IfSubStr{#1}{\ref@prefix@corollary}{\fullreflink{\ref@name@corollary}{#1}}{}%
}