In Philex, you can refer locally to an example (2b) by just typing \rnx{label} and it will return just (b), otherwise just type \rn{label} and it returns (2b).
Here is the syntax of the two commands:
\newcommand{\rf}[2][]{%%
\ifhyperref%%
(\hyperlink{#2}{\csname#2\endcsname}#1)%
\else%%
(\csname#2\endcsname#1)%
\fi}
%Cross-reference to subsentence without main number:%
\newcommand{\rfx}[2][]{%
\ifhyperref%
(\hyperlink{#2}{\csname#2q\endcsname}#1)%
\else%
(\csname#2q\endcsname#1)%
\fi}
As you may know, when referring to subsubexamples such as (1a.i), I'm looking for a way to also skip the sublevel and return just (i),
- which is possible thanks to Ulrich Diez's solution as found here:
- but only works if there is a separator;
- cf. my post here Local cross-referencing with Linguex/Philex and Cleveref: Skipping 1st and 2nd level sublabels ...
- and cf. my larger concern here Cross-referencing: more sublevels, and presets.
My question is quite straightforward. I would like to know what \csname#2q actually does, so I can use it to also skip the sublevel label, without having to worry about the presence of a delimiter as in Ulrich's \gobbletodot suggestion.
Edit
I found this line :
\refstepcounter{altsub}\label{#2q}
So this is only a label for the sublevel.
But then we find :
\refstepcounter{altsubsub}\label{#2q}
So the problem is that #2q is one and the same label for the sub- and subsub- levels.
I guess the way the package is written, I could not refer to the sublabel and only keep the subsublabel.
\csname#2q\endcsnamebuilds a command name, if e.g. #2 isabcthis would call the command\abcq. – Ulrike Fischer Mar 23 '22 at 17:28\csname anything\endcsnamebecomes\anything. Adding aqmakes\anythingq. In both commands,#1is the optional (by default empty) argument, and#2is the second, mandatory argument. When you write\rf{label}it becomes (if hyperref is not loaded)(\csname label\endcsname)which is(\label)which seems very weird, since\labelis a LaTeX command.\rfx{label}then becomes(\labelq). – Phelype Oleinik Mar 23 '22 at 17:28