Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4186cd3

Browse files
committed
Add named destinations for \label{} in the PDF.
Fix \email{} so it doesn't rely on \url{}.
1 parent 8ff4b8b commit 4186cd3

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

Doc/myformat.sty

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,16 @@
2626
\RequirePackage{times}\typeout{Using times fonts instead of Computer Modern.}
2727

2828

29-
% for PDF output, use maximal compression:
30-
\@ifundefined{pdfannotlink}{}{\pdfcompresslevel=9}
29+
% for PDF output, use maximal compression, revise \label{} to support named
30+
% targets for later linking operations.
31+
\@ifundefined{pdfannotlink}{}{%
32+
\pdfcompresslevel=9
33+
\let\OldLabel=\label
34+
\renewcommand{\label}[1]{%
35+
\OldLabel{#1}%
36+
{\pdfdest name {#1} fit}%
37+
}
38+
}
3139

3240
% Increase printable page size (copied from fullpage.sty)
3341
\topmargin 0pt
@@ -324,7 +332,7 @@
324332
\Black% Turn it back off; these are declarative
325333
\pdfendlink}}% and don't appear bound to the current
326334
}% formatting "box".
327-
\let\email=\code
335+
\newcommand{\email}[1]{\mbox{\small\textsf{#1}}}
328336

329337
\newcommand{\varvars}[1]{{\def\,{\/{\char`\,}}\var{#1}}}
330338

0 commit comments

Comments
 (0)