Initial Query

What latex package has the Sbox env?

LLM Generation

Query

What latex package has the Sbox env?

Output

The `Sbox` environment (with a capital 'S') is provided by the **`sbox`** package. This package defines the `Sbox` environment as an alternative to the standard LaTeX `lrbox` environment. Both are used to save material into a LaTeX box register without typesetting it immediately. Here's a basic example of how to use it:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
\documentclass{article}
\usepackage{sbox} % Load the package

\newsavebox{\mybox} % Declare a box register

\begin{document}

First, we save some content into the box:
\begin{Sbox}{\mybox} % Start the Sbox environment, saving to \mybox
  This is some text that will be saved in the box.
  It can contain multiple lines and formatting like \textbf{bold text}.
\end{Sbox} % End the Sbox environment

The content is now saved but not yet printed.

Now, we can use the saved content:
Here it is: \usebox{\mybox}

And we can use it again:
\usebox{\mybox}

\end{document}
**Key Points:** * You need `\usepackage{sbox}` in your preamble. * You need to declare a box register using `\newsavebox{\boxname}` before using it. * The syntax is `\begin{Sbox}{\boxname} ... \end{Sbox}`. * You print the content later using `\usebox{\boxname}`. This is very similar to the standard `lrbox` environment, which is part of the LaTeX kernel (no extra package needed):
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
\documentclass{article}
% No extra package needed for lrbox

\newsavebox{\myotherbox} % Declare a box register

\begin{document}

Using lrbox:
\begin{lrbox}{\myotherbox} % Start the lrbox environment
  Content saved using lrbox.
\end{lrbox} % End the lrbox environment

Now print it: \usebox{\myotherbox}

\end{document}
The `sbox` package essentially provides `Sbox` as a synonym or slight variation for `lrbox`. Often, people use `lrbox` since it's built-in.

Substring Evaluation

Testing if the previous output contains the string fancybox: False