Errores de Ltablex en tablas largas y anchas.

Errores de Ltablex en tablas largas y anchas.

Buenos dias a todos.

Tengo un problema al intentar crear una tabla de varias páginas dentro de mi tesis usando el paquete ltablex. El problema es que la tabla no continúa en las páginas siguientes; el código relacionado solo con la tabla es más o menos así:

\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 señalé, la tabla es muy larga y me gustaría que la columna del medio ocupe el mayor espacio posible.

Desafortunadamente, hay algunos casos en los que la descripción parece demasiado larga y el compilador devuelve un error, aunque la tabla se visualice correctamente; No puedo entender por qué, pensé que este paquete, con los comandos especificados en `begin{tabularx}{...}{...}` estaban hechos para ajustar el texto dentro de una columna de dimensión horizontal establecida; Incluso si se producen errores, la salida en PDF muestra una tabla como si no hubiera pasado nada.

Sin embargo, cuando llego al final de la página, parece que la tabla no quiere pasar a la página siguiente. Entonces mi pregunta es, ¿qué estoy haciendo mal?

Estoy usando TeXnicCenter, versión 2.02 Estable (64 bits).

Pido disculpas de antemano si omití algo, es la primera vez que codifico en LaTeX, por supuesto, cualquier sugerencia al respecto sería muy apreciada :D. Que tenga un buen día.

Respuesta1

Bueno, en tu tabla hay algunos problemas:

  1. Con el uso \usepackage{ltablex}no es necesario utilizar el entorno table, se rompe la posibilidad de, ltablexo mejor, el llamado longtablepara abarcar páginas.
  2. Eliminé el \setlength{\hsize}{.7\hsize}y \setlength{\hsize}{1.3\hsize}en tus definiciones de columnas.X
  3. Deberías utilizar mejor el entorno booktabspara obtener mejores líneas horizontales.
  4. Falta un \\después \caption( longtable¡necesita esto!)
  5. Faltan algunos $en su código (consulte las marcas <=======para cambios de código).

Entonces con el siguiente código corregido

\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}

obtienes el resultado:

ingrese la descripción de la imagen aquí

y la siguiente página:

ingrese la descripción de la imagen aquí

información relacionada