# statementsp
`statementsp` is a LaTeX package designed to easily implement theorem and proposition boxes with preview and recall functionalities.
## License
This material is subject to the LaTeX Project Public License (LPPL) version 1.3c or later.
## Contact
Author: Rirai Ikeda \
Email: rikeda719016@gmail.com
## Requirements
This package requires the following packages:
`xcolor`, `graphicx`, `tikz`, `ifthen`, `etoolbox`, `amsthm`, `amssymb`, `tcolorbox`, `hyperref`, `prettyref`
## Usage
### 1. Loading the Package
Load the package in your preamble:
```latex
\usepackage{statementsp}
```
### 2. Defining Environments
Define a new statement environment using the `\newstatementsp` command. You need to specify the prefix, the display name, the text color (HTML), and the box background color (HTML):
```latex
\newstatementsp{th}{Theorem}{000000}{B3D9FF}
```
```latex
\newstatementsp{def}{Definition}{000000}{FFB3B3}
```
### 3. Creating Boxes
You can use the `statementsp` environment for numbered boxes and `statementsp*` for unnumbered boxes.
```latex
\begin{statementsp}
[main](Fermat's Last Theorem)
No three positive integers $a$, $b$, and $c$ satisfy the equation $a^n + b^n = c^n$ for any integer value of $n$ greater than 2.
\end{statementsp}
```
To omit the label or the title, leave the brackets `[]` or parentheses `()` empty. Empty brackets prevent automatic label generation, and empty parentheses hide the statement name.
### 4. Referencing
The package provides dedicated commands for referencing statements. Note that you must include the prefix in the label (e.g., `th:label`).
- `\refsp{prefix:label}`: Displays the statement type and its number (e.g., Theorem 1.1).
- `\refnamesp{prefix:label}`: Displays the statement type, number, and its specific name (e.g., Theorem 1.1:(Fermat's Last Theorem)).
### 5. Preview and Recall
The `\refcallsp` command allows you to display a statement box anywhere in the document.
```latex
\refcallsp{th:main}
```
This command automatically detects its position relative to the main statement:
- **Preview**: If placed before the main definition, it generates a box labeled "(Preview)".
- **Recall**: If placed after the main definition, it generates a box labeled "(Recall)".
In both cases, the title of the generated box functions as a hyperlink that jumps directly to the main definition in the document. |