# itemize and rename items within tcolorbox

In reference to a similar post, I am trying to replace the numbering of \item with a bracketed word. However, if the renamed bullet is long enough, it ends up out of the box:

\documentclass{article}
\usepackage{tcolorbox}

\begin{document}

\begin{tcolorbox}
\begin{itemize}
\item[{[blablababakbakbakb]}] \lipsum[1]
\item[{[blubllanlanlanlan]}] \lipsum[2]
\end{itemize}
\end{tcolorbox}

\end{document}


Any idea of how to get around this?

• You are using the wrong list. Use description instead of itemize. Jan 31, 2017 at 8:09
• This is no tcolorbox problem. Without the tcolorbox around the itemize, the leakage of the labels into margin would even be larger
– user31729
Jan 31, 2017 at 9:25
• thanks, but \description compiles the list similarly to what is proposed in the answer below. What I wanted, if possible, is to have something like above, but inside the box. Jan 31, 2017 at 14:21
• Answer updated. Jan 31, 2017 at 14:39

You can customize list dimensions with enumitem package, in your case just increase itemindent and add align=left to align label with left side

\documentclass{article}
\usepackage{lipsum}
\usepackage{enumitem}
\usepackage{tcolorbox}

\begin{document}

\begin{tcolorbox}
\begin{itemize}[itemindent=2.5cm,labelsep=4mm,labelwidth=3cm,align=left]
\item[{[blablababakbakbakb]}] \lipsum[1]
\item[{[blubllanlanlanlan]}] \lipsum[2]
\end{itemize}
\end{tcolorbox}

\end{document}


Update

If you need all text to be indented you can just increase leftmargin

\documentclass{article}
\usepackage{lipsum}
\usepackage{enumitem}
\usepackage{tcolorbox}

\begin{document}

\begin{tcolorbox}
\begin{itemize}[leftmargin=3.2cm]
\item[{[blablababakbakbakb]}] \lipsum[1]
\item[{[blubllanlanlanlan]}] \lipsum[2]
\end{itemize}
\end{tcolorbox}

\end{document}

• thank you for your help! this sounds good, although I was thinking about something slightly different. What I wanted, if possible, is to have the entire text of a bullet completely indented and the bullet inside the box. Does that make sense? Jan 31, 2017 at 14:22