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}
\newcommand\Cshadowbox{\VerbBox\@Cshadowbox}
\def\@Cshadowbox#1{%
\setbox\@fancybox\hbox{\fbox{#1}}%
\leavevmode\vbox{%
\offinterlineskip
\dimen@=\shadowsize
\advance\dimen@ .5\fboxrule
\hbox{\copy\@fancybox\kern.5\fboxrule\lower\shadowsize\hbox{%
\color{ShadowColor}\vrule \@height\ht\@fancybox \@depth\dp\@fancybox \@width\dimen@}}%
\vskip\dimexpr-\dimen@+0.5\fboxrule\relax
\moveright\shadowsize\vbox{%
\color{ShadowColor}\hrule \@width\wd\@fancybox \@height\dimen@}}}
\begin{document}
\shadowbox{
\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 ?
\begin{center}
, and\end{center}
, and add a%
following\shadowbox {
as in ` \shadowbox{%`.%
?