How to get page number of tikzmark markers?
up vote
0
down vote
favorite
Given the following example using the tikzmark
library:
documentclass{article}
usepackage{tikz}
usetikzlibrary{tikzmark}
usepackage{atbegshi}
AtBeginShipout{AtBeginShipoutUpperLeft{%
foreach n in {A,B} {%
ifnumarabic{page}=tikzmarkpage{n}
tikz[remember picture, overlay]
node[draw=blue] at (pic cs:n) {n};
fi
}
}}
newcommandtikzmarkpage[1]{%
% How to return the actual page number of marker #1 here?
arabic{page}%
}
begin{document}
tikzmark{A}
newpage
tikzmark{B}
end{document}
In this version the marks A
and B
are defined on different pages, but looping through all nodes in the AtBeginShipout
hook makes all nodes being displayed on every page on top of each other. I know tikzmark
already stores the page number the marker was defined on, I don't see a way to extract that information to use it for a check in the foreach
loop, though.
So how would you define tikzmarkpage
to get the corresponding page number for the given marker name?
tikzmark atbegshi
add a comment |
up vote
0
down vote
favorite
Given the following example using the tikzmark
library:
documentclass{article}
usepackage{tikz}
usetikzlibrary{tikzmark}
usepackage{atbegshi}
AtBeginShipout{AtBeginShipoutUpperLeft{%
foreach n in {A,B} {%
ifnumarabic{page}=tikzmarkpage{n}
tikz[remember picture, overlay]
node[draw=blue] at (pic cs:n) {n};
fi
}
}}
newcommandtikzmarkpage[1]{%
% How to return the actual page number of marker #1 here?
arabic{page}%
}
begin{document}
tikzmark{A}
newpage
tikzmark{B}
end{document}
In this version the marks A
and B
are defined on different pages, but looping through all nodes in the AtBeginShipout
hook makes all nodes being displayed on every page on top of each other. I know tikzmark
already stores the page number the marker was defined on, I don't see a way to extract that information to use it for a check in the foreach
loop, though.
So how would you define tikzmarkpage
to get the corresponding page number for the given marker name?
tikzmark atbegshi
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Given the following example using the tikzmark
library:
documentclass{article}
usepackage{tikz}
usetikzlibrary{tikzmark}
usepackage{atbegshi}
AtBeginShipout{AtBeginShipoutUpperLeft{%
foreach n in {A,B} {%
ifnumarabic{page}=tikzmarkpage{n}
tikz[remember picture, overlay]
node[draw=blue] at (pic cs:n) {n};
fi
}
}}
newcommandtikzmarkpage[1]{%
% How to return the actual page number of marker #1 here?
arabic{page}%
}
begin{document}
tikzmark{A}
newpage
tikzmark{B}
end{document}
In this version the marks A
and B
are defined on different pages, but looping through all nodes in the AtBeginShipout
hook makes all nodes being displayed on every page on top of each other. I know tikzmark
already stores the page number the marker was defined on, I don't see a way to extract that information to use it for a check in the foreach
loop, though.
So how would you define tikzmarkpage
to get the corresponding page number for the given marker name?
tikzmark atbegshi
Given the following example using the tikzmark
library:
documentclass{article}
usepackage{tikz}
usetikzlibrary{tikzmark}
usepackage{atbegshi}
AtBeginShipout{AtBeginShipoutUpperLeft{%
foreach n in {A,B} {%
ifnumarabic{page}=tikzmarkpage{n}
tikz[remember picture, overlay]
node[draw=blue] at (pic cs:n) {n};
fi
}
}}
newcommandtikzmarkpage[1]{%
% How to return the actual page number of marker #1 here?
arabic{page}%
}
begin{document}
tikzmark{A}
newpage
tikzmark{B}
end{document}
In this version the marks A
and B
are defined on different pages, but looping through all nodes in the AtBeginShipout
hook makes all nodes being displayed on every page on top of each other. I know tikzmark
already stores the page number the marker was defined on, I don't see a way to extract that information to use it for a check in the foreach
loop, though.
So how would you define tikzmarkpage
to get the corresponding page number for the given marker name?
tikzmark atbegshi
tikzmark atbegshi
asked 3 mins ago
siracusa
4,46411127
4,46411127
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
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%2f462319%2fhow-to-get-page-number-of-tikzmark-markers%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