0

I had something like

\printbibliography[heading=subbibintoc,resetnumbers=true,subtype={somelable},   title ={Nice Titlel}]

then I noticed links were not working and had to

\phantomsection\printbibliography[heading=subbibintoc,resetnumbers=true,subtype={somelable},   title ={Nice Title}]

That's even bigger.

May I have a shorter command for this like?

\myprntbib[subtype={somelable},title ={Nice Title}]
3
  • Not really the point: But do you absolutely need the \phantomsection? It seems to me that should usually not be necessary. In any case it would probably better added in the heading definition directly. – moewe May 3 '19 at 16:19
  • Without the \phantomsection links from Contents don't point to the right place. Perhaps there is another solution instead of using \phantomsection? – KcFnMi May 3 '19 at 23:02
  • Mhhh, OK. I can't really say more without a real example that shows which document class you use and reproduces the botched link. If you like you can ask a new question, but if the \phantomsection works for you, you might not feel an urgent need to do that. – moewe May 4 '19 at 3:10
2

For \printbibliography the following should work

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=numeric, defernumbers, backend=biber]{biblatex}
\usepackage{hyperref}

\newcommand*{\myprntbib}[1][]{%
  \phantomsection
  \printbibliography[heading=subbibintoc, resetnumbers=true, #1]}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{appleby,
  author  = {Humphrey Appleby},
  title   = {On the Importance of the Civil Service},
  date    = {1980},
  entrysubtype = {somelable},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
\cite{appleby}
\myprntbib[subtype={somelable}, title ={Nice Title}]
\end{document}

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.