* Re: ConTeXt and latin 2 encoding
1999-09-07 10:42 ConTeXt and latin 2 encoding grzegorz.sapijaszko
1999-09-07 10:07 ` Tobias Burnus
@ 1999-09-08 9:32 ` Taco Hoekwater
1 sibling, 0 replies; 3+ messages in thread
From: Taco Hoekwater @ 1999-09-08 9:32 UTC (permalink / raw)
Cc: grzegorz.sapijaszko, ntg-context
>>>>> "Tobias" == Tobias Burnus <burnus@gmx.de> writes:
Tobias> Hello (halas(?))
>> I'm a beginner in ConTeXt, and I would like to use a Latin 2
>> encoding for my ConTeXt files. How can I doing that? Is a
>> simmilar command to LaTeX "\usepackage[latin2]{inputenc}"?
Tobias> Try:
Tobias> \usecodering[il2] % cont-nl \useencoding[il2] %cont-en /
Tobias> all cont-* \benutzekodierung[il2] %cont-de
This \useencoding should be built in in the latest context-s. Hans
posted some stuff last week that is supposed to work with the plr
fonts, but it is unsure yet whether that actually worked (there was
quite a lot of confusion about whether or not the fonts are really
encoded in il2 && whether the accents are in the correct places).
Context's logic regarding fonts/encodings is somewhat different from
latex's approach, and it works like this:
1. There is an encoding definition file (enco-XXX.tex) for every
known font encoding. This file contains info about the accent
location and the uppercase/lowercase mapping (have a look at
enco-il2.tex if you are curious)
2. Your document's font setup is defined in a font/encoding neutral
way, using a multi-stage setup that can be overrule almost
anywhere. This is done in files that start with 'font-', and a short
sample of such a file could look like:
\definefontsynonym [Serif] [LucidaBright]
\definefontsynonym [SerifBold] [LucidaBright-Demi]
\definebodyfont
[14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt]
[rm,ss,tt]
[default]
There is more to this, but the important point is that the document
font that will be \rm is mapped to the 'Serif' font, which in this
case is LucidaBright.
3. Finally, there is a table that maps symbolic font names like
'LucidaBright' to a TFM file on your disk that has a specific
encoding. (this is done in e.g. font-fil.tex and font-ber.tex)
\definefontsynonym [LucidaBright][lbr][encoding=texnansi]
Here the encoding is set, and every time you use this font (lbr.tfm),
ConTeXt will switch to this encoding.
So, finally, setting up a new font/encoding pair in context is not
really hard, but you need to know the font's encoding, and if context
doesn't know the encoding yet, you have to write an encoding file to
go with the font.
\useencoding should only be needed for encoding files you define
yourself, the ones that come with context are normally preloaded into
the fmt file.
At user level, you only need a \setupbodyfont with the right fonts, and
the encoding will automagically be correct.
Tobias> I don't know whether you need something else (different
Tobias> bodyfont or so), Hans? Taco?
Greetings, Taco
Taco
^ permalink raw reply [flat|nested] 3+ messages in thread