Latex迷你页表对齐

Latex迷你页表对齐,latex,Latex,我试图将Latex文档中的两个表对齐,使它们彼此相邻。虽然这是工作,但表的位置是关闭的。第一个位置低于第二个位置: 有人知道如何解决这个问题吗?下面是我的代码: \begin{table}[t] \begin{minipage}{.55\linewidth} \begin{tabular}{l|l} \multicolumn{1}{c|}{\textbf{WordNet}} & \textbf{FreeBase} \\ \hline domain

我试图将Latex文档中的两个表对齐,使它们彼此相邻。虽然这是工作,但表的位置是关闭的。第一个位置低于第二个位置:

有人知道如何解决这个问题吗?下面是我的代码:

\begin{table}[t]
\begin{minipage}{.55\linewidth}
    \begin{tabular}{l|l}
        \multicolumn{1}{c|}{\textbf{WordNet}} & \textbf{FreeBase} \\ \hline
        domain\_region                                      & cause\_of\_death                \\
        domain\_topic                                       & ethnicity                       \\
        has\_instance                                       & gender                          \\
        has\_part                                           & institution                     \\
        member\_holonym                                     & nationality                     \\
        member\_meronym                                     & profession                      \\
        part\_of                                            & religion                        \\
        similar\_to                                         &                                 \\
        subordinate\_instance\_of                           &                                 \\
        synset\_domain\_topic                               &                                 \\
        type\_of                                            &                                
    \end{tabular}
    \label{table1}
    \caption{Relationships in WordNet \& FreeBase KBs}
\end{minipage}%
\begin{minipage}{.5\linewidth}
    \centering
    \begin{tabular}{cccc}
        \multicolumn{4}{c}{\textbf{Holdout Set Construction}}                                   \\
        \multicolumn{2}{c}{\textbf{WordNet}}           & \multicolumn{2}{c}{\textbf{FreeBase}} \\ \hline
        Word Removed & \multicolumn{1}{c|}{\# Triples} & Name Removed        & \# Triples       \\
        adult        & \multicolumn{1}{c|}{166}        & Alan Turing         & 15               \\
        botany       & \multicolumn{1}{c|}{166}        & Carl Sagan          & 18               \\
        building     & \multicolumn{1}{c|}{185}        & Frank Zappa         & 16               \\
        center       & \multicolumn{1}{c|}{180}        & Isaac Asimov        & 20               \\
        form         & \multicolumn{1}{c|}{172}        & John Denver         & 16               \\
        game         & \multicolumn{1}{c|}{267}        & Karl Marx           & 13               \\
        lake         & \multicolumn{1}{c|}{227}        & Mary Astor          & 14               \\
        land         & \multicolumn{1}{c|}{153}        & Su Song             & 13               \\
        mythology    & \multicolumn{1}{c|}{178}        & Tupac Shakur        & 14               \\
        room         & \multicolumn{1}{c|}{189}        & ...                 & ...             
    \end{tabular}
    \caption{Ten words and a sample of 60 names used for constructing Holdout sets for WordNet and FreeBase, respectively. The numbers of triples that each             entity occurs in are listed to the right. These triples comprise the Holdout sets}
    \label{table2}
\end{minipage}
\end{table}

您可以尝试使用相同的内容设置
表格
s,即使某些行可能为空。这将确保它们具有相同的高度:

我用过

  • t
    ypewri
    t
    er字体中生成更好的
    \\\ucode>(用于左表)

  • 提供更美观的桌子

  • \itshape
    用于区分右侧表格中的子标题与同一表格中的其他内容


您可以尝试将
表格设置为具有相同内容,即使某些行可能为空。这将确保它们具有相同的高度:

我用过

  • t
    ypewri
    t
    er字体中生成更好的
    \\\ucode>(用于左表)

  • 提供更美观的桌子

  • \itshape
    用于区分右侧表格中的子标题与同一表格中的其他内容

最好在询问时询问,但您还应指定所需的对齐方式:如果您对齐顶部,则分割线将不对齐,反之亦然。最好在询问时询问,但您还应指定所需的对齐方式:如果您对齐顶部,则分割线将不对齐,反之亦然。
\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage[landscape]{geometry}% Just for this example

\usepackage{booktabs}

\begin{document}

\begin{table}
  \mbox{}\hfill
  \begin{minipage}[t]{.48\linewidth}
    \centering{\ttfamily
    \begin{tabular}{ l l }
      \toprule
      \\
      \multicolumn{1}{ c }{\normalfont\bfseries WordNet} & \multicolumn{1}{ c }{\normalfont\bfseries FreeBase} \\
      \midrule
      domain\_region                                      & cause\_of\_death              \\
      domain\_topic                                       & ethnicity                     \\
      has\_instance                                       & gender                        \\
      has\_part                                           & institution                   \\
      member\_holonym                                     & nationality                   \\
      member\_meronym                                     & profession                    \\
      part\_of                                            & religion                      \\
      similar\_to                                         &                               \\
      subordinate\_instance\_of                           &                               \\
      synset\_domain\_topic                               &                               \\
      type\_of                                            &                               \\
      \bottomrule
    \end{tabular}}

    \caption{Relationships in WordNet \& FreeBase KBs.}
  \end{minipage}\hfill
  \begin{minipage}[t]{.48\linewidth}
    \centering
    \begin{tabular}{ c c c c }
      \toprule
      \multicolumn{4}{c}{\bfseries Holdout Set Construction}                                   \\
      \multicolumn{2}{c}{\bfseries WordNet}           & \multicolumn{2}{c}{\bfseries FreeBase} \\
      \midrule
      \itshape Word Removed & \itshape\# Triples & \itshape Name Removed & \itshape \# Triples       \\
      adult        & 166        & Alan Turing         & 15               \\
      botany       & 166        & Carl Sagan          & 18               \\
      building     & 185        & Frank Zappa         & 16               \\
      center       & 180        & Isaac Asimov        & 20               \\
      form         & 172        & John Denver         & 16               \\
      game         & 267        & Karl Marx           & 13               \\
      lake         & 227        & Mary Astor          & 14               \\
      land         & 153        & Su Song             & 13               \\
      mythology    & 178        & Tupac Shakur        & 14               \\
      room         & 189        & \ldots              & \ldots           \\
      \bottomrule
    \end{tabular}

    \caption{Ten words and a sample of 60 names used for constructing Holdout sets for WordNet and FreeBase, 
      respectively. The numbers of triples that each entity occurs in are listed to the right. 
      These triples comprise the Holdout sets.}
  \end{minipage}\hfill
  \mbox{}
\end{table}

\end{document}