\documentclass[review]{elsarticle}
\usepackage{lineno,hyperref,upgreek,graphicx,chemformula,subfig,longtable,multirow}
\modulolinenumbers[5]
\usepackage{geometry}
\geometry{%
letterpaper, % a4paper
left= 2.54 cm,
right= 2.54 cm,
top= 2.54 cm,
bottom= 2.54 cm,
}
\journal{Journal of Nuclear Materials}
\begin{center}
\begin{longtable}[c]{ p{1cm} p{2.5cm} p{1.5cm} p{1.5cm} p{2cm} p{2cm}}
\caption{Summary of Chlorination Test Results.}\\
& & & & \multicolumn{2}{l}{Conversion (\%)}\\\cline{5-6}
Time (min) & Particle Size Range ($\upmu$m) & Set Point Temp (K) & vol\%Cl\textsubscript{2} & Mass-Based & CIE-Based\\
\hline\hline
\endfirsthead
\hline
& & & & \multicolumn{2}{l}{Conversion (\%)}\\\cline{5-6}
Time (min) & Particle Size Range (~$\upmu$m) & Set Point Temp (K) & vol\%Cl\textsubscript{2} & Mass-Based & CIE-Based\\
\hline\hline
\endhead
\hline
\endfoot
\hline
\endlastfoot
10 & \textless4,000 & 573 & 100 & 62.4 & 58.4\\
20 & \textless4,000 & 573 & 100 & 46.8 & 68.8\\
26 & \textless4,000 & 573 & 100 & 59.6 & 69.0\\
33 & \textless4,000 & 573 & 100 & 72.9 & 66.7\\
10 & Microns-4,000 & 523 & 100 & 66.3 & 85.0\\
30 & Microns-4,000 & 523 & 100 & 66.8 & 78.1\\
60 & Microns-4,000 & 523 & 100 & 65.9 & 85.1\\
90 & Microns-4,000 & 523 & 100 & 71.3 & 84.4\\
60 & 1,000-2,000 & 523 & 100 & 15.2 & 17.1\\
60 & 355-425 & 523 & 100 & 86.3 & 89.2\\
60 & 250-355 & 523 & 100 & 92.6 & 93.1\\
60 & 150-250 & 523 & 100 & 92.3 & 92.0\\
\end{longtable}
\end{center}
Graphics, Figures & Tables ⇒ Left Aligning Text in Longtable
-
- Posts: 7
- Joined: Thu Apr 25, 2019 5:45 pm
Left Aligning Text in Longtable
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
Left Aligning Text in Longtable
Code: Select all
\documentclass[review]{elsarticle}\usepackage{lineno,hyperref,upgreek,graphicx,chemformula,subfig,longtable,multirow}\modulolinenumbers[5]\usepackage{geometry}\geometry{%letterpaper, % a4paperleft= 2.54 cm,right= 2.54 cm,top= 2.54 cm,bottom= 2.54 cm,showframe}\usepackage{ragged2e}\usepackage{array}\newcolumntype{R}[1]{>{\RaggedRight}p{#1}}\journal{Journal of Nuclear Materials}\begin{document}\begin{longtable}[c]{ R{1cm} R{2.5cm} R{1.5cm} R{1.5cm} R{2cm} R{2cm}}\caption{Summary of Chlorination Test Results.}\\& & & & \multicolumn{2}{l}{Conversion (\%)}\\\cline{5-6}Time (min) & Particle Size Range ($\upmu$m) & Set Point Temp~(K) & vol\%Cl\textsubscript{2} & Mass-Based & CIE-Based\\\hline\hline\endfirsthead\hline& & & & \multicolumn{2}{l}{Conversion (\%)}\\\cline{5-6}Time (min) & Particle Size Range (~$\upmu$m) & Set Point Temp (K) & vol\%Cl\textsubscript{2} & Mass-Based & CIE-Based\\\hline\hline\endhead\hline\endfoot
-
- Posts: 7
- Joined: Thu Apr 25, 2019 5:45 pm
Left Aligning Text in Longtable
user22741 wrote:The `ragged2e` package has the great `\RaggedRight` macro for such cases:
Code: Select all
Code, edit and compile here:\documentclass[review]{elsarticle}\usepackage{lineno,hyperref,upgreek,graphicx,chemformula,subfig,longtable,multirow}\modulolinenumbers[5]\usepackage{geometry}\geometry{%letterpaper, % a4paperleft= 2.54 cm,right= 2.54 cm,top= 2.54 cm,bottom= 2.54 cm,showframe}\usepackage{ragged2e}\usepackage{array}\newcolumntype{R}[1]{>{\RaggedRight}p{#1}}\journal{Journal of Nuclear Materials}\begin{document}\begin{longtable}[c]{ R{1cm} R{2.5cm} R{1.5cm} R{1.5cm} R{2cm} R{2cm}}\caption{Summary of Chlorination Test Results.}\\& & & & \multicolumn{2}{l}{Conversion (\%)}\\\cline{5-6}Time (min) & Particle Size Range ($\upmu$m) & Set Point Temp~(K) & vol\%Cl\textsubscript{2} & Mass-Based & CIE-Based\\\hline\hline\endfirsthead\hline& & & & \multicolumn{2}{l}{Conversion (\%)}\\\cline{5-6}Time (min) & Particle Size Range (~$\upmu$m) & Set Point Temp (K) & vol\%Cl\textsubscript{2} & Mass-Based & CIE-Based\\\hline\hline\endhead\hline\endfoot
I added the lines
\usepackage{ragged2e}
\usepackage{array}
\newcolumntype{R}[1]{>{\RaggedRight}p{#1}}
but nothing changed. Am I missing something?
Left Aligning Text in Longtable
-
- Posts: 7
- Joined: Thu Apr 25, 2019 5:45 pm
Left Aligning Text in Longtable
It worked! Thank you so much!user22741 wrote:The table has also to use the new column type.