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.

I'm trying to build in latex this box:

enter image description here

I have been trying with this code:

\noindent\begin{tabular}{|c|c|c|c|}\hline
 \enc{cyan}{ NOMBRE }&\enc{cyan}{ $\text{1}^{\text{er}}$ APELLIDO } & \enc{cyan}{ $\text{2}^{\text{do}}$ APELLIDO } & \enc{cyan}{ CARN\'{E}/C\'{E}DULA } \\
  \hspace{4cm} & \hspace{4cm} & \hspace{4cm} & \hspace{5cm} \rule[10pt]{0pt}{12pt}\\\hline
\end{tabular}

\vspace{0.25cm}

\noindent\begin{tabular}{|c|c|c|}\hline
 \enc{cyan}{ CENTRO UNIVERSITARIO }&\enc{cyan}{ GRUPO} & \enc{cyan}{FECHA } \\
  \hspace{8cm} & \hspace{4cm} & \hspace{5cm} \rule[10pt]{0pt}{12pt} \\\hline
\end{tabular}
\vspace{0.25cm}

\noindent\begin{tabular}{|c|c|}\hline
 \enc{cyan}{ NOMBRE DEL PROFESOR QUE APLICA EL EXAMEN}&\enc{cyan}{FIRMA } \\
   \hspace{13cm} &  \hspace{4.1cm}  \rule[10pt]{0pt}{12pt}\\\hline
\end{tabular}

But, actually, this is not a "box", and I have problems with the vertical lines (it has not the same place). I thought to use the command \begin{tabular}{|c|c|c|} \end{tabular} but with this code I can not use an exactly hspace (I think).

What can I do?

share|improve this question
    
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces or enclose words in backticks `, they'll be marked as code, as can be seen in my edit. You can also highlight the code and click the “code” button (with “{}” on it). –  Tobi Aug 10 '12 at 17:01
    
@Tobi thank you very much :) –  Hiperion Aug 10 '12 at 17:06

1 Answer 1

up vote 6 down vote accepted

Maybe something like this:

\documentclass{article}
\usepackage{colortbl}

\begin{document}

\begin{tabular}{|c|c|c|c|}
\hline
\rowcolor[gray]{.8}
NOMBRE & 1 APELLIDO & 2 APELLIDO & CARNE/CEDULA\\
\hline
&&&\\[1em]
\hline
\rowcolor[gray]{.8}
\multicolumn{2}{|c|}{CENTRO UNIVERSITARIO} & GRUPO & FECHA\\
\hline
\multicolumn{2}{|c|}{} & & \\[1em]
\hline
\rowcolor[gray]{.8}
\multicolumn{3}{|c|}{NOMBRE DEL PROFESSOR QUE APLICA EL EXAMEN} & FIRMA\\\hline
\multicolumn{3}{|c|}{} & \\[1em]
\hline
\end{tabular}

\end{document}

This yields:

enter image description here

If you want the columns to be of equal width you could change the row &&&\\[1em] to

\hspace*{3cm}&\hspace*{3cm}&\hspace*{3cm}&\hspace*{3cm}\\[1em]

You can also play with the height 1em and the color and so on.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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