Latex 表格单元格中的数字是否垂直对齐?

Latex 表格单元格中的数字是否垂直对齐?,latex,Latex,我试图设计一个有点复杂的表(sidewaystable),在LaTeX中有7行4列。该表包含文本、bibtex引用,以及最重要的单元格内的数字(目前,出于测试目的,这些数字是jpeg格式的,最终我想将它们更改为PDF格式)。这些数字(故意)剪得很近 我有我想要的大多数表格布局,但数字在单元格顶部对齐!这看起来很难看,我需要在单元格内垂直和水平对齐它们 我尝试了几件事(parbox,手动为数组包定义一个新的columntype…),但就是不知道怎么做 下面是我的表的latex源代码的基本外观(文本

我试图设计一个有点复杂的表(sidewaystable),在LaTeX中有7行4列。该表包含文本、bibtex引用,以及最重要的单元格内的数字(目前,出于测试目的,这些数字是jpeg格式的,最终我想将它们更改为PDF格式)。这些数字(故意)剪得很近

我有我想要的大多数表格布局,但数字在单元格顶部对齐!这看起来很难看,我需要在单元格内垂直和水平对齐它们

我尝试了几件事(parbox,手动为数组包定义一个新的columntype…),但就是不知道怎么做

下面是我的表的latex源代码的基本外观(文本替换为模型文本):

如果有人能给我一些关于如何在单元格内垂直和水平对齐图形的信息,我将非常感激

即,图形需要位于每个单元格中,以便图形上方和下方至各个单元格边框的空间以及左侧和右侧至各个单元格边框的空间相同


(我找到了一些关于这个或相关表格布局问题的页面,但不知道实际该做什么。)

您可以使用
表格x
包(或
数组
包)使所有单元格垂直对齐。这可以让你开始:

\usepackage{tabularx}
\begin{document}

\renewcommand{\tabularxcolumn}[1]{>{\arraybackslash}m{#1}}
\begin{tabularx}{\textwidth}{XXXX}
    \hline
    column1description & column2description & TypeOfOrganism & column4description\\ \hline
    \hline
    Diagram1title & the graphics & I would be very thankful if someone
    could give me some information on how to align the figures vertically
    as well as horizontally within their cells.I would be very thankful if someone could give me some information on how to align the figures vertically as well as horizontally within their cells. & {\em S.\ cerevisiae, E.\ coli}\\ 
    \hline\\
    Diagram1title & the graphics & I would be very thankful if someone
    could give me some information on how to align the figures vertically
    as well as horizontally within their cells.I would be very thankful if
    someone could give me some information on how to align the figures
    vertically as well as horizontally within their cells. & {\em S.\
    cerevisiae, E.\ coli}\\ 
    \hline
\end{tabularx}

\end{document}

如果您试图对齐几个图形,您可以考虑使用<代码>子Fig < /C>包,而不是<代码>表< /C>环境。如果你在处理数字,它会给你更多的选择,更容易处理。作为介绍,您可以看一下,尤其是本节。实际软件包可在CTAN网站上获得,并附带其他文档

这只会给你一个不同的方法,不会马上解决你的问题, 但是,再次阅读您的问题,您的脑海中似乎有类似于此问题的想法:

此外,它还取决于“描述1”部分的长度。如果是全文,您可能希望在
minipage
环境中执行

\usepackage{tabularx}
\begin{document}

\renewcommand{\tabularxcolumn}[1]{>{\arraybackslash}m{#1}}
\begin{tabularx}{\textwidth}{XXXX}
    \hline
    column1description & column2description & TypeOfOrganism & column4description\\ \hline
    \hline
    Diagram1title & the graphics & I would be very thankful if someone
    could give me some information on how to align the figures vertically
    as well as horizontally within their cells.I would be very thankful if someone could give me some information on how to align the figures vertically as well as horizontally within their cells. & {\em S.\ cerevisiae, E.\ coli}\\ 
    \hline\\
    Diagram1title & the graphics & I would be very thankful if someone
    could give me some information on how to align the figures vertically
    as well as horizontally within their cells.I would be very thankful if
    someone could give me some information on how to align the figures
    vertically as well as horizontally within their cells. & {\em S.\
    cerevisiae, E.\ coli}\\ 
    \hline
\end{tabularx}

\end{document}