![Erros Ltablex em tabelas longas e largas](https://rvso.com/image/392349/Erros%20Ltablex%20em%20tabelas%20longas%20e%20largas.png)
Bom Dia a todos.
Tenho um problema ao tentar criar uma tabela de várias páginas dentro da minha tese usando o pacote ltablex
. O problema é que a tabela não continua nas próximas páginas; o código relacionado apenas à tabela é mais ou menos assim:
\documentclass[12pt,a4paper,twoside,openany]{book}
\usepackage{tabularx}
\usepackage{ltablex}
\usepackage{multirow}
\begin{document}
\begin{table}
\scriptsize
\begin{tabularx}{\linewidth}{>{\setlength{\hsize}{.7\hsize}\arraybackslash}X>{\setlength{\hsize}{1.3\hsize}\arraybackslash}Xl}
\caption{caption}
\hline
\multicolumn{3}{c}{\textbf{General data}} \\
Machine & TCV & string \\
Shot & Shot number & \\
t_{start,end,med.} & Initial, final and medium time interval extremes & s \\ \hline \hline
\multicolumn{3}{c}{\textbf{Parameters directly related to the fits}} \\
T$_{e,sep.}$ & Temperature at the separatrix & eV \\
n$_{e,sep.,mtanh/lin.}$ & Separatrix density & m$^{-3}$ \\
p$_{e,sep.,mtanh/lin.}$ & Separatrix pressure & Pa \\
T/n/p$_{e,ped.,mtanh/lin.}$ & Pedestal temperature, density and pressure & eV/m$^{-3}$/Pa \\
w$_{T,n,p}^{e,ped.,mtanh,lin.}$ & Pedestal width (temperature, density and pressure) & $\psi$ (adim.)\\
p$_{T,n,p}^{e,ped.,mtanh,lin.}$ & Pedestal position (temperature, density and pressure) & $\psi$ (adim.)\\
T/n/p$_{e,offset,mtanh/lin.}$ & Pedestal offset in the temperature, density and pressure profiles in the Scrape-Off Layer & eV/m$^{-3}$/Pa \\
Core.slope.T/n/p$_{e,mtanh/lin.}$ & Temperature, density and pressure core slope & eV/\psi, m$^{-3}$/$\psi$, Pa/$\psi$ \\
Max.Grad.T/n/p$_{e,mtanh/lin.}$ & Temperature, density and pressure pedestal maximum gradient & eV/$\psi$, m$^{-3}$/$\psi$, Pa/$\psi$ \\
Max Grad T/n/p$_{e,mtanh}$ & Temperature, density and pressure pedestal max. gradient position & eV/$\psi$, m$^{-3}$/$\psi$, Pa/$\psi$\\
mtanh/lin parameters & Parameters related to the construction of the fit & \\ \hline \hline
\multicolumn{3}{c}{\textbf{Other pedestal parameters}} \\
T$_i,ped$ & Pedestal ion temperature & eV \\
Z$_{eff,ped}$ & Effective charge number at the pedestal & \\
V$_{pol,ped}$ & Pedestal poloidal velocity & m/s \\
V$_{tor,ped}$ & Pedestal toroidal velocity & m/s \\ \hline \hline
\multicolumn{3}{c}{\textbf{Derived parameters}} \\
w$_{th}^{e/i,ped,mtanh/lin.}$ & Pedestal stored energy (for electrons and ions) & J \\
V$_{ped,mtanh/lin.}$ & Plasma volume at the pedestal top & m$^3$ \\
V$_{tot,mtanh/lin.}$ & Plasma total volume & m$^3$ \\
$\alpha_{max,e}$ & Max value of the normalized electron pressure gradient (in mtanh fit only) & \\
pos $\alpha_{max,e}$ & Position of $\alpha_{max,e}$ in $\psi$ space & $\psi$ \\ \hline \hline
\multicolumn{3}{c}{\textbf{Dimensionless parameters}} \\
$\beta_{pol,e,ped,avg/HFS/LFS,lin}$ $\beta_{pol,e,ped,avg/HFS/LFS,mtanh}$ & Poloidal confinement parameter of the pedestal at the HFS, the LFS and as an average over the flux surface value between both & \\
$\nu*_{ped,e,mtanh/lin.}$ & Pedestal normalized collisionality & \\
$\rho*_{ped,LFS/HFS/axis,e,mtanh/lin.}$ & Normalized Larmor radius of the pedestal at the HFS, the LFS and as an average value between both & \\
B$_{pol,avg,mtanh/lin.}$ & Poloidal magnetic field at the pedestal top averaged over the flux surface & T \\
B$_{pol/tor/tot,HFS/LFS,mtanh/lin.}$ & Poloidal, toroidal and total magnetic field at the HFS, LFS at the pedestal top & T \\
log($\Lambda_{mtanh/lin}$) & Small angle collision contribution & \\
$\epsilon$ & Inverse aspect ratio & \\
q$_{95}$ & Safety factor at $psi$=0.95 & \\
R & Major radius & \\
B$_{axis}$ & Magnetic field value at the magnetic axis & \\ \hline \hline
\multicolumn{3}{c}{\textbf{ELMs}} \\
f$_{ELM}$ & ELM frequency & Hz \\
ELM type & ELM type & \\
W$_{ELM}$ & ELM energy loss & J \\
$\tau_{ELM}$ & Time length for the ELM to collapse & s \\ \hline \hline
\multicolumn{3}{c}{\textbf{Global parameters to store}} \\
I$_p$ & Plasma current & A \\
B$_t$ & Toroidal field & T \\
P$_{NBI}$ & NBI power & W \\
P$_{ICRH}$ & Ion Cyclotron Resonance Heating (not available at TCV) & W \\
P$_{ECRH}$ & Electron Cyclotron Resonance Heating & W \\
P$_\Omega$ & Ohmic power & W \\
P$_{tot}$ & (Total power)-(NBI shine through(complex to calculate)) - (dW/dt) & W \\
P$_{rad}$ & Radiative power & W \\
W$_{MHD}$ & MHD energy & J \\
W$_{dia}$ & Diamagnetic energy & J \\
$\beta_{N/p,global,MHD/dia}$ & Global confinement parameter both normal (N) and poloidal (p) from MHD or diamagnetic calculations & \\
L$_{i,MHD,dia}$ & Internal inductance form MHD or diamagnetic calculations & H \\
$\tau_e$ & Energy confinement time & s \\
ngw & Greenwald density & \\
n$_{e.l.a}$ & Line averaged electron density & m$^{-3}$ \\
H$_{98}$ & H$_{98}$IPB(y,2) & \\
$\tau_e{e,IPB98(y,2)}$ & Energy confinement time from the scaling law IPB98(y,2) & s \\
Main ion & Main ion (H,D,T,He,H-D,D-T) & string \\
M$_{eff}$ & effective mass & \\
H$_{rate}$ & Hydrogen puff rate & e/s \\
D$_{rate}$ & Dueterium puff rate & e/s \\
He$_{rate}$ & Helium puff rate & e/s \\
T$_{rate}$ & Tritium puff rate & e/s \\
Imp$_{seeding1}$ & Seeded specie 1 & string \\
Imp$_{seeding2}$ & Seeded specie 2 & string \\
Imp$_{seeding1}$ rate & Specie 1 puff rate & string \\
Imp$_{seeding2}$ rate & Specie 2 puff rate & string \\
Z$_{eff,line}$ & Line integrated Z$_{eff}$ & \\
W$_{th,tot}$ & Total thermal store energy & J \\
W$_{fast}$ & Fast particle enrgy & J \\
$\beta_{N,th}$ & total thermal $\beta_N$ & \\ \hline \hline
\multicolumn{3}{c}{\textbf{Equilibrium}} \\
$\psi_{pol,norm,r}$ & Normalized flux coordinate $\psi$ vs radius at z=Z$_{mag}$ & \\
r$_{zmag}$ & radial basis for $\psi_{pol,norm,r}$ & \\
r$_{mid,profile}$ & Midplane radius vs normalized $\psi_{pol}$ & \\
V$_{profile}$ & Volume vs normalized $\psi_{pol}$ & \\
FF'$_{profile}$ & FF' vs normalized $\psi_{pol}$ & \\
p'$_{profile}$ & p' vs normalized $\psi_{pol}$ & \\
q$_{profile}$ & q vs normalized $\psi_{pol}$ & \\
shear profile & shear profile & \\
q$_{min}$ & min value of the safety factor & \\
$\psi_{axis}$ & $\psi_{pol}$ value at the axis & \\
$\psi_{sep}$ & $\psi_{pol}$ value at the separatrix & \\
$\delta_{upper}$ & Upper triangularity & \\
$\delta_{lower}$ & Lower triangularity & \\
$\kappa$ & Elongation & \\
Divertor Geometry & Divertor geometry (In this thesis, LSN) & string \\
Strike point & Position of the strike point & string \\
r$_{outer}$ & r coordinate of the outer strike point & m \\
z$_{outer}$ & z coordinate of the outer strike point & m \\
r$_{inner}$ & r coordinate of the inner strike point & m \\
z$_{inner}$ & z coordinate of the inner strike point & m \\
R$_{mag}$ & r coordinate of the magnetic axis & m \\
Z$_{mag}$ & z coordinate of the magnetic axis & m \\
R$_{geo}$ & r coordinate of the geometric axis & m \\
Z$_{geo}$ & z coordinate of the geometric axis & m \\
a & Minor radius & m \\
$\psi_{grid}$ & Matrix for the $\psi$ grid & m$\times$m\\
r$_{\psi,grid}$ & r for the $\psi$ grid & m \\
z$_{\psi,grid}$ & z for the $\psi$ grid & m \\
\hline
\end{tabularx}
\label{label}
\end{table}
\end{document}
Como indiquei, a tabela é muito longa e gostaria que a coluna do meio ocupasse o máximo de espaço possível.
Infelizmente, existem alguns casos em que a descrição parece muito longa e o compilador retorna um erro, mesmo que a tabela seja visualizada corretamente; Não consigo entender porque, pensei que este pacote, com os comandos especificados em `begin{tabularx}{...}{...}` foram feitos para ajustar o texto dentro de uma coluna de dimensão horizontal definida; mesmo que ocorram erros, a saída do pdf fornece uma tabela como se nada tivesse acontecido.
Porém, quando chego ao final da página, parece que a tabela não quer ir para a próxima página. Então, minha pergunta é: o que estou fazendo de errado?
Estou usando o TeXnicCenter, versão 2.02 Stable (64 bits).
Peço desculpas antecipadamente se omiti algo, é a primeira vez que codifico em LaTeX, é claro que qualquer sugestão sobre o assunto seria muito apreciada :D. Tenha um bom dia.
Responder1
Bem, na sua tabela estão alguns problemas:
- Com o using
\usepackage{ltablex}
você não precisa usar o ambientetable
, quebra a possibilidade deltablex
ou melhor a chamadalongtable
para span pages. - Eu apaguei o
\setlength{\hsize}{.7\hsize}
e\setlength{\hsize}{1.3\hsize}
nas suas definições de colunasX
- Você deve usar melhor o ambiente
booktabs
para obter melhores linhas horizontais. - Falta um
\\
depois\caption
(longtable
precisa disso!) - Faltam alguns
$
em seu código (veja as marcações<=======
para alterações de código).
Então, com o seguinte código corrigido
\documentclass[12pt,a4paper,twoside,openany]{book}
\usepackage{ltablex}
\usepackage{booktabs} % <===============================================
\usepackage{multirow}
\begin{document}
\scriptsize
\begin{tabularx}{\linewidth}{%
>{\arraybackslash}X% \setlength{\hsize}{.7\hsize} % <=================
>{\arraybackslash}X% \setlength{\hsize}{1.3\hsize} % <================
l}
\caption{caption} \\ % <================================================
\toprule % <============================================================
\multicolumn{3}{c}{\textbf{General data}} \\
Machine & TCV & string \\
Shot & Shot number & \\
t$_{start,end,med.}$ & Initial, final and medium time interval extremes & s \\ % <================
\midrule % <============================================================
\multicolumn{3}{c}{\textbf{Parameters directly related to the fits}} \\
T$_{e,sep.}$ & Temperature at the separatrix & eV \\
n$_{e,sep.,mtanh/lin.}$ & Separatrix density & m$^{-3}$ \\
p$_{e,sep.,mtanh/lin.}$ & Separatrix pressure & Pa \\
T/n/p$_{e,ped.,mtanh/lin.}$ & Pedestal temperature, density and pressure & eV/m$^{-3}$/Pa \\
w$_{T,n,p}^{e,ped.,mtanh,lin.}$ & Pedestal width (temperature, density and pressure) & $\psi$ (adim.)\\
p$_{T,n,p}^{e,ped.,mtanh,lin.}$ & Pedestal position (temperature, density and pressure) & $\psi$ (adim.)\\
T/n/p$_{e,offset,mtanh/lin.}$ & Pedestal offset in the temperature, density and pressure profiles in the Scrape-Off Layer & eV/m$^{-3}$/Pa \\
Core.slope.T/n/p$_{e,mtanh/lin.}$ & Temperature, density and pressure core slope & eV/$\psi$, m$^{-3}$/$\psi$, Pa/$\psi$ \\ % <=======================
Max.Grad.T/n/p$_{e,mtanh/lin.}$ & Temperature, density and pressure pedestal maximum gradient & eV/$\psi$, m$^{-3}$/$\psi$, Pa/$\psi$ \\
Max Grad T/n/p$_{e,mtanh}$ & Temperature, density and pressure pedestal max. gradient position & eV/$\psi$, m$^{-3}$/$\psi$, Pa/$\psi$\\
mtanh/lin parameters & Parameters related to the construction of the fit & \\
\midrule
\multicolumn{3}{c}{\textbf{Other pedestal parameters}} \\
T$_i,ped$ & Pedestal ion temperature & eV \\
Z$_{eff,ped}$ & Effective charge number at the pedestal & \\
V$_{pol,ped}$ & Pedestal poloidal velocity & m/s \\
V$_{tor,ped}$ & Pedestal toroidal velocity & m/s \\
\midrule
\multicolumn{3}{c}{\textbf{Derived parameters}} \\
w$_{th}^{e/i,ped,mtanh/lin.}$ & Pedestal stored energy (for electrons and ions) & J \\
V$_{ped,mtanh/lin.}$ & Plasma volume at the pedestal top & m$^3$ \\
V$_{tot,mtanh/lin.}$ & Plasma total volume & m$^3$ \\
$\alpha_{max,e}$ & Max value of the normalized electron pressure gradient (in mtanh fit only) & \\
pos $\alpha_{max,e}$ & Position of $\alpha_{max,e}$ in $\psi$ space & $\psi$ \\
\midrule
\multicolumn{3}{c}{\textbf{Dimensionless parameters}} \\
$\beta_{pol,e,ped,avg/HFS/LFS,lin}$ $\beta_{pol,e,ped,avg/HFS/LFS,mtanh}$ & Poloidal confinement parameter of the pedestal at the HFS, the LFS and as an average over the flux surface value between both & \\
$\nu*_{ped,e,mtanh/lin.}$ & Pedestal normalized collisionality & \\
$\rho*_{ped,LFS/HFS/axis,e,mtanh/lin.}$ & Normalized Larmor radius of the pedestal at the HFS, the LFS and as an average value between both & \\
B$_{pol,avg,mtanh/lin.}$ & Poloidal magnetic field at the pedestal top averaged over the flux surface & T \\
B$_{pol/tor/tot,HFS/LFS,mtanh/lin.}$ & Poloidal, toroidal and total magnetic field at the HFS, LFS at the pedestal top & T \\
log($\Lambda_{mtanh/lin}$) & Small angle collision contribution & \\
$\epsilon$ & Inverse aspect ratio & \\
q$_{95}$ & Safety factor at $psi$=0.95 & \\
R & Major radius & \\
B$_{axis}$ & Magnetic field value at the magnetic axis & \\
\midrule
\multicolumn{3}{c}{\textbf{ELMs}} \\
f$_{ELM}$ & ELM frequency & Hz \\
ELM type & ELM type & \\
W$_{ELM}$ & ELM energy loss & J \\
$\tau_{ELM}$ & Time length for the ELM to collapse & s \\
\midrule
\multicolumn{3}{c}{\textbf{Global parameters to store}} \\
I$_p$ & Plasma current & A \\
B$_t$ & Toroidal field & T \\
P$_{NBI}$ & NBI power & W \\
P$_{ICRH}$ & Ion Cyclotron Resonance Heating (not available at TCV) & W \\
P$_{ECRH}$ & Electron Cyclotron Resonance Heating & W \\
P$_\Omega$ & Ohmic power & W \\
P$_{tot}$ & (Total power)-(NBI shine through(complex to calculate)) - (dW/dt) & W \\
P$_{rad}$ & Radiative power & W \\
W$_{MHD}$ & MHD energy & J \\
W$_{dia}$ & Diamagnetic energy & J \\
$\beta_{N/p,global,MHD/dia}$ & Global confinement parameter both normal (N) and poloidal (p) from MHD or diamagnetic calculations & \\
L$_{i,MHD,dia}$ & Internal inductance form MHD or diamagnetic calculations & H \\
$\tau_e$ & Energy confinement time & s \\
ngw & Greenwald density & \\
n$_{e.l.a}$ & Line averaged electron density & m$^{-3}$ \\
H$_{98}$ & H$_{98}$IPB(y,2) & \\
$\tau_e{e,IPB98(y,2)}$ & Energy confinement time from the scaling law IPB98(y,2) & s \\
Main ion & Main ion (H,D,T,He,H-D,D-T) & string \\
M$_{eff}$ & effective mass & \\
H$_{rate}$ & Hydrogen puff rate & e/s \\
D$_{rate}$ & Dueterium puff rate & e/s \\
He$_{rate}$ & Helium puff rate & e/s \\
T$_{rate}$ & Tritium puff rate & e/s \\
Imp$_{seeding1}$ & Seeded specie 1 & string \\
Imp$_{seeding2}$ & Seeded specie 2 & string \\
Imp$_{seeding1}$ rate & Specie 1 puff rate & string \\
Imp$_{seeding2}$ rate & Specie 2 puff rate & string \\
Z$_{eff,line}$ & Line integrated Z$_{eff}$ & \\
W$_{th,tot}$ & Total thermal store energy & J \\
W$_{fast}$ & Fast particle enrgy & J \\
$\beta_{N,th}$ & total thermal $\beta_N$ & \\
\midrule
\multicolumn{3}{c}{\textbf{Equilibrium}} \\
$\psi_{pol,norm,r}$ & Normalized flux coordinate $\psi$ vs radius at z=Z$_{mag}$ & \\
r$_{zmag}$ & radial basis for $\psi_{pol,norm,r}$ & \\
r$_{mid,profile}$ & Midplane radius vs normalized $\psi_{pol}$ & \\
V$_{profile}$ & Volume vs normalized $\psi_{pol}$ & \\
FF'$_{profile}$ & FF' vs normalized $\psi_{pol}$ & \\
p'$_{profile}$ & p' vs normalized $\psi_{pol}$ & \\
q$_{profile}$ & q vs normalized $\psi_{pol}$ & \\
shear profile & shear profile & \\
q$_{min}$ & min value of the safety factor & \\
$\psi_{axis}$ & $\psi_{pol}$ value at the axis & \\
$\psi_{sep}$ & $\psi_{pol}$ value at the separatrix & \\
$\delta_{upper}$ & Upper triangularity & \\
$\delta_{lower}$ & Lower triangularity & \\
$\kappa$ & Elongation & \\
Divertor Geometry & Divertor geometry (In this thesis, LSN) & string \\
Strike point & Position of the strike point & string \\
r$_{outer}$ & r coordinate of the outer strike point & m \\
z$_{outer}$ & z coordinate of the outer strike point & m \\
r$_{inner}$ & r coordinate of the inner strike point & m \\
z$_{inner}$ & z coordinate of the inner strike point & m \\
R$_{mag}$ & r coordinate of the magnetic axis & m \\
Z$_{mag}$ & z coordinate of the magnetic axis & m \\
R$_{geo}$ & r coordinate of the geometric axis & m \\
Z$_{geo}$ & z coordinate of the geometric axis & m \\
a & Minor radius & m \\
$\psi_{grid}$ & Matrix for the $\psi$ grid & m$\times$m\\
r$_{\psi,grid}$ & r for the $\psi$ grid & m \\
z$_{\psi,grid}$ & z for the $\psi$ grid & m \\
\bottomrule % <=========================================================
\end{tabularx}
\label{label}
\end{document}
você obtém o resultado:
e a próxima página: