Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Restoring defaults after \renewcommand

3,227 views
Skip to first unread message

Amittai Aviram

unread,
Mar 28, 2006, 2:22:58 PM3/28/06
to
Is there an easy and simple way to restore LaTeX default settings after
I have changed them with \renewcommand? For instance, suppose I change
my enumeration label:

\renewcommand{\theenumi}{\roman{enumi}}
\renewcommand{\labelenumi}{\theenumi)}

But I just want to do this for one subsection; then I want to go back
to normal LaTeX behavior.

Thanks!

Amittai

Vilar Camara Neto

unread,
Mar 28, 2006, 3:52:40 PM3/28/06
to

\let\oldtheenumi=\theenumi
\let\oldlabelenumi=\labelenumi


\renewcommand{\theenumi}{\roman{enumi}}
\renewcommand{\labelenumi}{\theenumi)}

then, to revert:

\let\theenumi=\oldtheenumi
\let\labelenumi=\oldlabelenumi

--
Regards,
Vilar Camara Neto

Mycroft

unread,
Mar 29, 2006, 9:38:42 AM3/29/06
to
Well,

If there's just a few enumerate:

\begin{enumerate}


\renewcommand{\theenumi}{\roman{enumi}}
\renewcommand{\labelenumi}{\theenumi)}

\item 1
\item 2
\item 3
\end{enumerate}

will be local. Even better, define your own environment.

Or enclose the whole section in {}

{


\renewcommand{\theenumi}{\roman{enumi}}
\renewcommand{\labelenumi}{\theenumi)}

% your section
}

but this might have side effects. I don't know.

Martin

0 new messages