lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: German Umlauts in lout


From: Reimer Behrends
Subject: Re: German Umlauts in lout
Date: Thu, 17 Nov 1994 20:45:59 +0100 (MET)

> How does one get German Umlauts using lout.
> 
> Suppose I want to write the word 'Ko"ln' with the '"' over the 'o', which is
> how it is written in German, How do I do it? I know that you can do it with
> the @Char construct. But is there a better way. I cannot imagine writing
> @Char for every German-specific character if I want to create a 50 page 
> document in German language. Is there a better way of doing this like spelling
> the word 'Ko"ln' as maybe 'Koeln' or something ? Maybe I have not understood 
> the full implications of the @Language construct.

While lout does not support multicharacter abbreviations for foreign
characters, a simple perl script can do the translation semiautomatically.

#!/usr/local/bin/perl
while (<>)
{
  s/`a'/@Char{adieresis}/g;
  s/`A'/@Char{Adieresis}/g;
  print;
}

Extend and modify as needed.

Of course, keeping track of which files need to be modified is a bit of
a hassle, so you may want to employ make with a makefile such as:

# allow .lout and .glout as new suffixes.
.SUFFIXES: .lout .glout

INPUT = ch00.lout ch01.lout

# implicit rule to convert files ending in .glout to .lout files
.glout.lout:
        perl convert.pl < $< > $@

out.ps: $(INPUT)
        lout $(INPUT) > out.ps

ch00.ps: ch00.lout
        lout ch00.lout > ch00.ps

Hope that helps.

                                Reimer Behrends


reply via email to

[Prev in Thread] Current Thread [Next in Thread]