PDA

View Full Version : Latex \subsubsection is ignored



DBQ
March 6th, 2008, 10:37 PM
For some reason \subsubsection fails to give heading a section number, although it is treated like a heading. \section, and \subsection work as they should. Any idea why?

shifty2
March 6th, 2008, 10:57 PM
its fine with me:

\documentclass[10pt,a4paper]{article}
\usepackage{ifpdf}
\usepackage[utf8]{inputenc}
\usepackage[UKenglish]{babel}
\title{}


\begin{document}
\maketitle
\subsubsection{hello}
\end{document}

edit:
you may have a * in there? ie \subsubsection*{} that prevents the numbers from appearing

DBQ
March 7th, 2008, 12:28 AM
Your example works - I think it has to do with many strange packages I am using.

frisket
March 21st, 2008, 01:32 AM
For some reason \subsubsection fails to give heading a section number, although it is treated like a heading. \section, and \subsection work as they should. Any idea why?

Your document class or some package probably sets secnumdepth to 2.

See http://latex.silmaril.ie/formattinginformation/chapter3.html#secnum

P

nephritiri
March 21st, 2008, 01:43 AM
hmmm.. maybe one of the ways to solve that is to paste your work in a working template.

one i can suggest is use the document class IEEEtrans.cls (of course, download and save it in your working dir first).

\documentclass[journal]{./IEEEtran}

nb_666
April 24th, 2008, 04:59 AM
hmmm.. maybe one of the ways to solve that is to paste your work in a working template.

one i can suggest is use the document class IEEEtrans.cls (of course, download and save it in your working dir first).

\documentclass[journal]{./IEEEtran}


or just add

\setcounter{secnumdepth}{3}
to your main document!

nb_666
April 24th, 2008, 05:07 AM
Your example works - I think it has to do with many strange packages I am using.

you may be using report on your docmentclass:

\documentclass[10pt,a4paper]{report}
and not:

\documentclass[10pt,a4paper]{article}
with article it works but with report it doesn't if you don't add
\setcounter{secnumdepth}{3}
to your main document

viduliya
May 7th, 2008, 03:41 AM
Your document class or some package probably sets secnumdepth to 2.

See http://latex.silmaril.ie/formattinginformation/chapter3.html#secnum

P

Thank you. This helped alot.

jpfguambe
December 22nd, 2008, 02:36 PM
good! it helped me 2!

jeneverboy
October 19th, 2009, 04:23 PM
Hey, it helped me 3!!
Although it does not show in the table of contents??

Zugzwang
October 19th, 2009, 04:46 PM
Although it does not show in the table of contents??

See here for a solution: http://www.archivum.info/comp.text.tex/2008-08/00597/Re:_adding_subsubsection_in_table_of_contents

TammieSeo
August 7th, 2010, 08:10 PM
Hey, it helped me 3!!
Although it does not show in the table of contents??

I had to run "pdflatex <filename.tex>" in the terminal twice before the table of contents is updated. Try that and see if it works.

frisket
August 14th, 2010, 12:40 AM
I had to run "pdflatex <filename.tex>" in the terminal twice before the table of contents is updated. Try that and see if it works.

Also check to see if you need to change the value of tocdepth, which controls how far down the tree the ToC goes.