diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/fancytooltips/fancytooltips.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/fancytooltips/fancytooltips.sty | 110 |
1 files changed, 75 insertions, 35 deletions
diff --git a/Master/texmf-dist/tex/latex/fancytooltips/fancytooltips.sty b/Master/texmf-dist/tex/latex/fancytooltips/fancytooltips.sty index fbf45d176bb..0120015cf76 100644 --- a/Master/texmf-dist/tex/latex/fancytooltips/fancytooltips.sty +++ b/Master/texmf-dist/tex/latex/fancytooltips/fancytooltips.sty @@ -22,7 +22,7 @@ %% \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesPackage{fancytooltips} - [2010/06/10 v1.8 fancytooltips.dtx file] + [2012/06/12 v1.12 fancytooltips.dtx file] \RequirePackage{graphicx} \RequirePackage{xkeyval} \RequirePackage{atbegshi} @@ -61,6 +61,18 @@ \newif\if@fancytooltips@fixcolor\@fancytooltips@fixcolorfalse \DeclareOptionX{fixcolor}{\@fancytooltips@fixcolortrue} +\newif\if@fancytooltips@preview\@fancytooltips@previewfalse +\DeclareOptionX{preview}{\@fancytooltips@previewtrue} + +\newif\if@fancytooltips@previewall\@fancytooltips@previewallfalse +\DeclareOptionX{previewall}{\@fancytooltips@previewtrue\@fancytooltips@previewalltrue} + +\newif\if@fancytooltips@nosoap\@fancytooltips@nosoapfalse +\DeclareOptionX{nosoap}{\@fancytooltips@nosoaptrue} + +\def\@@fancytipmark{} +\DeclareOptionX{tooltipmark}{\xdef\@@fancytipmark{#1}} + \def\fancytooltipsdebugmsg{} \DeclareOptionX{debug}{\def \fancytooltipsdebugmsg { @@ -106,10 +118,9 @@ if (this.getField("animtiph") == null) \newcommand{\tooltip@NoStar}[2]{#1}% \newcommand{\tooltipanim}{\@ifstar\tooltipanim@Star\tooltipanim@NoStar}% -\newcommand{\tooltipanim@Star}[2]{#1}% -\newcommand{\tooltipanim@NoStar}[2]{#1}% +\newcommand{\tooltipanim@Star}[3]{#1}% +\newcommand{\tooltipanim@NoStar}[3]{#1}% \def\keytip#1{}% -\def\FancyHook{}% \def\TooltipPage#1#2{}% \let\TooltipExtratext\relax \let\TooltipRefmark\relax @@ -124,37 +135,59 @@ if (this.getField("animtiph") == null) \newcount\fancycheckcount\fancycheckcount=0 \def\fancy@second#1#2#3#4{#2} -\def\FancyHook{ +\def\fancypreview@refhook{% \global\let\oldref\ref \gdef\ref##1{\oldref{##1}\global\advance\fancycheckcount by 1\relax \edef\templabel{fancyanchorref:\the\fancycheckcount}% \expandafter\label\expandafter{\templabel}% \expandafter\ifx \csname FancyToolTip@##1\endcsname\relax \else\hbox to 0 pt{% -\expandafter\ifx \csname r@##1\endcsname \relax\else -\edef\temp{\csname r@##1\endcsname}% -\expandafter\edef\expandafter\fan@tempa\expandafter{\expandafter\fancy@second\temp}% -\fi -\expandafter\ifx \csname r@fancyanchorref:\the\fancycheckcount\endcsname \relax\else -\edef\fan@ttemp{r@fancyanchorref:\the\fancycheckcount}% -\expandafter\let\expandafter\fan@temp@w\csname \fan@ttemp\endcsname -\edef\fan@temp@ww{\expandafter\fancy@second\fan@temp@w}% -\fi -\ifx\fan@temp@ww\undefined\else -\fi + \expandafter\ifx \csname r@##1\endcsname \relax\else + \expandafter\let\expandafter\fancytooltip@temp@a\csname r@##1\endcsname + \edef\fan@tempa{\expandafter\fancy@second\fancytooltip@temp@a}% + \fi + \expandafter\ifx \csname r@fancyanchorref:\the\fancycheckcount\endcsname \relax\else + \expandafter\let\expandafter\fan@temp@w\csname r@fancyanchorref:\the\fancycheckcount\endcsname + \edef\fan@temp@ww{\expandafter\fancy@second\fan@temp@w}% + \fi +\if@fancytooltips@previewall\def\fan@tempa{not a page number}\fi \ifx\fan@tempa\fan@temp@ww\else\smash{% \let\TooltipExtratext\relax\tooltip{\strut\TooltipRefmark}{##1}}% \fi \hss}% -\fi} -\ifTooltip@usepdftex -\def\TooltipRefmark{\hbox {\smash{\raisebox{0.4em}{\includegraphics[width=0.7em]% - {fancytipmark.pdf}}}}}% +\fi}% +\ifx\NAT@citea@mbox\undefined +\def\@citex[##1]##2{\leavevmode + \let\@citea\@empty + \@cite{\@for\@citeb:=##2\do + {\@citea\def\@citea{,\penalty\@m\ }% + \edef\@citeb{\expandafter\@firstofone\@citeb\@empty}% + \if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi + \@ifundefined{b@\@citeb}{\hbox{\reset@font\bfseries ?}% + \G@refundefinedtrue + \@latex@warning + {Citation `\@citeb' on page \thepage \space undefined}}% + {\ifx\csname r@fancy:cite:\@citeb\endcsname\undefined \@cite@ofmt{\csname b@\@citeb\endcsname}\else\tooltip*{\@cite@ofmt{\csname b@\@citeb\endcsname}}{fancy:cite:\@citeb}\fi + }}}{##1}}% \else -\def\TooltipRefmark{\hbox {\smash{\raisebox{0.4em}{\includegraphics[width=0.7em]% - {fancytipmark.eps}}}}}% -\fi%\ifTooltip@usepdftex +\def\NAT@citea@mbox{% + \@citea\mbox{\NAT@hyper@{{\citenumfont{\NAT@num}}}}\tooltip*{}{fancy:cite:\@citeb}} +\fi } +\if@fancytooltips@nosoap + \def\TooltipRefmark{\hbox{\ }}% +\else + \ifTooltip@usepdftex + \def\TooltipRefmark{\hbox {\smash{\raisebox{0.4em}{\includegraphics[width=0.7em]% + {fancytipmark\@@fancytipmark.pdf}}}}}% + \else + \def\TooltipRefmark{\hbox {\smash{\raisebox{0.4em}{\includegraphics[width=0.7em]% + {fancytipmark.eps}}}}}% + \fi%\ifTooltip@usepdftex +\fi%\if@fancytooltips@nosoap + +\if@fancytooltips@preview\AtBeginDocument{\fancypreview@refhook}\fi + \if@fancytooltips@createtips \newwrite\tipfile \immediate\openout\tipfile \jobname.tips @@ -168,12 +201,17 @@ if (this.getField("animtiph") == null) \ifTooltip@usepdftex \RequirePackage[pdftex]{eforms} \def\TooltipExtratext{\hbox{\smash{\raisebox{0.4em}{\includegraphics[width=0.7em]% - {fancytipmark.pdf}}}}} + {fancytipmark\@@fancytipmark.pdf}}}}} \else \RequirePackage[dvips]{eforms} \def\TooltipExtratext{\hbox{\smash{\raisebox{0.4em}{\includegraphics[width=0.7em]% {fancytipmark.eps}}}}} \fi%\ifTooltip@usepdftex + +\if@fancytooltips@nosoap + \def\TooltipExtratext{\hbox{\ }}% +\fi%\if@fancytooltips@nosoap + \if@fancytooltips@extratext\else\let\TooltipExtratext\relax\fi \AtBeginDocument{ @@ -226,7 +264,8 @@ if (this.getField("animtiph") == null) \def\@ocg@makeknown#1#2#3{}\fi \fi -\if@fancytooltips@fg\else +\if@fancytooltips@fg +\else \RequirePackage{eso-pic} \def\frametip{% \expandafter\ifx \csname TooltipPage\thepage\endcsname\relax @@ -240,6 +279,7 @@ if (this.getField("animtiph") == null) \def\fancytooltips@save@position{\pdfsavepos% \write\@auxout{\string\global\string \fancy@layerVshift \the\pdflastypos sp\string\relax}% \write\@auxout{\string\global\string \fancy@layerHshift \the\pdflastxpos sp\string\relax}% + \global\let\fancytooltips@save@position\relax% } \def\fancy@beginshipout@hook{} @@ -248,7 +288,7 @@ if (this.getField("animtiph") == null) \setbox\AtBeginShipoutBox=\hbox{% \hbox to 0 pt{\TooltipHidden}\global\def\TooltipHidden{}% \fancy@beginshipout@hook\if@fancytooltips@fixcolor\hbox to 0 pt{\resizebox{1pt}{!}{\TooltipExtratext}\hss}\fi - \hbox{\box\AtBeginShipoutBox}% + \hbox to 0 pt{\box\AtBeginShipoutBox\hss}% \ifTooltip@usepdftex \fancytooltips@save@position \if@fancytooltips@blur @@ -260,16 +300,16 @@ if (this.getField("animtiph") == null) \vbox to 0 pt{\vss\hbox{\vrule width \paperwidth height \paperheight}}% \end{ocg}\hss}% \fi - \fi + \fi%\if@fancytooltips@blur \if@fancytooltips@fg - \expandafter\ifx \csname TooltipPage\thepage\endcsname\relax - \else - \lower\fancy@layerVshift\vbox to 0 pt{\vss\hbox to 0 pt{\kern-\fancy@layerHshift\relax\hbox{\frametip@}\hss}}% - \fi - \lower\fancy@layerVshift\vbox to 0 pt{\vss\hbox to 0 pt{\kern-\fancy@layerHshift\relax\hbox to 0 pt{\the\pos@fancy@toks\hss}}}% - \fi - \fi - }% + \expandafter\ifx \csname TooltipPage\thepage\endcsname\relax + \else + \lower\fancy@layerVshift\vbox to 0 pt{\vss\hbox to 0 pt{\kern-\fancy@layerHshift\relax\hbox{\frametip@}\hss}}% + \fi%\ifx + \lower\fancy@layerVshift\vbox to 0 pt{\vss\hbox to 0 pt{\kern-\fancy@layerHshift\relax\hbox to 0 pt{\the\pos@fancy@toks\hss}\hss}}% + \fi%\if@fancytooltips@fg + \fi%\ifTooltip@usepdftex + \kern\hsize}% }% \definecolor{tooltipcolor}{rgb}{0,0,1} |