# Custom divider between 2 minipage and lstlisting

I am using the following code to have 2 boxes beside each other for code comparison:

\documentclass[12pt]{article}
\usepackage{listings}
\begin{document}

\begin{singlespace}
\begin{minipage}[t]{0.45\textwidth}
\begin{lstlisting}[language=HTML,frame=lrtb]
%one
%two
Hi there
\end{lstlisting}%
\end{minipage}%
\hfill
\begin{minipage}[t]{0.45\textwidth}
\begin{lstlisting}[language=HTML,frame=lrtb]
<one>
<two>
Hi there
</two>
</one>
\end{lstlisting}%
\end{minipage}%
\end{singlespace}

\end{document}


This results in the following being rendered:

I would like to place custom text between the 2 boxes. Ideally, something that looks like:

-
Welcome to TeX.sx! Please extend your code to a complete and compilable minimal working example (MWE) (including \documentclass \begin{document} etc. that illustrates your problem. This makes it easier for others to use your code as a basis to help you! –  Daniel Apr 24 '12 at 7:03
Could you state your exact requirements? Simply changing \hfill with the text would do it. Do you want line breaking ability? Should the boxes never go beyond the official textwidth, etc.? You can just place a third minipage between the two. –  Martin Scharrer Apr 24 '12 at 7:38

As Martin said, you can use another minipage with with a fbox and parbox to enable line breaking.

\documentclass[12pt]{article}
\usepackage{listings,setspace,amsmath}
\usepackage[margin=2cm]{geometry}
\begin{document}

\begin{singlespace}
\begin{minipage}[r]{0.38\textwidth}
\begin{lstlisting}[language=HTML,frame=lrtb]
%one
%two
Hi there
\end{lstlisting}%
\end{minipage}%
\hfil
\begin{minipage}[c]{0.17\textwidth}
\centering
\fbox{
\parbox[m]{.8\textwidth}{\centering Renders $\implies$}}
\end{minipage}%
\hfil
\begin{minipage}[l]{0.38\textwidth}
\begin{lstlisting}[language=HTML,frame=lrtb]
<one>
<two>
Hi there
</two>
</one>
\end{lstlisting}%
\end{minipage}%
\end{singlespace}

\end{document}


-