0

I am wondering why the row that ends {equations of motion} does not close like the one above it.

\documentclass{article}

\usepackage{graphicx}
\usepackage{multirow}

\begin{document}
    \begin{table}[htbp]
      \centering

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

            \multicolumn{4}{|c|}{{\bf Name and theme of lesson:} Equations of motion}\\\hline
            \multicolumn{2}{|c|}{{\bf Subject area:} Linear motion & {\bf Class }RTU & {\bf No.}1\\ 
            \multicolumn{4}{|c|}{\bf Lesson objectives} Derive equations of motion\\\hline
            \multicolumn{4}{|c|}{\bf Material and resources:}Whiteboard, Marker\\...

      \end{tabular}
    \end{table}
    
\end{document}
1
  • 2
    Please, be aware that \bf has been deprecated for about 30 years.
    – egreg
    Sep 12, 2021 at 22:08

2 Answers 2

4

You should use

\multicolumn{4}{|c|}{{\bf bold text} normal text} \\

instead of

\multicolumn{4}{|c|}{\bf bold text} normal text \\

That is, the "normal text" should also be part of the 3rd argument of \multicolumn.

Full example, with {\bf ...} replaced with \textbf{...}

\documentclass{article}
\usepackage{multirow}

\begin{document}
\begin{tabular}{|c|c|c|c|}
  \hline
  \multicolumn{4}{|c|}
    {\textbf{Name and theme of lesson:} Equations of motion}
    \\ \hline
  \multicolumn{2}{|c|}
    {\textbf{Subject area:} Linear motion} 
    & \textbf{Class} RTU 
    & \textbf{No.}1
    \\ \hline
  \multicolumn{4}{|c|}
    {\textbf{Lesson objectives} Derive equations of motion}
    \\ \hline
  \multicolumn{4}{|c|}
    {\textbf{Material and resources:} Whiteboard, Marker} 
    \\ \hline
\end{tabular}
\end{document}

enter image description here

2
  • As far as I see, thble has three columns, why you define four?
    – Zarko
    Sep 13, 2021 at 7:49
  • @Zarko hmm I didn't even notice that :) Sep 13, 2021 at 13:11
0

With tabullaray package, for exercise:

\usepackage{tabularray}

\begin{document}
\begin{tblr}{hlines, vlines,
             colspec={lcc}
             }
\SetCell[c=3]{l} \textbf{Name and theme of lesson:} Equations of motion 
                                        &   &                           \\
\textbf{Subject area:} Linear motion    &   \textbf{Class} RTU
                                            & \textbf{No.} 1            \\
\SetCell[c=3]{l} \textbf{Lesson objectives:} Derive equations of motion
                                        &   &                           \\
\SetCell[c=3]{l} \textbf{Material and resources:} Whiteboard, Marker
                                        &   &                           \\
    \end{tblr}
\end{document}
  • as you can see, all lines in table are defined in table preamble
  • your table use only three rows, therefore in above MWE are defined three columns instead of four in your MWE
  • \SetCell[c=3]{l} ... is equivalent to multicolumn{3}{l}{ ... } in classic tables, however it consider vertical lines defined in table preamble

enter image description here

7
  • Thanks very much.
    – ofey
    Sep 13, 2021 at 1:17
  • say if I wished to crete something and then span 3 columns how can I try this? \hline \textbf{Pre-lesson check} & \multicolumn{3}{|l|}{}\\ \hline
    – ofey
    Sep 13, 2021 at 19:33
  • By the way I should have had I 4 columns.
    – ofey
    Sep 13, 2021 at 19:35
  • I understand \bf is deprecated in favour of \textbf..
    – ofey
    Sep 13, 2021 at 19:37
  • @ShaneG, from your question doesn't follow, that shoed table has only three columns. If this is not a case, please make your question more clear. Other comment I not understand. It may be helpful to read some introductory text about table settings, for example en.wikibooks.org/wiki/LaTeX/Tables
    – Zarko
    Sep 13, 2021 at 19:46

You must log in to answer this question.

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