Register Guidelines E-Books Search Today's Posts Mark Forums Read

 08-08-2007, 11:07 AM #1 flubu master of my own domain     Posts: 29 Karma: 10 Join Date: Jun 2007 Location: Cambridge, UK Device: Sony Reader Tex to LRF? I have a bunch of old latex (tex) files that I want to put on the reader. I've tried to use tex2rtf but it's ignoring some of the packages that I use in the tex files. I'm thinking that the best way would be tex -> PS -> PDF, but the only problem with that is that the page size is set to A4 by default. Google, being my friend, informed me that I can set the page size using the \special{papersize=xx,yy} directive in my tex files. The question is, what should it be set to so that the PDF won't look like microscopic crap? Something like a classic paperback book (6 7/8 x 4 1/4)?
08-08-2007, 12:15 PM   #2
HarryT
eBook Enthusiast

Posts: 64,976
Karma: 43118253
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Mini, iPhone 4, MS Surface Pro, N7
Quote:
 Originally Posted by flubu Google, being my friend, informed me that I can set the page size using the \special{papersize=xx,yy} directive in my tex files. The question is, what should it be set to so that the PDF won't look like microscopic crap? Something like a classic paperback book (6 7/8 x 4 1/4)?
The Reader's screen size is 120x90mm.

04-06-2008, 09:39 PM   #3
AprilHare
Wizard

Posts: 2,833
Karma: 11253505
Join Date: Apr 2008
Quote:
 Originally Posted by HarryT The Reader's screen size is 120x90mm.
According to Sony and their guide to generating PDFs, the screen size is 90.6mm by 122.4 mm (3.57" by 4.82").

I tried using an installation of TeXmacs to generate such PDFs (for later conversion to LRF) however it had this tendency to produce A4 size documents anyway.
Anyone know of a way to do this conversion that actually works?
I'm using the Pride and Prejudice TeX document from Project Gutenberg for test purposes (download the zipped file - the unzipped one is actually a PDF as the uploader clearly stuffed up..)

The command \special{papersize=xx,yy} didn't seem to do the trick. I have access to Ubuntu Linux and Windows, if it helps.

 04-07-2008, 08:56 AM #4 WillAdams Guru     Posts: 976 Karma: 1902370 Join Date: Feb 2008 Device: Sony PRS-600, Fujitsu Stylistic ST-4121 Peter Wilson's Memoir documentclass has a wealth of options, including a larger range of font sizes for documents than normal --- I'm still experimenting, but a first pass which seemed okay for a start was: \documentclass[9pt,b6paper]{memoir} %%% set up the page layout %\settrimmedsize{11in}{210mm}{*} \setlength{\trimtop}{0pt} \setlength{\trimedge}{\stockwidth} \addtolength{\trimedge}{-\paperwidth} \setulmargins{2cm}{*}{*} \setlrmargins{2cm}{*}{*} \setmarginnotes{17pt}{51pt}{\onelineskip} \setheadfoot{\onelineskip}{2\onelineskip} \setheaderspaces{*}{2\onelineskip}{*} \checkandfixthelayout However, far better to use latex2rtf to make a .rtf file instead of washing out all the formatting in a .pdf William
 04-07-2008, 10:32 AM #5 akiburis Connoisseur   Posts: 67 Karma: 614 Join Date: Jul 2007 Location: New York Device: Sony PRS-505, iLiad Book Edition You can set the page size in LaTeX with the geometry package: \usepackage[paperwidth=3.47in,paperheight=4.54in]{geometry} or \usepackage[paperwidth=88.2mm,paperheight=115.4mm]{geometry} You can also set margins and some other page-layout parameters with the geometry package. By the way, 3.47" by 4.54" (88.2 mm by 115.4 mm) is the correct page size for a PDF formatted for the Sony Reader. I recall that the first version of Sony's manual for creating PDFs for the Reader gave the display size as 3.57" by 4.82". I found that when I made a PDF using those dimensions, it was nevertheless appreciably reduced when displayed on the reader. 3.57" by 4.82" may be the screen size, but it seems that to get the exact displayed "page" size, you need to subtract the area occupied by the status bar at the bottom of the display. The Sony manual later gave a corrected display size of 3.47" by 4.54" (88.2 mm by 115.4 mm), which I find works perfectly.
 04-10-2008, 08:41 PM #6 AprilHare Wizard     Posts: 2,833 Karma: 11253505 Join Date: Apr 2008 Device: Sony Reader PRS-T2 I am aware these commands allow for this - but what actually heeds these commands and outputs PDFs of the right size? TeXmacs ignores them in practice.
 04-11-2008, 08:41 AM #7 WillAdams Guru     Posts: 976 Karma: 1902370 Join Date: Feb 2008 Device: Sony PRS-600, Fujitsu Stylistic ST-4121 Lots of TeX implementations (pdflatex, xetex, luatex &c.), or if one can make a .dvi, post-process it w/ dvips and ghostscript (or Acrobat Distiller) or dvipdfmx (or the new xdvipdfmx). You're still better off making a .rtf directly from the .tex source, or bringing the .tex source directly into a word processor and applying the formatting there using standard search-replace techniques. William
04-11-2008, 10:19 AM   #8
akiburis
Connoisseur

Posts: 67
Karma: 614
Join Date: Jul 2007
Location: New York
Device: Sony PRS-505, iLiad Book Edition
Quote:
 I am aware these commands allow for this - but what actually heeds these commands and outputs PDFs of the right size? TeXmacs ignores them in practice.
I've been using pdftex and xetex to produce PDF output (using MikTeX on Windows and TexLive 2007 on Windows and Linux, calling pdflatex or xelatex from the command line), and have found that with either, the geometry package page size and layout commands are heeded perfectly. I can't affirm from personal experience that this would be the case with other methods, eg, converting dvips output to PDF, and I don't know how TeXmacs produces PDF output.

Last edited by akiburis; 04-11-2008 at 10:48 AM. Reason: Deletion.

04-18-2009, 06:59 AM   #9
Aguex
Junior Member

Posts: 2
Karma: 10
Join Date: Apr 2009
Device: Sony PRS-505
Quote:
 Originally Posted by akiburis I've been using pdftex and xetex to produce PDF output (using MikTeX on Windows and TexLive 2007 on Windows and Linux, calling pdflatex or xelatex from the command line), and have found that with either, the geometry package page size and layout commands are heeded perfectly. I can't affirm from personal experience that this would be the case with other methods, eg, converting dvips output to PDF, and I don't know how TeXmacs produces PDF output.
Thank you very much, geometry package works perfectly
Settings I used:
Code:
`\usepackage[paperwidth=3.47in,paperheight=4.54in,top=0px,left=10px,bottom=10px,right=10px,includefoot]{geometry}`

04-18-2009, 07:48 AM   #10
kacir
Wizard

Posts: 2,835
Karma: 3142045
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
Quote:
 Originally Posted by HarryT The Reader's screen size is 120x90mm.
Yes, but not all the screen is used to display pdf file. There is status bar at the bottom. The best would be to measure actual size on screen