[NTG-pdftex] \pdfprimitive

Heiko Oberdiek oberdiek at uni-freiburg.de
Sun Apr 8 10:56:50 CEST 2007

On Sat, Apr 07, 2007 at 02:12:40PM +0100, Philip & Le Khanh wrote:

> Yes, that was the decision we took with e-TeX, and
> I do not think that with the benefit of hindsight
> the decision was a mistaken one. All you are doing
> by using a "pdf" prefix is /reducing/ the chances
> of a namespace clash, not eliminating the possibility.

No, it's more, it avoids future name clashes:
If a macro author avoids the name space of macro names
starting with the "pdf" prefix, then he is not bothered
by new primitives.
  Of course it does not prevent conflicts with
old macro code. Hyperref's \pdfbookmark is a prominent
example. Luckily pdfTeX named its primitive \pdfoutline.

> But I am not against the idea of a prefix per se;
> I am more concerned that the choice of "pdf" as
> the prefix for functionality that has nothing
> to do with PDF can only mislead the innocent user.

Also keep in mind, that names consisting of words,
not protected by prefixes or special characters
("@" in LaTeX) interfere with user land macro names.
Primitives are seldom intended to be used in user land
directly. Most are hidden inside higher level markup
macros (LaTeX, ConTeXt, ...). If an "innocent" user
deals with these primitives directly, he left his

Some time ago there was also a discussion about prefix
names. The costs for a new prefix for stuff that is useful
also for DVI mode are high:
* Inconsistency if some macros have the new prefix,
  others not. And the "cosmetic" naming problem remains.
* Or severe compatibility problems, if primitives are
  renamed that exist for a long time.

Yours sincerely
  Heiko <oberdiek at uni-freiburg.de>

More information about the ntg-pdftex mailing list