29 ms·
If you use pandoc, have you considered epub as a target format? I am getting good results going from latex to epub using pandoc. Not sure what your sources and
by pure_simplicity 5y ago
If you use pandoc, have you considered epub as a target format? I am getting good results going from latex to epub using pandoc. Not sure what your sources and toolchain are like, though.
Thanks for the great guides. :)
- systemvoltage 5y agoDisagree. ePub (or any flowable medium) sucks when code blocks are involved. eBooks are great for novels and long form prose. Not so much for technical books. Why? Because inevitably the code is going to be either wrapped, too tiny or overflowing. Furthermore, syntax highlighting is a complete utter mess in ebooks. Reviews don’t lie. People don’t like it. And it’s obvious where ebooks shine and where they don’t. Personally: I want proper typesetting and constancy in the layout. But with eReaders, ebooks work pretty well and PDFs don’t. With iPads, PDFs are better IMO. But for technical books PDFs set by a professional typesetter like Springer is fantastic. Great typography and layout.
- kragen 5y agoI think the problem with PDFs on ereaders is that the PDF layout is typically designed for a much larger physical page. I designed the PDF version of Dernocua (http://canonical.org/~kragen/dernocua http://canonical.org/~kragen/dernocua) for comfortable reading on small screens, even including cellphones; if you're willing to try it, I'm curious to hear what your experience is with perusing it on your ereader.
- Shared404 5y agoI'm using a laptop mostly, but will be adding this to my reading list, thank you!
- kragen 5y agoOn a laptop you should probably use the HTML tarball; less of the formatting is broken that way. Unlike Dercuano there isn't SVG or anything in this version that gets lost in the PDF, but there are tables and "ASCII" Unicode art.
- systemvoltage 5y agoThis is simply brilliant. I've never seen anyone produce PDFs for small size (or large fonts). I just tried it on iPad mini and it is fantastic. I don't have my eReader handy but I can only imagine it would work well. I think you nailed the problem with PDFs and eReaders - its the choppy panning/zooming that's fatiguing to be able to read fonts at a legible size. This solves it. I hope this idea catches on. ePub/Mobi files are no good IMO.
- kragen 5y agoOh, thanks! I'm glad you liked it. I'm interested to hear how it works on the eReader too, since the iPad is a lot more capable of rapid scrolling, which makes it a significantly more forgiving environment for this kind of thing.
- systemvoltage 5y agoIt didn't work as well on Kindle, see [1]. The version of Kindle I have is from 2012 and it doesn't have a 'fit-to-width' feature. So, the PDF would need to be of correct aspect ratio. [1] https://i.imgur.com/GbOASey.jpg https://i.imgur.com/GbOASey.jpg
- kragen 5y agoThanks! Yeah, that looks pretty hard to read. I see it has 150%, 200%, 300%, and "actual size" options; do any of those make it usable? How about landscape mode?
- systemvoltage 5y agoNo, those options are worse. Tiny boxes that require panning in x and y direction. 100% is about half the width of the PDF.
- kragen 5y agoThank you very much!
- bee_rider 5y agoHuh. I'm surprised there isn't a way to say "really don't split up this bit," like you would in LaTeX with a minipage (for example).
- nemetroid 5y agoI'm pretty sure you can. But most e-readers have screens in the 6-7 inch range. You can't fit very wide lines in a readable font size, so the only way code samples work out in that format is if they are written to be narrow - say, no more than 40-50 characters wide. So if the code you're writing is amenable to those constraints, it would probably work quite well, but AbstractWidgetLocalizerManagerFactoryBeans are right out.
- beej71 5y agoI've considered it, but like systemvoltage said, it's tough to get code to look good on ereaders. It's on my list of things to mess with after I get to version 1 of the C guide. :)
- glitchc 5y agoUnrelated: Beej, so nice to see you on this site, such a fan of your work. Used your guide a decade ago to implement socket select() on a system-critical app. Mad props for doing some awesome work!
- beej71 5y agoThanks! :)
- Icathian 5y agoI just got through my Graduate Intro to OS course at Georgia Tech last year, and your networking guide is still handed from student to student every single semester to survive the first project. I didn't think I'd get the chance, but since you're hanging out here, thank you very much for making it!
- kragen 5y agoIn Dercuano, Derctuo, and Dernocua, I was able to get what I thought was pretty reasonable formatting for 80-column code even on a cellphone screen in a PDF with the lmtlc font, which, despite the abbreviation, is called Latin Modern Mono Condensed Light; it's an extended version of Computer Modern Mono Condensed Light with some Unicode coverage. I wrote a little about this at https://news.ycombinator.com/item?id=21946327 https://news.ycombinator.com/item?id=21946327, and Dernocua is at http://canonical.org/~kragen/dernocua http://canonical.org/~kragen/dernocua among other places if you want to see how it worked out. I'm reasonably pleased with the Dercuano formatting, though some people hate it; it doesn't work very well on a laptop screen, but on a cellphone screen I think it's close to optimal, except where it's just broken. It's probably passable on a small ereader but would be painful on a large one, except maybe in landscape facing-pages mode. (I hacked together the HTML renderer to generate the PDF in a few days, and I didn't implement, for example, table layout; and when it has to fall back to a glyph that isn't in lmtlc, it screws up the column widths.) I think I've said this before, but I really appreciate Beej's Socket Guide! Thank you for writing it!