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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've started putting into practice the answer to this question. Yet I would like to change this so that there are brackets around the citations:

  • in the superscript in text,
  • in the superscript in footnote,
  • in the bibliography.

I've managed to get the first one and the last one working. The second one however, I don't know how to do this.

Note that I mainly write in english and in dutch, so I don't think there is much babel interference.

Also, would there be a way to order the footnotes so that first all ''normal'' \footnote{} are printed and below that all \sfcite{} citational footnotes (per page that is)?

Here's what I've managed to concoct:

\documentclass{article}
\usepackage[english]{babel}
\usepackage[pdfborder={0 0 0}]{hyperref}
\usepackage[citestyle=numeric-comp,sorting=none,hyperref]{biblatex}
\usepackage{filecontents}

% No brackets around the number of each bibliography entry
\DeclareFieldFormat{labelnumberwidth}{\textbf{[#1]}}

%---------------------------------------------------------------
% Essentially verbatim from Joseph Wright
% http://www.texdev.net/2010/03/08/biblatex-numbered-citations-as-footnotes/
\makeatletter
\ExecuteBibliographyOptions{citetracker,sorting=none}

\DeclareCiteCommand{\notefullcite}[\mkbibbrackets]
    {\usebibmacro{cite:init}%
        \usebibmacro{prenote}}
    {\usebibmacro{citeindex}%
        \usebibmacro{notefullcite}%
        \usebibmacro{cite:comp}}
    {}
    {\usebibmacro{cite:dump}%
        \usebibmacro{postnote}}

\newbibmacro*{notefullcite}{%
    \ifciteseen
        {}
        {\footnotetext[\thefield{labelnumber}]{%
            \usedriver{}{\thefield{entrytype}}\addperiod}}}

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

\newbibmacro*{sfcite}{%
    \ifciteseen
        {}
        {\xappto\cbx@citehook{%
            \noexpand\footnotetext[\thefield{labelnumber}]{%
            \fullcite{\thefield{entrykey}}\addperiod}}}}

\newrobustcmd{\cbx@superscript}[1]{%
    \mkbibsuperscript{[#1]}%
    \cbx@citehook
    \global\let\cbx@citehook=\empty}
\let\cbx@citehook=\empty
\makeatother
%---------------------------------------------------------------

\begin{filecontents}{\jobname.bib}
@article{ref1,
    hyphenation = {american},
    title = {Natural Products as Sources of New Drugs over the Last 25 Years},
    author = {Newman, D.J. and Cragg, G.M.},
    journal = {J. of Nat. Prod.},
    volume = {70},
    number = {3},
    pages = {461--477},
    year = {2007}}
@article{ref2,
    hyphenation = {american},
    title = {Natural products as leads to potential drugs: an old process or the new hope for drug discovery?},
    author = {Newman, D.J.},
    journal = {J. of Med. Chem.},
    volume = {51},
    number = {9},
    pages = {2589--2599},
    year = {2008}}
@online{ref3,
    author = {Quintin, C.},
    title = {Les eponges},
    url = {http://christophe.quintin.pagesperso-orange.fr/Liste_Doc.html},
    urldate = {2009-05-03}
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
First citation.\sfcite{ref1,ref2} Some text\footnote{A footnote}.


\pagebreak
Second citation\sfcite{ref1}, second citation\sfcite{ref2}, first citation.\sfcite{ref3}
\printbibliography
\end{document}
share|improve this question
up vote 12 down vote accepted

Superscripts and brackets in citation footnotes can be obtained by redefining \@makefntext. With the french option for babel, you'll need to make changes to \@makefntextFB instead. Citation and "vanilla" footnotes can be printed as separate lists using the manyfoot package.

\documentclass{report}
\usepackage[dutch]{babel}
%\usepackage[french]{babel}
\usepackage[style=numeric-comp]{biblatex}
\usepackage[colorlinks=true]{hyperref}
\usepackage{manyfoot}

\ExecuteBibliographyOptions{citetracker=true,sorting=none}

% Citation footnotes: use \footnoteA
\DeclareNewFootnote{A}

% Vanilla footnotes: use \footnoteB
\DeclareNewFootnote{B}

% Number of each bibliography entry in brackets
\DeclareFieldFormat{labelnumberwidth}{\mkbibbrackets{#1}}

\makeatletter

\newtoggle{cbx@togcite}

% Citation number superscript in brackets
\renewcommand\@makefntext[1]{%
  \iftoggle{cbx@togcite}
    {\@textsuperscript{\normalfont[\@thefnmark]}\enspace #1}
    {\@textsuperscript{\normalfont\@thefnmark}\enspace #1}%
  \global\togglefalse{cbx@togcite}}

% Citation number superscript in brackets (for babel french)
\ifdef{\@makefntextFB}{%
\renewcommand\@makefntextFB[1]{%
  \iftoggle{cbx@togcite}
    {\@textsuperscript{\normalfont[\@thefnmark]}\enspace #1}
    {\@textsuperscript{\normalfont\@thefnmark}\enspace #1}%
  \global\togglefalse{cbx@togcite}}}{}

%---------------------------------------------------------------
% Mostly verbatim from Joseph Wright
% http://www.texdev.net/2010/03/08/biblatex-numbered-citations-as-footnotes/

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

\newbibmacro*{sfcite}{%
  \ifciteseen
  {}
  {\xappto\cbx@citehook{%
   \global\toggletrue{cbx@togcite}%
   \noexpand\footnotetextA[\thefield{labelnumber}]{%
     \fullcite{\thefield{entrykey}}\addperiod}}}}

\newrobustcmd{\cbx@superscript}[1]{%
  \mkbibsuperscript{\mkbibbrackets{#1}}%
  \cbx@citehook%
  \global\let\cbx@citehook=\empty}

\let\cbx@citehook=\empty
%---------------------------------------------------------------

\makeatother

\addbibresource{biblatex-examples.bib}

\begin{document}
\chapter{Title}
\null\vfill\noindent
Vanilla footnote.\footnoteB{Vanilla footnote text.}
First citation.\sfcite[cf.][10--15]{companion}
First citation.\sfcite[e.g.][530]{bertram}
Vanilla footnote.\footnoteB{Vanilla footnote text.}
First ``multi'' citation.\sfcite{aristotle:rhetoric,bertram}
\chapter{Title}
\null\vfill\noindent
Second citation.\sfcite{bertram}
Vanilla footnote.\footnoteB{Vanilla footnote text.}
Second citation.\sfcite{aristotle:rhetoric}
Second citation.\sfcite{companion}\footnoteB{Vanilla footnote text.}
First citation.\sfcite{aristotle:poetics}
\printbibliography
\end{document}

Here is an excerpt of the results from the first chapter: enter image description here

And the second: enter image description here

share|improve this answer
    
I know that this is an old post, but i am trying to figure out how to display the page reference like you wrote in you answer First citation.\sfcite[e.g.][530]{bertram} What needs to be modified so that the reference is also displayed in the citation in text part? The Result should be First citation. [2, e.g 530] or something like that. – baam Oct 21 '15 at 7:05
    
Thanks for the solution but there's no simpler way? Something like \footcite{ref1,ref2} just behaving like your \sfcite by default? – pluton Jan 22 at 20:33

Your Answer

 
discard

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.