Sunday, January 30, 2011

LaTeX - Formatting & the command \newline (especially for tables)

Here is a great link to the Wikibooks site for LaTeX - Formatting. This is a great source for general things in LaTex such as quotes, font styles, symbols, paragraph formatting, lists, footnotes, etc.

Another formatting page that might be helpful:

http://pangea.stanford.edu/computing/unix/formatting/latexexample.php

Now, to the second part of the post. I had a hell of a time formatting a table in my thesis. Well, I hadn't really looked at tables so this was my first go. As you can see there are a myriad of help sites out there. However, I was looking for a simple command to start a new line in a cell of the table. We all know that the double-slash \\ works in paragraph or heading formatting. However, in tables it begins a new row. For some reason, I couldn't find what I was looking for, until I found it here:

http://tex.stackexchange.com/questions/3748/in-cell-newlines-in-tabular-environments.

(edit: If you are familiar with LaTeX then you probably already know this, but there is usually several ways to do something in LaTeX. This is the beauty of it, so independent and free. Anways, there were several ways to do the newline thing I was looking for (i.e. i tried to do a list, :/), but they all seemed too convoluted for the simple task I was looking for.)

Of course the command was simple and straightforward, I was just thrown off by all the other table formatting stuff out there. The command is \newline, and it works great and was exactly what I was looking for. So for anyone else who had the same trouble as me here it is.

Here is the link to the main webpage I was on. It is a Q&A for TeX, LaTeX, ConTeXt, and related typesetting systems.

http://tex.stackexchange.com/

No comments:

Post a Comment