# [NTG-pdftex] Extensions: \pdf\$foo or \\$foo?

Hans Hagen pragma at wxs.nl
Sat Jul 2 16:36:39 CEST 2005

```Heiko Oberdiek wrote:
> On Fri, Jul 01, 2005 at 04:13:59PM +0200, Hans Hagen wrote:
>
>
>>> Some package (hyperref, ...) uses the new primitive:
>>> \match{...}{...}
>>> ==> Document fails with: Use of \match doesn't match its definition.
>>
>>so, for latex the solution would be (in the latex specific initialization
>>file):
>>
>>\let\pdfmatch\match \let\match\undefined
>>
>>That way you get (1) a prefix (one that will not clash with other prefixes)
>>and (2) we keep tex prefix-clean
>
>
> But then a package doesn't know, whether there is a special format
> that remaps the primitives. First it must guess the name of the
> primitive, before using it. And there are packages that work with
> different formats (eg. plain and latex). Thus this way does not
> provide a reliable solution.

it depends, if you have a (latex) convention that the prefix is \pdf then it can
test for

\ifx\pdfmatch\undefined ...

etc. Since latex packages work for latex only it will not hurt anything outside
that scope.

Hans

-----------------------------------------------------------------