# To clearly separate block inside a chapter

I get many times things that are somehow related to the main topic and should be separated by blue background, for instance.

I do at the moment only

\documentclass{article}
\newtheorem{theorem}{Theorem}
\newtheorem{question}[theorem]{Question}
\begin{document}
\begin{question}
Lorem ipsum?
\end{question}
\end{document}


I get like this

where the question -environment only adds the question mark to the front. I think there is some problem because the environment should be numbered, first of all.

How can you make distinguish the question environment better?

-
Related Question: Environments for visually setting text apart. –  Peter Grill Feb 20 at 18:46
Do you want the structure to be numbered? –  Gonzalo Medina Feb 20 at 19:22

There are many ways, and it all depends on the desired final layout. Below, two options: one using the standard quote environment; the other one using mdframed:

\documentclass{article}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{lipsum}

\newmdenv[linecolor=cyan,backgroundcolor=cyan!20]{question}

\begin{document}

\lipsum[2]
\begin{quote}
\lipsum[2]
\end{quote}
\lipsum[2]
\begin{question}
\lipsum[2]
\end{question}
\lipsum[2]

\end{document}


And with tcolorbox:

\documentclass{article}
\usepackage{tcolorbox}
\tcbuselibrary{most}
\usepackage{lipsum}

\newtcolorbox{question}{breakable,colframe=cyan,colback=cyan!20}

\begin{document}

\lipsum[2]
\begin{question}
\lipsum[2]
\end{question}
\lipsum[2]

\end{document}


Another option using a list through changepage:

\documentclass{article}
\usepackage{changepage}
\usepackage{lipsum}

\newenvironment{question}

\begin{document}

\lipsum[2]
\begin{question}
\lipsum[2]
\end{question}
\lipsum[2]

\end{document}


The options using mdframed and tcolorbox offer you many customization possibilities; please refer to the documentation of the packages.

For example, you can define your structure as a theorem-like block using, for example, amsthm and then surround it with a mdframed:

\documentclass{article}
\usepackage[framemethod=tikz]{mdframed}
\usepackage{amsthm}
\usepackage{lipsum}

\newtheorem{question}{Question}
\mdfdefinestyle{que}{
linecolor=cyan,
backgroundcolor=cyan!20,
}
\surroundwithmdframed[style=que]{question}

\begin{document}

\lipsum[2]
\begin{question}
\lipsum[2]
\end{question}
\lipsum[2]

\end{document}


A numbered structure with tcolorbox:

\documentclass{article}
\usepackage{tcolorbox}
\usepackage{lipsum}

\newtcolorbox[auto counter]
{question}
{colback=cyan!20,colframe=cyan,fonttitle=\bfseries,
title=Question~\thetcbcounter}

\begin{document}

\lipsum[2]
\begin{question}
\lipsum[2]
\end{question}
\lipsum[2]

\end{document}


-
Thank you very much for your clear answer! I like most the last proposal with mdframed and tcolor box because of cusmotisation possibilities. –  Masi Feb 20 at 19:48
I like your update now most (the last option with numbered structure). :) –  Masi Feb 20 at 19:49
@Masi You're welcome! –  Gonzalo Medina Feb 20 at 19:49
@Masi No, no need to add anything else in my examples; looking at the error messages, it seems that you are using an old version of tcolorbox. I am using version 2.70 (2014/02/06). –  Gonzalo Medina Feb 20 at 20:05
Thank you for your feedback! I opened a new question here tex.stackexchange.com/questions/161809/… –  Masi Feb 22 at 14:55