Graphics, Figures & TablesSmaller height with listing in tabular

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
zukow
Posts: 1
Joined: Sun Dec 13, 2009 8:47 pm

Smaller height with listing in tabular

Post by zukow »

Hello,

I have a problem with height the tabular, it's to big when I use lstlisting. I have something like this:

Code: Select all

\begin{listing}
\listingSimple\begin{tabular*}{\textwidth}{p{.48\textwidth}|p{.48\textwidth}} \\ [-4ex]
	\begin{lstlisting}
	some code
	some code
	\end{lstlisting} &
	\begin{lstlisting}
	some code
	some code
	\end{lstlisting}  \\ [-4ex]
\end{tabular*}\listingStd
\caption{example}
\label{list:example}
The listing is my custom float. As You can see I managed to make the height smaller by using [-4ex] commands but the middle line still is too big so it's no use. Lstlisting and verbatim enviroments leave some ugly extra line. I tried some parameters for lstlisting but it was still no use. I would be really gratefull for some help, because I have 30h starting from now to solve this.

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