# Customise bullet points inside shadowbox

I'm writing a report and using shadowbox for some important points. I have used the code below and it is working fine. However, when I tried to use the bullet points an extra space is added to the start of the shadowbox. I not sure what is the problem?. I found another way to do the shadowbox by using xcolorbox, but I couldn't figure out how to change the parameters to get same as the below shadowbox.

Here is my code:

\documentclass{article}
\usepackage{varwidth}
\usepackage{fancybox}

\setbox\@fancybox\hbox{\fbox{#1}}%
\leavevmode\vbox{%
\offinterlineskip
\vskip\dimexpr-\dimen@+0.5\fboxrule\relax

\begin{document}
\begin{varwidth}{\textwidth}\textbf{\begin{center} \textit{\begin{itemize}
\item First item of the list  .
\item Second item of the list.\\
\end{itemize}}
\bigskip
\end{center}
}
\bigskip
\end{varwidth}
}
\bigskip
\end{document}


Any suggestion to solve the space with current code or new suggestion ?

• Remove the \begin{center}, and \end{center}, and add a % following \shadowbox { as in  \shadowbox{%. – Peter Grill Jun 16 '14 at 1:16
• Thanks a lot, it works. What's the point of the % ? – EngS Jun 16 '14 at 2:28

Here is how I would do it:

## Notes:

• Typically you should use \centering instead of the center environment (see References below). But, in this case, there is no point in centering as you care using varwidth.
• Since you want the entire environment in italics and bold, I would use the switches \bfseries and \itshape for the font switching instead of the macros.
• Be careful of spurious spaces. For instance, see what happens when you use \shadowbox{% instead of \shadowbox{. Extra space that was not intended gets inserted. Now, in this particular case you may not care, but it can lead to disastrous results (see Reference 4).

## Code:

\documentclass{article}
\usepackage{varwidth}
\usepackage{fancybox}

\begin{document}
\begin{varwidth}{\textwidth}\bfseries\itshape%
\begin{itemize}
\item First item of the list.
\item Second item of the list.
\end{itemize}
\end{varwidth}%
}%
\bigskip\par
\begin{varwidth}{\textwidth}\bfseries\itshape%
\begin{itemize}
\item[]
\item First item of the list.
\item Second item of the list.
\item[]
\end{itemize}
\end{varwidth}%
}%
\end{document}