LaTeX forum ⇒ GeneralBibliography 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

Postby karirafn » Sun Nov 24, 2013 7:11 pm

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
  1. \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
  1. \usepackage{amsmath}
  2. \bibliography{bib}

where "bib" is the name of my bibliography file. These are the errors I get.
  1. ! Use of \reserved@a doesn't match its definition.\protected@write ...le@protect \edef \reserved@a {\write #1{#3}}\reserved@a ... \begin{thebibliography}{1}
  2. ! Use of \reserved@a doesn't match its definition.\protected@write ... #1{#3}}\reserved@a \endgroup\if@nobreak \ifvmode \nobr... \begin{thebibliography}{1}
  3. ! 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:

User avatar
localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Sun Nov 24, 2013 8:13 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
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ 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

Postby karirafn » Sun Nov 24, 2013 8:29 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.
  1. \documentclass{report}
  2. \usepackage{amsmath}
  3. \usepackage{RUMSC}
  4.  
  5. \begin{document}
  6. \SSE{}
  7. \MScwhen{Date in English}
  8. \MScdags{Date in Icelandic}
  9. \MSctitle{Thesis title in English}
  10. \MScheiti{Thesis title in Icelandic}
  11. \MScauthor{Author}
  12.  
  13. \makeMSc
  14. \MSctableofcontents
  15. \startMSc
  16.  
  17. Text\cite{holman_heat_2010}.
  18.  
  19. \bibliographystyle{plain}
  20. \bibliography{bib}
  21. \end{document}

And a sample of "bib.bib".
  1. @book{holman_heat_2010,
  2. address = {Boston, [Mass.]},
  3. title = {Heat transfer},
  4. isbn = {9780073529363 0073529362 9780071267694 0071267697},
  5. 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.},
  6. language = {English},
  7. publisher = {{McGraw} Hill Higher Education},
  8. author = {Holman, J. P},
  9. year = {2010}
  10. }

The complete style file is attached.
Attachments
RUMSC.sty
(18.6 KiB) Downloaded 99 times
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.

User avatar
localghost
Site Moderator
Posts: 9206
Joined: Fri Feb 02, 2007 12:06 pm

Postby localghost » Sun Nov 24, 2013 8:41 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
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes


¹ 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

Postby karirafn » Sun Nov 24, 2013 8:44 pm

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


Return to “General”

Who is online

Users browsing this forum: No registered users and 4 guests