Linespread 更改 nicematrix 中 NiceTabular 的 m{width} 单元格高度

Linespread 更改 nicematrix 中 NiceTabular 的 m{width} 单元格高度

示例代码:

\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\NiceMatrixOptions{hvlines}
\linespread{1}\selectfont
linespread sets to 1.0

\begin{NiceTabular}{lr}[baseline=t]
 align & l \\
\end{NiceTabular}
\begin{NiceTabular}{b{1cm}r}[baseline=t]
 align & b \\
\end{NiceTabular}
\begin{NiceTabular}{p{1cm}r}[baseline=t]
 align & p \\
\end{NiceTabular}
\begin{NiceTabular}{m{1cm}r}[baseline=t]
 align & m \\
\end{NiceTabular}


\linespread{1.5}\selectfont
linespread sets to 1.5

\begin{NiceTabular}{lr}[baseline=t]
 align & l \\
\end{NiceTabular}
\begin{NiceTabular}{b{1cm}r}[baseline=t]
 align & b \\
\end{NiceTabular}
\begin{NiceTabular}{p{1cm}r}[baseline=t]
 align & p \\
\end{NiceTabular}
\begin{NiceTabular}{m{1cm}r}[baseline=t]
 align & m \\
\end{NiceTabular}

\linespread{2}\selectfont
linespread sets to 2

\begin{NiceTabular}{lr}[baseline=t]
 align & l \\
\end{NiceTabular}
\begin{NiceTabular}{b{1cm}r}[baseline=t]
 align & b \\
\end{NiceTabular}
\begin{NiceTabular}{p{1cm}r}[baseline=t]
 align & p \\
\end{NiceTabular}
\begin{NiceTabular}{m{1cm}r}[baseline=t]
 align & m \\
\end{NiceTabular}

\end{document}

输出:

在此处输入图片描述

答案1

的该错误nicematrix已在的最新版本nicematrix(2021/07/23 的 v 5.19) 中得到更正。

\documentclass{article}
\usepackage{nicematrix}
\begin{document}
\NiceMatrixOptions{hvlines}
\linespread{1}\selectfont
linespread sets to 1.0

\begin{NiceTabular}{lr}[baseline=t]
 align & l \\
\end{NiceTabular}
\begin{NiceTabular}{b{1cm}r}[baseline=t]
 align & b \\
\end{NiceTabular}
\begin{NiceTabular}{p{1cm}r}[baseline=t]
 align & p \\
\end{NiceTabular}
\begin{NiceTabular}{m{1cm}r}[baseline=t]
 align & m \\
\end{NiceTabular}


\linespread{1.5}\selectfont
linespread sets to 1.5

\begin{NiceTabular}{lr}[baseline=t]
 align & l \\
\end{NiceTabular}
\begin{NiceTabular}{b{1cm}r}[baseline=t]
 align & b \\
\end{NiceTabular}
\begin{NiceTabular}{p{1cm}r}[baseline=t]
 align & p \\
\end{NiceTabular}
\begin{NiceTabular}{m{1cm}r}[baseline=t]
 align & m \\
\end{NiceTabular}

\linespread{2}\selectfont
linespread sets to 2

\begin{NiceTabular}{lr}[baseline=t]
 align & l \\
\end{NiceTabular}
\begin{NiceTabular}{b{1cm}r}[baseline=t]
 align & b \\
\end{NiceTabular}
\begin{NiceTabular}{p{1cm}r}[baseline=t]
 align & p \\
\end{NiceTabular}
\begin{NiceTabular}{m{1cm}r}[baseline=t]
 align & m \\
\end{NiceTabular}

\end{document}

上述代码的输出

相关内容