表格环境故障:顺序和空格不正确

表格环境故障:顺序和空格不正确

在我的页面中,我有一些文本段落,然后是一个包含一些文本和图片的表格。但是,表格要么单独出现,占据了页面的其余部分,成为空白,要么与文本一起出现,但出现在文本之后,而它应该出现在文本之前。

下面是代码示例以及输出的屏幕截图。

    \newpage
    \subsection{General knowledge}
    \begin{enumerate}
        \item Brain regions: Researchers have sought to understand which regions are activated in the process of decision-making. Early literature suggested this was the medial frontal cortex (MFC) for humans and orbitofrontal cortex (OCF) for monkeys. This was puzzling for researchers. Newer studies have reconciled this discrepancy (Bongioanni et al., 2021), suggesting the MFC is involved in novel decisions, whereas the OCF is involved in familiar ones.
        \item Summary of neuroscience papers:
    \end{enumerate}
        
            \begin{table}                       
            \resizebox{\columnwidth}{!}{
                \begin{tabular}{|m{8cm}|m{8cm}|m{10cm}|}
                    \hline
                    \textbf{Paper}&\textbf{Objective}&\textbf{Figures}\\
                    \hline  
                    
                    % PAPER
                    11. Kobayashi, Schultz (2008): Influence of Reward Delays on Responses of Dopamine Neurons
                    
                    % OBJECTIVE
                    &
                    To study how reward delays impact neuronal activity (SS vs LL reward, 2s/4s/8s/16s).
                    
                    % FIGURES
                    &
                    \begin{center}
                        \includegraphics[width=1\linewidth]{"Figures/Lecture 4, P11F1"}
                    \end{center}
                                                                                                    \\
                    \hline
                                    
                \end{tabular}
            }
        \end{table}

在此处输入图片描述

答案1

使用tabularrayadjustbox包,字体大小small和表格大小均不调整:

\documentclass{article}
\usepackage[margin=25mm]{geometry}
\usepackage{tabularray}
\usepackage[export]{adjustbox}

\begin{document}
\subsection{General knowledge}
    \begin{enumerate}
\item   Brain regions: Researchers have sought to understand which regions are activated in the process of decision-making. Early literature suggested this was the medial frontal cortex (MFC) for humans and orbitofrontal cortex (OCF) for monkeys. This was puzzling for researchers. Newer studies have reconciled this discrepancy (Bongioanni et al., 2021), suggesting the MFC is involved in novel decisions, whereas the OCF is involved in familiar ones.
\item   Summary of neuroscience papers:
    \end{enumerate}

    \begin{table}
\begin{tblr}{hlines, vlines,
             colspec = {X[0.9, j, m] X[0.9, j, m] X[1.2, c, m]},
             rows = {font=\small},
             row{1} = {font=\bfseries, c},
             rowsep=3pt
             }
Paper   &   Objective   &   Figures         \\
% PAPER
11. Kobayashi, Schultz (2008): Influence of Reward Delays on Responses of Dopamine Neurons
        &   % OBJECTIVE
            To study how reward delays impact neuronal activity (SS vs LL reward, 2s/4s/8s/16s).
            &   % FIGURES
            \includegraphics[width=1\linewidth, valign=m]{example-image-duck}%{"Figures/Lecture 4, P11F1"}
\end{tblr}
    \end{table}
\end{document}

在此处输入图片描述

相关内容