0

I'm writing my thesis in lyx, with using this basis.

I want to set the big headlines as "chapter" (like Overview for example), and I wad the section below numbered as "sub-chapters". Means: the first headline below chapter 1 numbered as 1.1.

Right now, the Chapter class isn't even inside the hierarchy of the numbering.

for example, the hierarchy right now is: Chapter 1 - Overview -> 1. section. -> Chapter 2 - blabla -> Chapter 3 - blablabla -> 2. section.

instead of: Chapter 1 - Overview -> 1.1. section. -> Chapter 2 - blabla -> Chapter 3 - blablabla -> 3.1 section.

I'm new on this forum, so sorry if the question isn't clear. I'll be happy to edit if it needed. Thanks!

6
  • Try adding to your preamble \renewcommand{\thesection}{\arabic{section}}.
    – Bernard
    Feb 8, 2017 at 19:29
  • Another version: package chngcntr and \numberwithin{section}{part}/\counterwithin{section}{part}.
    – TeXnician
    Feb 8, 2017 at 21:06
  • @TeXnician, what are the lines that I should add to the preamble?
    – roishik
    Feb 9, 2017 at 9:30
  • That would be a \usepackage{chngcntr}\counterwithout{section}{chapter}.
    – TeXnician
    Feb 9, 2017 at 9:32
  • Adding this line (also the line @Bernard suggested), creates a situation where the section numbered separately inside the chapters. Means: inside chapter 1 I have section 1,2,3 etc., and I want it to be 1.1,1.2,1.3. Do you have any idea how to solve this? thanks for your answeres :)
    – roishik
    Feb 9, 2017 at 9:43

1 Answer 1

1

It seems I misunderstood what you want (and I'm not the only one). To have the chapter number in front of the section number, load the chngcntr package and use

\counterwithin{section}{chapter}

This will reset the section number at each chapter, and prepend it with the chapter number. Note this is the normal behaviour in standard classes with chapters, so this is needless.

This variant:

\counterwithin*{section}{chapter}

resets the section number at each chapter, but doesn't prepend it.

As to \counterwithout{section}{chapter}, it doesn't reset the section number, so you obtain a continuous numbering of the section throughout the document, independently of the chapters, somewhat like chapters w.r.t. parts in standard classes with chapters.

3
  • Great answer, I would have done it the same way, if I understood it right ;)
    – TeXnician
    Feb 9, 2017 at 9:58
  • Thanks. I think the O.P. made his/her question more clear since when I first commented.
    – Bernard
    Feb 9, 2017 at 10:05
  • Worked! sorry for the uncertainty. Thanks a lot for your help (both of you :) ).
    – roishik
    Feb 9, 2017 at 10:48

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.