[latex3-commits] [git/LaTeX3-latex3-pdfresources] reworking-annot: sort most bookmark keys (50dd68e)

Ulrike Fischer fischer at troubleshooting-tex.de
Tue Jan 26 00:13:55 CET 2021


Repository : https://github.com/latex3/pdfresources
On branch  : reworking-annot
Link       : https://github.com/latex3/pdfresources/commit/50dd68e1d0ecbb86814cb566b9ffc3a3035d0598

>---------------------------------------------------------------

commit 50dd68e1d0ecbb86814cb566b9ffc3a3035d0598
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Tue Jan 26 00:13:55 2021 +0100

    sort most bookmark keys


>---------------------------------------------------------------

50dd68e1d0ecbb86814cb566b9ffc3a3035d0598
 hyperref-generic.dtx | 24 ++++++++++++++++--
 info/key-list.tex    | 70 ++++++++++++++++++++++++++--------------------------
 2 files changed, 57 insertions(+), 37 deletions(-)

diff --git a/hyperref-generic.dtx b/hyperref-generic.dtx
index 64473df..963c58d 100644
--- a/hyperref-generic.dtx
+++ b/hyperref-generic.dtx
@@ -97,7 +97,8 @@
 %
 %  \subsection{Bookmark code}
 %  The driver doesn't contain code to handle bookmarks/outlines. Instead it forces
-%  the loading of the \pkg{bookmark} package. Currently this is done at the end of the preamble
+%  the loading of the \pkg{bookmark} package unless the option |bookmarks=false|
+%  has been used. Currently this is done at the end of the preamble
 %  so if commands from \pkg{bookmark} are needed in the preamble the document
 %  still has to load it manually but this is subject to change.
 %
@@ -685,6 +686,7 @@
 \providecommand\@pdfborder{}
 \providecommand\@pdfborderstyle{}
 \newcommand\OBJ at OCG@view {} % needed in hyperref
+\def\Hy at numberline#1{#1\c_space_tl}   %needed by bookmark
 %    \end{macrocode}
 %
 % We force unicode as option. As bookmarks are still using \cs{pdfstringdef}
@@ -761,8 +763,12 @@
   { \msg_error:nn { hyp}{ missing-resource-management } }
 %    \end{macrocode}
 % Outlines/bookmarks require the bookmark package.
+% TODO check pdfpagemode if booksmarks are suppressed.
 %    \begin{macrocode}
-\AddToHook{begindocument/before}{\RequirePackage{bookmark}}
+\legacy_if:nT { Hy at bookmarks }
+  {
+    \AddToHook{begindocument/before}[hyperref/bookmark]{\RequirePackage{bookmark}}
+  }
 %    \end{macrocode}
 %
 % \section{Reference and label commands}
@@ -1740,6 +1746,20 @@
              \pdfmanagement_add:nnx {Catalog} { URI }{ <</Base \l_@@_tmpa_tl>> }
           }
      }
+   %only false does something ...
+   ,bookmarks .choice:
+   ,bookmarks / false .code:n = {\RemoveFromHook {begindocument/before}[hyperref/bookmark]}
+   ,bookmarks / true .code:n = {}
+   ,bookmarks .default:n = {true}
+   ,bookmarksnumbered .choice:
+   ,bookmarksnumbered / false .code:n = { \Hy at bookmarksnumberedfalse }
+   ,bookmarksnumbered / true .code:n  = { \Hy at bookmarksnumberedtrue }
+   ,bookmarksnumbered .default:n      = {true}
+   ,bookmarksopen .choice:
+   ,bookmarksopen / false .code:n = { \Hy at bookmarksopenfalse }
+   ,bookmarksopen / true .code:n  = { \Hy at bookmarksopentrue }
+   ,bookmarksopen .default:n      = {true}
+   ,bookmarksopenlevel .tl_set:N = \@bookmarksopenlevel
    ,pdfcenterwindow    .choice:
    ,pdfcenterwindow / false .code:n =
      {
diff --git a/info/key-list.tex b/info/key-list.tex
index 4752150..3d9fe95 100644
--- a/info/key-list.tex
+++ b/info/key-list.tex
@@ -9,10 +9,10 @@ done    & allcolors          &                        & Set all color options (w
 dropped & anchorcolor        & \textit{black}         & set color of anchors, ignored by most drivers. \\
 ??      & backref            & \textit{false}         & do bibliographical back references \\
 done    & baseurl            & \textit{empty}         & set base URL for document \\
-??      & bookmarks          & \textit{true}          & make bookmarks \\
-??      & bookmarksnumbered  & \textit{false}         & put section numbers in bookmarks \\
-?? & bookmarksopen      & \textit{false}         & open up bookmark tree \\
-?? & bookmarksopenlevel & \ttfamily\ci{maxdimen} & level to which bookmarks are open \\
+done    & bookmarks          & \textit{true}          & make bookmarks \\
+done    & bookmarksnumbered  & \textit{false}         & put section numbers in bookmarks \\
+done    & bookmarksopen      & \textit{false}         & open up bookmark tree \\
+done    & bookmarksopenlevel & \ttfamily\ci{maxdimen} & level to which bookmarks are open \\
 ?? & bookmarkstype      & \textit{toc}           & to specify which `toc' file to mimic \\
 dropped & breaklinks         & \textit{false}         & allow links to break over lines \\
 ?? & CJKbookmarks       & \textit{false}         & to produce CJK bookmarks\\
@@ -60,57 +60,57 @@ done (ext) & pdfborderstyle     &                        & border style for link
 done & pdfcenterwindow    & \textit{false}         & position the document window in the center of the screen \\
 pdfcreator         & \textit{LaTeX with}    & text for PDF Creator field \\
                    & \textit{hyperref}      & \\
-pdfdirection       & \textit{empty}         & direction setting \\
-pdfdisplaydoctitle & \textit{false}         & display document title instead
+done &pdfdirection       & \textit{empty}         & direction setting \\
+done &pdfdisplaydoctitle & \textit{false}         & display document title instead
                                               of file name in title bar\\
-pdfduplex          & \textit{empty}         & paper handling option for
+done &pdfduplex          & \textit{empty}         & paper handling option for
                                               print dialog\\
-pdffitwindow       & \textit{false}         & resize document window to fit document size \\
-pdfhighlight       & \textit{/I}            & set highlighting of PDF links \\
+done &pdffitwindow       & \textit{false}         & resize document window to fit document size \\
+done (ext)& pdfhighlight       & \textit{/I}            & set highlighting of PDF links \\
 pdfinfo            & \textit{empty}         & alternative interface for setting document information\\
 pdfkeywords        & \textit{empty}         & text for PDF Keywords field \\
-pdflang            & \textit{relax}         & PDF language identifier (RFC 3066) \\
-pdfmark            & \textit{false}         & an alias for \textsf{dvips} \\
-pdfmenubar         & \textit{true}          & make PDF viewer's menu bar visible \\
+done &pdflang            & \textit{relax}         & PDF language identifier (RFC 3066) \\
+--&pdfmark            & \textit{false}         & an alias for \textsf{dvips} \\
+done &pdfmenubar         & \textit{true}          & make PDF viewer's menu bar visible \\
 pdfnewwindow       & \textit{false}         & make links that open another PDF \\
                    &                        & file start a new window \\
-pdfnonfullscreenpagemode
+done & pdfnonfullscreenpagemode
                    & \textit{empty}         & page mode setting on exiting
                                               full-screen mode\\
-pdfnumcopies       & \textit{empty}         & number of printed copies\\
+done & pdfnumcopies       & \textit{empty}         & number of printed copies\\
 pdfpagelabels      & \textit{true}          & set PDF page labels \\
-pdfpagelayout      & \textit{empty}         & set layout of PDF pages \\
-pdfpagemode        & \textit{empty}         & set default mode of PDF display \\
-pdfpagescrop       & \textit{empty}         & set crop size of PDF document \\
+done & pdfpagelayout      & \textit{empty}         & set layout of PDF pages \\
+done &pdfpagemode        & \textit{empty}         & set default mode of PDF display \\
+done & pdfpagescrop       & \textit{empty}         & set crop size of PDF document \\
 pdfpagetransition  & \textit{empty}         & set PDF page transition style \\
-pdfpicktraybypdfsize
+done &pdfpicktraybypdfsize
                    & \textit{empty}         & set option for print dialog \\
-pdfprintarea       & \textit{empty}         & set /PrintArea of viewer preferences \\
-pdfprintclip       & \textit{empty}         & set /PrintClip of viewer preferences \\
-pdfprintpagerange  & \textit{empty}         & set /PrintPageRange of viewer preferences \\
-pdfprintscaling    & \textit{empty}         & page scaling option for print dialog \\
+done &pdfprintarea       & \textit{empty}         & set /PrintArea of viewer preferences \\
+done &pdfprintclip       & \textit{empty}         & set /PrintClip of viewer preferences \\
+done & pdfprintpagerange  & \textit{empty}         & set /PrintPageRange of viewer preferences \\
+done & pdfprintscaling    & \textit{empty}         & page scaling option for print dialog \\
 pdfproducer        & \textit{empty}         & text for PDF Producer field \\
-pdfremotestartview & \textit{Fit}           & starting view of remote PDF documents \\
-pdfstartpage       & \textit{1}             & page at which PDF document opens \\
-pdfstartview       & \textit{Fit}           & starting view of PDF document \\
+done & pdfremotestartview & \textit{Fit}           & starting view of remote PDF documents \\
+done & pdfstartpage       & \textit{1}             & page at which PDF document opens \\
+done & pdfstartview       & \textit{Fit}           & starting view of PDF document \\
 pdfsubject         & \textit{empty}         & text for PDF Subject field \\
-pdftex             &                        & use \textsf{pdf\TeX} backend \\
+-- & pdftex             &                        & use \textsf{pdf\TeX} backend \\
 pdftitle           & \textit{empty}         & text for PDF Title field \\
-pdftoolbar         & \textit{true}          & make PDF toolbar visible \\
+done &pdftoolbar         & \textit{true}          & make PDF toolbar visible \\
 pdftrapped         & \textit{empty} & Sets the document information Trapped entry.
   Possible values are \texttt{True}, \texttt{False} and \texttt{Unknown}.
   An empty value means, the entry is not set.\\
-pdfview            & \textit{XYZ}           & PDF `view' when on link traversal \\
-pdfviewarea        & \textit{empty}         & set /ViewArea of viewer preferences \\
-pdfviewclip        & \textit{empty}         & set /ViewClip of viewer preferences \\
-pdfwindowui        & \textit{true}          & make PDF user interface elements visible \\
+done & pdfview            & \textit{XYZ}           & PDF `view' when on link traversal \\
+done & pdfviewarea        & \textit{empty}         & set /ViewArea of viewer preferences \\
+done & pdfviewclip        & \textit{empty}         & set /ViewClip of viewer preferences \\
+done & pdfwindowui        & \textit{true}          & make PDF user interface elements visible \\
 plainpages         & \textit{false}         & do page number anchors as plain Arabic \\
-ps2pdf             &                        & use \textsf{ps2pdf} backend \\
+-- & ps2pdf             &                        & use \textsf{ps2pdf} backend \\
 psdextra           & \textit{false}         & define more short names for PDF string commands \\
 raiselinks         & \textit{false}         & raise up links (for \textsf{Hyper\TeX} backend) \\
-runbordercolor     & \textit{0 .7 .7}       & color of border around `run' links \\
-runcolor           & \textit{filecolor}     & color of `run' links\\
-setpagesize        & \textit{true}          & set page size by special driver commands \\
+done & runbordercolor     & \textit{0 .7 .7}       & color of border around `run' links \\
+done & runcolor           & \textit{filecolor}     & color of `run' links\\
+ignored &setpagesize        & \textit{true}          & set page size by special driver commands \\
 ???? & tex4ht             &                        & use \textsf{\TeX4ht} backend \\
 -- & textures           &                        & use \textsf{Textures} backend \\
 unicode            & \textit{true}          & Unicode encoded pdf strings, starting with version  2020-08-14 v7.00f set by default to true for all engines. \\





More information about the latex3-commits mailing list.