Text FormattingSection numbering format

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
feri
Posts: 1
Joined: Sun Mar 07, 2010 5:27 pm

Section numbering format

Post by feri »

Hi, every body
in my TEX document the section numbering is like this:
1.1
1.2
1.3
But I want
1-1
1-2
1-3
How can I do it? :roll:
Also, how can I do the same thing for equation numbering? :roll:

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Section numbering format

Post by localghost »

The lines below go into the preamble.

Code: Select all

\renewcommand{\thesection}{\thechapter--\arabic{section}}
\renewcommand{\theequation}{\thechapter--\arabic{equation}}

Best regards and welcome to the board
Thorsten
Post Reply