From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/828 Path: main.gmane.org!not-for-mail From: Taco Hoekwater Newsgroups: gmane.comp.tex.context Subject: Re: ConTeXt and latin 2 encoding Date: Wed, 08 Sep 1999 09:32:55 +0000 (GMT) Sender: owner-ntg-context@let.uu.nl Message-ID: <14294.11591.123595.646217@PC709.wkap.nl> References: <412567E5.00355127.00@smtp02.seinf.abb.se> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1035391670 27459 80.91.224.250 (23 Oct 2002 16:47:50 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 16:47:50 +0000 (UTC) Cc: grzegorz.sapijaszko@pl.abb.com, ntg-context@ntg.nl Original-To: burnus@gmx.de Xref: main.gmane.org gmane.comp.tex.context:828 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:828 >>>>> "Tobias" == Tobias Burnus 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