zref:某些属性添加到我自己的属性列表中时无法获取

zref:某些属性添加到我自己的属性列表中时无法获取

我想创建一个ref包含多个值(页面、计数器、位置……)的单个标签。我不知道为什么,但zref我无法访问该counter值,该zposx值……我做错了什么吗?

\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}

相关内容