Just a quick question. I am currently working on writing my thesis. I have many figures and I want the numbering to be something like 4.1 or 5.3. Where the first number is my section number and the second resets with each new section.

I've looked LyX FAQ and tried: \setcounter{section}{sectionNumber}

Which works fine IF I convert each section into its own PDF (I have each 'chapter' in its own LyX file), but when I make a PDF of the entire paper (I'm using includes by the way) it still does figure 0.1 to 0.X throughout the paper.

I have the set counter preamble in each of my files and I have the number figure by section module active in each of my files.

Any suggestions?

  • Hi Pinskickle, Welcome to TeX.SE! I think you'll want to use \includeonly as detailed in keep-chapter-number-of-chapters-inserted-with-include
    – cmhughes
    Oct 30 '12 at 3:10
  • I may have worded my problem poorly. I am using inputs (for all of my other files) at the bottom of my title page. If I turn my title page into a pdf, in turn making a single document of the entire paper, it numbers all my figures with 0.X. I want to covert my entire paper at once (not omitting sections) but I want it to actually say figure X.Y where X is the current section and Y is the yth figure in that section.
    – Pinsickle
    Oct 30 '12 at 3:44
  • An alternative solution that does not require defining new counters could be using the etoolbox package: \usepackage{etoolbox}\renewcommand{\thefigure}{\arabic{section}.\arabic{figure}}\preto{\section}{\setcounter{figure}{0}}.
    – guillem
    Oct 30 '12 at 8:24
  • What document class are you using?
    – Werner
    Nov 9 '12 at 23:06
  • I was actually using article out of habit, but I switched to report. That fixed most of my issues leaving only a few minor edits.
    – Pinsickle
    Nov 14 '12 at 2:35