Fiz uma tabela com uma célula como parágrafo p{5,5cm}.
Agora, para não ocupar tanto espaço, diminuí o tamanho da fonte para scriptsize, mas a tabela não encolhe verticalmente como esperado, acho, por causa do parâmetro lineskip. como posso ajustar o salto de linha na célula "Berechnung"?
\documentclass[11pt]{amsart}
\usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
\geometry{a4paper} % ... or a4paper or a5paper or ...
\begin{document}
\begin{minipage}[t]{\textwidth}
Erweiterter Euklidischer Algorithmus:\\
\begin{tabular}{|c|c|c|c|c|c|c|c|p{5.5cm}|}\hline % Quelle: http://johannes-bauer.com/compsci/eea/?a=7&b=60&submit=Berechnen
A & B & Q & R & S & T & U & V & Berechnung: \\ \hline
60 & 7 & & & 1 & 0 & 0 & 1 & Startwerte \\ \hline
60 & 7 & 8 & 4 & 0 & 1 & 1 & -8 & \begin{scriptsize}
Q = A / B = 60 / 7 = 8\newline R = A \% B = 60 \% 7 = 4 \newline $S = U_{alt} = 0$ \newline $T = V_{alt} = 1$ \newline
$U = S_{alt} - (Q \cdot U_{alt}) = 1 - (8 \cdot 0) = 1$ \newline $V = T_{alt} - (Q \cdot V_{alt}) = 0 - (8 \cdot 1) = -8$ \end{scriptsize}\\ \hline
7 & 4 & 1 & 3 & 1 & -8 & -1 & 9 & \begin{scriptsize}
$A = B_{alt}$ \newline $B = R_{alt}$ \newline Q = A / B = 7 / 4 = 1 \newline R = A \% B = 7 \% 4 = 3 \newline
$S = U_{alt} = 1$ \newline $T = V_{alt} = -8$ \newline $U = S_{alt} - (Q \cdot U_{alt}) = 0 - (1 \cdot 1) = -1$ \newline
$V = T_{alt} - (Q \cdot V_{alt}) = 1 - (1 \cdot -8) = 9$\end{scriptsize}\\ \hline
4 & 3 & 1 & 1 & -1 & 9 & 2 & -17 & \begin{scriptsize}
$A = B_{alt}$ \newline $B = R_{alt}$ \newline Q = A / B = 4 / 3 = 1 \newline R = A \% B = 4 \% 3 = 1 \newline
$S = U_{alt} = -1$ \newline $T = V_{alt} = 9$ \newline $U = S_{alt} - (Q \cdot U_{alt}) = 1 - (1 \cdot -1) = 2$ \newline
$V = T_{alt} - (Q \cdot V_{alt}) = -8 - (1 \cdot 9) = -17$\end{scriptsize}\\ \hline
& 1 & & & 2 & -17 & & & Ergebnisse\\ \hline\hline
\end{tabular}
\end{minipage}%
\end{document}
Responder1
Eu gostaria de sugerir que você use um tabularx
ambiente com largura definida como \textwidth
, em vez de usar um tabular
ambiente aninhado dentro de um minipage
ambiente cuja largura esteja definida como \textwidth
.
Para simplificar a inserção do material tabular, sugiro que você defina automaticamente tudo na coluna final no tamanho do script. (Isso pode ser substituído caso a caso pela emissão \normalsize
de diretivas.) Um efeito colateral benéfico dessa configuração é que o espaçamento entre linhas também diminuirá à medida que você escolher um tamanho de fonte menor.
\documentclass[11pt,a4paper]{amsart}
\usepackage{geometry,tabularx}
\begin{document}
\noindent
\begin{tabularx}{\textwidth}{| *{8}{c|} >{\scriptsize\arraybackslash}X |}
\multicolumn{9}{l}{Erweiterter Euklidischer Algorithmus}\\
\hline
A & B & Q & R & S & T & U & V & \normalsize Berechnung \\
\hline
60 & 7 & & & 1 & 0 & 0 & 1 & \normalsize Startwerte \\ \hline
60 & 7 & 8 & 4 & 0 & 1 & 1 & $-8$ &
$Q = A / B = 60 / 7 = 8$\newline
$R = A \% B = 60 \% 7 = 4$ \newline
$S = U_{alt} = 0$ \newline
$T = V_{alt} = 1$ \newline
$U = S_{alt} - (Q \cdot U_{alt}) = 1 - (8 \cdot 0) = 1$ \newline
$V = T_{alt} - (Q \cdot V_{alt}) = 0 - (8 \cdot 1) = -8$ \\
\hline
7 & 4 & 1 & 3 & 1 & $-8$ & $-1$ & 9 &
$A = B_{alt}$ \newline
$B = R_{alt}$ \newline
$Q = A / B = 7 / 4 = 1$ \newline
$R = A \% B = 7 \% 4 = 3$ \newline
$S = U_{alt} = 1$ \newline
$T = V_{alt} = -8$ \newline
$U = S_{alt} - (Q \cdot U_{alt}) = 0 - (1 \cdot 1) = -1$ \newline
$V = T_{alt} - (Q \cdot V_{alt}) = 1 - (1 \cdot -8) = 9$\\
\hline
4 & 3 & 1 & 1 & $-1$ & 9 & 2 & $-17$ &
$A = B_{alt}$ \newline
$B = R_{alt}$ \newline
$Q = A / B = 4 / 3 = 1$ \newline
$R = A \% B = 4 \% 3 = 1$ \newline
$S = U_{alt} = -1$ \newline
$T = V_{alt} = 9$ \newline
$U = S_{alt} - (Q \cdot U_{alt}) = 1 - (1 \cdot -1) = 2$ \newline
$V = T_{alt} - (Q \cdot V_{alt}) = -8 - (1 \cdot 9) = -17$\\
\hline
& 1 & & & 2 & $-17$ & & & \normalsize Ergebnisse\\
\hline
\end{tabularx}
\end{document}