I am new to LaTex and I am writing my thesis. I am currently experiencing an issue with a table in landscape mode. I would like my caption to be on a single line. I guess I have to use the captionsetup but I can't solve it. Thanks for any help.
Here is the code for the table (with less lines than the one in figure and with \pm substituted by +).
\documentclass[12pt,twoside]{report}
\usepackage[utf8]{inputenc}
\usepackage{lscape}
\usepackage[width=0.9\textwidth,labelfont=bf]{caption}
\usepackage{array} \usepackage{tabularx}
\begin{document}
\begin{landscape}
\begin{table}[h!]
\centering
\caption{Elemental composition (in wt.$\%$) of the nine alloys investigated in this work}
\renewcommand{\arraystretch}{2}
\begin{tabularx}{0.9\hsize}[h!]{
>{\raggedright\arraybackslash}p{3.9cm}
>{\centering\arraybackslash}X
>{\centering\arraybackslash}X
>{\centering\arraybackslash}X
>{\centering\arraybackslash}X
>{\centering\arraybackslash}X
>{\raggedright\arraybackslash}X }
\hline
& \multicolumn{6}{c}{Results (wt.$\%$)} \\
Alloy name & Ti & Nb & Ga & Cu & O & N \\
(Ti-45Nb)-2Ga & 53.61 + 0.72 & 43.86 + 0.73 & 1.99 + 0.07 & & 0.099 + 0.010 & 0.002 + 0.000\\
(Ti-45Nb)-4Ga & 52.58 + 0.35 & 42.77 + 0.24 & 3.87 + 0.05 & & 0.111 + 0.008 & 0.004 + 0.001 \\
(Ti-45Nb)-6Ga & 51.51 + 0.36 & 41.97 + 0.33 & 5.83 + 0.05 & & 0.091 + 0.015 & 0.003 + 0.001 \\
(Ti-45Nb)-8Ga & 50.23 + 0.59 & 41.03 + 0.31 & 7.89 + 0.12 & & 0.088 + 0.004 & 0.001 + 0.000 \\
\hline
\end{tabularx}
\label{tab:Elemental composition of the nine alloys}
\end{table}
\end{landscape}
\end{document}
and here is how it appears:
\documentclass...
and ends with\end{document}
. See the link for more details.width=0.9\linewidth
notwidth=0.9\textwidth
as\textwidth
is the original portrait textwidth insidelandscape
\pm
can't be used outside of math mode.