Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

LaTeX and ebooks

145 views
Skip to first unread message

Jeff Dege

unread,
Jul 5, 2009, 8:18:20 PM7/5/09
to
If I were planning to write a book using LaTeX, and wanted to publish it
as an ebook, what would my options be?

Are there tools that will output ebook formats, starting with a LaTeX
source? (Note, I'm not looking for a LaTeX ebook style - I need to be
able to publish dvi, ps, pdf, or ebook.)

Or would it be better to work in an XML format like docbook?

--
The function of government is to provide us with service; the function
of the media is to supply the Vaseline.
- Memoirs of Lucille G. Kropotkin

Uwe Ziegenhagen

unread,
Jul 6, 2009, 12:50:51 AM7/6/09
to
Jeff Dege schrieb:

> If I were planning to write a book using LaTeX, and wanted to publish it
> as an ebook, what would my options be?
>
> Are there tools that will output ebook formats, starting with a LaTeX
> source? (Note, I'm not looking for a LaTeX ebook style - I need to be
> able to publish dvi, ps, pdf, or ebook.)
>
> Or would it be better to work in an XML format like docbook?
>

Well, DVI, PS and PDF are inside LaTeX anyway, although I am not sure if
one should call DVI a real output format.

I am pretty sure that converters exist, but you need to specify which
eBook format you want to have.

Uwe

Joris

unread,
Jul 6, 2009, 1:46:24 AM7/6/09
to

It depends on which e-book format. The market leader in e-book
readers, Amazon Kindle, requires a format restricted to reflowable
text, which as far as I know latex is unable to produce.

Best,

J.

Joris

unread,
Jul 6, 2009, 1:48:05 AM7/6/09
to

although it can read/translate html files, so using a latex->html
converter works.

Dave Griffith

unread,
Jul 6, 2009, 4:52:54 AM7/6/09
to
Joris <pin...@gmail.com> wrote:
> On Jul 5, 8:18 pm, Jeff Dege <jd...@jdege.visi.com> wrote:
>> If I were planning to write a book using LaTeX, and wanted to publish it
>> as an ebook, what would my options be?
>>
>> Are there tools that will output ebook formats, starting with a LaTeX
>> source?  (Note, I'm not looking for a LaTeX ebook style - I need to be
>> able to publish dvi, ps, pdf, or ebook.)
>>
>> Or would it be better to work in an XML format like docbook?

> It depends on which e-book format. The market leader in e-book


> readers, Amazon Kindle, requires a format restricted to reflowable
> text, which as far as I know latex is unable to produce.

Since epub is little more than xhtml, I'd say that there's a good chance
that latex can be made to output to that format.

--
David Griffith
dgr...@cs.csbuak.edu <-- Switch the 'b' and 'u'

Dave Griffith

unread,
Jul 6, 2009, 5:50:26 AM7/6/09
to
Joris <pin...@gmail.com> wrote:
> On Jul 5, 8:18 pm, Jeff Dege <jd...@jdege.visi.com> wrote:
>> If I were planning to write a book using LaTeX, and wanted to publish it
>> as an ebook, what would my options be?
[snip]

> It depends on which e-book format. The market leader in e-book
> readers, Amazon Kindle, requires a format restricted to reflowable
> text, which as far as I know latex is unable to produce.

I impatiently poked around with latex2html and with html2epub (found in
the Calibre package) to see what I could do. This seems to produce a
viable epub file. What's really holding things back is a good and
well-maintained means of html output. The latex2html script hasn't been
updated in several years. It appears to require a separate perl script
for each and every package you use in your latex source. Something more
akin to pdflatex would be ideal.

For Debian-ish systems, install the packages: calibre, fbreader, and
latex2html in order to play with this sort of thing. I can see what I
can add to latex2html. Does anyone here have any other ideas?

Joost Kremers

unread,
Jul 6, 2009, 6:45:30 AM7/6/09
to
Dave Griffith wrote:
> For Debian-ish systems, install the packages: calibre, fbreader, and
> latex2html in order to play with this sort of thing. I can see what I
> can add to latex2html. Does anyone here have any other ideas?

tex4ht would probably be a better choice for producing xhtml output. although
sadly its maintainer passed away recently, so unless someone takes on
maintainership, it may not be a long-term solution...


--
Joost Kremers joostk...@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)

Jeff Dege

unread,
Jul 6, 2009, 8:53:55 AM7/6/09
to
On Sun, 05 Jul 2009 22:46:24 -0700, Joris wrote:

> On Jul 5, 8:18 pm, Jeff Dege <jd...@jdege.visi.com> wrote:
>> If I were planning to write a book using LaTeX, and wanted to publish
>> it as an ebook, what would my options be?
>>
>> Are there tools that will output ebook formats, starting with a LaTeX
>> source?  (Note, I'm not looking for a LaTeX ebook style - I need to be
>> able to publish dvi, ps, pdf, or ebook.)
>>
>> Or would it be better to work in an XML format like docbook?
>

> It depends on which e-book format.

It cannot depend upon any particular e-book format, if you want to
maintain the ability to publish in any e-book format.

> The market leader in e-book readers,
> Amazon Kindle, requires a format restricted to reflowable text, which as
> far as I know latex is unable to produce.

So perhaps the better choice is to use DocBook and to generate either
LaTex or the various e-book formats as needed.

Has anyone any experience with generating LaTeX from DocBook? Any
problems with automated indexing, glossaries, cross-referencing?
Problems with displayed math?

--
Quantum materiae materietur marmota monax si marmota monax materiam
possit materiari?


--
I keep meeting people who claim that there is no objective reality,
but I have yet to see one of them step in front of a bus.

Jellby

unread,
Jul 6, 2009, 11:22:25 AM7/6/09
to
Among other things, Jeff Dege saw fit to write:

> If I were planning to write a book using LaTeX, and wanted to publish it
> as an ebook, what would my options be?

You could publish it as a PDF, but beware! not an A4/US-letter sized PDF,
but a PDF sized for the usual screens found in ebook readers, 9x12 cm is a
good size.

If you want other "real" ebook formats, I'd recommend going for ePUB, which
is becoming an industry standard and which is an open standard. ePUB is
basically XHTML plus CSS wrapped in a zip container, with some restrictions
and metadata.

> Are there tools that will output ebook formats, starting with a LaTeX
> source? (Note, I'm not looking for a LaTeX ebook style - I need to be
> able to publish dvi, ps, pdf, or ebook.)

Something that could convert TeX to XHTML would be a starting point.
Probably some things should be tweaked to make the output fit into the
ebook paradigm and the epub restrictions, but it shouldn't be too hard for
someone who knows about it (I have never went into TeX to (X)HTML
conversion, though).

For further discussion about ebooks and formats, have a look at the
MobileRead forums (<http://www.mobileread.com/forums/index.php>), they are
quite active and full of enthusiasts, myself included ;)

--
Ignacio __ Fernᅵndez Galvᅵn
/ /\
Linux user / / \ PGP Pub Key
#289967 / / /\ \ 0x01A95F99
/ / /\ \ \
http://djelibeibi.unex.es
/________\ \ \
jellby \___________\/ yahoo.com

Dave Griffith

unread,
Jul 6, 2009, 3:54:39 PM7/6/09
to
Joost Kremers <joostk...@yahoo.com> wrote:
> Dave Griffith wrote:
>> For Debian-ish systems, install the packages: calibre, fbreader, and
>> latex2html in order to play with this sort of thing. I can see what I
>> can add to latex2html. Does anyone here have any other ideas?

> tex4ht would probably be a better choice for producing xhtml output.
> although sadly its maintainer passed away recently, so unless someone
> takes on maintainership, it may not be a long-term solution...

Thanks for pointing this application out. So far it appears to be
similar enough to pdftex. What would it take to take on maintainership?

Tim Arnold

unread,
Jul 6, 2009, 12:51:30 PM7/6/09
to
"Dave Griffith" <dgr...@cs.csbuak.edu> wrote in message
news:h2shd2$8n4$1...@news.albasani.net...

epub is getting pretty popular these days and calibre can convert to/from
epub and mobipocket.
I've never done it but I've heard you can go from mobipocket to the kindle
format.

For converting from LaTeX to either epub or docbook xml, I use plasTeX. You
can bundle xhtml along with some supplemental files into a zip file
(following the epub format), or if your source is standard "enough" you can
convert latex to docbook and then use a standard converter to get to epub
from there.

I'm using both methods now and they work well, though I've seen some
problems using the Sony Reader on epub files> 5meg.

If you go the plasTeX route, let me know and I'll send you some code for
bundling the result into epub format.
--Tim Arnold
http://plastex.sourceforge.net/

Dave Griffith

unread,
Jul 7, 2009, 4:18:55 AM7/7/09
to
Tim Arnold <tim.a...@sas.com> wrote:
> epub is getting pretty popular these days and calibre can convert
> to/from epub and mobipocket. I've never done it but I've heard you can
> go from mobipocket to the kindle format.

> For converting from LaTeX to either epub or docbook xml, I use plasTeX. You
> can bundle xhtml along with some supplemental files into a zip file
> (following the epub format), or if your source is standard "enough" you can
> convert latex to docbook and then use a standard converter to get to epub
> from there.

Multicolumns and figures side-by-side are troublesome. Also, TeX4ht
doesn't seem to want to do things like Greek or Hebrew letters or
symbols from, say, the marvosym package.

> I'm using both methods now and they work well, though I've seen some
> problems using the Sony Reader on epub files> 5meg.

That sounds like Sony's fault.

> If you go the plasTeX route, let me know and I'll send you some code for
> bundling the result into epub format.

It looks interesting, but for the single task of rendering a document to
html for later processing with html2epub, plasTeX seems like overkill.
We already have LaTeX engines. Why should I ditch my compiled TeX suite
for something in Python, when all I need is a subset of what plasTeX
offers? Please don't take this as an attack. I think what would better
serve the community is to follow the "do a single thing, but do it well"
rule. TeX4ht follows that philosophy the closest. I would like to see
some effort made to pick up and carry the project along. I don't know
how much I can contribute. I certainly cannot do it alone.

Jellby

unread,
Jul 7, 2009, 8:59:22 AM7/7/09
to
Among other things, Tim Arnold saw fit to write:

> I've never done it but I've heard you can go from mobipocket to the kindle
> format.

As far as I know, the Kindle uses mobipocket format (Amazon owns Mobipocket,
after all). The only difference between the Kindle (the .azw files, not the
"topaz" files) format and the standard mobipocket format is the DRM,
DRM-free mobipocket files work on the Kindle without conversion.

But Mobipocket is a quite limited ebook format regarding text formatting,
it's a very basic HTML.

Peter Flynn

unread,
Jul 8, 2009, 5:30:37 PM7/8/09
to
Jeff Dege wrote:
> If I were planning to write a book using LaTeX, and wanted to publish it
> as an ebook, what would my options be?
>
> Are there tools that will output ebook formats, starting with a LaTeX
> source? (Note, I'm not looking for a LaTeX ebook style - I need to be
> able to publish dvi, ps, pdf, or ebook.)
>
> Or would it be better to work in an XML format like docbook?

IMHO, definitely. Although DocBook is designed for computing
documentation, it can be used for similar technical topics. Otherwise
look at TEI or one of the standard publishers formats for markup more
suited to non-computing topics.

The advantage of XML is that in conjunction with XSLT it allows very
fine-grained transformations to other formats, letting you generate the
various ebook formats as well as LaTeX source for decent PDFs and all
varieties of HTML.

///Peter

Andrew

unread,
Jul 9, 2009, 4:18:48 AM7/9/09
to
On 6 July, 01:18, Jeff Dege <jd...@jdege.visi.com> wrote:
> If I were planning to write a book using LaTeX, and wanted to publish it
> as an ebook, what would my options be?
>
> Are there tools that will output ebook formats, starting with a LaTeX
> source?  

I would use LaTeX and convert to HTML using Hevea. IMHO this is much
better than latex2html. See http://www.ciaranmchale.com/corba-explained-simply
for an exmaple online book that has been done this way.

Regards,

Andrew Marlow


Joost Kremers

unread,
Jul 13, 2009, 12:12:53 PM7/13/09
to
Dave Griffith wrote:
> Joost Kremers <joostk...@yahoo.com> wrote:
[texh4t]

> Thanks for pointing this application out. So far it appears to be
> similar enough to pdftex. What would it take to take on maintainership?

well, the easiest way would be to pull in the sources and just continue working
on it. but probably it would be best to post here and perhaps in some other tex
forums and ask if people are already working on it or are interested in taking
it up.

0 new messages