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

LaTeX, eBooks and reflowable PDFs questions

883 views
Skip to first unread message

Merciadri Luca

unread,
Apr 13, 2011, 1:05:52 PM4/13/11
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I know that LaTeX does not generate reflowable PDFs, neither using the
standard latex->dvi2ps->ps2pdf route nor using the pdflatex tool.
However, I've heard that iText (Paulo) and many other tools can modify a
PDF to make it reflowable.

If I understand the whole correctly,
1) if one manages to produce a correctly-sized PDF document (i.e. a
document whose size matches the ebook reader's screen's size), e.g. by
using the geometry package accordingly, there will be no need for a
scaling on the ebook reader, and thus no readibility problem;
2) the major problem is that ebook reader's dimensions are not
standardized. As a result, one cannot produce a `good size PDF;'
3) if one encounters on an ebook reader a PDF whose size does not match
at all the screen size, the PDF will be scaled to some factor, in any
case. If the PDF is reflowable and that the ebook reader's application
supports this, text might be completely rearranged on the ebook reader
so that the reading can still be perceived as smooth and the text hold
on the screen. However, this process might fail;
4) there is no way to make a latex-produced PDF file reflowable by using
a tool on it (e.g. using iText on the PDF file so that it becomes
reflowable). I cannot understand why.

I would be glad to hear your answers. I'm currently writing an article
for TUG11.
- --
Merciadri Luca
See http://www.student.montefiore.ulg.ac.be/~merciadri/
- --

The dog is nude though the clothing cost a penny.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAk2l1/AACgkQM0LLzLt8MhxCSQCgid87hji62AigpH5bcDQOZggZ
txMAmwZe8vFQwVvhsApBxMP0MMJBq463
=0dCq
-----END PGP SIGNATURE-----

Nicola Talbot

unread,
Apr 13, 2011, 1:53:12 PM4/13/11
to
On 13/04/11 18:05, Merciadri Luca wrote:
> I know that LaTeX does not generate reflowable PDFs, neither using the
> standard latex->dvi2ps->ps2pdf route nor using the pdflatex tool.
> However, I've heard that iText (Paulo) and many other tools can modify a
> PDF to make it reflowable.
>
> If I understand the whole correctly,
> 1) if one manages to produce a correctly-sized PDF document (i.e. a
> document whose size matches the ebook reader's screen's size), e.g. by
> using the geometry package accordingly, there will be no need for a
> scaling on the ebook reader, and thus no readibility problem;
> 2) the major problem is that ebook reader's dimensions are not
> standardized. As a result, one cannot produce a `good size PDF;'
> 3) if one encounters on an ebook reader a PDF whose size does not match
> at all the screen size, the PDF will be scaled to some factor, in any
> case. If the PDF is reflowable and that the ebook reader's application
> supports this, text might be completely rearranged on the ebook reader
> so that the reading can still be perceived as smooth and the text hold
> on the screen. However, this process might fail;
> 4) there is no way to make a latex-produced PDF file reflowable by using
> a tool on it (e.g. using iText on the PDF file so that it becomes
> reflowable). I cannot understand why.
>
> I would be glad to hear your answers. I'm currently writing an article
> for TUG11.

There's not just the problem of not having a standard screen size; the
user can change the orientation and the font size. In fact, one of the
benefits of a ebook reader over a printed book for partially sighted
people is that you can change to a very large font. I find that epubs
are much better than pdfs on a reader, both in appearance and also in
efficiency. With epub, if you have a separate html file for each
chapter, only the current chapter needs to be loaded rather than the
entire book.

I generate epub files using latex+tex4ht and either calibre or custom
scripts and just stick to pdf for printed versions. I think a reflowable
PDF would lose the typesetting benefits of using TeX. Ideally you'd need
a reader with a TeX engine that re-typesets the document every time the
user changes the font size or orientation.

Sorry not to be more helpful.

Regards
Nicola Talbot
--
Home: http://theoval.cmp.uea.ac.uk/~nlct/
LaTeX Related Information: http://theoval.cmp.uea.ac.uk/~nlct/latex/
Creating a LaTeX Minimal Example:
http://theoval.cmp.uea.ac.uk/~nlct/latex/minexample/

Robert Heller

unread,
Apr 13, 2011, 2:55:27 PM4/13/11
to
At Wed, 13 Apr 2011 19:05:52 +0200 Merciadri Luca <Luca.Me...@student.ulg.ac.be> wrote:

>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I know that LaTeX does not generate reflowable PDFs, neither using the
> standard latex->dvi2ps->ps2pdf route nor using the pdflatex tool.
> However, I've heard that iText (Paulo) and many other tools can modify a
> PDF to make it reflowable.
>
> If I understand the whole correctly,
> 1) if one manages to produce a correctly-sized PDF document (i.e. a
> document whose size matches the ebook reader's screen's size), e.g. by
> using the geometry package accordingly, there will be no need for a
> scaling on the ebook reader, and thus no readibility problem;
> 2) the major problem is that ebook reader's dimensions are not
> standardized. As a result, one cannot produce a `good size PDF;'
> 3) if one encounters on an ebook reader a PDF whose size does not match
> at all the screen size, the PDF will be scaled to some factor, in any
> case. If the PDF is reflowable and that the ebook reader's application
> supports this, text might be completely rearranged on the ebook reader
> so that the reading can still be perceived as smooth and the text hold
> on the screen. However, this process might fail;
> 4) there is no way to make a latex-produced PDF file reflowable by using
> a tool on it (e.g. using iText on the PDF file so that it becomes
> reflowable). I cannot understand why.

Note: The EPub format is actually XHTML and the tex4ht package can
genenerate XHTML. With a little post-processing the output from tex4ht
can be make into a .epub file. Since an EPub is XHTML, it is not bound
to 'pages' at all and is implicitly reflowed, depending on the e-reader
screen size. I don't which (if any) ebook reader devices handle EPub
files...

(I have created a Makefile and associated helper scripts that does what is
needful to tex4ht output to create a proper EPub file.)

>
> I would be glad to hear your answers. I'm currently writing an article
> for TUG11.
> - --
> Merciadri Luca
> See http://www.student.montefiore.ulg.ac.be/~merciadri/
> - --
>
> The dog is nude though the clothing cost a penny.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
>
> iEYEARECAAYFAk2l1/AACgkQM0LLzLt8MhxCSQCgid87hji62AigpH5bcDQOZggZ
> txMAmwZe8vFQwVvhsApBxMP0MMJBq463
> =0dCq
> -----END PGP SIGNATURE-----
>

--
Robert Heller -- 978-544-6933 / hel...@deepsoft.com
Deepwoods Software -- http://www.deepsoft.com/
() ascii ribbon campaign -- against html e-mail
/\ www.asciiribbon.org -- against proprietary attachments



Merciadri Luca

unread,
Apr 13, 2011, 5:57:48 PM4/13/11
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thanks for both answers. The subject of the TUG11 conference is `LaTeX
and eBooks.' I'm presently writing an article on it, and would be very
happy to share your tricks in order to help people generating `LaTeX
eBooks.'

Could you provide more details? If you are interested, you might have
a look at my article: <http://www.student.montefiore.ulg.ac.be/~merciadri/to_display/tug11_merciadri.pdf>.

EPub is widely used on eBooks readers, apparently:
<http://en.wikipedia.org/wiki/Comparison_of_e-book_formats#EPUB>.

All the best,

The secret of life is not to do what you like, but to like what you do.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAk2mHFoACgkQM0LLzLt8Mhzn3wCdGE+ziZ+O7mkdyID6rwUXn44o
+rcAmwejLHqX9LfeJtuc1+ZpLpctL2AZ
=6g5G
-----END PGP SIGNATURE-----

Peter Flynn

unread,
Apr 13, 2011, 6:08:13 PM4/13/11
to
On 13/04/11 18:05, Merciadri Luca wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I know that LaTeX does not generate reflowable PDFs, neither using the
> standard latex->dvi2ps->ps2pdf route nor using the pdflatex tool.

After the 2008 Cork TUG conference there was a meeting about this and
related topics, and we set up a mailing list to discuss it. It's been
quiet recently...

Those interested are welcome to join at

http://lists.ucc.ie/xml-tex-pdf.html

(Luca, perhaps you could report your message there?)

///Peter

Merciadri Luca

unread,
Apr 14, 2011, 5:38:59 PM4/14/11
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter Flynn <pe...@silmaril.ie> writes:

Once my account will be activated, I'll post the message there too. I
hope it will help. Thanks for the trick, eh.

All the best,

Something is better than nothing.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAk2naXMACgkQM0LLzLt8Mhy9FwCeJKHPDjRo2ZTlQg+KnqJFQRwy
ihUAn0F63qMLcpTMj3iTBxMj7ok++vOA
=Zx34
-----END PGP SIGNATURE-----

Merciadri Luca

unread,
Apr 15, 2011, 6:28:49 PM4/15/11
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Still nothing for the log-in on the XML-TEX-PDF list. :-(

If it's too good to be true, then it probably is.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAk2oxqEACgkQM0LLzLt8MhzBMQCcCXubxQKcQCbztlIutkzT/6m+
CaMAn1OhTSl19K/5Nyss/0+gTQiG5lJT
=4xax
-----END PGP SIGNATURE-----

Peter Flynn

unread,
Apr 15, 2011, 7:08:18 PM4/15/11
to
On 15/04/11 23:28, Merciadri Luca wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Still nothing for the log-in on the XML-TEX-PDF list. :-(

I'm sorry (and to the others who subscribed) -- I was out of the office
for a couple of days, and I had forgotten the list was on subscription
by request instead of being open.

Everyone who joined should have their confirmation now, thanks. All
future requests will get done automatically.

///Peter

Merciadri Luca

unread,
Apr 16, 2011, 5:14:05 PM4/16/11
to
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Peter Flynn <pe...@silmaril.ie> writes:

No problem, Mr. Flynn. Done. I hope I'll get messages soon!

All the best,

If it's worth doing, it's worth over-doing.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>

iEYEARECAAYFAk2qBp0ACgkQM0LLzLt8MhxhKwCfcbCJW4lGHJpXUB5ZnsuTEBzJ
5gQAoI8pdwWgXdrclfpF9iK9GkrPEa2P
=cL7w
-----END PGP SIGNATURE-----

Rasmus Villemoes

unread,
Apr 23, 2011, 2:08:31 PM4/23/11
to
Peter Flynn <pe...@silmaril.ie> writes:

> After the 2008 Cork TUG conference there was a meeting about this
> and related topics, and we set up a mailing list to discuss it. It's
> been quiet recently...
>
> Those interested are welcome to join at
>
> http://lists.ucc.ie/xml-tex-pdf.html
>

Any chance that list could be carried by gmane?

--
Rasmus Villemoes
<http://rasmusvillemoes.dk/>

Peter Flynn

unread,
Apr 23, 2011, 7:38:04 PM4/23/11
to
On 13/04/11 22:57, Merciadri Luca wrote:
> Thanks for both answers. The subject of the TUG11 conference is `LaTeX
> and eBooks.' I'm presently writing an article on it, and would be very
> happy to share your tricks in order to help people generating `LaTeX
> eBooks.'
>
> Could you provide more details? If you are interested, you might have
> a look at my article: <http://www.student.montefiore.ulg.ac.be/~merciadri/to_display/tug11_merciadri.pdf>.
>
> EPub is widely used on eBooks readers, apparently:
> <http://en.wikipedia.org/wiki/Comparison_of_e-book_formats#EPUB>.

There will also be a 2-day session on XML for Publishers at the XML
SummerSchool in Oxford in September (http://xmlsummerschool.org)

///Peter

Peter Flynn

unread,
Apr 23, 2011, 7:45:43 PM4/23/11
to
On 23/04/11 19:08, Rasmus Villemoes wrote:
> Peter Flynn <pe...@silmaril.ie> writes:
>
>> After the 2008 Cork TUG conference there was a meeting about this
>> and related topics, and we set up a mailing list to discuss it. It's
>> been quiet recently...
>>
>> Those interested are welcome to join at
>>
>> http://lists.ucc.ie/xml-tex-pdf.html
>>
>
> Any chance that list could be carried by gmane?

The list archives are currently restricted to members, but if the
current members agree I can easily set them to public.

I am CCing this to the list for comment.

///Peter

Juhapekka Tolvanen

unread,
Nov 20, 2011, 12:29:21 PM11/20/11
to


Merciadri Luca <Luca.Me...@student.ulg.ac.be> writes:

> Thanks for both answers. The subject of the TUG11 conference is `LaTeX and
> eBooks.' I'm presently writing an article on it, and would be very happy to
> share your tricks in order to help people generating `LaTeX eBooks.'

Here is, what I do:

http://iki.fi/juhtolv/tolleharj/

I write the original text (juhtolv_tolle_harjoitukset.txt) in a light-weight
markup language called reStructured Text (aka RST). Then I convert it with
shell script (compileall.sh) to umpteen gazillion formats, including
LaTeX-code and EPUB.

That LaTeX-code is generated twice. One of then is suitable for reading from
the screen and one is suitable for printing on a paper. Both of them are
compiled with XeLaTeX.

Now I can use those templates, scripts etc. to almost any other docs I ever
happen to write.


--
Juhapekka "naula" Tolvanen * http colon slash slash iki dot fi slash juhtolv
"Quidquid Latine dictum sit altum videtur."
0 new messages