标题位置“左上方标题”

标题位置“左上方标题”

我需要将表格的标题设置为左上方,如下所示,而不是像这样。 案件 目标

“这个问题的答案问题没有用”。

\documentclass[review]{elsarticle}

 \usepackage{caption}

 \usepackage{tabularx}
 \usepackage{rotating}
 \usepackage{array}
 \usepackage{booktabs}
 \usepackage{ltablex,booktabs}
 \usepackage{lineno,hyperref}
 \begin{table*}[hbt]

 \setlength{\tabcolsep}{1.5pc}

 \newlength{\digitwidth} \settowidth{\digitwidth}{\rm 0}
 \catcode`?=\active \def?{\kern\digitwidth}
 \caption{Biologically treated effluents (mg/l)}
 \label{tab:effluents}
 \begin{tabular*}{\textwidth}{@{}l@{\extracolsep{\fill}}rrrr}
 \hline
              & \multicolumn{2}{l}{Pilot plant} 
              & \multicolumn{2}{l}{Full scale plant} \\
 \cline{2-3} \cline{4-5}
              & \multicolumn{1}{r}{Influent} 
              & \multicolumn{1}{r}{Effluent} 
              & \multicolumn{1}{r}{Influent} 
              & \multicolumn{1}{r}{Effluent}         \\
 \hline
 Total cyanide    & $ 6.5$ & $0.35$ & $  2.0$ & $  0.30$ \\
 Method-C cyanide & $ 4.1$ & $0.05$ &         & $  0.02$ \\
 Thiocyanide      & $60.0$ & $1.0?$ & $ 50.0$ & $ <0.10$ \\
 Ammonia          & $ 6.0$ & $0.50$ &         & $  0.10$ \\
 Copper           & $ 1.0$ & $0.04$ & $  1.0$ & $  0.05$ \\
 Suspended solids &        &        &         & $<10.0?$ \\
 \hline
 \multicolumn{5}{@{}p{120mm}}{Reprinted from: G.M. Ritcey,
                         Tailings Management,
                         Elsevier, Amsterdam, 1989, p. 635.}
 \end{tabular*}
 \end{table*}
  \end{document}

答案1

这里的关键是将显示的标题更改为Biologically treated effluents (mg/l)\hfill\mbox{},并添加\hfill

\documentclass[review]{elsarticle}
\usepackage[margin=1cm]{geometry}
\usepackage{caption}

\usepackage{tabularx}
\usepackage{rotating}
\usepackage{array}
\usepackage{booktabs}
\usepackage{ltablex,booktabs}
\usepackage{lineno,hyperref}
\begin{document}
\listoftables
\begin{table*}[hbt]

 \setlength{\tabcolsep}{1.5pc}

 \newlength{\digitwidth} \settowidth{\digitwidth}{\rm 0}
 \catcode`?=\active \def?{\kern\digitwidth}
 \caption[Biologically treated effluents (mg/l)]{%
  Biologically treated effluents (mg/l)\hfill\mbox{}}
 \label{tab:effluents}
 \begin{tabular*}{\textwidth}{@{}l@{\extracolsep{\fill}}rrrr}
 \hline
              & \multicolumn{2}{l}{Pilot plant} 
              & \multicolumn{2}{l}{Full scale plant} \\
 \cline{2-3} \cline{4-5}
              & \multicolumn{1}{r}{Influent} 
              & \multicolumn{1}{r}{Effluent} 
              & \multicolumn{1}{r}{Influent} 
              & \multicolumn{1}{r}{Effluent}         \\
 \hline
 Total cyanide    & $ 6.5$ & $0.35$ & $  2.0$ & $  0.30$ \\
 Method-C cyanide & $ 4.1$ & $0.05$ &         & $  0.02$ \\
 Thiocyanide      & $60.0$ & $1.0?$ & $ 50.0$ & $ <0.10$ \\
 Ammonia          & $ 6.0$ & $0.50$ &         & $  0.10$ \\
 Copper           & $ 1.0$ & $0.04$ & $  1.0$ & $  0.05$ \\
 Suspended solids &        &        &         & $<10.0?$ \\
 \hline
 \multicolumn{5}{@{}p{120mm}}{Reprinted from: G.M. Ritcey,
                         Tailings Management,
                         Elsevier, Amsterdam, 1989, p. 635.}
 \end{tabular*}
 \end{table*}
\end{document}

在此处输入图片描述

答案2

答案对我有用。我借此机会将\hlines 和\clines 替换为规则,booktabs因为您加载了它,并在 中的表格底部键入了引用\footnotesize。我认为如果居中,第一行中的两个\multicolumns 看起来会更好。最后:我使用了tabularx而不是tabular*

\documentclass[review]{elsarticle}

\usepackage{caption}

\usepackage{tabularx}
\usepackage{rotating}
\usepackage{array}
\usepackage{booktabs}
\usepackage{ltablex,booktabs}
\usepackage{lineno,hyperref}

\begin{document}

\begin{table*}[!hbt]
\setlength{\tabcolsep}{1.5pc}
\captionsetup{singlelinecheck = false}
\newlength{\digitwidth} \settowidth{\digitwidth}{\rm 0}
\catcode`?=\active \def?{\kern\digitwidth}
\caption{Biologically treated effluents (mg/l)}
\label{tab:effluents}
\begin{tabularx}{\textwidth}{@{}lrrrr}
\toprule
             & \multicolumn{2}{c}{Pilot plant}
             & \multicolumn{2}{c}{Full scale plant} \\
\cmidrule(lr){2-3} \cmidrule(lr){4-5}
             & \multicolumn{1}{r}{Influent}
             & \multicolumn{1}{r}{Effluent}
             & \multicolumn{1}{r}{Influent}
             & \multicolumn{1}{r}{Effluent} \\
\hline
Total cyanide & $ 6.5$ & $0.35$ & $ 2.0$ & $ 0.30$ \\
Method-C cyanide & $ 4.1$ & $0.05$ & & $ 0.02$ \\
Thiocyanide & $60.0$ & $1.0?$ & $ 50.0$ & $ <0.10$ \\
Ammonia & $ 6.0$ & $0.50$ & & $ 0.10$ \\
Copper & $ 1.0$ & $0.04$ & $ 1.0$ & $ 0.05$ \\
Suspended solids & & & & $<10.0?$ \\
\bottomrule
\multicolumn{5}{@{}p{120mm}}{\footnotesize Reprinted from: G.M. Ritcey,
                        Tailings Management,
                         Elsevier, Amsterdam, 1989, p. 635.}
\end{tabularx}
\end{table*}

\end{document} 

在此处输入图片描述

相关内容