I have a small tex document below, and I have tried various methods to remove the white spaces between rows, but haven't had any luck yet. Thanks! Here's the document:

\texttt{   1 }&\mbox{\texttt{ {\color[HTML]{E28964}def}\hspace{1ex}{\color[HTML]{89BDFF}hello}}}\\
\texttt{   2 }&\mbox{\texttt{ \hspace{1ex}\hspace{1ex}puts\hspace{1ex}{\color[HTML]{65B042}{\color[HTML]{65B042}''}Hi\hspace{1ex}guys!{\color[HTML]{65B042}''}}}}\\
\texttt{   3 }&\mbox{\texttt{ {\color[HTML]{E28964}end}}}\\

closed as too localized by Joseph Wright Apr 15 '12 at 8:49

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    I don't see any whitespace: i.imgur.com/mlHs9.png maybe it's your viewer? (Have you tried zooming in/out?) – huon Mar 10 '12 at 4:27
  • 2
    If you replace the \\ with \\[-1pt] the white space seems to go away. I'll leave this as a comment as it is too hackish, even for me... – Peter Grill Mar 10 '12 at 5:42
  • 2
    I tried with pdflatex and xelatex and didn't see any gaps between the rows with either pdflatex or xelatex (tl2010 versions) what versions were you and @PeterGrill using? This is likely to be a back end driver rendering issue. If you are typesetting adjacent coloured panels then even a single pixel out is disturbing if it leaves a gap. – David Carlisle Mar 10 '12 at 11:29
  • 1
    @DavidCarlisle: I also am on Mac TeXLive2011 (packages updated yesterday), and saw the horizontal lines in both the TeXWorks previewer and Adobe Acrobat. I have seem similar issues, and recall that at some magnifications the lines don't show, zooming in shows them, and zooming in further does not... – Peter Grill Mar 10 '12 at 16:46
  • 1
    @PeterGrill: I am using Ubuntu and I can't see any white lines, too. – Marco Daniel Apr 12 '12 at 18:52