# Tuning “numbered citations as footnote”

I wanted to comment on Audrey's answer but I need more characters & I couldn't answer my own question, so let's start a new one !

First thanks a LOT for providing the link to Joseph Wright solution to this. It works perfectly. ( except for the footnote/bigfoot issue )

Based on an answer to pretty much the same question I had I got this tip from Olivier on a french forum. He proposed to use a bolean (uhummm no idea what this is ?) in order to remove the title from footnote reference produced via verbose. And have reference with the title in the final bibliography.

So using style= in the place of citestyle= to have the title every were and adding this bolean macro I get footnote references as (Author/Journal/Date/Pages) and final references as (Author/Title/Journal/Date/Pages).

Now two things and it would be perfect.

• If I use ref with DOI or URL I can access them directly from the pdf. Marvelous. BUT, if I add to the bolean restrictions of Olivier the field DOI, of course I remove them from the footnote refs, wich is what I want, but the links are no longer active in the final ref ? How is it ? Any idea ?
• The second great thing would be to make the title in the final bibliography as the link to the url, so we don't see these ugly DOI and url. Again would that be possible ?

Ok so that's it for my question(s). Maybe I'm a bit pernickety (not shure of the meaning here) and could be happy with your the solution you gave me. But it's to learn a bit more ... Again thank you for helping !

I put you the code here :

\documentclass{scrbook}
\usepackage[french]{babel}
\usepackage[pdfborder={0 0 0}]{hyperref}
\usepackage[bibstyle=chem-acs,style=numeric-comp,sorting=none,hyperref]{biblatex}
\usepackage{filecontents}

% No brackets around the number of each bibliography entry

%---------------------------------------------------------------
% 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}]{%

\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}]{%

\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},
doi = {10.1021/np068054v}}
@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}}
@article{Lewis2003,
author = {Lewis, Frederick D and Zuo, Xiaobing},
doi = {10.1021/ja035066j},
issn = {0002-7863},
journal = {Journal of the American Chemical Society},
month = jul,
number = {29},
pages = {8806--13},
pmid = {12862475},
title = {{Activated decay pathways for planar vs twisted singlet phenylalkenes.}},
url = {http://www.ncbi.nlm.nih.gov/pubmed/12862475},
volume = {125},
year = {2003}
}
\end{filecontents}

\begin{document}

\newbool{cbb}

%\DeclareFieldFormat*{doi}{\ifbool{cbb}{{#1\adddot}}{}}  % If you uncomment these doi, url or issn lines they desapear of course from the footnotes but become inactive links in the final bibliography how come ?

First citation.\sfcite{ref1,ref2} \pagebreak \\
Second citation\sfcite{ref1}, second citation\sfcite{ref2}, first citation.\sfcite{ref3} And also \sfcite{Lewis2003}

\global\booltrue{cbb}

\printbibliography

\end{document}

-
Requesting help is allright, but requesting it from a particular user probably is not. I'm sure Audrey will notice your question even if it doesn't contain a user name. –  lockstep Jun 14 '11 at 20:14

Some recent changes to biblatex-chem broke this answer. The solution provided was also incomplete. Here is an update.

Select bibliographic data can be suppressed in the citation output using the \AtEveryCitekey hook and the \clearfield, \clearname, \clearlist commands. This approach is flexible and should be robust to package updates. It also saves you from having to edit lengthy bibliography drivers.

DOIs and URLs can easily be embedded into titles by redefining the title bibliography macro. chem-acs includes a period when printing titles, which causes some odd punctuation in citations. To avoid this, I've redefined the title format and threw a period in the title macro to delimit article and journal titles. This approach will likely have to be updated with subsequent versions of biblatex-chem.

As with the answer linked by the OP, use of vanilla footnotes remains a problem. Here I've defined a new footnote command that uses roman marks to avoid interfering with the citation footnotes. One refinement would be to order the footnotes in a more readable manner. This is topic is covered in another question.

Note that babel french redefines the appearance of footnotes. Changing this will require edits to \@makefntextFB, not \@makefntext.

\documentclass{scrbook}
\usepackage[french]{babel}
\usepackage[style=chem-acs,hyperref=true,babel=hyphen]{biblatex}
\usepackage{filecontents}

\ExecuteBibliographyOptions{%
citetracker=true,sorting=none,alldates=long,dateabbrev=false,%
articletitle=true,maxcitenames=1}

% No brackets around the number of each bibliography entry

% Suppress article title, doi, url, etc. in citations
\AtEveryCitekey{%
\ifentrytype{article}
{\clearfield{title}}
{}%
\clearfield{doi}%
\clearfield{url}%
\clearlist{publisher}%
\clearlist{location}%
\clearfield{note}}

% Print year instead of date, when available; make use of urldate
\DeclareFieldFormat{urldate}{\bibstring{urlseen}\space#1}
\renewbibmacro*{date}{% Based on date bib macro from chem-acs.bbx
\iffieldundef{year}
{\ifentrytype{online}
{\printtext[urldate]{\printurldate}}
{\printtext[date]{\printdate}}}
{\printfield[date]{year}}}

% Remove period from titles
\DeclareFieldFormat*{title}{#1}

% Embed doi and url in titles, when available
\renewbibmacro*{title}{% Based on title bib macro from biblatex.def
\ifboolexpr{ test {\iffieldundef{title}}
and test {\iffieldundef{subtitle}} }
{}
{\ifboolexpr{ test {\ifhyperref}
and not test {\iffieldundef{doi}} }
{\href{http://dx.doi.org/\thefield{doi}}
{\printtext[title]{%
\printfield[titlecase]{title}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{subtitle}}}}
{\ifboolexpr{ test {\ifhyperref}
and not test {\iffieldundef{url}} }
{\href{\thefield{url}}
{\printtext[title]{%
\printfield[titlecase]{title}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{subtitle}}}}
{\printtext[title]{%
\printfield[titlecase]{title}%
\setunit{\subtitlepunct}%
\printfield[titlecase]{subtitle}}}}%
\newunit}%
\clearfield{doi}%
\clearfield{url}%
\ifentrytype{article}% Delimit article and journal titles with a period
{}}

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

\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}]{%

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

\makeatother
%---------------------------------------------------------------

\long\def\vfootnote#1{%
\begingroup%
\def\thefootnote{\roman{footnote}}\footnote{#1}%
\endgroup}

\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},
doi = {10.1021/np068054v}}
@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}}
@article{ref4,
hyphenation = {american},
author = {Lewis, Frederick D and Zuo, Xiaobing},
doi = {10.1021/ja035066j},
issn = {0002-7863},
journal = {J. Am. Chem. Soc.},
month = jul,
number = {29},
pages = {8806--13},
pmid = {12862475},
title = {Activated decay pathways for planar vs twisted singlet phenylalkenes},
url = {http://www.ncbi.nlm.nih.gov/pubmed/12862475},
volume = {125},
year = {2003}}
@Book{Armarego2003,
hyphenation = {british},
title = {Purification of Laboratory Chemicals},
publisher = {Butterworth--Heine\-mann},
year = {2003},
author = {Armarego, W. L. F. and Chai, Christina Lin Li},
location = {London},
edition = {5}}
\end{filecontents}

\begin{document}
\chapter{Title}
\null\vfill\noindent
Vanilla footnote.\vfootnote{Vanilla footnote text.}
First citation.\sfcite[cf.][461]{ref1}
Vanilla footnote.\vfootnote{Vanilla footnote text.}
First citation.\sfcite[e.g.][2589]{ref2}
First multi'' citation.\sfcite{ref3,Armarego2003}
\chapter{Title}
\null\vfill\noindent
Second citation.\sfcite{ref2}
Second citation.\sfcite{ref3}
Vanilla footnote.\vfootnote{Vanilla footnote text.}
Second citation.\sfcite{ref1}
First citation.\sfcite{ref4}
\printbibliography
\end{document}


Output for the first chapter:

The second:

And the bibliography:

-