# How do I get italic texts figures in ConTeXt?

Inside an italic section I want to place text figures (which should be italic as well). How do I achieve this? (The document is in ConTeXt MKII.)

Both of the following examples produces non italic (regular) text figures:

{\em Poppy Heavy with Seed. Video, {\os 17}:{\os 52}.}
{\em Poppy Heavy with Seed. Video, {\em \os 17}:{\em \os 52}.}


Here are two tests with images:

# Test 1

\setupbodyfont [10pt]
\starttext
{\em Poppy Heavy with Seed. Video, {\os 17}:{\os 52}.}
\stoptext


ConTeXt (PDFTeX):

ConTeXt (LuaTeX):

# Test 2

\setupbodyfont [10pt]
\starttext
{\em Poppy Heavy with Seed. Video, {\em \os 17}:{\em \os 52}.}
\stoptext


ConTeXt (PDFTeX):

ConTeXt (LuaTeX):

-
Does the font you are using have italic oldsttyle glyphs? – Aditya Apr 23 '13 at 17:27
Works for me with the antpolt (Antykwa Półtawskiego) font. – prash Apr 23 '13 at 21:06
@Aditya Guess it's Latin modern (if that is the standard in mkii), added examples in my question. Took for granted it would have italic text figures? – PetaspeedBeaver Apr 24 '13 at 20:39
\em is a command for emphasising text relative to its context, in particular \em inside \em will produce roman. If you want to definitively switch to italic use \it instead. – Andrew Swann Apr 25 '13 at 7:48
If I run context on your examples then mkiv is used and the otf version of the latin modern fonts are used, and I get italic old style numbers. On the other hand if I run the older texexec command, then mkii is used and .pfb files for latin modern are loaded. Perhaps these don't have the required glyphs or mkii calls oldstyle numbers in a different way. – Andrew Swann Apr 25 '13 at 8:04

First note that \em is a command for emphasising text relative to its context, so {\em a {\em b} c} in upright text prints a and c in italics, but b upright. Thus the coding

{\em Poppy Heavy with Seed. Video, {\em \os 17}:{\em \os 52}.}


will be expected to print 17 and 52 in an upright font.

Now what \os actually does depends on what version of context you run on the file. Consider

\setupbodyfont [10pt]
\starttext
{\em Poppy Heavy with Seed. Video, {\os 17}:{\os 52}.}
{\em Poppy Heavy with Seed. Video, {\em \os 17}:{\em \os 52}.}
\stoptext


To get mkii behaviour use the command texexec. This uses the pdftex engine and Latin Modern fonts in their .pfb version

You can see this information in the log file, which includes:

This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013) (format=cont-en 2013.7.18)  14 AUG 2013 08:27
...
ConTeXt  ver: 2013.04.09 10:38 MKII  fmt: 2013.7.18  int: english/english
...
{/usr/local/texlive/2013/texmf-dist/fonts/enc/dvips/lm/lm-mathit.enc}{/usr/lo
cal/texlive/2013/texmf-dist/fonts/enc/dvips/lm/lm-ec.enc}</usr/local/texlive/20
13/texmf-dist/fonts/type1/public/lm/lmmi10.pfb></usr/local/texlive/2013/texmf-d
ist/fonts/type1/public/lm/lmr10.pfb></usr/local/texlive/2013/texmf-dist/fonts/t
ype1/public/lm/lmro10.pfb>


On the other hand if you run the command context on the file then you get mkiv behaviour, the engine used is luatex and the Latin Modern fonts are loaded in their .otf version

The log file contains:

ConTeXt  ver: 2013.05.28 00:36 MKIV current  fmt: 2013.8.14  int: english/english
...
mkiv lua stats  > loaded fonts: 3 files: latinmodern-math.otf (experimental), lmroman10-regular.otf, lmromanslant10-regular.otf


Thus you see that (a) different engines use different underlying formats and different font mechanisms and (b) it is the mkiv behaivour that gives italic old style figures in the one place expected, mkii does not produce this (at least for the latin modern fonts).

-