[latex3-commits] [git/LaTeX3-latex3-pdfresources] testlinkstuff: removed bookmark code, outdated keys (ad0ed0b)
Ulrike Fischer
fischer at troubleshooting-tex.de
Sun Apr 7 22:44:52 CEST 2019
Repository : https://github.com/latex3/pdfresources
On branch : testlinkstuff
Link : https://github.com/latex3/pdfresources/commit/ad0ed0bc34abb20036777176bd2ee384595641c9
>---------------------------------------------------------------
commit ad0ed0bc34abb20036777176bd2ee384595641c9
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Sun Apr 7 22:44:52 2019 +0200
removed bookmark code, outdated keys
>---------------------------------------------------------------
ad0ed0bc34abb20036777176bd2ee384595641c9
hluatex-experimental.def | 301 ++++++++--------------------------------------
1 file changed, 49 insertions(+), 252 deletions(-)
diff --git a/hluatex-experimental.def b/hluatex-experimental.def
index 5465ba8..bc49024 100644
--- a/hluatex-experimental.def
+++ b/hluatex-experimental.def
@@ -6,13 +6,30 @@
%%
\ProvidesFile{hluatex-experimental.def}
- [2019/04/06 v0.2 %
+ [2019/04/07 v0.2 %
Hyperref driver for luaTeX]
%%\Hy at VersionCheck{hluatex.def}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% variants of hyperref commands to get attributes in the prop
\RequirePackage{xparse}
\ExplSyntaxOn
+%% messages, should later (with more drivers) go somewhere more generic ...
+\prop_gput:Nnn \g_msg_module_name_prop { hyp }{ hyperref }
+\msg_new:nnn
+ {hyp}
+ {missing-bookmark-package}
+ { The~bookmark~package~is~required~for~this~hyperref~driver!}
+%% I'm require the bookmark package to get rid of some of the bookmarks code.
+\AtEndOfPackage{% so that we are later than KOMA ...
+\AtBeginDocument
+ {
+ \ltx at ifpackageloaded{bookmark}
+ {}
+ {\msg_error:nn {hyp}{missing-bookmark-package}}
+ }}
+
+%these are commands to fill various attributes (color, border style) in
+% the hooks for links.
\def\Hy at EXPsetpdfborder
{
\clist_map_inline:nn { url , file , run , link}
@@ -130,8 +147,9 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ExplSyntaxOn
+% catalog mapped to expl3 command
\pdf at ifdraftmode{%
- \let\Hy at PutCatalog\ltx at gobble
+ \let\Hy at PutCatalog \use_none:n
}{%
\let\Hy at PutCatalog \driver_pdf_catalog:n
}
@@ -815,37 +833,18 @@
\Hy at RemoveDurPageAttr#1#4\END
\fi
}
-\def\hyper at pagehidden{%
- \ifHy at useHidKey
- \expandafter
- \Hy at RemoveHidPageAttr\the\pdfpageattr^^J/Hid{} \END
- \ifHy at pdfpagehidden
- \edef\@processme{%
- \global\pdfpageattr{%
- \the\pdfpageattr
- ^^J/Hid true % SPACE
- }%
- }%
- \@processme
- \fi
- \fi
-}
-\gdef\Hy at RemoveHidPageAttr#1^^J/Hid#2#3 #4\END{%
- \ifx\\#2\\%
- \global\pdfpageattr{#1}%
- \else
- \Hy at RemoveHidPageAttr#1#4\END
- \fi
-}
+%UF removed hyper at pagehidden (obsolete key)
+% removed \Hy at RemoveHidPageAttr#1^^J/Hid#2#3 #4\END{%
+
\pdf at ifdraftmode{}{%
\g at addto@macro\Hy at EveryPageHook{%
\hyper at pagetransition
\hyper at pageduration
- \hyper at pagehidden
+ %\hyper at pagehidden %UF is obsolete
}%
}
-%%% removed setpagesize code, should be done by kernel/graphicx
+%%% UF removed setpagesize code, should be done by kernel/graphicx
\def\Acrobatmenu#1#2{%
\Hy at Acrobatmenu{#1}{#2}{%
@@ -874,7 +873,7 @@
\close at pdflink
}%
}
-%%% removed old atbegshi fix
+%%% UF removed old atbegshi fix
\def\@Gauge[#1]#2#3#4{% parameters, label, minimum, maximum
\Hy at Message{Sorry, pdftex does not support FORM gauges}%
@@ -1720,231 +1719,29 @@
\Fld at additionalactions
}%
\fi
-\def\Hy at writebookmark#1#2#3#4#5{%
- % section number, text, label, level, file
- \ifx\WriteBookmarks\relax%
- \else
- \ifnum#4>\Hy at bookmarksdepth\relax
- \else
- \@@writetorep{#1}{#2}{#3}{#4}{#5}%
- \fi
- \fi
-}
-\def\Hy at currentbookmarklevel{0}
-\def\Hy at numberline#1{#1 }
-\def\@@writetorep#1#2#3#4#5{%
- \begingroup
- \edef\Hy at tempa{#5}%
- \ifx\Hy at tempa\Hy at bookmarkstype
- \edef\Hy at level{#4}%
- \ifx\Hy at levelcheck Y%
- \@tempcnta\Hy at level\relax
- \advance\@tempcnta by -1 %
- \ifnum\Hy at currentbookmarklevel<\@tempcnta
- \advance\@tempcnta by -\Hy at currentbookmarklevel\relax
- \advance\@tempcnta by 1 %
- \Hy at Warning{%
- Difference (\the\@tempcnta) between bookmark levels is %
- greater \MessageBreak than one, level fixed%
- }%
- \@tempcnta\Hy at currentbookmarklevel
- \advance\@tempcnta by 1 %
- \edef\Hy at level{\the\@tempcnta}%
- \fi
- \else
- \global\let\Hy at levelcheck Y%
- \fi
- \global\let\Hy at currentbookmarklevel\Hy at level
- \@tempcnta\Hy at level\relax
- \expandafter\xdef\csname Parent\Hy at level\endcsname{#3}%
- \advance\@tempcnta by -1 %
- \edef\Hy at tempa{#3}%
- \edef\Hy at tempb{\csname Parent\the\@tempcnta\endcsname}%
- \ifx\Hy at tempa\Hy at tempb
- \Hy at Warning{%
- The anchor of a bookmark and its parent's must not%
- \MessageBreak be the same. Added a new anchor%
- }%
- \phantomsection
- \fi
- \ifHy at bookmarksnumbered
- \let\numberline\Hy at numberline
- \let\booknumberline\Hy at numberline
- \let\partnumberline\Hy at numberline
- \let\chapternumberline\Hy at numberline
- \else
- \let\numberline\@gobble
- \let\booknumberline\@gobble
- \let\partnumberline\@gobble
- \let\chapternumberline\@gobble
- \fi
- \HyPsd at XeTeXBigCharstrue
- \pdfstringdef\Hy at tempa{#2}%
- \HyPsd at SanitizeForOutFile\Hy at tempa
- \if at filesw
- \stepcounter{bookmark at seq@number}%
- \@ifundefined{@outlinefile}{%
- }{%
- \protected at write\@outlinefile{}{%
- \protect\BOOKMARK
- [\Hy at level][\@bookmarkopenstatus{\Hy at level}]{#3}%
- {\Hy at tempa}{\Hy at tempb}%
- \@percentchar\space\thebookmark at seq@number
- }%
- }%
- \fi
- \fi
- \endgroup
-}
-\newcounter{bookmark at seq@number}
-\begingroup
- \lccode`(=`{%
- \lccode`)=`}%
- \lccode`1=\z@
- \lccode`2=\z@
- \lccode`3=\z@
- \lccode`5=\z@
- \lccode`7=\z@
- \lccode`\#=\z@
- \lccode`\`=\z@
- \lccode`\{=\z@
- \lccode`\}=\z@
-\lowercase{%
- \endgroup
- \def\HyPsd at SanitizeForOutFile#1{%
- \@onelevel at sanitize\Hy at tempa
- \escapechar`\\%
- \edef\Hy at tempa{%
- \expandafter\HyPsd at SanitizeOut@BraceLeft\Hy at tempa(\@nil
- }%
- \edef\Hy at tempa{%
- \expandafter\HyPsd at SanitizeOut@BraceRight\Hy at tempa)\@nil
- }%
- }%
- \def\HyPsd at SanitizeOut@BraceLeft#1(#2\@nil{%
- #1%
- \ifx\\#2\\%
- \expandafter\ltx at gobble
- \else
- \expandafter\ltx at firstofone
- \fi
- {%
- \string\173%
- \HyPsd at SanitizeOut@BraceLeft#2\@nil
- }%
- }%
- \def\HyPsd at SanitizeOut@BraceRight#1)#2\@nil{%
- #1%
- \ifx\\#2\\%
- \expandafter\ltx at gobble
- \else
- \expandafter\ltx at firstofone
- \fi
- {%
- \string\175%
- \HyPsd at SanitizeOut@BraceRight#2\@nil
- }%
- }%
-}
-\newcommand{\currentpdfbookmark}{%
- \pdfbookmark[\Hy at currentbookmarklevel]%
-}
-\newcommand{\subpdfbookmark}{%
- \@tempcnta\Hy at currentbookmarklevel
- \Hy at StepCount\@tempcnta
- \expandafter\pdfbookmark\expandafter[\the\@tempcnta]%
-}
-\newcommand{\belowpdfbookmark}[2]{%
- \@tempcnta\Hy at currentbookmarklevel
- \Hy at StepCount\@tempcnta
- \expandafter\pdfbookmark\expandafter[\the\@tempcnta]{#1}{#2}%
- \advance\@tempcnta by -1 %
- \xdef\Hy at currentbookmarklevel{\the\@tempcnta}%
-}
-\renewcommand\pdfbookmark[3][0]{%
- \Hy at writebookmark{}{#2}{#3.#1}{#1}{toc}%
- \hyper at anchorstart{#3.#1}\hyper at anchorend
-}
-\def\BOOKMARK{%
- \@ifnextchar[{\@BOOKMARK}{\@@BOOKMARK[1][-]}%
-}
-\def\@BOOKMARK[#1]{%
- \@ifnextchar[{\@@BOOKMARK[{#1}]}{\@@BOOKMARK[{#1}][-]}%
-}
-\RequirePackage{rerunfilecheck}[2009/12/10]
-\def\Hy at OutlineRerunCheck{%
- \RerunFileCheck{\jobname.out}{%
- \immediate\closeout\@outlinefile
- }{%
- Rerun to get outlines right\MessageBreak
- or use package `bookmark'%
- }%
-}
-\def\ReadBookmarks{%
- \pdf at ifdraftmode{}{%
- \begingroup
- \def\do##1{%
- \ifnum\catcode`##1=\active
- \@makeother##1%
- \else
- \ifnum\catcode`##1=6 %
- \@makeother##1%
- \fi
- \fi
- }%
- \dospecials
- \Hy at safe@activestrue
- \escapechar=`\\%
- \def\@@BOOKMARK[##1][##2]##3##4##5{%
- \calc at bm@number{##5}%
- }%
- \InputIfFileExists{\jobname.out}{}{}%
- \ifx\WriteBookmarks\relax
- \global\let\WriteBookmarks\relax
- \fi
- \def\@@BOOKMARK[##1][##2]##3##4##5{%
- \def\Hy at temp{##4}%
- \Hy at pstringdef\Hy at pstringName{\HyperDestNameFilter{##3}}%
- \Hy at OutlineName{}\Hy at pstringName{%
- ##2\check at bm@number{##3}%
- }{%
- \expandafter\strip at prefix\meaning\Hy at temp
- }%
- }%
- \begingroup
- \def\WriteBookmarks{0}%
- \InputIfFileExists{\jobname.out}{}{}%
- \endgroup
- %{\escapechar\m at ne\InputIfFileExists{\jobname.out}{}{}}%
- \endgroup
- }%
- \ifx\WriteBookmarks\relax
- \else
- \if at filesw
- \newwrite\@outlinefile
- \Hy at OutlineRerunCheck
- \immediate\openout\@outlinefile=\jobname.out\relax
- \ifHy at typexml
- \immediate\write\@outlinefile{<relaxxml>\relax}%
- \fi
- \fi
- \fi
-}
-\def\Hy at OutlineName#1#2#3#4{%
- \pdfextension outline goto name{#2}count#3{#4}%
-}
-\def\check at bm@number#1{%
- \expandafter\ifx\csname B_#1\endcsname\relax
- 0%
- \else
- \csname B_#1\endcsname
- \fi
-}
-\def\calc at bm@number#1{%
- \@tempcnta=\check at bm@number{#1}\relax
- \advance\@tempcnta by 1 %
- \expandafter\xdef\csname B_#1\endcsname{\the\@tempcnta}%
-}
+
+% UF: removed Hy at writebookmark
+% \Hy at currentbookmarklevel{0}
+% \Hy at numberline
+% \@@writetorep
+% counter{bookmark at seq@number}
+% removed \HyPsd at SanitizeForOutFile, not needed
+% removed \currentpdfbookmark, defined by bookmark,
+% should use \newcommand there
+% removed \subpdfbookmark, defined by bookmark,
+% should use \newcommand there
+% removed \belowpdfbookmark, defined by bookmark,
+% should use \newcommand there
+% removed \pdfbookmark, defined by bookmark,
+% \BOOKMARK
+% \@BOOKMARK
+%% \RequirePackage{rerunfilecheck}[2009/12/10]
+%% removed \Hy at OutlineRerunCheck, unneeded with bookmark
+%% removed \ReadBookmarks / unneeded with bookmark.
+%% removed \Hy at OutlineName
+%% removed \check at bm@number
+%% removed \calc at bm@number
+
\ifHy at implicit
\else
\expandafter\endinput
More information about the latex3-commits
mailing list