From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/91388 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Changing font for math function Date: Sat, 9 May 2015 18:28:30 +0200 Message-ID: References: <554DF3A6.1040700@wxs.nl> <554E0509.6070900@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Content-Type: multipart/mixed; boundary="===============0227377840==" X-Trace: ger.gmane.org 1431188960 31671 80.91.229.3 (9 May 2015 16:29:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 9 May 2015 16:29:20 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat May 09 18:29:08 2015 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Yr7ch-0000Ds-RR for gctc-ntg-context-518@m.gmane.org; Sat, 09 May 2015 18:29:07 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EFD1A10226 for ; Sat, 9 May 2015 18:29:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 0HYpgdwtw5tf for ; Sat, 9 May 2015 18:29:05 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id AF56C1022C for ; Sat, 9 May 2015 18:28:39 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 69162101E8 for ; Sat, 9 May 2015 18:28:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 4unnn0Dwm6Mv for ; Sat, 9 May 2015 18:28:34 +0200 (CEST) Original-Received: from filter4-ams.mf.surf.net (filter4-ams.mf.surf.net [192.87.102.72]) by balder.ntg.nl (Postfix) with ESMTP id 590C7101E6 for ; Sat, 9 May 2015 18:28:34 +0200 (CEST) Original-Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) by filter4-ams.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id t49GSX48013451 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sat, 9 May 2015 18:28:33 +0200 Original-Received: by wicmx19 with SMTP id mx19so56283252wic.1 for ; Sat, 09 May 2015 09:28:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:content-type:message-id:mime-version:subject:date:references :to:in-reply-to; bh=yUfFY9pW1K9n1fELjyV+A8iMKyfv5JxCaRvL5PlpKiU=; b=I0RiGtaaP4QQzYz7tUugdg574PUSGKW8JnuF36CMNGMyGx+B0DyYq+mMX2y4ih+M1E oLa9y+KLdNGcMQnlJvYa8CqVHYKZWgsGYjI/QwUtUIDOroUi7cZFguv5EIzwoNYzY4Ub w5xOxUatvLvs8c45vKHoB1cTIum8Em0sjFBghKc4EEzSmC5/0ngtQQscLKaZw4YyrmUx MqZdXwbeP7WuHCBCIZ8yiTHnGuaYJcwA4V6o3RgP4dCzyHt1loS74oVujFAzfMH/SXKX zPvc1+uQ57/qPP1xVRJz4D0eTpAf0WaRFUKZDvcEEb2huUtQTgREElp5EetjP55gu6U0 2gnw== X-Received: by 10.180.100.101 with SMTP id ex5mr6004726wib.13.1431188913235; Sat, 09 May 2015 09:28:33 -0700 (PDT) Original-Received: from keima.localdomain (x2f22a63.dyn.telefonica.de. [2.242.42.99]) by mx.google.com with ESMTPSA id n8sm4480735wiy.19.2015.05.09.09.28.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 09 May 2015 09:28:32 -0700 (PDT) In-Reply-To: <554E0509.6070900@wxs.nl> X-Mailer: Apple Mail (2.2098) X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=2a00:1450:400c:c05::229; country=BE; region=Brussels Capital; city=Brussels; latitude=50.8466; longitude=4.3528; http://maps.google.com/maps?q=50.8466,4.3528&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 01OpQsxm1 - ebb74321f953 - 20150509 Received-SPF: pass (filter4-ams.mf.surf.net: domain of schuster.wolfgang@gmail.com designates 2a00:1450:400c:c05::229 as permitted sender) receiver=filter4-ams.mf.surf.net; client-ip=2a00:1450:400c:c05::229; envelope-from=; helo=mail-wi0-x229.google.com; identity=mailfrom X-Scanned-By: CanIt (www . roaringpenguin . com) 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:91388 Archived-At: --===============0227377840== Content-Type: multipart/alternative; boundary="Apple-Mail=_98260740-0876-4F90-B516-908A882E8C6B" --Apple-Mail=_98260740-0876-4F90-B516-908A882E8C6B Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Am 09.05.2015 um 15:00 schrieb Hans Hagen : >=20 > On 5/9/2015 1:56 PM, Wolfgang Schuster wrote: >>=20 >>> Am 09.05.2015 um 13:46 schrieb Hans Hagen >>> >>: >>>=20 >>> On 5/9/2015 2:03 AM, Aditya Mahajan wrote: >>>> Hi, >>>>=20 >>>> There is a question on TeX.SX asking how to change the font of = \sin, >>>> \cos, etc. >>>>=20 >>>> http://tex.stackexchange.com/q/243893/323 >>>>=20 >>>> I looked at the code, and there does not appear to be an easy = solution. >>>> The \mathfunctionlabeltext command has \mathupright hard coded. >>>>=20 >>>> One option is to keep this configurable using \setupmathematics, = perhaps >>>> mfunction=3D(normal|italic|sans). >>>>=20 >>>> In any case, I think that the current implementation is a bug. The >>>> default font for mathfunctionlabeltext should be typeset in the = bodyfont. >>>=20 >>> this is evil (as it's unpredictable, so no support for side = effects): >>>=20 >>> % \prependtoks \rm \to \everymathematics >>=20 >> Is there no better way to use upright letters in math except the line = above? >=20 > for functions one can now use: >=20 > \setupmathematics > [functionstyle=3D\rm] >=20 > and for other changes the normal alphabet changing commands. For text = one has the text commands. Keep in mind that in the regular math stream = we don't think of fonts but of alphabets The bold and italic symbols/letters aren=E2=80=99t a problem because the = have their own unicode points but for the normal upright characters = there should be proper key (like the lcgreek and ucgreek keys) which = prevent ConTeXt to make them into italic characters. The = \everymathematics hack works but isn=E2=80=99t very nice. \setupmathematics[lcgreek=3Dnormal] \setupbodyfont[cambria] %\appendtoks \rm \to \everymathematics \starttext \m{=CE=B1=F0=9D=9B=82=F0=9D=9B=BC=F0=9D=9C=B6} \m{D=F0=9D=90=83=F0=9D=90=B7=F0=9D=91=AB} \m{{\rm D}=F0=9D=90=83=F0=9D=90=B7=F0=9D=91=AB} \stoptext Wolfgang= --Apple-Mail=_98260740-0876-4F90-B516-908A882E8C6B Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Am 09.05.2015 um 15:00 schrieb Hans Hagen <pragma@wxs.nl>:

On 5/9/2015 1:56 PM, Wolfgang Schuster = wrote:

Am = 09.05.2015 um 13:46 schrieb Hans Hagen <pragma@wxs.nl
<mailto:pragma@wxs.nl>>:

On 5/9/2015 2:03 AM, Aditya Mahajan wrote:
Hi,

There is a question on TeX.SX asking how to change the font = of \sin,
\cos, etc.

http://tex.stackexchange.com/q/243893/323
I looked at the code, and there does not appear to be an = easy solution.
The \mathfunctionlabeltext command has = \mathupright hard coded.

One option is to = keep this configurable using \setupmathematics, perhaps
mfunction=3D(normal|italic|sans).

In any case, I think that the current implementation is a = bug. The
default font for mathfunctionlabeltext should be = typeset in the bodyfont.

this = is evil (as it's unpredictable, so no support for side effects):

% \prependtoks \rm \to \everymathematics

Is there no better way to use = upright letters in math except the line above?

for functions one can now = use:

\setupmathematics
 [functionstyle=3D\rm]

and for other changes the normal alphabet = changing commands. For text one has the text commands. Keep in mind that = in the regular math stream we don't think of fonts but of = alphabets

The bold and italic symbols/letters = aren=E2=80=99t a problem because the have their own unicode points but = for the normal upright characters there should be proper key (like the = lcgreek and ucgreek keys) which prevent ConTeXt to make them into italic = characters. The \everymathematics hack works but isn=E2=80=99t very = nice.

\setupmathematics[lcgreek=3Dnormal]

\setupbodyfont[cambria]

%\appendtoks \rm \to = \everymathematics

\starttext

\m{=CE=B1=F0=9D=9B=82=F0=9D=9B=BC=F0=9D=9C=B6}

\m{D=F0=9D=90=83=F0=9D=90=B7=F0=9D=91=AB}

\m{{\rm = D}=F0=9D=90=83=F0=9D=90=B7=F0=9D=91=AB}

\stoptext

Wolfgang
= --Apple-Mail=_98260740-0876-4F90-B516-908A882E8C6B-- --===============0227377840== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly90ZXguYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHA6Ly9mb3VuZHJ5LnN1cGVsZWMu ZnIvcHJvamVjdHMvY29udGV4dHJldi8Kd2lraSAgICAgOiBodHRwOi8vY29udGV4dGdhcmRlbi5u ZXQKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX18= --===============0227377840==--