2

The following LaTeX code generates a table, but it's too big (it "catches" the number of the page). I've tried using \tabcolsep , but I just can't make it adequate:

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

Besides, I still need to put more lines to it. I really don't know how to make a "big table" on LaTeX, and, esthetically good at the same time. Could you guys help me?

4

Here is a possibility: a longtable in footnote size spreading over pages in landscape mode:

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

enter image description here enter image description here

  • Off topic: The parenthesis in last column are useful only to reduce the readability. – Fran Oct 1 '18 at 9:05
  • @Fran: I agree, but that's the way it was set in the O.P.. Personally, I would have used an itemize environment with endashes. – Bernard Oct 1 '18 at 9:23
4

see if any of the following example are acceptable to you:

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

enter image description here

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.