From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/105129 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Shuxian Wang" Newsgroups: gmane.comp.tex.context Subject: Multi-letter words/identifiers in math Date: Sun, 29 Sep 2019 00:30:33 -0700 Message-ID: <2C87AD65-D3D3-4AAF-96F7-B4D23F213153@udscbt.io> Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0363372160992118946==" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="162091"; mail-complaints-to="usenet@blaine.gmane.org" To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Sun Sep 29 09:31:13 2019 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 esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iETfk-000g0Q-P0 for gctc-ntg-context-518@m.gmane.org; Sun, 29 Sep 2019 09:31:12 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id BF4DF16152A; Sun, 29 Sep 2019 09:30:51 +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 MRvXeX0uFzna; Sun, 29 Sep 2019 09:30:47 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 584CB161525; Sun, 29 Sep 2019 09:30:43 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1EA19161522 for ; Sun, 29 Sep 2019 09:30:42 +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 YCQgwe1rxzA1 for ; Sun, 29 Sep 2019 09:30:37 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.215.170; helo=mail-pg1-f170.google.com; envelope-from=wsx@udscbt.io; receiver= Original-Received: from mail-pg1-f170.google.com (mail-pg1-f170.google.com [209.85.215.170]) (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 53C5E161321 for ; Sun, 29 Sep 2019 09:30:37 +0200 (CEST) Original-Received: by mail-pg1-f170.google.com with SMTP id a24so5609830pgj.2 for ; Sun, 29 Sep 2019 00:30:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=udscbt.io; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=peNXxGI7CLRxN4TzTAQuhUNweHvgj3VjhjlKeGhxtWE=; b=AB6FjnDthZ7TB6IEcoLB9j5fQiNkKWh69iR/paL+ThuZohE+vJXxYaun8gAopuLxQ4 xe2CCLdrtjAS4jDFw2D1I6SWBYhT+S3vjFdR3O2SzRLnIbT+89JmzZsRWV5gL8UqWQy7 r7z0KTPB7vIHIULoakb6TWFw+WlBEiOGyThWrQ2Aqj6qPynJCqX/TphjbUj2ZpJYOVGA QB0TLNWO2W7YQQvtbnPQ3qbEqL7XSMgdVkP7OWKMxA47m1jqM43C9oFmAvUcso+lruqo NBCzODVm+myoFzq5OWH/otR1BQZe/5plzDtTBLwImTc9ANUDtkoVHnZoWPDRDEdY43Cg jxkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=peNXxGI7CLRxN4TzTAQuhUNweHvgj3VjhjlKeGhxtWE=; b=jQBptlAxbrfXK5HrwjQDUiWPIJXjpAajTjsIdIvnnaNNhzhxrzWM89n7WV55q74afY EujzXAQhYyJ0uB0MAYywVV5UKG+vNwmL0SGA/P/j5p7Kz5YyutNnOEyxtLRkTW6Rp9I6 ytsWkF805JtbxKvuHYG6VQUmEdpfEYrH3XaInpuXJkQ15QpJArGEQ0hsyeRm7EbIDwUl /AwaM8xghDixl2Ch9Ie4+pjKhb0pLA8L6sEZ3UyK4AjWny/9pMWTyKA7E8QelZ5TYrv1 pwSMJwMXYbKSFIBE2ue7izVv14Kr6dxQs5aVL/7MbviF5ty578cDrYjUDehrYZ7q2S2U y3oQ== X-Gm-Message-State: APjAAAUFzNXjhsAhnA9yh1tRm6j1BVDD3y7CeTA8gpiS27DaHad33pNh yR4nI1RyqSbFXjFDKq2M3kR4jmbhjae04g== X-Google-Smtp-Source: APXvYqwGtcWMjyIzz0b7M+k3MLsFPNM4SeD6IgkQd7XN5E9NnPxyM3InoogrKOQEJ1XKyYvP+kVrWw== X-Received: by 2002:a65:5546:: with SMTP id t6mr18104301pgr.441.1569742235390; Sun, 29 Sep 2019 00:30:35 -0700 (PDT) Original-Received: from [198.18.0.1] (airbears2-136-152-143-187.airbears2.berkeley.edu. [136.152.143.187]) by smtp.gmail.com with ESMTPSA id l37sm3677672pgb.11.2019.09.29.00.30.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 29 Sep 2019 00:30:34 -0700 (PDT) X-Mailer: MailMate Trial (1.12.5r5635) 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.org gmane.comp.tex.context:105129 Archived-At: --===============0363372160992118946== Content-Type: multipart/alternative; boundary="=_MailMate_D1E5CB3B-AF88-41F0-8B29-74EDBBBA4AFC_=" Content-Transfer-Encoding: 8bit --=_MailMate_D1E5CB3B-AF88-41F0-8B29-74EDBBBA4AFC_= Content-Type: text/plain; charset=utf-8; format=flowed; markup=markdown Content-Transfer-Encoding: 8bit Dear list, I am trying to typeset some multi-letter words/identifiers in mathematical formulas. Currently, doing things like `{\it variable}` or `{\mathit variable}` under math mode will cause the engine to shift all characters into the corresponding unicode mathematical alphanumeric block position. However, most OpenType fonts that have good support for unicode math are optimized for single-character usage. Therefore, the outcome of such method is non-ideal, as no kerning or ligatures will be enabled. Especially, this gives bad output when typesetting variable names with combinations like “ffi”. Looking through some past discussions on the list, I am aware of the usage of `\mathword` and `\mathtext`. Using those command will keep all the characters “as is” and typeset them under text mode (as far as I can tell). But those commands switch to the main body fonts temporarily to accomplish this. Sometime when using a different math font than the main font (like Palatino with Latin Modern Math), I wish my variable names can also be in the math font (or at least very similar, such as Latin Modern vs. Latin Modern Math) to better merge with the formula. The way I am currently doing is to introduce some “math text fonts” that is different from the main text font but close to the math font. And with custom font switchers like `\mwrm` and `\mwit` to help me define things like ``` \def\wordrm#1{\mbox{\mwrm #1}} \def\wordit#1{\mbox{\mwit #1}} ``` Am I missing some builtin functionalities or easier ways to do this? If not, would it be a good idea to extend the functionality of `\mathword` so it lifts out the restriction of only using the main text font? Thanks! Shuxian Wang --=_MailMate_D1E5CB3B-AF88-41F0-8B29-74EDBBBA4AFC_= Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable

Dear list,

I am trying to typeset some multi-letter words/identifier= s in mathematical formulas. Currently, doing things like {\it variable} or {\mathit variable} under math mode will cause the engine to sh= ift all characters into the corresponding unicode mathematical alphanumer= ic block position. However, most OpenType fonts that have good support fo= r unicode math are optimized for single-character usage. Therefore, the o= utcome of such method is non-ideal, as no kerning or ligatures will be en= abled. Especially, this gives bad output when typesetting variable names = with combinations like =E2=80=9Cffi=E2=80=9D.

Looking through some past discussions on the list, I am a= ware of the usage of \mathword a= nd \mathtext. Using those comman= d will keep all the characters =E2=80=9Cas is=E2=80=9D and typeset them u= nder text mode (as far as I can tell). But those commands switch to the m= ain body fonts temporarily to accomplish this. Sometime when using a diff= erent math font than the main font (like Palatino with Latin Modern Math)= , I wish my variable names can also be in the math font (or at least very= similar, such as Latin Modern vs. Latin Modern Math) to better merge wit= h the formula.

The way I am currently doing is to introduce some =E2=80=9C= math text fonts=E2=80=9D that is different from the main text font but cl= ose to the math font. And with custom font switchers like \mwrm and \mw= it to help me define things like

\def\wordrm#1{\mbox{\mwrm #1}}
\def\wordit#1{\mbox{\mwit #1}}

Am I missing some builtin functionalities or easier ways to do this? If n= ot, would it be a good idea to extend the functionality of \mathword so it lifts out the restriction of o= nly using the main text font?

Thanks!

Shuxian Wang

--=_MailMate_D1E5CB3B-AF88-41F0-8B29-74EDBBBA4AFC_=-- --===============0363372160992118946== 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== --===============0363372160992118946==--