如何删除表格单元格边框中的多余垂直空间

如何删除表格单元格边框中的多余垂直空间

梅威瑟:

\documentclass[11pt]{article}
\usepackage[a4paper]{geometry}
\geometry{tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm}
\usepackage[english]{babel}
\usepackage{tabularx, makecell}
\setlength{\parindent}{0pt}
\begin{document}
\begin{tabularx}{\textwidth}[t]{ l  X }
  \hline
  \makecell[l]{Supplier\\(Executor):} & text text text text text text text text text text text text text text text text text text text text text text text text text text\\
  \hline
\end{tabularx}
\end{document}

输出:

在此处输入图片描述

如何去除多余的垂直空间?

答案1

使用\makecell[tl]{...}

\documentclass[11pt]{article}
\usepackage[a4paper]{geometry}
\geometry{tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm}
\usepackage[english]{babel}
\usepackage{tabularx, makecell}
\setlength{\parindent}{0pt}
\begin{document}
\begin{tabularx}{\textwidth}[t]{ l  X }
  \hline
  \makecell[tl]{Supplier\\(Executor):} & text text text text text text text text text text text text text text text text text text text text text text text text text text\\
  \hline
\end{tabularx}
\end{document}

上述代码的输出

相关内容