diff options
author | Karl Berry <karl@freefriends.org> | 2011-05-23 22:06:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-05-23 22:06:07 +0000 |
commit | 0a05c759165972d30c5dd9c0ca35718b191361a9 (patch) | |
tree | 61831a17d9b73e638c94b884b2f9cc4abf1414ed /Master/texmf-dist/doc/latex/pdfcomment/example_latex_dvipdfmx.tex | |
parent | ba328cf8b03f2dd645a56a95d904f42a9f10628e (diff) |
pdfcomment (23may11)
git-svn-id: svn://tug.org/texlive/trunk@22590 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/pdfcomment/example_latex_dvipdfmx.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/pdfcomment/example_latex_dvipdfmx.tex | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/pdfcomment/example_latex_dvipdfmx.tex b/Master/texmf-dist/doc/latex/pdfcomment/example_latex_dvipdfmx.tex index f31ab2116b6..58215ea3c23 100644 --- a/Master/texmf-dist/doc/latex/pdfcomment/example_latex_dvipdfmx.tex +++ b/Master/texmf-dist/doc/latex/pdfcomment/example_latex_dvipdfmx.tex @@ -11,6 +11,7 @@ % define \pgfsysdriver for dvipdfm(x) mode in tikz/pgf \def\pgfsysdriver{pgfsys-dvipdfm.def} \usepackage{tikz} +\usetikzlibrary{calc} \usepackage{amssymb,amsmath,array,bm} \usepackage[subject={Top1},author={\AA{}nsgar Lund},dvipdfmx,version=1]{pdfcomment} \begin{document} @@ -127,4 +128,66 @@ eleifend, sagittis quis, diam. Duis eget orci sit amet orci dignissim rutrum.}{T \end{array} \] +\begin{tikzpicture} + \draw [<->,thick] (0,2) node (yaxis) [above] {$y$} + |- (3,0) node (xaxis) [right] {$x$}; + \draw (0,0) coordinate (a_1) -- (2,1.8) coordinate (a_2); + \draw (0,1.5) coordinate (b_1) -- (2.5,0) coordinate (b_2); + \coordinate (c) at (intersection of a_1--a_2 and b_1--b_2); + \draw[dashed] (yaxis |- c) node[left] {$y'$} + -| (xaxis -| c) node[below] {$x'$}; + % + \fill[red] (0,0) circle (2pt); + \draw (0,0) node {\pdftooltip{\rule{0pt}{0.5cm}\rule{0.5cm}{0pt}}{Origin}}; + % + \draw[red] (1.5,2) node {\pdftooltip{\textbullet}{1.5,2.0}}; + % + \fill[red] (c) circle (2pt) + let + \p1 = (current path bounding box.south west), + \p2 = (current path bounding box.north east) + in + node at (current path bounding box) + {\pdftooltip{\rule{\dimexpr\x2-\x1\relax}{0pt}\rule{0pt}{\dimexpr\y2-\y1\relax}}% + {This is the intersection point\textCR of the two lines!}}; +\end{tikzpicture} +\hspace{1cm} +\begin{tikzpicture} + \draw (1.5,0) node[below] {countries}; + \draw (0,1) node[left] {\pdftooltip{SCI}{Sausage Consumption Index}}; + \fill[blue] (0.5,0) rectangle (1,1.2) + let + \p1 = (current path bounding box.south west), + \p2 = (current path bounding box.north east) + in + node at (current path bounding box) + % these calculations are based on scale factor 1 otherwise use: + % \dimexpr(scale factor)\dimexpr\x2-\x1\relax\relax + {\pdftooltip{\rule{\dimexpr\x2-\x1\relax}{0pt}\rule{0pt}{\dimexpr\y2-\y1\relax}}% + {USA: 120}}; + \fill[red] (1.5,0) rectangle (2,1.8) + let + \p1 = (current path bounding box.south west), + \p2 = (current path bounding box.north east) + in + node at (current path bounding box) + {\pdftooltip{\rule{\dimexpr\x2-\x1\relax}{0pt}\rule{0pt}{\dimexpr\y2-\y1\relax}}% + {Germany: 180}}; + \fill[green] (2.5,0) rectangle (3,0.65) + let + \p1 = (current path bounding box.south west), + \p2 = (current path bounding box.north east) + in + node at (current path bounding box) + {\pdftooltip{\rule{\dimexpr\x2-\x1\relax}{0pt}\rule{0pt}{\dimexpr\y2-\y1\relax}}% + {South Africa: 65}}; + \draw [<->,thick] (0,2) node (yaxis) [above] {$y$} + |- (3.5,0) node (xaxis) [right] {$x$}; +\end{tikzpicture} + +\bigskip\bigskip +You can use tooltips with simple \pdftooltip{\textcolor{red}{words}}{This is a tooltip!} or chemical notation like: $\pdftooltip{H_{2}SO_{4}}{Sulfuric acid}$ + +\bigskip\bigskip +It also works in equations: \[\pdftooltip[mathstyle=\displaystyle]{\sum_{i=1}^{n}i=\frac{1}{2}n\cdot(n+1)}{little Gauß}\] \end{document}
\ No newline at end of file |