ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Hans Åberg" <haberg-1@telia.com>
To: Hans Hagen <j.hagen@xs4all.nl>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Typing Unicode subscript and superscript numbers
Date: Sun, 2 Dec 2018 18:33:21 +0100	[thread overview]
Message-ID: <929EAB4F-28C2-460E-9A2B-5CD5544404F9@telia.com> (raw)
In-Reply-To: <3791984d-0f96-c2ba-3b6f-64394f9b3db4@xs4all.nl>


> On 2 Dec 2018, at 16:55, Hans Hagen <j.hagen@xs4all.nl> wrote:
> 
> On 12/2/2018 3:44 PM, Hans Åberg wrote:
>>> On 2 Dec 2018, at 10:19, Henning Hraban Ramm <texml@fiee.net> wrote:
>>> 
>>> STIX fonts don’t contain super and subscript numbers.
>> They are in STIX Two, so I can get them using:
>>   \definefontfamily[stix-two][mono][Stix Two Text]
>>   \definefontfamily[stix-two][math][Stix Two Math]
>>   \setupbodyfont[stix-two,10pt]
>> But it is an entirely different font design, so a font fallback to STIX would be desirable. Then the problem is that these super and subscript symbols are spread on a number of different ranges. —It seems one cannot have a general fallback in the case the glyph is missing.
>> In addition, they get translated in the typesetting, so when copied in the PDF and pasted into a text file, they loose being super and subscript.
> in general these super and subscript are rather useless because (1) only a subset of characters is available and (2) it depends on selectively applying the subs and sups feature

They are usable in plain text files, though I think, originally added to Unicode as a font encoding compatibility. Right now, I just use it in generated output files to indicate variable relabeling, so from that point of view, a font fallback would suffice, as there is no need to copy and paste from the PDF them as part of computer code examples. One might want to copy and work them by hand, though.

However, after starting to use them, I thought they might be usable in input code, too. Then one would like to paste examples in the manual for copy and paste. The super and superscript parentheses could be used as replacement for TeX ^ and _, the latter which in turn comes from some pre-ASCII arrow symbols. Unicode does not have general super and superscript symbols, and for computer input, it would be better with a matching pair than a single symbol.

I have used the text substitutions on MacOS for some time now, and it works fine to write math styles and symbols directly in a plain text file. I have also seen these super and superscript numbers used for SI units for example, on the Internet. So it may become more common in the future.

> anyway, i can provide a solution to automatically add these scripts to a font; just for fun i implemented something
> 
> % \definefontfeature[default][default][scripts=yes]
> % \definefontfeature[default][default][scripts=.6]
> 
> \definefontfeature
>  [default]
>  [default]
>  [scripts={factor=.6,up=.3,down=.2,extend=1.5}]
> 
> but as i use some new trickery it won't be in the beta for a while.

Maybe as a part of general features: A font fallback that selects the character from a sequence of fonts if not available, which could involve ranges, too, but not necessarily. And being able to have untranslated throughput.

___________________________________________________________________________________
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
___________________________________________________________________________________

  reply	other threads:[~2018-12-02 17:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-01 22:30 Hans Åberg
2018-12-02  9:19 ` Henning Hraban Ramm
2018-12-02 14:44   ` Hans Åberg
2018-12-02 15:55     ` Hans Hagen
2018-12-02 17:33       ` Hans Åberg [this message]
2018-12-02 18:01         ` Hans Hagen
2018-12-02 18:09           ` Hans Åberg
2018-12-06 14:18           ` Hans Åberg
2018-12-06 14:23             ` Wolfgang Schuster
2018-12-06 14:47               ` Hans Åberg

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=929EAB4F-28C2-460E-9A2B-5CD5544404F9@telia.com \
    --to=haberg-1@telia.com \
    --cc=j.hagen@xs4all.nl \
    --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).