4

Good evening

I created a table (the source code below) and in this table I have some \multirow codes. Problem is I have not a right vertical line in this table (the picture below). I do not know fix it.

Thank you for help.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{longtable}
\usepackage{multirow}

\begin{document}

\Large
\begin{longtable}{|p{5cm}p{6cm}|}
  \hline
  text &  \multirow{2}{*}{some text} \\ 
  text\\
  \hline
  text &  \multirow{2}{*}{some text} \\ 
  text\\
  \hline
  text &  \multirow{2}{*}{some text} \\ 
  text\\
  \hline
\end{longtable}  

\end{document}

enter image description here

1 Answers1

4

You should change all four instances of text\\ to text & \\. (The extra & symbol forces LaTeX to "think" about the second column.)

Taking a broader view, you need to ask yourself, "What is the typographic point of the vertical lines along the right-hand and left-hand edges of the longtable environment?" What do these lines contribute -- other than impose a formidable visual barrier to the readers' eyes? Can the table get by without these vertical lines? (My answer: "Almost certainly yes.") Do give it a try without the vertical lines (and, relatedly, many of the horizontal lines as well). You'll be amazed how much more "open" and inviting the table will look.

Mico
  • 506,678