ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Khaled Hosny <khaledhosny@eglug.org>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re:  Missing °C symbol in math mode with dejavu font
Date: Mon, 20 May 2013 23:22:41 +0200	[thread overview]
Message-ID: <20130520212241.GA13524@khaled-laptop> (raw)
In-Reply-To: <AADEDB2E-A465-4826-8136-90F61C24675F@gmail.com>

On Mon, May 20, 2013 at 11:13:16PM +0200, Wolfgang Schuster wrote:
> 
> Am 20.05.2013 um 23:04 schrieb Romain Diss <romain.diss@yahoo.fr>:
> 
> > Le lundi 20 mai 2013, Alan BRASLAU a écrit :
> >> On Mon, 20 May 2013 22:29:22 +0200
> >> Romain Diss <romain.diss@yahoo.fr> wrote:
> >>> The °C symbol is missing in math mode with the dejavu font. I thought
> >>> that this should be handled by using the '°' + 'C' symbols instead
> >>> but it is not the case.
> >>> Is that a bug?
> >>> What can I do to get the °C symbol with this font?
> >> With dejavu, A, B, and D all work, but C is missing a symbol.
> >> A 100℃
> >> B 100°C
> >> C $100℃$
> >> D $100°C$
> > The question is: do \unit is supposed to handle this case and automatically 
> > switch from C to D if C is missing.
> > If not, how can I tell \unit that C is missing and that I want \unit{celsius} 
> > to use D?
> 
> 
> Hans can add a check for math mode for the symbol:
> 
> \unprotect
> 
> \unexpanded\def\checkedtextcelsius
>   {\ifmmode
>      \phys_units_text_celsius
>    \else\iffontchar\font"2103\relax
>      ℃\else\phys_units_text_celsius
>    \fi\fi}
> 
> \unexpanded\def\checkedtextfahrenheit
>   {\ifmmode
>      \phys_units_text_fahrenheit
>    \else\iffontchar\font"2109\relax
>      ℉\else\phys_units_text_fahrenheit
>    \fi\fi}
> 
> \protect

My suggestion is to just use \phys_units_text_* always, since the
decomposed, two characters is the preferred form for those two units.

Regards,
Khaled
___________________________________________________________________________________
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:[~2013-05-20 21:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-20 20:29 Romain Diss
2013-05-20 20:57 ` Alan BRASLAU
2013-05-20 21:03   ` Khaled Hosny
2013-05-20 21:04   ` Romain Diss
2013-05-20 21:13     ` Wolfgang Schuster
2013-05-20 21:22       ` Khaled Hosny [this message]
2013-05-20 21:36         ` Khaled Hosny
2013-05-21  8:01           ` Hans Hagen
2013-05-21  8:09             ` Khaled Hosny
2013-05-21 12:01               ` Arthur Reutenauer

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=20130520212241.GA13524@khaled-laptop \
    --to=khaledhosny@eglug.org \
    --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).