我正在写论文。附录包含 2 个跨多页的大表格。这些表格在横向模式下比页面高度宽。使用时\begin{adjustbox}{width = 1\textheight}
会产生多个错误:
Missing \endgroup inserted
...Missing } inserted
Package graphixs Error: Division by 0
Argument of \LT@max has an extra }
Paragraph ended before \LT@max
除此之外。如果注释掉\begin{adjustbox}
/ ,文档可以正常编译\end{adjustbox}
。.csv 文件位于我的论文的 Github 仓库.所用代码:
\documentclass[12pt]{book}
\begin{document}
[...]
\begin{landscape}
\begin{center}
\begin{adjustbox}{width=1\textheight}
\pgfplotstabletypeset[
string type,
col sep=comma,
outfile=prueba.tex,
begin table=\begin{longtable},
end table=\end{longtable},
every head row/.append style={after row={
\hline
\endfirsthead
\multicolumn{13}{c}{{\bfseries -- continua de la pagina anterior}}\\\hline
Accesion& Fecha& Pais& Departamento& Provincia& Distrito& Localidad& Altitud (m)& Latitud& Longitud& Fuente& Status& Mat. Viv. Col.\\\hline
\endhead},
before row={\hline}}
]{apendice/pasaporte.csv}
\end{adjustbox}
\end{center}
\end{landscape}
[...]
\end{document}
加载的软件包有:
\usepackage{subcaption}
\usepackage[dvipsnames]{xcolor}
\definecolor{norte}{HTML}{1B9E77}
\definecolor{centro}{HTML}{E7298A}
\definecolor{sur}{HTML}{666666}
\usepackage[round, comma, numbers]{natbib}
\usepackage{url}
\usepackage[english, spanish, es-tabla]{babel}
\usepackage[utf8]{inputenc}
\usepackage{fancyhdr}
\usepackage{titlesec}
\usepackage{graphicx}
\graphicspath{{imagenes/}}
\DeclareGraphicsExtensions{.jpg, .jpeg}
\usepackage{titling}
\pagestyle{plain}
\usepackage{pgf}
\usepackage{pgfplotstable}
\pgfplotsset{compat=1.13}
\usepackage{booktabs}
\usepackage{array}
\usepackage{rotating}
\usepackage{siunitx}
\sisetup{
input-symbols = {()},
group-digits = false,
explicit-sign
}
\usepackage{xfrac}
\usepackage[version=4]{mhchem}
\usepackage{adjustbox}
\usepackage{afterpage,lscape}
\usepackage{geometry}
\usepackage{pifont}
\usepackage{caption}
\usepackage{float}
\usepackage{longtable}
\usepackage[section]{placeins}
数据:
\begin {longtable}{ccccccccccccccc}%
\hline Accesion&KAAT007&QCA14&QGAA001&QGA17&KGA16&QAAT071&QAAT084&QAAT081&KGA20&KCAA011&QAAT050&QGA028&QAAT012&Provincia\\\hline \endfirsthead \multicolumn {15}{c}{{\bfseries -- continua de la pagina anterior}}\\\hline Accesión& KAAT007& QCA14& QGAA001& QGA17& KGA16& QAAT071& QAAT084& QAAT081& KGA20& KCAA011& QAAT050& QGA028& QAAT012& Provincia\\\hline \endhead %
1&NA&NA&NA&NA&NA&NA&NA&NA&NA&NA&NA&NA&NA&SUCRE\\%
2&225/225&205/205&NA&198/202&198/198&NA&176/176&206/206&214/224&NA&250/250&194/194&204/204&SUCRE\\%
3&225/291&NA&NA&198/198&198/198&164/164&170/170&206/206&212/220&235/235&247/247&222/222&204/204&SUCRE\\%
5&315/315&203/207&NA&NA&NA&NA&170/170&206/206&NA&NA&NA&220/220&198/198&SUCRE\\%
6&255/255&203/207&143/206&NA&200/200&179/179&170/170&206/206&190/196&NA&223/223&220/220&198/198&SUCRE\\%
7&261/276&205/207&200/206&194/200&194/194&179/179&176/176&206/209&206/214&247/247&217/220&196/196&222/222&SUCRE\\%
8&NA&NA&206/236&194/202&200/200&NA&164/164&206/206&NA&NA&NA&202/214&189/231&SUCRE\\%
9&294/294&NA&NA&NA&196/198&179/179&167/167&206/206&206/214&NA&217/241&198/198&201/201&SUCRE\\%
10&342/342&207/207&245/266&196/196&NA&NA&173/173&206/206&190/196&NA&223/223&224/224&198/198&HUAMANGA\\%
13&225/225&205/209&NA&NA&196/200&164/164&179/194&206/209&214/222&235/235&247/247&224/224&207/207&HUAMANGA\\%
14&222/222&NA&NA&196/200&196/196&164/164&179/179&209/209&216/224&235/235&247/247&224/224&207/207&HUAMANGA\\%
15&NA&205/207&NA&180/196&200/200&173/173&173/173&206/206&190/194&241/241&220/220&224/224&225/225&HUAMANGA\\%
16&228/228&207/211&209/209&182/200&200/200&164/164&164/164&206/206&214/222&235/235&247/247&224/224&207/207&HUANCASANCOS\\%
\end {longtable}%
答案1
如果您发布完整的文档(如下所示),显示问题而不是不连贯的片段,人们会更容易提供帮助,但无论如何,如果您减小字体大小并窃取一点底部边距,它就会适合页面。
\documentclass[12pt]{book} \usepackage{lscape,longtable} \begin{document}
\begin{landscape}
\scriptsize
\setlength\tabcolsep{2pt}
\setlength\LTleft{-70pt}
\begin {longtable}{ccccccccccccccc}%
\hline Accesion&KAAT007&QCA14&QGAA001&QGA17&KGA16&QAAT071&QAAT084&QAAT081&KGA20&KCAA011&QAAT050&QGA028&QAAT012&Provincia\\\hline \endfirsthead \multicolumn {15}{c}{{\bfseries -- continua de la pagina anterior}}\\\hline Accesión& KAAT007& QCA14& QGAA001& QGA17& KGA16& QAAT071& QAAT084& QAAT081& KGA20& KCAA011& QAAT050& QGA028& QAAT012& Provincia\\\hline \endhead %
1&NA&NA&NA&NA&NA&NA&NA&NA&NA&NA&NA&NA&NA&SUCRE\\%
2&225/225&205/205&NA&198/202&198/198&NA&176/176&206/206&214/224&NA&250/250&194/194&204/204&SUCRE\\%
3&225/291&NA&NA&198/198&198/198&164/164&170/170&206/206&212/220&235/235&247/247&222/222&204/204&SUCRE\\%
5&315/315&203/207&NA&NA&NA&NA&170/170&206/206&NA&NA&NA&220/220&198/198&SUCRE\\%
6&255/255&203/207&143/206&NA&200/200&179/179&170/170&206/206&190/196&NA&223/223&220/220&198/198&SUCRE\\%
7&261/276&205/207&200/206&194/200&194/194&179/179&176/176&206/209&206/214&247/247&217/220&196/196&222/222&SUCRE\\%
8&NA&NA&206/236&194/202&200/200&NA&164/164&206/206&NA&NA&NA&202/214&189/231&SUCRE\\%
9&294/294&NA&NA&NA&196/198&179/179&167/167&206/206&206/214&NA&217/241&198/198&201/201&SUCRE\\%
10&342/342&207/207&245/266&196/196&NA&NA&173/173&206/206&190/196&NA&223/223&224/224&198/198&HUAMANGA\\%
13&225/225&205/209&NA&NA&196/200&164/164&179/194&206/209&214/222&235/235&247/247&224/224&207/207&HUAMANGA\\%
14&222/222&NA&NA&196/200&196/196&164/164&179/179&209/209&216/224&235/235&247/247&224/224&207/207&HUAMANGA\\%
15&NA&205/207&NA&180/196&200/200&173/173&173/173&206/206&190/194&241/241&220/220&224/224&225/225&HUAMANGA\\%
16&228/228&207/211&209/209&182/200&200/200&164/164&164/164&206/206&214/222&235/235&247/247&224/224&207/207&HUANCASANCOS\\%
\end {longtable}
\end{landscape}
\end{document}