Skip to content

Instantly share code, notes, and snippets.

@TobiasPalludan
Created February 24, 2020 14:55
Show Gist options
  • Save TobiasPalludan/fd972aca6c4870737a92b27c5c6babb1 to your computer and use it in GitHub Desktop.
Save TobiasPalludan/fd972aca6c4870737a92b27c5c6babb1 to your computer and use it in GitHub Desktop.
Create do's and don'ts in LaTeX
\begin{minipage}{\textwidth}
\begin{tip}
\textbf{Do:} Use Scrum of Scrums.
\end{tip}
Text that should be standing underneath the do.
\end{minipage}
\begin{minipage}{\textwidth}
\begin{avoid}
\textbf{Avoid:} Having a single Scrum master groups \cite[Section 6.4]{2018Rapport}.
\end{avoid}
Text that should be standing underneath the don't.
\end{minipage}
%--------------- FOR TIP AND AVOID BOXES --------------------
\usepackage[framemethod=default]{mdframed}
%--------------- FOR TIP BOX --------------------
\newenvironment{tip}{\begin{erBox}}{\hfill{\tiny}\end{erBox}}
\definecolor{wrongexample}{RGB}{238,41,18}
\newmdenv[skipabove=7pt,
skipbelow=7pt,
rightline=false,
leftline=true,
topline=false,
bottomline=false,
backgroundcolor=rightexample!10,
linecolor=rightexample,
innerleftmargin=5pt,
innerrightmargin=5pt,
innertopmargin=5pt,
innerbottommargin=5pt,
leftmargin=0cm,
rightmargin=0cm,
linewidth=4pt]{erBox}
%--------------- END TIP BOX --------------------
%--------------- FOR AVOID BOX --------------------
\newenvironment{avoid}{\begin{ewBox}}{\hfill{\tiny}\end{ewBox}}
\definecolor{rightexample}{RGB}{31,181,0}
\newmdenv[skipabove=7pt,
skipbelow=7pt,
rightline=false,
leftline=true,
topline=false,
bottomline=false,
backgroundcolor=wrongexample!10,
linecolor=wrongexample,
innerleftmargin=5pt,
innerrightmargin=5pt,
innertopmargin=5pt,
innerbottommargin=5pt,
leftmargin=0cm,
rightmargin=0cm,
linewidth=4pt]{ewBox}
%--------------- END AVOID BOX --------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment