0

I have a question about citation in tables/tabulars.

I use biblatex with style verbose-ibid and the package footnote to get the cites working in tables/tabulars: Here I use \savenotes and \spewnotes to retrieve the cites from my table. The problem is, I obviously don't get the wanted \autocite but some other citation-style, always something that would be the \fullcite from biblatex.

Look at my MWE: After a shorthand is introduced, it should also be used by \autocite! But in my tables I always get a fullcite. Also my text-cite 7 should know the shorthand, which is introduced in the table, but it doesn't.

Any ideas to get the footnote-package working with biblatex?

\RequirePackage{filecontents}
\begin{filecontents*}{bibl.bib}
@BOOK{something,
title={{Fulltitle with many many characters}},
shorthand={SHORTHAND},
address = {City},
publisher = {Publ},
year = {1961},
language = {{Latin}},
}
@BOOK{another,
title={{Another Fulltitle with many many characters}},
shorthand={ANOTHERSHORTHAND},
address = {City},
publisher = {Publ},
year = {1963},
language = {{Latin}},
}
\end{filecontents*}


\documentclass{article}


\usepackage{caption}
\usepackage{placeins}
\usepackage{footnote}

\usepackage[
style=verbose-ibid,
backend=biber,
bibwarn=true,
]{biblatex}

\addbibresource{bibl.bib}

\begin{document}


bla\autocite[1]{something}
bla\autocite[2]{something}

%table
\newcommand{\tabcolA}{p{\dimexpr 0.33\linewidth-2\tabcolsep}}

\savenotes
\begin{table}[ht]
\begin{tabular}{|\tabcolA | \tabcolA | \tabcolA |}
\hline
  header & header & header \\
  \hline
  some text with footnote\autocite[3]{something} & sometext & some text with footnote\autocite[4]{something} \\
  some text with footnote\autocite[5]{another} & sometext & some text with footnote\autocite[6]{another} \\
\hline
\end{tabular}
\caption{Differences in some texts}
  \label{tab:mytextdiff}
\end{table}
\FloatBarrier
\spewnotes

bla\autocite[7]{another}. bla\autocite[8]{something}

\end{document}



Output:

8
  • About the MWE: If someone knows how to get rid of the filecontents-warning LaTeX Warning: Overwriting file ./bibl.bib. I'm also thankful.
    – musicman
    Commented Mar 28, 2014 at 7:53
  • The filecontents-warning is no trouble at all, if you use filecontents* the file will be overwritten if present whereas the standard filecontents will not do so.
    – moewe
    Commented Mar 28, 2014 at 9:04
  • I'm afraid that biblatex tracker facilities are not enabled in floats (tables and the like), so this will probably not work, see §4.11.5 Trackers in Floats and TOC/LOT/LOF of the biblatex documentation.
    – moewe
    Commented Mar 28, 2014 at 9:09
  • 1
    Hmmm, I'm not sure. Footnotes in tables are really a problem in LaTeX (not just for biblatex), maybe it's better to avoid them. The problem is that it is quite hard for biblatex/LaTeX to know where a float might and up, let alone a footnote spawned in a float, so the tracking really suffers. What you might try though is the \footnotemark/\footnotetext idea in table.
    – moewe
    Commented Mar 28, 2014 at 9:52
  • Thx for your quick answer. Yes, I had the same idea and I'm working on a workaround. Just two things are missing: 1) What biblatex-command do I need to get the proper content for \footnotetext? \footcitetext puts is content in round brackets, and \cite doesn't end with the proper punctuation. 2) I also use the Hyperref-Package to make my footnotemarks jump to the footnotetext. What would be a proper code to do this manually? (footnotemark and -text)?
    – musicman
    Commented Mar 28, 2014 at 11:26

1 Answer 1

0

Thanks to moewe and this nice codesnippet here, I could put together a working code: With a bit manual work (see code below) now footnotes in tables should act like biblatex-footnotes and work together with the hyperref-package. (The footnote-package couldn't help.)

\RequirePackage{filecontents}
\begin{filecontents*}{bibl.bib}
@BOOK{something,
title={{Fulltitle with many many characters}},
shorthand={SHORTHAND},
address = {City},
publisher = {Publ},
year = {1961},
language = {{Latin}},
}
@BOOK{another,
title={{Another Fulltitle with many many characters}},
shorthand={ANOTHERSHORTHAND},
address = {City},
publisher = {Publ},
year = {1963},
language = {{Latin}},
}
\end{filecontents*}


%   HEADER
\documentclass{article}

\usepackage{caption}
\usepackage{placeins}

\usepackage[
style=verbose-ibid,
backend=biber,
bibwarn=true,
]{biblatex}
\usepackage{hyperref}
\addbibresource{bibl.bib}

\usepackage{alphalph}

\makeatletter
\newcommand{\Footnotemark}{%
    \footnotemark%
    \expandafter\global\expandafter\let\csname saved@Href@\alphalph{\value{footnote}}\endcsname%
    \Hy@footnote@currentHref%
}

\newcommand{\BeforeFootnotetext}{%
    \stepcounter{footnote}%
    \expandafter\let\expandafter\Hy@footnote@currentHref\csname saved@Href@\alphalph{\value{footnote}}\endcsname%
}
\makeatother

\begin{document}
\setlength{\parindent}{0mm}

autocite-footnote, introducing shorthand\autocite[1]{something}\\
autocite-footnote, using shorthand\autocite[2]{something}


\newcounter{fncounter}\setcounter{fncounter}{\value{footnote}}%save the fn-counter

%table
\newcommand{\tabcolA}{p{\dimexpr 0.33\linewidth-2\tabcolsep}}

\begin{table}[ht]
\begin{tabular}{|\tabcolA | \tabcolA | \tabcolA |}
\hline
  header & header & header \\
  \hline
  use shorthand in table\Footnotemark & sometext & somtext \\
  a note, note a cite\Footnotemark & sometext & introduce a shorthand in table\Footnotemark \\
\hline
\end{tabular}
\caption{Differences in some texts}
  \label{tab:mytextdiff}
\end{table}
\FloatBarrier


\setcounter{footnote}{\value{fncounter}}%restore the fncounter and add the foonotetexts:


\BeforeFootnotetext%do this before each \footcitetext or \footnote-statment
\footcitetext[3]{something}%3 is the PAGEnumber!

\BeforeFootnotetext
\mkbibfootnotetext{A note without punctation? Will be added by biblatex}

\BeforeFootnotetext
\footcitetext[5]{another}%6 is the PAGEnumber!

\clearpage

autocite, using shorthand\autocite[6]{something}.\\
autocite, using shorthand introduced in table\autocite[7]{another}.


\printbibliography
\printshorthands


\end{document}
3
  • 1
    I would not go about like this. Write some text with footnote\footnotemark in the table and add the \footcitetext[3]{something} after the table in the right order.
    – moewe
    Commented Mar 29, 2014 at 12:23
  • I think you've meant the \autocite inside the tables. This was just for testing. Check my new try, it seems to work fine. And thanks again!
    – musicman
    Commented Mar 29, 2014 at 21:16
  • Hmmm, in my tests, I did not need any of the new \Footnotemark or \BeforeFootnotetext commands even for proper linking. But if it works for you, it works for you.
    – moewe
    Commented Mar 30, 2014 at 8:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .