Closed Yarakashi-Kikohshi closed 1 month ago
I confirm that neither \label
nor \zlabel
have label name auto-completion. Can you elaborate on your request? Either macro should just define a new label, instead of referencing one.
The highlighting for \ref[a]{b}
and \zref[a]{b}
are the same. Are you requesting a same colorization with \ref{b}
?
\label{a}
and \zlabel{a}
are colorized differently. We have outsourced our LaTeX syntax highlighting grammar to vscode-latex-basics, could you please post your issue there and clarify what behaviour you expect?
I apologize for my misleading and ambiguous explanation.
I confirm that neither
\label
nor\zlabel
have label name auto-completion. Can you elaborate on your request?
By “label name completion” I was referring to the meaning that labeling by \zlabel
is not reflected in the auto-completion of labels in \ref
.
In other words, when you use \zlabel{foo}
, foo
is not displayed as a candidate in \ref
.
Since \zlabel
is a command for cross-referenced labels like \label
, I would like to see labels by \zlabel
also displayed as candidates in \ref
.
Are you requesting a same colorization with
\ref{b}
?
Yes.
I think that \zref
and \zlabel
with options should be the same color syntax highlighting as \ref
and \label
.
I will submit this as an issue to vscode-latex-basic later.
You can use latex-workshop.intellisense.label.command
to include zlabel
.
For highlighting, please create an issue in the other repo.
I thought I had some grasp of this extension, but I did not know about this feature. I should have read the wiki more before posting.
In response to your comment, I have added zlabel
as follows.
"latex-workshop.intellisense.label.command": [
"label",
"zlabel",
"linelabel"
]
However, the configuration of this setting may not be reflected. Am I doing something wrong?
\documentclass{article}
\usepackage{zref}
\begin{document}
\begin{figure}
FOO
\caption{foo}
\label{fig:foo}
\end{figure}
\begin{figure}
BAR
\caption{bar}
\zlabel{fig:bar}
\end{figure}
\ref{fig:}
\end{document}
If it won't work, try reload vscode.
I reloaded many times and the result did not change, but when I added zlabel
to latex-workshop.view.outline.commands
, it worked! (I got the idea from your screenshot.)
Thank you very much for your kind attention. I apologize for the trouble I have caused you.
Right, I pushed another fix that influences this issue. Will go live in the next release.
Pre-checks*
The Missed*
\zlabel
provided by zref does not have “label name completion” and “syntax highlighting” like other\label
s.Additionally, syntax highlighting for
\ref
accepts variations of this such as\zref
, but syntax highlighting for\zref
with options (\zref[option]{foo}
) does not work.Anything Else?
None.
Version