LaTeX forum ⇒ GeneralWhat does \c@figure mean

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

What does \c@figure mean

Postby cnguyen7 » Wed Oct 31, 2007 1:01 am

Here is part of the code that confused me:

  1. % FIGURE
  2. %
  3. \newcounter{figure}[chapter]
  4. \def\thefigure{\thechapter.\@arabic\c@figure} % numbering for figures, they are numbered for each chapters
  5. \def\fps@figure{tbp} % default placement for figures

can anyone explane the job of \c@figure please?




User avatar
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Location: Braunschweig, Germany

Postby localghost » Wed Oct 31, 2007 4:42 pm

You've got the answer already in a thread of another Forum.
LaTeX Community Moderator
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

Posts: 2
Joined: Wed Oct 31, 2007 12:55 am

Postby cnguyen7 » Wed Oct 31, 2007 6:22 pm

It seems like the two forum are one isnt it? thanks anyway

Posts: 1
Joined: Wed Jan 08, 2014 2:29 am
Location: Paris or Moscow

Postby Fifis » Wed Jan 08, 2014 2:37 am

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
Site Moderator
Posts: 1974
Joined: Sat Apr 16, 2011 7:27 pm
Location: Germany

Postby cgnieder » Wed Jan 08, 2014 9:36 am

\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
  1. \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.

chemmacros · chemformula · leadsheets · xsim

Return to “General”

Who is online

Users browsing this forum: No registered users and 8 guests