From: Gavin via ntg-context <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: Gavin <gavinpublic@comcast.net>
Subject: \sub conflict with my def
Date: Wed, 12 Jan 2022 11:34:30 -0700 [thread overview]
Message-ID: <F17EC1C6-EA76-42BB-B327-C8841969F7DA@comcast.net> (raw)
Hi List,
I am converting problem sets from LaTeX to ConTeXt and ran into a puzzling problem. I define \sub to produce subscript text in math mode. (See definition below.) This worked for my ConTeXt book, but fails in the problem sets because in ConTeXt \sub is a special item command, and I use itemize to number problems.
Obviously, I can rename my \sub command, but it is already used in hundreds of problems and solutions that I am converting. Is there a way to get my \sub to work in an itemize? I only need it in math mode. I will never use \sub for its ConTeXt itemizing purpose.
Thanks!
Gavin
\define[1]\sub{_{\text{\rm\tf#1}}}
\starttext
$E\sub{final}$ is the final energy, but not in an itemize:
\startitemize
\item $E_{\text{\rm final}}$ is the final energy.
\item $E\sub{final}$ is a mess.
\stopitemize
\stoptext
___________________________________________________________________________________
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:[~2022-01-12 18:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-12 18:34 Gavin via ntg-context [this message]
2022-01-12 19:14 ` Hans Hagen via ntg-context
2022-01-13 12:19 ` Gavin via ntg-context
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=F17EC1C6-EA76-42BB-B327-C8841969F7DA@comcast.net \
--to=ntg-context@ntg.nl \
--cc=gavinpublic@comcast.net \
/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).