I need to cramp a table into a tight space, but unfortunately the equations aren't aligning/fitting into it vertically. Here is the code:
\documentclass[12pt]{article}
\usepackage[a4paper, top = 0.8cm, left = 1cm, right = 1cm, bottom = 0.8cm]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{multicol}
\usepackage{array}
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}
\begin{document}
\scriptsize
\tabcolsep=0.05cm
\setlength\extrarowheight{0.15cm}
\begin{tabular}{C{1.5cm}|C{1.5cm}|C{1.3cm}|C{4.4cm}|C{1.8cm}}
Querschnitt & Zug/Druck & Schub & Biegung & Torsion\\\hline
Spannung & $\sigma_w = \frac{F}{A_w}$ & $\tau_{w}= \frac{F_q}{A_w}$ & $\sigma_{wb} = \frac{M_{bx}}{W_{wbx}}$ & $\tau_{wt} = \frac{M_t}{W_{wt}}$\\\hline
Rechteck & \multicolumn{2}{c|}{$A_w = 2a(b+t)$} & $W_{wbx} = \frac{(t+a)(b+a)^3-(t-a)(b-a)^3}{6(b+a)}$ & $W_{wt} = 2abt$\\\cline{1-5}
Kreis & \multicolumn{2}{c|}{$A_w = \pi da$} & $W_{wb} = \frac{\pi\left[(d+a)^4 -(d-a)^4\right]}{32(d+a)}$ & $W_{wt} = 2W_{wb}$\\
\end{tabular}
\end{document}
And what it currently looks like:
As you can see, \extrarowheight fixed the issue of the equations overlapping the \hline on the top, but unfortunately they are still overlapping them on the bottom. In the document I'm using this table it also happens to be inconsistent for every cell, though I use the same snippet as added above.
Using m{} unfotunately didn't center the cells when using \extrarowheight, so I'm in some kind of dillema here as I can either center the equations or stop them from overlapping (on the top only). \arraystretch has the same effect as \extrarowheight.
Does anybody have a solution for this issue?
Thanks!






https://tex.stackexchange.com/questions/6355/problem-with-table-vertical-alignment? – JPi May 07 '17 at 17:27