ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \sub conflict with my def
@ 2022-01-12 18:34 Gavin via ntg-context
  2022-01-12 19:14 ` Hans Hagen via ntg-context
  0 siblings, 1 reply; 3+ messages in thread
From: Gavin via ntg-context @ 2022-01-12 18:34 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Gavin

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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-13 12:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-12 18:34 \sub conflict with my def Gavin via ntg-context
2022-01-12 19:14 ` Hans Hagen via ntg-context
2022-01-13 12:19   ` Gavin via ntg-context

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).