emarsden -> Lout FAQ/HOWTO |
When I view the output from lout using Ghostview, a well known
front end to Ghostscript, the spacing is all screwed up. Words
appear run together as though they were a single word, yet printing
on a laser, postscript printer always produces beautiful results.
The problem comes from poor font descriptions included with older versions of Ghostscript, or from an incompatibility with them. If the font formats used by Lout for calculating word and letter spacing don't match those used by the Ghostscript interpreter, obviously you lose. Recent versions of Ghostscript use higher quality fonts and support antialiasing : it's well worth upgrading (since v6.01 the PDF support is also much improved).
The standard Adobe fonts are missing certain Latin2 glyphs, which
results in special characters (such as @Char odblacute
and
@Char udblacute
in Hungarian) being represented by whitespace in
the generated Postscript.
The solution is to use alternative Latin2 fonts. Uwe says:
I know about Quasy Palladio and several Antykwa fonts. ParaType has Literaturnaya in TeX T1 encoding which, IIRC, comprises alphabet parts of both Latin1 and Latin2 (unfortunately they use some non-standard glyph names).
Quasy Palladio can be found on CTAN in fonts/psfonts/polish. Literaturnaya can be found at ftp://ftp.vsu.ru/pub/tex/literat* (you need the T1 fonts, there are also IS (ISO8859-5 cyrillic) and TS (misc punctuation)).
Rafal Polonski suggests the following additional fonts for Polish:
@Char rcaron
. Matej Cepl
has worked on some full Latin2 fonts which are available at
www.volny.cz/cepls/ps-pdf/yal2f-0.9.zip.
It is also possible to convert TrueType or type42 fonts for use in Lout; see the comp.fonts FAQ at www.nwalsh.com/comp.fonts/FAQ/ for details.
This is the software's way of telling you that the font is unknown to it. Unfortunately there is currently no way of embedding custom fonts in PDF documents generated by Lout, so you are limited to the standard fonts.
As a workaround, you could try generating PostScript then converting it to PDF. Adobe Acrobat Distiller (commercial) is able to embed fonts when converting from PostScript to PDF. Aladdin Ghostscript 6.0 (free software) is now able to embed fonts in its PDF backend, so ps2pdf should work well.
You can check which fonts are used in a PDF file from Acrobat Reader
by selecting File > Document Info > Fonts. Select "List All
Fonts" in the font information window: under Used Font
is
should say Embedded
or Embedded Subset
if you're not using a
standard font.
Lout may have problems generating documents at very large page sizes: in the file externs.h you'll find MAX_SHORT_LENGTH which is 32767 internal units. Since Lout works internally with units of 1/20 pt,
32767 = 1638.35 pt = 22.7(5) in = 57.79 cm
which is enough for B3 paper, but just a little bit too small for A2 (420mm x 594mm).
There is a way around this limitation: you can add a Postscript command such as
<</PageSize [1584
2448]>>setpagedevice
which sets the page size for the printing device. You can use a
package called psenlarge to add these setpagedevice constructs to
a Postscript file. It requires perl5.x and Ghostscript, and is written
by Peter.Samuel@ind.tansu.com.au
, and is available from
ftp://ftp.uniq.com.au/pub/tools/psenlarge-1.4.tar.gz.
You may run into problems with lout compilation not converging on recent Linux systems. Symptoms of the problem are error messages such as
lout file "all":
14,1: unresolved cross reference @Roman&&1
14,1: unresolved cross reference @Roman&&2
14,1: unresolved cross reference @Roman&&3
This problem arises if you are using a non-english locale and have a glibc system. The problem arises from the collation rules under certain locales ignoring the tab character when comparing strings. Each line in the index file generated by lout consists of a key followed by position information, separated by tab characters. When writing the index lout sorts entire lines, but when reading entries it sorts according to the key; since the orders can be different, lout assumes that it hasn't done been run sufficiently often to generate all index entries.
A "solution" is to set the environment variable
LC_COLLATE
to en_UK
(or some other locale where the tab
character is collated before printable characters, and blank space and
punctuation characters are not ignored during collation).
Alternatively, simply run lout with the -l
option to turn off
collation.