The output as shown in the picture is quite easy to do. But we will get away from the package solution in favor of a short exercise about custom lists. I think this will help in the future.
I remembered that I once created a new »
xlist« environment (of course you are free to name it like you want) for cases where
enumitem is not so helpful. The code below introduces this environment with slight modifications.
Code: Select all
\documentclass[11pt,a4paper,english]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{geometry}
\usepackage{mathtools}
\newenvironment{xlist}{%
\begin{list}{}{%
\setlength{\labelwidth}{5em}
\setlength{\labelsep}{1em}
\setlength{\leftmargin}{\labelwidth}
\addtolength{\leftmargin}{\labelsep}
\setlength{\rightmargin}{0pt}
\setlength{\parsep}{0.5ex plus 0.2ex minus 0.1ex}
\setlength{\itemsep}{0.3ex plus 0.2ex}
\renewcommand{\makelabel}[1]{\textsf{##1}\hfil}
}
}
{\end{list}}
\begin{document}
\begin{xlist}
\item[Example 1] This is the first line of text here in the document.
\item[Solution] This is the next line of text here in the document which extends to the right margin when wrapped to the next line.
\medskip
We have the following
\begin{alignat*}{2}
2x &= 4x^{2}+7x &\makebox[10em]{and} g(x) &= 42 \\
2x &= 4x^{2}+7x & g'(x) &= 12 \\
2x &= \tan(x)x^{2}+7x & g''(x) &= 7x +1
\end{alignat*}
\end{xlist}
\end{document}
I suggest to play around a little bit with the list parameters just to get familiar with them. If you have access to book about LaTeX basics, you should find detailed explanation there.