Could someone explain to me why this isn't working?
Code: Select all
\documentclass{article}
\usepackage{xstring}
\usepackage{enumitem}
\begin{document}
\begin{enumerate}[label=(\arabic*), labelindent=\parindent, leftmargin=*, rightmargin=.5in]
\item This is a test premise. \label{Premise-1}
\end{enumerate}
This is the context of the ref to Premise-1: \ref{Premise-1}
% This does not work. The output in \outputtestA is blank.
Test A:
\def \testA{\ref{Premise-1}}
\StrBetween{\testA}{(}{)}[\outputtestA]
\outputtestA
% This works fine.
Test B:
\def \testB{(1)}
\StrBetween{\testB}{(}{)}[\outputtestB]
\outputtestB
\end{document}
Thanks!