Created
July 2, 2023 19:02
-
-
Save neoblizz/8ef5dc71293ee2571a14c0e10f14314f to your computer and use it in GitHub Desktop.
Colored Alert Boxes in LaTeX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Pick a nice color | |
\usepackage{xcolor} | |
\definecolor{pastelpurple}{RGB}{221,199,255} | |
% For Alert Boxes | |
% \usepackage{awesomebox} | |
\usepackage[most]{tcolorbox} | |
% textmarker style from colorbox doc | |
\tcbset{textmarker/.style={% | |
enhanced, | |
parbox=false,boxrule=0mm,boxsep=0mm,arc=0mm, | |
outer arc=0mm,left=4mm,right=3mm,top=7pt,bottom=7pt, | |
toptitle=1mm,bottomtitle=1mm,oversize}} | |
% define new colorboxes | |
\newtcolorbox{definition_box}{textmarker, | |
borderline west={6pt}{0pt}{pastelpurple}, | |
colback=pastelpurple!10!white,text width=\columnwidth} | |
% Wrap it around a new command | |
\newcommand{\definition}[1]{ | |
\begin{definition_box} \textbf{Definition\quad}\newline | |
#1 | |
\end{definition_box} | |
} | |
% Example usage: | |
\definition{Assign a fixed, constant number of work tiles to each thread. Resultant work items from each work tile are processed sequentially within the thread.} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment