08-31-2009, 11:05 AM | #1 |
frumious Bandersnatch
Posts: 7,522
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Suggestion: export to LaTeX
I was trying to find a way to convert (X)HTML+CSS to LaTeX, and couldn't find anything... so I wonder if it could be possible to add LaTeX export functionality to calibre, since it can already read, manage, flatten, etc. (X)HTML+CSS.
The idea is to make it easier to generate good-looking PDFs from other ebook formats, using LaTeX's typographic strengths. Using other features of LaTeX, like cross-referencing, sectioning commands, etc. would be secondary, the primary goal I have in mind is replicating (more or less) the look of the page. This means I would rather translate <h1>Title</h1> as {\Huge\textbf{Title}}, and not as \chapter{Title}. |
08-31-2009, 11:23 AM | #2 |
creator of calibre
Posts: 44,161
Karma: 22670164
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
calibre already has a PDF output plugin. Is that not suitable for your needs?
|
Advert | |
|
08-31-2009, 12:02 PM | #3 | |
frumious Bandersnatch
Posts: 7,522
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
I was after a way to calm down typography zealots (and I'm sometimes one of them), so either exporting to LaTeX or using advanced features (good h&j algorithm, ligatures, character protrusion...) would be needed. In other words, while we wait for better typography being implemented in reading software, I thought I could try using LaTeX to convert other ebook formats to PDF as an alternative to distributing the pre-made PDFs. |
|
08-31-2009, 02:51 PM | #4 |
creator of calibre
Posts: 44,161
Karma: 22670164
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Ah, I see. Frankly, typography zealots aren't important enough to me But I'm always willing to help someone get started on something like this.
|
08-31-2009, 03:11 PM | #5 | |
Wizard
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
|
Quote:
Good luck, Jellby... though I am not clear I understand what you are trying to do... ePub --> LaTeX conversion, or something as such? - Ahi |
|
Advert | |
|
08-31-2009, 03:42 PM | #6 |
creator of calibre
Posts: 44,161
Karma: 22670164
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
|
08-31-2009, 03:43 PM | #7 | |
frumious Bandersnatch
Posts: 7,522
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
I mentioned that in another thread, I was thinking of using LaTeX's typographic abilities for rendering ePUB. One would distribute ePUBs and the users who want to can get a good quality PDF customized for his screen size and font preferences. Actually, something like what Feedbooks does. |
|
08-31-2009, 03:46 PM | #8 |
frumious Bandersnatch
Posts: 7,522
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
What would be needed? I don't think I can develop a python plugin, but if it's editing a template or something like that (like calibre translations) I can try something.
|
08-31-2009, 03:56 PM | #9 |
creator of calibre
Posts: 44,161
Karma: 22670164
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I'm afraid it does require python code. Basically all that's needed is to run through the HTML and output corresponding LaTeX (calibre will already have taken care of parsing/flattening the CSS).
|
08-31-2009, 04:07 PM | #10 |
Sir Penguin of Edinburgh
Posts: 12,375
Karma: 23555235
Join Date: Apr 2007
Location: DC Metro area
Device: Shake a stick plus 1
|
|
08-31-2009, 07:42 PM | #11 |
Sigil & calibre developer
Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
LaTeX, a way to PDF | Sweetpea | Workshop | 62 | 05-22-2010 10:00 PM |
LaTeX style for the Iliad | sigi | iRex | 4 | 05-20-2010 01:37 PM |
Convert LaTeX into Mobi? | ultimatebuster | Kindle Formats | 1 | 12-31-2009 03:03 PM |
Add a LaTeX Tag | Nathan Campos | Feedback | 0 | 12-31-2009 02:47 PM |
I want to be your latex salesman!!!! | latexsalesman | Introduce Yourself | 4 | 01-10-2009 12:20 PM |