summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/bxdpx-beamer/bxdpx-beamer.sty
blob: ddb262915a0dc17f555a709eb3e60417b1edaa1d (plain)
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
% bxdpx-beamer.sty
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bxdpx-beamer}[2016/08/06 v0.3]
\def\bxqbd@pkgname{bxdpx-beamer}
% if Beamer is not used, then abort with error
\@ifclassloaded{beamer}{}{%else
  \PackageError\bxqbd@pkgname{Beamer is not in use}%
    {Package loading is aborted.}%
  \endinput}
% if PGF driver is not dvipdfmx/xetex, then abort silently
\let\bxqbd@pgf=\relax
\def\bxqbd@tempa{pgfsys-dvipdfmx.def}
\ifx\pgfsysdriver\bxqbd@tempa \let\bxqbd@pgf=d \fi
\def\bxqbd@tempa{pgfsys-xetex.def}
\ifx\pgfsysdriver\bxqbd@tempa \let\bxqbd@pgf=x \fi
\ifx\bxqbd@pgf\relax
\expandafter\endinput\fi\relax
%--------------------------------------- geometry
% if geometry driver is not set, set it to 'dvipdfm'
\ifx d\bxqbd@pgf \ifx\Gm@driver\@empty
  \Gm@setdriver{dvipdfm}
\fi\fi
%--------------------------------------- hyperlink
% if not in presentation mode, then abort silently
\let\bxqbd@tempa=f
\mode<presentation>{\let\bxqbd@tempa=t }
\ifx t\bxqbd@tempa\else
\expandafter\endinput\fi\relax
% if ec-lmr10 is not available, then abort with warning
\IfFileExists{t1lmr.fd}{}{%else
  \PackageWarning\bxqbd@pkgname
    {Some links are still out of order, since the\MessageBreak
    hackery cannot be applied in absence of the \MessageBreak
    LM Roman font}%
  \endinput}
% \bxqbd@enghost
\newbox\bxqbd@ghost
\font\bxqbd@font=ec-lmr10 at 1.1613pt  % 10*0.5/4.3055
\setbox\bxqbd@ghost\hbox{\bxqbd@font\char23}
\def\bxqbd@enghost#1{%
  \begingroup
    \setbox\@tempboxa\hbox{#1}%
    \lower\dp\@tempboxa\copy\bxqbd@ghost
    \copy\@tempboxa
    \@tempdima\ht\@tempboxa \advance\@tempdima\ht\bxqbd@ghost
    \raise\@tempdima\copy\bxqbd@ghost
  \endgroup}
% patch to \beamer@linkspace
\let\bxqbd@linkspace\beamer@linkspace
\def\beamer@linkspace#1{%
  \bxqbd@enghost{\bxqbd@linkspace{#1}}}
% patch to \hyperlink
\let\bxqbd@hyperlink\hyperlink
\def\bxqbd@labelzoomed{\beamer@labelzoomed}
\def\hyperlink#1#2{%
  \def\bxqbd@tempa{#1}%
  \ifx\bxqbd@tempa\bxqbd@labelzoomed \expandafter\@firstoftwo
  \else \expandafter\@secondoftwo \fi
  {\bxqbd@hyperlink{#1}{\bxqbd@enghost{#2}}}%
  {\bxqbd@hyperlink{#1}{#2}}}
%--------------------------------------- all done
\endinput
%% EOF