4

Okay, a really stupid question. How do I compile my Hello World document with Cyrillic letters? Compiling

\starttext
\startsection[title={Testing ConTeXt}]
  This is my {\em first} русский ConTeXt document.
\stopsection
\stoptext

gives

note that the Russian word is absent

Note that the Russian word just disappeared. The log doesn't contain any warnings or errors.

Searching yields a lot of info about making Cyrillic work in LaTeX, but I haven't found anything for ConTeXt. The Encodings and Regimes page on Context Garden just says

in LuaTeX (MkIV) you can normally forget about font encodings

which is obviously not the case. Any thoughts on this?

ConTeXt version is 2013.84.svn30044-18.5 (context --version shows 2013.04.20 01:15); luatex --version shows This is LuaTeX, Version beta-0.76.0-2015102513 (TeX Live 2013/TeX Live for SUSE Linux) (rev 4627).

6
  • Have you loaded a font containing Cyrillic glyphs?
    – Joseph Wright
    Commented May 27, 2016 at 16:25
  • @JosephWright I'm not sure I did. I've only installed a package named texlive-cyrillic, but didn't add any font loading commands anywhere.
    – ScumCoder
    Commented May 27, 2016 at 16:31
  • 1
    Quite old context. Commented May 27, 2016 at 23:09
  • The default font, Latin modern does not include Cyrillic glyphs. Pick a font that does.
    – Aditya
    Commented May 28, 2016 at 5:08
  • 1
    Does this help you? tex.stackexchange.com/questions/59523/… Commented May 28, 2016 at 9:45

2 Answers 2

3

You need a font that has Cyrillic glyphs. One such free font is Dejavu. If you have it installed, then the following should work:

\setupbodyfont[dejavu]
\starttext
\startsection[title={Testing ConTeXt}]
  This is my {\em first} русский ConTeXt document.
\stopsection
\stoptext

enter image description here

0
2

Try

\enabletrackers[fonts.missing]
\starttext
\startsection[title={Testing ConTeXt}]
  This is my {\em first} русский ConTeXt document.
\stopsection
\stoptext
6
  • I don't know much about ConTeXt, so why would tracking fonts help? Would it solve the answer?
    – Werner
    Commented May 27, 2016 at 23:51
  • 1
    As JosephWright said, it can be that the font used has no ghyphs in that area. In this case the tracker records on the log something like "fonts > checking > char й (U+00439) in font 'LMRoman12-Regular' with id 1: missing" for each glyph missed. Commented May 28, 2016 at 4:12
  • Okay, and how does it answer the question then?
    – Werner
    Commented May 28, 2016 at 5:36
  • 1
    The problem can be a combination of 1) missing glyphs in the font used to typeset the text. The default font depends on the format; 2) bug in the font used 3) bug in the format; 4) bug in the engine. For the examples as in this question, and under the assumption that the content of the log is known by the author, in 99% of cases the format is cont-en with the Latin Modern font and the luatex engine: this font doesn't have the glyphs of the chars (case 1) ) so the answer is a) change the font (as shown by Aditya) or or b) use a font fallaback (as suggested by Henri Menke). (cont.) Commented May 30, 2016 at 4:26
  • 1
    ...by Henri Menke). To cover the rest 1% it's necessary to know at least if the format (which can be different from default cont-en) recognises that there are missing glyphs, (and in cont-en the macro \enabletrackers[fonts.missing] does this) otherwise it can be a bug in the font/format/engine. Of course \enabletrackers[fonts.missing] is also valid in the other 99% of the cases. Commented May 30, 2016 at 4:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .