Strange display of math when enabling export xml/html/xhtml

Dear Hans, Dear all Once angain me trying to convert my lecture notes into epub. At first: finally switching after some installation hassle to really latests context disttibution -------------------------------------------------------------------- mtx-context | Cmtx-context | ConTeXt Process Management 1.06mtx-context | mtx-context | main context file: /usr/local/share/context/tex/texmf- context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2025.02.28 18:16 mtx-context | main context file: /usr/local/share/context/tex/texmf- context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2025.02.28 18:16 onTeXt Process Management 1.06 mtx-context | mtx-context | main context file: /usr/local/share/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2025.02.28 18:16 mtx-context | main context file: /usr/local/share/context/tex/texmf-context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2025.02.28 18:16 -------------------------------------------------------------------- solved all my previous problems. But what i now notices is a strange behaviour regarding the math equations in the resulting html, xml and xhtml when there is at least one figure with an external graphic in the document (see attached hopefully minimal enough example). The xml/html/xhtml files contain a mathcontent tag/div which correctly contains the mathml for the equation. the tag/div it selve has the image attibute set which points to the first image file imported before. I do guess this is intended to be a fallback, in case browser or read can not properly handle and display mathml content. I do further guess that in my installation i do miss some external program or library or some environment variable is not set or not properly set. In parallel i have installed texlive - without outdated luatex context- as i do need latex for other stuff too. So my question is where and how to tweak installation to get a proper result. Best whishes Christoph

On 3/4/2025 5:14 PM, Christoph Hintermüller via ntg-context wrote:
Dear Hans, Dear all
Once angain me trying to convert my lecture notes into epub.
At first: finally switching after some installation hassle to really latests context disttibution
-------------------------------------------------------------------- mtx-context | Cmtx-context | ConTeXt Process Management 1.06mtx-context | mtx-context | main context file: /usr/local/share/context/tex/texmf- context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2025.02.28 18:16 mtx-context | main context file: /usr/local/share/context/tex/texmf- context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2025.02.28 18:16
onTeXt Process Management 1.06 mtx-context | mtx-context | main context file: /usr/local/share/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2025.02.28 18:16 mtx-context | main context file: /usr/local/share/context/tex/texmf-context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2025.02.28 18:16 -------------------------------------------------------------------- solved all my previous problems.
But what i now notices is a strange behaviour regarding the math equations in the resulting html, xml and xhtml when there is at least one figure with an external graphic in the document (see attached hopefully minimal enough example).
The xml/html/xhtml files contain a mathcontent tag/div which correctly contains the mathml for the equation. the tag/div it selve has the image attibute set which points to the first image file imported before.
I do guess this is intended to be a fallback, in case browser or read can not properly handle and display mathml content.
I do further guess that in my installation i do miss some external program or library or some environment variable is not set or not properly set. In parallel i have installed texlive - without outdated luatex context- as i do need latex for other stuff too.
So my question is where and how to tweak installation to get a proper result.
It is hard to see what happens because there is nothing attached. Mikael and I probably need to pick up the export thread (we have been testing with his lecture notes and math book last year). The problem is that once again mathml in viewers is changing, that there are differences between viewers, that we need to play safe but have to figure out how. Indeed we provide both images (to make math look good, as we spent a lot of time on that) and embedded mathml (which remains a gamble). (It also relates to satisfying tagged pdf which is also an everlasting mess one needs to adapt to.) 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 -----------------------------------------------------------------

Dear Hans [Inline Response to message by Hans Hagen, Di, 2025-03-04 17:44 +0100: Answers and comments below corresponding cited paragraphs.]
On 3/4/2025 5:14 PM, Christoph Hintermüller via ntg-context wrote:
Dear Hans, Dear all
Once angain me trying to convert my lecture notes into epub.
At first: finally switching after some installation hassle to really latests context disttibution
------------------------------------------------------------------- - mtx-context | Cmtx-context | ConTeXt Process Management 1.06mtx-context | mtx-context | main context file: /usr/local/share/context/tex/texmf- context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2025.02.28 18:16 mtx-context | main context file: /usr/local/share/context/tex/texmf- context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2025.02.28 18:16
onTeXt Process Management 1.06 mtx-context | mtx-context | main context file: /usr/local/share/context/tex/texmf- context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2025.02.28 18:16 mtx-context | main context file: /usr/local/share/context/tex/texmf- context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2025.02.28 18:16 --------------- ----------------------------------------------------- solved all my previous problems.
But what i now notices is a strange behaviour regarding the math equations in the resulting html, xml and xhtml when there is at least one figure with an external graphic in the document (see attached hopefully minimal enough example).
The xml/html/xhtml files contain a mathcontent tag/div which correctly contains the mathml for the equation. the tag/div it selve has the image attibute set which points to the first image file imported before.
I do guess this is intended to be a fallback, in case browser or read can not properly handle and display mathml content.
I do further guess that in my installation i do miss some external program or library or some environment variable is not set or not properly set. In parallel i have installed texlive - without outdated luatex context- as i do need latex for other stuff too.
So my question is where and how to tweak installation to get a proper result.
It is hard to see what happens because there is nothing attached.
If this is your reply to my first message i apologize. I just forgot to attach, the second one should contain the zip, but needs approval by moderator as bigger than 100K according to automatic response from mailing list system. Christoph

Dear Hans [Inline Response to message by Hans Hagen, Di, 2025-03-04 17:44 +0100: Answers and comments below corresponding cited paragraphs.]
On 3/4/2025 5:14 PM, Christoph Hintermüller via ntg-context wrote:
Dear Hans, Dear all
Once angain me trying to convert my lecture notes into epub.
At first: finally switching after some installation hassle to really latests context disttibution
------------------------------------------------------------------- - mtx-context | Cmtx-context | ConTeXt Process Management 1.06mtx-context | mtx-context | main context file: /usr/local/share/context/tex/texmf- context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2025.02.28 18:16 mtx-context | main context file: /usr/local/share/context/tex/texmf- context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2025.02.28 18:16
onTeXt Process Management 1.06 mtx-context | mtx-context | main context file: /usr/local/share/context/tex/texmf- context/tex/context/base/mkiv/context.mkiv mtx-context | current version: 2025.02.28 18:16 mtx-context | main context file: /usr/local/share/context/tex/texmf- context/tex/context/base/mkxl/context.mkxl mtx-context | current version: 2025.02.28 18:16 --------------- ----------------------------------------------------- solved all my previous problems.
But what i now notices is a strange behaviour regarding the math equations in the resulting html, xml and xhtml when there is at least one figure with an external graphic in the document (see attached hopefully minimal enough example).
The xml/html/xhtml files contain a mathcontent tag/div which correctly contains the mathml for the equation. the tag/div it selve has the image attibute set which points to the first image file imported before.
I do guess this is intended to be a fallback, in case browser or read can not properly handle and display mathml content.
I do further guess that in my installation i do miss some external program or library or some environment variable is not set or not properly set. In parallel i have installed texlive - without outdated luatex context- as i do need latex for other stuff too.
So my question is where and how to tweak installation to get a proper result.
It is hard to see what happens because there is nothing attached.
Mikael and I probably need to pick up the export thread (we have been testing with his lecture notes and math book last year). The problem is that once again mathml in viewers is changing, that there are differences between viewers, that we need to play safe but have to figure out how. Indeed we provide both images (to make math look good, as we spent a lot of time on that) and embedded mathml (which remains a gamble).
I do not think that it is a problem of mathml, its implementation in context but rather export related issue - missing or improper configuration, export settings or not called helper scripts. - No fallack image of the math is generated in the image directory of export-example. Like no images are linked or copied at all to export- example/images when running mtxrun --script context and no information is given no warining message indicating what to do to get the image in place in the export directory and how to generate the math fallback images. - The documentation about the mtxrun script which generates this images and how to tell context to use them as fallback is hardly to find. Context just takes the first image included ever as fallback and if there is none display remains empty. - The documentation is rather low on how to setup the environment to run mtxrun and context in so that export has a chance to work properly. See this time attached example < 100k. Best Christoph
participants (2)
-
Christoph Hintermüller
-
Hans Hagen