That's a pity the FB2 format is not nearly as popular as EPUB is. It's a single-file pure tidy (I mean a simple, intuitive, bloat-free, well-documented schema) XML with purely semantic layout and no formatting. It's a pleasure to write code processing it. The user/app/device is the only to decide how to view it (neither pages nor fonts are specified). Isn't this lovely?
Major Mode for Reading EPUBs in Emacs
51–60 of 70 posts
Re: Major Mode for Reading EPUBs in Emacs
#52Earlier quoted context omitted.
From the screenshot, my one big complaint is that it's typeset ragged right instead of flush right (which is, generally, how books and most ebook readers do it), but I suppose that's just a CSS fix, then?
> which is, generally, how books and most ebook readers do it Books flush them right. eBook readers usually don't and when they do it's horribly typographically, because they don't use a smart algorithm for hyphenation and line splitting.
Re: Major Mode for Reading EPUBs in Emacs
#53That's a pity the FB2 format is not nearly as popular as EPUB is. It's a single-file pure tidy (I mean a simple, intuitive, bloat-free, well-documented schema) XML with purely semantic layout and no formatting. It's a pleasure to write code processing it. The user/app/device is the only to decide how to view it (neither pages nor fonts are specified). Isn't this lovely?
EPUB's zip archive may encapsulate images and fonts. How do you achieve that with a single XML file? I guess it has a reduced feature set?
As for the pictures - I'm comfortable with them being Base64-encoded and encapsulated at the end of the FB2 file.
EPUB indeed is more feature reach but from my point of view that is all bloat and unnecessary complexity.
I haven't seen a single ebook which could actually benefit from EPUB features. Whatever features rich typesetting worth saving is rarely published this way anyway, they just use PDF (which is sad but true).
Re: Major Mode for Reading EPUBs in Emacs
#54That's a pity the FB2 format is not nearly as popular as EPUB is. It's a single-file pure tidy (I mean a simple, intuitive, bloat-free, well-documented schema) XML with purely semantic layout and no formatting. It's a pleasure to write code processing it. The user/app/device is the only to decide how to view it (neither pages nor fonts are specified). Isn't this lovely?
Re: Major Mode for Reading EPUBs in Emacs
#55That's a pity the FB2 format is not nearly as popular as EPUB is. It's a single-file pure tidy (I mean a simple, intuitive, bloat-free, well-documented schema) XML with purely semantic layout and no formatting. It's a pleasure to write code processing it. The user/app/device is the only to decide how to view it (neither pages nor fonts are specified). Isn't this lovely?
EPUB's zip archive may encapsulate images and fonts. How do you achieve that with a single XML file? I guess it has a reduced feature set?
HTML also allows you to specify an image inline using Base64 encoding; soemthing like
I don't know what FB2 does, but it's definitely a solvable problem.Re: Major Mode for Reading EPUBs in Emacs
#56Shameless plug for a personal project: https://github.com/ashton314/homebrew-mm This is really just a one-liner I put in a shell script to pass things to Pandoc so I could read them like a man page in my terminal. Love the Emacs lib though. The more emacs I my life the better. :)
Re: Major Mode for Reading EPUBs in Emacs
#57Earlier quoted context omitted.
EPUB's zip archive may encapsulate images and fonts. How do you achieve that with a single XML file? I guess it has a reduced feature set?
I wrote and use an editor similar to Scrivener that allows the user to edit in Markdown, but saves the project as XML. Images are saved as nodes with a mimetype and a Base64-encoded byte array, and referenced in the document with a UUID. HTML also allows you to specify an image inline using Base64 encoding; soemthing like I don't know what FB2 does, but it's definitely a solvable problem.
[1]: https://en.wikipedia.org/wiki/FictionBook#Differences_from_o...
Re: Major Mode for Reading EPUBs in Emacs
#58The bindings are even similar save for o for outline in pdf-tools and t for table of contents.
One suggestion would be a function to search the entire document since in buffer search will only search the current chapter.
Really awesome progress.
Re: Major Mode for Reading EPUBs in Emacs
#59That's a pity the FB2 format is not nearly as popular as EPUB is. It's a single-file pure tidy (I mean a simple, intuitive, bloat-free, well-documented schema) XML with purely semantic layout and no formatting. It's a pleasure to write code processing it. The user/app/device is the only to decide how to view it (neither pages nor fonts are specified). Isn't this lovely?
Not having page numbers is pretty obnoxious for a book.
Page numbers can indeed be very useful for the purpose of non-electronic referencing of pieces of a text, especially if a printed edition of the book exists you need to collaborate with people having such but I would rather use simple anchor tags for this.
Re: Major Mode for Reading EPUBs in Emacs
#60That's a pity the FB2 format is not nearly as popular as EPUB is. It's a single-file pure tidy (I mean a simple, intuitive, bloat-free, well-documented schema) XML with purely semantic layout and no formatting. It's a pleasure to write code processing it. The user/app/device is the only to decide how to view it (neither pages nor fonts are specified). Isn't this lovely?
EPUB's zip archive may encapsulate images and fonts. How do you achieve that with a single XML file? I guess it has a reduced feature set?
I recently bought an ebook and found that it was formatted in a custom font, so I "returned" it immediately. I guess this is a philosophical issue to some extent, but I don't think the typical novel is visual content, and I don't know what you're trying to accomplish by overriding my preferred settings for text presentation.