3

The result of the code below is a long table which doesn't fit on a page. I want to break it into two parts but using longtable and \pagebreak makes the table disoriented and doesn't divide it into two parts. Any solutions would be appreciated! Thanks!

\newcolumntype{L}[1]{> 
{\centering\raggedright}m{#1}}

\begin{table}[htbp]
\caption{Global parameters HYDRO\_FT-2D}
\renewcommand{\arraystretch}{1.5}
\begin{tabularx}{\linewidth} 
{@{}L{2.5cm}L{2.5cm}L{1.5cm}X@{}}
\toprule
\multicolumn{2}{c} 
{\textbf{Parameters\hspace{1em}}} & & \\
\cmidrule(r){1-2}
\textbf{Original} & \textbf{English translation} & \textbf{Used value} & \textbf{Definition} \\

\cmidrule(r){1-2} \cmidrule(lr){3-3} \cmidrule(l){4-4}

Stofftransport- formel & Sediment transport fromula & MPM & To select the formula fro computing sediment transport. \\

Rauheitsermit-tlung & Roughness determination & a & This option shows the way in which roughness could be calculated. a = $\theta_c_r \quad \& \quad k_b$ (by default from \texttt{SMS}). \\

Schubspannun-gsschwankun-gen & Shear stress fluctuations & Off & To select whether the shear stress fluctuations will be considered or not. \\

$\theta\textsubscript{cr}$ &  & 0.047 & Critical Shields parameter \\

SCG\textsubscript{Formel}  &  & 1 & Scaling factor for sediment transport formula (equation \ref{eq:MPM}) \\

CF\textsubscript{Quergef\"alle}  & & 0 & Coefficient $c_f_\theta$ for consideration of the transport direction on inclined surfaces \\

A\textsubscript{r} & & 8 & Coefficient $A_r$ for consideration of river curves \\

SCFG & & 1 & Scaling factor for the additional acceleration of the calculation process \\

DZ\textsubscript{max}  & & 0.05 m & Parameters for the maximum allowed riverbed change during one time step\\

\tau\textsubscript{max} & & 500 N/m\textsuperscript{2} & Parameter for the maximum allowed bottom shear stress\\

c\textsubscript{max} & & 100 kg/s & Parameter for the maximum allowed sediment concentration\\

Sc\textsubscript{t} & & \num{0.70} & Turbulent Schmidt number\\

pal und pul & & 1 and 4 & Parameter for controlling riverbed layers\\

\rho\textsubscript{s} & & 2650 kg/m\textsuperscript{3} & Sediment density\\

n\textsubscript{p} & & \num{0.36} & Porosity\\

\phi & & 37 \degree & Internal friction angle for underwater material\\

Y\textsubscript{cr} & & 37 \degree& Internal friction angle for dry material\\

NF & & \num{8} and in single grain variant 1& Number of sediment fractions\\

d\textsubscript{i,m} & & - & Average size of used sediment fractions\\

\bottomrule 
\end{tabularx}
\label{tab:globalparametershydroFT}
\end{table}
  • long table is not intended to be inside float environment table. for start remove it and table will in case that it is longer than one page automatically break into two parts. – Zarko Nov 26 '18 at 19:44
3

Look into the documentation of xltabular or longtable for repeating a header. Run with xelatex/lualatex or load package textcomp for \textdegree

\documentclass{report}
\usepackage{amsmath,xltabular,booktabs,ragged2e,siunitx}
\newcolumntype{L}[1]{>{\RaggedRight\hspace{0pt}}m{#1}}
\begin{document}

\renewcommand\arraystretch{1.5}
\begin{xltabular}{\linewidth}{@{}L{2.5cm}L{2.5cm}L{1.5cm}X@{}}
\caption{Global parameters HYDRO\_FT-2D\label{tab:globalparametershydroFT}}\\\toprule
\multicolumn{2}{c}{\textbf{Parameters}\quad} & & \\\cmidrule(r){1-2}
\textbf{Original} & \textbf{English translation} & \textbf{Used value} & \textbf{Definition}\\
        \cmidrule(r){1-2} \cmidrule(lr){3-3} \cmidrule(l){4-4}
Stofftransport- formel & Sediment transport fromula & MPM & To select the formula fro 
        computing sediment transport. \\
Rauheitsermittlung & Roughness determination & a & This option shows the way in which 
        roughness could be calculated. a = $\theta_{c_r} \quad \& \quad k_b$ 
        (by default from \texttt{SMS}). \\
Schubspannungsschwankungen & Shear stress fluctuations & Off & To select whether the 
        shear stress fluctuations will be considered or not. \\
$\theta^{\text{cr}}$ &  & 0.047 & Critical Shields parameter \\
SCG\textsubscript{Formel}  &  & 1 & Scaling factor for sediment transport formula (equation 
        \ref{eq:MPM}) \\
CF\textsubscript{Quergef\"alle}  & & 0 & Coefficient $c_{f_\theta}$ for consideration of the 
        transport direction on inclined surfaces \\
A\textsubscript{r} & & 8 & Coefficient $A_r$ for consideration of river curves \\
        SCFG & & 1 & Scaling factor for the additional acceleration of the calculation process \\
DZ\textsubscript{max}  & & 0.05 m & Parameters for the maximum allowed riverbed change 
        during one time step\\      
$\tau^\text{max}$ & & 500 N/m\textsuperscript{2} & Parameter for the maximum allowed 
        bottom shear stress\\       
c\textsubscript{max} & & 100 kg/s & Parameter for the maximum allowed sediment concentration\\
Sc\textsubscript{t} & & \num{0.70} & Turbulent Schmidt number\\     
pal und pul & & 1 and 4 & Parameter for controlling riverbed layers\\       
$\rho^{\text{s}}$ & & 2650 kg/m\textsuperscript{3} & Sediment density\\     
n\textsubscript{p} & & \num{0.36} & Porosity\\      
$\phi$ & & 37 \textdegree & Internal friction angle for underwater material\\       
Y\textsubscript{cr} & & 37 \textdegree& Internal friction angle for dry material\\      
NF & & \num{8} and in single grain variant 1& Number of sediment fractions\\        
d\textsubscript{i,m} & & - & Average size of used sediment fractions\\
\bottomrule 
\end{xltabular}

\end{document}

enter image description here

| improve this answer | |
  • 1
    \textdegree seems to be undefined in your example. Maybe add textcomp or a similar package? – samcarter_is_at_topanswers.xyz Nov 28 '18 at 14:49
  • Yes, but only if you run (pdf)latex. In this case you need \usepackage{textcomp}. I always prefer xelatex or lualatex – user2478 Nov 28 '18 at 15:17
  • OK, if you don't like textcomp, could you please add some other definition to make your code compilable? Or remove the problematic rows? It's current state seems to confuse users: tex.stackexchange.com/questions/459767/… – samcarter_is_at_topanswers.xyz Nov 28 '18 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.