निरंजन
Following is one MWE with package `expex` used for writing numbered examples -
```
\documentclass[12pt]{article}
\usepackage{expex}
\begin{document}
\pex<test> % First level label
\a<a>\begingl % Second level label
\gla abcd efgh ijkl//
\glb abcd.SG efgh.PL ijkl.FUT//
\glft abcd ijkl efgh//
\endgl
\a<b> \begingl % Second level label
\gla abcd efgh ijkl//
\glb abcd.SG efgh.PL ijkl.FUT//
\glft abcd ijkl efgh//
\endgl
\xe
Example \getfullref{test.b} is interesting.
\end{document}
```
`getfullref{test.b}` results as `1b` in the output. I simply want `1-b`. How to achieve this? I want a global redefinition which will result every `getfullref{label.label}` with a dash.
Top Answer
joulev
As `\getref` can produce the parts separately, we can define a macro that customizes `expex` references based on that command.
```
\documentclass[12pt]{article}
\usepackage{expex}
\makeatletter
\def\mygetfullref#1{\@mygetfullref#1.}
\def\@mygetfullref#1.#2.{\getref{#1}-\getref{#1.#2}}
%\def\@mygetfullref#1.#2.{\getref{#1}${}\to{}$\getref{#1.#2}}
\makeatother
\begin{document}
\pex<test> % First level label
\a<a>\begingl % Second level label
\gla abcd//
\glb abcd//
\glft abcd//
\endgl
\a<b> \begingl
\gla abcd//
\glb abcd//
\glft abcd//
\endgl
\xe
Example \getfullref{test.b} is interesting.
But example \mygetfullref{test.a} is even more interesting.
\end{document}
```
![blob](/image?hash=ed1cc32ecf8ec036726c33f1fbc7e9ce08a0aa3105ed9975d20e694d94bf515e)