2

I am using the class scrartcl to set an article which includes figures. I want the figures to have arbitrary titles, without a "Figure n:" in front of them. According to the KOMA-Script manual, I should put

\renewcommand*{\figureformat}{}
\renewcommand*{\captionformat}{}

in the preamble. This gets rid of the "Figure n", but the colon remains. I am surprised, because a year ago, I set a book using the scrbook class and used these lines in the preamble to get rid of the "Figure n:" and it worked. Now, however, several distribution updates later, if i rerun PDFLaTeX, the colons reappear. I am using koma-script 2016-122.3.20. I tried uninstalling and re-installing koma-script, to no avail.

Perhaps something else I am doing is interfering. Here is the entire preamble:

\documentclass[letterpaper,11pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ebgaramond}
\usepackage{microtype}
\usepackage[french,swedish,english]{babel}
\usepackage[autostyle=tryonce,english=british]{csquotes}
\usepackage{graphicx}

\renewcommand*{\figureformat}{}
\renewcommand*{\captionformat}{}
\renewcommand{\topfraction}{1}
\renewcommand{\textfraction}{0.2}

\newenvironment{filmography}{\begin{description}
    \setlength{\parskip}{0ex plus 0.5ex minus 0ex}
    \setlength{\parsep}{0ex}
    \setlength{\itemsep}{0ex plus 0.5ex minus 0ex}
    \setlength{\leftmargin}{1pc}
    \setlength{\labelwidth}{0pc}
    \setlength{\labelsep}{0pc}
    \setlength{\rightmargin}{0pc}}{\end{description}}

\usepackage[notes,strict,backend=biber,%
bibencoding=inputenc]{biblatex-chicago}

\addbibresource{hedling-bib.bib}

\begin{document}

The commands I am using to make the figure (at simplest--I often have to use minipages to put more than one figure together) are as follows:

\begin{figure}
 \centering
 \includegraphics{Hedling01}
 \caption{Figure 1}
\end{figure}

(Hedling01 is a jpeg.) As you can see, I am really trying to get the figure captioned "Figure n" with no colon (I don't want a figure list and I am not going to change the figures, so I don't need the automatic numbering). If there is some other way of doing this it would solve my immediate problem.

  • 1
    Please always show us a minimal but working example (MWE) instead of code snippets only. It would help us to do the same tests like you and so to reproduce the problem, analyze it and find a solution. – Schweinebacke Oct 25 '17 at 10:18
3

frenchb.ldf, the French language definition of babel, does redefine \captionformat with \AtBeginDocument. It does so without testing whether or not the user already has changed the default definition. So you have to delay your own redefinition with \AtBeginDocument too (and have to do this after loading babel):

\documentclass[letterpaper,11pt]{scrartcl}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{ebgaramond}
\usepackage{microtype}
\usepackage[frenchb,swedish,english]{babel}
\usepackage[autostyle=tryonce,english=british]{csquotes}
\usepackage{graphicx}

\AtBeginDocument{%
  \renewcommand*{\figureformat}{}%
  \renewcommand*{\captionformat}{}%
}
\renewcommand{\topfraction}{1}
\renewcommand{\textfraction}{0.2}

\newenvironment{filmography}{\begin{description}
    \setlength{\parskip}{0ex plus 0.5ex minus 0ex}
    \setlength{\parsep}{0ex}
    \setlength{\itemsep}{0ex plus 0.5ex minus 0ex}
    \setlength{\leftmargin}{1pc}
    \setlength{\labelwidth}{0pc}
    \setlength{\labelsep}{0pc}
    \setlength{\rightmargin}{0pc}}{\end{description}}

\usepackage[notes,strict,backend=biber,%
bibencoding=inputenc]{biblatex-chicago}

\addbibresource{hedling-bib.bib}

\begin{document}
\begin{figure}
 \centering
 \includegraphics{example-image}
 \caption{Figure 1}
\end{figure}
\end{document}

Note, I've used your code to generate a working example. But most of this code is not necessary to generate a MWE:

\documentclass[letterpaper,11pt]{scrartcl}
\usepackage[frenchb]{babel}
\usepackage{graphicx}

\AtBeginDocument{%
  \renewcommand*{\figureformat}{}%
  \renewcommand*{\captionformat}{}%
}

\begin{document}
\begin{figure}
 \centering
 \includegraphics{example-image}
 \caption{Figure 1}
\end{figure}
\end{document}
2

I can not reproduce your issue even if I use KOMA-Script version 3.20 (2016/05/10):

\documentclass{scrartcl}
\renewcommand*{\figureformat}{}
\renewcommand*{\captionformat}{}
\begin{document}
\KOMAScriptVersion
\begin{figure}
  \centering
  \rule{5cm}{1cm}
  \caption{A caption}
\end{figure}
\end{document}

results in

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.