[texhax] Can TeX fix word and line the way I want?

Hartmut Henkel hartmut_henkel at gmx.de
Tue Sep 16 22:06:05 CEST 2003

On Mon, 15 Sep 2003, Chakrit Nimmanant wrote:

> I have document in English alphabet but I also want to transliterate
> the English alphabet into Sinhalese alphabet a word by word and a line
> by line
> The problem is that Sinhalese alphabet is not as the same width as
> English alphabet, so words in a line of Sinhalese alphabet will be put
> into the new line automatically by TeX.

Some silly example, not Sinhalese :-) It seems something like this would
keep the two languages in sync from one text basis file. Should be
straight-forward to switch fonts.

\def\tl #1 #2 {{\leavevmode
  \hbox to \wd1{\ifeng#1\else#2\fi\hss}} }
\tl Life Lavo
\tl is   essa
\tl beautiful. batifula.
\tl Enjoy Enajou
\tl every evali
\tl day.  sunupdo.
\engtrue \the\toks0\par\bigskip
\engfalse \the\toks0

Isn't there even a package for things like this?

Greetings Hartmut

Hartmut Henkel, Oftersheim, Germany

More information about the texhax mailing list