I'd like to share the method used to generate the ePUB shown in the
third screenshot of the first post.
Prerequisites:
The main script is
md2epub. It relies on a
pandoc filter.
The input markdown file is
metamorphosis.md, the output ePUB was generated with
md2epub metamorphosis.md.