0

This problem is related to this one

Since long enumerate list is not acceptable in table, we have to live with list. Ulrike Fischer provide a frame work to attack this problem with package tcolorbox. But I encountered new problems. See the following example

\begin{document}
    \begin{tcolorbox}[breakable,sharp corners,
        colback=white,
%       overlay={\draw[dashed] ([xshift=1.75cm]interior.north west)--([xshift=1.75cm]interior.south west);}
        ]
        \begin{description}[leftmargin=2cm,style=multiline]
            \item[long description long description] item 
            \tcbline
            \item[item 2] item
        \end{description}        
    \end{tcolorbox}
\end{document}

This outputs as follows

enter image description here

Several problems with the output

  1. Since we have set the wrapping of description list label using leftmargin=2cm,style=multiline, if the label is long, then it will run into the second label, mess up the thing. But this wrapping is need as a format request.
  2. The \tcbline is not at the right position. It seems that \tcbline only keep it eye on item content not on label. In this case, it should draw the line at a lower place, right after the first label.
  3. I turn the overlay as a comment, because when I turn on this, and there is an error says "Undefined control sequence. \end{tcolorbox}". But I really need the vertical line. It seems it is related to breakable option, but I can't delete the breakable option, because this is gonna be a long list across the page.
user15964
  • 865

1 Answers1

1

Here is a partial answer which solves the overlay problem. Mainly, I added enhanced standard to the option list.

\documentclass[a4paper]{article}
\usepackage{enumitem,lipsum}
\usepackage[many]{tcolorbox}

\begin{document}
    \begin{tcolorbox}[breakable,sharp corners,
        enhanced standard,
        colback=white,
        overlay={\draw[dashed] ([xshift=1.75cm]interior.north west)--([xshift=1.75cm]interior.south west);}
        ]
        \begin{description}[leftmargin=2cm,style=multiline]
            \item[long description long description] item
            \tcbline
            \item[item 2] item
        \end{description}
    \end{tcolorbox}
\end{document}