summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/fancytooltips/examples/example.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/fancytooltips/examples/example.tex')
-rw-r--r--Master/texmf-dist/doc/latex/fancytooltips/examples/example.tex251
1 files changed, 228 insertions, 23 deletions
diff --git a/Master/texmf-dist/doc/latex/fancytooltips/examples/example.tex b/Master/texmf-dist/doc/latex/fancytooltips/examples/example.tex
index 098c0e77770..1ec2ded7d5f 100644
--- a/Master/texmf-dist/doc/latex/fancytooltips/examples/example.tex
+++ b/Master/texmf-dist/doc/latex/fancytooltips/examples/example.tex
@@ -1,16 +1,11 @@
\documentclass{article}
\usepackage[screen,panelright]{pdfscreen}
-
\usepackage[pdftex]{eforms}
-\usepackage[filename=tooltipy]{fancytooltips}
+\usepackage[filename=tooltipy,movetips]{fancytooltips}
+
-% \buttontipwidth=3in
-% \buttontipheight=3in
-% \def\delayinterval{50}
-% \def\TooltipExtratext{}
-% \definecolor{tooltipcolor}{rgb}{1,0,0}
\panelwidth=0.73in
\setlength\buttonwidth{.9\panelwidth}
@@ -36,7 +31,7 @@
%%% This is a trick which puts \frametip on every page
\def\@@logo#1{%
- \hfill\frametip \\%%%%% tady je to tlacitko
+% \hfill\frametip \\%%%%% tady je to tlacitko
\global\setbox0=\hbox{
\includegraphics{#1}}%
\ifdim\ht0>\wd0%
@@ -91,48 +86,258 @@
\Acrobatmenu{Quit}{\addButton{\buttonwidth}{\@Panelquitname}}\\
}
-\makeatother
+
+
+\makeatother
+
\let\rmdefault\sfdefault
+\usepackage[czech]{babel}
+\usepackage[IL2]{fontenc}
\usepackage{amsmath}
\usepackage[shadein]{shadethm}
-\newshadetheorem{definice}{Definice}
+\newshadetheorem{definice}{Definition}
\usepackage{graphicx}
+\definecolor{bkg}{rgb}{1,0.9,0.9}
+\def\Message#1{\colorbox{bkg}{
+ \begin{minipage}{1\linewidth}
+ \smallskip
+ #1
+ \smallskip
+ \end{minipage}
+ }}
\begin{document}
\parindent 0 pt
+\Message{
\begin{itemize}
-\item The blue text is active button. If you move mouse to this button
- with Shift key down or if you press this button, tooltip appears. Is
- you move your mouse out or if you close the page, the tooltip
- disappears.
-\item The first links are tooltips, the third one is animated tooltip.
- have a fun
+\item Use Acrobat Reader or Adobe Acrobat and View--Page
+ Layout--Single page to view this file, please.
+\item The blue text is active button. If you \textbf{click} one of
+ these buttons, tooltip appears. If you move your mouse out or if you
+ close the page, the tooltip disappears.
+\item The first links are tooltips, the fifth one is animated tooltip.
+\item The tooltips appears with the left down corner at the mouse
+ cursor, or at least as close as possible. Click on different
+ positions of the same button and have a fun.
\end{itemize}
+}
+
\begin{definice}
- This is definition of \tooltip{rank}{hodnost}. bla bla bla.
+ This is definition of \tooltip{rank}{2}. bla bla bla.
\end{definice}
\begin{definice}
- This is definition of \tooltip{derivative}{derivace}.
+ This is \tooltip{definition}3 of \tooltip{derivative}{1}\hfill
+ \tooltip{derivative}{1}.
\end{definice}
-This is a geometric \tooltipanim{idea}{3}{27} which is behind the definition of derivative.
+This is a geometric \tooltipanim{idea}{4}{28} which is behind the
+definition of derivative.
+
+
+\vfill
+\begin{definice}
+ This is \tooltip{definition}3 of \tooltip{derivative}{1}\hfill
+ \tooltip{derivative}{1}.
+\end{definice}
\newpage
-Page 2
+\makeatletter
+\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{this.getField("ikona."+(this.pageNum+1)).hidden=false;
+ try {app.clearInterval(animace);}catch (e) {}
+ \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{
+ try {app.clearInterval(animace);}catch (e) {}
+ var cislo=\TipNumberA;
+ \ifmovetips nastav(\TipNumberA);\fi
+ function animuj()
+ {
+ if (cislo<\TipNumberB) cislo=cislo+1;
+ this.getField('ikona.'+(this.pageNum+1)).buttonSetIcon(this.getField("animtiph."+cislo).buttonGetIcon());
+ };
+ 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}}
+
+\makeatother
+
+\Message{
+\begin{itemize}
+\item The macros for tooltips are redefined on this page (see the
+ source tex file).
+\item The blue text is active button again, but the tooltip is
+ activated by \textbf{MouseOver} action.
+\item The advantage is that the reader can use Page Up and Down keys,
+ which do not work if th button is clicked.
+\end{itemize}}
+\begin{definice}
+ This is definition of \tooltip{rank}{2}. bla bla bla.
+\end{definice}
+
+
+\begin{definice}
+ This is \tooltip{definition}3 of \tooltip{derivative}{1}\hfill
+ \tooltip{derivative}{1}.
+\end{definice}
+
+This is a geometric \tooltipanim{idea}{4}{28} which is behind the
+definition of derivative.
+
+
+\vfill
+\begin{definice}
+ This is \tooltip{definition}3 of \tooltip{derivative}{1}\hfill
+ \tooltip{derivative}{1}.
+\end{definice}
-Here we speak more about \tooltip{rank}{hodnost}
\newpage
-Page 3
-\TooltipHidden
+
+\makeatletter
+\def\tooltip#1#2{%
+ #1%
+ \write\@auxout{\noexpand\TooltipPage{\thepage}}%
+ \checkTipNumber{#2}\edef\TipNumber{\FindTipNumber{#2}}%
+ \leavevmode
+ \setbox0=\hbox{{\raisebox{0.3em}{\includegraphics[width=0.7em]%
+ {fancytipmark.pdf}}}}\hbox to 0 pt{\hskip -0.0em\copy0\hss}%
+ \hbox to 0 pt{\pushButton[\BC{}\BG{}\S{}\AA{\AAMouseExit{\JS{CloseTooltips();}}
+ \AAMouseEnter{\JS{this.getField("ikona."+(this.pageNum+1)).hidden=false;
+ try {app.clearInterval(animace);}catch (e) {}
+ \ifmovetips nastav(\TipNumber);\fi
+ zobraz(\TipNumber);
+ }}}]
+ {TooltipField}{\wd0}{\ht0}\hss}}
+\def\delayinterval{200}
+\def\tooltipanim#1#2#3{%
+ #1%
+ \write\@auxout{\noexpand\TooltipPage{\thepage}}%
+ \checkTipNumber{#2}\edef\TipNumberA{\FindTipNumber{#2}}%
+ \checkTipNumber{#3}\edef\TipNumberB{\FindTipNumber{#3}}%
+ \leavevmode
+ \setbox0=\hbox{{\raisebox{0.3em}{\includegraphics[width=0.7em]%
+ {fancytipmark.pdf}}}}\hbox to 0 pt{\hskip -0.0em\copy0\hss}%
+ \hbox to 0 pt{%
+ \pushButton[\BC{}\BG{}\S{}\AA{\AAMouseExit{\JS{CloseTooltips();}}
+ \AAMouseEnter{\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.'+(this.pageNum+1)).buttonSetIcon(this.getField("animtiph."+cislo).buttonGetIcon());
+ };
+ 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}\hss}}
+
+\makeatother
+
+\Message{\begin{itemize}
+\item The macros for tooltips are redefined on this page (see the
+ source tex file).
+\item The blue \textbf{soap} is active button and the tooltip is
+ activated by \textbf{MouseOver} action.
+\item The advantage is that the reader can use Page Up and Down keys,
+ which do not work if the button is clicked and the soap is smaller
+ than the text.
+\end{itemize}
+}
+
+\begin{definice}
+ This is definition of \tooltip{rank}{2}. bla bla bla.
+\end{definice}
+
+
+\begin{definice}
+ This is \tooltip{definition}3 of \tooltip{derivative}{1}\hfill
+ \tooltip{derivative}{1}.
+\end{definice}
+
+\begin{definice}
+ This is {definition} of {derivative}\hfill
+ {derivative}.
+\end{definice}
+
+This is a geometric \tooltipanim{idea}{4}{28} which is behind the
+definition of derivative.
+
+This is a geometric idea which is behind the definition of derivative.
+
+
+\vfill
+\begin{definice}
+ This is \tooltip{definition}3 of \tooltip{derivative}{1}\hfill
+ \tooltip{derivative}{1}.
+\end{definice}
+
+\newpage
+
+\movetipsfalse
+
+\Message{This page shows that the tooltip appers in the top right corner if the
+package option \texttt{movetips} is not used.}
+
+\begin{definice}
+ This is definition of \tooltip{rank}{2}. bla bla bla.
+\end{definice}
+
+
+\vfill
+
+\begin{definice}
+ This is \tooltip{definition}3 of \tooltip{derivative}{1}\hfill
+ \tooltip{derivative}{1}.
+\end{definice}
+
+
+\begin{definice}
+ This is {definition} of {derivative}\hfill
+ {derivative}.
+\end{definice}
+
+This is a geometric \tooltipanim{idea}{4}{28} which is behind the
+definition of derivative.
+
+This is a geometric idea which is behind the definition of derivative.
+
+
+\begin{definice}
+ This is \tooltip{definition}3 of \tooltip{derivative}{1}\hfill
+ \tooltip{derivative}{1}.
+\end{definice}
+
+
+
\end{document}