MWE
\documentclass{article}
\usepackage{cleveref}
\usepackage{expex}
\begin{document}
\section{Introduction}\label{sec:intro}
\verb|ExPex| labels referred using \verb|cleveref| shows section numbers instead of example numbers.\\
\ex\label{ExPex1}
An \verb|ExPex| example
\xe
\ex\label{ExPex2}
Another \verb|ExPex| example
\xe
Crossref \verb|ExPex| examples using \verb|\ref{<label>}|: \ref{ExPex1} and \ref{ExPex2}\\
Crossref \verb|ExPex| examples using \verb|\cref{<label>}|: {\bf \cref{ExPex1} and \cref{ExPex2}}\\
\begin{enumerate}
\item\label{enum1} An \verb|enumerate| example
\item\label{enum2} Another \verb|enumerate| example
\end{enumerate}
Crossref \verb|enumerate| examples using \verb|\ref{<label>}|: \ref{enum1} and \ref{enum2}\\
Crossref \verb|enumerate| examples using \verb|\cref{<label>}|: \cref{enum1} and \cref{enum2}\\
\end{document}
In the .aux
file cleveref
tags enumerate
examples using enumi
. But ExPex
examples are tagged using section
.
\newlabel{ExPex1}{{1}{1}}
\newlabel{ExPex1@cref}{{[section][1][]1}{[1][1][]1}}
\newlabel{ExPex2}{{2}{1}}
\newlabel{ExPex2@cref}{{[section][1][]1}{[1][1][]1}}
\newlabel{enum1}{{1}{1}}
\newlabel{enum1@cref}{{[enumi][1][]1}{[1][1][]1}}
\newlabel{enum2}{{2}{1}}
\newlabel{enum2@cref}{{[enumi][2][]2}{[1][1][]1}}
This looks similar to this question and possibly requires a fix in cleveref. Otherwise, is there a way to patch or preprend ExPex macros so that cleveref would capture their numbers?