latex3 / hyperref

Hypertext support for LaTeX
168 stars 37 forks source link

hyperref pdfcreator #53

Closed ghost closed 6 years ago

ghost commented 6 years ago

Could you please consider changing line 7021 in the file hyperref.dtx from

\def\@pdfcreator{LaTeX with hyperref package}

to

\let\@pdfcreator\relax

Like what you said yourself in tex-xet/bidi#60 the pdfinfo metadata should not be forced by a package.

davidcarlisle commented 6 years ago

It would need to be empty rather than \relax I think.

The situation with hyperref is a bit different as without hyperref latex doesn't really "know" about pdf at all so there are no sensible defaults set. If you use pdftex it gets set to tex, if you use xetlatex or latex, then it gets set to whatever your dvi to pdf pipeline ends up setting it to.

that said you are of course right that just setting it (even with an option to set it to something else using pdfcreator option as defined below) is not really a great precedent for packages to follow.

Currently hyperref has

\def\@pdfcreator{LaTeX with hyperref package}

\define@key{Hyp}{pdfcreator}{% \HyXeTeX@CheckUnicode \HyPsd@XeTeXBigCharstrue \HyPsd@PrerenderUnicode{#1}% \pdfstringdef\@pdfcreator{#1}% }

I think perhaps what might be best is changing the initial setting from

LaTeX with hyperref package

to

LaTeX with hyperref

Then making a modified version of the above that appends to the existing text rather than over-writing it, say

\define@key{Hyp}{addtopdfcreator}{% \HyXeTeX@CheckUnicode \HyPsd@XeTeXBigCharstrue \HyPsd@PrerenderUnicode{#1}% \pdfstringdef\@pdfcreator{\@pdfcreator, #1}% } \def\@pdfcreator{LaTeX with hyperref}

Then bidi (or any other package) could add to this without trampling on other packages something like

\hypersetup{addtopdfcreator=bidi}

which produces pdfinfo

Creator: LaTeX with hyperref, bidi Producer: XeTeX 0.99998 CreationDate: Sun Jan 28 10:32:45 2018 GMT

I think it would be perfectly OK for bidi to always do that (unlike the printed page where an ever growing list of packages would be a real intrusion, I don't think that is an issue with the internal meta data. and so a mechanism for packages to advertise themselves this way should work I think?

I think this would be better than latex automatically building he package list, \listfiles is good for debugging but you wouldn't want every internal package listed in this list (eg graphicx, loading graphics, keyval, trig)

On 28 January 2018 at 03:18, vafa notifications@github.com wrote:

Could you please consider changing line 7021 in the file hyperref.dtx from

\def\@pdfcreator{LaTeX with hyperref package}

to

\let\@pdfcreator\relax

Like what you said yourself in tex-xet/bidi#60 https://github.com/tex-xet/bidi/issues/60 the pdfinfo metadata should not be forced by a package.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ho-tex/hyperref/issues/53, or mute the thread https://github.com/notifications/unsubscribe-auth/ABNcAil7q7PlIrgV4ngjGsN0-MUqSJM3ks5tO-btgaJpZM4RvjDK .