Debian Codegraph @

texmf-dist/doc/latex/callouts-box/README.md

raw
1 # The `callouts-box` Package
2
3 ## Version 1.1
4 **Date:** 2025/03/14
5 **Author:** Julien Dujardin
6
7 ## Table of Contents
8 1. [Introduction](#introduction)
9 2. [Installation](#installation)
10 3. [Usage](#usage)
11 - [Basic Examples](#basic-examples)
12 - [Advanced Examples](#advanced-examples)
13 - [Customization](#customization)
14 4. [Defining Custom Boxes](#defining-custom-boxes)
15 5. [Complete Example](#complete-example)
16 6. [License](#license)
17
18 ---
19
20 ## Introduction
21 The `callouts-box` package provides a collection of visually appealing, structured callout boxes for LaTeX documents. These boxes are useful for highlighting important information such as warnings, errors, notes, and success messages. The package is built on top of `tcolorbox` for highly customizable, breakable callout boxes and `xcolor` for predefined color schemes.
22
23 ## Installation
24 To install the `callouts-box` package, place the following files in your LaTeX directory:
25
26 - `callouts-box.sty` (Core functionality and environment definitions)
27 - `callouts-box-colors.sty` (Predefined color definitions for callouts)
28
29 Then, include the package in your document preamble:
30
31 ```latex
32 \usepackage{callouts-box}
33 ```
34
35 ## Usage
36 The package provides four predefined callout box environments:
37
38 - `warningbox`
39 - `errorbox`
40 - `notebox`
41 - `successbox`
42
43 Each environment takes an optional argument for the box title. If no title is provided, a default title is used.
44
45 ### Basic Examples
46 Here are some examples of how to use the predefined callout boxes:
47
48 ```latex
49 \begin{warningbox}[Custom Warning Title]
50 This is a warning message.
51 \end{warningbox}
52
53 \begin{errorbox}
54 This is an error message.
55 \end{errorbox}
56
57 \begin{notebox}[Important Note]
58 This is a note.
59 \end{notebox}
60
61 \begin{successbox}
62 This is a success message.
63 \end{successbox}
64 ```
65
66 ### Advanced Examples
67 You can nest callout boxes inside each other:
68
69 ```latex
70 \begin{warningbox}[Outer Warning]
71 This is an outer warning message.
72
73 \begin{notebox}[Nested Note]
74 This is a nested note inside a warning.
75 \end{notebox}
76 \end{warningbox}
77 ```
78
79 You can add equations, lists, or images inside callout boxes:
80
81 ```latex
82 \begin{successbox}[Success with Equation]
83 The famous Pythagorean theorem:
84 \[
85 a^2 + b^2 = c^2
86 \]
87 \end{successbox}
88 ```
89
90 ```latex
91 \begin{notebox}[Note with List]
92 Key points to remember:
93 \begin{itemize}
94 \item Callout boxes can contain lists.
95 \item They can also include images.
96 \end{itemize}
97 \end{notebox}
98 ```
99
100 ### Customization
101 Users can modify the visual appearance of callout boxes by editing `callouts-box-colors.sty` or overriding the `tcbset` settings in their document.
102 More documentation can be found at : https://ctan.org/pkg/tcolorbox.
103 To adjust layout settings, use the `tcbset` command:
104
105 ```latex
106 {
107 \tcbset{
108 boxsettings/.style={
109 boxrule=2pt, arc=20pt,
110 left=10pt, right=10pt, top=10pt, bottom=10pt,
111 boxsep=10pt, before skip=15pt, after skip=15pt,
112 breakable, before upper={\ignorespaces},
113 boxrule=2pt, arc=8pt,
114 colframe=black, colback=yellow!10,
115 }
116 }
117
118 \begin{notebox}[Style Note]
119 Style Note
120 \end{notebox}
121 }
122 ```
123
124 ## License
125 This package is distributed under the LaTeX Project Public License (LPPL), version 1.3 or later. For more details, see the `LICENSE` file.