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.

Guys, I am one the process of mastering LaTeX, so that later when times come I shall be fully prepared to typeset almost anything without thinking twice. So during this awesome process, I am now encountering this tables on LaTeX. And they say that tables are the most boring, bad and worst aspect of the modern TeX-LaTeX.To quote-

However, if there is one area about LaTeX that I feel is the least intuitive, then I am afraid that this is tables.

So, after having read this statement from LaTeX wiki books, I stopped learning manually to type codes for LaTeX. I found the automated process of generating table codes for LaTeX from a Excel Add-in(Excel2LaTeX) and especially the LaTable by Alex Denisov are perfect for making tables. I tried some variations of tables and they seems to work perfectly and largely faster than the manual process anyway.

Real Question: Should I learn to manually code any types of tables, that needs to be made OR Should I just skip this part as automated process is perfect and go on to explorer other areas of LaTeX. So all LaTeX Guru's out there, What do you suggest ? I am in an dilemma. Don't know what to do. Suggestion of any kind will be truly appreciated. ;)

share|improve this question
1  
But Excel-style tables are not necessarily good publication tables, so perhaps you might point at what type of output you wish to produce. –  Joseph Wright Sep 4 '10 at 15:09
    
I am quite new to typesetting. The only table layout I know is the excel styles. I am pretty shocked to read your comment that excel-style tables are not necessarily good publication tables. Could you please suggest me some resources for the learning to design and build good publication tables. –  Ujjwol Sep 5 '10 at 12:20
    
The best resource is to use some packages such as booktabs as recommended by Jeffrey. Download also gutenberg.org/etext/29914 it is available in LaTeX code and can give you a lot of pointers. If you let us know what you are typesetting we can give you more pointers. –  Yiannis Lazarides Sep 5 '10 at 18:31
    
I am not sure what am I typesetting right now, because I have nothing to typeset. I am just learning. I will check that link. Thanks again. I just want to type standard as you said aesthetically right tables. –  Ujjwol Sep 6 '10 at 4:45
    
I think you'll find that most users here are in one stage or another of "mastering" LaTeX, and learning it in the abstract first before trying to typeset anything specific is somewhat impractical. –  Matthew Leingang Mar 29 '11 at 11:00

6 Answers 6

up vote 18 down vote accepted

The more you become familiar with TeX and LaTeX the more you will want to 'control' it. It only takes a few hours for someone to use a decent class with LaTeX. Tables are actually not that hard to produce with LaTex, but they are very visual. At a point you will want to manipulate how they look in more detail.

Learning LaTeX takes a few hours, mastering it will take a few years - and if you are still studying, as my late professor used to say - anyone that has mastered TeX/LaTeX deserves a PhD just for that.

When you master TeX/LaTeX you continue a tradition which is over 500 years - that of producing beautiful books. Knuth tried to make it easier for us, by incorporating - as he is fond of saying about 100 typographical rules in TeX. Lamport made it even easier (but left a few out on the way). Incorporating tables straight from an Excel plugin will result in your data being imprisoned in a grid that is both aesthetically wrong and in most instances unreadable. Tables need to be read like the normal text of a page.

share|improve this answer
    
Absolutely true! –  Joseph Wright Sep 4 '10 at 15:30
    
Thanks Yiannis for your reply. This mean I will have to learn coding tables in LaTeX. That is fine. So where can I get started ? What are the most popular and good packages to develop aesthetically correct and readable tables in LaTeX. I really appreciate your comment. –  Ujjwol Sep 5 '10 at 12:22
    
I just don't want up to using an less known and having low feature package by just randomly googling it. I want some experts opinions so that my goal of mastering LaTeX would be great. ;) –  Ujjwol Sep 5 '10 at 12:25

If you read any "how-to" manuals on constructing document-quality tables layout, make sure you include in this the first few pages of Simon Fear's documentation for the booktabs package. You'll very quickly start looking at table layouts with a discriminating "schooled" eye. From there you'll very quickly develop the motivation to educate yourself on the ins and outs of this. Do yourself a favour, read this doc; it's a reasonably quick read.

share|improve this answer
    
Thanks! I am just checking this tutorial. This seems amazing. –  Ujjwol Sep 5 '10 at 12:22

LaTable and the other Excel Plugin might provide a good basis to manage large data tables. But the produced LaTeX code will not look very nice and you might need to add additional effort, to reformat it in your favorite editor. LaTable might give you basic control over the table, but if you really go into details, you will need your editor -- and the possibility, to visualize the data in there in a readable way.

So my suggestion would be, to not use an external tool to create tables, but, if you need it, write your own skript to reformat large chunks of data. This might even flawless integrate into your editor and therefore your overall work flow.

share|improve this answer
    
How would that(writing my own script) be different from using automated programs ? I'm confused. –  Ujjwol Sep 5 '10 at 12:24
    
The outcome may be similar, but since you wrote it yourself, you have a deeper understanding, it is more compliant to your usual workflow, will integrate better in your workflow and is more closely tailored to your problem. Also, your might split it into several parts -- from the extraction from the datasource to final formating in your editor (add spacing...) –  MaoPU Sep 6 '10 at 4:36
    
Thanks-ah...I got it. –  Ujjwol Sep 6 '10 at 4:42

If it's the large quantity of data you don't wish to convert by hand from Excel (or some other spreadsheet program), then I suggest you convert it to comma separated values (or if you can choose the delimiter, choose &). Then you can use your favorite editor/scripting tool to replace all of the commas with & and add \\ at the end of every line. Then it's just a matter of writing the column specification.

Doing that will probably suffice for most cases. Some things might require more work, but that'll at least get your data into the format that LaTeX wants.

share|improve this answer
    
Are you saying this for standard LaTeX without any table packages or what ? –  Ujjwol Sep 5 '10 at 12:23
    
@Ujjwol: I'm not sure I understand your question. I always use the booktabs package. It was just a way to go from a large quantity of data in a spreadsheet, which you mentioned, into the format the tabular environment wants. –  TH. Sep 5 '10 at 21:10
    
I was just asking that Is booktabs the standard package that most of the people use for making tables in LaTeX. –  Ujjwol Sep 6 '10 at 4:43
    
There are a number of packages for making tables that do different things. The goal of booktabs is to make publication quality tables, and I think it does a great job so I use it whenever possible. –  TH. Sep 6 '10 at 6:20

I totally agree with you on the benefit of making table by Excel add-in. It's extremely handy in the case you just need to create "normal" tables - not a complex-structured ones, but there is a bunch of them!

Another great thing of creating tabular code from Excel is that, as doing research or statistics, many rows and columns are not raw material, they are the result calculating with different functions in Excel. If we want to create table Latex code by just writing, how can we deal with those calculated values?

share|improve this answer
    
For simple calculations: by looking at the accepted answer to this question. –  Hendrik Vogt Nov 21 '10 at 7:52

I would recommend learning the pgfplotstables package. It takes comma or tab or whatever delineated files, allows you to set calculations to generate new columns, typsets things prettily, and you still have a fair amount of control. For those situations where you need to merge columns, rows, and so on, look at multicolumn and multirow.

Tables in LaTeX are really not very hard. There isn't much syntax (&, \\,\hline, \cline), and there isn't a lot of complexity.

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.