1

This question is related to Biblatex-nature \textcite with superscript reference number, which shows how to make \textcite use superscript number.

But it does not work when I cite multiple references of the same author.

Here is a MWE (the result is something like Author1-3)

\documentclass{report}

\usepackage[citestyle=numeric-comp]{biblatex} \usepackage{filecontents}

\begin{filecontents}{ABib.bib} @article {a1, AUTHOR = {Author}, TITLE = {A sample paper}, JOURNAL = {Sample journal}, VOLUME = {1}, YEAR = {2013}, NUMBER = {1}, PAGES = {1--2}} @misc{a2, AUTHOR = {Author}, TITLE = {A sample paper}, YEAR = {2013}} @misc{a3, AUTHOR = {Author}, TITLE = {A sample paper}, YEAR = {2013}} \end{filecontents}

\addbibresource{ABib.bib}

%%%%%%%% \makeatletter \renewbibmacro*{textcite}{% \iffieldequals{namehash}{\cbx@lasthash} {\usebibmacro{cite:comp}} {\usebibmacro{cite:dump}% \ifbool{cbx:parens} {\bibclosebracket\global\boolfalse{cbx:parens}} {}% \iffirstcitekey {} {\textcitedelim}% \usebibmacro{cite:init}% \ifnameundef{labelname} {\printfield[citetitle]{labeltitle}} {\printnames{labelname}}% \addspace \ifnumequal{\value{citecount}}{1} {\usebibmacro{prenote}} {}% \mkbibsuperscript{\usebibmacro{cite:comp}}% \stepcounter{textcitecount}% \savefield{namehash}{\cbx@lasthash}}} \makeatother

\begin{document} \textcite{a1,a2,a3} \end{document}

p.s. The original question was asked long time ago, and I am too new to have enough reputation to comment there, so I ask this new question here.

bob
  • 13

0 Answers0