0

I'm using a latex template to be found on Github to write my dissertation. I want to make "References" a numbered subsection of a chapter, but I don't know how to make changes to the cls file.

I think I need to make some modifications to line 170 to 219. Could anyone help? Thank you!

15
  • 2
    You should never modify a class file unless you are the author and owner of the file.
    – Johannes_B
    Mar 19, 2017 at 14:15
  • 2
    That class is more than 20 years old. Nothing good can come from that. Do you really need to use it?
    – Johannes_B
    Mar 19, 2017 at 14:16
  • 1
    \usepackage{etoolbox}\patchcmd{\thebibliography}{\unnumberedsection}{\section}{}{} <- completely untested. It isn't worth digging up the graves of our grandfathers.
    – Johannes_B
    Mar 19, 2017 at 14:18
  • 1
    Maybe \patchcmd{\thebibliography}{\unnumberedsection}{\chapter}{}{} will be better for your needs.
    – Johannes_B
    Mar 19, 2017 at 14:27
  • 1
    @Mico No, i really meant to write that. You cannot argue with the genuity of templates. I added an answer.
    – Johannes_B
    Mar 19, 2017 at 15:11

1 Answer 1

5

Not taking into account that the class is very old, it apparently does its job. Never touch a running system.

Add the following code block in your preamble to get a numbered bibliography that matches the other entries.

\usepackage{etoolbox}
\patchcmd{\thebibliography}{\unnumberedsection}{\chapter}{}{‌​}

numberedBibliography


As Mico pointed out, other versions of the same class file are available.

If the above code did not work, try

\usepackage{etoolbox}
\patchcmd{\thebibliography}{\unnumberedchapter}{\chapter}{}{‌​}

Luckily, LaTeX class files do have a file date, as well as a version number and a clear copyright and authorship note. Some even have a change history.

Don't bother, nobody respected that and there are multiple versions of the same fail, sorry, file out there.

6
  • Thank you!@Johannes_B I'm wondering if it is possible to change it to a subsection. that is, 3.1. References....?
    – 416171205
    Mar 19, 2017 at 15:43
  • @416171205 What do you really want? Guess i answer your question, what will be the next question? Please think about what you finally want and add (edit) it to the question.
    – Johannes_B
    Mar 19, 2017 at 15:45
  • Really sorry for that. I just saw your answer - that answered what I asked, but I just realized what I actually wanted is a "subsection".@Johannes_B
    – 416171205
    Mar 19, 2017 at 15:48
  • @416171205 A subsection of what?
    – Johannes_B
    Mar 19, 2017 at 15:49
  • A subsection of a chapter@Johannes_B. Say for example, a subsection of the second chapter. It should be 2.1 References...
    – 416171205
    Mar 19, 2017 at 15:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .