Skip to main content

Latex Table with multirow



If you ever have to make a table, where you need multiple lines for one entry, this is one way to do it:

 \usepackage{multirow}

\begin{table} 
\makebox[\textwidth][c]{     
\begin{tabular}{ccccccc c cccc}       
  \multirow{2}{*}{Time} & \multirow{2}{*}{Cln3} & 
    \multirow{2}{*}{MBF} & \multirow{2}{*}{SBF} & 
    \multirow{2}{*}{Cln1,2} & \multirow{2}{*}{Cdh1} &
    \multirow{2}{*}{Swi5} & 
    Cdc20 and & % This is the part to be split
    \multirow{2}{*}{Clb5,6} & \multirow{2}{*}{Sic1} & 
    \multirow{2}{*}{Clb1,2} & \multirow{2}{*}{Mcm1/SFF}\\       
  &&&&&&& Cdc14 \\  % This is the second row     
  \hline       
  1&1&0&0&0&1&0&0&0&1&0&0\\       
  2&0&1&1&0&1&0&0&0&1&0&0\\     
  3&0&1&1&1&1&0&0&0&1&0&0\\      
  4&0&1&1&1&0&0&0&0&0&0&0\\     
  5&0&1&1&1&0&0&0&1&0&0&0\\     
  6&0&1&1&1&0&0&0&1&0&1&1\\      
  7&0&0&0&1&0&0&1&1&0&1&1\\     
  8&0&0&0&0&0&1&1&0&0&1&1\\     
  9&0&0&0&0&0&1&1&0&1&1&1\\     
  10&0&0&0&0&0&1&1&0&1&0&1\\     
  11&0&0&0&0&1&1&1&0&1&0&0\\      
  12&0&0&0&0&1&1&0&0&1&0&0\\      
  13&0&0&0&0&1&0&0&0&1&0&0\\       
  \hline     
\end{tabular} 
}  
\caption{Temporal evolution of cell-cycle network}  
\label{table:timecourse} 
\end{table}

Comments

Popular posts from this blog

Uploading a file with JQuery

You can easily submit data in an html form via jQuery's $.post. But you need to do a little more to upload a file. I suggest the jQuery Form Plugin . Here is the HTML form: <html> <head> <title>Title</title> </head> <body> <form action="/test.cgi" enctype="multipart/form-data" method="post"> <input name="myFile" type="file" /> <div id="results"> </div> </form> </body> </html> This is the Javascript file myFrom.js: $(document).ready(function() { $('form').ajaxForm( { beforeSubmit: function() { $('#results').html('Submitting...'); }, success: function(data) { var $out = $('#results'); $out.html('Your results:'); $out.append('<div><pre>'+ data +'</pre></div>'); ...

Latex: Centering table larger than textwidth

Usually, you can center tables with \center. But when the table is longer than the \textwidth, it will be align with the left side margin. You can temporarily adjust the textwidth. % allows for temporary adjustment of side margins \usepackage{chngpage} \begin{table}     \begin{adjustwidth}{-.5in}{-.5in}          \begin{center}         \begin{tabular}{|c|}             \hline And here comes a very long line. And here comes a very long line. And here comes a very long line.  \\             \hline         \end{tabular}         \caption{This Table is longer than the text width. And its caption is really long, too. This Table is longer than the text width. And its caption is really long, too. This Table is lo...

Vagrant up in the cloud (DigitalOcean)

It's quick and easy to start your virtual machine in the cloud if you use vagrant. Like, 55 seconds fast. I find it especially handy for toy projects that I need on the web quickly or when I don't want another virtual machine to gobble up resources on my laptop. I'm going through the steps for DigitalOcean. It's similarly easy for Amazon Web Services (AWS), but I find their web interface somewhat discombobulated. A word on pricing : if you use the cloud for a small project it's basically free. A full day on Digital Oceans costs 16 cents. That's (hopefully) less than you tip on a cup of coffee. There are a lot of online coupons that'll get you through the first few months. AWS offers a full year for free, see http://aws.amazon.com/free/ . I'm assuming that you have vagrant installed and a Vagrantfile already written or generated with  vagrant init . Ok, let's get started! First, download the vagrant plugin. vagrant plugin install vagrant-digital...