表格太宽,不适合页面

表格太宽,不适合页面

我对 Latex 还很陌生,在表格方面遇到了问题。我使用网站创建了表格http://www.tablesgenerator.com/

当我将代码放入 Latex 时,表格太宽,不适合页面。我该如何解决这个问题?

代码:

\begin{table}[]
\begin{tabular}{
>{\columncolor[HTML]{FFCCC9}}c 
>{\columncolor[HTML]{EFEFEF}}c 
>{\columncolor[HTML]{EFEFEF}}c 
>{\columncolor[HTML]{EFEFEF}}c 
>{\columncolor[HTML]{EFEFEF}}c cccc}
\textbf{Receptor name} & Formyl peptide receptor 1 and 2                     
& CXC chemokine receptor 1 and 2                        & Leukotriene B4 
Receptor & Platelet-activating factor receptor & Free fatty acid receptor 2 
& G-protein-coupled receptor 84 & Purinergic receptor 2 & Anaphylatoxin 
receptor 1 +2                             \\
\textbf{Gene name}     & \begin{tabular}[c]{@{}c@{}}FPR1\\ FPR2\end{tabular} 
& \begin{tabular}[c]{@{}c@{}}CXCR1\\ CXCR2\end{tabular} & BLT                     
& PAFR                                & GPR43                      & GPR84                         
& P2Y2R                 & \begin{tabular}[c]{@{}c@{}}C5AR 1\\ C5AR 
2\end{tabular} \\
\textbf{Ligands(s)}    & N-Formyl-peptides                                   
& CXC chemokines (Interleukin 8)                        & Leukotrienes,B4         
& Platelet-activating factor          & Short-chain fatty acids    & LPS                           
& Nucleotides           & Anaphylatoxin                                          

\end{tabular}
\caption{Table describing receptor name, gene name and ligands for the 
various receptors of neutrophils 
\parencite{Futosi2013NeutrophilPathways,Scott2004LeukotrieneMice}}.

\label{Other receptors}
\end{table}

答案1

根据猜测:

在此处输入图片描述

据我所知,即使旋转桌子,桌子也太大了,无法放置。您应该考虑以交换行和列的方式重新设计桌子:

\documentclass{article}
\usepackage[margin=25mm]{geometry}
\usepackage[table]{xcolor}
\usepackage{booktabs}
\newcolumntype{L}{>{\RaggedRight}X}

\begin{document}
    \begin{table}[ht]
    \centering
    \renewcommand\arraystretch{1.2}
\begin{tabular}{@{} *{3}{l} @{}}
    \toprule
Receptor name                       &   Gene name       &   Ligands(s)          \\
    \midrule
Formyl peptide receptor 1 and 2     &   FPR1, FPR2      &   N-Formyl-peptides   \\
CXC chemokine receptor 1 and 2      &   CXCR1, CXCR2    &   CXC chemokines (Interleukin 8) \\
Leukotriene B4 Receptor             &   BLT             &   Leukotrienes, B4    \\
Platelet-activating factor receptor &   PAFR            &   Platelet-activating factor  \\
Free fatty acid receptor 2          &   GPR43           &   Short-chain fatty acids \\
G-protein-coupled receptor 84       &   GPR84           &   LPS                 \\
Purinergic receptor 2               &   P2Y2R           &   Nucleotides         \\
Anaphylatoxin receptor 1 +2         &   C5AR 1 C5AR 2   &   Anaphylatoxin       \\
    \bottomrule
\end{tabular}
    \caption{Table describing receptor name, gene name and ligands for the
various receptors of neutrophils
%\parencite{Futosi2013NeutrophilPathways,Scott2004LeukotrieneMice}
            }.
\label{Other receptors}
    \end{table}
\end{document}

请检查我是否正确地转置了您的表格:)

答案2

您可以在表环境声明之后立即添加\small,等。例如: 。\tiny\begin{table}[ht]\tiny

相关内容