[Dev-luatex] Q: Can LuaTeX produce xdv?

Martin Schröder martin at oneiros.de
Sun Jan 4 13:01:10 CET 2009

2009/1/4 Jonathan Fine <jfine at pytex.org>:
> Martin Schröder wrote:
>> 2009/1/2 Jonathan Fine <jfine at pytex.org>:
>>> Please could I be told, what are the main benefits of directly producing
>>> PDF?
>> Reasoning about and manipulating included PDFs. This is much harder
>> with a two-pass engine like XeTeX + postprocessor; as an example
>> compare the knowledge of XeTeX (the program) and pdfTeX about included
>> PDFs.
> I'm sorry, but I don't understand.

I think you do. :-)

> I'll invent an example (so it's not really an example).  We wish to resize
> an image to fit the measure, but if it's a bitmap image we want to  choose a
> scaling factor that works well with our planned output device.  Here's
> another.  We want to know if the image contains colour, because if it does
> it should appear in the colour plates section.
> In both cases we have to open the image file and, as you say, reason about
> it.  Based on this reasoning we come to a conclusion (such as a scale
> factor) and both 9a) typeset the text and (b) process the image accordingly.
> LuaTeX does (a) and (b) at the same time.  I see no reason why a 'special'
> that says 'do (b)' should not be written to the xdv or whatever output file.

A special makes that harder; it needs more code. The backend needs the
code for reasoning about the image anyway; now the frontend also needs
it. You're duplicating code. And you need code for the two parts to
communicate. More code means more errors.

Consider this example: I want to include PDFs with layers and want to
mix layers generated by the document with layers from the PDFs,
controlled by the document. This might be doable in two passes, but it
is much easier in one pass.

> [Discussion of performance snipped]
>> But as I said: Show us your code.
> Well, it's not MY code, but I'm sure you're welcome to use it:

You don't understand, so I'll be more clear: Shut up and code! :-)
You seem to be the only one here interested in this mythical
luatex + xdv, so why don't you SHOW us what it can do better?

I can see only ONE benefit from your mythical xdv: interchangable
backends. But I don't think the team finds *dvipdfm* so much more
interesting than luaTeX.


More information about the dev-luatex mailing list