I want to define a new "custom-description
" environment, say my description
that taken in one length argument and produces the result that is achieved by the following code:
\documentclass{article}
\usepackage{enumitem}
\usepackage{calc}
\begin{document}
Here's some text before the list.
\begin{description}[align=right, itemindent=0cm, leftmargin=\labelsep+3cm, font=\ttfamily]
\item [The first item] Math is so good!
\item [Here's the second one!] Let's do some math!
\end{description}
And here's something for after the list.
\end{document}
Here, in leftmargin=3cm+\labelsep
, 3cm
is where I want to pass my "length" parameter.
The output of the above code looks like this:
Another thing: It'd be super convenient if I can also pass another parameter to control the value font
among \ttfamily
, bfseries
, etc.
Best Answer
Just
?
Full example