# Vertikal line in sub-environment

Is it possible to have an vertical line which covers the second environment to mark the indent? I have no idea how to do that and would be grateful for any hint. Thanks a lot.

\documentclass[12pt]{scrartcl}
\usepackage{enumitem}
\begin{document}
\begin{description}
\item[A] ooo
\begin{description}
\item[1] xxx
\item[2] xxx
\end{description}
\item[B] ooo
\end{description}
\end{document}


You can use tcolorboxenvironment to tcolorboxize any defined environment

\documentclass[12pt]{scrartcl}
\usepackage[most]{tcolorbox}
\usepackage{enumitem}

\newenvironment{mydesc}{%
\begin{description}}{\end{description}}

\tcolorboxenvironment{mydesc}{blanker,
borderline west={1mm}{-3mm}{black}}

\begin{document}
\begin{description}
\item[A] ooo
\begin{mydesc}
\item[1] xxx
\item[2] xxx
\end{mydesc}
\item[B] ooo
\end{description}
\end{document}


• This is really great. Thanks a lot. It works very well. – C.-P. Apr 16 '18 at 15:37

Just an idea with tikz:

\documentclass[12pt]{scrartcl}
\usepackage{enumitem}
\usepackage{tikz}
\usetikzlibrary{calc}
\def\tikzmark#1{\begin{tikzpicture}[remember picture]\coordinate(#1);\end{tikzpicture}}
\makeatletter
\def\mfontsize{\f@size}
\makeatother
\begin{document}
\begin{description}
\item[A] ooo
\begin{description}
\item[1] \tikzmark{A}xxx
\item[2]\tikzmark{B} xxx
\end{description}
\item[B] ooo
\end{description}
\begin{tikzpicture}[overlay,remember picture]
\draw[ultra thick]([xshift=-1cm, yshift=\mfontsize pt]A.north west)--([xshift=-1cm,yshift=-{0.6*\mfontsize} pt]B.south west);
\end{tikzpicture}
\end{document}


If you want to use something like this, we can "automate the procedure" by creating a new environment that will contain the needed code

• Thanks a lot also, I did not get it working with multiple descriptions. But this may be my fault. – C.-P. Apr 16 '18 at 15:39