ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Minimal example for Cyrillic
Date: Fri, 1 Apr 2011 00:14:56 +0200	[thread overview]
Message-ID: <8654B8FD-18F1-4FA1-9841-6E71F46E8287@uni-bonn.de> (raw)
In-Reply-To: <AANLkTi=sNP0umGUSzzbZtyqkxGmYvD+0BcyDt5JPEBGd@mail.gmail.com>

Your example is very nice, and I appreciate that you took the time to comment all this. But actually, all you need is:

\setupbodyfont[gentium,12pt]

and then your text. Explanation: gentium is in the minimal distribution, there's a typescript for it (context/tex/texmf/tex/context/third/gentium/type-gentium.tex), and if the bodyfont and the typescript have the same name, context will find it automagically. Mojca, did we add something about this to the wiki? 

Thomas

On Mar 31, 2011, at 4:44 PM, mathew wrote:

> Here's a full working Cyrillic (and Greek) example, with comments:
> 
> %&context
> %
> % Example of Cyrillic in ConTeXt.
> %
> % For plain text, I'm using Gentium Plus, which has more glyphs but doesn't yet
> % have bold and italic variants.
> %
> % You can obtain Gentium Plus from http://scripts.sil.org/gentium
> %
> \starttypescript [serif][gentium][name]
>  \definefontsynonym [Serif]        	  [name:gentiumplus]
>  \definefontsynonym [SerifBold]		    [name:gentiumbasicbold]
>  \definefontsynonym [SerifItalic]      [name:gentiumbasicitalic]
>  \definefontsynonym [SerifSlanted]     [name:gentiumplus]
>  \definefontsynonym [SerifBoldItalic]  [name:gentiumbasicbolditalic]
>  \definefontsynonym [SerifBoldSlanted] [name:gentiumbasicbold]
>  \definefontsynonym [SerifCaps]        [name:gentiumplus]
> \stoptypescript
> 
> % Now define a typescript which groups together the three chosen fonts, and
> % sets their relative sizes.
> % Two arguments: 'myfonts' is the name, 'default' is the character encoding.
> \starttypescript [myfonts][default]
>    % For each typeface definition:
>    % - The first parameter is the name for the typeface collection, which
>    %   may be a font family, or just a set of fonts that work well together.
>    %   Whatever the case, it's the name we'll use to select this set of
>    %   fonts later.
>    % - The next parameter is a basic style; typically we'll have one line
>    %   for each basic style, but I'm skipping mm (math mode) in this example.
>    % - Then there are three arguments which are used to locate a typescript
>    %   defined earlier. Note that [default] matches our earlier definitions
>    %   because they were all implicitly in the default text encoding.
>    % - Finally, any options, most commonly adjustments to relative scaling
>    %   so the fonts work together.
>    \definetypeface [nicefonts][rm][serif][gentium] [default]
> \stoptypescript
> 
> % Now tell ConTeXt to actually execute the typescript we defined immediately
> % above, and hence any typescripts it depends on.
> %
> % This executes the \definetypeface calls to define our typeface set.  Again,
> % myfonts is the name of the typescript, default is the character encoding.
> \usetypescript[myfonts][default]
> 
> % Finally, use that typeface set, at 10pt base size.
> % Calling setupbodyfont changes headers and footers as well as body text;
> % switchtobodyfont just changes body text.
> \setupbodyfont[nicefonts,10pt]
> 
> % And finally, the actual document
> \starttext
> 
> Улице найденных совершенно на тд. Можно статьи команды он без. Одну филипа
> обычно по вот. Мои статьи человек процессе те, могу фирме всё он, ну над никто
> размере русском. Опа до раздавая правильно, нейманом содержимое об над. Те
> взяться плохого код, свой осуществлять все не.
> 
> Here's some Greek too:
> 
> Αν σωστά νόμιζες της, έτσι γραμμής βασανίζουν να πως, κι εκτός μάλλον όσο.
> Πετούν παραγωγικής οι σας, έξι τελικά κάνεις σε. Μέρος υπέροχα τελειώσει όρο
> δε. Δε νέο πάτο διακοπή, επί αφού κειμένων αποφάσισε πω. Τέτοιο βασανίζουν από
> ως. Σας σχεδιαστής χρησιμοποιήσει τι, γέλασαν διάσημα δημιουργείς το που.
> 
> \showbodyfont[gentium]
> 
> \stoptext
> 
> 
> mathew
> -- 
> http://www.pobox.com/~meta/
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2011-03-31 22:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-31 10:22 Aleksandr Sinicyn
2011-03-31 13:34 ` Mojca Miklavec
     [not found]   ` <1301636838.6125.1436238169@webmail.messagingengine.com>
2011-04-01 10:15     ` Mojca Miklavec
2011-03-31 14:44 ` mathew
2011-03-31 22:14   ` Thomas A. Schmitz [this message]
2011-03-31 23:14     ` mathew
2011-04-01 10:08     ` Mojca Miklavec
  -- strict thread matches above, loose matches on Subject: below --
2008-04-28  7:16 minimal " Gour
2008-04-28 19:05 ` Henning Hraban Ramm
2008-04-29  6:23   ` Gour
2008-04-29  7:00     ` Wolfgang Schuster
2008-04-29  8:12       ` Gour
2008-04-29  9:17         ` Wolfgang Schuster
2008-04-29 10:22           ` Gour
2008-04-29 10:30             ` Mikael Persson
2008-05-05 16:10               ` Gour
2008-04-29 10:25           ` Gour
2008-04-30 16:38 ` Oleg Kolosov
2008-10-14 12:01 ` Radhelorn
2008-10-14 13:32   ` Taco Hoekwater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8654B8FD-18F1-4FA1-9841-6E71F46E8287@uni-bonn.de \
    --to=thomas.schmitz@uni-bonn.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).