Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1541088353 | ||
|
|
db3a08596e |
@@ -16,7 +16,7 @@ eine Vektorform $f(x) = b$ und ein $b \in \mathbb{K}^{n}$ gegeben, s.d.
|
||||
.\]
|
||||
Ziel: $x = f^{-1}(b)$ finden als Grenzwert einer Folge $\left( x^{(k)} \right)_{k \in \N}$.
|
||||
|
||||
Ansatz: Definiere $g(x) := x - \sigma (f(x) - b)$ für ein $\sigma \in \mathbb{K} \setminus \{0\} $
|
||||
Ansatz: Definiere $g(x) \coloneqq x - \sigma (f(x) - b)$ für ein $\sigma \in \mathbb{K} \setminus \{0\} $
|
||||
und suche \underline{Fixpunkt} von $g\colon D \to \mathbb{K}^{n}$ $(x = g(x))$.
|
||||
|
||||
Fixpunktiteration: Startwert $x^{(0)}$. Iterationsschritt
|
||||
@@ -34,7 +34,7 @@ $x = g(x) = x - \sigma (f(x) - b) \implies f(x) = b$.
|
||||
Frage: Unter welchen Bedingungen konvergiert die Fixpunktiteration?
|
||||
|
||||
\begin{definition}[Lipschitz-Stetigkeit]
|
||||
Eine Funktion $f\colon D \subseteq \mathbb{K}^{n} \to \mathbb{K}^{n}$ heißt\\
|
||||
Eine Funktion $g\colon D \subseteq \mathbb{K}^{n} \to \mathbb{K}^{n}$ heißt\\
|
||||
\underline{Lipschitz-stetig}, wenn eine Konstante $L < \infty$ existiert, s.d.
|
||||
\[
|
||||
\Vert g(x) - g(y) \Vert \le L \Vert x - y \Vert, \qquad \forall x, y \in D
|
||||
@@ -88,7 +88,7 @@ Frage: Unter welchen Bedingungen konvergiert die Fixpunktiteration?
|
||||
\intertext{Seien $k, m$ beliebig. Dann gilt
|
||||
$\forall \epsilon > 0$}
|
||||
\Vert x^{(k+m)} - x^{(k)} \Vert &= \Vert x^{(k+m)} - x^{(k+m-1)} + x^{(k+m-1)} - \ldots x^{(k+1)} - x^{(k)} \Vert \\
|
||||
&\le \Vert x^{(k+m)} - x^{(k+m+1)} \Vert
|
||||
&\le \Vert x^{(k+m)} - x^{(k+m-1)} \Vert
|
||||
+ \ldots + \Vert x^{(k+1)} - x^{(k)} \Vert \\
|
||||
&= L^{m-1} \Vert x^{(k+1)} - x^{(k)} \Vert
|
||||
+ L^{m-2} \Vert x^{k+1} - x^{k} \Vert
|
||||
@@ -123,7 +123,7 @@ Frage: Unter welchen Bedingungen konvergiert die Fixpunktiteration?
|
||||
|
||||
\begin{bem}[Anwendung: Lineare Gleichungssysteme]
|
||||
$A = \left( a_{ij} \right)_{i,j = 1}^{n} \in \mathbb{K}^{n \times n}$ regulär und $b = (b_i)_{i = 1}^{n} \in \mathbb{K}^{n}$. Da $A$ regulär, hat das LGS $Ax = b$ genau
|
||||
eine Lösung $x^{*} = A^{-1}b$. Sei $g(x) := x - \sigma (Ax - b)$ mit
|
||||
eine Lösung $x^{*} = A^{-1}b$. Sei $g(x) \coloneqq x - \sigma (Ax - b)$ mit
|
||||
$\sigma \in \mathbb{K} \setminus \{0\} $.
|
||||
|
||||
Fixpunktiteration $x^{(k)} = x^{(k-1)} - \sigma (Ax^{(k-1}) - b)$, $k \in \N$ konvergiert, wenn
|
||||
@@ -139,8 +139,8 @@ Frage: Unter welchen Bedingungen konvergiert die Fixpunktiteration?
|
||||
$\left\Vert \mathbb{I} - \frac{A}{\Vert A \Vert_{\infty}} \right\Vert_2 < 1$.
|
||||
Da $A$ positiv definit und hermitesch, sind alle Eigenwerte $\lambda > 0$. Es gilt
|
||||
$\forall $ EW: $0 < \lambda \le \Vert A \Vert_{\infty}$. Für EW von $\mathbb{I} - \frac{A}{\Vert A\Vert_{\infty}} $ gilt $\mu = 1 - \frac{\lambda}{\Vert A \Vert_{\infty}}$, $\lambda$ Eigenwert von $A$. Also
|
||||
$0 \le \underbrace{1 - \frac{\lambda}{\Vert A \Vert_{\infty}}}_{= \mu} < 1$, also
|
||||
$\underbrace{\Big\Vert \underbrace{\mathbb{I} - \frac{A}{\Vert A \Vert_{\infty}}}_{\text{hermitesch}} \Big\Vert_2}_{\text{Spektralnorm}} < 1$. Falls $A$ hermitesch und positiv definit, ist also
|
||||
$0 \le \underbrace{1 - \frac{\lambda}{\Vert A \Vert_{\infty}}}_{= \mu} < 1$, mit \ref{lemma:spektralnorm} folgt
|
||||
$\Big\Vert \underbrace{\mathbb{I} - \frac{A}{\Vert A \Vert_{\infty}}}_{\text{hermitesch}} \Big\Vert_2 < 1$. Falls $A$ hermitesch und positiv definit, ist also
|
||||
die Richardson Iteration konvergent.
|
||||
\end{bem}
|
||||
|
||||
@@ -154,7 +154,7 @@ Frage: Unter welchen Bedingungen konvergiert die Fixpunktiteration?
|
||||
|
||||
\begin{bem}[Anwendung: Nichtlineare Gleichungssysteme]
|
||||
Sei $f\colon D \subseteq \R^{n} \to \R^{n}$ Lipschitz stetig mit $L$ und stark monoton mit $m > 0$.
|
||||
Betrachte $f(x) = b$, $g(x) := x - \theta (f(x) - b)$.
|
||||
Betrachte $f(x) = b$, $g(x) \coloneqq x - \theta (f(x) - b)$.
|
||||
|
||||
Frage: Wahl von $\theta$, s.d. $\forall x ^{(0)} \in D$ die Fixpunktiteration konvergiert?
|
||||
Es ist
|
||||
@@ -175,7 +175,7 @@ Frage: Unter welchen Bedingungen konvergiert die Fixpunktiteration?
|
||||
0 &= (\underbrace{f(x) - b + b -f(x')}_{= 0}, x - x')_2 \\
|
||||
&= (f(x) - f(x'), x-x')_2 \\
|
||||
&\stackrel{f\text{ stark monoton}}{\ge} m \Vert x - x' \Vert_2^2 \\
|
||||
&> 0
|
||||
&\ge 0
|
||||
.\end{salign*}
|
||||
Also $x = x'$, damit ist $x^{*}$ eindeutig.
|
||||
\end{bem}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
Betrachte die Abbildung $f \colon D \subseteq \R^{n} \to \R^{n}$. Die Stetigkeitsdefinition von $f$ entspricht
|
||||
der Stetigkeit von $f$ in $\R$. Aber: Differenzierbarkeit einer Funktion $g\colon I \subseteq \R \to \R$,
|
||||
\[
|
||||
g'(x_0) := \lim_{h \to 0} \frac{f(x_0 + h) - f(x_0)}{h}
|
||||
g'(x_0) \coloneqq \lim_{h \to 0} \frac{f(x_0 + h) - f(x_0)}{h}
|
||||
.\] Für $h \in \R^{n}$ \underline{nicht sinnvoll}.
|
||||
|
||||
\section{Partielle Differenzierbarkeit}
|
||||
@@ -19,8 +19,8 @@ der Stetigkeit von $f$ in $\R$. Aber: Differenzierbarkeit einer Funktion $g\colo
|
||||
im Punkt $x \in D$ partiell differenzierbar nach $i$-ter Koordinatenrichtung, falls der
|
||||
Grenwert
|
||||
\[
|
||||
\partial_i f(x) := \lim_{h \to 0} \frac{f\left( x + h \cdot e^{(i)} \right) - f(x)}{h}
|
||||
.\] existiert mit $e^{(i)} := $ $i$-te Spalte der $n \times n$ Einheitsmatrix.
|
||||
\partial_i f(x) \coloneqq \lim_{h \to 0} \frac{f\left( x + h \cdot e^{(i)} \right) - f(x)}{h}
|
||||
.\] existiert mit $e^{(i)} \coloneqq $ $i$-te Spalte der $n \times n$ Einheitsmatrix.
|
||||
Schreibweise auch $\frac{\partial f}{\partial x_i}(x)$ oder $\frac{\partial f(x)}{\partial x_i}$.
|
||||
\item $f$ heißt partiell differenzierbar in $x \in D$, falls $\partial_i f(x)$ für alle $1 \le i \le n$
|
||||
existieren.
|
||||
@@ -44,7 +44,7 @@ der Stetigkeit von $f$ in $\R$. Aber: Differenzierbarkeit einer Funktion $g\colo
|
||||
\begin{bsp}
|
||||
Die Funktion
|
||||
\[
|
||||
r(x) := \Vert x \Vert_2 = \sqrt{\sum_{i=1}^{n} x_i^2}
|
||||
r(x) \coloneqq \Vert x \Vert_2 = \sqrt{\sum_{i=1}^{n} x_i^2}
|
||||
.\] ist in $D = \R^{n} \setminus \{0\} $ stetig partiell differenzierbar mit den partiellen
|
||||
Ableitungen
|
||||
\begin{align*}
|
||||
@@ -71,7 +71,7 @@ der Stetigkeit von $f$ in $\R$. Aber: Differenzierbarkeit einer Funktion $g\colo
|
||||
s.d. die partiellen Ableitungen $\partial_i f(y)$, $i = 1, \ldots, n$ beschränkt sind $\forall y \in K_r(x)$,
|
||||
d.h.
|
||||
\[
|
||||
\sup_{x \in K_r(x)} | \partial_i f(y) | \le M, \quad i = 1, \ldots, n
|
||||
\sup_{y \in K_r(x)} | \partial_i f(y) | \le M, \quad i = 1, \ldots, n
|
||||
.\] Dann gilt $f$ stetig in Punkt $x$.
|
||||
\end{satz}
|
||||
|
||||
@@ -82,15 +82,15 @@ der Stetigkeit von $f$ in $\R$. Aber: Differenzierbarkeit einer Funktion $g\colo
|
||||
\intertext{Mit $y_2$ fest, folgt mit dem Mittelwertsatz der Differentialrechnung:
|
||||
$\exists \xi = \xi(y_2)$ zwischen $y_1$ und $x_1$, also}
|
||||
f(y_1, y_2) - f(x_1, y_2) &\stackrel{\text{MWS}}{=} \partial_1 f(\xi, y_2) (y_1 - x_1)
|
||||
\intertext{Analog für $x_1$ fest und $\zeta(x_1)$ zwischen $y_2$ und $x_2$}
|
||||
f(x_1, y_2) - f(x_1, x_2) &\stackrel{\text{MWS}}{=} \partial_2 f(x_1, \zeta) (y_2 - x_2)
|
||||
\intertext{Analog für $x_1$ fest und $\eta(x_1)$ zwischen $y_2$ und $x_2$}
|
||||
f(x_1, y_2) - f(x_1, x_2) &\stackrel{\text{MWS}}{=} \partial_2 f(x_1, \eta) (y_2 - x_2)
|
||||
\intertext{Dann folgt}
|
||||
|f(y) - f(y)| &\le \underbrace{|\partial_1 f(\xi, y_2)|}_{\le M} |y_1 - x_1|
|
||||
+ \underbrace{|\partial_2 f(x_2, \zeta)|}_{\le M} |y_2 - x_2| \\
|
||||
|f(y) - f(x)| &\le \underbrace{|\partial_1 f(\xi, y_2)|}_{\le M} |y_1 - x_1|
|
||||
+ \underbrace{|\partial_2 f(x_2, \eta)|}_{\le M} |y_2 - x_2| \\
|
||||
&\le M (|y_1 - x_1| + |y_2 - x_2|) \\
|
||||
&= M \Vert y - x \Vert_1
|
||||
.\end{salign*}
|
||||
Sei $\epsilon \in (0, r]$ beliebig, dann gilt für $\delta := \frac{\epsilon}{M}$
|
||||
Sei $\epsilon \in (0, r]$ beliebig, dann gilt für $\delta \coloneqq \frac{\epsilon}{M}$
|
||||
\[
|
||||
\Vert y -x \Vert_1 \le \delta \implies | f(y) - f(y) | \le \epsilon
|
||||
.\] Also $f$ stetig in $x$ und wegen $|f(y) - f(x)| \le M \Vert y - x \Vert_1$ sogar Lipschitz-stetig.
|
||||
@@ -103,8 +103,8 @@ Für $n > 2$ analog.
|
||||
\item Falls $\partial_i f$ partiell differenzierbar sind, dann heißt $f$ zweimal
|
||||
partiell differenzierbar mit den partiellen Ableitungen zweiter Ordnung
|
||||
\[
|
||||
\partial_i \partial_j f(x) := \frac{\partial^2 f(x)}{\partial x_i \partial x_j}
|
||||
:= \frac{\partial}{\partial x_i} \left( \frac{\partial f(x)}{\partial x_j} \right)
|
||||
\partial_i \partial_j f(x) \coloneqq \frac{\partial^2 f(x)}{\partial x_i \partial x_j}
|
||||
\coloneqq \frac{\partial}{\partial x_i} \left( \frac{\partial f(x)}{\partial x_j} \right)
|
||||
.\]
|
||||
\item $f$ heißt $k$-mal stetig partiell differenzierbar, falls alle partiellen Ableitungen
|
||||
$k$-ter Ordnung von $f$ existieren und stetig sind.
|
||||
@@ -128,9 +128,9 @@ Für $n > 2$ analog.
|
||||
\begin{enumerate}[1)]
|
||||
\item Sei $n = 2$ und
|
||||
\[
|
||||
A := \underbrace{f(x_1 + h_1, x_2 + h_2) - f(x_1 + h_1, x_2)}_{= \varphi(x_1 + h_1)}
|
||||
A \coloneqq \underbrace{f(x_1 + h_1, x_2 + h_2) - f(x_1 + h_1, x_2)}_{= \varphi(x_1 + h_1)}
|
||||
- \underbrace{f(x_1, x_2 + h_2) + f(x_1, x_2)}_{= \varphi(x_1)}
|
||||
.\] Definiere $\varphi(x) := f(x, x_2 + h_2) - f(x, x_2)$. Dann ist
|
||||
.\] Definiere $\varphi(x) \coloneqq f(x, x_2 + h_2) - f(x, x_2)$. Dann ist
|
||||
$A = \varphi(x_1 + h_1) - \varphi(x_1)$. Mit dem MWS bezügl. $x_1$ folgt
|
||||
\begin{salign*}
|
||||
\varphi(x_1 + h_1) - \varphi(x_1) &= \varphi'(x_1 + \theta_1) \cdot h_1, \quad \theta_1 \in (0, h_1)
|
||||
@@ -145,11 +145,11 @@ Für $n > 2$ analog.
|
||||
\begin{salign*}
|
||||
A &= \varphi'(x_1 + \theta_1) h_1 = \partial_2 (\partial_1 f(x_1 + \theta_1, x_2 + \theta_1'))
|
||||
\cdot h_1 \cdot h_2
|
||||
\intertext{Analog definiere $\psi(x) := f(x_1 + h_1, x) - f(x_1, x)$, dann}
|
||||
\intertext{Analog definiere $\psi(x) \coloneqq f(x_1 + h_1, x) - f(x_1, x)$, dann}
|
||||
A &= \psi(x_2 + h_2) - \psi(x_2) \\
|
||||
&\stackrel{\text{wie oben}}{=} h_2 \psi'(x_2 + \theta_2) \\
|
||||
&= h_1 \cdot h_2 \partial_
|
||||
(\partial_2 f(x_1 + \partial_2, x_2 + \partial_2')), \quad \theta_2 \in (0, h_1),
|
||||
&= h_1 \cdot h_2 \partial_1
|
||||
(\partial_2 f(x_1 + \theta_2, x_2 + \theta_2')), \quad \theta_2 \in (0, h_1),
|
||||
\theta_2' \in (0, h_2)
|
||||
.\end{salign*}
|
||||
Also folgt
|
||||
@@ -176,22 +176,22 @@ Für $n > 2$ analog.
|
||||
|
||||
\begin{definition}[Begriffe der Vektoranalysis]
|
||||
\begin{itemize}
|
||||
\item \underline{Gradient}: Sei $D \subseteq \R^{n}$ offen und $f\colon D \to \R$ eine partiell
|
||||
differenzierbare Funktion. Der Vektor
|
||||
\item \underline{Gradient}: Sei $D \subseteq \R^{n}$ offen und
|
||||
$f \colon D \to \R$ eine partiell differenzierbare Funktion. Der Vektor
|
||||
\[
|
||||
\text{grad} f(x) := \nabla f(x) := \begin{pmatrix} \partial_1 f(x) \\ \vdots \\ \partial_n f(x) \end{pmatrix} \in \R^{n}
|
||||
\text{grad} f(x) \coloneqq \nabla f(x) \coloneqq \begin{pmatrix} \partial_1 f(x) \\ \vdots \\ \partial_n f(x) \end{pmatrix} \in \R^{n}
|
||||
\] heißt der Gradient von $f$ in $x \in D$.
|
||||
\item \underline{Hesse-Matrix}: Sei $D \subseteq \R^{n}$ offen, $f\colon D \to \R$
|
||||
eine zweimal partiell differenzierbare Funktion. Die Matrix
|
||||
\[
|
||||
H_f(x) := \nabla^2 f(x) := (\partial_i \partial_j f(x))_{i,j=1}^{n} \in \R^{n \times n}
|
||||
.\] heißt Hesse-Matrix von $f$ im Punkt $x \in D$.
|
||||
H_f(x) \coloneqq \nabla^2 f(x) \coloneqq (\partial_i \partial_j f(x))_{i,j=1}^{n} \in \R^{n \times n}
|
||||
\] heißt Hesse-Matrix von $f$ im Punkt $x \in D$.
|
||||
\item \underline{Jacobi-Matrix}: Sei $D \subseteq \R^{n}$ offen, $f\colon D \to \R^{m}$
|
||||
eine partiell differenzierbare Vektorfunktion. Die Matrix
|
||||
\[
|
||||
J_f(x) := \begin{pmatrix} \partial_1 f_1 & \ldots &\partial_n f_1 \\
|
||||
\vdots & & \vdots \\
|
||||
\partial_1 f_m & \ldots & \partial_n f_m
|
||||
J_f(x) \coloneqq \begin{pmatrix} \partial_1 f_1 & \cdots &\partial_n f_1 \\
|
||||
\vdots & \ddots & \vdots \\
|
||||
\partial_1 f_m & \cdots & \partial_n f_m
|
||||
\end{pmatrix} \in \R^{m \times n}
|
||||
.\] heißt Funktionalmatrix oder auch Jacobimatrix von $f$ in $x \in D$.
|
||||
|
||||
@@ -208,7 +208,7 @@ Für $n > 2$ analog.
|
||||
\[
|
||||
\partial_j \left( \frac{x_i}{r(x)}\right)
|
||||
= \begin{cases}
|
||||
\frac{r(x) - x_i \frac{x_i}{r(x)}}{r(x)^2} = \frac{1}{r(x)} - \frac{x_i^2}{r(x)^2} & i = j \\
|
||||
\frac{r(x) - x_i \frac{x_i}{r(x)}}{r(x)^2} = \frac{1}{r(x)} - \frac{x_i^2}{r(x)^3} & i = j \\
|
||||
- \frac{x_i \frac{x_j}{r(x)}}{r(x)^2} = - \frac{x_i x_j}{r(x)^{3}} & i \neq j
|
||||
\end{cases}
|
||||
.\] Diese Hesse-Matrix ist die Jacobi-Matrix der Vektorfunktion $v(x) = \frac{x}{r(x)} = \begin{pmatrix} \vdots \\ \frac{x_i}{r(x)} \\ \vdots \end{pmatrix} $.
|
||||
|
||||
@@ -131,6 +131,7 @@ Weitere Begriffe und Eigenschaften
|
||||
\end{enumerate}
|
||||
\end{definition}
|
||||
\begin{lemma}[Spektralnorm]
|
||||
\label{lemma:spektralnorm}
|
||||
Sei $A \in \K^{n\times n}$. Dann ist $\bar{A}^TA \in \K^{n\times n}$ hermitesch und positiv semidefinit. Für die Spektralnorm gilt
|
||||
$$\norm{A}_2 = \max \left\{\sqrt{|\lambda|}, \lambda \in \sigma(\bar{A}^TA)\right\}$$
|
||||
Sei $A$ hermitesch, bzw. symmetrisch, dann gilt $\norm{A}_2 = \max\{\sqrt{|\lambda|}, \lambda\in \sigma(A)\}$
|
||||
|
||||
Binary file not shown.
+11
-11
@@ -25,6 +25,7 @@
|
||||
\RequirePackage{bookmark}
|
||||
\RequirePackage{wasysym}
|
||||
\RequirePackage{environ}
|
||||
\RequirePackage{stackrel}
|
||||
|
||||
\usetikzlibrary{quotes, angles}
|
||||
|
||||
@@ -134,8 +135,8 @@
|
||||
|
||||
% better stackrel
|
||||
\let\oldstackrel\stackrel
|
||||
\renewcommand{\stackrel}[2]{%
|
||||
\oldstackrel{\mathclap{#1}}{#2}
|
||||
\renewcommand{\stackrel}[3][]{%
|
||||
\oldstackrel[\mathclap{#1}]{\mathclap{#2}}{#3}
|
||||
}%
|
||||
|
||||
% integral d sign
|
||||
@@ -183,6 +184,7 @@
|
||||
\box_new:N \l_tmp_box
|
||||
\dim_new:N \l_tmp_dim_a
|
||||
\dim_new:N \l_tmp_dim_b
|
||||
\dim_new:N \l_tmp_dim_c
|
||||
\dim_new:N \l_tmp_dim_needed
|
||||
|
||||
% function to insert padding according to widest stackrel
|
||||
@@ -190,7 +192,7 @@
|
||||
{
|
||||
\tl_set:Nn \l__lec_text_tl { #1 }
|
||||
% get all stackrels in this align environment
|
||||
\regex_extract_all:nnN { \c{stackrel}{(.*?)}{(.*?)} } { #1 } \l_lec_stackrels_seq
|
||||
\regex_extract_all:nnN { \c{stackrel}(\[.*?\])?{(.*?)}{(.*?)} } { #1 } \l_lec_stackrels_seq
|
||||
% get number of stackrels
|
||||
\int_set:Nn \l_stackrel_count_int { \seq_count:N \l_lec_stackrels_seq }
|
||||
\int_set:Nn \l_idx_int { 1 }
|
||||
@@ -201,30 +203,28 @@
|
||||
% calculate width of text
|
||||
\hbox_set:Nn \l_tmp_box {$\seq_item:Nn \l_lec_stackrels_seq { \l_idx_int + 1 }$}
|
||||
\dim_set:Nn \l_tmp_dim_a {\box_wd:N \l_tmp_box}
|
||||
% calculate width of relation symbol
|
||||
\hbox_set:Nn \l_tmp_box {$\seq_item:Nn \l_lec_stackrels_seq { \l_idx_int + 2 }$}
|
||||
\dim_set:Nn \l_tmp_dim_c {\box_wd:N \l_tmp_box}
|
||||
\dim_set:Nn \l_tmp_dim_a {\dim_max:nn{ \l_tmp_dim_c} {\l_tmp_dim_a}}
|
||||
% calculate width of relation symbol
|
||||
\hbox_set:Nn \l_tmp_box {$\seq_item:Nn \l_lec_stackrels_seq { \l_idx_int + 3 }$}
|
||||
\dim_set:Nn \l_tmp_dim_b {\box_wd:N \l_tmp_box}
|
||||
% check if 0.5*(a-b) > minimum padding, if yes updated minimum padding
|
||||
\dim_compare:nNnTF
|
||||
{ 1pt * \dim_ratio:nn { \l_tmp_dim_a - \l_tmp_dim_b } { 2pt } } > { \l_tmp_dim_needed }
|
||||
{ \dim_set:Nn \l_tmp_dim_needed { 1pt * \dim_ratio:nn { \l_tmp_dim_a - \l_tmp_dim_b } { 2pt } } }
|
||||
{ }
|
||||
\quad
|
||||
% increment list index by three, as every stackrel produces three list entries
|
||||
\int_incr:N \l_idx_int
|
||||
\int_incr:N \l_idx_int
|
||||
\int_incr:N \l_idx_int
|
||||
\int_incr:N \l_idx_int
|
||||
}
|
||||
% replace all relations with align characters (&) and add the needed padding
|
||||
\regex_replace_all:nnN
|
||||
{ (\c{iff}&|&\c{iff}|\c{impliedby}&|&\c{impliedby}|\c{implies}&|&\c{implies}|\c{approx}&|&\c{approx}|\c{equiv}&|&\c{equiv}|=&|&=|\c{le}&|&\c{le}|\c{ge}&|&\c{ge}|&\c{stackrel}{.*?}{.*?}|\c{stackrel}{.*?}{.*?}&|&\c{neq}|\c{neq}&|>&|&>|<&|&<) }
|
||||
{ (\c{iff}&|&\c{iff}|\c{impliedby}&|&\c{impliedby}|\c{implies}&|&\c{implies}|\c{approx}&|&\c{approx}|\c{equiv}&|&\c{equiv}|=&|&=|\c{le}&|&\c{le}|\c{ge}&|&\c{ge}|&\c{stackrel}(\[.*?\])?{.*?}{.*?}|\c{stackrel}(\[.*?\])?{.*?}{.*?}&|&\c{neq}|\c{neq}&|>&|&>|<&|&<) }
|
||||
{ \c{kern} \u{l_tmp_dim_needed} \1 \c{kern} \u{l_tmp_dim_needed} }
|
||||
\l__lec_text_tl
|
||||
% replace all parantheses with \left( \right)
|
||||
%\regex_replace_all:nnN { \( } { \c{left}( } \l__lec_text_tl
|
||||
%\regex_replace_all:nnN { \) } { \c{right}) } \l__lec_text_tl
|
||||
%\regex_replace_all:nnN { \[ } { \c{left}[ } \l__lec_text_tl
|
||||
%\regex_replace_all:nnN { \] } { \c{right}] } \l__lec_text_tl
|
||||
\l__lec_text_tl
|
||||
}
|
||||
\cs_generate_variant:Nn \lec_insert_padding:n { V }
|
||||
|
||||
Reference in New Issue
Block a user