|
From: | Brian Inglis |
Subject: | Re: groff for epub/e-books (was: groff 1.22.4 mandb 2.11.2 man -H tbl not rendered) |
Date: | Thu, 23 Feb 2023 08:13:03 -0700 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 |
On 2023-02-22 19:26, G. Branden Robinson wrote:
Hi Brian, At 2023-02-22T11:42:00-0700, Brian Inglis wrote:That and what you've changed already is much better than current, as it previously read as if global/region options could be specified after .T&.I had tried to avoid implying that, but if it's more clear now, all the better. :)Any chance you could eventually get the info docs to the same level?I've wordsmithed a lot of the groff Texinfo manual since 1.22.4, and written some entirely new sections/nodes, but there is no preprocessor coverage in it and I don't plan to add any. I think the preprocessors can be covered in a man page or short paper, and don't require a book-length manuscript as the GNU troff formatter does. There's an open Savannah ticket about this. https://savannah.gnu.org/bugs/index.php?60061I normally expect more and easier access to the info than the man pages for GNU packages, so start there first! ;^>It's there, if you want to learn the formatter in detail.[And prefer "open" ePub, vs *proprietary* Adobe PS and PDF,PDF is an international standard these days,[1] though I wonder if it isn't a captive one by Adobe as "Office Open XML" is by Microsoft.[2]as it's zipped html readable in browser addons, or vim or less(/open) if desperate. Get on it FSF!]I _do_ think ePub would make a good application for groff, and it's something I've given some thought to. One thing EPUBs often need to do is reflow and re-render the text, because someone make take a tablet or phone display and rotate it frequently. EPUBs _can_ do this, but in my experience, they often do it poorly.
Gave up on paper late 2010 and been eReading ePubs on Kobos and browsers since, including O'Reilly, Oracle, Dershowitz & Reingold Calendrical Calculations, Knuth tAoCP 4A, McKusick Design & Implementation of FreeBSD, Mills Network Time Synchronization: the Network Time Protocol, Sedgwick Algorithms, etc. and ~2k fiction and other reference works. Epubs are x/html and metadata, with only 5 basic symbolic entities allowed and all UTF8 chars and numeric entities in all languages supported by the ereader or browser fonts, with adjustable fonts and sizes if the author, publisher, and distributor don't screw the CSS up. I've only had problems when epubs make stupid assumptions about sizes and use (tiny!) graphics for tables instead of HTML.
PDF apparently doesn't handle this well, which is one of the reason a bunch of "e-book" document formats popped up. I've been frustrated with every one I've encountered.
Rotation is basic to allow PDFs to render on ereaders in landscape and scroll down pages, but not fluid.
I have noticed that groff generally renders so fast on modern hardware that I'll wager that a "groff ePub" document could ship the document _source_ and an "ePub reader" for it would provide the entire groff rendering system. (For documents that are slow to render even with this approach, you could straightforwardly cache the intermediate output for each display orientation.) I don't see how this would require any architectural changes to groff itself, and would have many advantages, particularly for document source accessibility, archivability, preservation, and "share-alike" licensing properties.
The last few pages displayed are cached for responsiveness, and ereader eink displays are slower than display rendering, especially after being left in car below freezing!
(So major publishers would probably hate it and oppose it with fury.)
Rumours (and author data before going behind paywall) were that Amazon, self, and all but major oligopoly paper publishers, were selling four times the value and volume of ePubs vs dead trees before the pandemic and book stores shut down, and usage jumped in all markets ~30% during lockdown with no other formats sold. [Major oligopoly paper publishers charge as much for ePubs as new hardbacks, despite that a month after release they are remaindered for $5 or the covers returned to publishers! I think they claim these as sales, as Forbes crunched the numbers and found reading flat, but claimed volumes and revenues increased.]
So, if some entrepreneur wants to fund me for a year or two to move this forward, shoot me an email. ;-)
See https://github.com/nabijaczleweli/gen-epub-book awk script and packages asciidoc, docbook-utils, ebook-tools, htmldoc, poppler, texinfo. There may even be an emacs mode for that!I've hacked text into directories and zipped into an ebook, then edited the epub/zip using gvim.
-- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut -- Antoine de Saint-Exupéry
[Prev in Thread] | Current Thread | [Next in Thread] |