Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modifying LaTeX Table of Contents to add a period after chapter/table/figure number

I need to add a period after the chapter/table/figure number in each line in Table of Contents/LoT/LoF.

ie, right now it shows:

TABLES
1   first
2   second

but I need it to show:

TABLES
1.  first
2.  second

I know this can be done with the tocloft package, however, that package is conflicting with the latex style I'm using, with the error: \c@lotdepth is already defined. (The style is an old style for my university's thesis format, but it's slightly out of date, so I need to make some changes to get it right.

I also found that I can change thechapter/thetable/thefigure, so those contain periods. However, that then messes up my references and has the period in all of my references.

like image 591
Reverend Gonzo Avatar asked Mar 11 '10 16:03

Reverend Gonzo


Video Answer


2 Answers

\let \savenumberline \numberline
\def \numberline#1{\savenumberline{#1.}}
like image 100
Alexey Malistov Avatar answered Oct 27 '22 00:10

Alexey Malistov


This is probably a pretty trivial hack of the class file itself. The contents line format is defined somewhere in there. Just find it and add the ..

My (limited!) experience with class files is that even pretty rough edged ones have readable identifiers, so you won't need to understand all the nasty inner workings of the TeX.

like image 44
dmckee --- ex-moderator kitten Avatar answered Oct 27 '22 00:10

dmckee --- ex-moderator kitten