Hi Bruce,

> In your code in \startmode you have "show UNDERSCORE formula" and in your
command line you have "show HYPHEN formula".

Well spotted! My apologies for the typo.

> Also, you may have to put the --mode= before the source filename.

Thanks for the suggestion! It seems that the behaviour is the same whether
I put `--mode=show_equation` before or after the filename (e.g. the pdf
output is ok while the exported html lacks the image).

Cheers,
Florent

Le jeu. 14 août 2025 à 23:32, Bruce Horrocks <n...@scorecrow.com> a écrit :

> In your code in \startmode you have "show UNDERSCORE formula" and in your
> command line you have "show HYPHEN formula".
>
> Also, you may have to put the --mode= before the source filename.
>
> > On 14 Aug 2025, at 09:01, Florent Michel <florent....@gmail.com> wrote:
> >
> > Hi,
> >
> > TL;DR: Is there a way to pass a `mode` argument when running `mtxrun
> --script epub --images`?
> >
> > Thanks a lot Hans and Mikael for yesterday's update! Your efforts to
> make ConTeXt-generated documents more accessible are really appreciated!
> (And may make my question moot :D Although I imagine there will still be
> use-cases for html/epub export.)
> >
> > I have a document where different versions should have a different
> number of images. Following an earlier suggestion from Wolfgang, I usually
> handle differences between versions of the same document using modes, which
> works very well for pdf outputs.
> >
> > However, I could not figure out how to generate the correct images for
> html export. For example, if I have the following:
> >
> > test.tex
> > ________________
> > \setupbackend[export=yes]
> > \starttext
> > A well-known equation:
> > \startmode[show_formula]
> > \startformula
> >   e = \frac{m c^2}{\sqrt{1 - v^2 / c^2}}
> > \stopformula
> > \stopmode
> > \stoptext
> > ___________________
> >
> > and run
> > mtxrun --script epub --images test.tex
> > context test.tex --mode=show-formula
> >
> > the pdf output is correct but the html output lacks the formula. (The
> output is correct if I delete `\startmode[show_formula]` and `\stopmode`.)
> Is there a way to activate the `show_formula` mode when running `mtxrun
> --script epub --images`?
> >
> > Cheers,
> > Florent
> >
> >
> >
> ___________________________________________________________________________________
> > 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
> >
> ___________________________________________________________________________________
>
>
>
> —
> Bruce Horrocks
> Hampshire, UK
>
>
> ___________________________________________________________________________________
> 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
___________________________________________________________________________________

Reply via email to