CTAN Comprehensive TeX Archive Network

Directory macros/latex2e/contrib/statementsp

README.md

statementsp

statementsp is a package designed to easily implement theorem and proposition boxes with preview and recall functionalities.

License

This material is subject to the 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:

\usepackage{statementsp}
  1. 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):

\newstatementsp{th}{Theorem}{000000}{B3D9FF}
\newstatementsp{def}{Definition}{000000}{FFB3B3}
  1. Creating Boxes

You can use the statementsp environment for numbered boxes and statementsp* for unnumbered boxes.

\begin{statementsp}<th>[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.

  1. 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)).
  1. Preview and Recall

The \refcallsp command allows you to display a statement box anywhere in the document.

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

Download the contents of this package in one zip archive (91.4k).

...
Guest Book Sitemap Contact Contact Author