How can I decrease(or increase) the row height of a specific row in a table and center its content both horizontally and vertically?
A related answer discusses how to decrease the height of a row, but how can I center the text in that table cell? I am using dcolumn
as a column type therefore cannot use any other columns type which does the centering.
\usepackage{dcolumn}
\newcolumntype{L}{D{.}{.}{1.1}}
\renewcommand{\arraystretch}{2}
\begin{table}
\centering
\begin{tabular}{|c|c|L|}
\hline
a & b & 1.1\\ [-5pt]
\hline
d & e & 2.2 \\ [1pt]
\hline
g & h & 3.3 \\ [6pt]
\hline
\end{tabular}
\end{table}
I want an output similar to this:
Best Answer
A very basic approach:
Result:
Notes:
L
adding some space at the left and at the right.array
column typeV
for the remaining columns (it is possible sincedcolumn
loadsarray
).N
to avoid the problem described here: Vertical alignment in table: m-column, row size - problem in last column.\renewcommand{\arraystretch}{2}
.