# siunitx: How do I unset options previously set with \sisetup?

In the siunitx package (v1.3), I know that I can set various options with the \sisetup command. But what if I want a particular option to apply to only a small section of my document, with default behaviors for the rest of the document? How can I "unset" an option I have set and return to defaults?

Here is essentially what I'm trying to do:

Some text with SI units using default options.
\sisetup{prespace}
Some text with SI units using prespace option.
\sisetup{undo prespace, reset to default}
Some more text with SI units using default options.


Is this possible?

-

If the scope of the command is to be limited to a single table environment, say, then issuing the command \sisetup after the \begin{table} statement (but before a \begin{tabular}{...} statement) will automatically achieve your goal.

More generally, you could confine the scope of the \sisetup command by "encasing" it in a pair of \begingroup ... \endgroup commands or, less visually intrusive, with a pair of curly braces -- { and }.

Separately, the current version of the siunitx package is 2.3. If you're still working with version 1.3, as your question seems to indicate, you may want to consider upgrading the package to the latest version. :-)

-
All right, that works. It would still be nice if there were a way to reset default options with a command. But the functionality is what I needed. Thanks. –  David Sempsrott Sep 30 '11 at 21:56
You may want to take up your issue with Joseph Wright, the author of the siunitx package and very active member (and moderator!) of this StackExchange group. –  Mico Sep 30 '11 at 22:43

A simple way would be to use {} to make a group which restricts changes to be within that group:

\documentclass{article}
\usepackage{xcolor}
\usepackage{siunitx}

\begin{document}
{\sisetup{color = orange}
5 \si{m^3}
}

\bigskip
5 \si{m^3}
\end{document}


-
Nice example, thanks. –  David Sempsrott Sep 30 '11 at 22:00