下面是一个小的 tex 文档,我尝试了各种方法来删除行之间的空白,但还没有成功。谢谢!这是文档:
\documentclass[a4paper,landscape]{article}
\usepackage{xcolor}
\usepackage{colortbl}
\usepackage{longtable}
\usepackage[left=0cm,top=0cm,right=0cm,bottom=0cm,nohead,nofoot]{geometry}
\usepackage[T1]{fontenc}
\usepackage[scaled]{beramono}
\begin{document}
\newcolumntype{C}{>{\color[HTML]{F8F8F8}\columncolor[HTML]{000000}}l}
\newcolumntype{N}{>{\color[HTML]{000000}\columncolor[HTML]{DDF0FF}}l}
\begin{longtable}{NC}
\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}}}\\
\end{longtable}
\end{document}