[texhax] How to write straight accents in TeX (not LaTeX!)

Reinhard Kotucha reinhard.kotucha at web.de
Wed Sep 12 03:30:55 CEST 2007


Pablo Mayckon writes:

 > In fact, I decided to learn TeX because I found myself doing things
 > in LaTeX which, I thought, had more to do with typesetting itself,
 > rather than with concentrating on the contents of the text and
 > letting LaTeX do the formatting (the latter being the basic
 > philosophy of LaTeX). I also read that TeX is a special purpose
 > programming language, and, being a computer science student, I was
 > willing to make use of such generality and flexibility.

If typesetting/layout is important for you I strongly recommend to
have a look at context.  Latex's philosophy is that you concentrate on
the content and control the layout by using macro packages.  Sometimes
you don't find a macro package which does exactly what you want.  I
assume that this is the reason you decided to learn plain tex.

I'm sure that context is better for you because it gives you more
control about the layout and supports the input and font encodings
already.  In plain tex you have to do everything yourself.

I don't know much about context, but I'm sure that it is much less
dangerous in context to insert plain tex code than it is in latex.
Hence, if you really need something which is not supported, the
TeXbook is your friend.

 > On the other hand, I think that plain TeX's basic treatment of
 > accents ("\'a" and so on) is not appropriate for someone whose
 > native language practice involves using a lot of accents. In
 > particular, I wonder if this treatment would not have been made
 > easier if Knuth spoke Portuguese :-) (or French or some other
 > language with accents). 

There is one thing you probably don't know because you are too young.
When Knuth wrote tex, there had been no Portuguese keyboards available.

At this time only privileged computer users had access to a terminal.
Students had been bothered with punch cards at this time.  And there
had not been anything else but ASCII.

 > And, believing that the fact that [typing accents through control
 > symbols is not appropriate for everyday use] was quite clear, I
 > decided to ask you (TeX users) what people usually do about.

After people spent an enormous amount of time to write such macro
packages, they usually/hopefully upload them to CTAN so that other
people can share their work.

BTW, it is quite reasonable that there is a control sequence for each
non-ASCII character.  I have access to Portuguese characters though I
have a German keyboard and you have access to German characters though
you have a Portuguese keyboard.

 > >From the time I wrote my previous message until now, I have been
 > using the "catcode" suggestion, and it works. But the task of
 > teaching TeX what each accented letter "means" (both lower and
 > upper case occurrences), putting this in an "accents.tex" file and
 > \input'ing this file into my text was rather boring, and, although
 > it's all done now, I feel that there should be a better way of
 > doing this (I mean, if we are heading towards a fair
 > internationalization of the world :-)).

Well, as you noticed yourself, it's a lot of boring work.  But this
work had already be done for latex and context.  You can be sure that
the people who provided this stuff had been bored or even frustrated,
too.

If you prefer to stick with plain tex I fear that you you have to
re-invent a lot of other wheels yourself.

Anyway, if my assumptions about your intentions are halfways correct,
I think that context is a good thing for you.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the texhax mailing list