I can't seem to get \fbox and \itemize to work together
You can enclose your text with \parbox
first then \fbox
, such that:
\fbox{\parbox{\textwidth}{The \textit{two-step} model of XMCD:
\begin{itemize}
\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{itemize}}}
produces:
In addition, don't enclose text of item with bracket []
.
Francis already gave an answer with \parbox. Werner gave a comment for boundaries.
I would recommend to use the framed-environment:
\documentclass{scrartcl}
\usepackage{framed}
\begin{document}
\section{With parbox}
\fbox{\parbox{\textwidth}{The \textit{two-step} model of XMCD:
\begin{itemize}
\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{itemize}}}
\section{framed}
\begin{framed}
The \textit{two-step} model of XMCD:
\begin{itemize}
\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{itemize}
\end{framed}
\end{document}
With the framed-environment you get a nicer look:
Beside the better result, also the TeX-source looks more Markup-like.
For their flexibility in the format, I suggest take a look to the packages tcolorbox
, mdframed
, or even bclogo
, to make from simple frames with sharp corners to really fancy boxes. Run texdoc tcolorbox
, texdoc mdframed
and texdoc bclogo
to see a lot of options. Some examples:
\documentclass{scrartcl}
\usepackage{microtype}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{tcolorbox}
\usepackage[tikz]{bclogo}
\usepackage{lipsum}
\begin{document}
\section{With tcolorbox}
\begin{tcolorbox}[
colframe=blue!25,
colback=blue!10,
coltitle=blue!20!black,
fonttitle=\bfseries,
adjusted title=The {\em two-step} model of XMCD:]
\begin{itemize}
\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{itemize}
\end{tcolorbox}
\section{With mdframed}
\begin{mdframed}[
linecolor=black!40,
outerlinewidth=1pt,
roundcorner=.5em,
innertopmargin=1ex,
innerbottommargin=.5\baselineskip,
innerrightmargin=1em,
innerleftmargin=1em,
backgroundcolor=blue!10,
%userdefinedwidth=1\textwidth,
shadow=true,
shadowsize=6,
shadowcolor=black!20,
frametitle={The \textit{two-step} model of XMCD:},
frametitlebackgroundcolor=cyan!40,
frametitlerulewidth=10pt
]
\begin{itemize}
\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{itemize}
\end{mdframed}
\section{With bclogo}
\renewcommand\logowidth{16pt}
\begin{bclogo}[
couleur = blue!10,
marge=20,
cadreTitre = true,
arrondi = 0.3,
epBarre=3.5,
logo = \bcnucleaire,
couleurBarre = red!80!blue!60,
ombre=true,
couleurOmbre = blue!20!black!20,
]
{The \textit{two-step} model of XMCD:}
\bigskip
\begin{itemize}
\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{itemize}
\end{bclogo}
\end{document}