ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Character alignment in math mode
Date: Wed, 25 Jun 2014 23:35:26 +0200	[thread overview]
Message-ID: <1D3C74CC-3E1C-47F3-AE93-31ED1A3C534A@gmail.com> (raw)
In-Reply-To: <alpine.BSO.2.11.1406251711270.11959@firefly.landy.cx>


Am 25.06.2014 um 23:20 schrieb Brian R. Landy <brian@landy.cx>:

> 
> 
> On Wed, 25 Jun 2014, Wolfgang Schuster wrote:
> 
>> 
>> Am 24.06.2014 um 21:46 schrieb Maggyero <maggyero@gmail.com>:
>> 
>>>> why  use math here?
>>> 
>>> It was to avoid oldstyle figures that I use by default. But finally it's better to use oldstyle figures even in tables.
>> 
>> You can enable lining (and tabular) figures in the table when you don’t want oldstyle figures.
> 
> Out of curiosity, how do you do that (i.e., revert back to lining, and tabular, figures in a table, or even in running text)?
> 
> For example, if I do this:
> 
>    \starttext
>    \bf 12345\par
>    \tf 12345\par
>    \stoptext
> 
> the first line is bold but the second is not.  But if I do the same with \os:
> 
>    \starttext
>    \os 12345\par
>    \tf 12345\par
>    \stoptext
> 
> both lines use old style numbers.  Is there a way to switch the current font back to lining figures without reloading the font with \switchtobodyfont or something similar?


The \os command enables oldstyle figures in your font and the setting isn’t reset when you switch to a different font alternative.

\definefontfeature[f:lnum][lnum=yes]
\definefontfeature[f:onum][onum=yes]
\definefontfeature[f:tnum][tnum=yes,pnum=no]
\definefontfeature[f:pnum][pnum=yes,tnum=no]

\setupbodyfont[antykwa-poltawskiego]

\starttext

\starttabulate
\NC onum        \NC \feature[+][f:onum]                   1234567890 \NC\NR
\NC onum + tnum \NC \feature[+][f:onum]\feature[+][f:tnum]1234567890 \NC\NR
\NC onum + pnum \NC \feature[+][f:onum]\feature[+][f:pnum]1234567890 \NC\NR
\TB
\NC lnum        \NC \feature[+][f:lnum]                   1234567890 \NC\NR
\NC lnum + tnum \NC \feature[+][f:lnum]\feature[+][f:tnum]1234567890 \NC\NR
\NC lnum + pnum \NC \feature[+][f:lnum]\feature[+][f:pnum]1234567890 \NC\NR
\stoptabulate

\stoptext

Wolfgang
___________________________________________________________________________________
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:[~2014-06-25 21:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24 19:46 Maggyero
2014-06-24 22:29 ` Wolfgang Schuster
2014-06-25  7:50   ` Hans Hagen
2014-06-25 21:20   ` Brian R. Landy
2014-06-25 21:35     ` Wolfgang Schuster [this message]
2014-06-26 14:22       ` Brian R. Landy
  -- strict thread matches above, loose matches on Subject: below --
2014-06-25 13:31 Maggyero
2014-06-25 13:59 ` Hans Hagen
2014-06-25  0:49 Maggyero
2014-06-25  7:10 ` Wolfgang Schuster
2014-06-24 14:35 Maggyero
2014-06-24 15:55 ` Hans Hagen

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=1D3C74CC-3E1C-47F3-AE93-31ED1A3C534A@gmail.com \
    --to=schuster.wolfgang@gmail.com \
    --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).