caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Oliver Bandel <oliver@first.in-berlin.de>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Basic typesetting
Date: Mon, 29 Oct 2007 09:52:03 +0100	[thread overview]
Message-ID: <1193647923.47259f33216af@webmail.in-berlin.de> (raw)
In-Reply-To: <86fxzuykzd.fsf@Llea.celt.neu>

Zitat von michael.le_barbier@laposte.net:
[...]
> So if you use a typesetting engine as a backend to typeset text, you
> have three ways to know the size of an object:
>   1. ask the engine;
>   2. examine the engine's output;
>   3. reimplement the engine's algorithms.
> You do not seriously consider 3. as an option, do you?
[...]

One can ask Ghostscript (gs) for the bounding box.

I think it was something like

$ gs -sDEVICE=bbox mypsfile.ps

and this should also work with pdf-files.

But then you get the bounding-box of the whole file.
So you have to use this way for each construct of
your page, what IMHO makes no sense.

But if you need this only occasionally, it might make sense.

I don't know the "fop" that was mentioned, but I
gs is about 5 MB big executable, and it's an interpreter.
But it's not written in Java, maybe it's faster and lighter
than the "fop" ;-)

Ciao,
   Oliver

P.S.: Or make a server as a wrapper around gs, so you do
      not have to restart it again and again ;-)
      But as far as I know, some TeX-Implementations are
      in work, that are running as a formatting-daemon.
      So, this might be also a way to make efficient typesetting.
      But if it's only for one single page, using gs by hand,
      invoked from the shell might be ok ;-)


  reply	other threads:[~2007-10-29  8:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-28 14:14 Matthieu Dubuget
2007-10-28 17:13 ` [Caml-list] " Oliver Bandel
2007-10-28 20:28   ` Matthieu Dubuget
2007-10-28 21:42     ` michael.le_barbier
2007-10-29  8:52       ` Oliver Bandel [this message]
2007-10-30 15:43         ` Matthieu Dubuget
2007-10-30 17:43           ` Jon Harrop

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1193647923.47259f33216af@webmail.in-berlin.de \
    --to=oliver@first.in-berlin.de \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).