I'd like to create a single label in ref containing multiple values (page, counter, position...). I'm not sure why, but using zref I can't manage to get access to the counter value, the zposx value... Am I doing something wrong?
\documentclass[]{article}
\usepackage{tikz}
\usepackage{zref-savepos,zref-abspage,zref-user,zref-counter,zref-abspos,zref-pagelayout}
\makeatletter
%% Create a list of properties to register for our labels (by default labels only ship with a subset of properties)
%% See https://mirror.ibcp.fr/pub/CTAN/macros/latex/contrib/zref/zref.pdf, "Declared properties" page 10
\zref@newlist{subproof}
\zref@addprops{subproof}{abspage,posx,posy,counter,pagevalue,paperwidth} % <- Any solution to just add "main,savepos,thepage..."
\NewDocumentCommand\subproofMarkStart{m}{%
\zref@labelbylist{#1}{subproof}%
}
\NewDocumentCommand\subproofMarkStop{m}{%
\zref@labelbylist{#1}{subproof}%
}
\makeatother
\author{}
\begin{document}
Hello \subproofMarkStart{blibli}
\zref[abspage]{blibli}
The counter of blibli is \zref[counter]{blibli} (why is it empty?), the position is \zposx{blibli} (why??)
The paper width is \zref[paperwidth]{blibli}
I would expect to see a line drawn:
\begin{tikzpicture}[remember picture, overlay]
\draw (current page.north west) -- ([xshift=\zposx{blibli}sp,yshift=\zposy{blibli}sp]current page.south west);
\end{tikzpicture}
\end{document}
\zref@savepos\zref@labelbylist{#1}{subproof}for the position. And counter can only store something if a counter has been set before. – Ulrike Fischer Feb 03 '22 at 16:30\@currentcountermanually before the call to labelbylist? – tobiasBora Feb 03 '22 at 16:42