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 recreate this table in latex table in word

So far I've managed to get this enter image description here

Using this:

\begin{table}[h]
\begin{table}[h]
\begin{tabular}{|l|l|p{10cm}|}
\hline
\multicolumn{3}{|c|}{\textbf{Daily Log}}\\ \hline
\multicolumn{2}{|l|}{Student Name: My Name} & Student Number: 9999999 \\ \hline
\multicolumn{3}{|l|}{Company Name: A Company Name - Some more text} \\ \hline
Day                     & Date                     & Activities   \\ \hline
1                       & 11/11/13                 & A few sentences of text need to go here for every row from now on\\ \hline
2                       &                          &     \\ \hline
\end{tabular}
\end{table}

But I can't get the Student Number cell to move across without affecting the size of the activities cell. Similarly I want the date cells to be as small as possible but I can't do that because of the size of the student name cell. So really what I guess I'm really asking is, is there a way to change the width of a column on a per row basis?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

You can use an inner tabular:

\documentclass{article}


\begin{document}
\begin{table}[h]
\begin{tabular}{|l|l|p{10cm}|}
\hline
\multicolumn{3}{|c|}{\textbf{Daily Log}}\\ \hline
\multicolumn{2}{|l}{Student Name: My Name} &            %% note |l
 %% from here
  \multicolumn{1}{l|}{\begin{tabular}[t]{p{1in}|l}      %% adjust 1in as you like
     & Student Number: 9999999 
     \end{tabular}}\\\hline
 %% till here
\multicolumn{3}{|l|}{Company Name: A Company Name - Some more text} \\ \hline
Day                     & Date                     & Activities   \\ \hline
1                       & 11/11/13                 & A few sentences of text need to go here for every row from now on\\ \hline
2                       &                          &     \\ \hline
\end{tabular}%
\end{table}
\end{document}

enter image description here

I get bad box as your table is too wide. Hope in your real document, you have adjusted this properly.

share|improve this answer
    
Awesome, Thank you very much, that works great. –  user50497 Apr 25 at 3:54

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.