From: "Shuxian Wang" <wsx@udscbt.io>
To: ntg-context@ntg.nl
Subject: Multi-letter words/identifiers in math
Date: Sun, 29 Sep 2019 00:30:33 -0700 [thread overview]
Message-ID: <2C87AD65-D3D3-4AAF-96F7-B4D23F213153@udscbt.io> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1727 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 2936 bytes --]
[-- Attachment #2: Type: text/plain, Size: 493 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 : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next reply other threads:[~2019-09-29 7:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-29 7:30 Shuxian Wang [this message]
2019-09-30 13:22 ` Hans Hagen
[not found] ` <CAA58SD99+xNeyEPQGU6ELHurO35+RVDUTjUanSfG5xMJnweHJA@mail.gmail.com>
2019-10-01 17:28 ` Hans Hagen
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=2C87AD65-D3D3-4AAF-96F7-B4D23F213153@udscbt.io \
--to=wsx@udscbt.io \
--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).