我正在tabu
创建一个包含几个多行单元格的表格(样式m
)。但是,当我在表格外部设置行距时,似乎行距不会在表格中重新计算,而当我将字体调小时,行距又太大:
\documentclass{article}
\usepackage{tabu}
\begin{document}
\linespread{1.5}\selectfont
\noindent
\begin{tabu}{|X[m,c]|X[-2,m,c]|X[m,c]|}
{\scriptsize Line 1 \linebreak too much space here} &
{\Huge Title} &
Right side \linebreak Line 1 \linebreak and line 2
\end{tabu}
A normal paragraph: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
\end{document}
\linespread
在表格中放入另一个内容不会改变任何东西。我该如何解决这个问题?
答案1
行距在段落末尾设置。如果文本在段落末尾之前被放入组括号中,则使用组括号之前的行距。
\documentclass{article}
\usepackage{tabu}
\begin{document}
\linespread{1.5}\selectfont
\noindent
\begin{tabu}{|X[m,c]|X[-2,m,c]|X[m,c]|}
\scriptsize Line 1 \linebreak too much space here &
\Huge Title &
Right side \linebreak Line 1 \linebreak and line 2
\end{tabu}
A normal paragraph: Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat.
\end{document}
或者在\linespread{1}
表格单元格内:
\documentclass{article}
\usepackage{tabu}
\begin{document}
\linespread{1.5}\selectfont
\noindent
\begin{tabu}{|X[m,c]|X[-2,m,c]|X[m,c]|}
\linespread{1}\selectfont
\scriptsize Line 1 \linebreak too much space here &
\Huge Title &
\linespread{1}\selectfont
Right side \linebreak Line 1 \linebreak and line 2
\end{tabu}
A normal paragraph: Lorem ipsum dolor sit amet, consectetur adipisicing
elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat.
\end{document}