Text FormattingProblem with chapter's name on bybliography

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
tysh
Posts: 1
Joined: Wed Sep 28, 2016 9:13 pm

Problem with chapter's name on bybliography

Post by tysh »

So guys,

there is a template of Latex in my university. Problem is, I gotta change the title of the chapter of References (bybliography). So, the template is here (http://www.puc-rio.br/ensinopesq/ccpg/d ... 0.2%20.zip) and the documentation is here (http://www.puc-rio.br/ensinopesq/ccpg/d ... sisPUC.pdf).

Inside of the template, there is a tiny example which I can use to show the problem I'm having.

tiny.tex has the follow:

Code: Select all

\documentclass[
  phd
]{ThesisPUC}
  ...
\begin{document}
  ...
  \input{chapter-1}
  ...
  \arial
  \bibliography{tiny}
\end{document}
And tiny.bib has the references, and ThesisPUC.cls has:

Code: Select all

...
\AtBeginDocument{%
  \renewcommand{\bibname}{Referências Bibliográficas}%
  \bibliographystyle{ThesisPUC}%
  \renewcommand{\key}[1]{#1. }
  \special{ pdf: docinfo << /Author (\puc@author) /Title (\puc@title) /Keywords (\puc@keywords) >> }%
}
So, I changed that {Referências Bibliográficas} for {Trying other name}
The thing is, "other name" has to be all lowercase. BUT when I do that, the name never change!

I tried many commands, but nothing worked. So, checking the ThesisPUC.bst file, it has:

Code: Select all

...
FUNCTION {begin.bib}
{ preamble$ empty$
    'skip$
    { preamble$ write$ newline$ }
  if$
  "\begin{thebibliography}{"  longest.label  * "} \addcontentsline{toc}{chapter}{\bibname} \arial\markboth{\bibname}{\bibname} " * write$ newline$
}
...
So, I can see the name I created on TOC and on the page mark, but never on the Chapter name correctly..

Can someone please help me!?
Last edited by Stefan Kottwitz on Thu Sep 29, 2016 9:53 am, edited 1 time in total.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

kaiserkarl13
Posts: 707
Joined: Tue Mar 25, 2008 5:02 pm

Problem with chapter's name on bybliography

Post by kaiserkarl13 »

The following redefines the bibliography section heading just fine for me:

Code: Select all

\documentclass[phd]{ThesisPUC}
\begin{document}
  \renewcommand*{\bibname}{Whatever I want}
\nocite{testref}
  \begin{thebibliography}{10}
    \bibitem{test2} test3
  \end{thebibliography}
\end{document}
If you put the \renewcommand line in the preamble, that's why it doesn't work: believe it or not, the command \AtBeginDocument means, "execute this code when you encounter \begin{document}." If you do something to \bibname in the preamble, it will still get overridden by the code in your class (which is pretty hacked together, by the way---redefining \bibname after the document starts is a recipe for confused/angry authors!).
Post Reply