0

In my page I have some paragraphs of text, and then a table including some text and figures. However, the table either appears on its own and takes up the rest of the page as white space, or appears together with the text but after it, whereas it should be appearing before it.

Sample of code below, as well as screenshot of output.

    \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}

enter image description here

  • 2
    never apply resizebox{\columnwidth}{!}{ to tabular but it is not clear what is your problem, and we can not run your example. The only purpose of placing a tabular in a table evironment is to allow it to be moved, so what you describe is the expected behaviour. – David Carlisle May 26 '22 at 20:39

1 Answers1

1

With use of the tabularray and adjustbox package, font size small and without resizing of table:

\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}

enter image description here

Zarko
  • 296,517