调整长桌宽度

调整长桌宽度

我必须调整其中一个表格的宽度。我查看了与此相关的其他问题 - 但似乎无法弄清楚。

我的序言:

\usepackage[backend=biber,style=authoryear,autocite=inline]{biblatex}
\addbibresource{Bibliography.bib}
\usepackage[labelfont={bf, it}]{caption}
\captionsetup{font=footnotesize, textfont=it}
\usepackage{graphicx}
\usepackage{epstopdf}
\usepackage{float}
\usepackage[normalem]{ulem}
\useunder{\uline}{\ul}{}
\usepackage[T1]{fontenc} 
\usepackage[table,xcdraw]{xcolor}
\usepackage{multicol}
\usepackage{adjustbox}
\usepackage{array}
\usepackage{wrapfig}
\usepackage{multirow}
\usepackage{tabu}
\usepackage{rotating}
\usepackage{amsmath}
%\usepackage[table,xcdraw]{xcolor}
\usepackage[a4paper, total={6in, 9in}]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead[L]{\fontsize{10}{12}}
\linespread{1.5}
\usepackage{times}
\usepackage[none]{hyphenat}
\sloppy
\usepackage[hidelinks]{hyperref} %[hidelinks] fjerner det røde i table of contents
\usepackage{textgreek}
\usepackage{longtable}

我的桌子:

\begin{longtable}[H]{l|l|l|l|l}
\label{MTPSLLONG}
\hline
\multicolumn{1}{c|}{\cellcolor[HTML]{F2F1E1}\textbf{Species}} & \multicolumn{1}{c|}{\cellcolor[HTML]{F2F1E1}\textbf{MTPSL}} & \multicolumn{1}{c|}{\cellcolor[HTML]{F2F1E1}\textbf{Substrate(s)}} & \multicolumn{1}{c|}{\cellcolor[HTML]{F2F1E1}\textbf{Product(s)}} & \multicolumn{1}{c}{\cellcolor[HTML]{F2F1E1}\textbf{Reference}} \\ \hline
\endfirsthead

\hline
\multicolumn{1}{c|}{\cellcolor[HTML]{F2F1E1}\textbf{Species}} & \multicolumn{1}{c|}{\cellcolor[HTML]{F2F1E1}\textbf{MTPSL}} & \multicolumn{1}{c|}{\cellcolor[HTML]{F2F1E1}\textbf{Substrate(s)}} & \multicolumn{1}{c|}{\cellcolor[HTML]{F2F1E1}\textbf{Product(s)}} & \multicolumn{1}{c}{\cellcolor[HTML]{F2F1E1}\textbf{Reference}} \\ \hline
\endfoot

 & SmMTPSL1 & (E,E)-FPP & \begin{tabular}[c]{@{}l@{}}(E)- nerolidol, α-copaene, \\ β-elemene, γ-cadinene, δ-cadinene, \\ unidentified oxygenated sesquiterpene\end{tabular} &  \\ \cline{2-4}
 & SmMTPSL13 & None & None &  \\ \cline{2-4}
 & SmMTPSL17 & (E,E)-FPP & \begin{tabular}[c]{@{}l@{}}α-copaene, β-elemene, \\ γ-cadinene, δ-cadinene, \\ unidentified oxygenated sesquiterpene, \\ germacrene, bicyclogermacrene, \\ α-cadinene\end{tabular} &  \\ \cline{2-4}
 & SmMTPSL22 & (E,E)-FPP, GPP & (E)- nerolidol, limonene, linalool &  \\ \cline{2-4}
 & SmMTPSL26 & (E,E)-FPP & \begin{tabular}[c]{@{}l@{}}unidentified sesquiterpene A, \\ unidentified sesquiterpene B, \\ 2-epi-(E)-β-caryophyllene\end{tabular} &  \\ \cline{2-4}
\multirow{-6}{*}{\textit{Selaginella moellendorffii}} & SmMTPSL30 & None & None & \multirow{-6}{*}{Li et. al (2012)} \\ \hline
 & MpMTPSL1 & None & None &  \\ \cline{2-4}
 & MpMTPSL2 & NPP & Not defined &  \\ \cline{2-4}
 & MpMTPSL3 & (E,E)-FPP & Not defined &  \\ \cline{2-4}
 & MpMTPSL4 & (E,E)-FPP & \begin{tabular}[c]{@{}l@{}}(2)-a-Gurjunene (3), \\  5-Hydroxy-a-Gurjunene, and others\\ not defined\end{tabular} &  \\ \cline{2-4}
 & MpMTPSL5 & (E,E)-FPP & Not defined &  \\ \cline{2-4}
 & MpMTPSL6 & NPP & Not defined &  \\ \cline{2-4}
 & MpMTPSL7 & (E,E)-FPP & Not defined &  \\ \cline{2-4}
 & MpMTPSL8 & None & None &  \\ \cline{2-4}
\multirow{-9}{*}{\textit{Marchantia polymorpha}} & MpMTPSL9 & (E,E)-FPP & Not defined & \multirow{-9}{*}{Kumar et. al (2016)} \\ \hline
 & Liv-IRBN-MTPSL2 & GPP, (E,E)-FPP, (Z,E)-FPP & \begin{tabular}[c]{@{}l@{}}Myrcene, limonene, (Z)-β-ocimene, \\ (E)-β-ocimene, linalool, \\ bicycloelemene, bicyclogermacrene, \\ unidentified sesquiterpene hydrocarbons\end{tabular} &  \\ \cline{2-4}
\multirow{-2}{*}{\textit{Scapania nemorea}} & Liv-IRBN-MTPSL4 & (E,E)-FPP, (Z,E)-FPP, (Z,Z)-FPP, (E,E,E)-GGPP & \begin{tabular}[c]{@{}l@{}}α-isocomene, β-elemene, \\ (E)-β-caryophyllene, (E)-β-farnesene, \\ nerolidol, dactylol, (E)-β-farnesene, \\ (Z)-α-bisabolene, γ-curcumene, \\ zingiberene, multiple unidentified ST, \\ β-sesquiphellandrene, \\ unidentified sesquiterpene hydrocarbons, \\ unidentified diterpenes\end{tabular} &  \\ \cline{1-4}
\textit{Sphagnum lescurii} & Mos-GOWD-MTPSL2 & GPP & \begin{tabular}[c]{@{}l@{}}Myrcene, (Z)-β-ocimene, \\ (E)-β-ocimene, linalool, allo-ocimene\end{tabular} &  \\ \cline{1-4}
\textit{Pseudotaxiphyllum elegans} & Mos-QKQO-MTPSL3 & (E,E)-FPP, (Z,E)-FPP, (Z,Z)-FPP & \begin{tabular}[c]{@{}l@{}}γ-curcumen, α-zingiberene, \\ β-bisabolene, β-curcumene, \\ sesquiphellandrene, (E)-α-bisabolene, \\ (Z)-α-bisabolene, γ-curcumene, \\ zingiberene, β-sesquiphellandrene\end{tabular} &  \\ \cline{1-4}
\textit{Anomodon rostratus} & Mos-VBMM-MTPSL3 & (E,E)-FPP, (Z,E)-FPP, (Z,Z)-FPP, (E,E,E)-GGPP & \begin{tabular}[c]{@{}l@{}}(E)-β-farnesene, γ-curcumene, \\ α-zingiberen, β-bisabolene, \\ β-curcumene, (E)-α-bisabolene,  \\ (Z)-γ- bisabolene, (E)-γ-bisabolene, \\ β-bisabolol, α-bisabolol, β-bisabolene, \\ (Z)-γ-bisabolene, (Z)-α-bisabolene, \\ γ-curcumene, (E)-γ- bisabolene,\\ multiple unidentified diterpenes\end{tabular} &  \\ \cline{1-4}
\textit{Anthoceros punctatus} & Hon-ApMTPSL7 & GPP, (E,E)-FPP, (Z,E)-FPP, (Z,Z)-FPP &  &  \\ \cline{1-4}
\textit{Myriopteris eatonii} & Mon-GSXD-MTPSL3 & (E,E)-FPP, (Z,E)-FPP & \begin{tabular}[c]{@{}l@{}}(Z,E)-α-farnesene, (E,E)-α-farnesene, \\ (E)-β-farnesene, (E,E)-α-farnesene\end{tabular} &  \\ \cline{1-4}
\textit{Pityrogramma trifoliata} & Mon-UJTT-MTPSL4 & GPP, (E,E)-FPP, (Z,E)-FPP, (Z,Z)-FPP & \begin{tabular}[c]{@{}l@{}}Myrcene, (Z)-β-ocimene, \\ (E)-β-ocimene, linalool, \\ protoillud-6-ene, \\ multiple unidentified ST, \\ epi-bicyclosesquiphellandrene, \\ γ-cadinene, δ-cadinene, α-cadinene, \\ γ-curcumene\end{tabular} &  \\ \cline{1-4}
\textit{Woodsia scopulina} & Mon-YJJY-MTPSL1 & (E,E)-FPP, (Z,E)-FPP, (Z,Z)-FPP & \begin{tabular}[c]{@{}l@{}}Protoillud-6-ene, \\ multiple unidentified ST, \\ epi-bicyclosesquiphellandrene, \\ γ-cadinene, δ-cadinene, α-cadinene, \\ γ-curcumene\end{tabular} & \multirow{-9}{*}{Jia et. al (2016)} \\ \hline
\textit{Porphyridium purpureum} & PpMTPSL & (E,E)-FPP, (E,E,E)-GGPP & \begin{tabular}[c]{@{}l@{}}β-Elemene, aristol-9-ene, β-copaene, \\ germacrene A, \\ multiple unidentified ST, \\ unidentified oxygenated sesquiterpene\end{tabular} &  \\ \cline{1-4}
 & EaMTPSL1 & GPP, (E,E)-FPP & Linalol, nerolidol &  \\ \cline{2-4}
\multirow{-2}{*}{\textit{Erythrolobus australicus}} & EaMTPSL2 & (E,E)-FPP & \begin{tabular}[c]{@{}l@{}}β-Elemene, aristol-9-ene, β-copaene, \\ unidentified oxygenated sesquiterpene, \\ α-ylangene, α-muurolene, \\ multiple unidentified ST, \\ (Z)-α-bisabolene epoxide\end{tabular} & \multirow{-3}{*}{Wei 2019} \\ \hline
\end{longtable}

部分图片: 在此处输入图片描述

答案1

为了使您的表格适合文本宽度,我建议进行以下重新设计。在下面的 MWE 中,我注释掉了所有与表格不直接相关的包,我添加了booktabs水平线,makecell列标题和类型列的xltabular而不是。为了有效地利用类型列,我还删除了所有嵌套的表格和相关的表格。此外,我删除了大部分水平线和所有垂直线。为了节省空间并减少第一列和最后一列中浪费的空白量以及表格中间分页符的潜在问题,我将它们全部删除,并在表格中添加了类似节的标题,其中我结合了“物种”和“参考”信息。由于您使用,我建议您用适当的命令替换手动输入的引用信息(例如“Li et. al (2012)”)。longtableXX\\\multirowbiblatexbiblatex

在此处输入图片描述

\documentclass{article}
%\usepackage[backend=biber,style=authoryear,autocite=inline]{biblatex}
%\addbibresource{Bibliography.bib}
\usepackage[labelfont={bf, it}]{caption}
\captionsetup{font=footnotesize, textfont=it}
%\usepackage{graphicx}
%\usepackage{epstopdf}
%\usepackage{float}
%\usepackage[normalem]{ulem}
%\useunder{\uline}{\ul}{}
%\usepackage[T1]{fontenc} 
%\usepackage[table,xcdraw]{xcolor}
%\usepackage{multicol}
%\usepackage{adjustbox}
\usepackage{array}
%\usepackage{wrapfig}
\usepackage{multirow}
%\usepackage{tabu}
%\usepackage{rotating}
%\usepackage{amsmath}
%\usepackage[table,xcdraw]{xcolor}
\usepackage[a4paper, total={6in, 9in}]{geometry}
%\usepackage{fancyhdr}
%\pagestyle{fancy}
%\fancyhead[L]{\fontsize{10}{12}}
\linespread{1.5}
%\usepackage{times}
%\usepackage[none]{hyphenat}
%\sloppy

%\usepackage{textgreek}
\usepackage{xltabular}
\usepackage{makecell}
\renewcommand{\theadfont}{\normalsize}
\usepackage{booktabs}


\usepackage[hidelinks]{hyperref} %[hidelinks] fjerner det røde i table of contents
\begin{document}

\begin{xltabular}{\textwidth}{ll>{\raggedright\arraybackslash}X}
\caption{caption text here}\label{MTPSLLONG}\\
\toprule
 \thead{MTPSL} & \thead{Substrate(s)} & \thead{Product(s)}  \\ 
\midrule
\endfirsthead
\caption*{caption text here - continued}\\
\toprule
 \thead{MTPSL} & \thead{Substrate(s)} & \thead{Product(s)}  \\ 
\midrule
\endhead
\multicolumn{3}{@{}l}{\emph{Selaginella moellendorffii} Li et. al (2012)}\\
  SmMTPSL1 & (E,E)-FPP & (E)- nerolidol, α-copaene,  β-elemene, γ-cadinene, δ-cadinene,  unidentified oxygenated sesquiterpene   \\ 
  SmMTPSL13 & None & None   \\ 
  SmMTPSL17 & (E,E)-FPP & α-copaene, β-elemene,  γ-cadinene, δ-cadinene,  unidentified oxygenated sesquiterpene,  germacrene, bicyclogermacrene,  α-cadinene   \\ 
  SmMTPSL22 & (E,E)-FPP, GPP & (E)- nerolidol, limonene, linalool   \\ 
  SmMTPSL26 & (E,E)-FPP & unidentified sesquiterpene A,  unidentified sesquiterpene B,  2-epi-(E)-β-caryophyllene  \\ 
 SmMTPSL30 & None & None  \\ 
\midrule
\multicolumn{3}{@{}l}{\emph{Marchantia polymorpha} Kumar et. al (2016)}\\
  MpMTPSL1 & None & None   \\ 
  MpMTPSL2 & NPP & Not defined   \\ 
  MpMTPSL3 & (E,E)-FPP & Not defined   \\
  MpMTPSL4 & (E,E)-FPP & (2)-a-Gurjunene (3), 5-Hydroxy-a-Gurjunene, and others not define   \\ 
  MpMTPSL5 & (E,E)-FPP & Not defined   \\ 
  MpMTPSL6 & NPP & Not defined   \\ 
  MpMTPSL7 & (E,E)-FPP & Not defined   \\
  MpMTPSL8 & None & None   \\ 
\midrule
% & Liv-IRBN-MTPSL2 & GPP, (E,E)-FPP, (Z,E)-FPP & \begin{tabular}[c]{@{}l@{}}Myrcene, limonene, (Z)-β-ocimene, \\ (E)-β-ocimene, linalool, \\ bicycloelemene, bicyclogermacrene, \\ unidentified sesquiterpene hydrocarbons\end{tabular} &  \\ \cline{2-4}
%\multirow{-2}{*}{\textit{Scapania nemorea}} & Liv-IRBN-MTPSL4 & (E,E)-FPP, (Z,E)-FPP, (Z,Z)-FPP, (E,E,E)-GGPP & \begin{tabular}[c]{@{}l@{}}α-isocomene, β-elemene, \\ (E)-β-caryophyllene, (E)-β-farnesene, \\ nerolidol, dactylol, (E)-β-farnesene, \\ (Z)-α-bisabolene, γ-curcumene, \\ zingiberene, multiple unidentified ST, \\ β-sesquiphellandrene, \\ unidentified sesquiterpene hydrocarbons, \\ unidentified diterpenes\end{tabular} &  \\ \cline{1-4}
%\textit{Sphagnum lescurii} & Mos-GOWD-MTPSL2 & GPP & \begin{tabular}[c]{@{}l@{}}Myrcene, (Z)-β-ocimene, \\ (E)-β-ocimene, linalool, allo-ocimene\end{tabular} &  \\ \cline{1-4}
%\textit{Pseudotaxiphyllum elegans} & Mos-QKQO-MTPSL3 & (E,E)-FPP, (Z,E)-FPP, (Z,Z)-FPP & \begin{tabular}[c]{@{}l@{}}γ-curcumen, α-zingiberene, \\ β-bisabolene, β-curcumene, \\ sesquiphellandrene, (E)-α-bisabolene, \\ (Z)-α-bisabolene, γ-curcumene, \\ zingiberene, β-sesquiphellandrene\end{tabular} &  \\ \cline{1-4}
%\textit{Anomodon rostratus} & Mos-VBMM-MTPSL3 & (E,E)-FPP, (Z,E)-FPP, (Z,Z)-FPP, (E,E,E)-GGPP & \begin{tabular}[c]{@{}l@{}}(E)-β-farnesene, γ-curcumene, \\ α-zingiberen, β-bisabolene, \\ β-curcumene, (E)-α-bisabolene,  \\ (Z)-γ- bisabolene, (E)-γ-bisabolene, \\ β-bisabolol, α-bisabolol, β-bisabolene, \\ (Z)-γ-bisabolene, (Z)-α-bisabolene, \\ γ-curcumene, (E)-γ- bisabolene,\\ multiple unidentified diterpenes\end{tabular} &  \\ \cline{1-4}
%\textit{Anthoceros punctatus} & Hon-ApMTPSL7 & GPP, (E,E)-FPP, (Z,E)-FPP, (Z,Z)-FPP &  &  \\ \cline{1-4}
%\textit{Myriopteris eatonii} & Mon-GSXD-MTPSL3 & (E,E)-FPP, (Z,E)-FPP & \begin{tabular}[c]{@{}l@{}}(Z,E)-α-farnesene, (E,E)-α-farnesene, \\ (E)-β-farnesene, (E,E)-α-farnesene\end{tabular} &  \\ \cline{1-4}
%\textit{Pityrogramma trifoliata} & Mon-UJTT-MTPSL4 & GPP, (E,E)-FPP, (Z,E)-FPP, (Z,Z)-FPP & \begin{tabular}[c]{@{}l@{}}Myrcene, (Z)-β-ocimene, \\ (E)-β-ocimene, linalool, \\ protoillud-6-ene, \\ multiple unidentified ST, \\ epi-bicyclosesquiphellandrene, \\ γ-cadinene, δ-cadinene, α-cadinene, \\ γ-curcumene\end{tabular} &  \\ \cline{1-4}
%\textit{Woodsia scopulina} & Mon-YJJY-MTPSL1 & (E,E)-FPP, (Z,E)-FPP, (Z,Z)-FPP & \begin{tabular}[c]{@{}l@{}}Protoillud-6-ene, \\ multiple unidentified ST, \\ epi-bicyclosesquiphellandrene, \\ γ-cadinene, δ-cadinene, α-cadinene, \\ γ-curcumene\end{tabular} & \multirow{-9}{*}{Jia et. al (2016)} \\ \hline
%\textit{Porphyridium purpureum} & PpMTPSL & (E,E)-FPP, (E,E,E)-GGPP & \begin{tabular}[c]{@{}l@{}}β-Elemene, aristol-9-ene, β-copaene, \\ germacrene A, \\ multiple unidentified ST, \\ unidentified oxygenated sesquiterpene\end{tabular} &  \\ \cline{1-4}
% & EaMTPSL1 & GPP, (E,E)-FPP & Linalol, nerolidol &  \\ \cline{2-4}
%\multirow{-2}{*}{\textit{Erythrolobus australicus}} & EaMTPSL2 & (E,E)-FPP & \begin{tabular}[c]{@{}l@{}}β-Elemene, aristol-9-ene, β-copaene, \\ unidentified oxygenated sesquiterpene, \\ α-ylangene, α-muurolene, \\ multiple unidentified ST, \\ (Z)-α-bisabolene epoxide\end{tabular} & \multirow{-3}{*}{Wei 2019} \\ \hline
\end{xltabular}

\end{document}

相关内容