Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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:

share|improve this answer
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 posting your answer, you agree to the privacy policy and terms of service.

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