02-01-2010, 10:10 AM | #31 |
Reader
Posts: 519
Karma: 24612
Join Date: Aug 2009
Location: Utrecht, NL
Device: Kobo Aura 2, iPhone, iPad
|
Make that:
Code:
\makeatletter \renewcommand{\@pnumwidth}{3em} \renewcommand{\@tocrmarg}{4em} \makeatother |
02-02-2010, 02:59 AM | #32 | |
Grand Sorcerer
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
|
Quote:
Code:
\setpnumwidth{10mm} \setrmarg{10mm} I now need one more fix and I'm done. There's a table in there that doesn't wrap the second column... I know I saw something somewhere to fix that... But here's some screen captures. The first is the original document in Mobipocket. The other three are the three generated formats after I converted the original in HTML (and added my own styles and such... I hate those white lines between paragraphs if there is no section break...) I generated the LaTeX source from my HTML. |
|
Advert | |
|
02-02-2010, 03:17 PM | #33 |
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
Could you post the code for the table, at least the first part of it?
|
02-03-2010, 02:54 AM | #34 | |
Grand Sorcerer
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
|
Quote:
This is what I had: Code:
\begin{tabular}{ *{2}{l} } \end{tabular} Code:
\begin{tabular}{ l p{75mm} } \end{tabular} |
|
02-03-2010, 06:27 AM | #35 |
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
That's what I was going to suggest -- so all is well, now?
|
Advert | |
|
02-03-2010, 06:37 AM | #36 |
Grand Sorcerer
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
|
Yep, I now get a nice representation of my book in PDF, Mobi and Epub, all based on the same HTML.
It's still fairly simple, but I expect my tranformation application will grow with time. Things as footnotes and such I still have to figure out (this book had none ). Also, I probably will make more base styles, so I can put some variety in my books (I try to keep the original layout, as long as I like it...) And naturally, a lot of tweaks are always going on (I managed to tweak my ToC for example). I still can't imagine I once (ages ago!) made a report in LaTeX, complete with mathematical figures! |
03-24-2010, 10:41 AM | #37 |
Grand Sorcerer
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
|
I've been playing with my HTML and LaTeX templates a bit. My application to transform the HTML to LaTeX was getting way too complicated (to reflect all classes I had defined in my CSS...). I decided to see if I could simplify things.
First, if I add a new class, I don't want to update my transformer. Second, I wanted to clean up my transformer a bit. So, I checked out the \newenvironment command. That thing is powerful! For example: A lot of books have a dedication, so I created a standard class (default implemented in my CSS) "dedication" <p class="dedication">Thanks to you all!</p> I first replaced that in my transformer with: Code:
\ \\[1cm] \noindent Thanks to you all! So, I changed the code of my transformer to: Code:
\begin{dedication} Thanks to you all! \end{dedication} Code:
\newenvironment{dedication} {\ \\[1cm] \noindent \begin{adjustwidth}{1.5em}{1.5em} } {\end{adjustwidth}} Well, I made it even a bit more flexible... I made a list of classes, put that in a different (text) file, and all those classes map to either an internal environment (such as center) or a custom made one. Now, if I make a new class, I only have to add it to that text file and add a definition to my template. |
04-04-2010, 10:26 PM | #38 |
Zealot
Posts: 104
Karma: 346
Join Date: Oct 2007
Device: Rocket Ebook 1150
|
This was an incredibly useful topic, I hope to adapt my thesis in this format, and it's less of a headache than using the LaTeX2html peril program.
|
05-18-2010, 03:05 AM | #39 |
Member
Posts: 14
Karma: 82814
Join Date: May 2010
Device: nook
|
halp here!!
Hi, I have a NOOK, and also trying to figure out the optimal size to set in LATEX: from wikipedia "Display 600 x 800 pixel, 6 inch E Ink display". Also trying to get PDF and EPUB to show up properly. Right now with my own experimentation and some examples from here I got mixed results. This is what I am using ATM and the pdf comes out very neat but I am not very sure about the screen dimensions. How do I tell it to do "600 x 800 pixel" in \usepackage[papersize={4in,6in},margin=3mm]{geometry} ?? Below is a snippet of my beginning (pre-amble?) Code:
\documentclass[10pt,oneside]{book} \usepackage[papersize={4in,6in},margin=3mm]{geometry} \title{Aeneidos} \author{Vergilius Maron} \usepackage{fontspec} \usepackage{xunicode} \usepackage{xltxtra} \usepackage[T1]{fontenc} \usepackage{hyperref} \setcounter{secnumdepth}{0} \usepackage[absolute]{textpos} \begin{document} \thispagestyle{empty} \begin{textblock*}{\paperwidth}(0mm,0mm) \noindent\includegraphics[width=\paperwidth,height=\paperheight]{Vergilius.jpg} \end{textblock*} \null \clearpage \maketitle \tableofcontents The other problem is that the PDF although very neat the fonts in NOOK are way to little and the anti-aliasing is messed up. This might be due to the geometry of the page. Is there hope or should I just wait for Notion Adam Ink to read pdfs instead of fighting epubs? thanks Last edited by arma_virumque; 05-18-2010 at 03:14 AM. Reason: many |
05-18-2010, 04:01 AM | #40 |
Grand Sorcerer
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
|
Problem is, you can't give up pixels. Pixels doesn't give a size. It's a relative size.
I simply took a ruler and started measuring. And then, via trial and error, add 1mm, remove 1mm, until I had it right. I used a black image to make it a bit easier. And I gave up on epub... |
05-18-2010, 04:54 AM | #41 |
frumious Bandersnatch
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Code:
papersize={4in,6in} You want to use: Code:
papersize={9cm,12cm} |
05-18-2010, 06:00 AM | #42 |
Grand Sorcerer
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
|
Well, I found out that's not exactly accurate.
I have a 5" screen. So, theoretically, I should have a size of 3 x 4" (simple 3-4-5 triangle...) But, after some tries, I found out the actual screensize is different... |
05-18-2010, 05:07 PM | #43 |
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
Of course, you have a 5" diagonal without having 3" by 4" sides. 25 is the sum of 9 and 16, but there are other numbers that add up to 25 (so long as there are fractions)!
Not sure what device you're talking about, however; neither the Pocket Loox 720 nor the JoinTech JE100 has a 5" screen, as far as I know. |
05-18-2010, 08:21 PM | #44 |
Member
Posts: 14
Karma: 82814
Join Date: May 2010
Device: nook
|
too small
9x12 looks somewhat too smallish on the computer, don't know if I transferred that to the nook.
Interestingly chapter linking works on pdf and the nook. Probably the goal here would be to just concentrate on a single format and make it to work on the nook, because pdf and epub conversion isn't exactly perfect. Is there a command line and using vim to edit epubs? I got some epubs from gutenberg project, they look nice. Sweepea, how do you use a black page with LaTeX? Could you give me an example? I want to try that and narrow down the size of nook's screen. |
05-19-2010, 12:24 AM | #45 | |||
Wizard
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
|
Quote:
Quote:
\usepackage{xcolor} \pagecolor{black} % sets background color of whole document \color{white} % sets color of the text Quote:
Last edited by frabjous; 05-19-2010 at 12:27 AM. |
|||
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Latex, PDF and the PRS-600 Dictionary | s3ntient | 4 | 11-06-2009 09:35 AM | |
Chaîne complète d'édition : HTML, LaTeX, PDF, EPUB à venir. | Randy11 | Software | 2 | 04-05-2009 11:42 AM |
PDF Generated with LaTeX for the iLiad | Hadrien | iRex | 17 | 07-25-2008 09:59 AM |
latex template for sony reader pdf | technicolor | Sony Reader | 10 | 07-25-2008 09:51 AM |
PDF creation from Latex using CJK fonts | alanine | iRex | 0 | 10-13-2007 11:45 PM |