Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 02-01-2010, 10:10 AM   #31
pietvo
Reader
pietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notespietvo can name that song in three notes
 
pietvo's Avatar
 
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
unless it is within a .sty or .cls file.
pietvo is offline   Reply With Quote
Old 02-02-2010, 02:59 AM   #32
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
Quote:
Originally Posted by pietvo View Post
Make that:

Code:
\makeatletter
\renewcommand{\@pnumwidth}{3em}
\renewcommand{\@tocrmarg}{4em}
\makeatother
unless it is within a .sty or .cls file.
I found another way to do it... It was hidden deep somewhere in the Memoir documentation (found it on accident as I finally found out how to format my toc...)

Code:
\setpnumwidth{10mm}
\setrmarg{10mm}
Does the trick...

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.
Attached Thumbnails
Click image for larger version

Name:	Mobipocket_-_Origineel.JPG
Views:	271
Size:	228.9 KB
ID:	44791   Click image for larger version

Name:	Mobipocket_-_aangepast.JPG
Views:	269
Size:	255.0 KB
ID:	44792   Click image for larger version

Name:	Epub_-_Aangepast.JPG
Views:	268
Size:	202.8 KB
ID:	44793   Click image for larger version

Name:	PDF_-_Aangepast.JPG
Views:	291
Size:	122.1 KB
ID:	44794  
Sweetpea is offline   Reply With Quote
Advert
Old 02-02-2010, 03:17 PM   #33
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
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?
frabjous is offline   Reply With Quote
Old 02-03-2010, 02:54 AM   #34
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
Quote:
Originally Posted by frabjous View Post
Could you post the code for the table, at least the first part of it?
If I give the last column a width, it will wrap the paragraph.

This is what I had:
Code:
      
\begin{tabular}{ *{2}{l} }
\end{tabular}
And this is what I have now:
Code:
      
\begin{tabular}{  l  p{75mm}  }
\end{tabular}
Sweetpea is offline   Reply With Quote
Old 02-03-2010, 06:27 AM   #35
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
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?
frabjous is offline   Reply With Quote
Advert
Old 02-03-2010, 06:37 AM   #36
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
Posts: 9,707
Karma: 32763414
Join Date: Dec 2008
Location: Krewerd
Device: Pocketbook Inkpad 4 Color; Samsung Galaxy Tab S6
Quote:
Originally Posted by frabjous View Post
That's what I was going to suggest -- so all is well, now?
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!
Sweetpea is offline   Reply With Quote
Old 03-24-2010, 10:41 AM   #37
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
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!
But I wasn't really happy with how it looked, wich meant I had to change my code. While I do have a template which is the basis for my final book.

So, I changed the code of my transformer to:

Code:
\begin{dedication}
Thanks to you all!
\end{dedication}
and added in my template:

Code:
\newenvironment{dedication}
  {\ \\[1cm] \noindent
    \begin{adjustwidth}{1.5em}{1.5em}
  }
  {\end{adjustwidth}}
Now I can change it whenever I want, without having to open Visual Studio...



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.
Sweetpea is offline   Reply With Quote
Old 04-04-2010, 10:26 PM   #38
Goshzilla
Zealot
Goshzilla has a complete set of Star Wars action figures.Goshzilla has a complete set of Star Wars action figures.Goshzilla has a complete set of Star Wars action figures.Goshzilla has a complete set of Star Wars action figures.
 
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.
Goshzilla is offline   Reply With Quote
Old 05-18-2010, 03:05 AM   #39
arma_virumque
Member
arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.
 
Posts: 14
Karma: 82814
Join Date: May 2010
Device: nook
Question 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 pdf has a very neat table of contents that properly linked, cover with picture, the text is centered and its structure preserved. The epub, converted with CALIBRE from pdf is horrible, the table of contents is navigable but won't go to each chapter when I pres enter, EACH page came with the word 'CONTENTS' on top of the page, the poem came in prose, its structure totally mangled, etc.

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
arma_virumque is offline   Reply With Quote
Old 05-18-2010, 04:01 AM   #40
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
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...
Sweetpea is offline   Reply With Quote
Old 05-18-2010, 04:54 AM   #41
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Code:
papersize={4in,6in}
That's wrong. The screen is 6 inches, but that's diagonal, and you're specifying a 6 inch high page, so the page is zoomed out to display on your Nook.

You want to use:

Code:
papersize={9cm,12cm}
or the equivalent in inches (3.5in,4.7in).
Jellby is online now   Reply With Quote
Old 05-18-2010, 06:00 AM   #42
Sweetpea
Grand Sorcerer
Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.Sweetpea ought to be getting tired of karma fortunes by now.
 
Sweetpea's Avatar
 
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...
Sweetpea is offline   Reply With Quote
Old 05-18-2010, 05:07 PM   #43
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
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.
frabjous is offline   Reply With Quote
Old 05-18-2010, 08:21 PM   #44
arma_virumque
Member
arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.arma_virumque can do the Funky Gibbon.
 
Posts: 14
Karma: 82814
Join Date: May 2010
Device: nook
Question 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.
arma_virumque is offline   Reply With Quote
Old 05-19-2010, 12:24 AM   #45
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
Quote:
Originally Posted by arma_virumque View Post
Is there a command line and using vim to edit epubs? I got some epubs from gutenberg project, they look nice.
Not sure if there are special vim plugins for epubs, but an epub is basically just a .zip file (and yes you can unzip it in the normal way) containing xhtml files, any associated images, fonts and CSS, and some xml files containing metadata. Should be easy enough to edit those individual files with vim. Not too hard to reverse engineer, but see this thread for links to tutorials and the technical specs, etc.

Quote:
Sweepea, how do you use a black page with LaTeX?
Put this in the preamble:

\usepackage{xcolor}
\pagecolor{black} % sets background color of whole document
\color{white} % sets color of the text

Quote:
Could you give me an example? I want to try that and narrow down the size of nook's screen.
I'm pretty sure the Nook's screen is indeed 9cm x 12cm. Yes, it looks small on the computer.

Last edited by frabjous; 05-19-2010 at 12:27 AM.
frabjous is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Latex, PDF and the PRS-600 Dictionary s3ntient PDF 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


All times are GMT -4. The time now is 08:01 AM.


MobileRead.com is a privately owned, operated and funded community.