Footnotes inside tabularx with hyperref
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:
- Footnotes are displayed three times instead of once.
- Numbering is wrong.
- 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}\[1ex]%
}{%
&makebox[1ex]{}{bf #2}\%
}
}
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}

hyperref footnotes tabularx
add a comment |
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:
- Footnotes are displayed three times instead of once.
- Numbering is wrong.
- 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}\[1ex]%
}{%
&makebox[1ex]{}{bf #2}\%
}
}
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}

hyperref footnotes tabularx
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
add a comment |
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:
- Footnotes are displayed three times instead of once.
- Numbering is wrong.
- 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}\[1ex]%
}{%
&makebox[1ex]{}{bf #2}\%
}
}
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}

hyperref footnotes tabularx
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:
- Footnotes are displayed three times instead of once.
- Numbering is wrong.
- 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}\[1ex]%
}{%
&makebox[1ex]{}{bf #2}\%
}
}
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}

hyperref footnotes tabularx
hyperref footnotes tabularx
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
add a comment |
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
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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