TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does anyone know whether there is an organized effort to develop (La)TeX classes/packages specifically designed to create ereader-friendly PDFs?

My question is not how to create such PDFs using LaTeX, since Lev Bishop provides a fine summary of currently available methods in an answer to this question.

Edit: Would it be feasible to generate usable epub (or [insert your favorite eBook format here]) documents using LaTeX? I'm not very familiar with how epub documents/readers manage font-scaling, etc. If so, is there a project to create a program that would do this?

Also, I leave ereader-friendly open to your interpretation, but some features I had in mind are

  • ereader-specific page sizes (with small margins by default);
  • increased minimum font size;
  • a font thicker than CM (by default).
share|improve this question
Feel free to edit the tags. – Z Norwood Apr 22 '11 at 0:09
Read this on how to create ebooks from a tex file: d800fotos.wordpress.com/2015/01/19/… – user70857 Jan 20 '15 at 16:22

I compile my ebooks (tested and liked on both Sony Reader and Kindle) in XeLaTeX with this preamble:




  \decothreeleft \aldineleft \decosix \aldineright \decothreeright%



As a result, I get small pages, with small margins, a really nice font, pleasant to read, and embedded in the PDF, and the PDF metadata set so that it shows up nicely in the e-reader book listing.

share|improve this answer
I'm not very familiar with XeLaTeX; can anything in this preamble not be done with LaTeX? – Z Norwood Apr 22 '11 at 23:48
\setmainfont{Cochin} is really hard to get done in LaTeX: XeLaTeX gives you easy access to TrueType and OpenType fonts. Of course, if you've a favourite font in LaTeX, you don't particularly need XeLaTeX. – Mikael Vejdemo-Johansson Apr 27 '11 at 16:22
Your answer works like a charm in concert with this: tex.stackexchange.com/questions/11059/… – andsens Dec 28 '12 at 15:38

Tuning font size, font family and margins are easy things to achieve in LaTeX.

For example, using scrbook, you can set the paper size, font size, and reduce the margins by playing with the DIV parameter:


You can set the value of DIV manually to fit your needs. DIV represents the space allocated to the text in your page, so the bigger the value, the smaller the margin. Standard calculated values are listed in the Koma-Script documentation.

You can even set your margins manually. For example, I have a 6in:9in document with a 0.50in margin, a 0.50in binding correction to apply and a 0.125in mandatory bleed, so I set:

% Paper width
% W = 6.125in (6+0.125 --- bleed)
% Paper height
% H = 9.25in (9+2*.125 --- bleed)
% Paper gutter
% BCOR = 0.375in (0.5+0.5-0.625 --- margin with bleed)
% Margin (0.5in imposed on lulu, recommended on createspace)
% m = 0.625in (0.5+0.125 --- bleed)
% Text height
% h = H - 2m = 8in
% Text width
% w = W - 2m - BCOR = 4.5in

As far as choosing fonts go, you can already switch to Latin Modern, which is a bit nicer than Computer Modern (de gustibus et coloribus...):


and then there's a lot of nice Type1 or OpenType fonts that can be used, too. pdf(la)tex embeds fonts in PDF documents, so there's no real limit to what you can do.

share|improve this answer

See also this; in particular, Peter Flynn references a mailing list devoted to the topic.

share|improve this answer
Great link---thanks. Apparently there is a TUG11 conference on "LaTeX and eBooks." – Z Norwood Apr 22 '11 at 23:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.