
Dieser Code ist in Ordnung:
\usepackage{caption}
\captionsetup{
font=small,
labelfont=bf,
justification=justified,
format=plain}
Aber ich möchte meine Schriftart wie folgt anpassen:
\usepackage{caption}
\captionsetup{
font={\fontsize{10pt}{11pt}\selectfont},
labelfont=bf,
justification=justified,
format=plain}
Der letztere Code verursacht einen Kompilierungsfehler. Hilfe?
Hier ist ein Minimalbeispiel, das den Code enthält, der nicht funktioniert:
\documentclass{article}
\usepackage{caption}
\captionsetup{
font={\fontsize{10pt}{11pt}\selectfont},
labelfont=bf,
justification=justified,
format=plain}
\begin{document}
\begin{figure}
\caption{A figure caption}
\end{figure}
\end{document}
Antwort1
Du brauchstdefinierender neue Schriftstil, dacaption
erfordert dies als Teil seiner Schlüssel-Wert-Eingabe:
\documentclass{article}
\usepackage{caption}
\DeclareCaptionFont{myfont}{\fontsize{10pt}{11pt}\selectfont}
\captionsetup{
font=myfont,
labelfont=bf,
justification=justified,
format=plain
}
\begin{document}
\begin{figure}
\caption{This is a caption}
\end{figure}
\end{document}