# [NTG-pdftex] images in formats

David Kastrup dak at gnu.org
Wed Jun 27 14:13:26 CEST 2007

"Martin Schröder" <martin at oneiros.de> writes:

> 2007/6/27, David Kastrup <dak at gnu.org>:
>> Taco Hoekwater <taco at elvenkind.com> writes:
>> > A very quick, fast, and non-crashing solution is to disable setting
>> > \pdfoutput to non-zero in initex mode :-)
>
> No, because that get's dumped and the pdf*-formats (like
> pdflatex.ini) set it.

My experience from the time when there was a pdftex.cfg around was
that this overrode the value of \pdfoutput in the dumped format.  Is
this still similar, or has this changed.

>> > So, that leaves two options: bluntly disabling \pdfrefximage
>> > et.al.  in ini mode, or adding dump/undump code for those
>> > arrays. It would not be a very invasive patch, and that has my
>> > preference.
>> >
>> > What do you think?
>
> That's exactly what I propose to do: Disable \pdfximage and other
> commands (like \pdfxform and \pdfobj) that cause problems in ini
> mode.
>
>> So it is is feasible, my vote would be on dumping the required arrays.
>
> It's not easily done; a patch would be welcomed, but be warned that
> this is _hard_.

I would not volunteer for further patches until I have managed to find
the time to do the already promised ones.  I was not sure what
solution Taco had been referring to with his "not be a very invasive
patch" comment above.  It sounded like dump/undump, and if that would
be feasible, I still think it the best idea not to make iniTeX less
capable than necessary.

For example, preview-latex uses mylatex.ltx to dump the state of the
TeX at \begin{document} time.  Not allowing any image references (like
in \savebox commands) before that point of time is a rather brutal
restriction.

> And I seriously doubt that luaTeX needs it.

Actually, the current "dump core if hyphenation in iniTeX is
attempted" inheritage from Aleph is likely even worse as an iniTeX
restriction.  But this is IIRC slated to get fixed (doing hyphenation
on utf-8 rather than ucs-16 might help).  And the image problem is a
similar ball park concerning its undesirability.

Again: the \AtBeginDvi command was added to LaTeX precisely in order
to conserve pretypeset stuff that would otherwise get lost at a format
dump.

--
David Kastrup