ビーマーキャプションのコロンの前のスペース

ビーマーキャプションのコロンの前のスペース

以下に示すように、LaTeX はキャプションを のようにフォーマットしますが、コロンの前にスペースを入れずに にFigure : captionしたいのです。MWE は次のとおりです。Figure: caption

\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

\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}

プリアンブルに追加します。ただし、他のドキュメント クラスでは発生しないため、これは依然としてバグです。

関連情報