向表中添加列表项

向表中添加列表项

我想在表格中添加一个列表。我的实际代码如下

\documentclass[12pt,a4paper,twoside,openright]{book}
\usepackage{booktabs}
\usepackage{array}
\newcolumntype{L}{>{\centering\arraybackslash}m{4cm}}

\begin{document}

\begin{table}[t]
    \centering
    \begin{tabular}{LLL}
        \multicolumn{3}{c}{\textbf{Neuromarketing Tools}}\\
        \midrule
        Metabolic Brain's Activities & Electrical Brain's Activities & Without Brain's Activities\\
        \midrule        
        Position Emission Tomography (PET) & Electroencephalography (EEG) & Eye tracking\\
        Functional Magnetic Resonance Imaging (FMRI) & Magnetoencephalography (MEG) & Skin conductance\\
        & Steady State Topography (SST) & Facial coding\\
        & Transcranial Magnetic Stimulation (TMS) & Facial electromyography\\
        \bottomrule
    \end{tabular}
    \caption{Classification of neuromarketing tools.}
    \label{tab:neuro_tools}
\end{table}

\end{document}

结果是

在此处输入图片描述

但这不是我想要的。我需要列出项目(带点),而不是将其放在同一行中。我希望我的问题清楚。

有什么建议吗?

编辑:我尝试添加\itemize

\documentclass[12pt,a4paper,twoside,openright]{book}
\usepackage{booktabs}
\usepackage{array}
\newcolumntype{L}{>{\centering\arraybackslash}m{4cm}}

\begin{document}

\begin{table}[t]
    \centering
    \begin{tabular}{LLL}
        \multicolumn{3}{c}{\textbf{Neuromarketing Tools}}\\
        \midrule
        Metabolic Brain's Activities & Electrical Brain's Activities & Without Brain's Activities\\
        \midrule
        \begin{itemize}
            \item Position Emission Tomography (PET)
            \item Functional Magnetic Resonance Imaging (FMRI)
        \end{itemize}
        & \begin{itemize}
            \item Electroencephalography (EEG)
            \item Magnetoencephalography (MEG)
            \item Steady State Topography (SST)
            \item Transcranial Magnetic Stimulation (TMS)
        \end{itemize}
        & \begin{itemize}
            \item Eye tracking
            \item Skin conductance
            \item Facial coding
            \item Facial electromyography
        \end{itemize}\\
        \bottomrule
    \end{tabular}
    \caption{Classification of neuromarketing tools.}
    \label{tab:neuro_tools2}
\end{table}

\end{document}

它接近解决方案,但仍然存在一些问题:

在此处输入图片描述

答案1

编辑:minipages 确实不需要,没有它们效果会更好。我对表格内部(垂直)对齐的想法真的很愚蠢,下面(编辑前)的代码是 minipage 使用的糟糕示例。

\documentclass[12pt,a4paper,twoside,openright]{book}
\usepackage{booktabs}
\usepackage{array}
\newcolumntype{L}[1]{>{\centering\arraybackslash}p{#1}}
\usepackage{multirow}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{table}[t]
    \centering
    \begin{tabular}{@{}L{0.3\textwidth}cL{0.22\textwidth}@{}}
        \multicolumn{3}{c}{\textbf{Neuromarketing Tools}}\\
        \midrule
        Metabolic Brain's Activities & Electrical Brain's Activities & Without Brain's Activities\\
        \midrule        
        \multicolumn{1}{@{}p{0.3\textwidth}@{}}{\begin{itemize}\item Position Emission Tomography (PET)\item Functional Magnetic Resonance Imaging (FMRI)\end{itemize}} &
        \multicolumn{1}{@{}p{0.42\textwidth}}{ \begin{itemize}\item Electroencephalography (EEG) \item Magnetoencephalography (MEG) \item Steady State Topography (SST) \item Transcranial Magnetic Stimulation (TMS) \end{itemize}} & 
        \multicolumn{1}{p{0.2\textwidth}@{}}{ \begin{itemize}\item  Eye tracking \item Skin conductance \item Facial coding \item Facial electromyography \end{itemize}}\\
        \bottomrule
    \end{tabular}
    \caption{Classification of neuromarketing tools.}
    \label{tab:neuro_tools}
\end{table}

\end{document}

输出:(带文本宽度)

在此处输入图片描述

旧答案:

这是一个答案,但超出了文本宽度,因为我不想破坏第二列的文字:

\documentclass[12pt,a4paper,twoside,openright]{book}
\usepackage{booktabs}
\usepackage{array}
\newcolumntype{L}[1]{>{\centering\arraybackslash}p{#1}}
\usepackage{multirow}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\begin{table}[t]
    \centering
    \begin{tabular}{@{}L{0.34\textwidth}cL{0.22\textwidth}@{}}
        \multicolumn{3}{c}{\textbf{Neuromarketing Tools}}\\
        \midrule
        Metabolic Brain's Activities & Electrical Brain's Activities & Without Brain's Activities\\
        \midrule        
       \multicolumn{1}{@{}p{0.34\textwidth}@{}}{\begin{minipage}[inner sep=0,outer sep=0]{0.34\textwidth} \begin{itemize}\item Position Emission Tomography (PET)\item Functional Magnetic Resonance Imaging (FMRI)\end{itemize}\end{minipage}} &\multicolumn{1}{@{}p{0.42\textwidth}}{\begin{minipage}[ inner sep=0,outer sep=0]{0.42\textwidth} \begin{itemize}\item Electroencephalography (EEG) \item Magnetoencephalography (MEG) \item Steady State Topography (SST) \item Transcranial Magnetic Stimulation (TMS) \end{itemize}\end{minipage}} & \multicolumn{1}{p{0.2\textwidth}@{}}{\begin{minipage}[inner sep=0]{0.2\textwidth} \begin{itemize}\item  Eye tracking \item Skin conductance \item Facial coding \item Facial electromyography \end{itemize}\end{minipage}}\\
        \bottomrule
    \end{tabular}
    \caption{Classification of neuromarketing tools.}
    \label{tab:neuro_tools}
\end{table}

\end{document}

我使用多列而不是多行,并且我不确定小页面是否真的有用,但我认为是必要的。

答案2

使用 Itemize 来格式化表格内容。

    \begin{table}[t]
    \centering
    \begin{tabular}{LLL}
        \multicolumn{3}{c}{\textbf{Neuromarketing Tools}}\\
        \midrule
        Metabolic Brain's Activities & Electrical Brain's Activities & Without Brain's Activities\\
        \midrule      
        \begin{itemize}
            \item Position Emission Tomography (PET)
            \item EEG
            \item Eye tracking
        \end{itemize}  


    \end{tabular}
    \caption{Classification of neuromarketing tools.}
    \label{tab:neuro_tools}
\end{table}

这

相关内容