
Consider following code: \starttext \startitemize[n] \item \startformula \startalign[n=3] \NC S = \NC T_1 + \NC T_2 + T_3 + \cdots + T_n\NR \NC S = \NC \NC T_1 + T_2 + \cdots + T_{n - 1} + T_n\NR \stopalign\stopformula \stopitemize \stoptext The formula is centered below the list enumerator and mid-aligned. How can I align it to left and in the same line as list enumerator. I tried replacing \startformula with $ but then it goes above the list enumerator and is still mid-aligned. I tried setting flushleft and align attributes but they did not work. Thanks in advance for your help. -- Respect, Shiv Shankar Dayal

On Tue, 15 Jul 2025, Shiv Shankar Dayal wrote:
Consider following code:
\starttext \startitemize[n] \item \startformula \startalign[n=3] \NC S = \NC T_1 + \NC T_2 + T_3 + \cdots + T_n\NR \NC S = \NC \NC T_1 + T_2 + \cdots + T_{n - 1} + T_n\NR \stopalign\stopformula \stopitemize \stoptext
The formula is centered below the list enumerator and mid-aligned. How can I align it to left and in the same line as list enumerator. I tried replacing \startformula with $ but then it goes above the list enumerator and is still mid-aligned. I tried setting flushleft and align attributes but they did not work.
You need a couple of things: - \startformula ... \stopformula uses the full local width. You need to use inline math $ ... $ (I use \startimath ... \stopimath below so that it looks nicer). - You need to add location=packed to \startalign so that it does not use extra horizontal space - Then you can adjust the vertical location by wrapping everything in a frame. \starttext \startitemize[n] \item \startframed[align=normal,frame=off,location=high] \startimath \startalign[n=3,location=packed] \NC S = \NC T_1 + \NC T_2 + T_3 + \cdots + T_n\NR \NC S = \NC \NC T_1 + T_2 + \cdots + T_{n - 1} + T_n\NR \stopalign \stopimath \stopframed \stopitemize \stoptext Aditya

Much appreciated for the help. It works nicely when this follows the
\item immediately.
However, if I use it after some text in \item it is aligned with list
enumerator and does
not indent. How can I achieve that?
On Tue, Jul 15, 2025 at 7:32 AM Aditya Mahajan
On Tue, 15 Jul 2025, Shiv Shankar Dayal wrote:
Consider following code:
\starttext \startitemize[n] \item \startformula \startalign[n=3] \NC S = \NC T_1 + \NC T_2 + T_3 + \cdots + T_n\NR \NC S = \NC \NC T_1 + T_2 + \cdots + T_{n - 1} + T_n\NR \stopalign\stopformula \stopitemize \stoptext
The formula is centered below the list enumerator and mid-aligned. How can I align it to left and in the same line as list enumerator. I tried replacing \startformula with $ but then it goes above the list enumerator and is still mid-aligned. I tried setting flushleft and align attributes but they did not work.
You need a couple of things:
- \startformula ... \stopformula uses the full local width. You need to use inline math $ ... $ (I use \startimath ... \stopimath below so that it looks nicer).
- You need to add location=packed to \startalign so that it does not use extra horizontal space
- Then you can adjust the vertical location by wrapping everything in a frame.
\starttext \startitemize[n] \item \startframed[align=normal,frame=off,location=high] \startimath \startalign[n=3,location=packed] \NC S = \NC T_1 + \NC T_2 + T_3 + \cdots + T_n\NR \NC S = \NC \NC T_1 + T_2 + \cdots + T_{n - 1} + T_n\NR \stopalign \stopimath \stopframed \stopitemize \stoptext
Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________
-- Respect, Shiv Shankar Dayal

I got it. Following works for me for last case:
\item $a_1 = 7, d = 8. T_{n + 1} - T_n = a_n\forall n\geq 1$.
$\startalign[n=3, location=packed]
\NC S = \NC T_1 + \NC T_2 + T_3 + \cdots + T_n\NR
\NC S = \NC \NC T_1 + T_2 + \cdots + T_{n - 1} + T_n\NR
\stopalign$
On Tue, Jul 15, 2025 at 7:38 AM Shiv Shankar Dayal
Much appreciated for the help. It works nicely when this follows the \item immediately. However, if I use it after some text in \item it is aligned with list enumerator and does not indent. How can I achieve that?
On Tue, Jul 15, 2025 at 7:32 AM Aditya Mahajan
wrote: On Tue, 15 Jul 2025, Shiv Shankar Dayal wrote:
Consider following code:
\starttext \startitemize[n] \item \startformula \startalign[n=3] \NC S = \NC T_1 + \NC T_2 + T_3 + \cdots + T_n\NR \NC S = \NC \NC T_1 + T_2 + \cdots + T_{n - 1} + T_n\NR \stopalign\stopformula \stopitemize \stoptext
The formula is centered below the list enumerator and mid-aligned. How can I align it to left and in the same line as list enumerator. I tried replacing \startformula with $ but then it goes above the list enumerator and is still mid-aligned. I tried setting flushleft and align attributes but they did not work.
You need a couple of things:
- \startformula ... \stopformula uses the full local width. You need to use inline math $ ... $ (I use \startimath ... \stopimath below so that it looks nicer).
- You need to add location=packed to \startalign so that it does not use extra horizontal space
- Then you can adjust the vertical location by wrapping everything in a frame.
\starttext \startitemize[n] \item \startframed[align=normal,frame=off,location=high] \startimath \startalign[n=3,location=packed] \NC S = \NC T_1 + \NC T_2 + T_3 + \cdots + T_n\NR \NC S = \NC \NC T_1 + T_2 + \cdots + T_{n - 1} + T_n\NR \stopalign \stopimath \stopframed \stopitemize \stoptext
Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________
-- Respect, Shiv Shankar Dayal
-- Respect, Shiv Shankar Dayal

Hi,
Den tis 15 juli 2025 03:26Shiv Shankar Dayal
Consider following code:
\starttext \startitemize[n] \item \startformula \startalign[n=3] \NC S = \NC T_1 + \NC T_2 + T_3 + \cdots + T_n\NR \NC S = \NC \NC T_1 + T_2 + \cdots + T_{n - 1} + T_n\NR \stopalign\stopformula \stopitemize \stoptext
The formula is centered below the list enumerator and mid-aligned. How can I align it to left and in the same line as list enumerator. I tried replacing \startformula with $ but then it goes above the list enumerator and is still mid-aligned. I tried setting flushleft and align attributes but they did not work.
Thanks in advance for your help.
I think you can put the align in \dm{} instead of using \startformula \stipformula, and then use location={packed,top} for the align. Untested, since in phone mode... /Mikael --
Respect, Shiv Shankar Dayal
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net
___________________________________________________________________________________
participants (3)
-
Aditya Mahajan
-
Mikael Sundqvist
-
Shiv Shankar Dayal