1

The following LaTeX code generates a table:

\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 contig 8}
\endfoot
\Xhline{0.8pt}
\endlastfoot

    \hline 
    ORF8
    & +1
        & 15232
            & 16674
                & 1443
                    & \thead{bifunctional ADP-dependent\\NAD(P)H-hydrate\\ dehydratase/NAD(P)H-hydrate\\epimerase }
                        & \thead{PIT77859.1}
                            & \thead{\textit{Limnohabitans sp.} \\ \textit{B9-3}}
                                & \thead{(2e-146),\\(52),\\(97),\\(98)} \\
    \hline 
    ORF10
    & +1
        & 19024 
            & 19416
                & 393
                    & \thead{Uncharacterised protein}
                        & \thead{CFN68428.1}
                            & \thead{\textit{Bordetella} \\ \textit{pertussis}}
                                & \thead{(2e-20),\\(57),\\(96),\\(55)} \\
    \hline 
    ORF16
    & +2
        & 13373 
            & 13717
                & 345
                    & \thead{Uncharacterised protein}
                        & \thead{CFO12503.1}
                            & \thead{\textit{Bordetella} \\ \textit{pertussis}}
                                & \thead{(5e-18),\\(65),\\(54),\\(86)} \\                            
    \hline 
    ORF17
    & +2
        & 13988 
            & 15235
                & 1248
                    & \thead{FAD-dependent\\oxidoreductase}
                        & \thead{WP\_062471622.1}
                            & \thead{\textit{Variovorax} \\ \textit{boronicumulans}}
                                & \thead{(0.0),\\(65),\\(97),\\(98)} \\
    \hline 
    ORF26
    & -1
        & 19706 
            & 17448
                & 2259
                    & \thead{ribonuclease R}
                        & \thead{WP\_108301238.1}
                            & \thead{\textit{Limnohabitans sp.} \\ \textit{JirII-29}}
                                & \thead{(0.0),\\(82),\\(98),\\(100)} \\                            
    \hline 
    ORF29
    & -1
        & 12968 
            & 12075
                & 894
                    & \thead{elongation factor Ts}
                        & \thead{WP\_104797623.1}
                            & \thead{\textit{Limnohabitans sp. } \\ \textit{TS-CS-82}}
                                & \thead{(0.0),\\(87),\\(94),\\(95)} \\                            
    \hline 
    ORF33
    & -1 
        & 4901
            & 4395
                & 507
                    & \thead{OmpH family\\outer membrane\\protein}
                        & \thead{WP\_066695178.1}
                            & \thead{\textit{Comamonadaceae} \\ \textit{bacterium}\\\textit{CCH4-C5}}
                                & \thead{(7e-94),\\(76),\\(100),\\(100)} \\                            
    \hline 
    ORF34
    & -1
        & 3404 
            & 2961
                & 444 
                    & \thead{3-hydroxyacyl-\\(acyl-carrier-protein) \\dehydratase FabZ}
                        & \thead{WP\_056277791.1}
                            & \thead{\textit{Hydrogenophaga sp.} \\ \textit{Root209}}
                                & \thead{(8e-95),\\(86),\\(98),\\(99)} \\                            
    \hline 
    ORF35
    & -1
        & 1001
            & 363
                & 639
                    & \thead{ribonuclease HII}
                        & \thead{WP\_108360097.1}
                            & \thead{\textit{Limnohabitans sp.} \\ \textit{Rim8}}
                                & \thead{(7e-128),\\(83),\\(96),\\()} \\                            
    \hline 
    ORF37
    & -2
        & 17431
            & 16679
                & 753
                    & \thead{SDR family\\oxidoreductase}
                        & \thead{WP\_076201382.1}
                            & \thead{\textit{Rhodoferax} \\ \textit{koreense}}
                                & \thead{(1e-148),\\(80),\\(99),\\(99)} \\                            
    \hline 
    ORF39
    & -2
        & 10660
            & 9827
                & 834
                    & \thead{phosphatidate\\cytidylyltransferase}
                        & \thead{OJW85673.1}
                            & \thead{\textit{Alicycliphilus sp.} \\ \textit{69-12}}
                                & \thead{(4e-120),\\(66),\\(99),\\(99)} \\
    \hline 
    ORF40
    & -2
        & 7198
            & 4901
                & 2298
                    & \thead{outer membrane\\protein assembly\\factor BamA}
                        & \thead{WP\_027478712.1}
                            & \thead{\textit{Curvibacter} \\ \textit{gracilis}}
                                & \thead{(0.0),\\(71),\\(100),\\(100)} \\                            
    \hline 
    ORF41
    & -2
        & 2950 
            & 2156
                & 795
                    & \thead{acyl-ACP--\\UDP-N-acetylglucosamine\\ O-acyltransferase}
                        & \thead{WP\_066705960.1}
                            & \thead{\textit{Curvibacter} \\ \textit{delicatus}}
                                & \thead{(1e-171),\\(83),\\(100),\\(100)} \\                            
    \hline 
    ORF42
    & -3
        & 20910 
            & 19870
                & 1041
                    & \thead{ribosomal protein\\S12 methylthiotransferase}
                        & \thead{OYY19752.1}
                            & \thead{\textit{Burkholderiales} \\ \textit{bacterium}\\\textit{35-55-47}}
                                & \thead{(0.0),\\(91),\\(100),\\(75)} \\                            
    \hline 
    ORF45
    & -3
        & 13827
            & 13075
                & 753
                    & \thead{30S ribosomal\\protein S2}
                        & \thead{OYU32113.1}
                            & \thead{\textit{Comamonadaceae} \\ \textit{bacterium}\\\textit{PBBC2}}
                                & \thead{(1e-175),\\(91),\\(99),\\(100)} \\                           
    \hline 
    ORF46
    & -3
        & 11988
            & 11266
                & 723
                    & \thead{UMP kinase}
                        & \thead{WP\_077562881.1}
                            & \thead{\textit{Polaromonas sp.} \\ \textit{C04}}
                                & \thead{(2e-167),\\(95),\\(99),\\(100)} \\                            
    \hline 
    ORF47
    & -3
        & 11235 
            & 10675
                & 561
                    & \thead{ribosome recycling\\factor}
                        & \thead{WP\_019573212.1}
                            & \thead{MULTISPECIES: \\ \textit{Curvibacter}}
                                & \thead{(2e-118),\\(85),\\(100),\\(100)} \\                            
    \hline 
    ORF48
    & -3
        & 9825
            & 8635
                & 1191
                    & \thead{1-deoxy-D-xylulose-5-phosphate\\ reductoisomerase}
                        & \thead{PUE32828.1}
                            & \thead{\textit{Limnohabitans sp.} \\ \textit{Jir61}}
                                & \thead{(0.0),\\(81),\\(98),\\(97)} \\                            
    \hline 
    ORF49
    & -3
        & 8622
            & 7231
                & 1392
                    & \thead{RIP metalloprotease\\RseP}
                        & \thead{WP\_108360101.1}
                            & \thead{\textit{Limnohabitans sp. } \\ \textit{Rim8}}
                                & \thead{(5e-162),\\(54),\\(98),\\(99)} \\                            
    \hline 
    ORF50
    & -3
        & 2136
            & 973
                & 1164
                    & \thead{lipid-A-disaccharide\\synthase}
                        & \thead{WP\_100146888.1}
                            & \thead{MULTISPECIES: \\ \textit{Limnohabitans}}
                                & \thead{(0.0),\\(74),\\(96),\\(99)} \\                            
    \hline 
    ORF51
    & -3
        & 366
            & 1
                & 366
                    & \thead{RNA methyltransferase}
                        & \thead{WP\_056743611.1}
                            & \thead{\textit{Acidovorax sp.} \\ \textit{Root568}}
                                & \thead{(3e-49 ),\\(64),\\(96),\\()} \\                            
\end{longtable}
\caption{\textit{\Large{Contig 8}}}
\end{landscape}

\end{document} 

But, as you can see, the caption "Contig 8" only appears at the final table. I thought that the code line \multicolumn{9}{r@{}}{\scriptsize \itshape contig 8} would act, esthetically, like the \caption{} function. Is there a simple way that I can make the caption "Contig 8" appear in every single table? Just like the last one?

  • 2
    \caption shoudl be in the table foot so at the start of the longtable before \endfoot unrelated but don't use \centering with longtable (it does nothing) – David Carlisle Oct 3 '18 at 20:00
1

\caption should be in the table foot so at the start of the longtable before \endfoot .

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.