How to produce the following table in LaTex:
I tried the following:
\documentclass[10pt, a4paper]{article}
%Some packages I commonly use.
\usepackage{graphicx}
\usepackage[colorlinks]{hyperref}
\usepackage{xcolor} %For coloring texts and objects
\usepackage{enumerate}
\usepackage{enumitem}
\usepackage{booktabs}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{amssymb}
\usepackage[utf8]{inputenc} % to allow characters beyond ASCII (e.g. à, ü, č ...)
\usepackage[top=1 in,bottom=1in, left=1 in, right=1 in]{geometry}
\usepackage{lipsum}
%\usepackage{authblk} %For Author Titling and affiliating Purpose
\begin{document}
\begin{tabular}{ |p{2.5cm}|p{2cm}|p{2cm}|p{2cm}|p{1.2cm}|p{1.2cm}|p{3cm}|}
\hline
\multirow{2}{*}{Name of Student / Teacher} &
\multirow{2}{*}{Years of Study} &
\multicolumn{2}{c|}{Subjects} &
\multirow{2}{*}{Years of Passing} &
\multirow{2}{*}{Class/rank /distinction} &
\multirow{2}{*}{University/ Institute} \\
\cline{3-4}& & Main & Subsidiary & & & \\
\hline
Science & 2013-2016 & Mathematics & Physcs, Chemistry & 1929 & & Name of the University Here\\
\hline
Name & 2016-2018 & Biology & Chems & 1997 & & University Name Here\\
\hline
(Last item) & & & & & &\\
\hline
\end{tabular}
\end{document}
But my texts in the cells are getting overlapped with each other.
My Output
How can I fix this? Thanks.
EDIT As suggested in the comments I modified it as follows
\documentclass[10pt, a4paper]{article}
%Some packages I commonly use.
\usepackage{graphicx}
\usepackage[colorlinks]{hyperref}
\usepackage{xcolor} %For coloring texts and objects
\usepackage{enumerate}
\usepackage{enumitem}
\usepackage{booktabs}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{amssymb}
\usepackage[utf8]{inputenc} % to allow characters beyond ASCII (e.g. à, ü, č ...)
\usepackage[top=1 in,bottom=1in, left=1 in, right=1 in]{geometry}
\usepackage{lipsum}
%\usepackage{authblk} %For Author Titling and affiliating Purpose
\begin{document}
\begin{tabular}{ |p{2.5cm}|p{2cm}|p{2cm}|p{2cm}|p{1.2cm}|p{1.2cm}|p{3cm}|}
\hline
\multirow{2}{=}{Name of Student / Teacher} &
\multirow{2}{=}{Years of Study} &
\multicolumn{2}{c|}{Subjects} &
\multirow{2}{=}{Years of Passing} &
\multirow{2}{=}{Class/rank /distinction} &
\multirow{2}{=}{University/ Institute} \\
\cline{3-4}& & Main & Subsidiary & & & \\
\hline
Science & 2013-2016 & Mathematics & Physcs, Chemistry & 1929 & & Name of the University Here\\
\hline
Name & 2016-2018 & Biology & Chems & 1997 & & University Name Here\\
\hline
(Last item) & & & & & &\\
\hline
\end{tabular}
\end{document}
New OUtput
Still it's not that what I want.
\multirow{2}{=}
instead of\multirow{2}{*}
could be the first step.;-)