Live data from Hacker News

Perfect Edition: A lightweight, responsive web e-book template

github.com

61–70 of 71 posts

Re: Perfect Edition: A lightweight, responsive web e-book template

#61

Several issues from viewing https://robinsloan.github.io/perfect-edition/build/web/ - Having the pages you can't actually read on each side is distracting and wastes a ton of horizontal space. - Moving the browser window to a different monitor with a different resolution can result in you being stuck half way between pages and needing to scroll to reset positioning. Resizing has the same effect. Anything that changes…

Yeah, I'm on Android (pixel 3a) and it's really hard to scroll only one page at a time for me.

Yes that being said the demo is an old version.

Re: Perfect Edition: A lightweight, responsive web e-book template

#62

Earlier quoted context omitted.

I haven't looked through fully to make sure it has no ill effects, but if you add to the css on p: text-align: justify; text-justify: inter-word; you should get what you're looking for. At least it worked in Firefox inspector.

Don’t think I’ve ever seen anyone suggest setting text-justify. It’s one of those properties that I could imagine having been used in anger and with cause (justifiedly :P) less than a hundred times in total , though the true number is probably higher than that. Anyway, in this case it won’t change anything, because the text is English, and the default value of auto will be equivalent to inter-word. (If the text was J…

I think text-justify is fine as long as the text width is somewhat wide (>72 characters) and it's inside a @supports(hyphens: auto). It's not as nice as TeX, but it's fast and Good Enough.

Re: Perfect Edition: A lightweight, responsive web e-book template

#63

Nice! I recently built something similar, but less longform: https://booklitapp.com (The demo on the homepage is swipeable on mobile and draggable on desktop.) My goal was to be mobile-first. One thing I haven't added yet is a table of contents generator - I like how you have the TOC toggle at the bottom!

This is nice! Since you mentioned you wanted to be mobile first, I should mention a couple issues I ran into on my phone: The header bar, with Login and Signup on the right, did not fit on my screen (stopped right around the "S" of Signup), and I was not able to horizontal scroll the header to get to that link, even though it look like it would be horizontal scrollable. It seemed like while I was interacting with the…

Thanks for this feedback! Really appreciated - I'm working on an overhaul of the landing page but I'm going to quickly fix these two issues in the mean time.

Re: Perfect Edition: A lightweight, responsive web e-book template

#64
post #27

Nice! I recently built something similar, but less longform: https://booklitapp.com (The demo on the homepage is swipeable on mobile and draggable on desktop.) My goal was to be mobile-first. One thing I haven't added yet is a table of contents generator - I like how you have the TOC toggle at the bottom!

This is awesome! You should do a Show HN: The example is particularly poignant. It blurs the line between a book and a cartoon. This is what a children's book should be in 2020.

Thank you for checking it out!

The inspiration came from wanting to easily make kids' books with my son :)

Re: Perfect Edition: A lightweight, responsive web e-book template

#65
post #16

If you open most books on the shelf you will notice that text is not left-aligned, but is in fact justified to create a consistent vertical margin on the right-hand side[0]. It's the big thing I always miss when I try reading on the web. One way to do this is with JavaScript implementations of the LaTeX hyphenation/justification algorithm. Check out [1] and [2] for examples. [0]: https://i.imgur.com/65ICUVW.png [1]:…

Thank you!

With modern 4k screens in very small displays the old argument of "computers don't have enough resolution to show justified text properly" becomes absurdly outdated.

We now have the technology to have nice justified text everywhere. Please use it.

Right aligned jagged text looks ugly.

Re: Perfect Edition: A lightweight, responsive web e-book template

#66
post #16

If you open most books on the shelf you will notice that text is not left-aligned, but is in fact justified to create a consistent vertical margin on the right-hand side[0]. It's the big thing I always miss when I try reading on the web. One way to do this is with JavaScript implementations of the LaTeX hyphenation/justification algorithm. Check out [1] and [2] for examples. [0]: https://i.imgur.com/65ICUVW.png [1]:…

Justified text looks pretty, but why does that matter ? Most books are bought to be read, not to sit there admiring the right edge justification. There's even a plausible theory that justified text is bad for readability (perhaps because the brain loses that hint of which line is which). I haven't seen a lot of studies[1] replicating it, but I don't see any studies taking the other side. There's also the problem that…

To me, you are conditioned to prefer right aligned text.

It is OK, we all configure our readers to our taste.

Re: Perfect Edition: A lightweight, responsive web e-book template

#67
post #16

If you open most books on the shelf you will notice that text is not left-aligned, but is in fact justified to create a consistent vertical margin on the right-hand side[0]. It's the big thing I always miss when I try reading on the web. One way to do this is with JavaScript implementations of the LaTeX hyphenation/justification algorithm. Check out [1] and [2] for examples. [0]: https://i.imgur.com/65ICUVW.png [1]:…

> One way to do this is with JavaScript implementations of the LaTeX hyphenation/justification algorithm.

Another is just to use CSS (text-align: justify).

Why use JS for this?

Re: Perfect Edition: A lightweight, responsive web e-book template

#68

I've given up on reading epubs on my computer. All epub readers are crap: inappropiate fonts, weird spacing, no sheet margins (like the ones pdf readers have), etc. PDFs, on the other hand, look nice 95% of the time, unless someone uses calibre to convert an epub to pdf.

Have you tried Thorium?

https://www.edrlab.org/software/thorium-reader/

Re: Perfect Edition: A lightweight, responsive web e-book template

#70

This is nice, but I'd still like to find a no frills, to-the-point explainer on how to assemble an epub from standard tools. After all, it's really just a zip archive with a couple directories and some specially named files. All of the tutorials I find are either woefully out of date - usually they can't create valid EPUB3 content, require stupid software like Java due to epubcheck, or just punt the whole issue to so…

Create an empty epub in calibre or vellum or any other editor that will create epubs for you; then unzip it and edit it raw. You can do the same thing with a professionally published epub. In either case, you can rip out the metadata files (opf, ncx, etc.) and create templates from them, which you can reuse in your own projects without beginning in an epub editor or generator. You still probably want to run an epub t…

That would work, up until I actually try to re-zip the contents. Last I looked at the spec, it requires things to be done in a particular order (as @tyingq's link indicates) and although I've used pandoc to convert some other documents, coming up with the proper incantation to feed into it seems like more trouble than just doing it yourself.

More to the point, things like my Oral Defense required certain elements to be on a given page (e.g, p.1-2 were front matter and the text began on p.3) and I don't know if that kind of control is possible in pandoc.

With regard to validation, there used to be a web form at validator.idpf.org which let you upload a finished book and it would scan for errors, but that page seems to be gone.

I don't doubt that epubcheck works, it's just a shame that it requires a huge download to enable its functionality and one which doesn't really play well in macOS.

I'm perfectly ok with doing the creation and editing by hand, but come on, this is a UNIX system (!) and the absence of a better command line tool for validating output is imho inexcusable.

Post reply on HN