大桌子和适合问题

大桌子和适合问题

以下 LaTeX 代码生成一个表格,但它太大了(它“捕获”了页码)。我试过使用\tabcolsep,但我无法让它足够好:

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[document]{ragged2e}
\usepackage{float}
\usepackage[portuguese]{babel}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{adjustbox}
\usepackage{geometry}
\usepackage{makecell}
\usepackage{changepage}
\begin{document}
\begin{table}[h]
\centering\setlength{\tabcolsep}{3pt}
\begin{adjustwidth}{-3.0cm}{}
\begin{tabular}{|c|c|c|c|c|c|c|c|c|}
\hline
\thead{ID da ORF}
    &   \thead{Quadro}
        &   \thead{Incício}
            &    \thead{Fim}
                &   \thead{Comprimento \\ (bp)}
                    &   \thead{Função \\ inferida}
                        &   \thead{Nº de \\ acesso da\\ sequência \\ de proteína\\ usada na \\ inferência}
                            &   \thead{Organismo \\ ao qual\\ pertence essa\\ proteína}
                                &   \thead{(e-value \\ do BLASTp),\\(\% de \\ identidade),\\(\% query cover),\\(\% subject \\ cover)} \\
    \hline
    ORF1
    &  +1
        & 1855 
            &  3105
                &  1251
                    &  \thead{phosphate \\regulon sensor\\histidine kinase}
                        &  \thead{OGA48658.1}
                            &  \thead{\textit{Betaproteobacteria} \\ \textit{bacterium}}
                                & \thead{(5e-118),\\(45),\\(94),\\(41)}  \\
    \hline
    ORF2
    &  +1
        & 9841 
            &  10845
                &  1005
                    &  \thead{alpha- \\mannosyltransferase\\histidine kinase}
                        &  \thead{OYZ29254.1}
                            &  \thead{\textit{Hydrogenophilales} \\ \textit{bacterium}\\\textit{16-64-40}}
                                & \thead{(0.0),\\(45),\\(98),\\(71)}  \\
    \hline
    ORF3
    &  +1
        & 11851 
            &  12657
                &  807
                    &  \thead{N-acetyltransferase}
                        &  \thead{WP\_009522425.1}
                            &  \thead{\textit{Ralstonia sp.} \\ \textit{PBA}}
                                & \thead{(2e-141),\\(77),\\(88),\\(66)}  \\
    \hline
    ORF4
    &  +2
        & 5
            &  319
                &  315
                    &  \thead{DUF-190\\domain-containing}
                        &  \thead{WP\_071543747.1}
                            &  \thead{\textit{Pseudodesulfovibrio } \\ \textit{hydrargyri}}
                                & \thead{(6e-36),\\(77),\\(98),\\(45)}  \\
    \hline
    ORF5
    &  +2
        & 1136
            &  1828
                &  693
                    &  \thead{phosphate\\regulon\\transcriptional\\regulatory protein}
                        &  \thead{WP\_012695656.1}
                            &  \thead{\textit{Laribacter  } \\ \textit{hongkongensis}}
                                & \thead{(6e-124),\\(71),\\(99),\\(71)}  \\
    \hline
    ORF6
    &  +2
        & 9392
            &  9823
                &  432
                    &  \thead{UDP-2,3-\\diacylglucosamine\\hydrolase}
                        &  \thead{OYZ57328.1}
                            &  \thead{\textit{Hydrogenophilales } \\ \textit{bacterium } \\\textit{16-61-112}}
                                & \thead{(8e-71),\\(74),\\(86),\\(30)}  \\
    \hline
    ORF7
    &  +2
        & 11264
            &  11758
                &  495
                    &  \thead{histidine\\phosphatase}
                        &  \thead{WP\_047216555.1}
                            &  \thead{\textit{Pandoraea  } \\ \textit{thiooxydans } \\\textit{16-61-112}}
                                & \thead{(3e-47),\\(98),\\(48),\\(49)}  \\
    \hline
    ORF8
    &  +2
        & 14042
            &  14671
                &  630
                    &  \thead{membrane\\protein}
                        &  \thead{WP\_047216555.1}
                            &  \thead{\textit{Nitrobacter   } \\ \textit{winogradskyi}}
                                & \thead{(6e-102),\\(93),\\(66),\\(62)}  \\
    \hline
    ORF9
    &  +2
        & 14042
            &  14671
                &  630
                    &  \thead{phosphatidylserine\\decarboxylase}
                        &  \thead{WP\_059425117.1}
                            &  \thead{\textit{Sulfuricella sp.} \\ \textit{T08}}
                                & \thead{(2e-133),\\(61),\\(98),\\(62)}  \\
    \hline
    ORF10
    &  +2
        & 14042
            &  14671
                &  630
                    &  \thead{phosphatidylserine\\decarboxylase}
                        &  \thead{WP\_059425117.1}
                            &  \thead{\textit{Sulfuricella sp.} \\ \textit{T08}}
                                & \thead{(2e-133),\\(61),\\(98),\\(62)}  \\
\hline
\end{tabular}
\end{adjustwidth}
\end{table}
\end{document}

此外,我还需要添加更多行。我真的不知道如何在 LaTeX 上制作“大表格”,同时又要美观。你们能帮帮我吗?

答案1

有一种可能性是:在横向模式下,脚注大小的长表分布在各个页面上:

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{geometry}
\usepackage{lscape}
\usepackage[document]{ragged2e}
\usepackage{float, longtable}
\usepackage[portuguese]{babel}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{adjustbox}
\usepackage{rotating}
\usepackage{makecell}
\usepackage{changepage}

\begin{document}

\begin{landscape}%{-3.0cm}{}
\centering\footnotesize\setlength{\tabcolsep}{2pt}
\begin{longtable}{!{\vrule width 0.8pt}*{8}{c|}c!{\vrule width 0.8pt}}
\Xhline{0.8pt}
\thead{ID da \\ ORF}
    & \thead{Quadro}
        & \thead{Incício}
            & \thead{Fim}
                & \thead{Comprimento \\ (bp)}
                    & \thead{Função inferida}
                        & \thead{Nº de acesso da\\ sequência de proteína\\ usada na inferência}
                            & \thead{Organismo ao qual\\ pertence essa proteína}
                                & \thead{(e-value do BLASTp),\\(\% de identidade),\\(\% query cover),\\(\% subject cover)} \\
    \Xhline{0.8pt}
\endhead
\multicolumn{9}{r@{}}{\scriptsize \itshape to be continued}
\endfoot
\Xhline{0.8pt}
\endlastfoot
    ORF1
    & +1
        & 1855
            & 3105
                & 1251
                    & \thead{phosphate \\regulon sensor\\histidine kinase}
                        & \thead{OGA48658.1}
                            & \thead{\textit{Betaproteobacteria} \\ \textit{bacterium}}
                                & \thead{(5e-118),\\(45),\\(94),\\(41)} \\
    \hline
    ORF2
    & +1
        & 9841
            & 10845
                & 1005
                    & \thead{alpha- \\mannosyltransferase\\histidine kinase}
                        & \thead{OYZ29254.1}
                            & \thead{\textit{Hydrogenophilales} \\ \textit{bacterium}\\\textit{16-64-40}}
                                & \thead{(0.0),\\(45),\\(98),\\(71)} \\
    \hline
    ORF3
    & +1
        & 11851
            & 12657
                & 807
                    & \thead{N-acetyltransferase}
                        & \thead{WP\_009522425.1}
                            & \thead{\textit{Ralstonia sp.} \\ \textit{PBA}}
                                & \thead{(2e-141),\\(77),\\(88),\\(66)} \\
    \hline
    ORF4
    & +2
        & 5
            & 319
                & 315
                    & \thead{DUF-190\\domain-containing}
                        & \thead{WP\_071543747.1}
                            & \thead{\textit{Pseudodesulfovibrio } \\ \textit{hydrargyri}}
                                & \thead{(6e-36),\\(77),\\(98),\\(45)} \\
    \hline
    ORF5
    & +2
        & 1136
            & 1828
                & 693
                    & \thead{phosphate\\regulon\\transcriptional\\regulatory protein}
                        & \thead{WP\_012695656.1}
                            & \thead{\textit{Laribacter } \\ \textit{hongkongensis}}
                                & \thead{(6e-124),\\(71),\\(99),\\(71)} \\
    \hline
    ORF6
    & +2
        & 9392
            & 9823
                & 432
                    & \thead{UDP-2,3-\\diacylglucosamine\\hydrolase}
                        & \thead{OYZ57328.1}
                            & \thead{\textit{Hydrogenophilales } \\ \textit{bacterium } \\\textit{16-61-112}}
                                & \thead{(8e-71),\\(74),\\(86),\\(30)} \\
    \hline
    ORF7
    & +2
        & 11264
            & 11758
                & 495
                    & \thead{histidine\\phosphatase}
                        & \thead{WP\_047216555.1}
                            & \thead{\textit{Pandoraea } \\ \textit{thiooxydans } \\\textit{16-61-112}}
                                & \thead{(3e-47),\\(98),\\(48),\\(49)} \\
    \hline
    ORF8
    & +2
        & 14042
            & 14671
                & 630
                    & \thead{membrane\\protein}
                        & \thead{WP\_047216555.1}
                            & \thead{\textit{Nitrobacter } \\ \textit{winogradskyi}}
                                & \thead{(6e-102),\\(93),\\(66),\\(62)} \\
    \hline
    ORF9
    & +2
        & 14042
            & 14671
                & 630
                    & \thead{phosphatidylserine\\decarboxylase}
                        & \thead{WP\_059425117.1}
                            & \thead{\textit{Sulfuricella sp.} \\ \textit{T08}}
                                & \thead{(2e-133),\\(61),\\(98),\\(62)} \\
    \hline
    ORF10
    & +2
        & 14042
            & 14671
                & 630
                    & \thead{phosphatidylserine\\decarboxylase}
                        & \thead{WP\_059425117.1}
                            & \thead{\textit{Sulfuricella sp.} \\ \textit{T08}}
                                & \thead{(2e-133),\\(61),\\(98),\\(62)}
\end{longtable}
\end{landscape}

\end{document} 

在此处输入图片描述 在此处输入图片描述

答案2

看看下面的例子是否可以接受:

\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[document]{ragged2e}
\usepackage{float}
\usepackage[portuguese]{babel}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{adjustbox}
\usepackage{geometry}
\usepackage{makecell}
\usepackage[strict]{changepage}
\usepackage{rotating}

%---------------- show page layout. don't use in a real document!
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
\begin{table}[htb]
\centering
\setlength{\tabcolsep}{0pt}
\footnotesize
\begin{adjustwidth*}{}{-\dimexpr\marginparsep+\marginparwidth\relax}
\begin{tabular*}{\linewidth}{ @{\extracolsep{\fill}}|c|c|c|c|c|c|c|c|c|}
\hline
\thead[b]{ID da\\ ORF}
    &   \thead[b]{Qua-\\ dro}
        &   \thead[b]{Incício}
            &    \thead[b]{Fim}
                &   \thead[b]{Compri-\\ mento \\ (bp)}
                    &   \thead[b]{Função \\ inferida}
                        &   \thead[b]{Nº de \\ acesso da\\ sequência \\ de proteína\\ usada na \\ inferência}
                            &   \thead[b]{Organismo \\ ao qual\\ pertence essa\\ proteína}
                                &   \thead[b]{(e-value \\ do BLASTp),\\(\% de \\ identidade),\\(\% query cover),\\(\% subject cover)} \\
    \hline
    ORF1
    &  +1
        & 1855
            &  3105
                &  1251
                    &  \thead{phosphate regulon\\ sensor histidine kinase}
                        &  \thead{OGA48658.1}
                            &  \thead{\itshape Betaproteobacteria\\ bacterium}
                                & \thead{(5e-118), (45),\\(94), (41)}  \\
    \hline
    ORF2
    &  +1
        & 9841
            &  10845
                &  1005
                    &  \thead{alpha- \\mannosyltransferase\\ histidine kinase}
                        &  \thead{OYZ29254.1}
                            &  \thead{\itshape Hydrogenophilales\\ bacterium\\ 16-64-40}
                                & \thead{(0.0), (45),\\ (98), (71)}  \\
    \hline
    ORF3
    &  +1
        & 11851
            &  12657
                &  807
                    &  \thead{N-acetyltransferase}
                        &  \thead{WP\_009522425.1}
                            &  \thead{\itshape Ralstonia sp.\\ PBA}
                                & \thead{(2e-141), (77),\\ (88), (66)}  \\
    \hline
    ORF4
    &  +2
        & 5
            &  319
                &  315
                    &  \thead{DUF-190\\domain-containing}
                        &  \thead{WP\_071543747.1}
                            &  \thead{\itshape Pseudodesulfovibrio \\ hydrargyri}
                                & \thead{(6e-36), (77),\\ (98), (45)}  \\
    \hline
    ORF5
    &  +2
        & 1136
            &  1828
                &  693
                    &  \thead{phosphate regulon\\transcriptional\\ regulatory protein}
                        &  \thead{WP\_012695656.1}
                            &  \thead{\itshape Laribacter\\ hongkongensis}
                                & \thead{(6e-124), (71),\\ (99), (71)}  \\
    \hline
    ORF6
    &  +2
        & 9392
            &  9823
                &  432
                    &  \thead{UDP-2,3-\\diacylglucosamine\\hydrolase}
                        &  \thead{OYZ57328.1}
                            &  \thead{\itshape Hydrogenophilale\\ bacterium\\ 16-61-112}
                                & \thead{(8e-71), (74),\\ (86), (30)}  \\
    \hline
    ORF7
    &  +2
        & 11264
            &  11758
                &  495
                    &  \thead{histidine\\phosphatase}
                        &  \thead{WP\_047216555.1}
                            &  \thead{\itshape Pandoraea \\ thiooxydans\\ 16-61-112}
                                & \thead{(3e-47), (98),\\ (48), (49)}  \\
    \hline
    ORF8
    &  +2
        & 14042
            &  14671
                &  630
                    &  \thead{membrane\\protein}
                        &  \thead{WP\_047216555.1}
                            &  \thead{\itshape Nitrobacter\\ winogradskyi}
                                & \thead{(6e-102), (93),\\ (66), (62)}  \\
    \hline
    ORF9
    &  +2
        & 14042
            &  14671
                &  630
                    &  \thead{phosphatidylserine\\decarboxylase}
                        &  \thead{WP\_059425117.1}
                            &  \thead{\itshape Sulfuricella sp.\\ T08}
                                & \thead{(2e-133), (61),\\ (98), (62)}  \\
    \hline
    ORF10
    &  +2
        & 14042
            &  14671
                &  630
                    &  \thead{phosphatidylserine\\decarboxylase}
                        &  \thead{WP\_059425117.1}
                            &  \thead{\itshape Sulfuricella sp.\\ T08}
                                & \thead{(2e-133), (61),\\(98), (62)}  \\
\hline
\end{tabular*}
\end{adjustwidth*}
\end{table}

or better

\begin{sidewaystable}
\centering
\setlength{\tabcolsep}{1pt}
\renewcommand\theadfont{\small}
\begin{tabular*}{\linewidth}{ @{\extracolsep{\fill}}|c|c|c|c|c|c|c|c|c|}
\hline
\thead[b]{ID da\\ ORF}
    &   \thead[b]{Quad-\\ ro}
        &   \thead[b]{Incício}
            &    \thead[b]{Fim}
                &   \thead[b]{Compri-\\mento (bp)}
                    &   \thead[b]{Função \\ inferida}
                        &   \thead[b]{Nº de acesso da\\
                            sequência de\\
                            proteína usada\\
                            na inferência}
                            &   \thead[b]{Organismo ao qual\\ pertence essa\\ proteína}
                                &   \thead[b]{(e-value  do BLASTp),\\
                                    (\% de identidade),\\
                                    (\% query cover), \\(\% subject cover)} \\
    \hline
    ORF1
    &  +1
        & 1855
            &  3105
                &  1251
                    &  \thead{phosphate regulon\\ sensor histidine kinase}
                        &  \thead{OGA48658.1}
                            &  \thead{\itshape Betaproteobacteria\\ bacterium}
                                & \thead{(5e-118), (45),\\(94), (41)}  \\
    \hline
    ORF2
    &  +1
        & 9841
            &  10845
                &  1005
                    &  \thead{alpha- \\mannosyltransferase\\ histidine kinase}
                        &  \thead{OYZ29254.1}
                            &  \thead{\itshape Hydrogenophilales\\ bacterium\\ 16-64-40}
                                & \thead{(0.0), (45),\\ (98), (71)}  \\
    \hline
    ORF3
    &  +1
        & 11851
            &  12657
                &  807
                    &  \thead{N-acetyltransferase}
                        &  \thead{WP\_009522425.1}
                            &  \thead{\itshape Ralstonia sp.\\ PBA}
                                & \thead{(2e-141), (77),\\ (88), (66)}  \\
    \hline
    ORF4
    &  +2
        & 5
            &  319
                &  315
                    &  \thead{DUF-190\\domain-containing}
                        &  \thead{WP\_071543747.1}
                            &  \thead{\itshape Pseudodesulfovibrio \\ hydrargyri}
                                & \thead{(6e-36), (77),\\ (98), (45)}  \\
    \hline
    ORF5
    &  +2
        & 1136
            &  1828
                &  693
                    &  \thead{phosphate regulon\\transcriptional\\ regulatory protein}
                        &  \thead{WP\_012695656.1}
                            &  \thead{\itshape Laribacter\\ hongkongensis}
                                & \thead{(6e-124), (71),\\ (99), (71)}  \\
    \hline
    ORF6
    &  +2
        & 9392
            &  9823
                &  432
                    &  \thead{UDP-2,3-\\diacylglucosamine\\hydrolase}
                        &  \thead{OYZ57328.1}
                            &  \thead{\itshape Hydrogenophilale\\ bacterium\\ 16-61-112}
                                & \thead{(8e-71), (74),\\ (86), (30)}  \\
    \hline
    ORF7
    &  +2
        & 11264
            &  11758
                &  495
                    &  \thead{histidine\\phosphatase}
                        &  \thead{WP\_047216555.1}
                            &  \thead{\itshape Pandoraea \\ thiooxydans\\ 16-61-112}
                                & \thead{(3e-47), (98),\\ (48), (49)}  \\
    \hline
    ORF8
    &  +2
        & 14042
            &  14671
                &  630
                    &  \thead{membrane\\protein}
                        &  \thead{WP\_047216555.1}
                            &  \thead{\itshape Nitrobacter\\ winogradskyi}
                                & \thead{(6e-102), (93),\\ (66), (62)}  \\
    \hline
    ORF9
    &  +2
        & 14042
            &  14671
                &  630
                    &  \thead{phosphatidylserine\\decarboxylase}
                        &  \thead{WP\_059425117.1}
                            &  \thead{\itshape Sulfuricella sp.\\ T08}
                                & \thead{(2e-133), (61),\\ (98), (62)}  \\
    \hline
    ORF10
    &  +2
        & 14042
            &  14671
                &  630
                    &  \thead{phosphatidylserine\\decarboxylase}
                        &  \thead{WP\_059425117.1}
                            &  \thead{\itshape Sulfuricella sp.\\ T08}
                                & \thead{(2e-133), (61),\\(98), (62)}  \\
\hline
\end{tabular*}
\end{sidewaystable}

\end{document}

在此处输入图片描述

在此处输入图片描述

相关内容