
Hi, I am trying to export to epub. I found epub-mkiv-demo.tex and export-example.tex, and both compile fine, generating the XML tree. The instructions say that I have to run mtxrun --script epub --make --purge test but I get unknown script ‘epub.lua’. I don’t have epub.lua anywhere. It also says that the console would tell me what script to run, but it only tells me mtx-context | pdfview methods: auto default evince okular pdfxcview sumatra zathura, current method: sumatra (directives_pdfview_method) pdfview | command: wine "sumatrapdf.exe" -reuse-instance -bg-color 0xCCCCCC "epub-mkiv-demo.pdf" 1>/dev/null 2>/dev/null & The directories with the XML trees contain a script epub-mkiv-demo-pub.lua which I can run, but it doesn’t seem to do anything. I am clearly doing something wrong. Any hints on how to proceed will be much appreciated. Thanks, Matthias

Am 29.05.2025 um 22:54 schrieb Matthias Weber:
Hi,
I am trying to export to epub. I found epub-mkiv-demo.tex and export-example.tex, and both compile fine, generating the XML tree. The instructions say that I have to run
mtxrun --script epub --make --purge test
but I get unknown script ‘epub.lua’. I don’t have epub.lua anywhere.
The filename of the scrip is mtx-epub.lua and the path is <TEXROOT>\tex\texmf-context\scripts\context\lua
It also says that the console would tell me what script to run, but it only tells me
mtx-context | pdfview methods: auto default evince okular pdfxcview sumatra zathura, current method: sumatra (directives_pdfview_method) pdfview | command: wine "sumatrapdf.exe" -reuse-instance -bg-color 0xCCCCCC "epub-mkiv-demo.pdf" 1>/dev/null 2>/dev/null &
The directories with the XML trees contain a script epub-mkiv-demo-pub.lua which I can run, but it doesn’t seem to do anything.
I am clearly doing something wrong. Any hints on how to proceed will be much appreciated.
It's possible your installation is missing files, the best solution is to use the minimal version from the pragma site: https://www.pragma-ade.nl/install.htm Wolfgang

Thanks Wolfgang. I located mtx-epub.lua and now I am getting with mtxrun --script mtx-epub --make --purge test the error mtx-epub | unknown specificaton file 'test-export/test-pub.lua' for ‘test' I tried other things than ’test’ to no avail. I am using the most recent minimal, so I think I have everything Matthias
On May 30, 2025, at 12:21 PM, Wolfgang Schuster
wrote: Am 29.05.2025 um 22:54 schrieb Matthias Weber:
Hi, I am trying to export to epub. I found epub-mkiv-demo.tex and export-example.tex, and both compile fine, generating the XML tree. The instructions say that I have to run mtxrun --script epub --make --purge test but I get unknown script ‘epub.lua’. I don’t have epub.lua anywhere.
The filename of the scrip is mtx-epub.lua and the path is <TEXROOT>\tex\texmf-context\scripts\context\lua
It also says that the console would tell me what script to run, but it only tells me mtx-context | pdfview methods: auto default evince okular pdfxcview sumatra zathura, current method: sumatra (directives_pdfview_method) pdfview | command: wine "sumatrapdf.exe" -reuse-instance -bg-color 0xCCCCCC "epub-mkiv-demo.pdf" 1>/dev/null 2>/dev/null & The directories with the XML trees contain a script epub-mkiv-demo-pub.lua which I can run, but it doesn’t seem to do anything. I am clearly doing something wrong. Any hints on how to proceed will be much appreciated.
It's possible your installation is missing files, the best solution is to use the minimal version from the pragma site: https://www.pragma-ade.nl/install.htm
Wolfgang
___________________________________________________________________________________ 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 ___________________________________________________________________________________

Am 30.05.2025 um 19:49 schrieb Matthias Weber:
Thanks Wolfgang.
I located mtx-epub.lua
and now I am getting with
mtxrun --script mtx-epub --make --purge test
Do you have (or had one in the past) another TeX installation on your system, PATH entries for multiple installations can cause problems. Wolfgang

Thanks, yes, I used to have several, but now I have only one (I deleted the directories for the others). Is there a simple way to fix this? Matthias
On May 31, 2025, at 11:15 AM, Wolfgang Schuster
wrote: Am 30.05.2025 um 19:49 schrieb Matthias Weber:
Thanks Wolfgang. I located mtx-epub.lua and now I am getting with mtxrun --script mtx-epub --make --purge test
Do you have (or had one in the past) another TeX installation on your system, PATH entries for multiple installations can cause problems.
Wolfgang
___________________________________________________________________________________ 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 ___________________________________________________________________________________

Am 31.05.2025 um 18:24 schrieb Matthias Weber:
Thanks, yes, I used to have several, but now I have only one (I deleted the directories for the others). Is there a simple way to fix this?
What system do you use? On Mac and Linux you can use echo $PATH on the terminal to get a list with all entries in the PATH variable. Wolfgang

I am on a Mac, and the only directory in the PATH that is TeX related is /Library/TeX/texbin, which is for an old TeXLive that I don’t use anymore. Should I delete that and put something else into it? Matthias
On May 31, 2025, at 1:13 PM, Wolfgang Schuster
wrote: Am 31.05.2025 um 18:24 schrieb Matthias Weber:
Thanks, yes, I used to have several, but now I have only one (I deleted the directories for the others). Is there a simple way to fix this?
What system do you use?
On Mac and Linux you can use
echo $PATH
on the terminal to get a list with all entries in the PATH variable.
Wolfgang
___________________________________________________________________________________ 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 ___________________________________________________________________________________

Am 31.05.2025 um 19:46 schrieb Matthias Weber:
I am on a Mac, and the only directory in the PATH that is TeX related is /Library/TeX/texbin, which is for an old TeXLive that I don’t use anymore. Should I delete that and put something else into it?
How do you run ConTeXt, only with a TeX editor like TeXshop or do you use the command line? You can also try to delete your current ConTeXt installation and reinstall everything from scratch. Wolfgang

Usually TeXShop. Should I create a new account for a fresh install? Matthias
On Jun 1, 2025, at 10:51, Wolfgang Schuster
wrote: Am 31.05.2025 um 19:46 schrieb Matthias Weber:
I am on a Mac, and the only directory in the PATH that is TeX related is /Library/TeX/texbin, which is for an old TeXLive that I don’t use anymore. Should I delete that and put something else into it?
How do you run ConTeXt, only with a TeX editor like TeXshop or do you use the command line?
You can also try to delete your current ConTeXt installation and reinstall everything from scratch.
Wolfgang
___________________________________________________________________________________ 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 ___________________________________________________________________________________

Am 01.06.2025 um 17:12 schrieb Matthias Weber:
Usually TeXShop. Should I create a new account for a fresh install?
Delete the directory with your ConTeXt installation and download the zip file from the Pragma site to reinstall ConTeXt. How do you run mtxrun from TeXShop because you didn't (if I get your previous mail right) add the path for the TeX binarries to your PATH variable? Wolfgang

Thank you Wolfgang. A fresh install fixed my initial problems. mtxrun --script mtx-epub --make --purge epub-mkiv-demo produces an epub. However, both Calibre and Thorium have trouble with it (not displaying anything but error messages). Are there any steps I need to follow to create a readable epub? Thanks again, Matthias
On Jun 1, 2025, at 11:32 AM, Wolfgang Schuster
wrote: Am 01.06.2025 um 17:12 schrieb Matthias Weber:
Usually TeXShop. Should I create a new account for a fresh install?
Delete the directory with your ConTeXt installation and download the zip file from the Pragma site to reinstall ConTeXt.
How do you run mtxrun from TeXShop because you didn't (if I get your previous mail right) add the path for the TeX binaries to your PATH variable?
Wolfgang
___________________________________________________________________________________ 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 ___________________________________________________________________________________

Am 02.06.25 um 15:45 schrieb Matthias Weber:
Thank you Wolfgang. A fresh install fixed my initial problems.
mtxrun --script mtx-epub --make --purge epub-mkiv-demo
produces an epub. However, both Calibre and Thorium have trouble with it (not displaying anything but error messages). Are there any steps I need to follow to create a readable epub?
I only ever used that script for the general structure and created my actual code with a bunch of XSLT from the exported XML. (Reminds me, I must finally implement changes requested by our ebook distributor.) I still don’t have a clue how to handle the not-so-semantic stuff (like titles, dedication, blurb, imprint…) properly. ePub is no fun. Hraban
participants (3)
-
Henning Hraban Ramm
-
Matthias Weber
-
Wolfgang Schuster