-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
This is about the documentation: epub, math hints at --gladtex when talking about epub. The link --gladtex explains only how to deal with plain html files and nothing else. The --gladtex option does not work with epub files (not with the information you get from the docs, unless I misunderstand something).
This definitely does not work:
pandoc --gladtex -o test.epub test.md Instead the documentation should talk about the filter, but the filter option is also bugged:
$ pandoc -F gladtex test.md -o test.epub # no GLADTEX_ARGS
Error: file epub not found.
Error running filter gladtex:
Filter returned error status 20OK....
This, I think would make sense, but doesn't work (probably for security reasons)
$ export GLADTEX_ARGS="-d /dev/shm" # don't need the files afterwards
$ pandoc -F gladtex test.md -o test.epub
[ ... ]
[ ... ]
OSError: The file path to the image may NOT be an absolute path: /dev/shm/eqn000.svgOK.....
$ export GLADTEX_ARGS="-d ./img" # required for -F gladtex to work
$ pandoc -F gladtex test.md -o test.epub
# worksI am not sure if it works somewhere on some OS, without setting GLADTEX_ARGS, but I would prefer if no environment variable was needed for this to work at all.
Maybe the --gladtex option should be the shortcut to the filter with GLADTEX_ARGS="-d ." (using the current directory for image storage).
But in any case, the EPUB docs should change, and not mention the --gladtex option if it doesn't work with epub writers.
Perhaps there is some sensible way to use --gladtex with epubs, but since it is not explained anywhere, it's better not to list it there.
Pandoc version?
pandoc 3.1.3 on Ubuntu 24.04.3 LTS, but this is not very relevant with regard to pandoc.org
pandoc 3.1.3
Features: -server +lua
Scripting engine: Lua 5.4
User data directory: /home/--redacted--/.local/share/pandoc
Copyright (C) 2006-2023 John MacFarlane. Web: https://pandoc.org