2
0
Fork 0
mirror of https://github.com/MartinThoma/LaTeX-examples.git synced 2025-04-25 06:18:05 +02:00

changed matrix form to diagonal braces

This commit is contained in:
Martin Thoma 2012-09-02 20:39:52 +02:00
parent 2150fa216b
commit 21578e8a18
2 changed files with 33 additions and 28 deletions

View file

@ -4,6 +4,7 @@ DENSITY = 300
WIDTH = 500 WIDTH = 500
make: make:
pdflatex $(SOURCE).tex -output-format=pdf
pdflatex $(SOURCE).tex -output-format=pdf pdflatex $(SOURCE).tex -output-format=pdf
make clean make clean

View file

@ -3,39 +3,43 @@
\setlength\PreviewBorder{0mm} \setlength\PreviewBorder{0mm}
\usepackage{amsmath,array} \usepackage{amsmath,array}
\renewcommand\arraycolsep{4pt} % default value: 6pt \usepackage{tikz}
\usetikzlibrary{decorations.pathreplacing}
\setlength\arraycolsep{4pt} % default value: 6pt
\newcommand\tikzmark[1]{%
\tikz[overlay,remember picture,baseline] \coordinate [anchor=base] (#1);}
\newcommand\DrawBrace[3]{%
\draw [decorate,decoration={brace,amplitude=2pt,mirror,raise=2pt}]
(#1) -- (#2) node [black,midway,sloped,yshift=-10pt] {\footnotesize$#3$};
}
\begin{document} \begin{document}
\begin{preview} \begin{preview}
\begin{equation*} \begin{equation*}
S^T \cdot A \cdot S = S^T \cdot A \cdot S =
\left( \, \left(
\begin{array}{r@{}r@{}r r r} % @{} is used twice to suppress intercolumn whitespace \begin{array}{*{9}{c}}
\underbrace{ \tikzmark{a}1 \\
\begin{array}{rrr} % First block (1) & \ddots & \\
1 & & \\ & & \tikzmark{b}1 \\
& \ddots & \\ & & & \tikzmark{c}-1 \\
& & 1 \\ & & & & \ddots & \\
\end{array} & & & & & \tikzmark{d}-1\\
}_{r_+(s)-mal}\\ & & & & & & \tikzmark{e}\phantom{-}0 \\
& & & & & & & & \ddots & \\
\underbrace{ & & & & & & & & \tikzmark{f}\phantom{-}0 \\
\begin{array}{rrr} % Second block (-1) \end{array}
-1 & & \\ \right)
& \ddots & \\
& & -1\\
\end{array}
}_{r_{-}(s)-mal} \\
& &
\underbrace{
\begin{array}{rrr} % Third block
0 & & \\
& \ddots & \\
& & 0\\
\end{array}
}_{r_0(s)-mal} \\
\end{array}\,\right)
\end{equation*} \end{equation*}
\begin{tikzpicture}[remember picture,overlay]
\DrawBrace{a}{b}{r_{+}(s)-mal}
\DrawBrace{c}{d}{r_{-}(s)-mal}
\DrawBrace{e}{f}{r_{0}(s)-mal}
\end{tikzpicture}
\end{preview} \end{preview}
\end{document} \end{document}