From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/96573 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: mathsf / mathversions in context Date: Sun, 16 Oct 2016 20:23:27 +0200 Message-ID: <5803C59F.2060508@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0507529006699018911==" X-Trace: blaine.gmane.org 1476642273 29449 195.159.176.226 (16 Oct 2016 18:24:33 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 16 Oct 2016 18:24:33 +0000 (UTC) User-Agent: Postbox 5.0.4 (Macintosh/20161007) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Oct 16 20:24:27 2016 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bvq6K-0003fS-Fw for gctc-ntg-context-518@m.gmane.org; Sun, 16 Oct 2016 20:24:00 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 66E4F1B171; Sun, 16 Oct 2016 20:23:46 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g5O_hoKLdgeU; Sun, 16 Oct 2016 20:23:45 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 853E21B175; Sun, 16 Oct 2016 20:23:45 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 2837C1B173 for ; Sun, 16 Oct 2016 20:23:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fk-Owcqy1LYm for ; Sun, 16 Oct 2016 20:23:43 +0200 (CEST) Original-Received: from mail-lf0-f49.google.com (mail-lf0-f49.google.com [209.85.215.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 34B421B171 for ; Sun, 16 Oct 2016 20:23:32 +0200 (CEST) Original-Received: by mail-lf0-f49.google.com with SMTP id l131so203006506lfl.2 for ; Sun, 16 Oct 2016 11:23:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=yzPW759nH5FWastxPfiKd14aSRsv0Hr7j0F8naaVIqw=; b=WCQQEAXkXbKf34XWqQkJq45WFNvMnojTqujkiE5AW7xJzvqQm37DHPEi7mAok/c+Zt Se3E7kXdV6GYGn0Mpf0tIePgnvoQzlTQgj+1Gy2/lE0UPVrzbm2Tdn97YvWSKI2obpB6 /q6r4ebllLvjGEuLGtQF5gI0gsgce7nnD1yKJVs7uttwaKPEMg2gBKoszKBicXc1kWAw SwDESvrPoRslEE0hI1QTu4GESxEp25DIP9ZZCN0s/sDjiVuLQ81FtcirMjO4BM6432Xd gBM6hZ0dTDemEAYJ1IjBZwAvc+CNGR1AD4PhYeecXbDnAVvzpLcFzlbv4qOqAc91ZUcD YcZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=yzPW759nH5FWastxPfiKd14aSRsv0Hr7j0F8naaVIqw=; b=jUV8uh/n1G5Xha6Qal6gBl8XkblTcUERHx+x22ul/qKWurERqXmpjGgnWWG6LG+mpg P9fhbPWQANLlNbVnXpY1Q1mH8kSZafipJCtlxN+6SPh6eqmntUoCRUkE4Yf2aRwEdew6 UgitCMdH7L/VFK3N7/EKWKRm6aX4Jur+CuHC2PiX5I4gDX/ykariTrMdUhqULvpJreu7 a2AEbV5P6C+QdRJ/APRhM6pybPWBItoW5g/vXe8xYy87DimUBum1AicVDfjhXO2Qdpz6 qGFjyhctr7m4ZFK5Y5i55kDW7fyogP3jw1oP7YRH7gLjx5iv87t/TQa50RCxMOpC8Gvc VOPw== X-Gm-Message-State: AA6/9RnzVEGJbJhdxVysBuHEQ6wSkFfZedBTeVLnV1GiSJcThMblyf/DnfRbSxfS3i1z5w== X-Received: by 10.28.164.70 with SMTP id n67mr6105783wme.61.1476642211094; Sun, 16 Oct 2016 11:23:31 -0700 (PDT) Original-Received: from keima.localdomain (x2f29e59.dyn.telefonica.de. [2.242.158.89]) by smtp.gmail.com with ESMTPSA id h10sm44777851wje.48.2016.10.16.11.23.29 for (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 16 Oct 2016 11:23:30 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:96573 Archived-At: This is a multi-part message in MIME format. --===============0507529006699018911== Content-Type: multipart/alternative; boundary="------------090509060701010606020409" This is a multi-part message in MIME format. --------------090509060701010606020409 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit > Csikos Bela > 14. Oktober 2016 um 16:56 > Wolfgang Schuster írta: > >>> I would like to set up Tex Gyre Adventor sans serif >>> font as my math font (even if it doesn't havemath 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 mathsans serif etc. >>> (http://milde.users.sourceforge.net/LUCR/Math/math-font-selection.xhtml). >>> Is this possiblein context, and if yes, how? >> ConTeXt doesn’t use the same style switches as LaTeX. > > Thanks. Is there a way to change font family locally in math mode? > For example how can I use serif if sans serif is the default math font? It depends what you want to achieve, for string you can use \text{...} which uses the text font. >> 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] >> > > I played a lot with these setups and have questions. > I use this font setting: > > \definefontfamily [docuf] [rm] [TeX Gyre Bonum] > \definefontfamily [docuf] [ss] [TeX Gyre Adventor] > \definefontfamily [docuf] [tt] [Latin Modern Mono] [features=none] > > \definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:uppercasenormal]%,scale=.6] > \definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:uppercasebold]%,scale=.6] > \definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:uppercaseitalic]%,scale=.6] > \definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:uppercasebolditalic]%,scale=.6] > > \definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:lowercasenormal]%,scale=.6] > \definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:lowercasebold]%,scale=.6] > \definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:lowercaseitalic]%,scale=.6] > \definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:lowercasebolditalic]%,scale=.6] > > \definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:digitsnormal]%,scale=.6] > \definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:digitsbold]%,scale=.6] > \definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:digitsitalic]%,scale=.6] > \definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:digitsbolditalic]%,scale=.6] > > \definefontfamily [docuf] [mm] [TeX Gyre Pagella Math] > > \setupbodyfont[docuf,24pt] > > 1. If I want to use a scale factor is it possible the give the scale factor by using > the preset a,b,c,d,x,xx values? Or I must specify the scale factors as numbers? Only numbers are possible. > 2. Scaling occurs compared to which font in the definition list? > > 3. I found that if I write \definefontfamily [docuf] [mm] [TeX Gyre Pagella Math] > before \definefallbackfamily lines, the latter have no effect. Is this normal? > Shouldn't the order of definition lines be indifferent? The fallbackfamily settings are applied to a typeface and the \definefontfamily commands creates the typeface, without \definefontfamily the fallbacks are never used because there is no font which can use the settings. > 4. If I write a paragraph with different font size, how can I scale the embedded math > too automatically? For example if I write > > \placefigure[here]{Figure title}{\ss\tfxx > A B C D \math{E~F~G~}} > > A B C D is typeset with small fonts but E F G not; it will be huge compared to > A B C D. I can't manually scale the math part because it is inserted here > by chemfig module and I can't redefine how it typesets fonts. The x and xx perform not the same scaling as a, b etc. but you can define your own sizes which behave the same way as a etc. \definefontsize[m] \definefontsize[n] \definebodyfontenvironment[default][m=0.8,n=0.9] \starttext {\tfm This paragraph contains text and $math$.} {\tfn This paragraph contains text and $math$.} This paragraph contains text and $math$. {\tfa This paragraph contains text and $math$.} {\tfb This paragraph contains text and $math$.} \stoptext Wolfgang --------------090509060701010606020409 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
14. Oktober 2016 um 16:56
Wolfgang Schuster írta:

I would like to set up Tex Gyre Adventor sans serif
font as my math font (even if it doesn't havemath 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 mathsans serif etc. 
(http://milde.users.sourceforge.net/LUCR/Math/math-font-selection.xhtml).
Is this possiblein context, and if yes, how?
ConTeXt doesn’t use the same style switches as LaTeX.

Thanks. Is there a way to change font family locally in math mode?
For example how can I use serif if sans serif is the default math font?
It depends what you want to achieve, for string you can use \text{...} which uses the text font.
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]


I played a lot with these setups and have questions.
I use this font setting:

\definefontfamily     [docuf] [rm] [TeX Gyre Bonum] 
\definefontfamily     [docuf] [ss] [TeX Gyre Adventor]
\definefontfamily     [docuf] [tt] [Latin Modern Mono] [features=none]

\definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:uppercasenormal]%,scale=.6]
\definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:uppercasebold]%,scale=.6]
\definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:uppercaseitalic]%,scale=.6]
\definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:uppercasebolditalic]%,scale=.6]

\definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:lowercasenormal]%,scale=.6]
\definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:lowercasebold]%,scale=.6]
\definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:lowercaseitalic]%,scale=.6]
\definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:lowercasebolditalic]%,scale=.6]

\definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:digitsnormal]%,scale=.6]
\definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:digitsbold]%,scale=.6]
\definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:digitsitalic]%,scale=.6]
\definefallbackfamily [docuf] [mm] [Tex Gyre Adventor] [preset=math:digitsbolditalic]%,scale=.6]

\definefontfamily     [docuf] [mm] [TeX Gyre Pagella Math]

\setupbodyfont[docuf,24pt]

1. If I want to use a scale factor is it possible the give the scale factor by using
the preset a,b,c,d,x,xx values? Or I must specify the scale factors as numbers?
Only numbers are possible.
2. Scaling occurs compared to which font in the definition list?

3. I found that if I write \definefontfamily     [docuf] [mm] [TeX Gyre Pagella Math]
before \definefallbackfamily lines, the latter have no effect. Is this normal?
Shouldn't the order of definition lines be indifferent?
The fallbackfamily settings are applied to a typeface and the \definefontfamily commands creates
the typeface, without \definefontfamily the fallbacks are never used because there is no font which
can use the settings.
4. If I write a paragraph with different font size, how can I scale the embedded math
too automatically? For example if I write

\placefigure[here]{Figure title}{\ss\tfxx
A B C D \math{E~F~G~}}

A B C D is typeset with small fonts but E F G not; it will be huge compared to
A B C D. I can't manually scale the math part because it is inserted here
by chemfig module and I can't redefine how it typesets fonts.
The x and xx perform not the same scaling as a, b etc. but you can define your
own sizes which behave the same way as a etc.

\definefontsize[m]
\definefontsize[n]

\definebodyfontenvironment[default][m=0.8,n=0.9]

\starttext

{\tfm This paragraph contains text and $math$.}

{\tfn This paragraph contains text and $math$.}

This paragraph contains text and $math$.

{\tfa This paragraph contains text and $math$.}

{\tfb This paragraph contains text and $math$.}

\stoptext

Wolfgang
--------------090509060701010606020409-- --===============0507529006699018911== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwOi8vZm91bmRyeS5zdXBl bGVjLmZyL3Byb2plY3RzL2NvbnRleHRyZXYvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRnYXJk ZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============0507529006699018911==--