Migrating EPUB Production Environment to VSCode + pandoc
I have tried various environments for text writing and e-book production. After continuing to search for a comfortable environment, I finally arrived at one that I feel is close to ideal:
VSCode + pandoc
.
・iBooks Author (Mac only)
・Scrivener (Mac/Windows)
・Sigil (Windows/Mac/Linux)
・VSCode + pandoc (Windows/Mac/Linux) ← Currently here
VSCode EPUB Production Mode
This is my current VSCode EPUB production mode ↓. An ideal environment is finally being built.

Advantages of VSCode EPUB Mode
・Can write in Markdown format
・Since it is VSCode, I can write using Emacs keybindings
・Real-time display of EPUB rendering in the right pane
・File management in the left viewer
・Compile using the pandoc command in the Terminal at the bottom
・Can convert to other formats such as PDF, doc, and LaTeX in addition to Epub
Especially for writing large amounts of long text, being able to write in Markdown format and using Emacs keybindings is a big deal.
.epub compilation using pandoc
The good thing about the pandoc command is that you can compile scattered .md files all at once with a single command and convert them into a single Epub format. ↓

Output result ↓. Multiple markdown files like xxx-xxx.md and images were compiled and converted into Epub format.

Edit by opening in Sigil
This is what it looks like when I opened the output .epub file in Sigil, which allows you to directly edit the contents of the Epub's XHTML ↓.

The table of contents and such are also automatically generated, and it is exported in a clean XHTML format. GOOD.
The history of how I became a Markdown believer
I have been using the Markdown format for about 17 years now, since it appeared in 2004. Around the time Markdown appeared, when I was developing a blog engine system on my own for an open-source project, I researched the implementation of text-to-HTML conversion output functions quite a bit. And I remember concluding that Markdown was the best and implementing it.
17 years have passed since then, and it has now firmly established its position as a standard format, such as being the standard document format on Github. The fact that it is still used even though the development of the main body itself ended a long time ago means that it reached a high level of perfection where there was no room for improvement when it first appeared. In fact, because it is a format that cannot be made any simpler, there is no room for improvement.
I use Markdown for various types of writing, including ideas and drafts for this note, but I believe that plain text format is the best for long-term data preservation and maintenance without depending on specific apps or environments. I have been saved in various ways by converting data created in the era of dedicated word processors into text format and migrating it to a PC, and after going through various OSs, I reached the conclusion that primitive text data is the best, so I am a "text-is-best believer".
Markdown is a text format that is easy to convert into general-purpose formats, making it effective for long-term maintenance. It is as simple as it gets, providing the peace of mind that it can be opened and edited in any editor.
Are other apps dedicated to EPUB production no good?
iBooks Author and Scrivener are famous as apps dedicated to EPUB production, and they are far superior in terms of usability and UI. Since both use the RTF format, they are convenient, allowing you to paste images directly just like in Word. However, their general-purpose utility is low.
In particular, apps like iBooks Author use a proprietary Apple format with custom tag extensions, making it quite troublesome to migrate data to other apps if you want to maintain general compatibility. Updates for the app itself have also been stagnant for a long time, and there is a possibility that development and distribution could suddenly end. I have been burned many times by
Apple's tendency to suddenly discontinue development and abandon long-term users
, so I find it too risky to store important data in a proprietary format of an Apple-exclusive app, and I no longer trust them at all.
Scrivener uses the standard .rtf format. It places more importance on standard formats than iBooks Author, and it is highly functional and versatile. The output EPUB format is also standard and beautiful. It is very convenient as you can convert text when moving to other apps.
However, since the source data is not raw text data, it contains various codes, making the data heavy. The data package during production is proprietary, so just like with iBooks Author, you must be prepared to entrust your work to a single company's proprietary format. If the app's development is discontinued, you would have to convert the format one by one and migrate to another app. Being a suspicious person, I seem to be unable to bring myself to do that.
In the first place, Scrivener was originally exclusive to Mac and iPadOS, and although a Windows version was finally released recently, the Mac and iPadOS versions still have the best UI and UX. I still use a Mac, but since Linux is my main system now, I want an environment where data can be handled exactly the same way on both Mac and Linux. For the reason that I refuse to be entirely dependent on a specific OS, Scrivener was naturally excluded from my options.
Summary
For all these various reasons, I arrived at
an environment where I write and store in Markdown using VSCode and convert/output using pandoc
That is the environment. I have only just migrated, so I have yet to fully utilize it, but I am very satisfied with it so far.
