Scripts for LOUT Typesetting System
It’s been a while since I started using the Lout document preparation system in favor of LaTeX. It has a number of advantages like: greatly decreased size (a few Megs compared with the 50 or 100 Megs of TeX distros), higher-level, better looking code etc. Only recently I started considering using Lout as a document generator (like reports) for a software I’m writing (the software generates Lout source code that is passed through Lout and other programs to produce superbe PostScript and PDF files).
And so, because of some issues I encountered, I wrote a couple of short scripts to overcome what I believe are the two most important shortcomings of the Lout typesetting system.
- The Lout system can directly output beautiful PostScript documents, but direct PDF output is incomplete!
This problem can be worked-around by using Ghostscript to convert the PostScript file into PDF (it would be better to have Lout output to PDF directly since the PDF code would be better optimized, but still this solution works flawlessly!). - Even worse was that, depending on the generated Lout document, the cross-references (links) inside the file could only be resolved after multiple passes of the document through the Lout executable, and the number of passes can never be pre-determined. To solve this one I used the might of the Unix Bash Shell (Mmbuhuhohhahaaa), and some utilities like grep and wc.
Anyway, here are the two scripts I made to help me solve the two problems above. You must run them both from the directory containing the document you want to process (the scripts will delete all temporary *.li, *ld, *ldx files in this directory). To use them you need:
- Lout
- Ghostscript (only for xloutpdf)
- grep
- wc
So here they are:
Enjoyed this post?, why not subscribe to the RSS feed!
June 5th, 2009 at 9:30 am
Nice idea! I will have a try.
November 12th, 2009 at 10:50 pm
Thanks, the scripts are very useful and they work great. Nice job!