Maybe many of you have such problem. You have a table and want to have a reference inside, but it doesn’t work. Propably you get this or similar error:
name{Hfootnote.7} has been referenced but does not exist, replaced by a fixed one
This happens, because hyperref has problems with its counters, when they are inside of a table environment.
I searched the net for a couple of hours with no real solution. Mostly it says, don’t use footnote in table. But it’s much more nice to have. With some inspiration from some boards I came up with this solution which works fine for me.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
usepackage[colorlinks]{hyperref} usepackage[style=authortitle,backref=true]{biblatex} usepackage{longtable} % center data in paragraph column newcolumntype{C}{>{centeringarraybackslash}p{0.7linewidth}} begin{document} %start a new counter newcounter{manualFootnote} %set value to the actual value of the footnote counter setcounter{manualFootnote}{value{footnote}} %increase counter by one stepcounter{manualFootnote} begin{longtable}{c | C} my custom & footnotefootnotemark[value{manualFootnote}]\ hline stepcounter{manualFootnote} another custom & footnotefootnotemark[value{manualFootnote}]\ end{longtable} %decrease counter again to get number for first counter addtocounter{manualFootnote}{-1} %print the text for the reference, textcite{} is from biblatex and takes a reference from the biliography footnotetext[value{manualFootnote}]{textcite{myRef}} %increase counter for the second footnote stepcounter{manualFootnote} %print the second footnote text footnotetext[value{manualFootnote}]{textcite{myRef2}} %increase the real footnote counter by 2 for the two footnotes in the table addtocounter{footnote}{2} end{document} |
Hyperref will not mark these created footnotes as links, but I think it’s not a big deal.
I’m just a beginner with latex, so if you think you have a better solution leave me a comment.