MIKTEX 包更新后,tabu 中的垂直 m 列对齐不再起作用。请参阅下面的 MWE
\documentclass{article}
\usepackage{tabu}
\begin{document}
\tabulinesep=3pt
Result using tabu:
\begin{tabu} to \linewidth {|X[p]| X[m]| X[b]|}
\hline
\centering header p &
\centering header m &
\centering header b \tabularnewline
\hline
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column
\tabularnewline
\hline
\end{tabu}
\vspace*{1cm}
Result using tabular:
\begin{tabular}{|p{0.3\linewidth}|m{0.3\linewidth}|b{0.3\linewidth}|}
\hline
\centering header p &
\centering header m &
\centering header b \tabularnewline
\hline
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column
\tabularnewline
\hline
\end{tabular}
\end{document}
答案1
更新时间 2019-01-14
tabu 2.9 中包含了针对此问题的解决方法,并已提交给 ctan。
[=...
tabu 可能需要更新才能匹配最新数组,但您可以使用新的可选参数强制使用旧数组\usepackage
。
\documentclass{article}
\usepackage{array}[=2016-10-06]
\usepackage{tabu}
\begin{document}
\tabulinesep=3pt
Result using tabu:
\begin{tabu} to \linewidth {|X[p]| X[m]| X[b]|}
\hline
\centering header p &
\centering header m &
\centering header b \tabularnewline
\hline
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column
\tabularnewline
\hline
\end{tabu}
\vspace*{1cm}
Result using tabular:
\begin{tabular}{|p{0.3\linewidth}|m{0.3\linewidth}|b{0.3\linewidth}|}
\hline
\centering header p &
\centering header m &
\centering header b \tabularnewline
\hline
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column &
text which is considerably longer than the width of the column
\tabularnewline
\hline
\end{tabular}
\end{document}