Is there a command to nullify, override or cancel any font style in the text in braces?
Something like:
\nullifystyle{sample text: \textit{this should be not italic} and \textbf{this should be not bold}}
\normalfont
, \textnormal
,\textup
and \upshape
do the very opposite.
See: How to set not italic or not bold?
Use case: I need it to recall pieces of text from other part of the document, but to override the font style. A MWE would be:
\documentclass{article}
\begin{document}
\newcommand{\nullifystyle}{???} %is there already a command for this? or how to define it?
\newcommand{\textsample} {some normal text, \textit{some italic} and \textbf{some bold}}
Here I would like to write \textsample. \par
Here \nullifystyle{\textsample} \ should be typed totally with normal font style.
\end{document}
Best Answer
Locally redefine
\selectfont
not to honor changes in shape and series:It works the same if you use a macro like in your example