我试图使表格标题对齐而不是使其居中。
我发现了很多问题(包括这个) 解释称该caption
软件包建议使用此选项justification=justified
。但这在下面的代码示例中不起作用。
- 请注意
labelfont=bf
,调用包时同时传递的 已被正确应用。 - 尝试申请
format=plain
也无济于事。 center
我尝试在命令后移动环境\caption
,但问题并没有解决。
如何证明这个标题的合理性?
平均能量损失
\documentclass{article}
\usepackage[labelfont=bf,justification=justified]{caption}
\begin{document}
Some data meaningless is presented in the table below to show that the \textit{justification} of the caption is not working while the \textit{labelfont} is applied properly.
\begin{center}
\begin{table}[ht]
\caption{A caption which should be justified}
\begin{tabular}{c|c|c}
A & B & C \\
\hline
a & b & c\\
\end{tabular}
\end{table}
\end{center}
\end{document}
答案1
字幕包通常会对齐超过一行的字幕,并将只有一行的字幕居中。如果您不喜欢这样,可以像这样关闭此复选框:
\documentclass{article}
\usepackage[labelfont=bf,justification=justified,singlelinecheck=false]{caption}
\begin{document}
Some data meaningless is presented in the table below to show that the \textit{justification} of the caption is not working while the \textit{labelfont} is applied properly.
\begin{center}
\begin{table}[ht]
\caption{A caption which should be justified}
\begin{tabular}{c|c|c}
A & B & C \\
\hline
a & b & c\\
\end{tabular}
\end{table}
\end{center}
\end{document}