summaryrefslogtreecommitdiffstats
path: root/sphinx/texinputs/sphinxoptionshyperref.sty
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:25:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 17:25:40 +0000
commitcf7da1843c45a4c2df7a749f7886a2d2ba0ee92a (patch)
tree18dcde1a8d1f5570a77cd0c361de3b490d02c789 /sphinx/texinputs/sphinxoptionshyperref.sty
parentInitial commit. (diff)
downloadsphinx-upstream.tar.xz
sphinx-upstream.zip
Adding upstream version 7.2.6.upstream/7.2.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'sphinx/texinputs/sphinxoptionshyperref.sty')
-rw-r--r--sphinx/texinputs/sphinxoptionshyperref.sty35
1 files changed, 35 insertions, 0 deletions
diff --git a/sphinx/texinputs/sphinxoptionshyperref.sty b/sphinx/texinputs/sphinxoptionshyperref.sty
new file mode 100644
index 0000000..b88f108
--- /dev/null
+++ b/sphinx/texinputs/sphinxoptionshyperref.sty
@@ -0,0 +1,35 @@
+%% Bookmarks and hyperlinks
+%
+% change this info string if making any custom modification
+\ProvidesFile{sphinxoptionshyperref.sty}[2021/01/27 hyperref]
+
+% to make pdf with correct encoded bookmarks in Japanese
+% this should precede the hyperref package
+\ifx\kanjiskip\@undefined
+% for non-Japanese: make sure bookmarks are ok also with lualatex
+ \PassOptionsToPackage{pdfencoding=unicode}{hyperref}
+\else
+ \RequirePackage{atbegshi}
+ \ifx\ucs\@undefined
+ \ifnum 42146=\euc"A4A2
+ \AtBeginShipoutFirst{\special{pdf:tounicode EUC-UCS2}}
+ \else
+ \AtBeginShipoutFirst{\special{pdf:tounicode 90ms-RKSJ-UCS2}}
+ \fi
+ \else
+ \AtBeginShipoutFirst{\special{pdf:tounicode UTF8-UCS2}}
+ \fi
+\fi
+
+\ifx\@jsc@uplatextrue\@undefined\else
+ \PassOptionsToPackage{setpagesize=false}{hyperref}
+\fi
+
+% These options can be overridden inside 'hyperref' key
+% or by later use of \hypersetup.
+\PassOptionsToPackage{colorlinks,breaklinks,%
+ linkcolor=InnerLinkColor,filecolor=OuterLinkColor,%
+ menucolor=OuterLinkColor,urlcolor=OuterLinkColor,%
+ citecolor=InnerLinkColor}{hyperref}
+
+\endinput