| 1 |
%\documentclass{article} |
| 2 |
\documentclass[envcountsect,t,10pt]{beamer} |
| 3 |
|
| 4 |
%\usetheme{Ilmenau} |
| 5 |
%\usetheme{Marburg} |
| 6 |
%\usetheme{PaloAlto} |
| 7 |
|
| 8 |
\setbeamertemplate{theorems}[numbered] |
| 9 |
\usepackage{amsthm,amsmath,graphicx,color} |
| 10 |
|
| 11 |
\usepackage{tikz} |
| 12 |
\PassOptionsToPackage{naturalnames}{hyperref} |
| 13 |
|
| 14 |
\newtheorem{remark}{Remark} |
| 15 |
\def\dx{{\mathrm d}x} |
| 16 |
\definecolor{darkgreen}{rgb}{0,0.6,0} |
| 17 |
|
| 18 |
\usepackage[inactive]{fancytooltips} |
| 19 |
\begin{document} |
| 20 |
|
| 21 |
\title{Fantytooltips demo} |
| 22 |
\author{Robert Ma\v{r}\'ik} |
| 23 |
|
| 24 |
\maketitle |
| 25 |
\section{Introduction} |
| 26 |
|
| 27 |
\begin{frame}{Content} |
| 28 |
\tableofcontents |
| 29 |
\end{frame} |
| 30 |
\begin{frame} |
| 31 |
\frametitle{What can you find in this file?} |
| 32 |
\begin{itemize} |
| 33 |
\item Demo (math fiction) which shows how the cooperation between |
| 34 |
preview and fancytooltips package can be used to insert popup |
| 35 |
previews for equations, theorems and definitions into a |
| 36 |
presentation -- see for example Figure \ref{pic:sine} (move the |
| 37 |
mouse to the blue mark). |
| 38 |
\item Explanation how we achieved this behaviour. |
| 39 |
\end{itemize} |
| 40 |
\end{frame} |
| 41 |
|
| 42 |
\section{Math text example} |
| 43 |
|
| 44 |
\begin{frame}{Demo: Definitions} |
| 45 |
\begin{definition}[Excellent number{\cite[citation only for testing]{D-1}}] |
| 46 |
Let $n$ be positive integer. The number $n$ is said to be |
| 47 |
\textit{excellent}, if the last digit of the number $\alpha$ |
| 48 |
defined by the relation |
| 49 |
\begin{equation} |
| 50 |
\label{eq:excel} |
| 51 |
\alpha = n^2 +\int_0^{2\pi}\sin x\dx |
| 52 |
\end{equation} |
| 53 |
equals $1$.\label{def:excellent-number} |
| 54 |
\end{definition} |
| 55 |
|
| 56 |
{(Note that from \eqref{eq:excel} it follows that $\alpha$ is |
| 57 |
integer, see \ref{eq:sin}.) } |
| 58 |
|
| 59 |
{\begin{definition}[Happy number] |
| 60 |
Let $n$ be positive integer. The number $n$ is said to be |
| 61 |
\textit{happy}, if the last digit of the number $n$ equals $1$. |
| 62 |
\label{def:happy-number} |
| 63 |
\end{definition}} |
| 64 |
|
| 65 |
{Citations are also extracted. See \cite{D,D-R,D-F,D-Rez}. You |
| 66 |
\textit{have to} insert emtpy line after each \texttt{\textbackslash |
| 67 |
bibitem} command. Ordinary \tooltip{tooltips}{hodnost} and |
| 68 |
\tooltipanim{animations}{4}{28} also work.} |
| 69 |
\end{frame} |
| 70 |
|
| 71 |
\begin{frame}{Demo: Example and comments} |
| 72 |
\begin{example} |
| 73 |
The number $1$ is both happy and excellent. The number $129$ is |
| 74 |
excellent but not happy. This follows immediately from the |
| 75 |
Definitions \ref{def:excellent-number} and \ref{def:happy-number}. |
| 76 |
\end{example} |
| 77 |
\begin{alertblock}{Fancytooltips comment} |
| 78 |
Put the mouse pointer to the graphical symbol following definitions |
| 79 |
numbers. You will see the definitions again. We can also refer to |
| 80 |
equation, like this: \eqref{eq:excel}. Note that the same reference |
| 81 |
has been used on previous slide and the tooltip has not been |
| 82 |
attached, since the reference to \eqref{eq:excel} on the previous |
| 83 |
page is at the same page as its target. |
| 84 |
\end{alertblock} |
| 85 |
\end{frame} |
| 86 |
|
| 87 |
|
| 88 |
\begin{frame}{Demo: A picture} |
| 89 |
\begin{figure} |
| 90 |
\centering |
| 91 |
\begin{tikzpicture}[domain=0:6.28] |
| 92 |
\draw[->] (0,0) -- (7,0) node[right] {$x$}; |
| 93 |
\draw[->] (0,-1.2) -- (0,1.2) node[above] {$f(x)$}; |
| 94 |
\shadedraw[color=black,top color=blue,bottom color=red] |
| 95 |
plot[id=sin] function{sin(x)}; |
| 96 |
\end{tikzpicture} |
| 97 |
\caption{Sine curve} |
| 98 |
\label{pic:sine} |
| 99 |
\end{figure} |
| 100 |
|
| 101 |
On one of the previous slides (in Definition \ref{def:excellent-number}) |
| 102 |
we defined \textit{excellent} number in terms of the number $\alpha$ |
| 103 |
defined by relation \eqref{eq:excel}. Below we introduce a simple |
| 104 |
characterization in Theorem \ref{theorem}. |
| 105 |
\end{frame} |
| 106 |
|
| 107 |
\begin{frame}{Demo: Newton--Leibniz theorem} |
| 108 |
|
| 109 |
\begin{theorem} |
| 110 |
Let $f(x)$ be integrable in the sense of Riemann on $[a,b]$. Let |
| 111 |
$F(x)$ be a function continuous on $[a,b]$ which is an |
| 112 |
antiderivative of the function $f$ on the interval $(a,b)$. Then |
| 113 |
\begin{equation*} |
| 114 |
\int_a^bf(x)\dx=[F(x)]_a^b=F(b)-F(a) |
| 115 |
\end{equation*} |
| 116 |
holds.\label{th:NL} |
| 117 |
\end{theorem} |
| 118 |
\end{frame} |
| 119 |
|
| 120 |
\begin{frame}{Demo: Integral term equals zero} |
| 121 |
\begin{remark} |
| 122 |
It is easy to see that |
| 123 |
\begin{equation} |
| 124 |
\label{eq:sin} |
| 125 |
\int_0^{2\pi}\sin x\dx=0. |
| 126 |
\end{equation} |
| 127 |
Really, direct computation based on Newton-Leibniz Theorem |
| 128 |
\ref{th:NL} shows |
| 129 |
\begin{align*} |
| 130 |
\int_0^{2\pi}\sin x\dx&=[\cos x]_0^{2\pi}\\ |
| 131 |
&=\cos(2\pi)-\cos 0\\ |
| 132 |
&=0. |
| 133 |
\end{align*} |
| 134 |
(see also Figure \ref{pic:sine}) |
| 135 |
\end{remark} |
| 136 |
\end{frame} |
| 137 |
|
| 138 |
\begin{frame} |
| 139 |
\frametitle{Demo: Main result} |
| 140 |
\begin{theorem}[Characterization of excellent numbers] |
| 141 |
The positive integer $n$ is |
| 142 |
\tooltip{excellent}{def:excellent-number} if and only if the last |
| 143 |
digit of the number $n$ is either $1$ or $9$. |
| 144 |
\label{theorem} |
| 145 |
\end{theorem} |
| 146 |
|
| 147 |
\begin{alertblock}{Fancytooltips comment} |
| 148 |
Since we used {\color{red}\texttt{\textbackslash |
| 149 |
label\{def:excellent-number\}}} in the Definition |
| 150 |
\ref{def:excellent-number}, we can insert a tooltip to the word |
| 151 |
excellent by using command{\color{red} \texttt{\textbackslash |
| 152 |
tooltip\{excellent\}\{def:excellent-number\}}}. In this case the |
| 153 |
tooltip is activated by hovering the text, not the soap. This is the |
| 154 |
default behavior of fancytooltips. |
| 155 |
\end{alertblock} |
| 156 |
|
| 157 |
\end{frame} |
| 158 |
|
| 159 |
\begin{frame} |
| 160 |
\frametitle{Demo: Corollary} |
| 161 |
\begin{theorem}[Relationship between happy and excellent numbers] |
| 162 |
Each \tooltip*{happy}{def:happy-number} number is |
| 163 |
\tooltip{excellent}{def:excellent-number}. |
| 164 |
\end{theorem} |
| 165 |
|
| 166 |
\begin{alertblock}{Fancytooltips comment} |
| 167 |
The ``happy'' tooltip is created by |
| 168 |
\texttt{\color{red}\textbackslash |
| 169 |
tooltip*\{happy\}\{def:happy-number\}}. The starred version causes |
| 170 |
that the active button is not attached to the text, but is attached |
| 171 |
to the mark. The ``excellent'' tooltip is created by |
| 172 |
\texttt{\color{red}\textbackslash |
| 173 |
tooltip\{excellent\}\{def:excellent-number\}} and hence, the blue soap is |
| 174 |
inactive and the text active. |
| 175 |
\end{alertblock} |
| 176 |
\end{frame} |
| 177 |
|
| 178 |
\section{How it works} |
| 179 |
\begin{frame} |
| 180 |
\frametitle{How it works} |
| 181 |
\begin{itemize} |
| 182 |
\item We compile the presentation in an ordinary way to get correct |
| 183 |
labels and references. |
| 184 |
\item We compile the presentation with preview package and extract |
| 185 |
displayed equations, theorems, definitions and floats (tables and |
| 186 |
figures). |
| 187 |
\item We create a new document which contains those parts extracted |
| 188 |
in the previous step, which have a label inside. |
| 189 |
\item We compile the presentation again with redefined \texttt{ref} |
| 190 |
macro. This macro inserts the popup using fancytooltips package. |
| 191 |
\end{itemize} |
| 192 |
\end{frame} |
| 193 |
|
| 194 |
% \section{Short howto} |
| 195 |
% \begin{frame} |
| 196 |
% \frametitle{How to create a presentation with pdf\LaTeX} |
| 197 |
% % Creating tooltips is easy. Simply follow these steps. |
| 198 |
% \begin{itemize} |
| 199 |
% \item Create presentation with your favorit presentation package, |
| 200 |
% such as |
| 201 |
% \href{http://www.ctan.org/tex-archive/help/Catalogue/entries/acrotex-web.html}{\color{blue}web}, |
| 202 |
% \href{http://www.ctan.org/tex-archive/macros/latex/contrib/pdfscreen/}{\color{blue}pdfscreen} |
| 203 |
% or |
| 204 |
% \href{http://www.ctan.org/tex-archive/help/Catalogue/entries/beamer.html}{\color{blue}beamer}. |
| 205 |
% \item In Linux use the script \texttt{fancy-preview} to compile the |
| 206 |
% presentation again, i.e. if your file is filename.tex run |
| 207 |
% \begin{quote}\upshape\color{darkgreen} |
| 208 |
% \texttt{bash fancy-preview filename} |
| 209 |
% \end{quote} |
| 210 |
% On Windows use (still experimental) |
| 211 |
% \begin{quote}\upshape\color{darkgreen} |
| 212 |
% \texttt{fancypreview.bat filename} |
| 213 |
% \end{quote} |
| 214 |
% \item You may want to customize the variables in the script |
| 215 |
% \texttt{fancy-preview} or batch file |
| 216 |
% \texttt{fancypreview.bat} (colors, options for fancytooltips, |
| 217 |
% etc.) |
| 218 |
% \end{itemize} |
| 219 |
% \end{frame} |
| 220 |
|
| 221 |
% \begin{frame} |
| 222 |
% \frametitle{How to create a presentation with dvips} |
| 223 |
% \begin{itemize} |
| 224 |
% \item This work-flow should still work with dvips, but has been not |
| 225 |
% tested, since it |
| 226 |
% requires Acrobat Professional which is not available on author's |
| 227 |
% platform (\texttt{Linux}). Moreover, the compilation cannot be |
| 228 |
% done automatically, due to the post-processing in Acrobat. You |
| 229 |
% are encouraged to try it by yourselves. Report success of problems |
| 230 |
% to the authors email, please. |
| 231 |
% \item Basically follow the instructions for pdf\LaTeX{} users. |
| 232 |
% \item You have to customize the script \texttt{fancy-preview} |
| 233 |
% \begin{itemize} |
| 234 |
% \item Replace \texttt{pdflatex} by \texttt{latex} |
| 235 |
% \item Add commands which convert \texttt{minimal.ps} into |
| 236 |
% \texttt{minimal.pdf} |
| 237 |
% \item Extract the number of pages of the file |
| 238 |
% \texttt{minimal.pdf} and pass it as an argument to the |
| 239 |
% fancytooltips package. (You may use \texttt{pdftk} or |
| 240 |
% \texttt{pdflatex} for this task.) |
| 241 |
% \end{itemize} |
| 242 |
% \item Remember that you have post-process the resulting |
| 243 |
% \texttt{ps} file as described in manual for fancytooltips |
| 244 |
% package. |
| 245 |
% \end{itemize} |
| 246 |
% \end{frame} |
| 247 |
|
| 248 |
|
| 249 |
\begin{frame} |
| 250 |
\frametitle{That's all. } |
| 251 |
Any problem? Send a \textit{minimal example} to the author of the |
| 252 |
package. |
| 253 |
\end{frame} |
| 254 |
|
| 255 |
\begin{thebibliography}{10} |
| 256 |
\bibitem{D-1} {K. Nowak}, A remark on \dots , Opuscula Math. {\bf 26} |
| 257 |
(2004), 25--31. |
| 258 |
|
| 259 |
\bibitem{D} {R. Stuchlik}, Perturbations of \dots , |
| 260 |
J. Math. Anal. Appl. {\bf 23} (19986), 4--44. |
| 261 |
|
| 262 |
\bibitem{D-F} {O. Stuchlik}, Half-linear oscillation criteria: |
| 263 |
Perturbation in term involving derivative, Nonlinear Anal. {\bf 73} |
| 264 |
(2010), 3756--3766. |
| 265 |
|
| 266 |
\bibitem{D-R} {T. Topas}, Half-linear Differential Equations, |
| 267 |
North-Holland Mathematics Studies 202, Elsevier, 2005. |
| 268 |
|
| 269 |
\bibitem{D-Rez} {K. Ulrich}, Oscillation and nonoscillation of |
| 270 |
perturbered half-linear Euler differential equations, |
| 271 |
Publ. Math. Debrecen {\bf 1} (2000). |
| 272 |
|
| 273 |
|
| 274 |
\end{thebibliography} |
| 275 |
|
| 276 |
|
| 277 |
\end{document} |
| 278 |
|