![表格标题无法使用标题包对齐](https://linux22.com/image/473864/%E8%A1%A8%E6%A0%BC%E6%A0%87%E9%A2%98%E6%97%A0%E6%B3%95%E4%BD%BF%E7%94%A8%E6%A0%87%E9%A2%98%E5%8C%85%E5%AF%B9%E9%BD%90.png)
我试图使表格标题对齐而不是使其居中。
我发现了很多问题(包括这个) 解释称该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}