TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.
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?

share|improve this question
up vote 12 down vote accepted

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. :-)

share|improve this answer
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:


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

5 \si{m^3}

enter image description here

share|improve this answer
Nice example, thanks. – David Sempsrott Sep 30 '11 at 22:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.