I have to write a newenvironment, which plots a grey box around the text.
I can't decide which package I should be use. I am writing a dissertation and I want that some text sections have a grey box around the text.
Which package should I use for my newenvironment{greyBox}?
So you see down newenvironment it produces grey box around my text, but I want use this one
\vspace{5mm}
\begingroup
\leftskip4em
\rightskip\leftskip\textit{``text here.''}
\vspace{5mm}
\endgroup
in my newenvironment, but i can't integrate into it. The text in newenvironment should to intend right and left.
\documentclass{book}
\usepackage[ngerman]{babel}
\usepackage{xcolor}
\usepackage{mdframed}
\newenvironment{bla}%
{\begin{mdframed}[backgroundcolor=lightgray]}%
{\end{mdframed}}
%%%%%%%%%%%%%%%%%%%
\begin{document}
\begin{bla}
\begin{itemize}
\item Beccari
\item Gregorio
\item Blue
\end{itemize}
\end{bla}
\end{document}
I want exactly, that text + box are centered.
I want like this picture 
Only the red part should be have a grey box, but I don't find still yet a solution.
mdframedpackage, that could do this for you. – Chris H Oct 14 '13 at 10:59\newcommand\greybox[1]{% \vskip\baselineskip% \par\noindent\colorbox{lightgray}{% \begin{minipage}{\textwidth}#1\end{minipage}% }% \vskip\baselineskip% }
– blue Oct 14 '13 at 10:59mdframed manualshould get you a copy of the manual from elsewhere. – Chris H Oct 14 '13 at 11:02framedormdframedandtcolorboxormdframed. – masu Oct 14 '13 at 11:08