3

So I have a pretty heavy custom setup for a grant application, where I need my citations to appear as footnotes. I've got this set up fine, but I have a problem when I try to cite something from a tabular environment. Namely, the citation shows up properly in the table, but the reference does not appear in the footnotes. Those numbers just go missing...

I've put up a minimum working example:

\begin{filecontents}{mytestbib.bib}
@article{ref1,
Author = {SoAndSo, One},
Title = {Somearticle 1},
Year = {1993},
}
@article{ref2,
Author = {SoAndSo, Two},
Title = {Somearticle 2},
Year = {1994},
}
\end{filecontents}
\documentclass[a4paper, 11pt]{article}
\usepackage{bibentry}
\usepackage[backend=bibtex, firstinits=true, maxnames=99,bibstyle=numeric-comp, citestyle=custom-numeric-comp]{biblatex}
\addbibresource{mytestbib.bib}
\renewcommand{\thefootnote}{[\arabic{footnote}]}

\begin{document}
\noindent Paper: \notefullcite{ref1}\\
\begin{tabular}{cc}
  Paper: & \notefullcite{ref2}
\end{tabular}

\end{document}

When I compile, I get only the first reference appearing in the footnotes... Any ideas? I can see from the related questions that footnotes from tabulars are a mess... I'm definitely seeing some trouble getting the workarounds to respect all my bibtex stuff too...

[EDIT REVISED:] The \notefullcite command is defined as follows:

\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}}.}}}
  • Welcome! As posted, your MWE cannot be compiled without error. Does the problem go away if you use a standard Biblatex style? If so, can you use a standard one in your MWE? If not, and the problem is specific to your custom style, you'll need to post the style in order for us to help. I tried replacing it with numeric-comp, but then your citation commands are undefined control sequences. – cfr Sep 9 '15 at 22:39
  • @cfr Thanks, I was afraid of that! It is specific to the style I think, because it has to do with the footnote citations. I have updated with a link to the style file. – Morgan Rodgers Sep 9 '15 at 22:58
  • Will you have a table around the tabular? If not the solution at Footnote in tabular environment will work just fine. If you do have a table environment, the solution won't work and we will all sorts of additional troubles since the cite trackers you need to decide whether or not to print the full citation are switched off inside floats, see §4.11.5 Trackers in Floats and TOC/LOT/LOF, p. 239 of the biblatex documentation. – moewe Sep 10 '15 at 7:25
  • See also \footcite always prints long citation if used in figure environment for the float issue. – moewe Sep 10 '15 at 7:27
  • You can use the savenotes environment of the footnote package together with the hack in the answer above to get things right. – moewe Sep 10 '15 at 7:46
3

Here's a solution which you may be able to adapt to the custom style you are using. It is based on numeric-comp which I assume is similar. It defines a new command \footfullcitetext which is a cross between \footfullcite and \footcitetext. The usual trick is required to typeset the footnote i.e. placing it outside the tabular environment.

\begin{filecontents}{mytestbib.bib}
  @article{ref1,
    Author = {SoAndSo, One},
    Title = {Somearticle 1},
    Year = {1993},
  }
  @article{ref2,
    Author = {SoAndSo, Two},
    Title = {Somearticle 2},
    Year = {1994},
  }
\end{filecontents}
\documentclass[a4paper, 11pt]{article}
\usepackage{bibentry}
\usepackage[backend=bibtex, firstinits=true, maxnames=99,bibstyle=numeric-comp, citestyle=numeric-comp]{biblatex}
\addbibresource{mytestbib.bib}
\renewcommand{\thefootnote}{[\arabic{footnote}]}

\DeclareCiteCommand{\footfullcitetext}[\mkbibfootnotetext]
  {\usebibmacro{prenote}}
  {\usedriver
     {\DeclareNameAlias{sortname}{default}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

\begin{document}
\noindent Paper: \footfullcite{ref1}

\noindent\begin{tabular}{cc}
  Paper: & \footnotemark
\end{tabular}
\footfullcitetext{ref2}
\end{document}

footnote citations including one from tabular

  • Hmm, for my custom-numeric-comp it breaks the numbering and the sizes are a little off. But the principal is good, I'll try to tweak it a bit. Thanks for the help, I'll let you know how it goes. – Morgan Rodgers Sep 9 '15 at 23:16
  • 1
    @MorganRodgers I can't quite figure out how to make this idea work with the custom style as I'm not sure what to use in place of \mkbibfootnotetext, but perhaps somebody else will be able to build on this to provide an answer closer to what you need. – cfr Sep 9 '15 at 23:22
0

Oh boy, I found a super hacky workaround. What I did was define a new macro \hidefullcite which makes an invisible citation; the reference will appear as a footnote, but nothing appears in the text. Then I can cite everything before the table. Within the table, references appear correct because they are referring to something that has already been cited. For example,

\DeclareCiteCommand{\hidefullcite}
  {\usebibmacro{cite:init}}
  {\usebibmacro{citeindex}
   \usebibmacro{notefullcite}}
  {}
  {}

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

Then I just call

\noindent Paper: \notefullcite{ref1}\\
\hidefullcite{ref2}
\begin{tabular}{cc}
  Paper: & \notefullcite{ref2}
\end{tabular}

and everything is peachy. Thanks to cfr for the help, your fix didn't work for my custom mess, but it gave me the motivation to poke around a bit. (I'd still be interested in seeing a nicer fix, if anyone knows how to modify cfr's fix or something similar to the custom citation format.)

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.