summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/tudscr/source/doc/examples/mathtype-example.tex
blob: 532bf94bbd9a20277656c62cf8111a6e3b2ce65c (plain)
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
\documentclass[ngerman]{tudscrartcl}% andere Klassen sind möglich
\usepackage[T1]{fontenc}
\ifpdftex{\usepackage[ngerman=ngerman-x-latest]{hyphsubst}}{}
\usepackage{babel}
\usepackage{microtype}

\usepackage{amsmath}
\begin{document}

\begin{equation*}
\begin{gathered}
M_{EM} = \frac{M_{Rad}}{i_g \cdot i_A} - M_{VM} \\
\textrm{für }
\begin{aligned}
0\leq M_{VM}\leq M_{VMmax} \\
M_{EMmin}\leq M_{EM}\leq M_{EMmax}
\end{aligned}
\end{gathered}
\end{equation*}

\begin{equation*}
\begin{gathered}
M_\mathrm{EM} = \frac{M_\mathrm{Rad}}{i_g \cdot i_A} - M_\mathrm{VM} \\
\textrm{für }
\begin{aligned}
0\leq M_\mathrm{VM}\leq M_\mathrm{VM_{max}} \\
M_\mathrm{EM_{min}}\leq M_\mathrm{EM}\leq M_\mathrm{EM_{max}}
\end{aligned}
\end{gathered}
\end{equation*}

\newcommand*{\ind}[1]{\ensuremath{\kern.03em_\mathrm{#1}}}
\newcommand*{\M}[1]{\ensuremath{M\ind{#1}}}

\begin{equation*}
\begin{gathered}
\M{EM} = \frac{\M{Rad}}{i_g \cdot i_A} - \M{VM} \\
\textrm{für }
\begin{aligned}
0\leq \M{VM}\leq \M{VM_{max}} \\
\M{EM_{min}}\leq \M{EM}\leq \M{EM_{max}}
\end{aligned}
\end{gathered}
\end{equation*}

\makeatletter
\renewcommand*{\M}[1]{\@ifnextchar[{\o@M{#1}}{\n@M{#1}}}
\newcommand*{\n@M}{}
\newcommand*{\o@M}{}
\def\n@M#1{\ensuremath{M\ind{#1}}}
\def\o@M#1[#2]{\ensuremath{M\ind{#1_{#2}}}}
\makeatother

\begin{equation*}
\begin{gathered}
\M{EM} = \frac{\M{Rad}}{i_g \cdot i_A} - \M{VM} \\
\textrm{für }
\begin{aligned}
0\leq \M{VM}\leq \M{VM}[max] \\
\M{EM}[min]\leq \M{EM}\leq \M{EM}[max]
\end{aligned}
\end{gathered}
\end{equation*}

\end{document}