I’ve recently been playing around with the Lout document typesetting system. Lout is in many ways similar to LaTeX, was also created by academics, and seems to cater to the same community. While there are disadvantages, its chief advantages seem to be speed and size: a download of the entire system is less than 1 MB, and takes around 5 MB when installed.
Like LaTeX, you begin by editing a text file. This text file consists firstly of a header or preamble, which is used to load libraries and set initial parameters. Next comes the body of the document, with special mark-up tags or commands for special elements. In Lout, these typically begin with @, much like LaTeX’s backslash. Finally, there is a command to end the document.
This text file is processed by lout to generate the typeset document. By default, lout creates a PostScript file and sends it to stdout, though you can redirect it into a file, or send it directly to a printer:
lout my-document.lout > my-document.ps
With ghostscript installed, you can pass the result to ps2pdf to create a PDF instead:
lout my-document.lout | ps2pdf - my-document.pdf
I’ve mainly been testing with simple documents, but it seems to do its work very fast, and generates far less “noise” on the command-line compared to LaTeX.
Here is a sample lout file:
@SysInclude { doc }
@SysInclude { eq }
@SysInclude { graph }
@Document
@InitialSpace { tex }
@InitialFont { Palatino Base 12p }
@Text @Begin
@Display @Heading { Sample Lout Document }
@PP
This is a sample paragraph. It is really just intended as filler, not as anything special. I should probably put in things like ``scare quotes'', and shouldn't avoid things like apostrophes so everyone can get a better sense of how things look. Maybe a sentence with a lot of different letters? How about: grumpy wizards make toxic brew for the evil Queen and Jack. I stole that from Google web fonts.@FootNote { You've heard of Google right? } What do you think?
@PP
Here is a new paragraph. Let's add words in @B bold and @I italics, shall we? How about @S { Small Caps }? We can even do a @ShadowBox { Shadow Box } if we like.
@QuotedDisplay {
This is a sample paragraph in a quotation display. It is really just intended as filler, not as anything special. I should probably put in things like ``scare quotes'', and shouldn't avoid things like apostrophes so everyone can get a better sense of how things look. Maybe a sentence with a lot of different letters? How about: grumpy wizards make toxic brew for the evil Queen and Jack. I stole that from Google web fonts. What do you think?
}
@Heading { A Numbered List }
@NumberedList
@ListItem One
@ListItem Two
@EndList
@Heading { Displayed Mathematics }
@Display @Eq { T(n) = big sum from i=0 to n-1 2 sup i = 2 sup n - 1}
@LeftDisplay @Heading { A Sample Graph }
@Graph
abovecaption { New South Wales road deaths
(per 100 million vehicle km) }
{
@Data points { plus } pairs { dashed }
{ 1963 5.6 1971 4.3 1976 3.7 1979 3.4
1982 2.9 1985 2.3 1988 2.0 }
}
@End @Text
The generated output looks like this:
The first three lines load specific libraries and commands. As you can see, there are special libraries for typesetting equations and complex mathematics, as well as for making graphs and figures. The next four lines represent the rest of the “preamble”; here I do little more that set spacing to emulate TeX in putting extra space between sentences, as well set the base font to Palatino. (The default otherwise is Times.)
Lout’s paragraph layout algorithm is based on TeX’s, and so should generate typographically pleasing results in most cases. It has a built in functional programming language, and so is highly extensible in all sorts of ways. It has built in mechanisms for lists, footnotes, citations, and most other routine tasks you’d expect.
I can think of the following advantages for learning Lout:
- It’s lightweight! You could carry it around on a floppy disk, and the typical installation is less than 1% of a medium sized (La)TeX installation. That’s neat.
- It’s fast! Typesetting a small document at least seems to take less time than it does with LaTeX.
- It can be extended easily.
- It’s free and open source, and can be used with any text editor. (I was pleased to discover that vim has syntax highlighting for Lout!)
- There are far fewer external packages to remember the ins and outs of, and maintaining a Lout system is far easier than maintaining a TeX system.
- A single comprehensive user’s guide is available: here.
- It’s fun to learn something new.
But that’s not to say there aren’t significant disadvantages.
- It’s not widely used, so you have trouble sharing with colleagues, and an impossible time submitting to journals.
- You’re far less likely to find pre-made bibliography styles or templates for various journals or publishers.
- You won’t be able to make use of the many specific and powerful packages that have been created for the (La)TeX ecosystem.
- Conversion tools and other specialized software is harder to find.
- The community of users with expertise you can drawn on is much smaller.
- Sometimes it’s not so fun to (have to) learn something new.
That said, I’ve really only begun scratching the surface of learning Lout, and am by no means an expert. I welcome your feedback. For experienced users, what have you found to like or dislike about it? For inexperienced users, what are your first impressions?


I can’t help but draw comparison with ConTeXt (based on TeX, now users LuaTeX as the primary engine). Most of you points also true for ConTeXt, except for 1, 2, and 6. (OK, that makes it almost half of your positive points .…)
The full installation of ConTeXt is around 220MB, and that will not fit any floppy, but easily fit any USB drive. (Almost half of the space is used by fonts, so in, principle, you can come up with a smaller system). I don’t know how fair it is to compare the sizes of only the binaries. On my system, pdftex is around 1.3MB, the luatex binary is around 4MB.… It is the fonts, the linking programs (bibtex, makeidx, etc) and the macro package that take most of the space.
ConTeXt in general is slower than LaTeX, but its documentation is spread across multiple manuals. (Most users switching from LaTeX find ConTeXt documentation to be chaotic, YMMV).
So, if you like to try out something new, you could also try ConTeXt.
I had the same purpose with Lout, but have not been able to put it to work. The instructions aren’t clear on how could be used on Windows XP.
Will be interesting if you can share, how you get a working installation.
Sincerely,
Denis. sorry, I use Linux, and just installed the package from my package repo. No clue how to make it work on Windows. Maybe someone else will post instructions.
Thanks.
I hope someone could have a clue.
Kevin, This looks pretty cool. Thanks! I know you said you only did small documents, but any guesses about how it would feel to write a 5K word philosophy paper using Lout?
Also, have you tried any of the other alternatives like asciidoc or DocBook or ReStructured Text? I wonder how they compare to Lout and LaTeX.
As we both noted, I haven’t done it, but my guess would be that it would be about as easy as writing one in LaTeX. Of course, writing that first one in LaTeX is much harder than the next one, and so on, and I’m sure the same is true for lout.
I was interested in lout because it is actually typesetting software. I’m not too familiar with the others you mention, but I think they’re formats, not layout systems, and the result you get would depend on what software you processed or viewed them with. Indeed, if I’m not mistaken, asciidoc has a LaTeX backend for creating PDFs, and an XML backend for other output formats, putting another level of conversion in between you and your final product, which to me (as a control freak), defeats part of the purpose of mark-ing up documents myself.
That makes perfect sense. I didn’t recognize the difference between markup and typesetting languages until you pointed it out. Now it is obvious!
Thanks.
Hello Kevin, thank you for your description and opinion about Lout. I found lout a couple days before and now I have the same experiences: Lout the best tool for non programmers, for common people who don’t afraid to type one command line into the terminal window. I have some experiences with TEX/Latex (dos, Windows) but this is space shuttle technology for me who write smthing only one day per month. Last year I wrote a hundred pages book for my children. Typing text took 50 hours. Setting and tex makeuping approx 100 hour. Horrible.hufff.
Shortly about Lout and confirmation your worlds: + very small and simple + open. You can modify inside lout anything, add fonts and so on + quality ps and pdf creation (I’m using ps export and than ghostscript because needs of embedding fonts) + support for other languages (czech
+ its like a TEX engine, e.g. quality in the details of typesetting – probably so complex for novices because user’s guide is too heavy for the lunch reading. I think about 12pgs publication “Lout in one day”. It will be fine. (Its challenge to wrote it now, isnt it?) – graphics support: the “inline” graphics function can be useless and complicated for use. I prefer external graph/picture program. Maybe the better support for incln gif/tif pictures will be usefull. not only ps . Nice day for all typists!
Glad to read that people are actively using Lout, trying it, discovering it. I’ve been a long-time user. It’s been great for any short one-off papers or other things of personal use or for which all I need is a PDF to send or upload. Sometimes when I’m at a bookstore browsing, I’m impressed to read in the preface or colophon that the author used Lout.
But yeah, it is not well known in the academic publishing world, and there’s practically nowhere to publish a paper written using Lout. A book, being complete publishable product in itself, seems to be practical, but a paper that’s going to be gathered into a bunch of others to become a physical product, will still have to be LaTeX. But someday…?
@Denis J Navas:
Denis, I have had sucess with lout on WinXP. Get the binary from sourceforge. Go here: http://sourceforge.net/projects/lout/ and read my note about creating a couple of folders that the binary install seems to fail to create in winXP. You can use it from the standard windows console, but I just happened to have recently installed git which comes with git-bash, and that makes it a lot more fun to work with — a great shell for winXP.
You’ll want gs9.04 (or whatever is latest) installed, as well as ghostview. Here’s why: You’ll be tempted to do … lout –PDF my.lout > my.pdf but while this works for most things, the direct to pdf route often quietly drops some output — you will think that lout does not work as advertised in the excellent manuals, but it does. Do this instead … lout my.lout > my.ps. Then do ps2pdf my.ps to get my.pdf, with perfect and complete output.
You have to set your paths for lout and gs9.04 (ghostscript), if memory serves you need to set the path for both ‘bin’ and ‘library’ for gs9.04.
One last thing. When you want to change paper size in lout, it’s easy and the manual spells it out very clearly. But when you convert your .ps to .pdf via ps2pdf, it’s a somewhat verbose command.
Suppose you had already changed the paper size in lout from ‘letter’ to ‘A5’. Lout handles this seamlessly. But if you use ps2pdf on this file, it will indeed convert it to pdf, but in ‘letter’, or ‘A4’, or whatever your default page size is.
Here’s how you do it on winXP, the only diff from linux/unix is that the equal signs ‘=’ get replaced by pound, or hash signs ‘#’. This apparently has to do with the compiler that was used to compile the windows binary. So do this to convert my.ps:
C:\Documents and Settings\myself\My Documents\loutish> ps2pdf –dDEVICEWIDTHPOINTS#420 –dDEVICEHEIGHTPOINTS#595 my.ps
Note the pound signs, i.e. #‘s. What would I do without the internet? Don’t know if I ever would have figured this out. Likely not.
The 420 and 595 are just the A5 dims expressed in points.
see this site for more on this quirk: http://www.rhinocerus.net/forum/lang-postscript/683317-ps2pdf-paper-size.html
One more thing. Jeffrey Kingston has written the best manuals that I’ve ever encountered for a free (gpl) program. The man’s writing is astoundingly clear, and typos are non-existent. He is very honest about lout’s shortcomings — and they are few. Don’t be afraid of the ‘expert’ manual, either. I’m not remotely an expert and yet I’ve found that when some built-in doesn’t do exactly what you want, lout allows you to very simply and reliably put any text or graphic any where you want on a page. Can’t say enough good things about lout. Sincere thanks to Mr. Kingston.
frinty
ps add @operamail daught com to my name on the line above if you need more info
In a previous intent I barely made it work. I will follow your instructions. Its particularly relevant what you learned about the use of the ‘#’ instead of ‘=’.
Normally I use bat file to stablish the environment variables. That’s how I get it working, but not 100% correct.
A great THANKS to your iniciative.
God bless you,
Denis J. Navas
@ Denis J Navas,
I’ll be working with lout (again) tonight and it functions flawlessly on winXP.
the binary I used is here: http://sourceforge.net/projects/lout/files/lout-win32/lout-3.38-win32-20091027/
While I no longer remember the installation process, I vividly remember trying endlessly to get the thing to work. In the end, it was simple — my lout folder was under c:\Program files\. THAT DID NOT AND WILL NOT WORK with the binary. I don’t know if that was my mistake, or a mistake in the packaging — it’s been a while.
The lout folder should be directly under C:\, i.e. c:\lout\
Your bin\ and lout.lib\ folders will of course reside in said lout folder.
I had to move some stuff around manually, but I was very pleased with the results.
I use lout frequently. I am just a duffer (not a computer expert). Only a few languages seem to work the way my brain does, among them awk, python, and lout. I am a neophyte in all of them yet find them very useful. Good luck with lout.
Using a unix like shell such as git-bash (comes with git) or unxutils (search sourceforge) makes using lout better experience than the windows console (command.com or whatever it’s called).
@Denis J. Navas
One last thing. You can set path all day long to no avail. The lout binary has been compiled to look for lout in c:\lout\
Setting your path correctly is important, but lout must be in c:lout\
If you don’t want it there you will have to compile it from source after directing it to do so where you want. Ugh! Compiling is fun on linux, but I’m lost on Windows.
Brent