View Single Post
Old 09-11-2009, 12:04 PM   #15
ahi
Wizard
ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.ahi ought to be getting tired of karma fortunes by now.
 
Posts: 1,790
Karma: 507333
Join Date: May 2009
Device: none
Quote:
Originally Posted by kovidgoyal View Post
Just a couple of notes:

1) All of LaTeXs (actually TeXs) layout algorithms are designed for a fixed page size. Now while in theory this should not be a problem, as you can pass in the page size at compile time, in practice almost all LaTeX macro packages make certain assumptions about minimum page size. Just one example: The RevTeX package used for formatting of articles to be submitted to the Physical Review Journals format the abstract assuming a large page size. Just try using the geometry package with a revtex file.
This part is addressed by the assumption that the source is one prepared by somebody that knows what they are doing... and is aware of the intended use of the files.

To be clear, the HTML -> LaTeX discussion is an entirely separate one. No automatic conversion can generate a file that's ready for multi-layout targeted distribution.

Quote:
Originally Posted by kovidgoyal View Post

2) TeX (as opposed to HTML) is designed for multi-pass compiling. This is poses two problems:

a) Your hypothetical latex viewer will have to figure out how many times to run pdflatex on the source, not an easy task, witness the number of build systems for LaTeX

b) This will be really, really slow compared to laying out a reflowable format
Personally I do not believe in the merit of trying to use TeX source directly on an eBook reading device... but, like you, I do not wish to discourage others.

Quote:
Originally Posted by kovidgoyal View Post

3) Packaging a TeX distribution is no trivial task and the smallest Text distributions I've ever come across are still pretty large
This seems to be a misunderstanding. Packaging in the context of anything I myself wrote refers to basically shoving the .tex source file, along with whatever dependencies have been determined, into a .zip (or other) container... so you have a single file, instead of a bunch of them.

Kind of like ePub is for HTML+CSS+METADATA.

Perhaps I've used the term "package" / "packaging" confusingly.

Quote:
Originally Posted by kovidgoyal View Post

4) The real improvements of formatting something using TeX come when you either position things by hand or write special purpose algorithms. Positioning things by hand is out in a reflowable context and writing custom algorithms in TeX is a nightmare, believe me, I've done it.
The main idea is something around the lines of inserting conditional manual adjustments throughout the LaTeX source that activate only for certain (popular) page size / font size combinations. And for any unanticipated combinations, there are tricks (like \sloppy) that can generate a tolerable, if lesser quality, output even still.

The key, of course, will be to test a reasonably large number of sizes... and also to accept the fact that the smaller the screen, the less strict LaTeX must be allowed to be.

Quote:
Originally Posted by kovidgoyal View Post
All in all, I doubt this will work. But don't let me discourage you from trying
Thanks!

- Ahi
ahi is offline   Reply With Quote