1

I'm taking some notes for my math class and I would like to create a box like so to separate important points and examples so that it doesn't look so cluttered:

enter image description here

I'm not sure what it uses, but could someone help me out with some starter code and ideas? Thanks!

Revise
  • 365

1 Answers1

7

These boxes are easy to do with tcolorbox. For theorems and definitions, there is a nice library theorems which provides a lot of useful commands; see chapter 18 in the documentation.

To help you get started, here's an example with a good approximation of the image you provided.

\documentclass{article}
\usepackage{newtxtext, newtxmath}
\usepackage{tcolorbox}
\tcbuselibrary{theorems}
\newtcbtheorem{definition}{Definition}{
    sharp corners,
    fonttitle=\bfseries,
    coltitle=black,
    colframe=red!20!white,
    colback=red!10!white,
    boxrule=0mm,
}{}
\begin{document}
\begin{definition}{Probability space}{}
A \textbf{probability space} is a triple \((\Omega, \mathcal{F}, P)\):
\begin{itemize}
    \item \(\Omega =\) ``sample space'' = set of ``samples''
    \item \(\mathcal{F} =\) family of subsets of \(\Omega\), called ``events''
    \item \(P = \) probability measure
\end{itemize}
\end{definition}
\end{document}
Vincent
  • 20,157