|
|
View Full Version : PDF Generated with LaTeX for the iLiad
Hadrien 12-01-2006, 03:06 AM Hello,
I've already made a similar post on the Sony Reader forum, but I also need the advice of those who own an iRex iLiad.
I've been working on a project for the last 2 months, trying to create something really usefull for the Sony reader and all the other e-ink devices.
I've spent quite some time online, and found many e-books available, mostly books in the public domain, but I wasn't really satisfied by their presentation or the format being used.
This new project is based on LaTeX, an old technology, but still the best thing around when you need to create scientific papers for example. Using this website (I used Ruby on Rails for this), people will be able to download PDF files (A4, Sony Reader and Custom PDF) first, but it could be any kind of files in the near future as long as it's supported by LaTeX. Unlike most websites, we don't store books as files, we store them in a database, separated into parts/chapters/sections. This way we can create table of contents for these books too, or make a much nicer presentation overall.
The website should be divided into 3 main sections:
- Books in the public domain: the usual stuff, but with books generated using LaTeX. We'll provide a way for people to send books for this section of the website, and then check if these books really are in the public domain before publishing them (a bit like wikisource ?).
- Books written by you: using a simple Ajax interface, anyone will be able to send their own book. Books will be generated using LaTeX too, and this section will have most of those trendy web 2.0 things like tags.
- Newspaper: Should come in 2 flavours, rss generated and user generated. It will be possible to create your own newspaper using rss feeds and then share it with anyone on the website. You're a complete newbie and you don't know what RSS feeds are for ? Not a problem, just click on one of those popular rss generated newspaper that someone created for you. Using an ajax interface, people will also be able to write articles and create their own fanzine, publish their views on the world etc... It's like blogging but for e-newspaper (correct name for this ?)
We'll begin with content in english and french, but everything is unicode, website and LaTeX included, so it will be possible to write or read books/newspapers in any language.
I'm still working really hard on this project, but I guess it will be ready for beta near mid december. I'll receive my sony reader tomorrow, so I haven't generated pdf files for it yet. Included with this post, there's a sample using basic LaTeX and A4 (this is generated using my website).
I've just received the Sony Reader, but I don't think I'll own an iRex iLiad before a few months, yet I'd like to add support for this reader on my website. It'll be possible for anyone to create custom PDF files and save the template, but I'd like to give the possibility for those using the iLiad to download books, without going through this.
Which size for the books are you using on the reader ? Is A4 possible on the iLiad unlike the Sony Reader (it's possible but not really easy to read on this reader) ?
If you're interested in this project, here's the #1 demo, on how anyone can create a book with this website:
English: http://www.youtube.com/watch?v=2o-66_ZxTR4
French/Français: http://www.dailymotion.com/Feedbooks_Hadrien/video/xq5z7_feedbooks-demo-1-fr
yokos 12-01-2006, 07:59 AM I use \usepackage[paperwidth=122.0mm,paperheight=150.0mm]{geometry}
to get a paper size of iLiad's dimension.
shonk 12-01-2006, 09:19 AM I use the same dimensions as yokos.
Which size for the books are you using on the reader ? Is A4 possible on the iLiad unlike the Sony Reader (it's possible but not really easy to read on this reader) ?
I believe it's best to use 'real' sizes, as that corresponds closest to what letters actually will look like. Scaling makes pages look somewhat like early WYSIWYG samples -- fonts should not scale linearly, but optically.
Width = 29.1 pc, height = 35.4 pc seems to be fairly close.
But you don't really want to do iLiad and Sony formatting separately -- at least not if you are looking for quality results. You only get two books to proofread for bad hyphenations, widows, etc. I suspect it would be better to find a mean page size, and use that for both formats. (Better, that is, in the sense of least wasteful of time in proofing.)
After looking over the Doyle title:
You really want to keep page sizes down to something much closer to pocket book size. A4 is impossible to read, even if printed, if you let the page size dictate the line length. Even A5 can be pretty bad.
And try to avoid Type 3 fonts -- they contain no hinting, and are generally rather useless in low resolution. (I even suspect some T3 typefaces to be bitmapped fonts, barely covered by PostScript format -- and they work even worse.)
Hadrien 12-01-2006, 01:27 PM I believe it's best to use 'real' sizes, as that corresponds closest to what letters actually will look like. Scaling makes pages look somewhat like early WYSIWYG samples -- fonts should not scale linearly, but optically.
Width = 29.1 pc, height = 35.4 pc seems to be fairly close.
But you don't really want to do iLiad and Sony formatting separately -- at least not if you are looking for quality results. You only get two books to proofread for bad hyphenations, widows, etc. I suspect it would be better to find a mean page size, and use that for both formats. (Better, that is, in the sense of least wasteful of time in proofing.)
After looking over the Doyle title:
You really want to keep page sizes down to something much closer to pocket book size. A4 is impossible to read, even if printed, if you let the page size dictate the line length. Even A5 can be pretty bad.
And try to avoid Type 3 fonts -- they contain no hinting, and are generally rather useless in low resolution. (I even suspect some T3 typefaces to be bitmapped fonts, barely covered by PostScript format -- and they work even worse.)
I expected the A4 to be pretty much useless on a portable reader that's why I asked which size would be the best suited for the iLiad.
The main problem with having a single size for both the Sony Reader and iRex iLiad, is that I'm not sure it is really possible to make something good looking for BOTH at the same time. The Sony Reader has quite a few problems with scaling and margins when you zoom in, using a PDF file. All the books are generated online so I can easily generate different sizes and put them in cache (less things to generate), yet still offer to generate custom PDF for those who need something different.
I'll change a few things within my templates and post a version sized to what Yokos indicated, and using Bookman instead of T1, we'll see if it's get better...
Edit: First test, room for few or many improvements ?
Hadrien 12-02-2006, 06:02 AM But you don't really want to do iLiad and Sony formatting separately -- at least not if you are looking for quality results. You only get two books to proofread for bad hyphenations, widows, etc. I suspect it would be better to find a mean page size, and use that for both formats. (Better, that is, in the sense of least wasteful of time in proofing.)
Guess you were right with the possible hyphenation issues, had some problems with it. But now that I load hyphenation for many more languages and that I added these lines when LaTeX can't do the hyphenation:
\tolerance=200
\setlength{\emergencystretch}{2em}
I don't have any issue anymore, at least with fiction books. I'll have to try with scientific papers where there's a lot of math formulas, to be sure that it'll work too.
Hadrien 12-26-2006, 09:36 AM Just released the beta: http://beta.feedbooks.com
The new topic for it is: http://www.mobileread.com/forums/showthread.php?threadid=9165
Hadrien 01-24-2007, 06:20 PM Well... we're getting much closer from something final for the PDF generation.
I've just made a PDF for the iLiad with the fonts available for the moment in 2 different sizes.
Right now the template for the iRex iLiad on Feedbooks is: Times, sized 12
We need your advice on the fonts, the most popular one will be used as the new template for the iLiad.
Which one is the best looking font for you ?
We need your advice on the fonts, the most popular one will be used as the new template for the iLiad.
Which one is the best looking font for you ?
You really need to give better samples. A full page of a reasonable text for each typeface is not excessive -- it's not a question of if a few words on a line happen to look good, but if a full page reads well. Make sure the page contains quotes, italics, dashes and other common types.
It is also a question if typeface supports the full character set of the books you want to produce -- if it doesn't, it's not a question of how popular it is: it's simply not up to the job.
Hadrien 01-25-2007, 05:37 AM You really need to give better samples. A full page of a reasonable text for each typeface is not excessive -- it's not a question of if a few words on a line happen to look good, but if a full page reads well. Make sure the page contains quotes, italics, dashes and other common types.
It is also a question if typeface supports the full character set of the books you want to produce -- if it doesn't, it's not a question of how popular it is: it's simply not up to the job.
I'll do full page examples in this case, but these are the most standard fonts for LaTeX, they provide full support for what you said and even Math formulas.
BACbKA 04-05-2007, 04:35 PM I kept generating the PDF via
latex: tex -> dvi
dvipdfm: dvi -> pdf
and all was good and dandy with my output PDFs.
However, now I am trying to format an article which has Metapost-produced PS figures inside, and thus I must go via the
dvips: dvi->ps
ps2pdf: ps->pdf
(or maybe dvipdf: dvi->pdf)
route.
Unfortunately, whether I do it this way, or add a -D160 option to dvips/dvipdf to change the DPI accordingly to the iliad's DPI, the letters look "jumping" in a line on the Iliad, with a +-1px fuzz relative to the baseline and non-even vertical lines -- +-1px in width as well. Ugly to the extreme.
dvips -D160
also causes the following gripes on the output:
kpathsea: Running mktexpk --mfmode / --bdpi 160 --mag 1+0/160 --dpi 160 ecrm1200
mktexpk: Mismatched mode ljfour and resolution 160; ignoring mode.
mktexpk: Can't guess mode for 160 dpi devices.
mktexpk: Use a config file, or update me.
kpathsea: Appending font creation commands to missfont.log.
dvips: Font ecrm1200 at 160 not found; scaling 600 instead.
dvips: Such scaling will generate extremely poor output.
(repeated for several fonts used by the document).
Has anybody found a way around that?
V
Hadrien 04-05-2007, 05:21 PM I kept generating the PDF via
latex: tex -> dvi
dvipdfm: dvi -> pdf
and all was good and dandy with my output PDFs.
However, now I am trying to format an article which has Metapost-produced PS figures inside, and thus I must go via the
dvips: dvi->ps
ps2pdf: ps->pdf
(or maybe dvipdf: dvi->pdf)
route.
Unfortunately, whether I do it this way, or add a -D160 option to dvips/dvipdf to change the DPI accordingly to the iliad's DPI, the letters look "jumping" in a line on the Iliad, with a +-1px fuzz relative to the baseline and non-even vertical lines -- +-1px in width as well. Ugly to the extreme.
dvips -D160
also causes the following gripes on the output:
kpathsea: Running mktexpk --mfmode / --bdpi 160 --mag 1+0/160 --dpi 160 ecrm1200
mktexpk: Mismatched mode ljfour and resolution 160; ignoring mode.
mktexpk: Can't guess mode for 160 dpi devices.
mktexpk: Use a config file, or update me.
kpathsea: Appending font creation commands to missfont.log.
dvips: Font ecrm1200 at 160 not found; scaling 600 instead.
dvips: Such scaling will generate extremely poor output.
(repeated for several fonts used by the document).
Has anybody found a way around that?
V
Which font are you using ? Not all font can be scaled this way, I guess that's part of the problem here.
BACbKA 04-06-2007, 12:20 PM I'm talking about whatever default is used by latex for T1, with whatever is dragged in by hyperref. According to the logs, this means mostly
T1/cmr/m/n
OML/cmm/m/it
OMX/cmex/m/n
U/cmr/m/n
OMS/cmsy/m/n
and
PD1/pdf/m/n
(the latter, IIUC, needed for the hyperref bookmarks).
ElaHuguet 04-07-2007, 03:11 PM Hi,
I use Palatino at size 10 for my pdf's, which is a normal paperbook size (I compared a printed book to my iLiad), but it might be too small for some; and to make the line lengths the right size, I use wide-ish margins left and right.
BACbKA 04-15-2007, 02:25 PM OK, I found a solution to my problem.
It turns out that the ec fonts that get embedded due to the \usepackage[T1]{fontenc} are not scalable in the default setup;
one has to follow it up with a \usepackage{ae} and then it all works,
also the PDFs get significantly smaller.
Hadrien 04-15-2007, 04:36 PM Hmm I guess that you have to use scalable font, but \usepackage{ae} doesn't refer to a font encoding right ? Looks like a font to me. All Post Script fonts should be scalable.
BACbKA 04-16-2007, 07:38 AM Turns out that the ec family fonts as typically brought in by the T1 encoding isn't scalable -- I learnt that from comp.text.tex. There is a commercial TeX distro that offers them scaled. The ae package seems to remap the glyphs to the original underlying OT1 cm fonts (by Knuth) AFAIU. Anyway, if somebody selects their own (scalable) fonts, all is fine, the problem happens just for the poor souls like myself that, on one hand, use the T1 font encoding, and, on the other hand, don't request any particular fonts explicitly in their document.
hunahau 07-25-2008, 08:59 AM latex y sony reader
No se si les sirva esto, es para hacer documentos en latex que se vean bien en el sony reader.
Yo uso, para documentos en latex, la clase memoir. Lo que hice fue editar memoir.cls y donde esta ebook puse:
\DeclareOption{ebook}
{\setlength\stockheight {5in}%
\setlength\stockwidth {4in}}
despues, en el preambulo del documento utilice:
\documentclass[ebook,12pt]{memoir}
.
.
.
\stockheight=122.4mm
\stockwidth=90.6mm
\headheight=0pt
\headsep=0pt
\textheight=119mm
\textwidth=87mm
\parindent=0em
\oddsidemargin= -2.5cm
\evensidemargin= -2.5cm
\topmargin -2.5cm
y listo... espero les sirva
Para el iliad solo hay que cambiar las dimensiones y ya.
|