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: mathsf / mathversions in context
Date: Tue, 11 Oct 2016 23:02:17 +0200	[thread overview]
Message-ID: <57FD5359.7090207@gmail.com> (raw)
In-Reply-To: <freemail.20161011215201.83562.1@fmxmldata05.freemail.hu>


[-- Attachment #1.1: Type: text/plain, Size: 1727 bytes --]

> Csikos Bela <mailto:bcsikos425@freemail.hu>
> 11. Oktober 2016 um 21:52
> Dear list members:
>
> I would like to set up Tex Gyre Adventor sans serif font as my math 
> font (even if it doesn't have
> math symbols). I have two questions related to this problem.
>
> 1. In latex I can specify math font versions, define a specific font 
> as math serif / normal, another as math
> sans serif etc. 
> (http://milde.users.sourceforge.net/LUCR/Math/math-font-selection.xhtml). 
> Is this possible
> in context, and if yes, how?
ConTeXt doesn’t use the same style switches as LaTeX.
> 2. If I specify Tex Gyre Adventor as default math font in context, I 
> get compile error.
> Here is a MWE, file name is mathfont.tex:
>
> --------
> \definefontfamily [mathfont] [sf] [Tex Gyre Bonum]
> \definefontfamily [mathfont] [mm] [Tex Gyre Adventor]
> \setupbodyfont[mathfont,10pt]
>
> \starttext
>
> Normal text.
>
> \math{Inline math expression.}
>
> Normal text.
>
> \stoptext
> --------
1. sf is not a valid argument for the second argument of \definefontfamily

2. You need a real math font for mathematics, a text font doesn’t work 
because it lacks many parameter for math mode.

3. You can use the font fallback mechanism to replace certain character 
in the math font with characters from a text font.

\definefontfamily     [mathfont] [rm] [Tex Gyre Bonum]
\definefallbackfamily [mathfont] [mm] [Tex Gyre Adventor] 
[preset=math:lowercaseitalic]
\definefallbackfamily [mathfont] [mm] [Tex Gyre Adventor] 
[tf=style:italic,range=0x068,offset=0x0210E]% Planck constant
\definefontfamily     [mathfont] [mm] [Tex Gyre Pagella Math]

\setupbodyfont[mathfont,10pt]

\starttext

Normal text.

\math{a + b = c}

\stoptext

Wolfgang

[-- Attachment #1.2: Type: text/html, Size: 3236 bytes --]

[-- Attachment #2: Type: text/plain, Size: 489 bytes --]

___________________________________________________________________________________
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://context.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2016-10-11 21:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-11 19:52 Csikos Bela
2016-10-11 21:02 ` Wolfgang Schuster [this message]
2016-10-14 14:56   ` Csikos Bela
2016-10-16 18:23     ` Wolfgang Schuster
2016-10-20 14:59       ` Csikos Bela
2016-10-26 18:22         ` Wolfgang Schuster
2016-10-27 16:42           ` Csikos Bela

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=57FD5359.7090207@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).