I'm using a multirow
environment to span text over two rows. As it does not support \\
for inserting a line break, I'm nesting it into a shortstack
(see MWE below). However, the text is in neither of both cases (single line text, dual line text) really centered. What am I doing wrong?
Example Image
The red line indicates the center of the heading row (spans over two rows). As shown in the image, neither of both lines are really vertically centered.
MWE
\documentclass[a4paper,twocolumn]{article}
\usepackage[english]{babel}
\usepackage[utf8x]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage[a4paper,top=3cm,bottom=2cm,left=1.5cm,right=1.5cm,marginparwidth=1.75cm]{geometry}
\title{Your Paper}
\author{You}
\begin{document}
\begin{table}[htbp]
\caption{Classifier configurations and their performance.}
\label{tblClassifierConfig}
\begin{tabular*}{1.2\columnwidth}{@{\extracolsep{\fill}}lrllll@{}}
\toprule
\multirow{2}{*}{\raisebox{-\heavyrulewidth}{\shortstack[l]{\textbf{N-gram}\\as Range}}} & \multirow{2}{*}{\raisebox{-\heavyrulewidth}{\shortstack[l]{\textbf{Vocab. Size}\\in \#n-grams}}} & \multicolumn{2}{c}{Test Set 1} & \multicolumn{2}{c}{Test Set 2} \\
\cmidrule(l){3-6} & & \textbf{Prec.} & \textbf{Recall} & \textbf{Prec.} & \textbf{Recall} \\ \midrule
(2,4)-char & 500 & 0.9999 & 0.9999 & 0.5085 & 0.5849 \\
(2,4)-char & 1000 & 0.9999 & 0.9999 & 0.5114 & 0.6132 \\
(2,3)-word & 1,500 & 0.9999 & 0.9999 & 0.5134 & 0.6268 \\
(1,3)-word & 2,000 & 0.9999 & 0.9999 & 0.5138 & 0.6307 \\ \bottomrule
\end{tabular*}
\end{table}
\end{document}
\shortstack
for serious work.\shortstack
shouldn't be used for serious work?\shortstack{a\\e}
and\shortstack{p\\b}