More HTML/EPUB conversion issues: Repeated texts/enumerations

Thanks to Hans for helping with the images. I ran into various other issues. When using enumerations, sometimes part of the text from a previous enumeration is repeated (usually math). I've attached a minimal example at the end. I am also struggling to get links within the HTML document to work, both for linking to enumerations and bibliography items—links to sections work. I will create a minimal example later. Then, is there a reason that -templates.css is not included in -div.html? This file contains, among other useful things, style tags for enumerations like description[detail=Theorem], div.description.Theorem { display: block ; } that can be used to style enumerations differently. Thanks (always), Matthias \usemodule[mathml] \setupbackend[export=yes,xhtml=yes] \setupenumerations [alternative=hanging, width=fit, right={~}, way=bysection, prefix=chapter, distance=0.5em, prefixsegments={chapter:section}] \defineenumeration[Theorem] [alternative=serried, width=fit, distance=.5\emwidth, text=Theorem, style=italic, title=yes, titlestyle=normal, prefix=yes, headcommand=\groupedcommand{}{.} ] \defineenumeration [Proof] [alternative=serried, width=fit, distance=\emwidth, text=Proof, number=no, headstyle=italic, headcommand=\groupedcommand{}{.}, title=yes, titlestyle=normal, closesymbol=\mathqed] \starttext \startsection[title=Introduction] \startTheorem[thm:euler] \startformula e^{\pi i}+1=0 \ . \stopformula \stopTheorem \startProof See (Euler1777). \stopProof \stopsection \stoptext

On 7/13/2025 6:50 PM, Matthias Weber wrote:
Thanks to Hans for helping with the images.
I ran into various other issues. When using enumerations, sometimes part of the text from a previous enumeration is repeated (usually math). I've attached a minimal example at the end.
Thanks for testing ... this is the qed, can you test with this at the top of the file? Btw, you don't need to load the mathml module. \unprotect \pushoverloadmode \protected\permanent\def\textmathematics#1% {\begingroup \ifmmode \currentmathblobnesting\minusone #1% \else \math_m_nop{#1}% \mathematics{#1}% \fi \endgroup} \popoverloadmode \protect i'll program it a bit nice later One think we need to look into is to disable some rendering that is interfering (read: makes us loose structure) but that's not the case here. 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 -----------------------------------------------------------------

Thanks again, Hans. This works. I don’t know whether it matters, but putting \startparagraph ..\stopparagraph inside \startproof .. \stopproof also breaks the \qed (with the curious side effect that some blanks disappear, sometimes). More testing is on the way... Matthias
On Jul 13, 2025, at 1:54 PM, Hans Hagen via ntg-context
wrote: On 7/13/2025 6:50 PM, Matthias Weber wrote:
Thanks to Hans for helping with the images. I ran into various other issues. When using enumerations, sometimes part of the text from a previous enumeration is repeated (usually math). I've attached a minimal example at the end.
Thanks for testing ... this is the qed, can you test with this at the top of the file? Btw, you don't need to load the mathml module.
\unprotect \pushoverloadmode
\protected\permanent\def\textmathematics#1% {\begingroup \ifmmode \currentmathblobnesting\minusone #1% \else \math_m_nop{#1}% \mathematics{#1}% \fi \endgroup}
\popoverloadmode \protect
i'll program it a bit nice later
One think we need to look into is to disable some rendering that is interfering (read: makes us loose structure) but that's not the case here.
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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________

On 7/13/2025 8:42 PM, Matthias Weber wrote:
Thanks again, Hans. This works.
I don’t know whether it matters, but putting \startparagraph ..\stopparagraph inside \startproof .. \stopproof also breaks the \qed (with the curious side effect that some blanks disappear, sometimes).
probably because these environments are paragraphs themselves, maybe some can be catched by postprocessing (done for some cases)
More testing is on the way...
Matthias
On Jul 13, 2025, at 1:54 PM, Hans Hagen via ntg-context
wrote: On 7/13/2025 6:50 PM, Matthias Weber wrote:
Thanks to Hans for helping with the images. I ran into various other issues. When using enumerations, sometimes part of the text from a previous enumeration is repeated (usually math). I've attached a minimal example at the end.
Thanks for testing ... this is the qed, can you test with this at the top of the file? Btw, you don't need to load the mathml module.
\unprotect \pushoverloadmode
\protected\permanent\def\textmathematics#1% {\begingroup \ifmmode \currentmathblobnesting\minusone #1% \else \math_m_nop{#1}% \mathematics{#1}% \fi \endgroup}
\popoverloadmode \protect
i'll program it a bit nice later
One think we need to look into is to disable some rendering that is interfering (read: makes us loose structure) but that's not the case here.
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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________
___________________________________________________________________________________ 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 ___________________________________________________________________________________
-- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Hans Hagen
-
Matthias Weber