tags:

views:

14

answers:

1

I am writing a document where I do not want subsection numbering to show in the TOC (I want the subsection heading visible in the TOC) but I want the subsection numbering to show in the actual document heading.

This is what I want

Table of Contents
1. Chapter One
 1.1 Section One
       SubSection One

Chapter 1
Chapter One
Some chapter text

1.1 Section One
Some text

1.1.1 Subsection One
Some text

I tried using \setcounter{secnumdepth}{1} but this removes the number even from the section heading so what I have is,

Table of Contents
1. Chapter One
 1.1 Section One
       SubSection One

Chapter 1
Chapter One
Some chapter text

1.1 Section One
Some text

Subsection One
Some text

Is it possible to get the section number in the document heading but not in the TOC entry?

+1  A: 

I'm not sure of a programmatic way of doing this, but I do know that you can go into the generated *.toc file for your document and remove the section number argument for the section that you want to suppress.

You can change this:

\contentsline {subsection}{\tocsubsection {}{1.1}{subsection one}}{1}

To this:

\contentsline {subsection}{\tocsubsection {}{}{subsection one}}{1}

Which will generate what you want. Watch out, this gets regenerated each time you compile your tex source.

mjcarroll
Thanks, I'll keep this as back up, if there isn't any programmtic way.
nEm
Although you do need to build output once after you make the change in .toc file to see the effects of the changes.
nEm