0

I want to change the labeling of my figures from A.1, A.2, ... to Abb. 1, Abb. 2, ..., because my appendix chapter is already labeled with A and this causes some confusion (whether A.1 is meaning the first section of the appendix or the first image).
I know I can change the label caption like this:

\addto\captionsngerman{
    \renewcommand{\figurename}{Abb.}    
}

from here, but this isn't what I want, because it just changes Abbildung A.1 to Abb. A.1. How can I change the prefix of the number?

  • what is the class you use? – touhami Mar 18 '16 at 8:37
  • I'm using babel with ngerman, graphicx and subfigure but I don't know if this is what you mean – TheFlow0360 Mar 18 '16 at 8:39
  • 1) I mean \documentclass{....} 2) how do you want figure B.1 B.2 ... and C.1 C.2 to appear ? – touhami Mar 18 '16 at 8:42
  • i use a custom one, \documentclass[german]{tex/ttthesis} (Thomas Thüm - Template for Theses from here). I didn't know I could get B or C, what results in a change of the prefix? i thought it's A because the word ist Abbildung – TheFlow0360 Mar 18 '16 at 9:02
  • 1
    try \renewcommand\thefigure{Abb. \arabic{figure}} – touhami Mar 18 '16 at 9:32
1

The class used here is based on book.cls weach define figure by

\newcounter{figure}[chapter]

so it will be reset with chapter. To make it independent of chapter we use chngcntr package and its \counterwithout command.

Exemple: here we use itonly for appendix figure. If we want this for all document we use \counterwithout{figure}{chapter} in the preambl.

\documentclass{book}

\usepackage{chngcntr}

\begin{document}
\chapter{Foo}
\begin{figure}
\rule{4cm}{1cm}
\caption{Figure}
\end{figure}
\chapter{Bla}
\begin{figure}
\rule{4cm}{1cm}
\caption{Figure}
\end{figure}

\appendix

\counterwithout{figure}{chapter}
\setcounter{figure}{0}

\chapter{Foo}
\begin{figure}
\rule{4cm}{1cm}
\caption{Figure}
\end{figure}
\chapter{Bla}
\begin{figure}
\rule{4cm}{1cm}
\caption{Figure}
\end{figure}
\end{document} 

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.