| 1 |
% This work may be distributed and/or modified under the |
| 2 |
% conditions of the LaTeX Project Public License, either version 1.3c |
| 3 |
% of this license or (at your option) any later version. |
| 4 |
|
| 5 |
\documentclass[a4paper,11pt]{article} |
| 6 |
\usepackage{statementsp} |
| 7 |
\usepackage[margin=1in]{geometry} |
| 8 |
|
| 9 |
\newstatementsp{th}{Theorem}{000000}{B3D9FF} |
| 10 |
\newstatementsp{def}{Definition}{000000}{FFB3B3} |
| 11 |
\newstatementsp{lem}{Lemma}{000000}{D9EDD9} |
| 12 |
|
| 13 |
\title{The \textsf{statementsp} Package Manual} |
| 14 |
\author{Rirai Ikeda} |
| 15 |
\date{\today \\ Version 1.0} |
| 16 |
|
| 17 |
\begin{document} |
| 18 |
|
| 19 |
\maketitle |
| 20 |
|
| 21 |
\begin{abstract} |
| 22 |
The \textsf{statementsp} package provides a convenient way to create highly customizable theorem and proposition boxes using \textsf{tcolorbox}. It features a unique ``Preview'' and ``Recall'' mechanism, allowing you to display a statement box before or after its actual definition in the document. |
| 23 |
\end{abstract} |
| 24 |
|
| 25 |
\tableofcontents |
| 26 |
\vspace{1cm} |
| 27 |
|
| 28 |
\section{Counters} |
| 29 |
The counters for the statement environments provided by this package are strictly sequential within a section. This means that theorems, definitions, lemmas, and other environments share the same counter (e.g., Definition 1.1, Theorem 1.2, Lemma 1.3). This prevents numbering confusion across different types of mathematical statements. |
| 30 |
|
| 31 |
\section{Using the Environments} |
| 32 |
The basic syntax for using the standard numbered statement environment is: |
| 33 |
\begin{verbatim} |
| 34 |
\begin{statementsp}<prefix>[label](Statement Name) |
| 35 |
Body of the statement... |
| 36 |
\end{statementsp} |
| 37 |
\end{verbatim} |
| 38 |
|
| 39 |
\subsection{Unnumbered Environments} |
| 40 |
If you do not want to assign a number to a statement, you can use the starred version of the environment: \verb|statementsp*|. The syntax remains exactly the same, but the counter will not be incremented and no number will be displayed in the box title. |
| 41 |
|
| 42 |
\begin{verbatim} |
| 43 |
\begin{statementsp*}<prefix>[label](Statement Name) |
| 44 |
Body of the unnumbered statement... |
| 45 |
\end{statementsp*} |
| 46 |
\end{verbatim} |
| 47 |
|
| 48 |
\subsection{Omitting Labels and Titles} |
| 49 |
You can choose not to provide a reference label or a specific statement name by leaving the respective brackets or parentheses empty. |
| 50 |
\begin{itemize} |
| 51 |
\item \textbf{Empty Label \texttt{[]}:} If the square brackets are empty, the package will not automatically generate a referencing label for this statement. |
| 52 |
\item \textbf{Empty Title \texttt{()}:} If the parentheses are empty, the specific statement name is hidden, leaving only the prefix name (and number, if applicable) in the title. |
| 53 |
\end{itemize} |
| 54 |
|
| 55 |
\section{Preview and Recall Features} |
| 56 |
One of the key features of \textsf{statementsp} is the ability to show a box before it is defined (Preview) or show it again later (Recall). Use the \verb|\refcallsp{prefix:label}| command. |
| 57 |
|
| 58 |
\subsection{The \texttt{\textbackslash refcallsp} Command} |
| 59 |
The \verb|\refcallsp{prefix:label}| command allows you to display a statement box anywhere in your document. The package automatically determines whether the command appears before or after the main definition: |
| 60 |
\begin{itemize} |
| 61 |
\item \textbf{Preview:} If you place \verb|\refcallsp| \textit{before} the main definition, it automatically generates a ``Preview'' box. |
| 62 |
\item \textbf{Recall:} If you place it \textit{after} the main definition, it automatically generates a ``Recall'' box. |
| 63 |
\end{itemize} |
| 64 |
In both cases, the title of the generated box contains a hyperlink that jumps directly to the main definition in the document. |
| 65 |
|
| 66 |
\subsection{Preview Example} |
| 67 |
Here is a preview of a theorem that is defined later in Section \ref{sec:main}. Note that clicking the title jumps to the actual definition. |
| 68 |
|
| 69 |
\refcallsp{th:fermat} |
| 70 |
|
| 71 |
\section{Main Definitions} \label{sec:main} |
| 72 |
Here is a definition box. |
| 73 |
|
| 74 |
\begin{statementsp}<def>[limit](Limit of a Sequence) |
| 75 |
A sequence $(x_n)$ converges to a real number $L$ if, for every $\epsilon > 0$, there exists a natural number $N$ such that for all $n \ge N$, $|x_n - L| < \epsilon$. |
| 76 |
\end{statementsp} |
| 77 |
|
| 78 |
Here is the main theorem box that was previewed earlier. |
| 79 |
|
| 80 |
\begin{statementsp}<th>[fermat](Fermat's Last Theorem) |
| 81 |
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. |
| 82 |
\end{statementsp} |
| 83 |
|
| 84 |
Here is an example of an unnumbered environment using \verb|statementsp*|. Notice that it does not have a sequential number like the theorem and definition above. |
| 85 |
|
| 86 |
\begin{statementsp*}<lem>[zorn](Zorn's Lemma) |
| 87 |
Suppose a non-empty partially ordered set $P$ has the property that every chain in $P$ has an upper bound in $P$. Then the set $P$ contains at least one maximal element. |
| 88 |
\end{statementsp*} |
| 89 |
|
| 90 |
Here is an example demonstrating empty labels and titles. This definition is numbered, but it cannot be referenced, and it does not have a specific name attached to it. |
| 91 |
|
| 92 |
\begin{statementsp}<def>[]() |
| 93 |
A real number is called rational if it can be expressed as the quotient of two integers. |
| 94 |
\end{statementsp} |
| 95 |
|
| 96 |
And here is an unnumbered lemma with no label and no title. |
| 97 |
|
| 98 |
\begin{statementsp*}<lem>[]() |
| 99 |
This is a simple lemma that only displays its prefix. |
| 100 |
\end{statementsp*} |
| 101 |
|
| 102 |
\section{Referencing} |
| 103 |
\subsection{Standard Referencing: \texttt{\textbackslash refsp} and \texttt{\textbackslash refnamesp}} |
| 104 |
When referencing a statement, you must include the prefix defined in the \verb|\newstatementsp| command. For example, to reference the theorem defined above, you must use the prefix \verb|th| and the label \verb|fermat| like this: \verb|\refsp{th:fermat}|. Like \verb|\refcallsp|, these referencing commands can be used anywhere, before or after the main definition. |
| 105 |
|
| 106 |
If you provided a specific name for the statement (e.g., ``Fermat's Last Theorem''), you can use the \verb|\refnamesp| command to reference both the number and the name together. |
| 107 |
|
| 108 |
\subsection{Reference Examples} |
| 109 |
\begin{itemize} |
| 110 |
\item Using \verb|\refsp|: The famous theorem is \refsp{th:fermat}. |
| 111 |
\item Using \verb|\refnamesp|: The full reference is \refnamesp{th:fermat}. |
| 112 |
\end{itemize} |
| 113 |
|
| 114 |
Now we can also recall the definition defined earlier. This will automatically become a ``Recall'' box: |
| 115 |
|
| 116 |
\refcallsp{def:limit} |
| 117 |
|
| 118 |
\end{document} |