Choice of processor
Joseph Wright
joseph at texdev.net
Mon Mar 3 14:24:45 CET 2025
On 03/03/2025 13:15, Philip Taylor wrote:
> I am not unwilling to give LuaTeX a go, but I am unable to find the
> LuaTeX equivalent of XeTeX's \XeTeXpdffile and \XeTeXpicfile, of both of
> which I make enormous use. Luatex.pdf makes reference to "the pdfe
> library", but I could find nothing therein which would allow the simple
> inclusion of a PDF (or image) file. Can you (or anyone else) advise how
> this is accomplished using LuaTeX ?
Image inclusion for LuaTeX works the same as for pdfTeX, it's just that
the primitives are given different, more descriptive names. Basically,
you load an image using \immediate\saveimageresource, then can use it
using \useimageresource. (In pdfTeX the primitives are called \pdfximage
and \pdfrefximage, but work exactly the same.) This is all there in
luatex.def, where you can see how a bit of work is done to load each
image only once even if it's reused - saves resources overall.
Joseph
More information about the texhax
mailing list.