Document Classesconflict between thesis class and natbib/apalike packages

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
people
Posts: 2
Joined: Wed Jan 26, 2011 3:26 am

conflict between thesis class and natbib/apalike packages

Post by people »

Dear Forum,

I try to use a thesis template provided by my university (based on the UC thesis template) together with the natbib and apalike packages and run into the following error message:
.../natbib.sty:637: LaTeX Error
: Command \bibhang already defined
Or name \end... illegal, see p.192 of the manual.
Please find attached the class file and a minimum working example.

Code: Select all

\documentclass[11pt,dissertation,final]{uhthesis2e}

\usepackage{apalike} 
\usepackage{natbib}

\begin{document}
\chapter

This is a test.

\end{document}
uhthesis2e.cls
(52.23 KiB) Downloaded 188 times
Attachments
uht11.tex
has to be renamed into .clo
(18.44 KiB) Downloaded 215 times
example.tex
(161 Bytes) Downloaded 198 times
Last edited by people on Mon Jan 31, 2011 5:49 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: conflict between thesis class and natbib/apalike package

Post by localghost »

The load sequence of the packages is the culprit. Just swap them and it will work. Side effects and other surprises cannot be ruled out.

Just a short hint regarding attachments. If you have several files that are absolutely necessary to make the problem comprehensible to others, you can put them into a RAR or ZIP archive and attach this one.


Best regards and welcome to the board
Thorsten
people
Posts: 2
Joined: Wed Jan 26, 2011 3:26 am

Re: conflict between thesis class and natbib/apalike package

Post by people »

Thanks for the help.
Works with the package load switch!
Post Reply