Debian Codegraph @

texmf-dist/doc/latex/csthm/README.md

raw
1 ---
2 title: The `csthm` Package
3 linter-yaml-title-alias: The `csthm` Package
4 date created: Wednesday, September 11th 2024, 18:20:56
5 date modified: Friday, January 17th 2025, 17:29:11
6 aliases: [The `csthm` Package]
7 ---
8
9 # The `csthm` Package
10
11 ## A Comprehensive Set of Theorem Environments for Computer Science
12
13 The `csthm` package provides a comprehensive collection of theorem-like environments specifically designed for use in computer science documentation. It features a range of customizable theorem styles, distinct visual markers for different types of content, integrated support for cross-referencing, and extensive customization options. This README provides detailed examples, usage guidelines, and an overview of all available environments and features in the package.
14
15 ---
16
17 ## Package Overview
18
19 The `csthm` package offers a robust and flexible solution for typesetting theorems, definitions, proofs, and related content typically found in computer science literature. The package provides a variety of specialized environments, each with distinct visual markers and formatting styles suited to different types of content.
20
21 ### Key features include
22
23 - Distinct visual styles for different content types, including theorems, definitions, proofs, and more.
24 - Customizable theorem headers and QED symbols.
25 - Optional integration with the `cleveref` package for enhanced cross-referencing.
26 - Specialized environments tailored for theoretical computer science content.
27 - Support for both numbered and unnumbered variants of all environments.
28
29 ---
30
31 ## Installation
32
33 The `csthm` package can be installed via your TeX distribution’s package manager or downloaded directly from CTAN:
34
35 - [https://ctan.org/pkg/csthm](https://ctan.org/pkg/csthm)
36
37 ---
38
39 ## Basic Usage
40
41 To use the package, simply include it in the preamble of your document:
42
43 ```latex
44 \usepackage{csthm}
45 ```
46
47 If you require integration with the `cleveref` package for enhanced cross-referencing, load the package as follows:
48
49 ```latex
50 \usepackage[cleveref]{csthm}
51 ```
52
53 ---
54
55 ## Environments
56
57 The `csthm` package provides a wide range of theorem-like environments. Each environment is associated with a distinct visual style, marked by a specific bullet symbol. The package supports both numbered and unnumbered versions of each environment, with the unnumbered variants achieved by appending an asterisk (`*`) to the environment name (e.g., `theorem*`).
58
59 ### Complete List of Environments
60
61 | **Environment** | **Style** | **Description** |
62 |-----------------|------------|-----------------|
63 | **Mathematical Theorems** - Marked with black triangle (`$\blacktriangleright$`) |
64 | theorem | thmstyle | Main theoretical results |
65 | assumption | thmstyle | Assumptions and prerequisites |
66 | axiom | thmstyle | Fundamental statements accepted without proof |
67 | claim | thmstyle | Minor results within proofs |
68 | conjecture | thmstyle | Unproven mathematical statements |
69 | corollary | thmstyle | Results that follow from theorems |
70 | fact | thmstyle | Well-known or established results |
71 | hypothesis | thmstyle | Proposed explanations or predictions |
72 | lemma | thmstyle | Supporting theoretical results |
73 | property | thmstyle | Characteristic attributes or features |
74 | proposition | thmstyle | Minor theoretical results |
75 | **Definitions and Protocols** - Marked with black square (`$\blacksquare$`) |
76 | definition | defstyle | Formal definitions of terms |
77 | notation | defstyle | Explanation of mathematical notation |
78 | problem | defstyle | Problem statements or tasks |
79 | protocol | defstyle | Step-by-step procedures or algorithms |
80 | **Remarks and Examples** - Marked with hollow triangle (`$\vartriangleright$`) |
81 | example | remarkstyle | Illustrative examples |
82 | note | remarkstyle | Additional information or clarifications |
83 | remark | remarkstyle | Observations or comments |
84 | **Highlights** - Marked with hollow square (`$\square$`) |
85 | exercise | hltstyle | Practice problems or exercises |
86 | highlight | hltstyle | Emphasized content |
87 | important | hltstyle | Critical information |
88 | keypoint | hltstyle | Essential concepts or takeaways |
89 | **Special Environments** |
90 | proof | proofstyle | Proofs with custom QED symbol |
91 | case | (list) | Enumerated case analysis |
92
93 **Note**: All environments (except `proof` and `case`) have unnumbered versions available by adding an asterisk (`*`) to the environment name (e.g., `theorem*`).
94
95 ---
96
97 ### Mathematical Theorems
98
99 These environments represent core theoretical results and are marked with a black triangle (`$\blacktriangleright$`):
100
101 ```latex
102 \begin{theorem}
103 This is a sample theorem environment.
104 \end{theorem}
105
106 \begin{assumption}
107 This is a sample assumption environment.
108 \end{assumption}
109
110 \begin{axiom}
111 This is a sample axiom environment.
112 \end{axiom}
113
114 \begin{claim}
115 This is a sample claim environment.
116 \end{claim}
117
118 \begin{conjecture}
119 This is a sample conjecture environment.
120 \end{conjecture}
121
122 \begin{corollary}
123 This is a sample corollary environment.
124 \end{corollary}
125
126 \begin{fact}
127 This is a sample fact environment.
128 \end{fact}
129
130 \begin{hypothesis}
131 This is a sample hypothesis environment.
132 \end{hypothesis}
133
134 \begin{lemma}
135 This is a sample lemma environment.
136 \end{lemma}
137
138 \begin{property}
139 This is a sample property environment.
140 \end{property}
141
142 \begin{proposition}
143 This is a sample proposition environment.
144 \end{proposition}
145 ```
146
147 ---
148
149 ### Definitions and Protocols
150
151 These environments are used for definitions, notations, problems, and protocols, marked with a black square (`$\blacksquare$`):
152
153 ```latex
154 \begin{definition}
155 This is a sample definition environment.
156 \end{definition}
157
158 \begin{notation}
159 This is a sample notation environment.
160 \end{notation}
161
162 \begin{problem}
163 This is a sample problem environment.
164 \end{problem}
165
166 \begin{protocol}
167 This is a sample protocol environment.
168 \end{protocol}
169 ```
170
171 ---
172
173 ### Remarks and Examples
174
175 These environments provide additional explanations and clarifications, marked with a hollow triangle (`$\vartriangleright$`):
176
177 ```latex
178 \begin{example}
179 This is a sample example environment.
180 \end{example}
181
182 \begin{note}
183 This is a sample note environment.
184 \end{note}
185
186 \begin{remark}
187 This is a sample remark environment.
188 \end{remark}
189 ```
190
191 ---
192
193 ### Highlights and Important Content
194
195 These environments emphasize key concepts, tasks, or points, marked with a hollow square (`$\square$`):
196
197 ```latex
198 \begin{exercise}
199 This is a sample exercise environment.
200 \end{exercise}
201
202 \begin{highlight}
203 This is a sample highlight environment.
204 \end{highlight}
205
206 \begin{important}
207 This is a sample important environment.
208 \end{important}
209
210 \begin{keypoint}
211 This is a sample keypoint environment.
212 \end{keypoint}
213 ```
214
215 ---
216
217 ### Special Environments
218
219 The `proof` environment provides a custom QED symbol, and the `case` environment allows for enumerated cases:
220
221 ```latex
222 \begin{proof}
223 This is a sample proof environment with a custom QED symbol.
224 \end{proof}
225
226 \begin{case}
227 \item Case 1: This is the first case.
228 \item Case 2: This is the second case.
229 \item Case 3: This is the third case.
230 \end{case}
231 ```
232
233 ---
234
235 ## Customization
236
237 The `csthm` package offers extensive customization options.
238
239 ### Accent Color
240
241 To change the accent color used for theorem headers and symbols:
242
243 ```latex
244 \setaccentcolor{darkblue} % or
245 \renewcommand{\accentcolor}{darkblue}
246 ```
247
248 ### QED Symbols
249
250 Customize the QED symbol used in proof environments:
251
252 ```latex
253 \renewcommand\qedsymbol{$\scriptstyle\color{\accentcolor}\blacksquare$}
254 ```
255
256 ---
257
258 ## Implementation Notes
259
260 ### Dependencies
261
262 The following packages are required for the correct functionality of the `csthm` package:
263
264 - `amsmath` - Provides advanced mathematical typesetting features.
265 - `amssymb` - Adds additional mathematical symbols.
266 - `amsthm` - Basic theorem functionality.
267 - `enumitem` - Customizes list environments.
268 - `thmtools` - Provides advanced theorem tools.
269
270 Optional dependencies include:
271
272 - `hyperref` - Enables hyperlinked cross-references.
273 - `cleveref` - Provides enhanced cross-referencing features.
274
275 ---
276
277 ## Version History
278
279 - **v1.0 (2024/01/01)**: Initial release.
280 - **v1.1 (2024/05/15)**: Added support for `cleveref`.
281 - **v1.2 (2024/08/31)**: Released on CTAN.
282 - **v1.3 (2025/01/16)**: Current version:
283 - Added starred versions of all environments.
284 - Enhanced theorem styling.
285 - Added new environments.
286 - Improved customization options.
287
288 ---
289
290 ## License
291
292 This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3c or later. The latest version is available at [LaTeX Project Public License](http://www.latex-project.org/lppl.txt).
293
294 ---
295
296 ## Contact and Support
297
298 For bug reports, feature requests, or general feedback, please contact:
299
300 - **Email**: [[email protected]](mailto:[email protected])
301 - **GitHub**: [https://github.com/agnidatta/csthm](https://github.com/agnidatta/csthm)
302 - **CTAN**: [https://ctan.org/pkg/csthm](https://ctan.org/pkg/csthm)