Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Possible Duplicate:
How to divide a table row into several columns?

I want to make a table. This is my code

\documentclass{article}

\usepackage{multirow}
\begin{document}

\begin{tabular}{| c | c | c | c |}
  \hline 
  \multirow{3}{*}{\textbf{TOTAL OF POINTS}} & \hspace{2.5cm} TEACHERS \hspace{2.5cm} & Number \\
                                                                   & (Name and sign)  & (President      \\
                                                                   &                                & Number of points) \\
  \hline                                                                   
First test\hspace{1cm} Second test &  & \\
                                                     &  &  \\
                                                     &  &  \\
   \cline{2-2}
                                                     &  &  \\
                                                     &  &  \\
                                                     &  &  \\               
                          \hline
\end{tabular}

\end{document}

How can I draw a line between First test and second test like the picture?

share|improve this question

marked as duplicate by doncherry, lockstep, Kurt, Martin Schröder, Qrrbrbirlbel Oct 25 '12 at 1:09

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Try nesting a table. –  JLDiaz Oct 24 '12 at 15:17
    
Please always get rid of all packages in your code that aren't necessary for your example, like I did in my edit. –  doncherry Oct 24 '12 at 20:46
add comment

1 Answer 1

up vote 12 down vote accepted

It's more natural to think of those as two separate columns, and to keep the table heads in a single multi-line cell, something like:

enter image description here

\documentclass[a4paper, 11pt]{article}
\usepackage[left=15mm,right=15mm,top=20 mm,bottom=20mm]{geometry}
\usepackage{graphicx}
\usepackage{longtable}
\usepackage{answers}
\usepackage{array}
\setlength\extrarowheight{3pt}
\begin{document}

\vspace{0.5 cm}
\begin{tabular}{| *2{>{\centering}m{3cm}| }
>{\centering\arraybackslash}m{5cm}|
>{\centering\arraybackslash}m{5cm}|}
  \hline 
\multicolumn{2}{|c|}{\textbf{TOTAL OF POINTS}} &
TEACHERS \par (Name and sign) &
Number (President Number of points) \\
  \hline                                                                   
First test & Second test &  & \\
                                               &      &  &  \\
                                                &     &  &  \\
   \cline{3-3}
                                                &     &  &  \\
                                                &     &  &  \\
                                                &     &  &  \\               
                          \hline
\end{tabular}

\end{document}
share|improve this answer
    
How to align this table fit width page? –  minthao_2011 Dec 23 '13 at 6:25
    
@minthao_2011 see tex.stackexchange.com/a/150987/1090 –  David Carlisle Dec 23 '13 at 11:09
add comment

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