3

I'm making a schedule for my class and I'm having the damnest time getting a horizontal line to separate the two days of the week within one cell of the table (above the line is the first day of the week, and below the line is the second day of the week). I tried messing around with multirow, but I just couldn't get it work, because I just don't know enough about it.

Here you can see my poor attempt and just forcing it to happen, but it looks like garbage.

Basically column one will just have the week number, column two will have the dates of the week, column three will have some information about the week (usually a couple of \linebreaks), and column four will (usually) be two lines for one day above the horizontal line and two lines below the horizontal line.

Any help here would be glorious! :)

\documentclass{article}
\usepackage{array}
\usepackage{booktabs}
\usepackage[
top    = 0.80in,
bottom = 0.50in,
left   = 0.75in,
right  = 0.75in,
headsep= 0.15in]{geometry}

\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\begin{document}
    \begin{table}[h!]
        \centering
        \setlength{\extrarowheight}{0.75mm}
        \begin{tabular}{|C{0.97cm}|C{3.14cm}|L{5.6cm}|L{6.3cm}|}
            \hline
            \textbf{Week} & \textbf{Dates (Sun -- Sat)} & \multicolumn{1}{c|}{\textbf{Due Dates and Other Info}} & \multicolumn{1}{c|}{\textbf{What's the Plan This Week?}} \\
            \hline
            1 & 18 Aug -- 24 Aug & All quizzes will be submitted on Canvas (as a PDF) by 11:59pm on each Sunday listed below! & Intro \& Syllabus \linebreak MTH 1108 Review 1 \vspace{-3.25mm}\linebreak\vspace{-0.75mm}\rule{6.3cm}{0.4pt} MTH 1108 Review 2  \\
            \hline
            2 & 25 Aug -- 31 Aug & Sun, 25 Aug: Quiz 1 due! \linebreak Mon, 26 Aug: Last day to drop with 100\% refund & MTH 1108 Review 3 \vspace{-3.25mm}\linebreak\vspace{-0.75mm}\rule{6.3cm}{0.4pt} MTH 1108 Review 4 \\
            \hline
            3 & 01 Sept -- 07 Sept & Sun, 01 Sept: Quiz 2 due! \linebreak Mon, 02 Sept: Labor Day \linebreak Wed, 04 Sept: Last day to drop with 50\% refund & Graphing Review \linebreak \S 4.1 Graphs of Polynomial Functions \vspace{-3.25mm}\linebreak\vspace{-0.75mm}\rule{6.3cm}{0.4pt} Polynomials \linebreak \S 4.2 Theory of Polynomial Functions I \\
            \hline
        \end{tabular}
    \end{table}
\end{document}

Image

1
  • 1
    As you're using the booktabs package, why not remove all vertical rules, and use, for example, an itemize environment in the last column?
    – jlab
    Commented Aug 14 at 21:14

1 Answer 1

2
\documentclass{article}
\usepackage{array}
\usepackage{booktabs}
\usepackage[
  top    = 0.80in,
  bottom = 0.50in,
  left   = 0.75in,
  right  = 0.75in,
  headsep= 0.15in]{geometry}

\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}

\begin{document}

\begin{table}[htp!]
\centering
\setlength{\extrarowheight}{0.75mm}
\newcommand{\seprule}{%
  \par
  \vspace{\dimeval{-\ht\strutbox}}%
  \makebox[6.3cm]{\rule{\dimeval{6.3cm+2\tabcolsep}}{0.4pt}}%
  \vspace{\dimeval{-\dp\strutbox+\extrarowheight}}%
  \par
}

\begin{tabular}{|C{0.97cm}|C{3.14cm}|L{5.6cm}|L{6.3cm}|}
\hline
\textbf{Week}
  & \textbf{Dates (Sun -- Sat)}
  & \multicolumn{1}{c|}{\textbf{Due Dates and Other Info}}
  & \multicolumn{1}{c|}{\textbf{What's the Plan This Week?}} \\
\hline
1 & 18 Aug -- 24 Aug
  & All quizzes will be submitted on Canvas (as a PDF)
    by 11:59pm on each Sunday listed below!
  & Intro \& Syllabus

    MTH 1108 Review 1

    \seprule

    MTH 1108 Review 2  \\
\hline
2 & 25 Aug -- 31 Aug
  & Sun, 25 Aug: Quiz 1 due!
  
    Mon, 26 Aug: Last day to drop with 100\% refund
  & MTH 1108 Review 3 

    \seprule

    MTH 1108 Review 4 \\
\hline
3 & 01 Sept -- 07 Sept
  & Sun, 01 Sept: Quiz 2 due!

    Mon, 02 Sept: Labor Day

    Wed, 04 Sept: Last day to drop with 50\% refund & Graphing Review

    \S 4.1 Graphs of Polynomial Functions

    \seprule

    Polynomials \linebreak \S 4.2 Theory of Polynomial Functions I \\
\hline
\end{tabular}

\end{table}

\end{document}

output

2
  • I like it! Clean and easy! Any easy way to get the items in Week 2 to be aligned vertically, or should I just manually move them a bit with some \vspace?
    – Jon
    Commented Aug 14 at 21:45
  • @Jon Add spaces. I don't really think that this way of presenting the data would be clear for the reader.
    – egreg
    Commented Aug 15 at 7:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .