1

I am using the following command for biblatex

\usepackage[backend=biber,bibstyle=ieee,citestyle=numeric-comp,sorting=none,labeldateparts,maxbibnames=99,maxcitenames=2,mincitenames=1]{biblatex} 

Can you please tell me how to superscript or subscript the citations in the text?

moewe
  • 175,683
  • 2
    \supercite? But please try to give us a full minimal example code we can play with. I have a feeling you may actually want a bit more than that given your many loading options. – moewe Sep 19 '18 at 15:51

1 Answers1

6

For superscript citations there is \supercite (defined for all numeric standard styles).

There is no \subcite for subscript citations (not that I have ever seen that), but it can be implemented as a straightforward adaption of \supercite. Do keep in mind that the definition of \supercite is style dependent, so the code below only works for (cite)style=numeric-comp.

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

\usepackage[backend=biber, bibstyle=ieee, citestyle=numeric-comp,
  sorting=none, labeldateparts,
  maxbibnames=99, maxcitenames=2, mincitenames=1]{biblatex} 

\newrobustcmd{\mkbibsubscript}[1]{%
  \unspace\allowhyphens\textsubscript{%
    \begingroup
    \protected\long\def\mkbibsuperscript##1{%
      \blx@warning{Nested superscript}%
      \mkbibbrackets{##1}}%
    #1\endgroup}}

\DeclareCiteCommand{\subcite}[\mkbibsubscript]
  {\usebibmacro{cite:init}%
   \let\multicitedelim=\supercitedelim
   \iffieldundef{prenote}
     {}
     {\BibliographyWarning{Ignoring prenote argument}}%
   \iffieldundef{postnote}
     {}
     {\BibliographyWarning{Ignoring postnote argument}}}
  {\usebibmacro{citeindex}%
   \usebibmacro{cite:comp}}
  {}
  {\usebibmacro{cite:dump}}

\addbibresource{biblatex-examples.bib}

\begin{document}
Lorem\supercite{sigfridsson} ipsum\supercite{worman}
dolor\supercite{sigfridsson}

Lorem\subcite{sigfridsson} ipsum\subcite{geer}
dolor\supercite{sigfridsson}

\printbibliography
\end{document}

Lorem1 ipsum2 dolor1 (all numbers in superscript position)//Lorem1 ipsum3 dolor1 (all numbers in subscript position)//full bibliography follows with 1 sigfridsson, 2 worman, 3 geer

moewe
  • 175,683