ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Adam Lindsay" <atl@comp.lancs.ac.uk>
Subject: Re: Old-style figures throughout the document
Date: Wed, 27 Apr 2005 23:12:00 +0100	[thread overview]
Message-ID: <20050427231200.20212@mail.comp.lancs.ac.uk> (raw)
In-Reply-To: <23106.1114608792@www9.gmx.net>

Viktor Varheit said this at Wed, 27 Apr 2005 15:33:12 +0200:

>ConTeXt  ver: 2005.01.31  fmt: 2005.4.27  int: english  mes: english
>
>Maybe I have to set up anything else?

I'm not entirely certain the magic mapfile is in the main release. (Can't
check--on the road currently.)

>\usetypescript[adobekb][\defaultencoding]

This is an unnecessary line.

>\usetypescript [modern][\defaultencoding]
>\usetypescript [map] [latin-modern-os] [\defaultencoding]
>\setupbodyfont[modern]

Okay, this should (once you get it to work with the LM fonts) work, but
only partially to your requirements--the mapfile magic re-encodes all
fonts so all numerals are text figures. In order to get lining figures on
command in every context, it'll take a bunch more typescripts (and a few
fontvariants defined).

For something a little more tractable, we can have a (not very robust)
hack that switches to math mode (and therefore CM, not LM) when you want
the occasional lining figure. I'll leave auto detection of bold vs normal
weight as an exercise for the reader:

\usetypescript [modern][\defaultencoding]
\usetypescript [map] [latin-modern-os] [\defaultencoding]

\definetypeface[boldmath][mm][boldmath][computer-modern]
                     [computer-modern][encoding=default]
\setupbodyfont[modern]

\def\Lining{\formula}
\def\BoldLining{\formula[boldmath]}
\starttext 

test 1234 test

\ss test 1234 test

\rm test \Lining{1234} test

\bf test \BoldLining{1234} test
\stoptext
 

And this is all pretty much specific to Latin Modern at the moment.
You're looking at fontvariants, most likely, if you want it with your own
fonts. (Recommendation (and PracTeX Journal plug:) this is done fairly
easily with rich OpenType fonts.)
-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Adam T. Lindsay, Computing Dept.     atl@comp.lancs.ac.uk
 Lancaster University, InfoLab21        +44(0)1524/510.514
 Lancaster, LA1 4WA, UK             Fax:+44(0)1524/510.492
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

  reply	other threads:[~2005-04-27 22:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-27 11:52 varheit
2005-04-27 12:33 ` Eckhart Guthöhrlein
2005-04-27 13:33   ` Viktor Varheit
2005-04-27 22:12     ` Adam Lindsay [this message]
2005-04-28  7:52     ` Eckhart Guthöhrlein
2005-04-28 12:35       ` Adam Lindsay
2005-04-27 13:58   ` William F. Adams

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=20050427231200.20212@mail.comp.lancs.ac.uk \
    --to=atl@comp.lancs.ac.uk \
    --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).