Text Formattinghide chapter number from section title

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
bischoff
Posts: 5
Joined: Mon Jul 19, 2010 3:00 am

hide chapter number from section title

Post by bischoff »

Hi everyone,

I have been googling and reading for hours trying to find a solution to this problem. I am putting together a book using latex, and the book is separated into 5 main chapters. In each chapter there are 5-10 subchapters. However, the person I am doing this for want the subchapters to increase throughout the book (so chapter 4) would begin with a section 18. I guess I can use the \setcounter command to do that. However, I do not want the chapter number so be visible infront of the section number. For example: "18 Effectivity" instead of "4.18 Effectivity".

How do I go around to fix this?

Any help is appreciated!

Bischoff

Recommended reading 2024:

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

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

hide chapter number from section title

Post by gmedina »

Hi,

add the following lines to the preamble of your document:

Code: Select all

\usepackage{chngcntr}
\counterwithout{section}{chapter}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
bischoff
Posts: 5
Joined: Mon Jul 19, 2010 3:00 am

Re: hide chapter number from section title

Post by bischoff »

Thank you very much! :D
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

hide chapter number from section title

Post by localghost »

Now that the problem is solved, please mark the topic as accordingly as described in Section 3 of the Board Rules.


Best regards
Thorsten
Post Reply