Leerzeichen vor Doppelpunkt in Beamer-Untertiteln

Leerzeichen vor Doppelpunkt in Beamer-Untertiteln

Wie Sie unten sehen können, formatiert LaTeX meine Bildunterschriften wie folgt: Figure : caption, obwohl ich sie gerne hätte Figure: caption, ohne Leerzeichen vor dem Doppelpunkt. Hier ist ein MWE:

\documentclass{beamer}
\begin{document}
\begin{frame}
\begin{figure}
  \caption{See, there's space before the colon.}
\end{figure}
\end{frame}
\end{document}

Das macht Folgendes: Bildbeschreibung hier eingeben

Ich habe dies versucht, aber es hat nicht funktioniert:

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

Antwort1

Verwenden Sie beamerdie Einrichtungen von s, anstatt captiondas Paket zu verwenden.

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

Bildbeschreibung hier eingeben

Antwort2

Lösung: hinzufügen

\usepackage{captions}
\captionsetup{labelsep = colon}

zur Präambel. Dies ist jedoch immer noch ein Fehler, da dies in anderen Dokumentklassen nicht vorkommt.

verwandte Informationen