\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
-
parkerokabe
- Posts: 7
- Joined: Thu Apr 25, 2019 5:45 pm
Left Aligning Text in Longtable
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
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, % a4paper
left= 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
\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{document}-
parkerokabe
- 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
\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, 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 \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{document}
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
-
parkerokabe
- 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.