I wrote a lengthy novel using a program I wrote. This produces a suitable LaTeX source I can use to generate a nice-looking PDF.
Markup, beside customary division in Part/Chapter/Scene, is used to put emphasis, to handle direct-speech (which I use a lot, sometimes even nested) and to output certain phrases in "strange fonts".
So far, so good.
Now my problem is I need to convert all this into a format suitable for Kindle as I want to self-publish with Amazon.
I have seen standard tools (i.e.: Kindle Create), but that seems to lack all the kinds of formatting I'm using and its input (if I want to enable reflow) is restricted to Microsoft .docx format, which I don't know how to produce.
OTOH I have control over my program so, given a suitable markup (e.g.: Markdown) I can generate what is needed.
Question is: which "suitable markup" is available for novel rendering?
Ideally it should:
- handle standard headings (easy; almost every markup does).
- handle TOC and some limited cross-referencing (this is also standard).
- handle font change "on the fly" (font face, not just bold/italic).
- handle (possibly nested) direct speech, possibly keeping track of speaker.
- output a professional-looking ebook for Kindle (mobi, epub or azw3/4).
- if possible generate, from the same source, also PDF (not mandatory).
Does such a beast exist?
UPDATE:
judging from comments and the lonely Answer I did not manage to make the message through (or I'm saying something completely foolish, which could well be).
What I really like in LaTeX is it's possible to use things like \tqt{Yesterday my boss said: \tqt{jump!} and I had to jump.}
to define a (nested) direct speech fragment and it will be converted according Your (global) choices.
In my book I use:
«Yesterday my boss said: “jump!” and I had to jump.»
but that could be easily (and globally!) converted to a different style, e.g.:
— Yesterday my boss said: «jump!» and I had to jump.
This (again AFAIK) is possible neither in plain HTML nor with programs normally used to edit books (MSWord, kindle-create, Calibre or Sigil).
Other uses of semantic tagging could include:
- differentiating (visually or otherwise) speech from different entities (e.g.: speech from a vampire could be in a different font)
- long citations.
- nested tales (e.g.: flashbacks).
- separators (horizontal line vs. stars vs. graphic image).
- add "invisible" metadata (e.g.: time and duration of a scene, to be used to prepare a timeline).
- etc.
"Normal" markup languages (e.g.: Markdown) are not really suited for this even if they have a lots of features, mostly useless for novel writing (cross-reference, lists, tables, math, ...).
I am thinking about defining (and implementing) something myself.
Let me know if there is some interest.
Any comment welcome.