[latex3-commits] [git/LaTeX3-latex3-pdfresources] reworking-annot: some note about begin hook (7478978)
Ulrike Fischer
fischer at troubleshooting-tex.de
Tue Feb 2 00:18:06 CET 2021
Repository : https://github.com/latex3/pdfresources
On branch : reworking-annot
Link : https://github.com/latex3/pdfresources/commit/74789784c9f74d7c5c2ab474b3508f4e67705bc5
>---------------------------------------------------------------
commit 74789784c9f74d7c5c2ab474b3508f4e67705bc5
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Tue Feb 2 00:18:06 2021 +0100
some note about begin hook
>---------------------------------------------------------------
74789784c9f74d7c5c2ab474b3508f4e67705bc5
info/key-list.tex | 271 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 271 insertions(+)
diff --git a/info/key-list.tex b/info/key-list.tex
index 5d8ab08..dfd7221 100644
--- a/info/key-list.tex
+++ b/info/key-list.tex
@@ -123,3 +123,274 @@ done & verbose & \textit{false} & be chatty \\
\textbf{Missing keys in docu}\\
done & pdflinkmargin &
\end{longtable}
+
+hyperxmp keys:
+
+pdfcopyright
+pdftype (Text)
+pdflicenseurl
+pdfauthortitle
+pdfcaptionwriter
+pdfmetalang
+
+pdfapart (number)
+pdfaconformance
+pdfuapart (number)
+
+pdfxstandard (X-standard)
+pdfsource (jobname.tex)
+
+pdfdocumentid
+pdfinstanceid
+pdfversionid
+
+pdfrendition (draft/default)
+pdfpublication
+pdfpubtype
+pdfbytes
+pdfnumpages
+pdfissn
+pdfeissn
+pdfisbn
+pdfbookedition
+pdfpublisher
+pdfvolumenum
+pdfissuenum
+pdfpagerange
+pdfdoi
+pdfurl
+pdfidentifier
+pdfsubtitle
+pdfpubstatus
+pdfcontactaddress
+pdfcontactcity
+pdfcontactregion
+pdfcontactpostcode
+pdfcontactcountry
+pdfcontactphone
+pdfcontactemail
+pdfcontacturl
+
+pdfdate -> \@pdfdatetime
+pdfmetadate -> \@pdfmetadatetime
+
+keeppdfinfo
+
+
+Also info keys:
+
+pdfauthor -> patched?
+pdfkeywords
+
+
+% begin document hook
+Can go is true
+\Hy at AtBeginDocument{%
+ \ifx\HyPsd at LoadUnicode\relax
+ \else
+ \def\HyPsd at LoadUnicode{%
+ \Hy at Error{%
+ Unicode support for bookmarks is not available.\MessageBreak
+ Activate unicode support by using one of the options\MessageBreak
+ `unicode', `pdfencoding=unicode', `pdfencoding=auto'\MessageBreak
+ in the preamble%
+ }\@ehc
+ \global\let\HyPsd at LoadUnicode\relax
+ \global\Hy at unicodefalse
+ \global\let\Hy at unicodetrue\Hy at unicodefalse
+ }%
+ \fi
+}
+
+Can imho go
+\Hy at AtBeginDocument{%
+ \@ifpackageloaded{stringenc}{%
+ \let\HyPsd at LoadStringEnc\relax
+ }{%
+ \def\HyPsd at LoadStringEnc{%
+ \Hy at WarningNoLine{%
+ Missing package `stringenc'. Use `pdfencoding=auto'\MessageBreak
+ in the preamble or load the package there%
+ }%
+ }%
+ }%
+}
+
+Can go
+\Hy at AtBeginDocument{%
+ \begingroup
+ \@ifundefined{OBJ at OCG@view}{%
+ \ifHy at ocgcolorlinks
+ \Hy at Warning{%
+ Driver does not support `ocgcolorlinks',\MessageBreak
+ using `colorlinks' instead%
+ }%
+ \fi
+ }{}%
+ \endgroup
+}
+can go, only used in two other drivers
+\Hy at AtBeginDocument{%
+ \begingroup
+ \edef\x{\@ifundefined{stockheight}\paperheight\stockheight}%
+ \dimen@=\x\relax
+ \ifdim\dimen@>\z@
+ \else
+ \dimen@=11in\relax
+ \Hy at WarningNoLine{%
+ Height of page (\expandafter\string\x) %
+ is invalid (\the\x),\MessageBreak
+ using 11in%
+ }%
+ \fi
+ \dimen@=0.99626401\dimen@
+ \xdef\Hy at pageheight{\strip at pt\dimen@}%
+ \endgroup
+}
+
+% can be donne with package hook:
+\ltx at IfUndefined{xspaceaddexceptions}{%
+ \Hy at AtBeginDocument{%
+ \ltx at IfUndefined{xspaceaddexceptions}{%
+ }{%
+ \def\Hy at xspace@end{%
+ \ltx at gobble{end for xspace}%
+ }%
+ \xspaceaddexceptions{%
+ \Hy at xspace@end,\hyper at linkend,\hyper at anchorend
+ }%
+ }%
+ }%
+}{%
+ \def\Hy at xspace@end{%
+ \ltx at gobble{end for xspace}%
+ }%
+ \xspaceaddexceptions{\Hy at xspace@end,\hyper at linkend,\hyper at anchorend}%
+}
+
+%needed
+% draft option
+\Hy at AtBeginDocument{%
+ \ifHy at draft
+ \let\hyper@@anchor\@gobble
+ \gdef\hyper at link#1#2#3{#3\Hy at xspace@end}%
+ \def\hyper at anchorstart#1#2{#2\Hy at xspace@end}%
+ \def\hyper at anchorend{\Hy at xspace@end}%
+ \let\hyper at linkstart\@gobbletwo
+ \def\hyper at linkend{\Hy at xspace@end}%
+ \def\hyper at linkurl#1#2{#1\Hy at xspace@end}%
+ \def\hyper at linkfile#1#2#3{#1\Hy at xspace@end}%
+ \def\hyper at link@[#1]#2#3#4{#4\Hy at xspace@end}%
+ \def\Acrobatmenu#1#2{\leavevmode#2\Hy at xspace@end}%
+ \let\PDF at SetupDoc\@empty
+ \let\PDF at FinishDoc\@empty
+ \let\@fifthoffive\@secondoftwo
+ \let\@secondoffive\@secondoftwo
+ \let\ReadBookmarks\relax
+ \let\WriteBookmarks\relax
+ \Hy at WarningNoLine{Draft mode on}%
+ \fi
+ \Hy at DisableOption{draft}%
+ \Hy at DisableOption{nolinks}%
+ \Hy at DisableOption{final}%
+}
+
+%probably unneeded
+ \def\MaybeStopEarly{%
+ \Hy at Message{Stopped early}%
+ \Hy at AtBeginDocument{%
+ \PDF at FinishDoc
+ \gdef\PDF at FinishDoc{}%
+ }%
+ \endinput
+ }%
+
+ This is probably needed:
+ (perhaps color is needed too ...)
+ \Hy at CatcodeWrapper{%
+ \RequirePackage{nameref}[2012/07/28]%
+ }%
+ \fi
+ \fi
+ \DeclareRobustCommand\ref{%
+ \@ifstar\@refstar\T at ref
+ }%
+ \DeclareRobustCommand\pageref{%
+ \@ifstar\@pagerefstar\T at pageref
+ }%
+ \DeclareRobustCommand*{\nameref}{%
+ \@ifstar\@namerefstar\T at nameref
+ }%
+ \ifHy at implicit
+ \else
+ \let \@pagerefstar\T at pageref
+ \let \@refstar\T at ref
+ \let \@namerefstar\T at nameref
+ \fi
+}
+
+ \Hy at CatcodeWrapper\ReadBookmarks ???
+
+\PDF at SetupDoc
+
+\hyper at anchorstart{Doc-Start}\hyper at anchorend
+
+
+\Hy at AtBeginDocument{%
+ \if at filesw
+ \ifHy at typexml
+ \immediate\closeout\@mainaux
+ \immediate\openout\@mainaux\jobname.aux\relax
+ \immediate\write\@auxout{<relaxxml>\relax}%
+ \fi
+ \immediate\write\@auxout{%
+ \string\providecommand\string\HyperFirstAtBeginDocument{%
+ \string\AtBeginDocument}^^J%
+ \string\HyperFirstAtBeginDocument{%
+ \string\ifx\string\hyper at anchor\string\@undefined^^J%
+ \string\global\string\let\string\oldcontentsline\string\contentsline^^J%
+ \string\gdef\string\contentsline%
+ \string#1\string#2\string#3\string#4{%
+ \string\oldcontentsline%
+ {\string#1}{\string#2}{\string#3}}^^J%
+ \string\global\string\let\string\oldnewlabel\string\newlabel^^J%
+ \string\gdef\string\newlabel\string#1\string#2{%
+ \string\newlabelxx{\string#1}\string#2}^^J%
+ \string\gdef\string\newlabelxx%
+ \string#1\string#2\string#3\string#4\string#5\string#6{%
+ \string\oldnewlabel{\string#1}{{\string#2}{\string#3}}}^^J%
+ \string\AtEndDocument{%
+ \string\ifx\string\hyper at anchor\string\@undefined^^J%
+ \string\let\string\contentsline\string\oldcontentsline^^J%
+ \string\let\string\newlabel\string\oldnewlabel^^J%
+ \string\fi%
+ }^^J%
+ \string\fi%
+ }^^J%
+ \string\global\string\let\string\hyper at last\relax^^J%
+ \string\gdef\string\HyperFirstAtBeginDocument\string#1{\string#1}%
+ }%
+ \fi
+ \let\HyperFirstAtBeginDocument\ltx at firstofone
+ \ifx\hyper at last\@undefined
+ \def\@starttoc#1{%
+ \begingroup
+ \makeatletter
+ \ltx at ifpackageloaded{parskip}{\parskip\z@}{}%
+ \IfFileExists{\jobname.#1}{%
+ \Hy at WarningNoLine{%
+ old #1 file detected, not used; run LaTeX again%
+ }%
+ }{}%
+ \if at filesw
+ \expandafter\newwrite\csname tf@#1\endcsname
+ \immediate\openout\csname tf@#1\endcsname \jobname.#1\relax
+ \fi
+ \@nobreakfalse
+ \endgroup
+ }%
+ \def\newlabel#1#2{\@newl at bel r{#1}{#2{}{}{}{}}}%
+ \fi
+}
+Hy at AtEndOfPackage
+- driver test (unneeded?)
\ No newline at end of file
More information about the latex3-commits
mailing list.