Zref package Label (\zlabel) at label key in tabularray #202
Replies: 3 comments
|
Sorry, I haven't used PS: you don't need to modify \ExplSyntaxOn
\cs_set_protected:Npn \__tblr_build_table_label_entry:
{
\tl_set:Nx \l_tmpa_tl { \InsertTblrText { label } }
\tl_if_eq:NnTF \l_tmpa_tl { none }
{
\SetTblrTemplate { caption-tag }{ empty }
\SetTblrTemplate { caption-sep }{ empty }
}
{
\refstepcounter { table }
\tl_if_empty:NF \l_tmpa_tl { \exp_args:NV \label \l_tmpa_tl }
\tl_if_empty:NF \l_tmpa_tl { \exp_args:NV \zlabel \l_tmpa_tl }
}
\tl_set:Nx \l_tmpb_tl { \InsertTblrText { entry } }
\tl_if_eq:NnF \l_tmpb_tl { none }
{ \UseTblrTemplate { caption-lot } { default } }
}
\ExplSyntaxOff |
|
The advantages of the My MWE: My output: PS: Thank you for your tip! |
|
@SimonidesProject I have added |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I use the packages zref and
hyperrefto make my references in LaTeX. These packages are independents and have their own schema of reference, so I need to use the commands \zlabel and \label to work with them.I was searching the source code of
tabularrayand did not find any options to work withzrefpackage. But, working on the code I got one solution. I went to the command\__tblr_build_table_label_entry:definition:And added the line
\tl_if_empty:NF \l_tmpa_tl { \exp_args:NV \zlabel \l_tmpa_tl }just after the line\tl_if_empty:NF \l_tmpa_tl { \exp_args:NV \label \l_tmpa_tl }so I got the two labels working very well with this code:The problem is that I am not expert in LaTeX 3 syntax and when I compiled for the first time this solution I got the error
The Command \__tblr_build_table_label_entry: already defined, so, for this working solution I downloaded thetabularray.styrenamed and modified it in my document folder.Is there possible to add this solution to the source code? Maybe with a
zrefkey-option on the package specification?All reactions