3

I want to distinguish the figure number by adding a letter, say "a", or a special symbol, such as \star, between the word "Figure" and number.

In other word, what I'd like to have is something like this

Figure a 1 or

Figure *1

Thank you.

2
  • A way, I see, might be, to look up the definition of the \caption-command and redefine it by an indentical command excerpt for the inserted "Adition". Shall "a" be a counter too, or just a letter? Apr 20, 2016 at 8:23
  • 2
    Package caption allows to define formats
    – user31729
    Apr 20, 2016 at 8:25

2 Answers 2

3

Here are two versions: One with \DeclareCaptionLabelFormat and the other one by redefining the figure counter, but this will also change the appearance of figure in List of Figures, as such I don't recommend this.

enter image description here

\documentclass{article}




\usepackage{caption}

\newcommand{\specialformattingstuff}{*} % or use \textasteriskcentered


\let\origthefigure\thefigure

\DeclareCaptionFormat{cancaption}{#1#2#3\par} % Normal format actually
\DeclareCaptionLabelFormat{cancaptionlabel}{#1 \specialformattingstuff#2}

\begin{document}
\listoffigures
\captionsetup[figure]{format=cancaption,labelformat=cancaptionlabel}
\begin{figure}
  \caption{Foo figure}
\end{figure}

% Redefinition of counter output -- I don't recommend this
\renewcommand{\thefigure}{a \origthefigure}
% Restore to the default format 
\captionsetup[figure]{format=plain,labelformat=default}
\begin{figure}
  \caption{Foo figure}
\end{figure}


\end{document}
2
  • 1
    @ Christian Hupfer, Great!! thank you very much!
    – Enter
    Apr 20, 2016 at 8:59
  • @can: You're welcome. Please use the \DeclareCaptionLabelFormat way -- it's cleaner and better!
    – user31729
    Apr 20, 2016 at 9:00
2
\setcounter{figure}{0}

\renewcommand{\thefigure}{A\arabic{figure}}
1
  • This is much simpler.
    – ilija139
    Nov 6, 2021 at 9:24

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.