Below I have defined the Question environment which uses a minipage for each comoponent and then the question and answer are placed in their own mdframed boxes:

If you want something like the iOS bubbles you can use the QuestionIOS environment defined below:

When you have a series of questions they should be specified in their own QuestionIOS environment:
\begin{QuestionIOS}{Main complaints of this patient with hepatitis?}
Muscle pain.
Jaundice is a typical symptom (nonspecific) but not pain.
% Icterus is not a complain
Enlargement of the liver. % hepatomegaly
\end{QuestionIOS}
\begin{QuestionIOS}{Why muscle pain is coming?}
Virus infection.
% There exists no specific symptom for viral hepatitis.
Intoxication can be but it is untypical.
\end{QuestionIOS}
\begin{QuestionIOS}{What can you find in the blood analysis?}
Increased liver enzymes (ALAT, ASAT).
\end{QuestionIOS}
which yields:

An alternate is QuestionIOSAlt environment within which you can use \newQuestionAlt to define a new question which is closer to your pseudocode. This yields results identical to what is shown above.
\begin{QuestionIOSAlt}{Main complaints of this patient with hepatitis?}
Muscle pain.
Jaundice is a typical symptom (nonspecific) but not pain.
% Icterus is not a complain
Enlargement of the liver. % hepatomegaly
\newQuestionAlt{Why muscle pain is coming?}
Virus infection.
% There exists no specific symptom for viral hepatitis.
Intoxication can be but it is untypical.
\newQuestionAlt{What can you find in the blood analysis?}
Increased liver enzymes (ALAT, ASAT).
\end{QuestionIOSAlt}
Note:
- No changes are required to how you specify the info. Just using a different environment changes the style of the output.
- If you don't want the questions in bold, remove the
\bfseries in the environment definitions.
Code:
\documentclass{article}
\usepackage[framemethod=tikz]{mdframed}
\mdfdefinestyle{ans}{
linecolor=cyan,
backgroundcolor=yellow!20,
}
\mdfdefinestyle{ques}{
linecolor=cyan,
backgroundcolor=green!20,
}
\newcounter{question}[section]%
\setcounter{question}{0}
\newenvironment{question}[1]{%
\refstepcounter{question}%
\begin{mdframed}[style=ans,frametitle={Question: #1}]
}{%
\end{mdframed}%
}%
\newenvironment{Question}[1]{%
\refstepcounter{question}%
\noindent%
\begin{minipage}{0.22\linewidth}
\begin{mdframed}[style=ques]
\bfseries\raggedright
Question: #1
\end{mdframed}%
\end{minipage}%
\hfill%
\begin{minipage}{0.70\linewidth}
\begin{mdframed}[style=ans]
}{%
\end{mdframed}%
\end{minipage}%
}%
\newenvironment{QuestionIOS}[1]{%
\refstepcounter{question}%
\smallskip\par%
\noindent%
\begin{minipage}{0.75\linewidth}
\begin{mdframed}[style=ques, roundcorner=7.0pt, linewidth=1pt]
\bfseries\raggedright
Question: #1
\end{mdframed}%
\end{minipage}%
\smallskip\par\hfill%
\begin{minipage}{0.75\linewidth}
\begin{mdframed}[style=ans, roundcorner=7.0pt, linewidth=1pt]
}{%
\end{mdframed}%
\end{minipage}%
}%
\newenvironment{QuestionIOSAlt}[1]{%
\newcommand*{\newQuestionAlt}[1]{%
\end{mdframed}%
\end{minipage}%
\refstepcounter{question}%
\smallskip\par%
\noindent%
\begin{minipage}{0.75\linewidth}
\begin{mdframed}[style=ques, roundcorner=7.0pt, linewidth=1pt]
\bfseries\raggedright
Question: ##1
\end{mdframed}%
\end{minipage}%
\smallskip\par\hfill%
\begin{minipage}{0.75\linewidth}
\begin{mdframed}[style=ans, roundcorner=7.0pt, linewidth=1pt]
}%
\refstepcounter{question}%
\smallskip\par%
\noindent%
\begin{minipage}{0.75\linewidth}
\begin{mdframed}[style=ques, roundcorner=7.0pt, linewidth=1pt]
\bfseries\raggedright
Question: #1
\end{mdframed}%
\end{minipage}%
\smallskip\par\hfill%
\begin{minipage}{0.75\linewidth}
\begin{mdframed}[style=ans, roundcorner=7.0pt, linewidth=1pt]
}{%
\end{mdframed}%
\end{minipage}%
}%
\newcommand*{\AnswerText}{%
Muscle pain.
Jaundice is a typical symptom (nonspecific) but not pain.
% Icterus is not a complain
Enlargement of the liver. % hepatomegaly
\textbf{Why muscle pain is coming?}
Virus infection.
% There exists no specific symptom for viral hepatitis.
Intoxication can be but it is untypical.
\textbf{What can you find in the blood analysis?}
Increased liver enzymes (ALAT, ASAT).
}
\begin{document}
\noindent\verb|question| environment:\medskip\par
\begin{question}{Main complaints of this patient with hepatitis?}
\AnswerText
\end{question}
\bigskip\hrule\bigskip
\noindent\verb|Question| environment:\medskip\par
\begin{Question}{Main complaints of this patient with hepatitis?}
\AnswerText
\end{Question}
\bigskip\hrule\bigskip
\noindent\verb|QuestionIOS| environment:\medskip\par
\begin{QuestionIOS}{Main complaints of this patient with hepatitis?}
\AnswerText
\end{QuestionIOS}
\clearpage
\noindent\verb|QuestionIOS| environment with multiple questions:\medskip\par
\begin{QuestionIOS}{Main complaints of this patient with hepatitis?}
Muscle pain.
Jaundice is a typical symptom (nonspecific) but not pain.
% Icterus is not a complain
Enlargement of the liver. % hepatomegaly
\end{QuestionIOS}
\begin{QuestionIOS}{Why muscle pain is coming?}
Virus infection.
% There exists no specific symptom for viral hepatitis.
Intoxication can be but it is untypical.
\end{QuestionIOS}
\begin{QuestionIOS}{What can you find in the blood analysis?}
Increased liver enzymes (ALAT, ASAT).
\end{QuestionIOS}
\bigskip\hrule\bigskip
\noindent\verb|QuestionIOSAlt| environment with multiple questions and \verb|\newQuestionAlt| to start a new question:\medskip\par
\begin{QuestionIOSAlt}{Main complaints of this patient with hepatitis?}
Muscle pain.
Jaundice is a typical symptom (nonspecific) but not pain.
% Icterus is not a complain
Enlargement of the liver. % hepatomegaly
\newQuestionAlt{Why muscle pain is coming?}
Virus infection.
% There exists no specific symptom for viral hepatitis.
Intoxication can be but it is untypical.
\newQuestionAlt{What can you find in the blood analysis?}
Increased liver enzymes (ALAT, ASAT).
\end{QuestionIOSAlt}
\end{document}
which I would like to change to look more like a discussion-- What does this mean? – Oct 13 '14 at 16:49