我正在尝试改善长桌的外观

我正在尝试改善长桌的外观

我正在尝试改善我的长桌的美观度。对于每个小瓶,我测量了三个质量。为了避免列标题冗余,我想知道是否可以在三个质量列顶部添加一个附加标题(质量 (g)),并且每列都可以替换为(1、2 或 3):

     Mass(g)
1      2     3

我已附上样本:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{achemso}
\bibliographystyle{achemso}
\usepackage[table]{xcolor}
\usepackage{graphicx}
\usepackage[labelfont=bf]{caption}
\captionsetup{belowskip=10pt,aboveskip=10pt}
\usepackage[a4paper,margin=1in]{geometry}
\usepackage{xstring}
\usepackage{xfrac}
\usepackage{indentfirst}
\usepackage{changes}
\usepackage{titlesec}
\titlespacing{\subsubsection}{0pt}{\parskip}{-2ex}


%To position the image at the top
%\makeatletter
%\setlength{\@fptop}{0pt}
%\makeatother

%Load math packages
\usepackage{amsmath}
\usepackage{amssymb}

%Make cell space and scientific notation
\usepackage{longtable, cellspace, booktabs}
\setlength\cellspacetoplimit{4pt}
\setlength\cellspacebottomlimit{4pt}

\usepackage{siunitx}
\sisetup{scientific-notation = true}

%To generate scientific notation later-on
\providecommand{\sci}[1]{\protect\ensuremath{\times 10^{\StrSubstitute[0]{#1}{e}{}}}}
\setlength\fboxsep{0pt}
\begin{document}
\begin{minipage}[c]{5cm}
  \includegraphics[width=7cm]{Concordia_Logo2.png}
\end{minipage}
\begin{minipage}[c]{10cm}
  \begin{flushright}
    Johnathan

    %\hspace*{0pt}
    \underline{Student ID:} 12

    %\hspace*{0pt}
    Laboratory report \#3\\
    CHEM221

  \end{flushright}
\end{minipage}

\vspace{3em}
\centerline{\Large\textbf{Fractional distillation}}
\title{Lab report3}
\author{johnathan }
\date{November 2015}


\section{Results}

\begin{longtable}{*{5}{l}}%Cr *{6}{l}SS
  \caption{Masses of collected distillates for substance \#105}\\
  \toprule
 Vial  & Mass1 (\SI{}{\gram}) & Mass2 (\SI{}{\gram}) & Mass3 (\SI{}{\gram})\\ 
  \midrule
  \endfirsthead
  \endfoot
  \bottomrule
    \caption*{In vial\#4, the same 1\SI{}{\milli\liter} was measured and added three times iteratively (i.e. 1\SI{}{\milli\liter}, 2\SI{}{\milli\liter}, 3\SI{}{\milli\liter}) because there was not enough distillate.}
  \endlastfoot
1 & 0.945 & 1.861 & 2.736 \\
2 & 0.897 & 1..814 & 2.648 \\
3 & 0.877 & 1.736 & 2.554 \\
4 & 0.860 & 1.689 & 2.521 \\

\end{longtable}
\end{document}

这是我的徽标:

在此处输入图片描述

非常感谢您的宝贵时间!

答案1

我不确定是否longtable根本不需要或者实际数据是否更长。

我认为以下内容是一个很好的起点。

\documentclass{article}
\usepackage[labelfont=bf]{caption}
\captionsetup{belowskip=10pt,aboveskip=10pt}
\usepackage[a4paper,margin=1in]{geometry}
\usepackage{longtable,booktabs}

\usepackage{siunitx}
\sisetup{scientific-notation = true}

\begin{document}

\begin{longtable}{c*{3}{S[table-format=1.3,scientific-notation=false]}}
    \caption{Masses of collected distillates for substance \#105}\\
    \toprule
    Vial & \multicolumn{3}{c}{Mass (\si{\gram})}\\
    \cmidrule(lr){2-4}
    & {1}                 & {2}                 & {3}\\
    \midrule
\endfirsthead
\endfoot
\bottomrule
\caption*{In vial \#4, the same \SI{1}{\milli\liter} was measured and added three times iteratively (i.e. \SI{1}{\milli\liter}, \SI{2}{\milli\liter}, \SI{3}{\milli\liter}) because there was not enough distillate.}
\endlastfoot
1 & 0.945 & 1.861 & 2.736 \\
2 & 0.897 & 1.814 & 2.648 \\
3 & 0.877 & 1.736 & 2.554 \\
4 & 0.860 & 1.689 & 2.521 \\
\end{longtable}
\end{document}

相关内容