# \framed and \itemize with custom item labels

This question is a slight extension of this previous post and in particular the answer by @knut. Unlike the situation in that post, I also have my own custom labels for each item, i.e. my code looks as follows:

\begin{framed}
\begin{itemize}
\item[(BulletLine1)]  In the \textit{first step}, circularly polarized X-rays generate photoelectrons with a spin and/or orbital momentum from a localized atomic inner shell.
\item[(BulletLine2)] In the \textit{second step}, the 3d shell serves as the detector of the spin or orbital momentum of the photoelectron. For maximum effect, the photon spin needs to be aligned with the magnetization direction.
\end{itemize}
\end{framed}


The result looks as follows:

How can I get the custom labels to also be inside the box?

With the enumitem package, you can specify various lengths associated with the itemization, including, as below, the itemindent.

\documentclass{scrartcl}
\usepackage{framed,enumitem}
\begin{document}
\begin{framed}
The \textit{two-step} model of XMCD:
\begin{itemize}[itemindent=4em]
\item[(BulletLine1)]  In the \textit{first step}, circularly polarized X-rays generate photoelectrons with a spin and/or orbital momentum from a localized atomic inner shell.
\item[(BulletLine2)] In the \textit{second step}, the 3d shell serves as the detector of the spin or orbital momentum of the photoelectron. For maximum effect, the photon spin needs to be aligned with the magnetization direction.
\end{itemize}
\end{framed}
\end{document}


Alternately, the leftmargin may be the way you prefer:

\documentclass{scrartcl}
\usepackage{framed,enumitem}
\begin{document}
\begin{framed}
The \textit{two-step} model of XMCD:
\begin{itemize}[leftmargin=6em]
\item[(BulletLine1)]  In the \textit{first step}, circularly polarized X-rays generate photoelectrons with a spin and/or orbital momentum from a localized atomic inner shell.
\item[(BulletLine2)] In the \textit{second step}, the 3d shell serves as the detector of the spin or orbital momentum of the photoelectron. For maximum effect, the photon spin needs to be aligned with the magnetization direction.
\end{itemize}
\end{framed}
\end{document}


• Perfect, thank you! 'leftmargin' is what I was looking for!
– air
Jul 7, 2016 at 17:25

Here are three other solutions, the last two yielding an automatic numbering:

\documentclass{scrartcl}

\usepackage{framed,enumitem}

\begin{document}

\begin{framed}
The \textit{two-step} model of XMCD:
\begin{itemize}[align = left]
\item[(BulletLine1)] In the \textit{first step}, circularly polarized X-rays generate photoelectrons with a spin and/or orbital momentum from a localized atomic inner shell.
\item[(BulletLine2)] In the \textit{second step}, the 3d shell serves as the detector of the spin or orbital momentum of the photoelectron. For maximum effect, the photon spin needs to be aligned with the magnetization direction.
\end{itemize}
\end{framed}

\begin{framed}
The \textit{two-step} model of XMCD:
\begin{enumerate}[label=(BulletLine\arabic*), align=left, leftmargin=*]
\item In the \textit{first step}, circularly polarized X-rays generate photoelectrons with a spin and/or orbital momentum from a localized atomic inner shell.
\item In the \textit{second step}, the 3d shell serves as the detector of the spin or orbital momentum of the photoelectron. For maximum effect, the photon spin needs to be aligned with the magnetization direction.
\end{enumerate}
\end{framed}

\begin{framed}
The \textit{two-step} model of XMCD:
\begin{enumerate}[label=(BulletLine\arabic*), wide=0pt, leftmargin=2em]
\item In the \textit{first step}, circularly polarized X-rays generate photoelectrons with a spin and/or orbital momentum from a localized atomic inner shell.
\item In the \textit{second step}, the 3d shell serves as the detector of the spin or orbital momentum of the photoelectron. For maximum effect, the photon spin needs to be aligned with the magnetization direction.
\end{enumerate}
\end{framed}

\end{document}