A partial solution to the format problem

One of my pet peeves is the format problem: there are too many mutually incompatible formats out there for you to choose from if you have some data you want to store and present to a large group of people. Since I don’t use sound or video (or even images) that much, the subset of this problem that I’m concerned with relates to text data.

The problem goes something like this: suppose I have a large-ish chunk of text that I want to send out to a lot of people, how should I do it? First off, we’re going to assume that we will be composing the text electronically on a computer, but we will have to hand it out both electronically and in print. Second, our goal is to have as few distinct copies of the text as possible so that we don’t have to go about editing a bunch of different files if we make a change. For the electronic copies, the end viewers should not have to install any special software to see what we send them.

The most common solution that the average computer user would use is to make a Word document. Like it or not, Word is a mostly universal format for exchanging documents. The chances that someone does not have Word installed is really quite slim. However, just because it’s popular doesn’t mean it’s good. Considering that I’m a Linux and Open Source enthusiast (and so are a lot of the people I communicate with) I can’t depend on them having Word and I feel slightly guilty about using something proprietary. Also, even if Word was free there are excellent arguments to made against using word processors in general and I agree with them.

Personally, I haven’t used Word for serious document creation for about 3 years now. However, the alternatives aren’t very easy to come up with. It’s taken me a few years, but I’ve finally come to a system that I can use full time. The main realization for me was that I create two main types of text documents: ones that will printed and given out to professors and other students, and electronic documents that I put on the web and I will not print myself. For a long time, I wanted a way to be able to do both in a single shot: I wanted a format where I could create good looking webpages as well as pretty print output. Unfortunately, I haven’t yet found anything that is quite so easy to use.

Instead I’ve settled for two partial solutions. For printing, the good news is that Latex is really the state of the art when it comes to preparing good looking print documents. I’ve never made documents in Word that looked as carefully put together as a Latex document. Sure there’s a learning curve, but it’s one that I’ll happily live with in exchange for great looking documents.

Technically Latex can be converted to HTML. But I’ve never done this because I’ve never really run a website in pure HTML In the old days, I used Dreamweaver and as I started blogging I used Blogger and now WordPress. It’s only recently that I started to keep a small site static in HTML. In the process of making this site, I’ve realized that the set of writings I print and distribute and the ones I put online, are mostly independent of each other. On my website for example I have a page about my computers. That’s something I can’t see myself printing to give to someone else. At the same time, I’ve done a lot of writing this semester that I haven’t put online because they are in a state of flux and I’m not ready to share them with the world at large yet.

it doesn’t make sense me to write a lot of Latex source for something that I could write using a plain-text markup and then convert to HTML. Also the advanced typesetting used by Latex is lost in webpages. Lately I’ve started using Markdown to write my webpages in plain text and then generate HTML which I can insert into templates. This is a very simple solution where the source is easy to read and create but the output looks good and is simple to generate.

What I’ve settled on is to use both Latex and Markdown/HTML, but independently of each other. Things that need to get printed, such as papers and later my theses, will be typeset in Latex where I’m guaranteed to have good looking output. Anything else that I put online (such as my site) will be Markdown¬† automatically converted to HTML.

Of course, this isn’t a complete solution at all. One the one hand, some of the things I write in Latex, I might want to put online someday. Then there are things like this blog that are neither Markdown nor Latex and that is something I haven’t talked about yet. But it’s a good start and it’s something that I find fairly comfortable using right now.

Using Latex for college papers

A few months ago I posted about how I was tired of Microsoft Word and was looking for an alternative. I had decided on Latex as a substitute because it was a plain-text format that easily translated to PDF. It also has great tools including Mactex for OS X and the Auctex package for Emacs. This semester in college has been the most writing intensive so far. I have an Engineering Professionalism and Ethics course that has regular memos, reading summaries and four longer papers (and planning sheets for most of the above). My digital circuits course also requires regular lab memos. I’m glad to say that I’ve been using Latex full time for all my writing.

During the past few months using Latex full-time, I’ve learned a few lessons which might be useful for anyone starting to use it for full time writing. Here’s a quick guide to get you on your feet with Latex for daily college life.

1. Get Latex.

First order of business: head over to the Latex website and find yourself a package that you like. If you’re on a Mac I highly recommend the Mactex distribution. It’s somewhat heavy, but certainly worth it as it will have you all set to get going. For Linux, it’s best to find a package for your distribution, but if you’re an Emacs user, the Auctex package will come in handy.

2. Find a good tutorial

I’ll admit, Latex can be a bit overwhelming for beginners. So it’s important to find a good tutorial. The official documentation page is a good starting point. I also found Getting to Grips with Latex to be a very good jump start guide. Once you start feeling comfortable, be sure to use Google to find tips and tricks to achieve what you want. With its long history, chances are someone has solved the problem you are facing. On the same note, you probably want to just learn as you go along instead of reading one of the tutorials chapter by chapter.

3. Build some templates

Latex can be a bit of a pain for quick documents, but it can become very effective once you start using it for larger projects. If you’re writing a lot of memos or a number of papers with the same general format, it would be best to spend some time and create a Latex format that you’re comfortable with. I’m currently using two such templates: One for memos which is set up with To:/From: fields and all the usual trappings of a memo, and another for longer papers set up with proper spacing, title page, table of contents, bibliographies, the works. Making these templates might take some work, especially if you need custom packages like I do, but believe me, they’re worth the trouble later.

4. Keep focused on the content

Coming from the WYSIWYG world of Word, it’s very tempting to continually typeset your work to see what it looks like. Here’s a suggestion: don’t. Latex is designed to handle the looks for you so that you can focus on content. Take advantage of the fact that you don’t have to worry about how your paper looks and what it says at the same time. I find it helpful to do at least two passes on my paper. One is where I just write, without seeing what it looks like. I focus 100% on content. I care about nothing besides getting my point across. I don’t even bother about page limits at this point. Once I’ve put down everything that I need saying, I start pruning. I do a typeset to check basic things like length and to make sure that I don’t have huge solid blocks of text. I’ll then start shortening (or lengthening) to get to the limit and then alter paragraph and section boundaries to make sure that the text flows properly. However, none of this done at the cost of the quality of my writing.

5. Look over the result

One of the consequences of using a system like Latex instead of Word is that it harder to edit on the fly. So make sure that the result (probably in PDF form) is what you want it to be, (typos, formatting errors etc). I generally go through everything two to three times to make sure that everything is how it should be.

Like many powerful tools, Latex will take you some time to get used to. But once you get used to the powerful and clean efficiency that it offers, you won’t want to go back to WYSIWYG again.