I used the package embrac that the following question Upright parentheses in italic text let to.
However, If I define a simple environment, it will not work. See the example below. How can I fix this?
\documentclass{article}
\usepackage{embrac}
\begin{document}
\newcommand*{\TextA}{(\ldots) this is a citation from a famous author}
\newcommand*{\TextB}{\textup{(\ldots)} this is a citation from a famous author}
\textit{\TextA}\\
\textit{\TextB}\\
\TextA
\end{document}
\expandafter\textit\expandafter{\TextA}.embracdoesn't make\textitexpand its argument – cgnieder Aug 10 '15 at 14:26\newcommanddoesn't define anenvironment. That would be\newenvironment. – cgnieder Aug 10 '15 at 14:27embracexpandtextitoremph? – cacamailg Aug 10 '15 at 14:45\cs_generate_variant:Nn \embrac_textit:nn {no}(same for\emphand\textsl) – cgnieder Aug 10 '15 at 14:51\def\mytextit#1{\expandafter\textit\expandafter{#1}}and then use\mytextit{\TextA}. In my tests this worked. – sgmoye Aug 10 '15 at 15:05\ExplSyntaxOn \cs_generate_variant:Nn \embrac_textit:nn {no} \cs_generate_variant:Nn \embrac_emph:nn {no} \cs_generate_variant:Nn \embrac_textsl:nn {no} \ExplSyntaxOff– cacamailg Aug 10 '15 at 15:11\textitstill uses thenn-variant. You must redefine\textit, too, see my answer. – cgnieder Aug 10 '15 at 15:13