Hi there,
I am sorry for my last post. I made a typo, and only noticed after I posted.
Like I said, there are few different options. You could also try
which puts "text" in a box without border. Otherwise,
which is identical to mbox, but frames the box. The two choices given above are very robust in LaTeX. Otherwise, you could also put your code into a minipage environment
Code: Select all
\begin{minipage}[position]{width}
with your code in here
\end{minipage}
After reading a bit more on this topic, I would recommend the minipage environment for which you can nest many different type of environment. If you want to have borders around your minipage, you can do
Code: Select all
\fbox{\beginminipage}[position]{width}
with your code in here
\end{minipage}}
Hope this helps. Cheers