\intertext and highlighting with \alignhere/\breakhere
Hi all, Often I want to include a sentence/paragraph in the middle of a long multipart formula. With the old \startalign/\stopalign formulas, I could use \intertext{...} to do this, but this doesn't work with the new \alignhere/\breakhere formulas. I've managed to find a "solution" for this, although I'd prefer something a bit less hacky. Any ideas? Also, is there a way to highlight an equation across an \alignhere? Once again, I've found a "solution", but like before, it's pretty hacky. Example files are attached. Thanks, -- Max
On 3/12/2024 8:57 AM, Max Chernoff wrote:
Hi all,
Often I want to include a sentence/paragraph in the middle of a long multipart formula. With the old \startalign/\stopalign formulas, I could use \intertext{...} to do this, but this doesn't work with the new \alignhere/\breakhere formulas. I've managed to find a "solution" for this, although I'd prefer something a bit less hacky. Any ideas?
Also, is there a way to highlight an equation across an \alignhere? Once again, I've found a "solution", but like before, it's pretty hacky.
Example files are attached. maybe
\starttexdefinition protected newintertext #1 \leftparbox [global] { \vadjust pre \bgroup \forgetall \vskip.5\strutdp % needs to be more clever in the end \dontleavehmode\vtop\bgroup #1 \egroup \egroup } \breakhere \stoptexdefinition but i need to discuss it with Mikael as we might integrate something better and then it needs to be documented (in the upcoming manual) as well Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Hi all,
Often I want to include a sentence/paragraph in the middle of a long multipart formula. With the old \startalign/\stopalign formulas, I could use \intertext{...} to do this, but this doesn't work with the new \alignhere/\breakhere formulas. I've managed to find a "solution" for this, although I'd prefer something a bit less hacky. Any ideas?
Also, is there a way to highlight an equation across an \alignhere? Once again, I've found a "solution", but like before, it's pretty hacky.
Example files are attached.
On 3/12/2024 8:57 AM, Max Chernoff wrote: the next upload will support the attached ... so no ugly hacky code needed Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Hi Hans, On Tue, 2024-03-12 at 15:21 +0100, Hans Hagen wrote:
the next upload will support the attached ... so no ugly hacky code needed
"\texthere[inbetween]" looks perfect, thanks! The "\definebar[...][inlined]" doesn't look quite right though -- the issue that I'm having is that I can't figure out how to highlight across both sides of an \alignhere without any questionable hacks. Unless the new "inlined" does work across an \alignhere and I'm just not seeing it in the example. Thanks again, -- Max
Hi,
On Wed, Mar 13, 2024 at 11:37 AM Max Chernoff
Hi Hans,
On Tue, 2024-03-12 at 15:21 +0100, Hans Hagen wrote:
the next upload will support the attached ... so no ugly hacky code needed
"\texthere[inbetween]" looks perfect, thanks!
The "\definebar[...][inlined]" doesn't look quite right though -- the issue that I'm having is that I can't figure out how to highlight across both sides of an \alignhere without any questionable hacks. Unless the new "inlined" does work across an \alignhere and I'm just not seeing it in the example.
Thanks again, -- Max
I can confirm that it works over \alignhere. Hans is doing some black magic, but I guess he did not want to show off by including the whole line. /Mikael
On 3/13/2024 12:26 PM, Mikael Sundqvist wrote:
Hi,
On Wed, Mar 13, 2024 at 11:37 AM Max Chernoff
wrote: Hi Hans,
On Tue, 2024-03-12 at 15:21 +0100, Hans Hagen wrote:
the next upload will support the attached ... so no ugly hacky code needed
"\texthere[inbetween]" looks perfect, thanks!
The "\definebar[...][inlined]" doesn't look quite right though -- the issue that I'm having is that I can't figure out how to highlight across both sides of an \alignhere without any questionable hacks. Unless the new "inlined" does work across an \alignhere and I'm just not seeing it in the example.
Thanks again, -- Max
I can confirm that it works over \alignhere. Hans is doing some black magic, but I guess he did not want to show off by including the whole line. Indeed, no need to show of the obvious
\definebar [mybar] [backgroundbar] [height=\strutht,depth=\strutdp,offset=.250ex,color=red] \definebar [yourbar] [backgroundbar] [height=\strutht,depth=\strutdp,offset=.125ex,color=blue] \definebar [ourbar] [backgroundbar] [height=\strutht,depth=\strutdp,offset=.125ex,color=green] \starttext \startTEXpage[width=4cm] \startformula a \alignhere= b + c \breakhere \mybar {d + \yourbar{e \alignhere=} f \breakhere g \alignhere \ourbar{=} h} + i \stopformula \stopTEXpage \stoptext Especially when it would not pass the rigourous accessibility check (esp wrt color) of your university, Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Hi Hans, Mikael, On Wed, 2024-03-13 at 13:06 +0100, Hans Hagen wrote:
On 3/13/2024 12:26 PM, Mikael Sundqvist wrote:
I can confirm that it works over \alignhere. Hans is doing some black magic, but I guess he did not want to show off by including the whole line. Indeed, no need to show of the obvious
\definebar [mybar] [backgroundbar] [height=\strutht,depth=\strutdp,offset=.250ex,color=red]
[...]
That looks perfect, thanks! -- Max
participants (4)
-
Hans Hagen
-
Hans Hagen
-
Max Chernoff
-
Mikael Sundqvist