-
Notifications
You must be signed in to change notification settings - Fork 38
/
hyperref-compat.sty
87 lines (78 loc) · 2.61 KB
/
hyperref-compat.sty
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
%% Copyright (C) 2012 Ricardo Piccoli <rfbpiccoli at gmail dot com>
%%
%% This program is free software; you can redistribute it and/or modify
%% it under the terms of the GNU General Public License as published by
%% the Free Software Foundation; either version 2 of the License, or
%% (at your option) any later version.
%%
%% This program is distributed in the hope that it will be useful,
%% but WITHOUT ANY WARRANTY; without even the implied warranty of
%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
%% GNU General Public License for more details.
%%
%% You should have received a copy of the GNU General Public License
%% along with this program; if not, write to the Free Software
%% Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
%%
%----------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{hyperref-compat}
[2016/11/24 v1 %
Compatibility package for using hyperref with pucrs-ppgcc.cls]
\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{hyperref}}
%\ExecuteOptions{}
\ProcessOptions\relax
\RequirePackage{hyperref}[2012/11/06]
\pdfstringdefDisableCommands{%
\let\MakeUppercase\relax
\let\MakeTextUppercase\relax
}
\long\def\@caption#1[#2]#3{%
\expandafter\ifx\csname if@capstart\expandafter\endcsname
\csname iftrue\endcsname
\global\let\@currentHref\hc@currentHref
\else
\hyper@makecurrent{\@captype}%
\fi
\@ifundefined{NR@gettitle}{%
\def\@currentlabelname{#2}%
}{%
\NR@gettitle{#2}%
}%
\par\addcontentsline{\csname ext@#1\endcsname}{#1}{%
% XXX
% \protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}%
\csname #1name\endcsname\nobreakspace\protect\numberline{\csname the#1\endcsname\hfil\nobreakspace--\nobreakspace}{\ignorespaces #2}%
}%
\begingroup
\@parboxrestore
\if@minipage
\@setminipage
\fi
\normalsize
\expandafter\ifx\csname if@capstart\expandafter\endcsname
\csname iftrue\endcsname
\global\@capstartfalse
\@makecaption{\csname fnum@#1\endcsname}{\ignorespaces#3}%
\else
\@makecaption{\csname fnum@#1\endcsname}{%
\ignorespaces
\ifHy@nesting
\expandafter\hyper@@anchor\expandafter{\@currentHref}{#3}%
\else
\Hy@raisedlink{%
\expandafter\hyper@@anchor\expandafter{%
\@currentHref
}{\relax}%
}%
#3%
\fi
}%
\fi
\par
\endgroup
}
\AtEndOfPackage{}
\endinput
%% End of file 'hyperref-compat.sty'
% vim:foldmethod=indent:textwidth=10000