2

I've used the following commands in my document to ensure that section numbering appears as 1.0, etc. while the subsections appear as 1.1, 1.2, etc.:

\renewcommand*\thesection{\arabic{section}.0}
\renewcommand*\thesubsection{\arabic{section}.\arabic{subsection}}

However, I want the figures to be formatted as 1-1, 1-2, etc., so I used the following command:

\renewcommand{\thefigure}{\thesection-\arabic{figure}}

But of course, this appears as 1.0-1, 1.0-2, etc.

So my question: is there a way to keep the section numbering as X.0 while the figure numbering appears as X-1, X-2, etc. (i.e., without the decimal zero)?

  • 1
    Welcome to TeX.SE! Instead \renewcommand{\thefigure}{\thesection-\arabic{figure}} the \renewcommand{\thefigure}{\arabic{section}-\arabic{figure}} will gives what you like to obtain. – Zarko May 2 '16 at 14:36
  • Zarko answered your question, but I do not recommend a 1.0 section numbering. – user31729 May 2 '16 at 17:37
  • @Zarko That seems to do the trick! Thank you! Seems to mess up my appendix figure numbering though. I suppose I can force a new style in that section specifically. – FadingBuffers May 2 '16 at 20:55
  • @ChristianHupfer I don't like the numbering, but it's a format I need to stick to for the report I'm writing. – FadingBuffers May 2 '16 at 20:56
  • @FadingBuffers: I see -- it's strange anyway. – user31729 May 2 '16 at 21:25
2

It seems that you have somewhere defined \thesection on different way as you expected. So if you instead

 \renewcommand{\thefigure}{\thesection-\arabic{figure}} 

use

 \renewcommand{\thefigure}{\arabic{section}-\arabic{figure}} 

you will obtain desired form of figure numbers.

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.