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:
Comprehensive list of tools that simplify the generation of LaTeX tables

I'm writing an larger report for my bachelor project and I wonder if there where an easy way to create table, maybe and program that generates the code for my?, so I don't have to this way:

\begin{table}[position specifier]
\centering
\begin{tabular}{|l|}
... your table ...
\end{tabular}
\caption{This table shows some data}
\label{tab:myfirsttable}
\end{table}

Right now im using word to create the tables, because my tables is to large and complicated to i want to do it manually.

share|improve this question

marked as duplicate by doncherry, Alan Munn, lockstep, egreg, Jake May 19 '12 at 17:45

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.

    
You can use the auto-completion of vim ;-) –  Marco Daniel May 19 '12 at 15:33

3 Answers 3

up vote 2 down vote accepted

Since you use Word, have a look at excel2latex, a plugin for MS Excel which allows you to create tables there and automatically generate corresponding LaTeX code.

TeXMaker moreover has an integrated table assistant.

share|improve this answer
    
For some reason, i can't see the two buttons with the excel2latex on my mac –  mortenstarck May 19 '12 at 22:53
    
Apparently there's a general Visual Basic support issue with Office Mac (see e.g. here). The excel2latex release notes on CTAN list Office Mac compatibility as restored for Version 3.1, which is however not provided for download there. It can be found in the code repository. Should v3.1 not be compatible, this bug report claims that older version 2.0 might help (Office 2011). –  dgs May 20 '12 at 7:59

You can use the PGFplotstable package, with it you can create automatic tables on a easy way, from text files or with other options, avoiding the basic way of latex for creating tables, here an example:

\documentclass{article}
\usepackage{pgfplotstable}
\usepackage{booktabs}
\begin{document}
\begin{table}[h!]\centering
        \pgfplotstableset{% global config, for example in the preamble
            % these columns/<colname>/.style={<options>} things define a style
            % which applies to <colname> only.
            every head row/.style={before row=\toprule,after row=\midrule},
            every last row/.style={after row=\bottomrule}
            }
        \pgfplotstabletypeset[% local config, applies only for this table
            1000 sep={\,},
            columns/info/.style={
            fixed,fixed zerofill,precision=1,showpos,
            column type=r,
            }
            ]
            {data.dat}
        \caption{Estimated Data.}
\end{table}
\end{document}

The booktabs package is a recommended package for the easy production of tables such as should appear in published scientific books and journals. It's a package for control the table appearance.

Using data.dat, generated with Matlab, that contains:

T   5   10  20  30  40  50
0.5 40.169  36.911  31.705  25.964  17.923  8.6679
0.48    40.331  36.948  31.962  26.768  18.893  8.6672
0.46    40.299  37.019  32.261  27.493  19.868  8.6684
0.44    39.97   36.794  32.373  28.077  21.081  8.6676
0.42    39.717  36.6    32.489  28.983  23.107  8.6665
0.4 39.216  36.275  32.212  29.197  24.14   8.6671
0.38    38.674  35.772  31.912  29.273  24.873  8.6678
0.36    38.225  35.219  31.543  29.217  25.037  8.667
0.34    37.519  34.656  31.112  28.883  24.458  8.6676
0.32    36.889  33.987  30.543  28.641  24.012  8.6659
0.3 36.302  33.23   30.249  28.288  23.568  8.6668
0.28    35.26   31.609  29.057  27.449  22.462  8.667
0.26    33.795  31.496  28.431  27.197  22.013  8.6667
0.24    34.821  31.93   28.825  26.59   21.428  8.6671
0.22    34.375  31.54   28.376  26.105  20.959  8.6673
0.2 33.82   30.955  27.677  25.183  20.013  8.6678

This generates:

enter image description here

share|improve this answer

Which editor do you use?

Some of editors (like kile which I prefer) have wizards that simplify table creation.

share|improve this answer

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