OT: Custom command to compile org files into epub

Hello,

I’d like to produce for every input .org file (could do the same for mardown files) a .epub file, a .pdf file and a .html file (for e-readers, printers, and web browsers). Since I use extensively maths equations, I’d like to use pandoc and GladTex to generate for me the .epub file, using something like:

pandoc -t json mypost.org | gladtex -d img -P - | pandoc -f json -o mypost.epub

Is it possible to specify custom commands to generate .epub from .org automatically (and another custom command to generate .epub from .pdc)?

Thanks!

Isn’t that a question that you should ask in the pandoc and/or gladtex support system? I don’t see how Hugo can have any influence on that.