diff options
author | Karl Berry <karl@freefriends.org> | 2007-03-18 23:44:11 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-03-18 23:44:11 +0000 |
commit | b258a3e8678fb74008868627b815aa566c87f561 (patch) | |
tree | ea47ad5210d16019f1f47e353e905c4e9d13f85e /Master/texmf-dist/source | |
parent | 60b16cc4ebfd06c89381dd6927e20246d3c08bff (diff) |
fancytooltips update (12mar07)
git-svn-id: svn://tug.org/texlive/trunk@4053 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r-- | Master/texmf-dist/source/latex/fancytooltips/fancytooltips.dtx | 387 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/fancytooltips/fancytooltips.ins | 4 |
2 files changed, 227 insertions, 164 deletions
diff --git a/Master/texmf-dist/source/latex/fancytooltips/fancytooltips.dtx b/Master/texmf-dist/source/latex/fancytooltips/fancytooltips.dtx index 1738def53a6..2c6824d699f 100644 --- a/Master/texmf-dist/source/latex/fancytooltips/fancytooltips.dtx +++ b/Master/texmf-dist/source/latex/fancytooltips/fancytooltips.dtx @@ -22,7 +22,7 @@ %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{fancytooltips} %<*package> - [2007/02/20 v1.1 fancytooltips.dtx file] + [2007/03/01 v1.2 fancytooltips.dtx file] %</package> % %<*driver> @@ -32,7 +32,7 @@ \RecordChanges \usepackage[pdftex]{eforms} \usepackage[pdftex]{color} -\usepackage[filename=tip]{fancytooltips} +\usepackage[filename=tip,movetips]{fancytooltips} \buttontipwidth=2cm \buttontipheight=2cm \begin{document} @@ -44,7 +44,7 @@ %</driver> % \fi % -% \CheckSum{332} +% \CheckSum{353} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -64,9 +64,16 @@ % % % \changes{v1.0}{2007/02/15}{Initial version} +% % \changes{v1.1}{2007/02/20}{Clener code, better documentation, fix % for bug with delayinterval macro, support for dvips and DIstiller -% users.} +% users.} +% +% \changes{v1.2}{2007/03/01}{Better support for dvips users, buttons +% for icons are created automatically using eso-pic package and have +% the name "ikona.pagenumber", new option movetips, tooltip appears +% on the current page only and, as a consequence, animations are +% faster.} % % \GetFileInfo{fancytooltips.dtx} % @@ -81,27 +88,24 @@ % % \section{Introduction} % -% \null\hfill\TooltipHidden\frametip\\ % The package |fancytooltips| is a package for \LaTeX. The pdf can be % created by pdflatex or by latex + dvips + % AdobeDistiller\footnote{not free ps2pdf} + Adobe % Acrobat\footnote{not free Adobe Reader.}. It allows to create % tooltips in a similar way like |cooltooltips| package, but the % tooltip is a page from another PDF file. In this way you can use -% also mathematics, pictures and animations in your tooltips. The +% mathematics, pictures and animations in your tooltips. The % resulting PDF file can be used also with free Abobe Reader. % -% The \color{black}tooltips are activated by |MouseOver| action with -% pressed |Shift| button down or by |MouseDown| action. The tooltips -% are deactivated after closing page or by moving mouse outside the -% link. You can try the links \tooltip{here}{1} (Einstein's formula) -% and also \tooltipanim{here}{2}{7} (animation -- numbers from 1 to -% 6). Tooltip appears on the right boundary of the first paragraph. -% You have to use the free Adobe Reader or nonfree Adobe Acrobat to -% see the effect (xpdf, evince and others fail to work with -% JavaScripts). For more examples how the presentation may look like -% see the |example.pdf| and |example-min.pdf| files in the |examples| -% subdirectory. +% The \color{black}tooltips are activated by clicking the active area +% on the screen and deactivated after closing page or by moving mouse +% outside the link. You can try the links \tooltip{here}{1} +% (Einstein's formula) and also \tooltipanim{here}{2}{7} (animation -- +% numbers from 1 to 6). You have to use the free Adobe Reader or +% nonfree Adobe Acrobat to see the effect (xpdf, evince and others +% fail to work with JavaScripts). For more examples how the +% presentation may look like see the |example.pdf| and +% |example-min.pdf| files in the |examples| subdirectory. % % The buttons are created using |eforms.sty| which is a part of % AcroTeX bundle. @@ -110,57 +114,49 @@ % \subsection{The file with tooltips} % The file with tooltips is an ordinary pdf file, one tooltip per % page, tooltips should be in the top right corner at the page, in a -% colored box and the rest of the page should be -% transparent\footnote{See the example file \texttt{tooltipy.tex} and -% \texttt{tooltipy.pdf} which make use of \texttt{geometry.sty} -% package to set the page dimensions and \texttt{\string\colorbox} -% and \texttt{minipage} to make the box with tooltip}. We also -% provide simple cross referencing mechanism to reffer to the -% tooltips. If the pdf file is created by \LaTeX, -% \DescribeMacro{\keytip} you can define keywords to reffer to the -% pages using |\keytip| command. Simply put -% |\usepackage[createtips]{fancytooltips}| into preamble and write -% \texttt{\string\keytip}\marg{foo} in document. This writes +% colored box and the rest of the page should be transparent. If you +% consider to use |movetips| option (see below), then every page +% should have the dimensions equal to the dimensions of the colored +% box with tooltip\footnote{Look at the files \texttt{tooltipy.tex} and +% \texttt{tooltipy.pdf} from |examples| subdirectory for a simple example +% how to meet this condition under pdf\LaTeX}. We also provide +% simple cross referencing mechanism to reffer to the tooltips. If the +% pdf file is created by \LaTeX, \DescribeMacro{\keytip} you can +% define keywords to reffer to the pages using |\keytip| command. +% Simply put |\usepackage[createtips]{fancytooltips}| into preamble +% and write \texttt{\string\keytip}\marg{foo} in document. This writes % information about keyword \meta{foo} and the pagenumber into file % |fancytips.tex|. % % \subsection{The file with presentation -- pdf\LaTeX users} % In the file with presentation, the user is responsible % \begin{itemize} -% \item to include package |eforms| with |pdftex| option before -% loading fancytooltips package, and +% \item to load package |eforms| with |pdftex| option before +% loading fancytooltips package, % \item input either |color| or |xcolor| package in the -% preamble. +% preamble +% \item \LaTeX{} the file two times (we write some macros into |aux| +% file). % \end{itemize} -% This is not convenient for the user, but everybody uses different -% package and from this reason, this part is left to the user. (And -% among others, the |color| or |xcolor| package is probably inputted -% by the package which is used to build the presentation.) +% This is not comfortable for the user, but everybody uses different +% set of packages and from this reason, this part is left to the user. +% (And among others, the |color| or |xcolor| package is probably +% inputted by the package which is used to build the presentation.) % -% To input the tooltips from file \meta{foo.pdf} call the package with -% \meta{filename} option |\usepackage[filename=foo]{fancytooltips}|, -% input images for tooltips somewhere in the document using -% \DescribeMacro{\TooltipHidden} macro |\TooltipHidden| -% \DescribeMacro{\frametip} and put the macro |\frametip| on every -% page\footnote{In the current document the \texttt{\string\frametip} -% command was used only once in the first paragraph, since we have -% tooltips in this paragraph only and the tooltips in the top right -% corner of the page would be outside of the screen in most cases.} -% in the right top corner of your document\footnote{See the file -% \texttt{example.tex} and \texttt{example-min.tex} to know how to -% achieve this with the \texttt{pdfscrren.sty} presentation bundle -% and pure \texttt{article.cls} class, respectively.}. -% \DescribeMacro{\buttontipwidth} \DescribeMacro{\buttontipheight} The -% dimensions of button with tooltips (created by |\frametip| macro) -% are stored in the |\buttontipwidth| and |\buttontipheight| length -% variables. If the page with tooltip is bigger, it is resized to fit -% into the button. You can change it for example by -% |\buttontipwidth=4in|. To get expected results (tooltips in the top -% right corner) these lengths should be equal or constant multiples of -% the page dimensions of the file with tooltips. The button is inside -% a box with zero dimensions and hence the box produced by |\frametip| -% command has zero dimensions. +% \DescribeMacro{filename option} To input the tooltips from file +% \meta{foo.pdf} call the package with |filename| option: +% |\usepackage[filename=foo]{fancytooltips}|. % +% \DescribeMacro{movetips option} By default, tooltip appears in the +% top right corner of the page (use View--PageLayout-Single Page in +% your Adobe Reader, please). If the option |movetips| is used, then +% tooltip appears close to the mouse pointer. More preciselly, tooltip +% appears with left down corner at the mouse position, if there is +% enough place. If not, tooltip appears with right down corner at the +% mouse position. Finally, the tooltip is shifted down to fit the +% page, if nesessary\footnote{This option works in this way if every +% page of the file with tooltips has dimensions of the box with +% tooltip. See the \texttt{examples} subdirectory.}. % % \DescribeMacro{\tooltip} The user can put the tooltip into her or % his presentation using the command @@ -173,7 +169,7 @@ % value is small blue soap in a box with zero dimensions, as you have % seen in the second paragraph of this documentation. There is a % package option |noextratext| which defines |\TooltipExtratext| to be -% empty. +% empty. \DescribeMacro{noextratext option} % % \DescribeMacro{\tooltipanim} The user can put a series (animation) of % tooltips into the presentation by using @@ -183,23 +179,30 @@ % The delay between two frames is |\delayinterval| milliseconds. The % default value is 200, you can change it by command % |\def\delayinterval{100}|. +% +% The file |example.tex| from |exmaples| subdirectory shows, how to +% redefine these macros to gain different behavior, see the demo file +% |example.pdf|. +% % \subsection{Changes for dvips users} % dvips users have to specify option |dvips| in both |fancytips| and -% |eforms| packages. They have to use also a |pages| option with the -% number of pages in the PDF file with tooltips. You have to call the -% package by +% |eforms| packages. \DescribeMacro{pages option} They have to use +% also a |pages| option with the number of pages in the PDF file with +% tooltips. You have to call the package by % something like this:\\ % |\usepackage[dvips]{eforms}|\\ % |\usepackage[dvips,filename=tooltipy,pages=27]{fancytooltips}| % -% You have to |latex| and |dvips| your file. This produces -% |filename.ps| and |Tooltipsdljs.fdf| files. Distill the pdf file -% into |filename.pdf| and open this file by Adobe Acrobat - this -% imports macros from |Tooltipsdljs.fdf| file. In Acrobat's JavaScript -% console (|Crtl+J|) run (|Ctrl+Enter|) the command |ImportIcons();| -% which is defined for the document and it imports the icons and -% returns 1. The file with pdf icon must be in the working directory. -% Then save the file under another name. +% You have to |latex| (two times) and |dvips| your file first. This +% produces |filename.ps| and |Tooltipsdljs.fdf| files. Distill the pdf +% file into |filename.pdf| and open this file by Adobe Acrobat - this +% imports macros from |Tooltipsdljs.fdf| file. In Acrobat's +% JavaScript console (|Crtl+J|) run (|Ctrl+Enter|) the command +% |ImportTooltips();| which is defined for the document and it creates +% invisible buttons on the first page, imports icons (the file with +% icons specified as \meta{filename} parameter when loading +% fancytooltips must be in working directory) and returns 1. Then +% save the file under another name. % % \StopEventually{} % @@ -209,6 +212,7 @@ \RequirePackage{everyshi} \RequirePackage{graphicx} \RequirePackage{xkeyval} +\RequirePackage{eso-pic} \newif\ifcreatetips\createtipsfalse \DeclareOptionX{createtips}{\createtipstrue} @@ -219,6 +223,9 @@ \newif\ifextratext\extratexttrue \DeclareOptionX{noextratext}{\extratextfalse} +\newif\ifmovetips\movetipsfalse +\DeclareOptionX{movetips}{\movetipstrue} + \DeclareOptionX{filename}{\xdef\TooltipFilename{#1}} \DeclareOptionX{pages}{\xdef\TooltipPages{#1}} @@ -230,12 +237,12 @@ \ifTooltip@usepdftex \def\TooltipExtratext{\hbox to 0 pt{\smash - {\raisebox{0.5em}{\includegraphics[width=1em]% - {fancytooltipsmark.pdf}}}\hss}} + {\raisebox{0.5em}{\includegraphics[width=0.7em]% + {fancytipmark.pdf}}}\hss}} \else \def\TooltipExtratext{\hbox to 0 pt{\smash - {\raisebox{0.5em}{\includegraphics[width=1em]% - {fancytooltipsmark.eps}}}\hss}} + {\raisebox{0.5em}{\includegraphics[width=0.7em]% + {fancytipmark.eps}}}\hss}} \fi%\ifTooltip@usepdftex \ifextratext\else\let\TooltipExtratext\relax\fi @@ -250,111 +257,108 @@ \def\keytip#1{\write\tipfile{\string\tooltipname{#1}{\arabic{page}}}} \else % \end{macrocode} -% If dvips is used, we define icons by the command |\eqIcon| stolen -% from |exerquiz.sty|. The following definitions are verbatim copy from -% |exerquiz.sty|. The definition of |\eqIconDefaults| contains some -% customizations. +% This part is processed if the option |createtips| is not used. We +% define macros which put the hidden button with the name |ikona.n| in +% the backgoud of the page |n|, if one of the commands |\tooltip| or +% |\tooltipanim| has been used on this page. Javascripts defined by +% |\tooltip| and |\tooltipanim| commands then unhide this button and +% show the corresponding picture. % \begin{macrocode} -\ifTooltip@usepdftex\else -\ifx\everyeqIcon\undefined -\newcommand\everyeqIcon[1]{\def\every@eqIcon{#1}} + +\newdimen\buttontipwidth +\newdimen\buttontipheight +\AtBeginDocument{ +\buttontipwidth=\paperwidth +\buttontipheight=\paperheight +} + +\ifTooltip@usepdftex +\def\frametip@{% + \pdfstartlink user{% + /Subtype /Widget + /F 6 + /T (ikona.\thepage) + /FT /Btn + /Ff 65536 + /H /N + /BS << /W 1 /S /S >> + /MK << /TP 1 /IF <</A[1.0 1.0]/SW /B>> >> + }% + \vbox to \buttontipheight {\vss\hbox to \buttontipwidth{\hss}}\pdfendlink} +\else +% \end{macrocode} +% For dvips users we use the macros from eqxerquiz.sty package. +% \begin{macrocode} +\def\everyeqIcon#1{\def\every@eqIcon{#1}} \def\every@eqIcon{} -\newcommand\eqIcon[4][] +\newcommand\eqIconFTT[4][] {% \push@@Button{#1}{#2}{#3}{#4}{}{\eq@setButtonProps\eq@Button@driver}% {\eqIconDefaults\every@ButtonField\every@eqIcon}% } -\fi%\ifx\everyeqIcon\undefined \def\eqIconDefaults {% - \rawPDF{}\S{}\mkIns{/TP 1 /IF<</A[1.0 1.0]/SW/B>>}\R{270} + \rawPDF{}\S{}\mkIns{/TP 1 /IF<</A[1.0 1.0]/SW/B>>}\R{0} \CA{}\RC{}\AC{}\BC{}\BG{}\H{B} \textColor{0 g}\Ff{\FfReadOnly} } +\def\frametip@{\eqIconFTT[\BC{}\BG{}\F{\FHidden}]% + {ikona.\thepage}{\paperwidth}{\paperheight}}% \fi%\ifTooltip@usepdftex -% \end{macrocode} -% Macro |\frametip| creates button in which tooltips appear. You have -% to use macro |\frametip| on every page in your presentation in right -% top corner (see the directory |examples|). -% \begin{macrocode} -\def\frametip{\vbox to 0 pt{\hbox to 0 pt{\hss\buttontip}\vss}} -\newdimen\buttontipwidth \buttontipwidth=5in -\newdimen\buttontipheight \buttontipheight=5in -\ifTooltip@usepdftex -\def\buttontip{% -\pdfstartlink user{% - /Subtype /Widget - /F 6 - /T (ikona) - /FT /Btn - /Ff 65536 - /H /N - /BS << /W 1 /S /S >> - /MK << /TP 1 /IF <</SW /B>> >> -}% -\vbox to \buttontipheight {\vss\hbox to \buttontipwidth{\hss}}\pdfendlink} -\else -\def\buttontip{% - \eqIcon[\BC{}\BG{}\F{\FHidden}]{ikona}{\buttontipwidth}{\buttontipheight} - } -\fi%\ifTooltip@usepdftex + +\def\frametip{% + \expandafter\ifx \csname TooltipPage\thepage\endcsname\relax + \else + \setbox0=\hbox{\frametip@}% + \hbox{\raise \dp0 \box0} + \fi}% +\AddToShipoutPicture{\hbox to 0 pt{\frametip\hss}} % \end{macrocode} % In the macros |\tooltip| and |\tooltipanim| we print the text into % box with zero dimensions and then we build a button which covers -% this text and has an associated JavaScript action. +% this text and has an associated JavaScript action. The important +% part is the |\PushButton| macro. You can adjust these macros or +% write similar macros which do what you need. For some exmaples see +% the file |example.tex| from the examples directory. % \begin{macrocode} \definecolor{tooltipcolor}{rgb}{0,0,1} -\def\tooltip#1#2{\checkTipNumber{#2}% - \edef\TipNumber{\FindTipNumber{#2}}% +\def\TooltipPage#1{\expandafter\gdef\csname TooltipPage#1\endcsname{#1}} +\def\tooltip#1#2{% + \write\@auxout{\noexpand\TooltipPage{\thepage}}% + \checkTipNumber{#2}\edef\TipNumber{\FindTipNumber{#2}}% + \leavevmode \setbox0=\hbox{{\color{tooltipcolor}{#1}}}\hbox to 0 pt{{\copy0\TooltipExtratext\hss}}% - \pushButton[\BC{}\BG{}\S{}\AA{ - \AAMouseExit{\JS{CloseTooltips();}} - \AAMouseEnter{\JS{ - try {app.clearInterval(animace);}catch (e) {} - if (event.shift) {this.getField("ikona").hidden=false; - this.getField('ikona').buttonSetIcon(this.getField("animtiph\TipNumber").buttonGetIcon());}}} - } - \A{\JS{this.getField("ikona").hidden=false; + \pushButton[\BC{}\BG{}\S{}\AA{\AAMouseExit{\JS{CloseTooltips();}}} + \A{\JS{this.getField("ikona."+(this.pageNum+1)).hidden=false; try {app.clearInterval(animace);}catch (e) {} - this.getField('ikona').buttonSetIcon(this.getField("animtiph\TipNumber").buttonGetIcon());}}] + \ifmovetips nastav(\TipNumber);\fi + zobraz(\TipNumber); + }}] {TooltipField}{\wd0}{\ht0}} \def\delayinterval{200} \def\tooltipanim#1#2#3{% + \write\@auxout{\noexpand\TooltipPage{\thepage}}% \checkTipNumber{#2}\edef\TipNumberA{\FindTipNumber{#2}}% \checkTipNumber{#3}\edef\TipNumberB{\FindTipNumber{#3}}% + \leavevmode \setbox0=\hbox{{\color{tooltipcolor}{#1}}}\hbox to 0 pt{{\copy0\TooltipExtratext\hss}}% - \pushButton[\BC{}\BG{}\S{}\AA{ - \AAMouseExit{\JS{CloseTooltips();}} - \AAMouseEnter{\JS{ - var cislo=\TipNumberA; - try {app.clearInterval(animace);}catch (e) {} - function animuj() - { - if (cislo<\TipNumberB) cislo=cislo+1; - this.getField('ikona').buttonSetIcon(this.getField("animtiph"+cislo).buttonGetIcon()); - }; - if (event.shift) { - this.getField('ikona').buttonSetIcon(this.getField("animtiph"+\TipNumberA).buttonGetIcon()); - this.getField("ikona").hidden=false; - animace=app.setInterval('animuj();', \delayinterval); - } - }} - } + \pushButton[\BC{}\BG{}\S{}\AA{\AAMouseExit{\JS{CloseTooltips();}}} \A{\JS{ try {app.clearInterval(animace);}catch (e) {} var cislo=\TipNumberA; + \ifmovetips nastav(\TipNumberA);\fi function animuj() { if (cislo<\TipNumberB) cislo=cislo+1; - this.getField('ikona').buttonSetIcon(this.getField("animtiph"+cislo).buttonGetIcon()); + this.getField('ikona.'+(this.pageNum+1)).buttonSetIcon(this.getField("animtiph."+cislo).buttonGetIcon()); }; - this.getField('ikona').buttonSetIcon(this.getField("animtiph"+\TipNumberA).buttonGetIcon()); - this.getField("ikona").hidden=false; + this.getField('ikona.'+(this.pageNum+1)).buttonSetIcon(this.getField("animtiph."+\TipNumberA).buttonGetIcon()); + this.getField("ikona."+(this.pageNum+1)).hidden=false; animace=app.setInterval('animuj();', \delayinterval); }} ]{TooltipField}{\wd0}{\ht0}} % \end{macrocode} -% This code for |pdftex| closes tooltip if the page is closed. +% This code closes tooltip if the page is closed. % \begin{macrocode} \ifTooltip@usepdftex \def\TooltipPageopencloseJS{ \global\pdfpageattr{% @@ -377,24 +381,89 @@ var animace; function CloseTooltips() { - this.getField("ikona").hidden=true; + try {this.getField("ikona").hidden=true;}catch (e) {} try {app.clearInterval(animace);}catch (e) {} } + + function nastav(cislo) + { + var f=this.getField("ikona."+(this.pageNum+1)); + var g=this.getField("animtiph."+cislo); + var sourf=f.rect; + var sourg=g.rect; + if ((mouseX+sourg[2]-sourg[0])<sourf[2]) + var percX=100*(mouseX-sourf[0])/((sourf[2]-sourf[0])-(sourg[2]-sourg[0])); + else + var percX=100*(mouseX-sourf[0]-(sourg[2]-sourg[0]))/((sourf[2]-sourf[0])-(sourg[2]-sourg[0])); + var percY=100*(mouseY-sourf[3])/((sourf[1]-sourf[3])-(sourg[1]-sourg[3])); + if (percX>100) percX=100; + if (percY>100) percY=100; + if (percX<0) percX=0; + if (percY<0) percY=0; + f.buttonAlignX=percX; + f.buttonAlignY=percY; + } + + function zobraz(cislo) + { + var f=this.getField("ikona."+(this.pageNum+1)); + var g=this.getField("animtiph."+cislo); + f.hidden=false; + f.buttonSetIcon(g.buttonGetIcon()); + } \end{insDLJS} \else \begin{insDLJS}[clearTooltips]{Tooltipsdljs}{My Private DLJS for Tooltips} var animace; function CloseTooltips() { - this.getField("ikona").hidden=true; + try {this.getField("ikona").hidden=true;}catch (e) {} try {app.clearInterval(animace);}catch (e) {} } + function ImportTooltips() { + console.println("importing pictures"); for (var i=1;i<=\TooltipPages;i++) - {this.getField("animtiph"+i).buttonImportIcon("\TooltipFilename.pdf",(i-1));} + { + this.insertPages(this.numPages-1,"\TooltipFilename.pdf",(i-1),(i-1)); + var rozm=this.getPageBox("Crop",this.numPages-1); + this.deletePages(this.numPages-1); + var p=this.addField("animtiph."+i,"button",0,rozm); + p.buttonPosition=position.iconOnly; + p.hidden=true; + this.getField("animtiph."+i).buttonImportIcon("\TooltipFilename.pdf",(i-1)); + } + console.println("imported \TooltipPages pictures"); return(1); } + + function nastav(cislo) + { + var f=this.getField("ikona."+(this.pageNum+1)); + var g=this.getField("animtiph."+cislo); + var sourf=f.rect; + var sourg=g.rect; + if ((mouseX+sourg[2]-sourg[0])<sourf[2]) + var percX=100*(mouseX-sourf[0])/((sourf[2]-sourf[0])-(sourg[2]-sourg[0])); + else + var percX=100*(mouseX-sourf[0]-(sourg[2]-sourg[0]))/((sourf[2]-sourf[0])-(sourg[2]-sourg[0])); + var percY=100*(mouseY-sourf[3])/((sourf[1]-sourf[3])-(sourg[1]-sourg[3])); + if (percX>100) percX=100; + if (percY>100) percY=100; + if (percX<0) percX=0; + if (percY<0) percY=0; + f.buttonAlignX=percX; + f.buttonAlignY=percY; + } + + function zobraz(cislo) + { + var f=this.getField("ikona."+(this.pageNum+1)); + var g=this.getField("animtiph."+cislo); + f.hidden=false; + f.buttonSetIcon(g.buttonGetIcon()); + } \end{insDLJS} \fi % \end{macrocode} @@ -408,16 +477,15 @@ \count@=0 \@whilenum\count@<\TooltipPages \do{% \tooltip@count=\count@ - \advance \tooltip@count by 1 + \advance \tooltip@count by 1% \bgroup \immediate\pdfximage - width 0 pt height 0 pt depth 0 pt page \the\tooltip@count{\TooltipFilename.pdf}% \mbox{\leavevmode - \pdfstartlink user{ + \vbox to 0 pt{\vss\hbox to 0 pt{\pdfstartlink user{% /Subtype /Widget /F 6 - /T (animtiph\the\tooltip@count) + /T (animtiph.\the\tooltip@count) /FT /Btn /Ff 65536 /H /N @@ -428,22 +496,14 @@ /IF << /SW /A >> >> }% - \pdfendlink}% + \phantom{\pdfrefximage \pdflastximage}% + \pdfendlink\hss}}}% \egroup \advance\count@\@ne}% } +\AddToShipoutPicture*{\hbox to 0 pt{\TooltipHidden}} \else -\def\TooltipHidden{% - \count@=0 - \@whilenum\count@<\TooltipPages \do{% - \tooltip@count=\count@ - \advance \tooltip@count by 1 - \bgroup - \eqIcon[\BC{}\BG{}\F{\FHidden}] - {animtiph\the\tooltip@count}{0cm}{0cm}% - \egroup - \advance\count@\@ne}% -} +\let\TooltipHidden\relax \fi % \end{macrocode} % The keywords for the tooltips can be stored in the file @@ -472,3 +532,6 @@ % % \Finale \endinput + + + diff --git a/Master/texmf-dist/source/latex/fancytooltips/fancytooltips.ins b/Master/texmf-dist/source/latex/fancytooltips/fancytooltips.ins index 4559bb89318..03c6ac387eb 100644 --- a/Master/texmf-dist/source/latex/fancytooltips/fancytooltips.ins +++ b/Master/texmf-dist/source/latex/fancytooltips/fancytooltips.ins @@ -45,8 +45,8 @@ and version 1.2 or later is part of all distributions of LaTeX version \Msg{* files into a directory searched by TeX: *} \Msg{* *} \Msg{* fancytooltips.sty *} -\Msg{* fancytooltipsmark.pdf *} -\Msg{* fancytooltipsmark.eps *} +\Msg{* fancytipmark.pdf *} +\Msg{* fancytipmark.eps *} \Msg{* *} \Msg{* To produce the documentation run the file *} \Msg{* fancytooltips.dtx through LaTeX. *} |