From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/107225 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Fabrice Couvreur Newsgroups: gmane.comp.tex.context Subject: Re: Changing the font size in an environment changes the behavior of a macro Date: Mon, 4 May 2020 23:46:51 +0200 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3532594801982570055==" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="58819"; mail-complaints-to="usenet@ciao.gmane.io" To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon May 04 23:47:58 2020 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jViwP-000F9h-MG for gctc-ntg-context-518@m.gmane-mx.org; Mon, 04 May 2020 23:47:57 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 0335C183AEE; Mon, 4 May 2020 23:47:34 +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 YJ5NombgNMvz; Mon, 4 May 2020 23:47:31 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 7250C183AEA; Mon, 4 May 2020 23:47:31 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1A652192054 for ; Mon, 4 May 2020 23:47:30 +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 RUJkMSPgbgHC for ; Mon, 4 May 2020 23:47:29 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.221.54; helo=mail-wr1-f54.google.com; envelope-from=fabrice1.couvreur@gmail.com; receiver= Original-Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 38CF1D45 for ; Mon, 4 May 2020 23:47:29 +0200 (CEST) Original-Received: by mail-wr1-f54.google.com with SMTP id x17so293655wrt.5 for ; Mon, 04 May 2020 14:47:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=meq0MkM9r002s59Tv8D6cNJ14+jLIaQVzrcqB6Tw9sA=; b=Nh57sqL2l0th439XxQwjZx/4dkV2uPQM+fM/wVSDjC6Qjd/+T50hdk3loGSWzy/vke txuvOtLeR7IArK+QqcvxI2Rcmf18rTr2ryroBD2UO3vVMX9XsJuncxMsE9uLqYuNfs5i vdWVDSy35L5Jwrz5lS1CbuuuPbxRmZoOj1MTHRJcYFuLvzi9Fqvv6wgn3n6cON9foEGC w9OMY3m+aM/5GNAwyUhRzaFTOCLv+nvBHoSiL+mQh5dbdG3/3vU47205jFvK8nuOnurg UW2BKKbxmbz4eQKBXm3nDVo1nYSNbGo7oahsijlOS5ny5i+6cG7Q50hqF7npVkYGp3dl DMdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=meq0MkM9r002s59Tv8D6cNJ14+jLIaQVzrcqB6Tw9sA=; b=WfRL5p0Wd/AgrDsP7ajL+oxk/BF6FYEmcD+LME5OmO3yHdjSNVUPYlFdrsE3f7HIKa idKaRVm05vPj62lEAGyeqDgbTF9s4rGjpt3PWJXEk9t+Je7ktxK/4jkltDHKaGnW+DXE mvXSlVXBfcCeBk2l/y9QeW1UatBjxEAvmZ+PyzbtTTj0nWg3Du2/TqNtj+4avQC4Fb8L 4Jx95x+I/neWcLyNSWerGiAQQoHW9BsOX+nxe0ZKoDNgDeTrB1uorkbggVtvwCRzSoty 2OHaP+epFqtgBKejkcnYJdbSrXt0iqSEFhQSjjsC97EA0bC/2Lx4zKncPd53SBGEDuxH BmeA== X-Gm-Message-State: AGi0PuYirpSrzSRedfBuOIhPDrjXMq0u3wEzg/h+WLnF50tXMzzuWhbS EeO0/rBUylKq0fS+Q5O1Puyb4Jk4KFv/rF8NUpW03Uom X-Google-Smtp-Source: APiQypItD64+M79ptu8S5EvZ1tMc0T8+E8OVyLf2spOsOD1KJGAmEVK6Zc/9kocNZYJBLqOhi7KdmARVu4/pvTWyFjM= X-Received: by 2002:adf:a704:: with SMTP id c4mr1145879wrd.303.1588628848505; Mon, 04 May 2020 14:47:28 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 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.io gmane.comp.tex.context:107225 Archived-At: --===============3532594801982570055== Content-Type: multipart/alternative; boundary="00000000000031f63c05a4d97a83" --00000000000031f63c05a4d97a83 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Aditya, Thank you for your help ; this also works with pgfplots but the body of the text must be with the same font. I always use the pagella font but it doesn't allow you to use \mathscript{} that's why I use this macro. Are there other free fonts that allow you to do this ? Fabrice \usemodule[pgfplots] \pgfplotsset{compat=3Dnewest} \usebodyfont[xitsbidi] \define[1]\cscript{\start\m{{\mathscript{#1}}}\stop} \startmidaligned \define[1]\cscript{\start\m{{\mathscript{#1}}}\stop} \starttikzpicture \startaxis \addplot {x}; \node[above left] at (2,2) {\cscript{C}}; \stopaxis \stoptikzpicture \stopmidaligned \blank \startmidaligned \switchtobodyfont[9pt] \starttikzpicture \startaxis \addplot {x}; \node[above left] at (2,2) {\cscript{C}}; \stopaxis \stoptikzpicture \stopmidaligned \stoptext Le lun. 4 mai 2020 =C3=A0 19:18, Aditya Mahajan a =C3= =A9crit : > On Mon, 4 May 2020, Fabrice Couvreur wrote: > > > Hi, > > Sorry to insist but I cannot fix this problem. > > Thanks for any help. > > I don't know the answer, but here is a simpler example without pgfplot > which fails (different calligraphic C's): > > > > \define[1]\cscript{\start\switchtobodyfont[xitsbidi]\m{{\mathscript{#1}}}= \stop} > > \starttext > \startTEXpage[offset=3D2mm] > \cscript{C} > \start > \switchtobodyfont[9pt] > \cscript{C} > \stop > \stopTEXpage > \stoptext > > And here is a version with a minor change that works (same calligraphic > C's)! > > \usebodyfont[xitsbidi] > > \define[1]\cscript{\start\m{{\mathscript{#1}}}\stop} > > \starttext > \startTEXpage[offset=3D2mm] > \cscript{C} > \start > \switchtobodyfont[9pt] > \cscript{C} > \stop > \stopTEXpage > \stoptext > > Aditya > > _________________________________________________________________________= __________ > 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 : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > _________________________________________________________________________= __________ > --00000000000031f63c05a4d97a83 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Ad= itya,
Thank you for your help ;= this also works with pgfplots but= the body of the text must be with the same font. I always use the pagella font but it doesn't allow you = to use \mathscript{} that's why I use this macro. Are there other free fonts that allow you to do this ?<= /span>
Fabrice


\usemodule[pgfplots]
\pgfplotsset{compat=3Dnewest}<= br>\usebodyfont[xitsbidi]
\define[1]\cscript{\start\m{{\mathscript{#1}}}= \stop}

\startmidaligned
=C2=A0\define[1]\cscript{\start\m{{\maths= cript{#1}}}\stop}
=C2=A0\starttikzpicture =C2=A0
=C2=A0\startaxis=C2=A0 =C2=A0\addplot {x};
=C2=A0 =C2=A0\node[above left] at (2,2) {\cs= cript{C}};
=C2=A0 =C2=A0\stopaxis =C2=A0
=C2=A0\stoptikzpicture
= =C2=A0\stopmidaligned
=C2=A0\blank
=C2=A0\startmidaligned
=C2=A0 \= switchtobodyfont[9pt]
=C2=A0 \starttikzpicture
=C2=A0 \startaxis
= =C2=A0 =C2=A0\addplot {x};
=C2=A0 =C2=A0\node[above left] at (2,2) {\csc= ript{C}};
=C2=A0 =C2=A0\stopaxis =C2=A0
=C2=A0\stoptikzpicture
=C2= =A0\stopmidaligned
=C2=A0
\stoptext

Le=C2=A0lun. 4 mai 2020 =C3= =A0=C2=A019:18, Aditya Mahajan <adi= tyam@umich.edu> a =C3=A9crit=C2=A0:
On Mon, 4 May 2020, Fabrice Couvreur wrote:

> Hi,
> Sorry to insist but I cannot fix this problem.
> Thanks for any help.

I don't know the answer, but here is a simpler example without pgfplot = which fails (different calligraphic C's):


\define[1]\cscript{\start\switchtobodyfont[xitsbidi]\m{{\mathscript{#1}}}\s= top}

\starttext
\startTEXpage[offset=3D2mm]
\cscript{C}
\start
=C2=A0 =C2=A0\switchtobodyfont[9pt]
=C2=A0 =C2=A0\cscript{C}
\stop
\stopTEXpage
\stoptext

And here is a version with a minor change that works (same calligraphic C&#= 39;s)!

\usebodyfont[xitsbidi]

\define[1]\cscript{\start\m{{\mathscript{#1}}}\stop}

\starttext
\startTEXpage[offset=3D2mm]
\cscript{C}
\start
=C2=A0 =C2=A0\switchtobodyfont[9pt]
=C2=A0 =C2=A0\cscript{C}
\stop
\stopTEXpage
\stoptext

Aditya
___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt= g-context
webpage=C2=A0 : http://www.pragma-ade.nl / http://context.aanhet.net=
archive=C2=A0 : https://bitbucket.org/phg/context-m= irror/commits/
wiki=C2=A0 =C2=A0 =C2=A0: http://contextgarden.net
___________________________________________________________________________= ________
--00000000000031f63c05a4d97a83-- --===============3532594801982570055== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============3532594801982570055==--