# Decrease lineskip in tabular paragraph

I made a table with one cell as p{5.5cm} paragraph.

Now to not take that much space I decreased the font size to scriptsize, but the table does not shrink vertically as expected I think because of the lineskip parameter. how can I adjust the lineskip in the cell "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}

• You should add a \par before your \end{scriptsize}. Or use simply \scriptsize instead of your begin/end pair. – Ulrike Fischer Jan 30 '17 at 16:04

I would like to suggest you use a tabularx environment, with width set to \textwidth, instead of using a tabular environment nested inside a minipage environment whose width is set to \textwidth.

To simplify inputting the tabular material, I suggest you automatically set everything in the final column in script size. (This may be overridden on a case by case basis by issuing \normalsize directives.) A beneficial side-effect of this setup is that line spacing will also decrease as you choose a smaller font size.

\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}