Text Formattingdash box with lstlisting and prevent frame splitting

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
carol
Posts: 105
Joined: Wed Dec 24, 2008 7:25 pm

dash box with lstlisting and prevent frame splitting

Post by carol »

Hi,
I wanted to put my code lines limited by \verb...+ or \begin{lstlisting}...\end{lstlisting} in a dash box. However, this is not possible with \dashbox. How to do it? Actually, these code lines contain parameters setting of a program so if it is better to present it in another way (than put it in a box), any suggestion is welcome. Because I don't know how other people present in their document.

Moreover, how to prevent a frame (defined by \begin{lstlisting}[frame=single]) to be split on two pages if it is long? All lines limited by \begin{lstlisting} ...\end{lstlisting} should remain on the same page.

Thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

Post Reply