Last active
December 13, 2015 21:58
-
-
Save zr-tex8r/4980892 to your computer and use it in GitHub Desktop.
LaTeX: to make the navigation symbols (and \framezoom) work with dvipdfmx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% bxdpx-beamer.sty | |
\NeedsTeXFormat{LaTeX2e} | |
\ProvidesPackage{bxdpx-beamer}[2013/02/27 v0.2] | |
\def\bxqbd@pkgname{bxdpx-beamer} | |
% environment check | |
\@ifclassloaded{beamer}{}{%else | |
\PackageError\bxqbd@pkgname{Beamer is not in use}% | |
{Package loading is aborted.}% | |
\endinput} | |
% if not in presentation mode, then abort silently | |
\mode<presentation>{\let\bxqbd@tempa=t } | |
\ifx t\bxqbd@tempa\else | |
\expandafter\endinput\fi\relax | |
% if PGF driver is not dvipdfmx/xetex, then abort silently | |
\let\bxqbd@tempa=f | |
\def\bxqbd@tempb{pgfsys-dvipdfmx.def} | |
\ifx\pgfsysdriver\bxqbd@tempb \let\bxqbd@tempa=t \fi | |
\def\bxqbd@tempb{pgfsys-xetex.def} | |
\ifx\pgfsysdriver\bxqbd@tempb \let\bxqbd@tempa=t \fi | |
\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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[17pt,dvipdfmx]{beamer} | |
\usepackage{type1cm} | |
\usetheme{Warsaw} | |
\usepackage{bxdpx-beamer} | |
\begin{document} | |
\begin{frame}{Zoooooooom!} | |
\hypersetup{linkbordercolor={0 0.5 0.1}} | |
\framezoom<1><2>[border=2](0pt,20pt)(32pt,24pt)% | |
\framezoom<1><3>[border=2](50pt,28pt)(40pt,30pt)% | |
\framezoom<1><4>[border=2](100pt,22pt)(18pt,18pt)% | |
\strut\par | |
Blah blah blah!!? | |
\end{frame} | |
\end{document} |
nanpuyue (Sorry for late reply.)
This seems to be normal behavior: i.e. every link in PDF files generated by dvipdfmx gets color-inversed when active.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ubuntu 12.10
Adobe Reader 8.17
When I click on the navigation bar, a black box appears.
http://img.nanpuyue.com/upload/2013/03/17/20130317141034-a7941c04.png