## LaTeX forum ⇒ General ⇒ Bibliography Conflict with Custom Style File Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
karirafn
Posts: 3
Joined: Sun Nov 24, 2013 7:04 pm

### Bibliography Conflict with Custom Style File

Hi!

I'm working on my thesis and my university has a LaTeX template package which renames the bibliography chapter from "References" to "Bibliography" and adds it to the table of contents like so
\renewcommand{\bibname}{Bibliography \addcontentsline{toc}{chapter}{Bibliography}}

But this causes a conflict between bibtex and amsmath and I get an error if I have both of the following lines in my file
\usepackage{amsmath}\bibliography{bib}

where "bib" is the name of my bibliography file. These are the errors I get.
! Use of \reserved@a doesn't match its definition.\protected@write ...le@protect \edef \reserved@a {\write #1{#3}}\reserved@a ... \begin{thebibliography}{1}! Use of \reserved@a doesn't match its definition.\protected@write ... #1{#3}}\reserved@a \endgroup\if@nobreak \ifvmode \nobr... \begin{thebibliography}{1}! Extra }, or forgotten \endgroup.\markboth ...d@protected@xdef \@themark {{#1}{#2}}\@temptokena \expandafter ... \begin{thebibliography}{1}

If I comment either one of those out it works fine but I get an error if I leave both of them in.

Can anyone tell me a workaround or an alternative to the renaming line?

Thanks.

Tags:

localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
Just for information to other users for awareness of possibly already existing solutions. The question has also been posted to {TeX} SX. Please read what our administrator thinks about that.

Board Rules wrote:A crossposting is always contra-productive. But there is nothing really against it as long as it is mentioned. This means that a direct link has to be added. So other users who want to help are preserved from double efforts and waste of time.

Such kind of x-posting without notification represents a direct violation of our rules and has to be prevented absolutely in future questions.

For an adequate problem description please prepare a self-contained and minimal example in order to avoid speculations and guesswork.

Remarks:

• ToC Entries for e.g. the bibliography with standard classes are usually done with tocbibind. Other classes may have built-in mechanisms.
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

karirafn
Posts: 3
Joined: Sun Nov 24, 2013 7:04 pm
Sorry about that, I just really need to get this solved and I wanted to increase my possibilities of getting an answer. The following text is also on TeX.SE.

It seems that the error is more complicated than I thought as I'm not able to reproduce it without using my university's template. Here is the minimum code to get the error.
\documentclass{report}\usepackage{amsmath}\usepackage{RUMSC} \begin{document}   \SSE{}   \MScwhen{Date in English}   \MScdags{Date in Icelandic}   \MSctitle{Thesis title in English}   \MScheiti{Thesis title in Icelandic}   \MScauthor{Author}    \makeMSc   \MSctableofcontents   \startMSc    Text\cite{holman_heat_2010}.    \bibliographystyle{plain}   \bibliography{bib}\end{document}

And a sample of "bib.bib".
@book{holman_heat_2010,   address = {Boston, [Mass.]},   title = {Heat transfer},   isbn = {9780073529363  0073529362  9780071267694  0071267697},   abstract = {One of the most popular heat transfer texts of its time, Holman's book is noted for its clarity, accessible approach, and inclusion of many examples and problem sets. This new edition features design-oriented problems, and improved pedagogy.},   language = {English},   publisher = {{McGraw} Hill Higher Education},   author = {Holman, J. P},   year = {2010}}

The complete style file is attached.
Attachments
RUMSC.sty
Last edited by localghost on Sun Nov 24, 2013 9:10 pm, edited 1 time in total.
Reason: Preferably no external links (see Board Rules). Attachments go onto the forum server where possible.

localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm
karirafn wrote:Sorry about that, I just really need to get this solved and I wanted to increase my possibilities of getting an answer. […]

That's a widespread misbelief. The chance for an answer depends solely on the quality of the question. X-posts are nothing but contra-productive.
LaTeX Community Moderator

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1

karirafn
Posts: 3
Joined: Sun Nov 24, 2013 7:04 pm
I solved the problem by using the tocbibind package and replacing the line in the template with \settocbibname{Bibliography} like you suggested.