Generalsection numbering

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
omkardpd
Posts: 86
Joined: Sun Feb 24, 2008 7:23 am

section numbering

Post by omkardpd »

Hi,

I am using \setcounter{section}{0}. However, I am getting section numbers as 0.1, 0.2 and so on....But I want them to be 1, 2, 3.... I don't want them to be in decimal format. Any suggestion?

Thank you,

Omkar

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10360
Joined: Mon Mar 10, 2008 9:44 pm

section numbering

Post by Stefan Kottwitz »

Hi Omkar,

I understand you mean subsection numbers by 0.1, 0.2 and so on because you said you set section to 0. I think it's unusual to use subsections as highest sectioning level, perhaps you could consider to use \section instead. If the appearance of section does not meet your requirements it could be changed.

Back to the appearance of the subsection numbers, you can change it by redefining \thesubsection:

Code: Select all

\renewcommand*\thesubsection{\arabic{subsection}}
Stefan
LaTeX.org admin
omkardpd
Posts: 86
Joined: Sun Feb 24, 2008 7:23 am

Re: section numbering

Post by omkardpd »

Hi Stefen,

Let me make it clear. I have 5 chapters for my "Book". Apart from those 5 chapters, I am have an abstract to start the document. I don't want to call the abstract as a chapter. However, the abstract has sections (not subsections) which I want to number as 1, 2, 3 and so on. Further in the chapters from 1-5 I want the usual numbering style, i.e. first section of chapter 1 should be numbered 1.1 and so on. I don't think I have been able to get that.

Can you please suggest a way?

Thank you,

Omkar
User avatar
Stefan Kottwitz
Site Admin
Posts: 10360
Joined: Mon Mar 10, 2008 9:44 pm

section numbering

Post by Stefan Kottwitz »

Hi Omkar,

of course that's possible. From your first posting I had to understand with section 0 and numbering 0.1, 0.2 that there would be no chapters, so I had to guess that it's an article-like class numbered section.subsection.

Actually you can write at the beginning of the abstract or before:

Code: Select all

\renewcommand*\thesection{\arabic{section}}
Now the section numbers are displayed without the chapter number that's still 0 at this point.
After the abstract you can restore the default behaviour by:

Code: Select all

\renewcommand*\thesection{\thechapter.\arabic{section}}
Stefan
LaTeX.org admin
omkardpd
Posts: 86
Joined: Sun Feb 24, 2008 7:23 am

Re: section numbering

Post by omkardpd »

Hi Stefan,

This is working absolutely fine now. Thanks for the prompt input.

May I request you take a look at my earlier post, "adjusting figures"? Hope I am not wasting your time. I am still struggling with this weird issue of importing figures in latex.

Regards,

Omkar
User avatar
Stefan Kottwitz
Site Admin
Posts: 10360
Joined: Mon Mar 10, 2008 9:44 pm

section numbering

Post by Stefan Kottwitz »

omkardpd wrote:May I request you take a look at my earlier post, "adjusting figures"? Hope I am not wasting your time.
No problem, I will have a look again. I was just busy with some other things and did not think of the topic. I will be there again in some minutes. ;)

Stefan
LaTeX.org admin
Post Reply