将分项单元格与表格的其余部分对齐

将分项单元格与表格的其余部分对齐

我是 Latex 的初学者,我正在尝试学习它来为 Springer 撰写期刊文章。我制作了一个两列表格,左列主要是分项单元格。我试图将分项文本与表格的其余文本对齐,但没有结果。我希望得到一些指导。

这是我使用的代码

  \begin{table}[ht] 
        \caption{Applications Overview}
        \label{tab:2}
        \begin{tabular}{p{0.25\columnwidth} p{0.35\columnwidth}}
        \hline\noalign{\smallskip}
        Application Type & Functionality  \\
        \noalign{\smallskip}\hline\noalign{\smallskip}
             Environmental & 
             \begin{itemize}[leftmargin=*]
                 \item[] Smart Water Supply
                 \item[] Smart Agriculture
                 \item[] Environment Monitoring
             \end{itemize} \\
             
             Healthcare &
             \begin{itemize}[leftmargin=*]
                 \item[] Heart Rate Monitoring
                 \item[] Blood Pressure Monitoring
                 \item[] Glucometer Monitoring
                 \item[] Real-Time Locationg of Medical Equipment
             \end{itemize} \\
             
             Social & 
             \begin{itemize}[leftmargin=*]
                 \item[] Smart Homes
                 \item[] Smart Surveillance
                 \item[] Smart Mobility
                 \item[] Smart Social Interactions
                 \item[] Smart Shopping
             \end{itemize} \\
             
             Energy Management & Smart Grid \\
             
             Industry 4.0 & 
             \begin{itemize}[leftmargin=*]
                 \item[] Automated Machinery
                 \item[] Smart Manufacturing
             \end{itemize} \\
             
             Industry 5.0 & Synergy of Human and A.I. \\
        \noalign{\smallskip}\hline
        \end{tabular}
    \end{table}
    

结果如下

在此处输入图片描述

先感谢您!

答案1

在这种情况下,您实际上不需要使用列表。tabular环境就足够了:

在此处输入图片描述

笔记:

  • 对于表格,您确实应该使用booktabs。我在下面的 MWE 中使用它来调整您的规则。

代码

\documentclass{article} 
\usepackage{booktabs}
\usepackage{enumitem}

\begin{document}
  \begin{table}[ht] 
        \caption{Applications Overview}
        \label{tab:2}
        \begin{tabular}{p{0.25\columnwidth} p{0.35\columnwidth}}
        \toprule
        Application Type & Functionality  \\
        \cmidrule(lr){1-2}
             Environmental 
                 & Smart Water Supply \\
                 & Smart Agriculture \\
                 & Environment Monitoring \\[0.75ex]
             Healthcare 
                 & Heart Rate Monitoring \\
                 & Blood Pressure Monitoring \\
                 & Glucometer Monitoring \\
                 & Real-Time Location of Medical Equipment \\[0.75ex]
             Social 
                 & Smart Homes \\
                 & Smart Surveillance \\
                 & Smart Mobility \\
                 & Smart Social Interactions \\
                 & Smart Shopping \\[0.75ex]
             \raggedright
             Energy Management & Smart Grid \\[0.75ex]
             Industry 4.0 
                 & Automated Machinery \\
                 & Smart Manufacturing \\[0.75ex]
             Industry 5.0 
                 & Synergy of Human and A.I. \\
        \bottomrule
        \end{tabular}
    \end{table}
\end{document}

相关内容