For the Love of LaTeX

LaTeX LionBy coming the words love and latex in the same breath, I suspect that many of you will run away in abject horror, lest you hear me reveal some personal (and quite uninvited) revelation about my sex life. Fear not, gentle reader. I'm not discussing intimate matters, nor even the rubbery glove substance beloved by home lobotomists. Moreover, the LaTeX of which I refer is even pronounced differently: lay'-tech. I'm talking about a mark-up language with a long and proud heritage.

Now, I don't generally discuss technical matters very much in this venue. Many visitors come here to get away from such things. But there's something pure, something back-to-basics, about this for which certain among you (who have not already used it) might find an appreciation.

Once upon a time, many digital aeons ago, there lived a very smart man named Donald Knuth (well, he is still alive, but I use past tense for effect). In fact, he gave us two monumental works to usher in the information age: the ultimate programmer's bible (The Art of Computer Programming) and the typesetting known as TeX, pronounced tech with a hint of the Scottish word loch. The latter spawned a revolution -- for the first time, there was a way of typesetting books by a computer, and that didn't involve complicated processes and expert skills. A series of commands and scripts simplifying the process even more was created by Leslie Lamport, and thus was born LaTeX. To this day, many academic, scientific and mathematical journals, manuals and books are still created entirely in LaTeX.

The premise behind LaTeX is simple: write your text, insert a few simple mark-up commands (such as "\subsection{}" for a subsection, or "\emph{}" for emphasis), and let LaTeX produce a wonderfully typeset document with headers, footers, table of contents, index, bibliographies, figures, tables, and so forth. Modern variants create PDF files, complete with a clickable table of contents and inline links. If you can create simple HTML, you can produce quite a glorious document with all the bells and whistles. The typography itself is subtle, yet beautiful.

So what does this have to do with DIYPlanner.com? Several things.

First, I'm amazed at how many people have asked that I produce the forms in LaTeX, or have even tried it themselves. Now, LaTeX is quite easy to use, but not for anything so complicated in terms of layout. This is both a strength and weakness. On one hand, you can produce excellent and well-structured document layouts using its standard or default settings. It also discourages "Word-itis," the seemingly random formatting employed by anyone discovering the font menu in Word, to the woe of all his or her readers. On the other hand, if you want to produce a specialised layout, especially a one-off, you're far better sticking to InDesign or Quark. As such, anyone holding their breath for a D*I*Y Planner LaTeX version may expect to turn blue any time now.

Second, one thing we advocate here is a return to basics when necessary, as it's far too easy to fall into the endless cycle of technological gimmickry at the expense of productivity. LaTeX is generally edited in a simple text editor, such as TextEdit, Notepad, or Emacs (though I hesitate to call the latter a "simple" editor). You can also get specialised editors, usually free, such as TeXShop and iTexMac for Mac, Kile for Linux/UNIX, and WinEdt, TeXnicCenter, WinShell, and LaTeX Editor for Windows, most of which give you access to special LaTeX tools, document navigation, typesetting commands, and so on. (A cross platform editor I haven't tried yet is Texmaker.) The typesetting system itself is free, cross platform, and generally only requires you to know one command.

Third, the emphasis is on structure, not formatting. LaTeX assumes you know which is a section title, a subsection title, a figure, and so forth, and lets you determine that. LaTeX handles the layout. In a way, it's like a writer preparing her manuscript, and handing it off to a typesetter to handle all the fiddly formatting bits. The difference here, of course, is that your typesetter is always ready at a moment's notice, and you can concentrate on the document without worrying about font choice or margins.

The emphasis on keeping things simple and focussed is an excellent fit with my own philosophy. A text editor, some simple mark-up, and a beautiful result with everything I need -- how could I ask for more? In fact, I've been using LaTeX for nearly 15 years now, and do almost all of my writing with it.

So if you find yourself writing lots of articles and reports, aren't afraid of simple mark-up, and are looking for a basic but effective system for producing quality printed documents, take a look at LaTeX and see if there's a match. It's certainly not for everyone, but it's an underappreciated system which deserves to be used more often than it is.

For more information, see:

Syndicate content

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Portability Question

The frustration I have experienced with (La)TeX is about portability.

Are there guidelines for creating a portable LaTeX document ? Most setups I have tinkered with produce documents that will only work with the setup that created them. Perhaps I have not tinkered with the Right One yet.

Plain Vanilla LaTeX

I can't say I've had that problem these past few years, probably because I basically use the "full meal deal" installation of LaTeX and TeX, the standard article/book/report types, and the usual PDF tools. I bring files back and forth among Mac OS X, Linux and Windows all the time.

For those who use Macs, BTW, I can certain recommend Mac-TeX, which comes with Gerben Wierda's excellent installer program, TeXShop, Excalibur (the spell checker), LaTeXIT (an "equation creator"), and BibDesk (the bibliography tool). A 200 Mb download, but it contains everything you need, and the installer handles incremental upgrades from there, when needed.

all my best,
dj

Sounds like a deal

I will give it a serious try. The above links are what I need to get rolling, yes ?

Starting with LaTeX

Yup, ygor. There's a real wealth of information available for it, but I'll caution you first: don't get caught up in all the highly technical formatting stuff. Frankly, you don't need to know very much of it, if at all. (I know I rarely need it, even after fifteen years.) There's a document floating around called "The Not So Short Introduction to LaTeX" on the LaTeX site whose first dozen or two pages will teach you most things, and then there's the LaTeX reference card that will serve as a nice little reminder for all the formatting commands. Really, it's quite a bit like learning simple HTML, except the output tends to look a lot better. (And LaTeX has a tonne of stuff for handling academic papers, mathematical papers, and other high-end documents. It puts word processors to shame in this regard.)

For those people who still prefer a WYSIWYG interface, LyX is pretty nice, although it can look a little backward on certain platforms.

all my best,
dj

The frustration I have

The frustration I have experienced with (La)TeX is about portability.

One of the greatest advantages of TeX/LaTeX is that it is incredibly portable -- you should be able to use the same code to produce identical documents regardless of the platform and the TeX distribution you use. I have never once had a significant portability issue with my code in many years of using LaTeX (and some of my code is used by hundreds of people).

That said, there are certain tools that are known to insert proprietary, non-portable code into documents. LyX and Scientific Word both come to mind, though both supposedly have options for exporting portable code. In my opinion, if portability is a requirement then you're best off using a plain text editor (such as WinEdt or TeXniccenter on Windows, or Emacs on virtually any platform) with a standard, freely available TeX distribution like MiKTeX or TeXLive. Avoid teTeX if possible -- development on it recently ceased.

It's also possible that you're encountering outdated packages when you move from computer to computer. This often doesn't make a difference, but if a feature you rely upon in one of them changes then you need to make sure you get the relevant update. Insert the command \listfiles before \begin{document} and your log file will display a list of all packages you're using along with their version numbers.

Page layout in LaTeX

There are number of options for folks who want to do planner page layout in LaTeX, though I don't know that any of them are good for people just starting out with LaTeX. The most obvious is to use the table-building macros built into LaTeX, but doing this well can be difficult -- unless you're a LaTeX expert, I would suggest reading up on the advanced table-building commands in The LaTeX Companion by Frank Mittelbach if you choose to go this route. Others options include (all of them available from CTAN):

  • PSTricks: A set of very powerful LaTeX macros for creating graphics using the Postscript "page description" language. PSTricks has a fairly large learning curve, especially if you wish to use some of its more advanced (and un- or barely documented) features, which require some knowledge of Postscript. (The very powerful basic features require no Postscript knowledge, however.)
  • Metapost: Distributed as a standard part of all LaTeX distributions -- if you have LaTeX, you already have Metapost. It is a sort of graphical programming language that is then interpreted and converted to Postscript for use by LaTeX. Metapost would probably well suited to creating templates for planner page design.
  • PGF: Billed as a compromise between the power of PSTricks/Metapost and LaTeX's simplistic native graphic capabilities, PGF has a lot of simple commands that appear easy to use, yet produce impressive graphics. There are things that you can do with PSTricks and Metapost that you can't with PGF, but it should be more than adequate for laying out planner pages.

I would recommend PGF to beginners, though my own experience with it is minimal and it may have some limitations I'm not aware of. Many of its commands are similar to those in Metapost, so that may be a natural "upgrade path" for folks who decide they need more advanced capabilities. Other packages exist for enhancing LaTeX's built-in graphics (which are difficult to place precisely) and for specialized graphics, but the three I've listed represent the best of the bunch for planner layout in my opinion.

That said, my personal preference is PSTricks and I am currently using it to create some pages of my own. The way my code is structured at the moment it would not be suitable for distribution, but I'm thinking about ways I could restructure it to create a planner-building kit that would require minimal knowledge of LaTeX and zero knowledge of PSTricks. Because of my other commitments at the moment, though, I expect it will be quite some time before I reach that point.

Alternative to LaTeX for forms.

There's a couple of posts of mine lingering in the Template forum here in DIY about a program I wrote a while back and recently revamped to be a proof-of-concept on a markup language far more suited to form design. (It's actually based off my own very-popular RPG forms that I've been doing for many years.)

Give it a look if you're technically inclined. I'd love more people to have a look at the system and give me their impressions. No, it's not GUI (yet) and at this early stage, you need to be able to run a Perl script to test it out. But it is cross-platform (Windows, Unix, Linux, Mac) and it does automaticly adjust fairly intelligently for any size of paper you care to throw at it.