GeneralWhat does \c@figure mean

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
cnguyen7
Posts: 2
Joined: Wed Oct 31, 2007 12:55 am

What does \c@figure mean

Post by cnguyen7 »

Here is part of the code that confused me:

Code: Select all

% FIGURE
%
\newcounter{figure}[chapter]
\def\thefigure{\thechapter.\@arabic\c@figure}  % numbering for figures, they are numbered for each chapters
\def\fps@figure{tbp}                           % default placement for figures
can anyone explane the job of \c@figure please?

thanks

Cuong

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

What does \c@figure mean

Post by localghost »

You've got the answer already in a thread of another Forum.
cnguyen7
Posts: 2
Joined: Wed Oct 31, 2007 12:55 am

Re: latex coding help

Post by cnguyen7 »

It seems like the two forum are one isnt it? thanks anyway
Fifis
Posts: 1
Joined: Wed Jan 08, 2014 2:29 am

What does \c@figure mean

Post by Fifis »

Too bad the link has expired and there is no way of obtaining the lost answer.
At this very moment I am not asking for help, since I hope someone can restore the message from the named thread, but I keep failing to find the definition of \c@figure in latex.ltx, memoir.sty or graphicx.sty. (I need to redefine \c@figure, but where is it \def’ed?) Well, article.cls seems to define \thefigure through \c@figure, but the origin of the latter still remains obscure. Any ideas are truly appreciated!
Yours sincerely, Andreï V. Kostyrka.
————————————————————————
— I cannot rehearse too much at the present time because I am living in a flat.
— You are living in a flat? I prefer living in d sharp, is seems more commodious!
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

What does \c@figure mean

Post by cgnieder »

\c@figure is the TeX count associated with the LaTeX counter figure. It is the count that holds the actual numeric value of the counter. Everytime you define a new counter

Code: Select all

\newcounter{foo}
two associated commands are defined: \c@foo which holds the actual numeric value (0 at the beginning), \thefoo which is used to print the counter value and may be redefined with a suitable definition.

It should never be necessary to do anything with the internal count \c@foo. If the value of the counter needs to be reset or something there are a number of commands like \setcounter, \stepcounter, \refstepcounter, ... if the representation of the counter should be changed then \thefoo should be redefined.

Regards
site moderator & package author
Post Reply