Check out my first novel, midnight's simulacra!

Writing a book in LaTeX in 2023: Difference between revisions

From dankwiki
No edit summary
No edit summary
Line 11: Line 11:
** Not a huge deal, as it turns out, due to PDFs being essentially unmarketable, see below
** Not a huge deal, as it turns out, due to PDFs being essentially unmarketable, see below
* [https://ctan.org/pkg/footmisc footmisc] is ok, but what i really want is [https://tex.stackexchange.com/questions/233269/paragraph-short-footnotes-following-multiline-footnotes-prevent-footnotes-being?rq=1 what this guy describes], which does not seem to be possible.
* [https://ctan.org/pkg/footmisc footmisc] is ok, but what i really want is [https://tex.stackexchange.com/questions/233269/paragraph-short-footnotes-following-multiline-footnotes-prevent-footnotes-being?rq=1 what this guy describes], which does not seem to be possible.
** [https://ctan.org/pkg/bigfoot?lang=en bigfoot] looks like a better option than footmisc, using <tt>para</tt> and <tt>\footnote+</tt>


there's one fundamental and much more serious problem, though:
there's one fundamental and much more serious problem, though:

Revision as of 10:43, 5 December 2023

dankblog! 2023-11-29, 0622 EDT, at the danktower

as noted in my last post, i've been writing a somewhat experimental novel the past few months using LaTeX, in particular the LuaTeX implementation (i started off using XeTeX, but the all-important microtype package doesn't fully support XeTeX). print publication is a month from now, and i'm ready for it. LaTeX was an excellent choice; despite having no assistance from a publisher/layout expert, my corpus looks as good as any book I've seen, and better than most. i've been able to take advantage of things like chemfig and CircuiTikZ, packages almost as powerful as they are opaque and mystifying. i can do conditionals based off parameters passed on the command line by my Makefile, allowing different definitions and behavior depending on whether i'm preparing a hardback, paperback, or ebook.

there have been some annoying issues, though:

  • XeTeX is slow compared to pdflatex (not a serious option imho). LuaTeX is slow compared to anything.
    • I have my chapters broken up into different files, but I don't like working with single-chapter PDFs
  • I haven't yet been able to get the pdfx package working in LuaTeX
    • Not a huge deal, as it turns out, due to PDFs being essentially unmarketable, see below
  • footmisc is ok, but what i really want is what this guy describes, which does not seem to be possible.
    • bigfoot looks like a better option than footmisc, using para and \footnote+

there's one fundamental and much more serious problem, though:

ebook retailers/readers do not want paged documents.

the vast majority of retailers do not accept a PDF in 2023. you pretty much need to get them an EPUB3 if you want to vend digitally. an EPUB3 is a wrapper around HTML, CSS, and resources. it wants to reflow, and to allow the user to control font size and even what fonts are used. so all your work on pagination and lines is getting flushed away (probably) as the device takes over rendering. exactly what all HTML and CSS and MathML the local device supports is of course unknowable.

there is what's called a fixed-layout EPUB3, where you provide images of each page. this is grotesque, and even if you wanted to do it, most people won't let you sell these. amazon won't distribute them to kindles, etc.

so if you want to sell an ebook, you're going to need to accept that the user can effectively destroy your layout in terms of image placement etc.

this also means side-by-side dual language editions are more or less impossible, as are annotated editions defined on a page-by-page basis. you pretty much need to use endnotes rather than footnotes (though navigating to and from endnotes is admittedly a much better experience on a device than in a printed book).

previously: "LaTeX joy of man's desiring" 2023-09-24