summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/hyperref/bmhydoc.sty
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/hyperref/bmhydoc.sty
Initial commit
Diffstat (limited to 'macros/latex/contrib/hyperref/bmhydoc.sty')
-rw-r--r--macros/latex/contrib/hyperref/bmhydoc.sty115
1 files changed, 115 insertions, 0 deletions
diff --git a/macros/latex/contrib/hyperref/bmhydoc.sty b/macros/latex/contrib/hyperref/bmhydoc.sty
new file mode 100644
index 0000000000..e6491796ca
--- /dev/null
+++ b/macros/latex/contrib/hyperref/bmhydoc.sty
@@ -0,0 +1,115 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{bmhydoc}
+ [2019/01/08 Bookmark section with hyperref documentation (HO)]
+
+% This package adds bookmark entries that are added at the end
+% and lists and links the PDF files of the hyperref documentation.
+% Only pdfTeX in PDF mode is supported by this package.
+%
+% History
+%
+% 2005/08/27
+% * First version
+% 2006/02/08
+% * Comments added
+% * \HyperrefOverview
+% 2007/03/19
+% * Use package bookmark that also support other drivers
+% than pdfTeX.
+% 2009/11/22
+% * Bug fix: correction of "this file".
+
+\RequirePackage{pifont}
+\RequirePackage[atend]{bookmark}[2007/04/04]
+
+\BookmarkAtEnd{%
+ \bookmarksetup{%
+ startatroot,%
+ open,%
+ openlevel=2%
+ }%
+}
+
+\newcommand*{\@bmhydoc}[4][]{%
+ \BookmarkAtEnd{%
+ \bookmark[%
+ gotor={#3},%
+ color={[rgb]{0,0,1}},%
+ level={#2},%
+ view={XYZ null null null},%
+ #1,%
+ ]{#4}%
+ }%
+}
+\AtEndDocument{%
+ \@bmhydoc[open=false]{0}{manual.pdf}{Hyperref manual}
+% \@bmhydoc{1}{README.pdf}{README}
+% \@bmhydoc{1}{ChangeLog.pdf}{ChangeLog}
+ \@bmhydoc{1}{options.pdf}{Options}
+ \@bmhydoc{1}{slides.pdf}{Bookmark talk, slides}
+ \@bmhydoc{2}{paper.pdf}{Bookmark talk, paper}
+ \@bmhydoc{1}{hyperref.pdf}{Sources: hyperref.dtx}
+ \@bmhydoc{2}{backref.pdf}{backref.dtx}
+ \@bmhydoc{2}{nameref.pdf}{nameref.dtx}
+}
+
+\newcommand*{\HyperrefOverview}{%
+ \def\bmhydoc@title{Documentation overview for \texttt{hyperref}}%
+ \@ifstar{%
+ % \phantomsection
+ % \addcontentsline{toc}{section}{\bmhydoc@title}%
+ \section*{\bmhydoc@title}%
+ \@HyperrefOverview
+ }{%
+ \section{\bmhydoc@title}%
+ \@HyperrefOverview
+ }%
+}
+\def\@HyperrefOverview{%
+ The documentation for package \texttt{hyperref} consists
+ of several files:
+ \begingroup
+ \newcommand*{\entry}[2]{%
+ \item[\href{file:##1}{##2}]%
+ \ignorespaces
+ }%
+ \begin{description}
+ \entry{manual.pdf}{\textbf{Manual}}
+ The \textbf{USER MANUAL} (also available as HTML).
+ \entry{ChangeLog.txt}{ChangeLog}
+ This file records the version history
+ (also available as text file).
+ \entry{options.pdf}{Options}
+ This file provides a short option summary.
+ \entry{slides.pdf}{Bookmark talk, slides}
+ Slides for the talk ``PDF information and navigation elements with
+ hyperref, pdfTeX and thumbpdf'' at Euro\TeX~1999.
+ \entry{paper.pdf}{Bookmark talk, paper}
+ The paper version of the talk.
+ \end{description}
+ Source code documentation:
+ \begin{description}
+ \entry{hyperref.pdf}{hyperref.dtx}
+ This is the source code documentation for hyperref%
+ \@thisfile{hyperref}.
+ \entry{backref.pdf}{backref.dtx}
+ ``Back referencing from bibliographical citations''%
+ \@thisfile{backref}
+ \entry{nameref.pdf}{nameref.dtx}
+ ``Section name references in \LaTeX''%
+ \@thisfile{nameref}%
+ \end{description}
+ \endgroup
+}
+\edef\@jobname{\jobname}
+\def\@thisfile#1{%
+ \begingroup
+ \edef\x{#1}%
+ \@onelevel@sanitize\x
+ \ifx\x\@jobname
+ \marginpar{\hfill\ding{43}}%
+ \space(this file)%
+ \fi
+ \endgroup
+}
+\endinput