Latex 中的时间表

Latex 中的时间表

有人能指导我如何用 Latex 制作这张表格吗?我是编程新手,由于编程技能差,我无法完成这项工作。

在此处输入图片描述

已编辑:有人可以修复最后一行显示“已取消”的最后一列吗?

在此处输入图片描述

这是我的编码,

\begin{tabular}{|l|c|l|c|l|c|l|} \hline

&\multicolumn{2}{||c|}{6.15-7.15 pm}
&\multicolumn{2}{|c|}{7.20-8.20 pm}
&\multicolumn{2}{|c||}{8.30-9.30 pm}\\ \hline \hline

\multirow{3}{*}{Day} &\multirow{3}{*}{Subj.} &Teacher & &Teacher &\multirow{3}{*}{Subj.}&Teacher\\ \cline{3-3} \cline{5-5} \cline{7-7}& &Room
&\multirow{1}{*}{Subj.} &Room &  &Room \\ \hline

\multirow{3}{*}{Mon} &\multirow{3}{*}{UNIX} &Dr. Smith & &Ms. Clarke  &\multirow{3}{*}{Math.}&Mr.Mills\\ \cline{3-3} \cline{5-5} \cline{7-7} & &Comp. Ctr
&\multirow{1}{*}{Fortran} &Hall A &  &Hall A \\ \hline

\multirow{3}{*}{Tues} &\multirow{3}{*}{LaTex} &Miss Baker & &Ms. Clarke  &\multirow{3}{*}{Math.}&Mr.Mills\\ \cline{3-3} \cline{5-5} \cline{7-7} & &Conf. Room
&\multirow{1}{*}{Fortran} &Conf.Room &  &Hall A \\ \hline

\multirow{3}{*}{Wed} &\multirow{3}{*}{UNIX} &Dr. Smith & &Dr. Jones &\multirow{3}{*}{ComSci}&Dr.Jones\\ \cline{3-3} \cline{5-5} \cline{7-7} & &Comp. Ctr
&\multirow{1}{*}{C} &Hall B &  &Hall B \\ \hline

\multirow{3}{*}{Fri} &\multirow{3}{*}{LaTex} &Miss Baker & &Ms. Clarke  &\multirow{3}{*}{Cancelled } & \\ \cline{3-3} \cline{5-5} & &Conf. Room &\multirow{1}{*}{C++} &Conf.Room &  &  \\ \hline

\end{tabular}

答案1

这是你想要的东西吗?

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{array, multirow}

\newlength{\lA}\settowidth{\lA}{ComSci}
%\setlength{\lA}{2cm}
\newlength{\lB}\settowidth{\lB}{Conf. Room}

\usepackage{cellspace}
\setlength\cellspacetoplimit{6pt}
\setlength\cellspacebottomlimit{4pt}

\begin{document}

\begin{center}
  \begin{tabular}{|l|>{\centering}m{\lA}|m{\lB}|>{\centering}m{\lA}|S{m{\lB}}|>{\centering}m{\lA}|m{\lB}|}%
    \cline{2-7}
    \multicolumn{1}{c|}{} & \multicolumn{2}{@{\,}|Sc|}{6.15-7.15 pm}
    & \multicolumn{2}{c|}{7.20-8.20 pm}
    & \multicolumn{2}{c||}{8.30-9.30 pm}\\
    \cline{2-7} \hline
    \multirow{2}{*}[-0.7ex]{Day} & \multirow{2}{*}[-0.7ex]{Subj.} & Teacher & \multirow{2}{*}[-0.7ex]{Subj.} & Teacher & \multirow{2}{*}[-0.7ex]{Subj.} & Teacher \\%
    \cline{3-3} \cline{5-5} \cline{7-7}
                                  & & Room & & Room & & Room \\
    \hline
    \multirow{2}{*}[-0.7ex]{Mon} & \multirow{2}{*}[-0.7ex]{UNIX} & Dr. Smith & \multirow{2}{*}[-0.7ex]{Fortran} & Ms. Clarke & \multirow{2}{*}[-0.7ex]{Math.} & Mr.Mills \\ %
    \cline{3-3} \cline{5-5} \cline{7-7} & & Comp. Ctr
    & & Hall A & & Hall A \\
    \hline
    \multirow{2}{*}[-0.7ex]{Tues} & \multirow{2}{*}[-0.7ex]{LaTeX} & Miss Baker & \multirow{2}{*}[-0.7ex]{Fortran} & Ms. Clarke & \multirow{2}{*}[-0.7ex]{Math.} & Mr.Mills \\ %
    \cline{3-3} \cline{5-5} \cline{7-7}
                                  & & Conf. Room & & Conf.Room & & Hall A \\
    \hline
    \multirow{2}{*}[-0.7ex]{Wed} & \multirow{2}{*}[-0.7ex]{UNIX} & Dr. Smith & \multirow{2}{*}[-0.7ex]{C} & Dr. Jones & \multirow{2}{*}[-0.7ex]{ComSci} & Dr.Jones \\%
    \cline{3-3} \cline{5-5} \cline{7-7}
                                  & & Comp. Ctr & & Hall B & & Hall B \\
    \hline
    \multirow{2}{*}[-0.7ex]{Fri} & \multirow{2}{*}[-0.7ex]{LaTeX} & Miss Baker & \multirow{2}{*}[-0.7ex]{C++} & Ms. Clarke & \multicolumn{2}{c|}{\multirow{2}{*}[-0.7ex]{Cancelled }} \\ %
    \cline{3-3} \cline{5-5}
    & & Conf. Room & & Conf.Room & \multicolumn{2}{c|}{} \\
    \hline
  \end{tabular}
\end{center}

\end{document} 

在此处输入图片描述

相关内容