Footnotes inside tabularx with hyperref












0















I want to make my own command to deal with hyperref incompatibility with footnotes inside tabularx. I can't use hyperfootnotes=false option for hyperref.



It seems I'm in a half way to get what I want but I'm not enough experienced in LaTeX.



The problems are:




  1. Footnotes are displayed three times instead of once.

  2. Numbering is wrong.

  3. Links are missing.


Code:



documentclass{article}
usepackage{tabularx}
usepackage{xparse}
usepackage{tikz}
usetikzlibrary{arrows.meta}

usepackage[%
% hyperfootnotes=false,
]{hyperref}

newcommandtikznode[3]%
{tikz[remember picture,baseline=(#2.base)]
node[minimum size=0pt,inner sep=0pt,#1](#2){#3};%
}


begin{document}
Some text. This is the main text.footnote{This is a footnote in the main text.}

fbox{
begin{minipage}{linewidth}
This is a quotation with a footnote in it.footnote{A footnote in the minipage} The footnote is numbered independently of the rest of the textfootnote{test}.
end{minipage}
}

fbox{
begin{minipage}[t]{textwidth}
tikzstyle{every picture}+=[remember picture]
renewcommand{arraystretch}{1.00}
newcounter{cntasterisk}
newcommand{TypeAsterisk}{stepcounter{cntasterisk}tikznode{gw-arabic{cntasterisk}}{*}}
newcounter{cntoption}
newcommand{OptionAsterisk}[1]{stepcounter{cntoption}tikznode{op-arabic{cntoption}}{#1}}
NewDocumentCommand{TypeName}{sm}{%
IfBooleanTF{#1}{%
{bf #2}&multicolumn{2}{l|}{}\[1ex]%
}{%
{bf #2}&multicolumn{2}{l|}{}\%
}
}
NewDocumentCommand{OptName}{sm}{%
IfBooleanTF{#1}{%
&multicolumn{2}{l|}{OptionAsterisk{it #2:}}\[1ex]%
}{%
&multicolumn{2}{l|}{OptionAsteriskit #2:}\%
}
}
NewDocumentCommand{OptValue}{smm}{%
IfBooleanTF{#1}{%
&makebox[1ex]{}{bf #2}&#3\[1ex]%
}{%
&makebox[1ex]{}{bf #2}&#3\%
}
}

newcommandsavedfootnotes{}
newcommandMyFootnote[1]{%
stepcounter{mpfootnote}$^textrm{scriptsizethempfootnote}$
xdefsavedfootnotes%
{unexpandedexpandafter{savedfootnotes}noexpandfootnotetext{#1}}%
}

begin{tabularx}{textwidth}{|l<{makebox[1em]{}}|l@{makebox[2ex]{--}makebox[1ex]{}}X|}
hline
TypeName{nameTypeAsteriskTypeAsteriskTypeAsteriskTypeAsterisk}
hline
OptName{option 1}
hline
OptValue{V1}{vlaue 1}
hline
OptValue{V2}{vlaue 2MyFootnote{whatever}}
hline
OptValue{V3}{vlaue 3MyFootnote{anything}}
hline
OptName{option 2}
hline
OptValue{V4}{vlaue 4}
hline
OptValue{V5}{vlaue 5}
hline
OptName{option 3MyFootnote{even more}}
hline
OptValue{V6}{vlaue 6}
hline
OptName{option 4}
hline
OptValue{Xtextit{n}}{special}
hline
end{tabularx}

savedfootnotes

begin{tikzpicture}[overlay]
foreach x in {1,...,arabic{cntasterisk}} {%
draw [red, -{Stealth}, thick] (gw-x) |- (op-x);
}
end{tikzpicture}

textfootnote{text}

end{minipage}
}
end{document}


enter image description here










share|improve this question

























  • I don't quite understand what you want. A tabularx and hyperref working, like described here: tex.stackexchange.com/a/114147/4736 ? And why the tikz? Maybe edit your question: What is the problem you want to solve with this code?

    – Keks Dose
    Feb 21 at 12:58











  • Yep, it's similar but I want to automate it and have a single command to put footnotes. I added pic with pointed what's wrong.

    – Simon
    Feb 21 at 13:34
















0















I want to make my own command to deal with hyperref incompatibility with footnotes inside tabularx. I can't use hyperfootnotes=false option for hyperref.



It seems I'm in a half way to get what I want but I'm not enough experienced in LaTeX.



The problems are:




  1. Footnotes are displayed three times instead of once.

  2. Numbering is wrong.

  3. Links are missing.


Code:



documentclass{article}
usepackage{tabularx}
usepackage{xparse}
usepackage{tikz}
usetikzlibrary{arrows.meta}

usepackage[%
% hyperfootnotes=false,
]{hyperref}

newcommandtikznode[3]%
{tikz[remember picture,baseline=(#2.base)]
node[minimum size=0pt,inner sep=0pt,#1](#2){#3};%
}


begin{document}
Some text. This is the main text.footnote{This is a footnote in the main text.}

fbox{
begin{minipage}{linewidth}
This is a quotation with a footnote in it.footnote{A footnote in the minipage} The footnote is numbered independently of the rest of the textfootnote{test}.
end{minipage}
}

fbox{
begin{minipage}[t]{textwidth}
tikzstyle{every picture}+=[remember picture]
renewcommand{arraystretch}{1.00}
newcounter{cntasterisk}
newcommand{TypeAsterisk}{stepcounter{cntasterisk}tikznode{gw-arabic{cntasterisk}}{*}}
newcounter{cntoption}
newcommand{OptionAsterisk}[1]{stepcounter{cntoption}tikznode{op-arabic{cntoption}}{#1}}
NewDocumentCommand{TypeName}{sm}{%
IfBooleanTF{#1}{%
{bf #2}&multicolumn{2}{l|}{}\[1ex]%
}{%
{bf #2}&multicolumn{2}{l|}{}\%
}
}
NewDocumentCommand{OptName}{sm}{%
IfBooleanTF{#1}{%
&multicolumn{2}{l|}{OptionAsterisk{it #2:}}\[1ex]%
}{%
&multicolumn{2}{l|}{OptionAsteriskit #2:}\%
}
}
NewDocumentCommand{OptValue}{smm}{%
IfBooleanTF{#1}{%
&makebox[1ex]{}{bf #2}&#3\[1ex]%
}{%
&makebox[1ex]{}{bf #2}&#3\%
}
}

newcommandsavedfootnotes{}
newcommandMyFootnote[1]{%
stepcounter{mpfootnote}$^textrm{scriptsizethempfootnote}$
xdefsavedfootnotes%
{unexpandedexpandafter{savedfootnotes}noexpandfootnotetext{#1}}%
}

begin{tabularx}{textwidth}{|l<{makebox[1em]{}}|l@{makebox[2ex]{--}makebox[1ex]{}}X|}
hline
TypeName{nameTypeAsteriskTypeAsteriskTypeAsteriskTypeAsterisk}
hline
OptName{option 1}
hline
OptValue{V1}{vlaue 1}
hline
OptValue{V2}{vlaue 2MyFootnote{whatever}}
hline
OptValue{V3}{vlaue 3MyFootnote{anything}}
hline
OptName{option 2}
hline
OptValue{V4}{vlaue 4}
hline
OptValue{V5}{vlaue 5}
hline
OptName{option 3MyFootnote{even more}}
hline
OptValue{V6}{vlaue 6}
hline
OptName{option 4}
hline
OptValue{Xtextit{n}}{special}
hline
end{tabularx}

savedfootnotes

begin{tikzpicture}[overlay]
foreach x in {1,...,arabic{cntasterisk}} {%
draw [red, -{Stealth}, thick] (gw-x) |- (op-x);
}
end{tikzpicture}

textfootnote{text}

end{minipage}
}
end{document}


enter image description here










share|improve this question

























  • I don't quite understand what you want. A tabularx and hyperref working, like described here: tex.stackexchange.com/a/114147/4736 ? And why the tikz? Maybe edit your question: What is the problem you want to solve with this code?

    – Keks Dose
    Feb 21 at 12:58











  • Yep, it's similar but I want to automate it and have a single command to put footnotes. I added pic with pointed what's wrong.

    – Simon
    Feb 21 at 13:34














0












0








0








I want to make my own command to deal with hyperref incompatibility with footnotes inside tabularx. I can't use hyperfootnotes=false option for hyperref.



It seems I'm in a half way to get what I want but I'm not enough experienced in LaTeX.



The problems are:




  1. Footnotes are displayed three times instead of once.

  2. Numbering is wrong.

  3. Links are missing.


Code:



documentclass{article}
usepackage{tabularx}
usepackage{xparse}
usepackage{tikz}
usetikzlibrary{arrows.meta}

usepackage[%
% hyperfootnotes=false,
]{hyperref}

newcommandtikznode[3]%
{tikz[remember picture,baseline=(#2.base)]
node[minimum size=0pt,inner sep=0pt,#1](#2){#3};%
}


begin{document}
Some text. This is the main text.footnote{This is a footnote in the main text.}

fbox{
begin{minipage}{linewidth}
This is a quotation with a footnote in it.footnote{A footnote in the minipage} The footnote is numbered independently of the rest of the textfootnote{test}.
end{minipage}
}

fbox{
begin{minipage}[t]{textwidth}
tikzstyle{every picture}+=[remember picture]
renewcommand{arraystretch}{1.00}
newcounter{cntasterisk}
newcommand{TypeAsterisk}{stepcounter{cntasterisk}tikznode{gw-arabic{cntasterisk}}{*}}
newcounter{cntoption}
newcommand{OptionAsterisk}[1]{stepcounter{cntoption}tikznode{op-arabic{cntoption}}{#1}}
NewDocumentCommand{TypeName}{sm}{%
IfBooleanTF{#1}{%
{bf #2}&multicolumn{2}{l|}{}\[1ex]%
}{%
{bf #2}&multicolumn{2}{l|}{}\%
}
}
NewDocumentCommand{OptName}{sm}{%
IfBooleanTF{#1}{%
&multicolumn{2}{l|}{OptionAsterisk{it #2:}}\[1ex]%
}{%
&multicolumn{2}{l|}{OptionAsteriskit #2:}\%
}
}
NewDocumentCommand{OptValue}{smm}{%
IfBooleanTF{#1}{%
&makebox[1ex]{}{bf #2}&#3\[1ex]%
}{%
&makebox[1ex]{}{bf #2}&#3\%
}
}

newcommandsavedfootnotes{}
newcommandMyFootnote[1]{%
stepcounter{mpfootnote}$^textrm{scriptsizethempfootnote}$
xdefsavedfootnotes%
{unexpandedexpandafter{savedfootnotes}noexpandfootnotetext{#1}}%
}

begin{tabularx}{textwidth}{|l<{makebox[1em]{}}|l@{makebox[2ex]{--}makebox[1ex]{}}X|}
hline
TypeName{nameTypeAsteriskTypeAsteriskTypeAsteriskTypeAsterisk}
hline
OptName{option 1}
hline
OptValue{V1}{vlaue 1}
hline
OptValue{V2}{vlaue 2MyFootnote{whatever}}
hline
OptValue{V3}{vlaue 3MyFootnote{anything}}
hline
OptName{option 2}
hline
OptValue{V4}{vlaue 4}
hline
OptValue{V5}{vlaue 5}
hline
OptName{option 3MyFootnote{even more}}
hline
OptValue{V6}{vlaue 6}
hline
OptName{option 4}
hline
OptValue{Xtextit{n}}{special}
hline
end{tabularx}

savedfootnotes

begin{tikzpicture}[overlay]
foreach x in {1,...,arabic{cntasterisk}} {%
draw [red, -{Stealth}, thick] (gw-x) |- (op-x);
}
end{tikzpicture}

textfootnote{text}

end{minipage}
}
end{document}


enter image description here










share|improve this question
















I want to make my own command to deal with hyperref incompatibility with footnotes inside tabularx. I can't use hyperfootnotes=false option for hyperref.



It seems I'm in a half way to get what I want but I'm not enough experienced in LaTeX.



The problems are:




  1. Footnotes are displayed three times instead of once.

  2. Numbering is wrong.

  3. Links are missing.


Code:



documentclass{article}
usepackage{tabularx}
usepackage{xparse}
usepackage{tikz}
usetikzlibrary{arrows.meta}

usepackage[%
% hyperfootnotes=false,
]{hyperref}

newcommandtikznode[3]%
{tikz[remember picture,baseline=(#2.base)]
node[minimum size=0pt,inner sep=0pt,#1](#2){#3};%
}


begin{document}
Some text. This is the main text.footnote{This is a footnote in the main text.}

fbox{
begin{minipage}{linewidth}
This is a quotation with a footnote in it.footnote{A footnote in the minipage} The footnote is numbered independently of the rest of the textfootnote{test}.
end{minipage}
}

fbox{
begin{minipage}[t]{textwidth}
tikzstyle{every picture}+=[remember picture]
renewcommand{arraystretch}{1.00}
newcounter{cntasterisk}
newcommand{TypeAsterisk}{stepcounter{cntasterisk}tikznode{gw-arabic{cntasterisk}}{*}}
newcounter{cntoption}
newcommand{OptionAsterisk}[1]{stepcounter{cntoption}tikznode{op-arabic{cntoption}}{#1}}
NewDocumentCommand{TypeName}{sm}{%
IfBooleanTF{#1}{%
{bf #2}&multicolumn{2}{l|}{}\[1ex]%
}{%
{bf #2}&multicolumn{2}{l|}{}\%
}
}
NewDocumentCommand{OptName}{sm}{%
IfBooleanTF{#1}{%
&multicolumn{2}{l|}{OptionAsterisk{it #2:}}\[1ex]%
}{%
&multicolumn{2}{l|}{OptionAsteriskit #2:}\%
}
}
NewDocumentCommand{OptValue}{smm}{%
IfBooleanTF{#1}{%
&makebox[1ex]{}{bf #2}&#3\[1ex]%
}{%
&makebox[1ex]{}{bf #2}&#3\%
}
}

newcommandsavedfootnotes{}
newcommandMyFootnote[1]{%
stepcounter{mpfootnote}$^textrm{scriptsizethempfootnote}$
xdefsavedfootnotes%
{unexpandedexpandafter{savedfootnotes}noexpandfootnotetext{#1}}%
}

begin{tabularx}{textwidth}{|l<{makebox[1em]{}}|l@{makebox[2ex]{--}makebox[1ex]{}}X|}
hline
TypeName{nameTypeAsteriskTypeAsteriskTypeAsteriskTypeAsterisk}
hline
OptName{option 1}
hline
OptValue{V1}{vlaue 1}
hline
OptValue{V2}{vlaue 2MyFootnote{whatever}}
hline
OptValue{V3}{vlaue 3MyFootnote{anything}}
hline
OptName{option 2}
hline
OptValue{V4}{vlaue 4}
hline
OptValue{V5}{vlaue 5}
hline
OptName{option 3MyFootnote{even more}}
hline
OptValue{V6}{vlaue 6}
hline
OptName{option 4}
hline
OptValue{Xtextit{n}}{special}
hline
end{tabularx}

savedfootnotes

begin{tikzpicture}[overlay]
foreach x in {1,...,arabic{cntasterisk}} {%
draw [red, -{Stealth}, thick] (gw-x) |- (op-x);
}
end{tikzpicture}

textfootnote{text}

end{minipage}
}
end{document}


enter image description here







hyperref footnotes tabularx






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Feb 21 at 16:02









Sebastiano

10.3k41960




10.3k41960










asked Feb 21 at 8:21









SimonSimon

949




949













  • I don't quite understand what you want. A tabularx and hyperref working, like described here: tex.stackexchange.com/a/114147/4736 ? And why the tikz? Maybe edit your question: What is the problem you want to solve with this code?

    – Keks Dose
    Feb 21 at 12:58











  • Yep, it's similar but I want to automate it and have a single command to put footnotes. I added pic with pointed what's wrong.

    – Simon
    Feb 21 at 13:34



















  • I don't quite understand what you want. A tabularx and hyperref working, like described here: tex.stackexchange.com/a/114147/4736 ? And why the tikz? Maybe edit your question: What is the problem you want to solve with this code?

    – Keks Dose
    Feb 21 at 12:58











  • Yep, it's similar but I want to automate it and have a single command to put footnotes. I added pic with pointed what's wrong.

    – Simon
    Feb 21 at 13:34

















I don't quite understand what you want. A tabularx and hyperref working, like described here: tex.stackexchange.com/a/114147/4736 ? And why the tikz? Maybe edit your question: What is the problem you want to solve with this code?

– Keks Dose
Feb 21 at 12:58





I don't quite understand what you want. A tabularx and hyperref working, like described here: tex.stackexchange.com/a/114147/4736 ? And why the tikz? Maybe edit your question: What is the problem you want to solve with this code?

– Keks Dose
Feb 21 at 12:58













Yep, it's similar but I want to automate it and have a single command to put footnotes. I added pic with pointed what's wrong.

– Simon
Feb 21 at 13:34





Yep, it's similar but I want to automate it and have a single command to put footnotes. I added pic with pointed what's wrong.

– Simon
Feb 21 at 13:34










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f475955%2ffootnotes-inside-tabularx-with-hyperref%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f475955%2ffootnotes-inside-tabularx-with-hyperref%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to send String Array data to Server using php in android

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents

Is anime1.com a legal site for watching anime?