LaTeX forum ⇒ Graphics, Figures & TablesHow do I remove thick line and centre my text in the table? Topic is solved

Information and discussion about graphics, figures & tables in LaTeX documents.
ujjwal_11138
Posts: 4
Joined: Sun Mar 28, 2021 11:31 pm

How do I remove thick line and centre my text in the table?

Postby ujjwal_11138 » Tue Apr 06, 2021 6:59 am

Hi, I am trying to make a table but somehow I am getting a thick line (marked in red). How do I remove it?
Also, how do I centre my text in 'grades' column (see attached file)?
Attachments
latex_table_issue.JPG
latex_table_issue.JPG (109.7 KiB) Viewed 112 times

Bartman
Posts: 178
Joined: Fri Jan 03, 2020 2:39 pm

Postby Bartman » Tue Apr 06, 2021 8:07 am

Please create a Infominimal working example and don't insert its source code as a screenshot, but with the help of the editor, so that others can test it right here in the forum.

Remove the vertical line before the column type of the second \multicolumn command so that the thickness of the line is the same as that of the other lines.

You can replace the column type p with m of the array package or use the tabularx package and its column type suggested by me.

\documentclass{beamer}
\usepackage[english]{babel}
\usepackage{tabularx}% loads array
\usepackage{ragged2e}% provides \RaggedRight
\usepackage{showframe}

\begin{document}
{\renewcommand{\tabularxcolumn}[1]{>{\RaggedRight}m{#1}}
\begin{frame}{Course Work}
  \centering
  \footnotesize
  \begin{tabularx}{\linewidth}{|X|c|X|c|}
    \hline
    \multicolumn{1}{|c|}{Monsoon 2019--20} & Grades
    & \multicolumn{1}{c|}{Winter 2019--20} & Grades\\
    \hline
    Research Methodology and Statistics (MEC 591) & B 
    & Laser Processing of Materials (MED 553) & A+\\
    \hline
  \end{tabularx}
\end{frame}}
\end{document}

ujjwal_11138
Posts: 4
Joined: Sun Mar 28, 2021 11:31 pm

Postby ujjwal_11138 » Tue Apr 06, 2021 7:35 pm

Thanks a lot, Bartman. Sorry for the inconvenience. I will be more careful in future.


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 6 guests