![带 2 列的横向表格](https://linux22.com/image/360399/%E5%B8%A6%202%20%E5%88%97%E7%9A%84%E6%A8%AA%E5%90%91%E8%A1%A8%E6%A0%BC.png)
我在整理一个相当简单的景观表时遇到了麻烦。我看过其他问题,但我不知道我做错了什么。
\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
inside sidewaystable
。
要获得具有环境的longtable
景观使用包。pdflscape
landscape
请参阅以下 MWE(我将您的代码简化为更简洁)
\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}
得到期望的结果: