Fixed hyperref support
This commit is contained in:
parent
82d2f13f0f
commit
d238f12f69
@ -453,9 +453,30 @@
|
|||||||
|
|
||||||
% Helper command that creates a label with custom text.
|
% Helper command that creates a label with custom text.
|
||||||
% Args: label name, custom text
|
% Args: label name, custom text
|
||||||
|
%
|
||||||
|
% newlabel is redefined by hyperref,
|
||||||
|
% and its second arg takes two parts without hyperref and four with it.
|
||||||
\newcommand{\@customlabel}[2]{%
|
\newcommand{\@customlabel}[2]{%
|
||||||
\protected@write\@auxout{}{\string\newlabel{#1}{{#2}{}}}%
|
\@ifpackageloaded{hyperref}{%
|
||||||
|
\begingroup
|
||||||
|
\def\label@name{#1}%
|
||||||
|
\def\@currentlabel{#2}%
|
||||||
|
\label@hook
|
||||||
|
\protected@write\@auxout{}{%
|
||||||
|
\string\newlabel{#1}{%
|
||||||
|
{\@currentlabel}%
|
||||||
|
{\thepage}%
|
||||||
|
{\@currentlabelname}%
|
||||||
|
{\@currentHref}%
|
||||||
|
{}%
|
||||||
|
}%
|
||||||
|
}%
|
||||||
|
\endgroup
|
||||||
|
}{
|
||||||
|
\protected@write\@auxout{}{\string\newlabel{#1}{{#2}{\thepage}}}%
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
% Starred sections are not numbered.
|
% Starred sections are not numbered.
|
||||||
\newcounter{section_counter}
|
\newcounter{section_counter}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user