von Bartman » Mo 13. Mai 2019, 22:39
\documentclass{beamer}
\usepackage{tikz}
\usepackage{showframe}
\usetikzlibrary{matrix}
\begin{document}
\begin{frame}
\resizebox{\linewidth}{!}{%
\begin{tikzpicture}
\matrix [
matrix of math nodes,
nodes={
% draw,
% https://golatex.de/viewtopic,p,89908.html#89908
text height=\ht\strutbox,
text depth=\dp\strutbox,
minimum size=7mm
},
ampersand replacement=\&
] (m) {
\& 6 \& 9 \& 2 \& 4 \& 4 \& \&
: \& 4 \& 0 \& = \& 1 \& 7 \& 3 \& 1, \& 1\\
- \& 4 \& 0\\
\& 2 \& 9 \& 2\\
-\& 2 \& 8 \& 0\\
\& \& 1 \& 2 \& 4\\
\& - \& 1 \& 2 \& 0\\
\& \& \& \& 4 \& 4\\
\& \& \& -\& 4 \& 0\\
\& \& \& \& \& 4 \& 0\\
\& \& \& \& -\& 4 \& 0\\
\& \& \& \& \& \& 0\\
};
\draw (m-2-2.south west) -- (m-2-3.south east);% <- eingefügt
\end{tikzpicture}}
\end{frame}
\end{document}
\phantom{0} ist wegen der drei Nullen in der gleichen Spalte nicht nötig. Wenn Du den auskommentierten Befehl \draw für die Knoten in der TikZ-Matrix nicht brauchst, dann darfst Du in einem Beispiel, in welchem keine Zelle in der Spalte belegt ist, auch die Option nodes in empty cells verwenden.
[code]\documentclass{beamer}
\usepackage{tikz}
\usepackage{showframe}
\usetikzlibrary{matrix}
\begin{document}
\begin{frame}
\resizebox{\linewidth}{!}{%
\begin{tikzpicture}
\matrix [
matrix of math nodes,
nodes={
% draw,
% https://golatex.de/viewtopic,p,89908.html#89908
text height=\ht\strutbox,
text depth=\dp\strutbox,
minimum size=7mm
},
ampersand replacement=\&
] (m) {
\& 6 \& 9 \& 2 \& 4 \& 4 \& \&
: \& 4 \& 0 \& = \& 1 \& 7 \& 3 \& 1, \& 1\\
- \& 4 \& 0\\
\& 2 \& 9 \& 2\\
-\& 2 \& 8 \& 0\\
\& \& 1 \& 2 \& 4\\
\& - \& 1 \& 2 \& 0\\
\& \& \& \& 4 \& 4\\
\& \& \& -\& 4 \& 0\\
\& \& \& \& \& 4 \& 0\\
\& \& \& \& -\& 4 \& 0\\
\& \& \& \& \& \& 0\\
};
\draw (m-2-2.south west) -- (m-2-3.south east);% <- eingefügt
\end{tikzpicture}}
\end{frame}
\end{document}[/code]
[tt]\phantom{0}[/tt] ist wegen der drei Nullen in der gleichen Spalte nicht nötig. Wenn Du den auskommentierten Befehl [tt]\draw[/tt] für die Knoten in der TikZ-Matrix nicht brauchst, dann darfst Du in einem Beispiel, in welchem keine Zelle in der Spalte belegt ist, auch die Option [tt]nodes in empty cells[/tt] verwenden.