GeneralBibliography Conflict with Custom Style File

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

Bibliography Conflict with Custom Style File

Post by karirafn »

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

Code: Select all

\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

Code: Select all

\usepackage{amsmath}
\bibliography{bib}
where "bib" is the name of my bibliography file. These are the errors I get.

Code: Select all

! 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.

Recommended reading 2024:

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

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

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

Bibliography Conflict with Custom Style File

Post by localghost »

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.
karirafn
Posts: 3
Joined: Sun Nov 24, 2013 7:04 pm

Bibliography Conflict with Custom Style File

Post by karirafn »

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.

Code: Select all

\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".

Code: Select all

@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
(18.6 KiB) Downloaded 365 times
Last edited by localghost on Sun Nov 24, 2013 9:10 pm, edited 1 time in total.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Bibliography Conflict with Custom Style File

Post by localghost »

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.
karirafn
Posts: 3
Joined: Sun Nov 24, 2013 7:04 pm

Bibliography Conflict with Custom Style File

Post by karirafn »

I solved the problem by using the tocbibind package and replacing the line in the template with \settocbibname{Bibliography} like you suggested.
Post Reply