1

I'm having trouble compiling a fairly simple landscape table together. I've gone through the other questions and I don't know what I'm doing wrong.

\documentclass[12pt,a4paper,oneside]{book}
\usepackage{lmodern}
\usepackage{titling}
\usepackage{setspace}\doublespacing
\usepackage{float}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath,amssymb,amsthm}
\usepackage{thmtools}
\usepackage{pdflscape}
\usepackage{longtable}
\usepackage{rotating}
\usepackage{afterpage}
\begin{document}
\begin{sidewaystable}[H]
\caption{Candidate Genes}
\begin{longtable}{lr} 
\hline
Candidate Gene & Gene function\\
\hline
XXXXXXXXXXX, XXXXX, XXXXX &  Clinical phenotype is heterogeneous, and mutation carrier undergo regression at disease onset, characterised by loss of acquired social and verbal milestones.\\
XXXXXXXXXXX, XXXXX, XXXXX & Contains multiple protein-protein interaction  \\ 
XXXXXXXXXXX, XXXXX, XXXXX & Functions as cell adhesion molecules and receptors\\ 
XXXXXXXXXXX, XXXXX, XXXXX  & A transcriptional repressor that binds to methylated CpG dinucleotides \\ 
XXXXXXXXXXX, XXXXX, XXXXX & Necessary for proper development of brainstem, cerebellum, inner ear  \\ 
XXXXXXXXXXX, XXXXX, XXXXX &  A tumour suppressor gene influencing G1 cell cycle arrest and apoptosis.  \\ 
XXXXXXXXXXX, XXXXX, XXXXX &  implicated in patterns formation during development\\ 
XXXXXXXXXXX, XXXXX, XXXXX & One part of 13 subunit ligand gated chloride channel\\ 
XXXXXXXXXXX, XXXXX, XXXXX&  Instrumental in cell adhesion as well as cell surface-mediated signalling.\\ 
XXXXXXXXXXX, XXXXX, XXXXX & Pleiotropic receptor with tyrosine kinase activity\\ 
XXXXXXXXXXX, XXXXX, XXXXX&  G-protein coupled receptor that binds to Oxytocin \\
XXXXXXXXXXX, XXXXX, XXXXX& Large secreted extracellular matrix protein\\
XXXXXXXXXXX, XXXXX, XXXXX&  Integral membrane protein\\
\hline
\end{longtable}
\end{sidewaystable}
 \end{document}
1
  • longtable should not be used inside sidewaystable. Use landscape instead. Aug 18, 2017 at 14:54

1 Answer 1

2

Well, you can not use longtable inside sidewaystable.

To get a longtable in landscape use package pdflscape, which has an environment landscape.

Please see the following MWE (I reduced your code to be more minimal)

\documentclass[12pt,a4paper,oneside]{book}
\usepackage{lmodern}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{pdflscape} % --> landscape environment
\usepackage{longtable}


\begin{document}

\begin{landscape}
\begin{longtable}{lp{11cm}} 
\caption{Candidate Genes}\\
\hline
Candidate Gene & Gene function\\
\hline
\endfirsthead
XXXXXXXXXXX, XXXXX, XXXXX &  Clinical phenotype is heterogeneous, and mutation carrier undergo regression at disease onset, characterised by loss of acquired social and verbal milestones.\\
XXXXXXXXXXX, XXXXX, XXXXX & Contains multiple protein-protein interaction  \\ 
XXXXXXXXXXX, XXXXX, XXXXX & Functions as cell adhesion molecules and receptors\\ 
XXXXXXXXXXX, XXXXX, XXXXX  & A transcriptional repressor that binds to methylated CpG dinucleotides \\ 
XXXXXXXXXXX, XXXXX, XXXXX & Necessary for proper development of brainstem, cerebellum, inner ear  \\ 
XXXXXXXXXXX, XXXXX, XXXXX &  A tumour suppressor gene influencing G1 cell cycle arrest and apoptosis.  \\ 
XXXXXXXXXXX, XXXXX, XXXXX &  implicated in patterns formation during development\\ 
XXXXXXXXXXX, XXXXX, XXXXX & One part of 13 subunit ligand gated chloride channel\\ 
XXXXXXXXXXX, XXXXX, XXXXX&  Instrumental in cell adhesion as well as cell surface-mediated signalling.\\ 
XXXXXXXXXXX, XXXXX, XXXXX & Pleiotropic receptor with tyrosine kinase activity\\ 
XXXXXXXXXXX, XXXXX, XXXXX&  G-protein coupled receptor that binds to Oxytocin \\
XXXXXXXXXXX, XXXXX, XXXXX& Large secreted extracellular matrix protein\\
XXXXXXXXXXX, XXXXX, XXXXX&  Integral membrane protein\\
\hline
\end{longtable}
\end{landscape}
 \end{document}

with the wished result:

resulting table

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .