
正如你在下面看到的,LaTeX 將我的標題格式化為:Figure : caption
,而我希望它們是Figure: caption
,冒號前沒有空格。這是一個 MWE:
\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{figure}
\caption{See, there's space before the colon.}
\end{figure}
\end{frame}
\end{document}
這使得:
我嘗試了這個,但沒有成功:
\documentclass{beamer}
\usepackage{caption}
\DeclareCaptionLabelSeparator{colon}{: }
\begin{document}
\begin{frame}
\begin{figure}
\caption{See, there's space before the colon.}
\end{figure}
\end{frame}
\end{document}
答案1
使用beamer
s 設施而不是使用caption
package。
\documentclass{beamer}
\setbeamertemplate{caption label separator}{: } %% note the space after :, not before
\begin{document}
\begin{frame}
\begin{figure}
\caption{See, there's space before the colon.}
\end{figure}
\end{frame}
\end{document}
答案2
解決方法:新增
\usepackage{captions}
\captionsetup{labelsep = colon}
到序言。然而,這仍然是一個錯誤,因為它不會發生在其他文件類別中。