6

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.

Reverend Gonzo
  • 39,701
  • 6
  • 59
  • 77

3 Answers3

4
\let \savenumberline \numberline
\def \numberline#1{\savenumberline{#1.}}
Alexey Malistov
  • 26,407
  • 13
  • 68
  • 88
2

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.

dmckee --- ex-moderator kitten
  • 98,632
  • 24
  • 142
  • 234
  • I'll give you a +1 since it's on the right track, though when the class file is ~1500 lines it's difficult to just find the point the period needs to go. Anyways ... I did find the place now.... – Reverend Gonzo Mar 11 '10 at 17:34
2

Ok, so I found the answer. The \addcontentslines{...} is what adds the actual text, and because latex formatting is difficult to follow when there's fifty statements, I was missing it. Adding a period into there took care of it.

Reverend Gonzo
  • 39,701
  • 6
  • 59
  • 77
  • you should make sure you don't get a `..` between the chapter and section figures... something like `1..2` I tried to do this for the article class, and it turned out to be a dirty, dirty hack. – Mica Mar 11 '10 at 17:39
  • 1
    @Mica: when I was redefining \thechapter, that's what happened, now I'm only changing it when I add the content line for chapters. ... – Reverend Gonzo Mar 11 '10 at 17:42
  • *"because latex formatting is difficult to follow when there's fifty statements"* Roger that. When I have to do that, I always kill some trees and sit down with a cup of coffee to pour over the resulting hardcopy. For some reason, I miss the critical bit less often that way... – dmckee --- ex-moderator kitten Mar 11 '10 at 17:44