ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Tomáš Hála via ntg-context" <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: "Tomáš Hála" <tomas.hala@mendelu.cz>
Subject: Re: [NTG-context] Nuclear reactions
Date: Sun, 16 Apr 2023 08:36:14 +0000	[thread overview]
Message-ID: <AM0P194MB03407531951F65A4E0A5BD93FD9F9@AM0P194MB0340.EURP194.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <4A7D031B-FC1F-4B2D-A26B-5B48611F565D@telia.com>


[-- Attachment #1.1: Type: text/plain, Size: 2095 bytes --]

Hi Gavin,

maybe you have solved your problem yet.

\startformula
 {\null}^^{194}__{38}{\rm Sr}
or  {\hbox{Xe}}^^{140}__{54}.
\stopformula

Better, ConTeXt way could be the variation on \chem:

\unexpanded\def\isotope#1#2#3{\dontleavehmode\begingroup\null\lohi[left]{#2}{#3}#1\endgroup}
\isotope{Sr}{38}{194}
or (with more logical order of parameters)
\unexpanded\def\isotope#1#2#3{\dontleavehmode\begingroup\null\lohi[left]{#1}{#2}#3\endgroup}
\isotope{38}{999}{Sr}

Or for text and math modes together:

\unexpanded\def\isotope#1#2#3{%
\ifmmode\begingroup\null^^{#1}__{#2}{\rm#3}\endgroup%
   \else\dontleavehmode\begingroup\null\lohi[left]{\tfx #1}{\tfx#2}\rm#3\endgroup%
\fi}

\isotope{999}{38}{Sr}
\startformula
\isotope{999}{38}{Sr}
\stopformula

You can do it either way, whichever way suits you better.

Tomáš


________________________________
Od: ntg-context <ntg-context-bounces@ntg.nl> za uživatele Hans Åberg via ntg-context <ntg-context@ntg.nl>
Odesláno: sobota 15. dubna 2023 22:41
Komu: mailing list for ConTeXt users <ntg-context@ntg.nl>
Kopie: Hans Åberg <haberg-1@telia.com>
Předmět: Re: [NTG-context] Nuclear reactions


> On 15 Apr 2023, at 19:19, Gavin via ntg-context <ntg-context@ntg.nl> wrote:
>
> I’m writing nuclear reactions. When add prescripts to atomic symbols with two letters, (Be, Sr, Xe, etc.) the prescripts split the atoms!

One can use Unicode superscript and subscript numbers, as in ²³⁵₉₂U, which is easier to read. For input, an editor supporting text substitutions might be used.


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

[-- Attachment #1.2: Type: text/html, Size: 4600 bytes --]

[-- Attachment #2: Type: text/plain, Size: 496 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

      reply	other threads:[~2023-04-16  8:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-15 17:19 Gavin via ntg-context
2023-04-15 18:02 ` Gavin via ntg-context
2023-04-16 17:22   ` Alan Braslau via ntg-context
2023-04-15 20:41 ` Hans Åberg via ntg-context
2023-04-16  8:36   ` Tomáš Hála via ntg-context [this message]

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=AM0P194MB03407531951F65A4E0A5BD93FD9F9@AM0P194MB0340.EURP194.PROD.OUTLOOK.COM \
    --to=ntg-context@ntg.nl \
    --cc=tomas.hala@mendelu.cz \
    /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).