To have the bibtex bibliography properly in the toc I use a \phantomsection and give it a label. Then I add it to the toc using \addcontentsline{toc}{section}{References}. You can see a full example below for clarification.

Now I'd like to reference the bibliography automatically by it's heading string (in my case this heading is "References"). If I change the heading to e.g. "Bibliography" or "Sources" it is supposed to change the reference to that string on it's own. The problem here is that \nameref always uses the heading of the last real section (in my case that is "Some Section").

That problem applies to all bibliography-style lists such as the list of tables, list of figures and list of abrevations. Do you have a solution/workaround for that problem?




\section{Some Section}
Some uninterstion citation: \cite{random} 
%%%%%%%%%%%%%%%% Below this line it gets interesting %%%%%%%%%%%%%%%%
Some text \nameref{refer}. % <--- This nameref produces "Some Section" instead of "References"

\phantomsection \label{refer}


There is an option in KoMa-script classes to get a numbered bibliography section; but it would be difficult to provide the label, so here's a way out: put the following code in the preamble

  \@mkboth{\sectionmarkformat \refname}{\sectionmarkformat \refname}%

You don't have to issue neither \phantomsection nor \addcontentsline, just \bibliography{test}.

However, since the name of the bibliography section is already available as \refname, I'd suggest




\cite{random} % bibtex wants this
The cited papers can be found in section~\nameref{refer}.


The same strategy works for \listoffigures and \listoftables; the relevant option to add is


and the commands to renew are

\renewcommand{\listfigurename}{List of Figures\label{figurelist}}
\renewcommand{\listtablename}{List of Tables\label{tablelist}}

For nomencl the command is


but for getting it numbered and in the table of contents there's no option in KoMa-Script, but there is for the package:

  • For some reason \refname produces the Sting "Referencesrefer" when I use it like this: paste.ubuntu.com/798194 Also this solution does not solve the same problem with list of tables, figures and abbreviation. Same for the first solution but that should be adaptable for thoese lists if I get my head wrapped around the respective package definitions. – con-f-use Jan 9 '12 at 13:28
  • @con-f-use See edit for how to make this work with hyperref. – egreg Jan 9 '12 at 13:33
  • Okay, thanks a lot. Still a solution, that works for the other lists would be nice. Maybe I will just use \ref instead. – con-f-use Jan 9 '12 at 13:51
  • What other lists? For the list of figures the relevant name is \listfigurename (\listtablename for tables) and the same strategy as for \refname should work. – egreg Jan 9 '12 at 13:57
  • Yes, thanks again! Of course you're right, I came to realise that. For the list of nomenclature provided by the nomencl package that would be \nomname - just in case someone wonders. The nomencl package does not provide a totocnumbered option, just intoc which causes the abbrevatiobns to appear in toc but does no enumeration. listof=totocnumbered does the same for list of tables and figures. – con-f-use Jan 9 '12 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.