# How to temporarily remove the formatting in a definition environment?

I have a definition, written as follows:

\begin{definition}
This is a definition, in which I would like to have a few normal words.
\end{definition}

Ordinarily, the entire definition is rendered in italics. But I would like to remove the formatting from "normal," making it appear without the italics. Is there a quick way to achieve this?

-

## migrated from stackoverflow.comNov 20 '11 at 19:03

This question came from our site for professional and enthusiast programmers.

Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. – Torbjørn T. Nov 20 '11 at 19:06

You could manually alter the shape of the font using \upshape. Or, you could redefine what \itshape (switching to italic font) means by letting it default to \upshape. The latter is possible using a patch provided by the [etoolbox package][etoolbox-pkg]. However, even though the change will be local to the environment, other \itshape uses will also be made to \upshape. Perhaps this isn't a concern in this case.

\documentclass{article}
\usepackage{etoolbox}% http://ctan.org/pkg/etoolbox
\newenvironment{definition}%
{\itshape}% \begin{definition}
{}% \end{definition}
\begin{document}
% Normal definition
\begin{definition}
This is a definition, in which I would like to have a few normal words.
\end{definition}

% Manually corrected definition
\begin{definition}
\upshape This is a definition, in which I would like to have a few normal words.
\end{definition}

\AtBeginEnvironment{definition}{\renewcommand{\itshape}{\upshape}}% You can also place this in your document preamble
% Automatically corrected definition
\begin{definition}
This is a definition, in which I would like to have a few normal words.
\end{definition}

\end{document}
-
I think \textup is exactly what I am looking for. Thanks a lot! – Shredderroy Nov 20 '11 at 18:52
You can also say something like \expandafter\renewcommand\expandafter\definition{\expandafter\upshape} to redefine the (previously defined) definition environment. – Gonzalo Medina Nov 20 '11 at 23:48