summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/xbmks/xbmks-pdftex.def
blob: 2dec86d5343462b97b1251435006ccfe5f586276 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
%%
%% This is file `xbmks-pdftex.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% xbmks.dtx  (with options: `copyright,pdftex')
%% 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% xbmks.sty package,                                    %%
%% Copyright (C) 2016--2018                              %%
%%   dpstory@uakron.edu                                  %%
%%                                                       %%
%% This program can redistributed and/or modified under  %%
%% the terms of the LaTeX Project Public License         %%
%% Distributed from CTAN archives in directory           %%
%% macros/latex/base/lppl.txt; either version 1.2 of the %%
%% License, or (at your option) any later version.       %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\ReadBookmarks{%
  \pdf@ifdraftmode{}{%
    \begingroup\def\\{\@backslashchar\@backslashchar}% dps
    \def\calc@bm@number##1{%
      \@tempcnta=\check@bm@number{##1}\relax
      \advance\@tempcnta by 1 %
      \expandafter\edef\csname B_##1\endcsname{\the\@tempcnta}%
    }%
    \def\Hy@OutlineName##1##2##3##4{\def\@rgi{##1}%
      \expandafter\pdfoutline\ifx\@rgi\@empty\else
      attr {##1} \fi
      user {##2} count##3{##4}%
    %  goto name{#2} count#3{#4}%
    }%
    \def\do##1{%
      \ifnum\catcode`##1=\active
        \@makeother##1%
      \else
        \ifnum\catcode`##1=6 %
          \@makeother##1%
        \fi
      \fi
    }%
    \dospecials
    \Hy@safe@activestrue
    \escapechar=`\\%
    \ifx\WriteBookmarks\relax
      \global\let\WriteBookmarks\relax
    \fi
    \begingroup
    \def\WriteBookmarks{0}%
    \count\z@=0\relax
    \edef\xbmk@J{\jobname}%
    \@whilenum \count\z@<\xbmk@cnt\relax\do{%
      \advance\count\z@ by 1 %
      \edef\xbmk@thisdoc{xbmk@doc\the\count\z@}%
      \edef\xbmk@filename{\@nameuse{\xbmk@thisdoc}}%
      \@onelevel@sanitize\xbmk@filename
      \bgroup
      \gdef\@@BOOKMARK[##1][##2]##3##4##5{%
        \calc@bm@number{##5}%
      }%
      \let\nextAction\@gobbletwo
      \InputIfFileExists{\xbmk@filename.out}{}{\x@outWarningMsg}%
      \gdef\@@BOOKMARK[##1][##2]##3##4##5{%
        \def\Hy@temp{##4}%
        \Hy@pstringdef\Hy@pstringName{\HyperDestNameFilter{##3}}%
        \xbmkcsarg\ifx{X_##3}\relax
          \ifx\xbmk@J\xbmk@filename
            \Hy@OutlineName{\xbmks@intC\xbmk@intF}{<</S/GoTo%
              /D(\Hy@pstringName)>>}{%
              ##2\check@bm@number{\Hy@pstringName}%
            }{%
              \expandafter\strip@prefix\meaning\Hy@temp
            }%
          \else
            \Hy@OutlineName{\xbmks@extC\xbmk@extF}{<</S/GoToR%
              /F(\xbmk@filename.pdf)/D(\Hy@pstringName)>>}{%
              ##2\check@bm@number{##3}%
            }{%
              \expandafter\strip@prefix\meaning\Hy@temp
            }%
          \fi
        \else
          \x@rollCFIntoActionBmrk{##3}%
          \Hy@OutlineName{\thisCol\thisF}
          {<<\@nameuse{X_##3}>>}{%
              ##2\check@bm@number{\Hy@pstringName}%
          }{%
            \expandafter\strip@prefix\meaning\Hy@temp
          }%
        \fi
      }% bookmark
      \let\nextAction\nextAction@i
      \InputIfFileExists{\xbmk@filename.out}{}{}%
      \egroup
    } % \@whilenum
    \endgroup
  }%
  \ifx\WriteBookmarks\relax
  \else
    \if@filesw
      \newwrite\@outlinefile
      \Hy@OutlineRerunCheck
      \immediate\openout\@outlinefile=\jobname.out\relax
      \ifHy@typexml
        \immediate\write\@outlinefile{<relaxxml>\relax}%
      \fi
    \fi
  \fi
}
\endinput
%%
%% End of file `xbmks-pdftex.def'.