0

The usual table commands are used to produce a table of rectangular shape that is uniform in the sense, that any two rows or any two columns contain same number of blocks.

However, to merge multiple rows or columns, the commands \multirow and \multicolumn are used.

But I was facing problem when creating following kind of table using \multirow or \multicolumn.

The problem was that the horizontal line command \hline was producing the line which was coming over all the columns, whereas, in the following table, the horizontal lines which are coming over first column are just top and bottom.

How can we make such table with some modification in use of \multirow and \multicolumn?

enter image description here


Edit:

\begin{center}
\begin{tabular}{|l|l|l|l|l|}
\hline
\multirow{1}{*}{No.}&\multicolumn{4}{l|}{Education}\\
\hline
0 & 2 & 3 & 4 & 5 \\
& 6 & 7 & 8 & 9 \\\hline
\end{tabular}
\end{center}
  • 1
    Use \cline{1-2} instead of \hline (in the rows without horizontal lines in the last columns). – TeXnician Aug 23 '18 at 8:41
  • Could you post a (full) code of what you've done so far? – Bernard Aug 23 '18 at 8:44
  • I tried this, to merge many rows/columns as an example. But here \hline was giving complete horizontal line (i.e. crossing all columns). I wanted it only from second column to last one). – Soluble Aug 23 '18 at 9:00
1
% \usepackage{multirow}
\begin{table}[]
\begin{tabular}{|l|l|l|l|l|}
\hline
\multirow{7}{*}{4.} & \multicolumn{4}{l|}{Education Qualification}                                 \\ \cline{2-5} 
                    & Degree             & DD-MM-Year & University / Institute & Specialization    \\ \cline{2-5} 
                    & Ph.D. Start Date   &            & \multirow{3}{*}{}      & \multirow{3}{*}{} \\ \cline{2-3}
                    & Date of Submission &            &                        &                   \\ \cline{2-3}
                    & Date of Defence    &            &                        &                   \\ \cline{2-5} 
                    & Masters:           &            &                        &                   \\ \cline{2-5} 
                    & Bachelors          &            &                        &                   \\ \hline
\multicolumn{5}{|l|}{(Add more rows if needed)}                                                    \\ \hline
\end{tabular}
\end{table}
  • For academic honesty I have to add that I used the online service www.tablesgenerator.com to provide this solution <:-) – Stefan Schroeder Aug 23 '18 at 18:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.