Graphics, Figures & TablesMissing borders when using multirow and multicolumn?

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
cdrjameson
Posts: 2
Joined: Thu Jan 09, 2014 3:16 pm

Missing borders when using multirow and multicolumn?

Post by cdrjameson »

I am attempting some simple exercises from an old Latex manual and I have reproduced a table except the bottom right cell is missing the bottom half of the right border.

The cell is a nested multirow within a multicolumn declaration, that is, it is effectively a 2x2 cell with borders around the sides. The bottom half of the cells right border is missing like this:


Image
Here is my code; I believe the error will be somewhere in the second to last declaration.

Code: Select all

\documentclass{article}
\usepackage{multirow}
\begin{document}
\begin{tabular}{|l||c|l|c|l|c|l|}\hline

\multirow{3}{*}{\vspace{-1.1em}{Day}}&\multicolumn{2}{|c|}{6.15--7.15 pm}&\multicolumn{2}{|c|}{7.20--8.20 pm}&\multicolumn{2}{|c|}{8.30--9.30 pm}\\ \cline{2-7}
&\multirow{2}{*}{Subj.}&Teacher&\multirow{2}{*}{Subj.}&Teacher&\multirow{2}{*}{Subj.}&Teacher\\ \cline{3-3}\cline{5-5}\cline{7-7}
&&Room&&Room&&Room\\ \cline{1-7}

\hline \hline \multirow{2}{*}{Mon.}&\multirow{2}{*}{UNIX}&Dr.~Smith&\multirow{2}{*}{FORTRAN}&Ms.~Clarke&\multirow{2}{*}{Num.~Math.}&Mr.~Mills\\ \cline{3-3} \cline{5-5} \cline{7-7}

&&Comp.~Ctr&&Hall A&&Hall A\\ \cline{1-7}

\multirow{2}{*}{Tues.}&\multirow{2}{*}{\LaTeX}&Miss Baker&\multirow{2}{*}{FORTRAN}&Ms.~Clarke&\multirow{2}{*}{Num.~Math.}&Mr.~Mills\\ \cline{3-3} \cline{5-5} \cline{7-7}

&&Conf.~Room&&Conf.~Room&&Hall A\\ \cline{1-7}

\multirow{2}{*}{Wed.}&\multirow{2}{*}{UNIX}&Dr.~Smith&\multirow{2}{*}{C Intro}&Dr.~Jones&\multirow{2}{*}{Comp.~Sci.}&Dr.~Jones\\ \cline{3-3} \cline{5-5} \cline{7-7}

&&Comp.~ Ctr&&Hall B&&Hall B\\ \cline{1-7}

%Believe that the error is in the next section. Please help me find it....
\multirow{2}{*}{Fri.}&\multirow{2}{*}{\LaTeX}&Miss Baker&\multirow{2}{*}{C Advanced}&Ms.~Clarke&\multicolumn{2}{c|}{\multirow{2}{*}{canceled}}\\ \cline{3-3} \cline{5-5}

&&Conf.~Room&&Conf.~Room\\ \cline{1-7}

\end{tabular}
\end{document}
ELI5: I am a LATEX beginner.
Last edited by cdrjameson on Thu Jan 09, 2014 5:41 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

cdrjameson
Posts: 2
Joined: Thu Jan 09, 2014 3:16 pm

Missing borders when using multirow and multicolumn?

Post by cdrjameson »

My original code didn't have enough &s to fill the table. I solved this by adding an empty multi-column box as the last cell. This then created the border line as expected. Previously no border was being created I presume becasue the environment hadn't seen enough cells being filled.

The last line of the previous code has changed to

Code: Select all

&&Conf.~Room&&Conf.~Room&\multicolumn{2}{c|}{}\\ \cline{1-7}
Post Reply