I don't understand how \IfStrEq from xstring works.
Why this code doesn't show "This is text" ?
\documentclass[10pt,a4paper,twoside]{article}
\usepackage{xparse}
\usepackage{xstring}
\DeclareDocumentCommand \field {} {text}
\begin{document}
\IfStrEq{\field}{text}{This is text}{Why this is not text?}
\end{document}
\newcommand\field{text}
.\protected\def\field{text}
andtext
\field
is not a string, but something eventually printingtext
. Using\IfStrEq
is wrong.