i want write a maple book, see this example code in that book:
\documentclass{article}
\usepackage{tcolorbox,fancyvrb}
\tcbuselibrary{skins,breakable}
%-------------------------------------------------- Code Environment
\newenvironment{code}
{\VerbatimEnvironment
\begin{tcolorbox}[
breakable,
colback=red!5!white,
colframe=red!75!black,
]%
\begin{Verbatim}}
{\end{Verbatim}\end{tcolorbox}}
\newenvironment{outc}
{\begin{tcolorbox}[
breakable,
left=0mm,right=0mm,top=0mm,bottom=0mm,
% boxsep=0mm,
colback=white,
coltext=blue,
colframe=gray!50,
]}%
{\end{tcolorbox}}
%\newenvironment{outcode}
% {\begin{outc}\begin{equation}}
% {\end{equation}\end{outc}}
\newenvironment{outcode}
{\begin{outc}\[}
{\]\end{outc}}
%-------------------------------------------------- Code Environment
\begin{document}
In this example, we see too much space between this two environment \textbf{code} and \textbf{outcode}:
\begin{code}
> 2+3;
\end{code}
\begin{outcode}
5
\end{outcode}
\end{document}
output is:
question is: How can i write output below the maple code with two different color for background and text,and separate those with, for example \tcblower command in tcolorbox?
In tcolorbox-example.tex file in c:\texlive\2013\texmf-dist\doc\latex\tcolorbox folder, use environment tcblisting for the setting the box displays the source code and shows the output in other part below like this:
\begin{tcblisting}{colback=red!5!white,colframe=red!75!black}
This is a \LaTeX\ example:
\begin{equation}
\sum\limits_{i=1}^n i = \frac{n(n+1)}{2}.
\end{equation}
\end{tcblisting}
output is: