Text Formattingsubsubsection numbering

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

subsubsection numbering

Post by svend_tveskaeg »

Hi LaTeX friends.

First: Take a look at the attached file.

(1) Why does the subsubsection number becomes 1.1.0. instead of 1.1.1.?
(2) How do I fix the `problem' mentioned in (1)?
Attachments
algebra2.tex
(716 Bytes) Downloaded 325 times
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)

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

meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

subsubsection numbering

Post by meho_r »

Change your \test command to this:

Code: Select all

\newcommand{\test}[1]{\subsubsection{#1}}
Here's your code with slight modifications (the \test command modified as noted, and \label commands moved after sectioning commands):

Code: Select all

\documentclass[a4paper,12pt]{article}

\renewcommand\thesection{\arabic{section}.}
\renewcommand\thesubsection{\thesection\arabic{subsection}.}
\renewcommand\thesubsubsection{\thesubsection\arabic{subsubsection}.}
\renewcommand\theequation{\thesubsection\arabic{equation}}
\newcommand{\test}[1]{\subsubsection{#1}}

\begin{document}


\section{Polynomials II}%
\label{sec:1}
\setcounter{equation}{0}
In this chapter we prove some properties of polynomials not discussed
in [insert citation]. At one point we need the existence of f{}ields of
fractions. We therefore begin the chapter with their construction.

\subsection{Fields of Fractions}%
\label{sec:11}
\setcounter{equation}{0}

\test{}

\test{}

\end{document}
But still, I don't understand why would you use a sectioning command (i.e. subsubsection) this way?

BTW, label goes after sectioning commands, not before.
Post Reply