2

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 enter image description here

Only the red part should be have a grey box, but I don't find still yet a solution.

blue
  • 171

0 Answers0