summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2025-02-16 21:05:37 +0000
committerKarl Berry <karl@freefriends.org>2025-02-16 21:05:37 +0000
commit0b4e618ccbef2031e4a3f6a2caa8d4ee912b32d6 (patch)
tree2c94b179ed285502b2cd6009ade72822c28244c9 /Master/texmf-dist/source
parent0f2975869f546e7372fbeea6172cbfb631b8da89 (diff)
callouts-box (16feb25)
git-svn-id: svn://tug.org/texlive/trunk@74039 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/latex/callouts-box/callouts-box.dtx249
-rw-r--r--Master/texmf-dist/source/latex/callouts-box/callouts-box.ins25
2 files changed, 274 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/callouts-box/callouts-box.dtx b/Master/texmf-dist/source/latex/callouts-box/callouts-box.dtx
new file mode 100644
index 00000000000..39228d09bfa
--- /dev/null
+++ b/Master/texmf-dist/source/latex/callouts-box/callouts-box.dtx
@@ -0,0 +1,249 @@
+% \iffalse
+% callouts-box.dtx
+% --------------------------------------
+% Documented LaTeX source for the callouts-box package
+% --------------------------------------
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{makeidx}
+\makeindex
+\begin{document}
+
+\title{The \texttt{callouts-box} Package\\
+\smallskip
+\small Version 1.0\\
+\small Date: 2025/02/14}
+\author{julinux60}
+\date{14/02/2025}
+
+\maketitle
+\tableofcontents
+
+\section{Introduction}
+The \texttt{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 \texttt{tcolorbox} for highly customizable, breakable callout boxes and \texttt{xcolor} for predefined color schemes.
+
+\section{Installation}
+To install the \texttt{callouts-box} package, place the following files in your \LaTeX{} directory:
+\begin{itemize}
+ \item \texttt{callouts-box.sty} (Core functionality and environment definitions)
+ \item \texttt{callouts-box-colors.sty} (Predefined color definitions for callouts)
+\end{itemize}
+Then, include the package in your document preamble:
+\begin{verbatim}
+\usepackage{callouts-box}
+\end{verbatim}
+
+\section{Usage}
+The package provides four predefined callout box environments:
+\DescribeEnv{warningbox}
+\DescribeEnv{errorbox}
+\DescribeEnv{notebox}
+\DescribeEnv{successbox}
+Each environment takes an optional argument for the box title. If no title is provided, a default title is used.
+
+\subsection{Basic Examples}
+Here are some examples of how to use the predefined callout boxes:
+
+\begin{verbatim}
+\begin{warningbox}[Custom Warning Title]
+ This is a warning message.
+\end{warningbox}
+
+\begin{errorbox}
+ This is an error message.
+\end{errorbox}
+
+\begin{notebox}[Important Note]
+ This is a note.
+\end{notebox}
+
+\begin{successbox}
+ This is a success message.
+\end{successbox}
+\end{verbatim}
+
+\subsection{Advanced Examples}
+You can nest callout boxes inside each other:
+\begin{verbatim}
+\begin{warningbox}[Outer Warning]
+ This is an outer warning message.
+
+ \begin{notebox}[Nested Note]
+ This is a nested note inside a warning.
+ \end{notebox}
+\end{warningbox}
+\end{verbatim}
+You can add equations, lists, or images inside callout boxes:
+\begin{verbatim}
+\begin{successbox}[Success with Equation]
+ The famous Pythagorean theorem:
+ \[
+ a^2 + b^2 = c^2
+ \]
+\end{successbox}
+\end{verbatim}
+
+\begin{verbatim}
+\begin{notebox}[Note with List]
+ Key points to remember:
+ \begin{itemize}
+ \item Callout boxes can contain lists.
+ \item They can also include images.
+ \end{itemize}
+\end{notebox}
+\end{verbatim}
+
+\subsection{Customization}
+Users can modify the visual appearance of callout boxes by editing \texttt{callouts-box-colors.sty} or overriding the \texttt{tcbset} settings in their document.
+
+\DescribeMacro{\tcbset}
+To adjust layout settings, use the \texttt{tcbset} command:
+\begin{verbatim}
+\tcbset{
+ boxsettings/.style={
+ boxrule=2pt, rounded corners=10pt, arc=10pt,
+ left=10pt, right=10pt, top=10pt, bottom=10pt,
+ boxsep=10pt, before skip=15pt, after skip=15pt,
+ breakable, before upper={\ignorespaces},
+ }
+}
+\end{verbatim}
+
+\section{Defining Custom Boxes}
+You can define your own callout box styles using \texttt{NewTColorBox}. Example:
+\begin{verbatim}
+\definecolor{custom-border}{HTML}{FFA500}
+\definecolor{custom-content}{HTML}{FFF3E0}
+\definecolor{custom-text}{HTML}{FF6D00}
+
+\NewTColorBox{custombox}{ O{Custom Box} o }{
+ colframe=custom-border,
+ colback=custom-content,
+ coltitle=custom-text,
+ fonttitle=\bfseries,
+ coltext=custom-text,
+ title={#1},
+}
+\end{verbatim}
+
+To use the custom box:
+\begin{verbatim}
+\begin{custombox}[My Custom Box]
+ This is a custom box.
+\end{custombox}
+\end{verbatim}
+
+\section{Complete Example}
+Here is a complete document using the \texttt{callouts-box} package:
+
+\begin{verbatim}
+\documentclass{article}
+\usepackage{callouts-box}
+
+\begin{document}
+
+\begin{warningbox}[Warning]
+ This is a warning message.
+\end{warningbox}
+
+\begin{successbox}[Success]
+ This is a success message.
+\end{successbox}
+
+\begin{notebox}[Math Example]
+ \[
+ E = mc^2
+ \]
+\end{notebox}
+
+\end{document}
+\end{verbatim}
+
+\section{License}
+This package is distributed under the \LaTeX{} Project Public License (LPPL), version 1.3 or later. For more details, see the \texttt{LICENSE} file.
+
+\PrintIndex
+
+\end{document}
+%</driver>
+% \fi
+
+% --------------------------------------
+% Package Code
+% --------------------------------------
+% \iffalse
+%<*package>
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{callouts-box}[2025/02/14 v1.0 Styled callout boxes]
+
+\RequirePackage{xcolor}
+\RequirePackage{tcolorbox}
+\tcbuselibrary{breakable}
+\RequirePackage{callouts-box-colors}
+
+\tcbset{
+ boxsettings/.style={
+ boxrule=1pt, rounded corners=all, arc=5pt,
+ left=5pt, right=5pt, top=5pt, bottom=5pt,
+ boxsep=5pt, before skip=10pt, after skip=10pt,
+ breakable, before upper={\ignorespaces},
+ }
+}
+
+% Define callout box environments
+\NewTColorBox{warningbox}{ O{Warning} }{
+ colframe=warning-border, colback=warning-content,
+ coltitle=warning-text, fonttitle=\bfseries,
+ coltext=warning-text, title={#1}, boxsettings,
+}
+
+\NewTColorBox{errorbox}{ O{Error} }{
+ colframe=error-border, colback=error-content,
+ coltitle=error-text, fonttitle=\bfseries,
+ coltext=error-text, title={#1}, boxsettings,
+}
+
+\NewTColorBox{notebox}{ O{Note} }{
+ colframe=note-border, colback=note-content,
+ coltitle=note-text, fonttitle=\bfseries,
+ coltext=note-text, title={#1}, boxsettings,
+}
+
+\NewTColorBox{successbox}{ O{Success} }{
+ colframe=success-border, colback=success-content,
+ coltitle=success-text, fonttitle=\bfseries,
+ coltext=success-text, title={#1}, boxsettings,
+}
+%</package>
+% \fi
+
+% --------------------------------------
+% Colors Package Code
+% --------------------------------------
+% \iffalse
+%<*colors>
+\ProvidesPackage{callouts-box-colors}[2025/02/14 v1.0 Predefined colors for callouts-box]
+\RequirePackage{xcolor}
+
+% Define colors for callout boxes
+\definecolor{warning-title}{HTML}{FAE2A0}
+\definecolor{warning-content}{HTML}{FFFCF4}
+\definecolor{warning-text}{HTML}{5C4813}
+\definecolor{warning-border}{HTML}{FAE2A0}
+
+\definecolor{error-title}{HTML}{FAA0A0}
+\definecolor{error-content}{HTML}{FFF4F4}
+\definecolor{error-text}{HTML}{5C1313}
+\definecolor{error-border}{HTML}{FAA0A0}
+
+\definecolor{note-title}{HTML}{A3A0FA}
+\definecolor{note-content}{HTML}{F4F6FF}
+\definecolor{note-text}{HTML}{1E135C}
+\definecolor{note-border}{HTML}{A3A0FA}
+
+\definecolor{success-title}{HTML}{91DF96}
+\definecolor{success-content}{HTML}{F7FFF4}
+\definecolor{success-text}{HTML}{104F20}
+\definecolor{success-border}{HTML}{91DF96}
+%</colors>
+% \fi \ No newline at end of file
diff --git a/Master/texmf-dist/source/latex/callouts-box/callouts-box.ins b/Master/texmf-dist/source/latex/callouts-box/callouts-box.ins
new file mode 100644
index 00000000000..82b7235afab
--- /dev/null
+++ b/Master/texmf-dist/source/latex/callouts-box/callouts-box.ins
@@ -0,0 +1,25 @@
+% callouts-box.ins
+% --------------------------------------
+% Installation file for the callouts-box package
+% --------------------------------------
+\input docstrip.tex
+\keepsilent
+\usedir{tex/latex/callouts-box}
+\preamble
+This is a generated file.
+
+Copyright (C) 2025 by julinux60
+
+This file may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3 of this license or (at your option) any later
+version. The latest version of this license is in:
+
+ http://www.latex-project.org/lppl.txt
+
+and version 1.3 or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
+\endpreamble
+\generate{\file{callouts-box.sty}{\from{callouts-box.dtx}{package}}}
+\generate{\file{callouts-box-colors.sty}{\from{callouts-box.dtx}{colors}}}
+\endbatchfile \ No newline at end of file