From 6d01229a1f06834661f6e820e861a4be03a7f860 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 3 Aug 2020 12:18:45 +0900 Subject: fitr update --- texmf-dist/doc/latex/fitr/Kutta.bb | 5 - texmf-dist/doc/latex/fitr/Kutta.eps | Bin 344944 -> 0 bytes texmf-dist/doc/latex/fitr/Kutta.jpeg | Bin 9863 -> 0 bytes texmf-dist/doc/latex/fitr/Kutta.pdf | Bin 15308 -> 0 bytes texmf-dist/doc/latex/fitr/Kutta.xbb | 6 - texmf-dist/doc/latex/fitr/README.md | 14 +- texmf-dist/doc/latex/fitr/examples/fitr_demo.pdf | Bin 0 -> 201415 bytes texmf-dist/doc/latex/fitr/examples/fitr_demo.tex | 151 +++++ .../doc/latex/fitr/examples/fitr_minimal.tex | 140 +++++ .../doc/latex/fitr/examples/graphics/Kutta.bb | 4 + .../doc/latex/fitr/examples/graphics/Kutta.eps | Bin 0 -> 354365 bytes .../doc/latex/fitr/examples/graphics/Kutta.jpeg | Bin 0 -> 9863 bytes .../doc/latex/fitr/examples/graphics/Kutta.pdf | Bin 0 -> 15308 bytes .../doc/latex/fitr/examples/graphics/Kutta.xbb | 6 + .../doc/latex/fitr/examples/graphics/runge.bb | 5 + .../doc/latex/fitr/examples/graphics/runge.eps | Bin 0 -> 413683 bytes .../doc/latex/fitr/examples/graphics/runge.jpg | Bin 0 -> 7628 bytes .../doc/latex/fitr/examples/graphics/runge.pdf | Bin 0 -> 13182 bytes .../doc/latex/fitr/examples/graphics/runge.xbb | 6 + texmf-dist/doc/latex/fitr/examples/jmpHook.js | 12 + texmf-dist/doc/latex/fitr/examples/restoreHook.js | 12 + texmf-dist/doc/latex/fitr/fitr.pdf | Bin 0 -> 2740104 bytes texmf-dist/doc/latex/fitr/fitr_demo.pdf | Bin 80760 -> 0 bytes texmf-dist/doc/latex/fitr/fitr_demo.tex | 106 ---- texmf-dist/doc/latex/fitr/fitr_man.pdf | Bin 177690 -> 283808 bytes texmf-dist/doc/latex/fitr/fitr_man.tex | 614 +++++++++++++-------- texmf-dist/doc/latex/fitr/fitr_minimal.tex | 92 --- texmf-dist/doc/latex/fitr/jmpHookBlink.js | 41 -- texmf-dist/doc/latex/fitr/restoreHookBlink.js | 33 -- texmf-dist/doc/latex/fitr/runge.bb | 5 - texmf-dist/doc/latex/fitr/runge.eps | Bin 413683 -> 0 bytes texmf-dist/doc/latex/fitr/runge.jpg | Bin 7628 -> 0 bytes texmf-dist/doc/latex/fitr/runge.pdf | Bin 13182 -> 0 bytes texmf-dist/doc/latex/fitr/runge.xbb | 6 - 34 files changed, 736 insertions(+), 522 deletions(-) delete mode 100644 texmf-dist/doc/latex/fitr/Kutta.bb delete mode 100644 texmf-dist/doc/latex/fitr/Kutta.eps delete mode 100644 texmf-dist/doc/latex/fitr/Kutta.jpeg delete mode 100644 texmf-dist/doc/latex/fitr/Kutta.pdf delete mode 100644 texmf-dist/doc/latex/fitr/Kutta.xbb create mode 100644 texmf-dist/doc/latex/fitr/examples/fitr_demo.pdf create mode 100644 texmf-dist/doc/latex/fitr/examples/fitr_demo.tex create mode 100644 texmf-dist/doc/latex/fitr/examples/fitr_minimal.tex create mode 100644 texmf-dist/doc/latex/fitr/examples/graphics/Kutta.bb create mode 100644 texmf-dist/doc/latex/fitr/examples/graphics/Kutta.eps create mode 100644 texmf-dist/doc/latex/fitr/examples/graphics/Kutta.jpeg create mode 100644 texmf-dist/doc/latex/fitr/examples/graphics/Kutta.pdf create mode 100644 texmf-dist/doc/latex/fitr/examples/graphics/Kutta.xbb create mode 100644 texmf-dist/doc/latex/fitr/examples/graphics/runge.bb create mode 100644 texmf-dist/doc/latex/fitr/examples/graphics/runge.eps create mode 100644 texmf-dist/doc/latex/fitr/examples/graphics/runge.jpg create mode 100644 texmf-dist/doc/latex/fitr/examples/graphics/runge.pdf create mode 100644 texmf-dist/doc/latex/fitr/examples/graphics/runge.xbb create mode 100644 texmf-dist/doc/latex/fitr/examples/jmpHook.js create mode 100644 texmf-dist/doc/latex/fitr/examples/restoreHook.js create mode 100644 texmf-dist/doc/latex/fitr/fitr.pdf delete mode 100644 texmf-dist/doc/latex/fitr/fitr_demo.pdf delete mode 100644 texmf-dist/doc/latex/fitr/fitr_demo.tex delete mode 100644 texmf-dist/doc/latex/fitr/fitr_minimal.tex delete mode 100644 texmf-dist/doc/latex/fitr/jmpHookBlink.js delete mode 100644 texmf-dist/doc/latex/fitr/restoreHookBlink.js delete mode 100644 texmf-dist/doc/latex/fitr/runge.bb delete mode 100644 texmf-dist/doc/latex/fitr/runge.eps delete mode 100644 texmf-dist/doc/latex/fitr/runge.jpg delete mode 100644 texmf-dist/doc/latex/fitr/runge.pdf delete mode 100644 texmf-dist/doc/latex/fitr/runge.xbb (limited to 'texmf-dist/doc') diff --git a/texmf-dist/doc/latex/fitr/Kutta.bb b/texmf-dist/doc/latex/fitr/Kutta.bb deleted file mode 100644 index 52e9f93c..00000000 --- a/texmf-dist/doc/latex/fitr/Kutta.bb +++ /dev/null @@ -1,5 +0,0 @@ -%%Title: C:/Users/D. P. Story/Desktop/examples/kutta.pdf -%%Creator: extractbb 20120420 -%%BoundingBox: 0 0 242 326 -%%CreationDate: Wed Jun 27 19:32:23 2012 - diff --git a/texmf-dist/doc/latex/fitr/Kutta.eps b/texmf-dist/doc/latex/fitr/Kutta.eps deleted file mode 100644 index 8ad5349e..00000000 Binary files a/texmf-dist/doc/latex/fitr/Kutta.eps and /dev/null differ diff --git a/texmf-dist/doc/latex/fitr/Kutta.jpeg b/texmf-dist/doc/latex/fitr/Kutta.jpeg deleted file mode 100644 index d847cb2a..00000000 Binary files a/texmf-dist/doc/latex/fitr/Kutta.jpeg and /dev/null differ diff --git a/texmf-dist/doc/latex/fitr/Kutta.pdf b/texmf-dist/doc/latex/fitr/Kutta.pdf deleted file mode 100644 index e737d265..00000000 Binary files a/texmf-dist/doc/latex/fitr/Kutta.pdf and /dev/null differ diff --git a/texmf-dist/doc/latex/fitr/Kutta.xbb b/texmf-dist/doc/latex/fitr/Kutta.xbb deleted file mode 100644 index f8d9a29f..00000000 --- a/texmf-dist/doc/latex/fitr/Kutta.xbb +++ /dev/null @@ -1,6 +0,0 @@ -%%Title: C:/Users/D. P. Story/Desktop/examples/Kutta.jpeg -%%Creator: extractbb 20120420 -%%BoundingBox: 0 0 242 326 -%%HiResBoundingBox: 0.000000 0.000000 242.000000 326.000000 -%%CreationDate: Wed Jun 27 15:21:08 2012 - diff --git a/texmf-dist/doc/latex/fitr/README.md b/texmf-dist/doc/latex/fitr/README.md index 5f7d97b5..933a1743 100644 --- a/texmf-dist/doc/latex/fitr/README.md +++ b/texmf-dist/doc/latex/fitr/README.md @@ -1,7 +1,6 @@ The fitr Package Author: D. P. Story -Version: v1.2d -Dated: 2016/04/04 +Dated: 2020-07-09 This package is an implementation of the FitR view-type destination as described in the PDF Reference. The package defines one new command @@ -20,9 +19,14 @@ comfortably. Optional special effects are included (JavaScript functions) to help focus one the rectangle as it is magnified, and as the previous view is restored. -Unpack the distribution by latexing fitr.ins. - -Enjoy! +What's New for version dated 2020/07/09: The package is extended +to support the PDF creator lualatex. All common workflows are +now automatically detected: pdflatex, lualatex, and xelatex. +Also, there are several new options, one of which is gonative; +when this option is selected, no field or document JavaScript is +used. For the gonative option, the workflow dvips->ps2pdf is +also supported because there is no document JavaScript required. +Of course, the dvips->distiller is also supported. Now, I must get back to my retirement. diff --git a/texmf-dist/doc/latex/fitr/examples/fitr_demo.pdf b/texmf-dist/doc/latex/fitr/examples/fitr_demo.pdf new file mode 100644 index 00000000..85c26453 Binary files /dev/null and b/texmf-dist/doc/latex/fitr/examples/fitr_demo.pdf differ diff --git a/texmf-dist/doc/latex/fitr/examples/fitr_demo.tex b/texmf-dist/doc/latex/fitr/examples/fitr_demo.tex new file mode 100644 index 00000000..3ec611fe --- /dev/null +++ b/texmf-dist/doc/latex/fitr/examples/fitr_demo.tex @@ -0,0 +1,151 @@ +% +% Works for all workflows. +% If gonative is specified, dvips->ps2pdf works as well. +% +\documentclass[11pt]{article} +\usepackage{amsmath} % use only for the align environment +\usepackage[forcolorpaper,extended]{web} +\usepackage[blink,!preview,!viewMagWin]{fitr} +\usepackage{graphicx} + +% Uncomment to use custom hooks, there are minimal functions already defined. +% Uncomment to see these simple examples. +%\usepackage[js=jmpHook,js=restoreHook]{lmacs} + +\DeclareDocInfo +{% + title={Jumping to a Rectangular Region}, + author={D. P. Story}, + university=My University, + talkdate={Dec.\ 17, \the\year}, + subject={Demo file to test the FitR view destination of PDF}, + keywords={LaTeX, PDF, Acrobat, JavaScript}, + university={% + Acro\!\TeX.Net\\ + NORTHWEST FLORIDA STATE COLLEGE\\ + Department of Mathematics}, + email={dpstory@acrotex.net}, + version={1.0}, + copyrightyears={2012} +} +\nocopyright +\norevisionLabel + +\def\cs#1{\texttt{\char`\\#1}} + +\selectColors{linkColor=blue} + +\parindent0pt \parskip6pt \pagestyle{empty} + +% \renewcommand{\overlayPresets}{\H{I}\S{D}\BG{}\BC{blue}} +% \renewcommand{\allowFXDefault}{false} + +\begin{document} +\begin{center}\sffamily\bfseries\Large\color{blue} + Jumping to a Rectangular Region\\[1ex]\normalsize\normalcolor + Dr. D. P. Story, \href{http://www.acrotex.net}{Acro\!\TeX.NeT} +\end{center} + +\textbf{Introduction.} This document demonstrates a technique designed to +help people with low vision read material by providing them with a +convenient way to magnify specific regions of the document. This is +especially useful for reading technical material such as mathematics, as +is demonstrated here. + +\textbf{Instructions:} Click on any of the mathematics to magnify a region +around it, the border will blink briefly to focus your attention on it. +To restore the previous view, click on the region again, +the formula is briefly highlighted by a blinking border so +can quickly find your place in the document. + + +\textbf{Sample Mathematical Text.} Consider the problem of numerically +solving the first order differential equation +\jdRect*[adddestw=60,adddesth=20]{$y'=f(t,y)$} on +\jdRect*[adddestw=1in,adddesth=30]{$[t_{start}, t_{end}]$}. Suppose we +want to classify third order \textsf{Runge-Kutta} type methods. Start with +\begin{align*} +\jdRect[height=1.3in,width=2.6in,lift=16pt,shift=-15pt,adddestw=10,adddesth=10] % +K_1 &= hf(t_n, y_n)\\ +K_2 &= hf(t_n +r h, y_n+aK_1)\\ +K_3 &= hf(t_n +s h, y_n+bK_1+cK_2)\\ +K &= w_1 K_1+ w_2 K_2+ w_3 K_3\\ +y_{n+1} &= y_n+K +\end{align*} +Find the system of equations satisfied by +\jdRect*[adddestw=10,adddesth=10]{$r,s, a, b, c, w_1, w_2, w_3$} +that will make the above algorithm a third order method. + +\textbf{Inline links.} Links can be provided within the text to jump to a +magnified region that needs to be inspected more closely. The links below +are different from the ones above. After jumping to a magnified rectangle, +restore the preview view by clicking on the rectangle. + +\def\RungePic{\includegraphics[width=\marginparwidth]{graphics/runge}} +\def\KuttaPic{\includegraphics[width=\marginparwidth]{graphics/Kutta}} +\def\jrOpts#1#2{link=#1,dest=#2} + +\textbf{\jdRect*[nodest,\jrOpts{jmp}{rungePic},adddestw=10,adddesth=10]{Carl Runge}}% +\marginpar{\jdRect*[\jrOpts{restore}{rungePic},adddestw=\marginparsep, +adddesth=\marginparpush]{\parbox[b]{\marginparwidth}{\RungePic\\ +\normalcolor\centering\footnotesize\textsf{Carl Runge}}}} (1867-1944) +was the third of four sons from a well-to-do German merchant family. He +is remembered for his \textsf{Runge-Kutta} method for solving +differential equations. + +\textbf{\jdRect*[nodest,\jrOpts{jmp}{KuttaPic}]{Martin Kutta}}% +\marginpar{\jdRect*[\jrOpts{restore}{KuttaPic},adddestw=\marginparsep, +adddesth=\marginparpush]{\parbox[b]{\marginparwidth}{\KuttaPic\\ +\normalcolor\centering\footnotesize\textsf{Martin Kutta}}}} (1867-1944) +extended the Runge's method of solving ordinary differential equations. He +is also known for his work on airfoils. + +% Again, don't forget to press +%\textbf{Alt+Left Arrow} to return to the view you had before you clicked +%on the link. + +\begin{flushright} +This work was motivated by Mohsen M. +\end{flushright} + +\newpage + +\noindent\textbf{FX and verbatim text.} The \cs{jsRect*} can ``scoop up'' verbatim text. We illustrate +with several examples from the documentation. + +Using the \cs{verb} command: \jdRect*[adddestw=10bp,adddesth=10bp]{\verb!#$$%&$%^&$%^$!} + +% measure the width of the widest line in the verbatim listing below +\newsavebox\fitrBox +\begin{lrbox}{\fitrBox} +\verb~\renewcommand{\overlayPresets}{\H{I}\BG{}\BC{blue}\S{D}}%~% +\end{lrbox}\edef\wdDisplay{\the\wd\fitrBox} + +\renewcommand{\overlayPresets}{\H{I}\BG{}\BC{blue}\S{D}} + +Jump to the \jdRect*[adddestw=10bp,adddesth=10bp]{\textsf{fitr} Package!} Click +on the verbatim region below to view the listing up close. +\restoreOverlayPresets +\begin{flushleft} +\jdRect*[adddestw=10bp,adddesth=10bp] +{\begin{minipage}{\wdDisplay} +\begin{verbatim} +\renewcommand{\overlayPresets}{\H{I}\BG{}\BC{blue}\S{D}}% +... +Jump to the \jdRect*[adddestw=10bp,adddesth=10bp]% + {{\fitrpkg} Package!} +\end{verbatim} +\end{minipage}} +\end{flushleft} +\jdRect[width=\wdDisplay,height=4\baselineskip,lift=-\baselineskip,adddestw=10bp,adddesth=10bp]% +Now using \cs{jdRect}.\parskip0pt +%\previewOn\viewMagWinOn +\begin{verbatim} +\renewcommand{\overlayPresets}{\H{I}\BG{}\BC{blue}\S{D}}% +... +Jump to the \jdRect*[adddestw=10bp,adddesth=10bp]% + {{\fitrpkg} Package!} +\end{verbatim} + + +\end{document} diff --git a/texmf-dist/doc/latex/fitr/examples/fitr_minimal.tex b/texmf-dist/doc/latex/fitr/examples/fitr_minimal.tex new file mode 100644 index 00000000..953c3ffb --- /dev/null +++ b/texmf-dist/doc/latex/fitr/examples/fitr_minimal.tex @@ -0,0 +1,140 @@ +% +% Works for all workflows. +% If gonative is specified, dvips->ps2pdf works as well. +% +\documentclass[11pt]{article} +\usepackage{amsmath} % use only for the align environment +\usepackage[blinkonjmp,blinkonrestore,!preview,!viewMagWin]{fitr} +\usepackage{graphicx} + +% Uncomment to use custom hooks, there are minimal functions already defined. +% Uncomment to see these simple examples. +%\usepackage[js=jmpHook,js=restoreHook]{lmacs} + +\hypersetup +{% + pdftitle={Jumping to a Rectangular Region}, + pdfauthor={D. P. Story}, + pdfsubject={Demo file to test the FitR view destination of PDF}, + pdfkeywords={LaTeX, PDF, Acrobat, JavaScript}, + pdfpagemode=UseNone +} + +\parindent0pt \parskip6pt \pagestyle{empty} + +\def\cs#1{\texttt{\char`\\#1}} + +% \renewcommand{\overlayPresets}{\H{I}\S{D}\BG{}\BC{blue}} +% \renewcommand{\allowFXDefault}{false} + +\begin{document} + +\begin{center}\sffamily\bfseries\Large + Jumping to a Rectangular Region\\[1ex]\normalsize\normalcolor + Dr. D. P. Story, \href{http://www.acrotex.net}{Acro\negthinspace\TeX.NeT} +\end{center} + +\textbf{Introduction.} This document demonstrates a technique designed to +help people with low vision read material by providing them with a +convenient way to magnify specific regions of the document. This is +especially useful for reading technical material such as mathematics, as +is demonstrated here. + +\textbf{Instructions:} Click on any of the mathematics to magnify a region +around it, the border will blink briefly to focus your attention on it. +To restore the previous view, click on the region again, +the formula is briefly highlighted by a blinking border so +can quickly find your place in the document. + + +\textbf{Sample Mathematical Text.} Consider the problem of numerically +solving the first order differential equation +\jdRect*[adddestw=60,adddesth=20]{$y'=f(t,y)$} on +\jdRect*[adddestw=1in,adddesth=30]{$[t_{start}, t_{end}]$}. Suppose we +want to classify third order \textsf{Runge-Kutta} type methods. Start with +\begin{align*} +\jdRect[height=1.3in,width=2.6in,lift=16pt,shift=-15pt,adddestw=10,adddesth=10] % +K_1 &= hf(t_n, y_n)\\ +K_2 &= hf(t_n +r h, y_n+aK_1)\\ +K_3 &= hf(t_n +s h, y_n+bK_1+cK_2)\\ +K &= w_1 K_1+ w_2 K_2+ w_3 K_3\\ +y_{n+1} &= y_n+K +\end{align*} +Find the system of equations satisfied by +\jdRect*[adddestw=10,adddesth=10]{$r,s, a, b, c, w_1, w_2, w_3$} +that will make the above algorithm a third order method. + +\textbf{Inline links.} Links can be provided within the text to jump to a +magnified region that needs to be inspected more closely. The links below +are different from the ones above. After jumping to a magnified rectangle, +restore the preview view by clicking on the rectangle. + +\def\RungePic{\includegraphics[width=\marginparwidth]{graphics/runge}} +\def\KuttaPic{\includegraphics[width=\marginparwidth]{graphics/Kutta}} +\def\jrOpts#1#2{link=#1,dest=#2} + +\textbf{\jdRect*[nodest,\jrOpts{jmp}{rungePic},adddestw=10,adddesth=10]{Carl Runge}}% +\marginpar{\jdRect*[\jrOpts{restore}{rungePic},adddestw=\marginparsep, +adddesth=\marginparpush]{\parbox[b]{\marginparwidth}{\RungePic\\ +\normalcolor\centering\footnotesize\textsf{Carl Runge}}}} (1867-1944) +was the third of four sons from a well-to-do German merchant family. He +is remembered for his \textsf{Runge-Kutta} method for solving +differential equations. + +\textbf{\jdRect*[nodest,\jrOpts{jmp}{KuttaPic}]{Martin Kutta}}% +\marginpar{\jdRect*[\jrOpts{restore}{KuttaPic},adddestw=\marginparsep, +adddesth=\marginparpush]{\parbox[b]{\marginparwidth}{\KuttaPic\\ +\normalcolor\centering\footnotesize\textsf{Martin Kutta}}}} (1867-1944) +extended the Runge's method of solving ordinary differential equations. He +is also known for his work on airfoils. + +% Again, don't forget to press +%\textbf{Alt+Left Arrow} to return to the view you had before you clicked +%on the link. + +\begin{flushright} +This work was motivated by Mohsen M. +\end{flushright} + +\newpage + +\noindent\textbf{FX and verbatim text.} The \cs{jsRect*} can ``scoop up'' verbatim text. We illustrate +with several examples from the documentation. + +Using the \cs{verb} command: \jdRect*[adddestw=10bp,adddesth=10bp]{\verb!#$$%&$%^&$%^$!} + +% measure the width of the widest line in the verbatim listing below +\newsavebox\fitrBox +\begin{lrbox}{\fitrBox} +\verb~\renewcommand{\overlayPresets}{\H{I}\BG{}\BC{blue}\S{D}}%~% +\end{lrbox}\edef\wdDisplay{\the\wd\fitrBox} + +\renewcommand{\overlayPresets}{\H{I}\BG{}\BC{blue}\S{D}}% + +Jump to the \jdRect*[adddestw=10bp,adddesth=10bp]{\textsf{fitr} Package!} Click +on the verbatim region below to view the listing up close. +\restoreOverlayPresets +\begin{flushleft} +\jdRect*[adddestw=10bp,adddesth=10bp] +{\begin{minipage}{\wdDisplay} +\begin{verbatim} +\renewcommand{\overlayPresets}{\H{I}\BG{}\BC{blue}\S{D}}% +... +Jump to the \jdRect*[adddestw=10bp,adddesth=10bp]% + {{\fitrpkg} Package!} +\end{verbatim} +\end{minipage}} +\end{flushleft} +\jdRect[width=\wdDisplay,height=4\baselineskip,lift=-\baselineskip,adddestw=10bp,adddesth=10bp]% +Now using \cs{jdRect}.\parskip0pt +%\previewOn\viewMagWinOn +\begin{verbatim} +\renewcommand{\overlayPresets}{\H{I}\BG{}\BC{blue}\S{D}}% +... +Jump to the \jdRect*[adddestw=10bp,adddesth=10bp]% + {{\fitrpkg} Package!} +\end{verbatim} + + + +\end{document} diff --git a/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.bb b/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.bb new file mode 100644 index 00000000..9c53f11e --- /dev/null +++ b/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.bb @@ -0,0 +1,4 @@ +%%Title: C:/Users/D. P. Story/Desktop/examples/kutta.pdf +%%Creator: extractbb 20120420 +%%BoundingBox: 0 0 242 326 +%%CreationDate: Wed Jun 27 19:32:23 2012 diff --git a/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.eps b/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.eps new file mode 100644 index 00000000..94a31192 Binary files /dev/null and b/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.eps differ diff --git a/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.jpeg b/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.jpeg new file mode 100644 index 00000000..d847cb2a Binary files /dev/null and b/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.jpeg differ diff --git a/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.pdf b/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.pdf new file mode 100644 index 00000000..e737d265 Binary files /dev/null and b/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.pdf differ diff --git a/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.xbb b/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.xbb new file mode 100644 index 00000000..6cdd0aaa --- /dev/null +++ b/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.xbb @@ -0,0 +1,6 @@ +%%Title: Kutta.jpeg +%%Creator: extractbb 20200315 +%%BoundingBox: 0 0 242 326 +%%HiResBoundingBox: 0.000000 0.000000 242.000000 326.000000 +%%CreationDate: Sun Jul 5 05:28:08 2020 + diff --git a/texmf-dist/doc/latex/fitr/examples/graphics/runge.bb b/texmf-dist/doc/latex/fitr/examples/graphics/runge.bb new file mode 100644 index 00000000..fc1a526a --- /dev/null +++ b/texmf-dist/doc/latex/fitr/examples/graphics/runge.bb @@ -0,0 +1,5 @@ +%%Title: C:/Users/D. P. Story/Desktop/examples/runge.pdf +%%Creator: extractbb 20120420 +%%BoundingBox: 0 0 269 326 +%%CreationDate: Wed Jun 27 19:32:48 2012 + diff --git a/texmf-dist/doc/latex/fitr/examples/graphics/runge.eps b/texmf-dist/doc/latex/fitr/examples/graphics/runge.eps new file mode 100644 index 00000000..283816ea Binary files /dev/null and b/texmf-dist/doc/latex/fitr/examples/graphics/runge.eps differ diff --git a/texmf-dist/doc/latex/fitr/examples/graphics/runge.jpg b/texmf-dist/doc/latex/fitr/examples/graphics/runge.jpg new file mode 100644 index 00000000..db05c74b Binary files /dev/null and b/texmf-dist/doc/latex/fitr/examples/graphics/runge.jpg differ diff --git a/texmf-dist/doc/latex/fitr/examples/graphics/runge.pdf b/texmf-dist/doc/latex/fitr/examples/graphics/runge.pdf new file mode 100644 index 00000000..85ee459f Binary files /dev/null and b/texmf-dist/doc/latex/fitr/examples/graphics/runge.pdf differ diff --git a/texmf-dist/doc/latex/fitr/examples/graphics/runge.xbb b/texmf-dist/doc/latex/fitr/examples/graphics/runge.xbb new file mode 100644 index 00000000..b31c91e3 --- /dev/null +++ b/texmf-dist/doc/latex/fitr/examples/graphics/runge.xbb @@ -0,0 +1,6 @@ +%%Title: runge.jpg +%%Creator: extractbb 20200315 +%%BoundingBox: 0 0 269 326 +%%HiResBoundingBox: 0.000000 0.000000 268.800000 326.400000 +%%CreationDate: Sun Jul 5 05:29:00 2020 + diff --git a/texmf-dist/doc/latex/fitr/examples/jmpHook.js b/texmf-dist/doc/latex/fitr/examples/jmpHook.js new file mode 100644 index 00000000..239f8fec --- /dev/null +++ b/texmf-dist/doc/latex/fitr/examples/jmpHook.js @@ -0,0 +1,12 @@ +% +% Custom jump action +% +\begin{insDLJS}{jfitr}{Custom Effects following Jump} +function pbJmpHookCustom(event) { + console.show(); + app.beep(); + console.println("You just jumped to a view window named \"" + +event.target.name+"\"!"); +} +\end{insDLJS} +\endinput diff --git a/texmf-dist/doc/latex/fitr/examples/restoreHook.js b/texmf-dist/doc/latex/fitr/examples/restoreHook.js new file mode 100644 index 00000000..c5c42fa8 --- /dev/null +++ b/texmf-dist/doc/latex/fitr/examples/restoreHook.js @@ -0,0 +1,12 @@ +% +% Custom restore action +% +\begin{insDLJS}{rfitr}{Blink border on restore} +function pbRestoreHookCustom(event,bRestore) { + console.show(); + app.beep(); + console.println("You just returned from a view window named \"" + +event.target.name+"\"!"); +} +\end{insDLJS} +\endinput diff --git a/texmf-dist/doc/latex/fitr/fitr.pdf b/texmf-dist/doc/latex/fitr/fitr.pdf new file mode 100644 index 00000000..dce6c11f Binary files /dev/null and b/texmf-dist/doc/latex/fitr/fitr.pdf differ diff --git a/texmf-dist/doc/latex/fitr/fitr_demo.pdf b/texmf-dist/doc/latex/fitr/fitr_demo.pdf deleted file mode 100644 index 9e435578..00000000 Binary files a/texmf-dist/doc/latex/fitr/fitr_demo.pdf and /dev/null differ diff --git a/texmf-dist/doc/latex/fitr/fitr_demo.tex b/texmf-dist/doc/latex/fitr/fitr_demo.tex deleted file mode 100644 index 7fe7536f..00000000 --- a/texmf-dist/doc/latex/fitr/fitr_demo.tex +++ /dev/null @@ -1,106 +0,0 @@ -% -% This file works for Adobe Distiller as the PDF creator, with drivers dvips or dvipsone. -% It also works for pdftex (and luatex), dvipdfm, dvipdfmx, and xetex. -% -\documentclass[11pt]{article} -\usepackage{amsmath} -\usepackage[forcolorpaper,pro]{web} -\usepackage{eforms} -\usepackage[!preview,!viewMagWin]{fitr} -\usepackage[js=restoreHookBlink,js=jmpHookBlink]{lmacs} -\usepackage{graphicx} - -\DeclareDocInfo -{% - title={Jumping to a Rectangular Region}, - author={D. P. Story}, - university=My University, - talkdate={Dec.\ 17, \the\year}, - subject={Demo file to test the FitR view destination of PDF}, - keywords={LaTeX, PDF, Acrobat, JavaScript}, - university={% - Acro\!\TeX.Net\\ - NORTHWEST FLORIDA STATE COLLEGE\\ - Department of Mathematics}, - email={dpstory@acrotex.net}, - version={1.0}, - copyrightyears={2012} -} -\nocopyright -\norevisionLabel - -\selectColors{linkColor=blue} - -\parindent0pt \parskip6pt \pagestyle{empty} - -% \renewcommand{\overlayPresets}{\H{I}\S{D}\BG{}\BC{blue}} -% \renewcommand{\allowFXDefault}{false} - -\begin{document} -\begin{center}\sffamily\bfseries\Large\color{blue} - Jumping to a Rectangular Region\\[1ex]\normalsize\normalcolor - Dr. D. P. Story, \href{http://www.acrotex.net}{Acro\!\TeX.NeT} -\end{center} - -\textbf{Introduction.} This document demonstrates a technique designed to -help people with low vision read material by providing them with a -convenient way to magnify specific regions of the document. This is -especially useful for reading technical material such as mathematics, as -is demonstrated here. - -\textbf{Instructions:} Click on any of the mathematics to magnify a region -around it, the border will blink briefly to focus your attention on it. -To restore the previous view, click on the region again, -the formula is briefly highlighted by a blinking border so -can quickly find your place in the document. - - -\textbf{Sample Mathematical Text.} Consider the problem of numerically -solving the first order differential equation -\jdRect*[adddestw=60,adddesth=20]{$y'=f(t,y)$} on -\jdRect*[adddestw=1in,adddesth=30]{$[t_{start}, t_{end}]$}. Suppose we -want to classify third order \textsf{Runge-Kutta} type methods. Start with -\begin{align*} -\jdRect[height=1.3in,width=2.6in,lift=16pt,shift=-15pt,adddestw=10,adddesth=10] % -K_1 &= hf(t_n, y_n)\\ -K_2 &= hf(t_n +r h, y_n+aK_1)\\ -K_3 &= hf(t_n +s h, y_n+bK_1+cK_2)\\ -K &= w_1 K_1+ w_2 K_2+ w_3 K_3\\ -y_{n+1} &= y_n+K -\end{align*} -Find the system of equations satisfied by -\jdRect*[adddestw=10,adddesth=10]{$r,s, a, b, c, w_1, w_2, w_3$} -that will make the above algorithm a third order method. - -\textbf{Inline links.} Links can be provided within the text to jump to a -magnified region that needs to be inspected more closely. The links below -are different from the ones above. After jumping to a magnified rectangle, -restore the preview view by clicking on the rectangle. - -\def\RungePic{\includegraphics[width=\marginparwidth]{runge}} -\def\KuttaPic{\includegraphics[width=\marginparwidth]{Kutta}} -\def\jrOpts#1#2{link=#1,dest=#2} - -\textbf{\jdRect*[nodest,\jrOpts{jmp}{rungePic},adddestw=10,adddesth=10]{Carl Runge}}% -\marginpar{\jdRect*[\jrOpts{restore}{rungePic},adddestw=\marginparsep, -adddesth=\marginparpush]{\parbox[b]{\marginparwidth}{\RungePic\\ -\normalcolor\centering\footnotesize\textsf{Carl Runge}}}} (1867-1944) -was the third of four sons from a well-to-do German merchant family. He -is remembered for his \textsf{Runge-Kutta} method for solving -differential equations. - -\textbf{\jdRect*[nodest,\jrOpts{jmp}{KuttaPic}]{Martin Kutta}}% -\marginpar{\jdRect*[\jrOpts{restore}{KuttaPic},adddestw=\marginparsep, -adddesth=\marginparpush]{\parbox[b]{\marginparwidth}{\KuttaPic\\ -\normalcolor\centering\footnotesize\textsf{Martin Kutta}}}} (1867-1944) -extended the Runge's method of solving ordinary differential equations. He -is also known for his work on airfoils. - -% Again, don't forget to press -%\textbf{Alt+Left Arrow} to return to the view you had before you clicked -%on the link. - -\begin{flushright} -This work was motivated by Mohsen M. -\end{flushright} -\end{document} diff --git a/texmf-dist/doc/latex/fitr/fitr_man.pdf b/texmf-dist/doc/latex/fitr/fitr_man.pdf index b70ee265..7c851822 100644 Binary files a/texmf-dist/doc/latex/fitr/fitr_man.pdf and b/texmf-dist/doc/latex/fitr/fitr_man.pdf differ diff --git a/texmf-dist/doc/latex/fitr/fitr_man.tex b/texmf-dist/doc/latex/fitr/fitr_man.tex index 690f498f..d0898ac6 100644 --- a/texmf-dist/doc/latex/fitr/fitr_man.tex +++ b/texmf-dist/doc/latex/fitr/fitr_man.tex @@ -1,58 +1,65 @@ -% makeindex < aebpro_man.idx > aebpro_man.ind \documentclass{article} \usepackage[fleqn]{amsmath} \usepackage[ web={centertitlepage,designv,forcolorpaper, - usesf,latextoc,pro}, %tight, + latextoc,pro}, %tight, eforms,aebxmp ]{aeb_pro} -\usepackage{graphicx,array} -\usepackage[dvipsone,!preview,!viewMagWin]{fitr} -\usepackage[js=restoreHookBlink,js=jmpHookBlink]{lmacs} - \usepackage[fortextbook,usecustomdesign,nomarginwrite]{eqexam} +\usepackage{graphicx,array} +\usepackage[blink,!preview,!viewMagWin]{fitr} %\usepackage{myriadpro} \usepackage[altbullet]{lucidbry} -\renewcommand\allowFXDefault{false} +\renewcommand\allowFXDefault{false} %\usepackage{makeidx} %\makeindex \usepackage{acroman} +\usepackage[active]{srcltx} + +\let\tops\texorpdfstring \makeatletter +\newcommand{\FmtMP}[2][0pt]{\mbox{}\marginpar{\raisebox{#1}{\parbox{\marginparwidth}{\slshape\raggedleft\small#2}}}} +\addtolength{\marginparwidth}{1in} \def\eq@fititin#1{\noindent\unskip\nobreak\hfill\penalty50 \hskip2em\hbox{}\nobreak\hfill#1} \def\fitit{\eq@fititin{\exrtnlabelformat}} \@mparswitchfalse\reversemarginpar \def\meta#1{$\langle\textit{\texttt{#1}}\rangle$} - +\let\maketitle\web@maketitle +\renewcommand{\paragraph} + {\@startsection{paragraph}{4}{0pt}{6pt}{-3pt} + {\normalfont\normalsize\bfseries}} +\renewcommand{\subparagraph} + {\@startsection{subparagraph}{5}{\parindent}{6pt}{-3pt}% + {\normalfont\normalsize\bfseries}} \makeatother -%\usepackage[active]{srcltx} + \urlstyle{rm} \def\fitrpkg{\textsf{f{i}tr}} +\let\texorpdfstring\tops \DeclareDocInfo { university={\AcroTeX.Net}, - title={\texorpdfstring{The}{The manual for the} f{i}tr Package\texorpdfstring{\\ + title={\tops{The}{The manual for the} \tops{\textsf{f{i}tr}}{fitr} Package\tops{\\ Defining and Jumping to\\a Rectangular Destination}{}}, author={D. P. Story}, email={dpstory@acrotex.net}, subject=Documentation for the fitr package, talksite={\url{www.acrotex.net}}, - version={1.0}, + version={1.3.2, 2020/07/09}, Keywords={LaTeX,PDF,fitr,JavaScript,Adobe Acrobat}, copyrightStatus=True, copyrightNotice={Copyright (C) \the\year, D. P. Story}, copyrightInfoURL={http://www.acrotex.net} } \DeclareInitView{windowoptions={showtitle}} - - \def\dps{$\hbox{$\mathfrak D$\kern-.3em\hbox{$\mathfrak P$}% \kern-.6em \hbox{$\mathcal S$}}$} @@ -63,25 +70,53 @@ \sectionLayout{indent=-62.5pt,fontsize=large,color=aeb} \subsectionLayout{indent=-31.25pt,color=aeb} \subsubsectionLayout{indent=0pt,color=aeb} -\subsubDefaultDing{\texorpdfstring{$\bullet$}{\textrm\textbullet}} +\subsubDefaultDing{\tops{$\bullet$}{\textrm\textbullet}} %\pagestyle{empty} -\parindent0pt -\parskip\medskipamount -\definePath\bgPath{"C:/Users/Public/Documents/% - ManualBGs/Manual_BG_Print_AeB.pdf"} +%\definePath\bgPath{"C:/Users/Public/Documents/% +% ManualBGs/Manual_BG_Print_AeB.pdf"} +\chngDocObjectTo{\newDO}{doc} \begin{docassembly} -\addWatermarkFromFile({% - bOnTop: false, - cDIPath: \bgPath -}) -\executeSave() +var titleOfManual="The fitr Package"; +var manualfilename="Manual_BG_Print_fitr.pdf"; +var manualtemplate="Manual_BG_Green.pdf"; // Blue, Green, Brown +var _pathToBlank="C:/Users/Public/Documents/ManualBGs/"+manualtemplate; +var doc; +var buildIt=false; +if ( buildIt ) { + console.println("Creating new " + manualfilename + " file."); + doc = \appopenDoc({cPath: _pathToBlank, bHidden: true}); + var _path=this.path; + var pos=_path.lastIndexOf("/"); + _path=_path.substring(0,pos)+"/"+manualfilename; + \docSaveAs\newDO ({ cPath: _path }); + doc.closeDoc(); + doc = \appopenDoc({cPath: manualfilename, oDoc:this, bHidden: true}); + f=doc.getField("ManualTitle"); + f.value=titleOfManual; + doc.flattenPages(); + \docSaveAs\newDO({ cPath: manualfilename }); + doc.closeDoc(); +} else { + console.println("Using the current "+manualfilename+" file."); +} +var _path=this.path; +var pos=_path.lastIndexOf("/"); +_path=_path.substring(0,pos)+"/"+manualfilename; +\addWatermarkFromFile({ + bOnTop:false, + bOnPrint:false, + cDIPath:_path +}); +\executeSave(); \end{docassembly} \begin{document} + + \maketitle \selectColors{linkColor=black} @@ -99,110 +134,162 @@ destination. The \textsl{PDF Reference} describes \textbf{FitR} as, and \textsl{top} entirely within the window both horizontally and vertically. \end{quote} -The package supports the \textsf{dvips}, \textsf{dvipsone}, and -\textsf{pdftex}, \textsf{luatex}, \textsf{dvipdfm}, \textsf{dvipdfmx}, and -\textsf{xetex} applications, the first two assume that \textbf{Adobe -Distiller} is the PDF creator. - -The only required packages are the \textsf{eforms} package (dated -2012/06/20 or later), which is part of the \textbf{AeB Bundle}, and -\textsf{collectbox} by Martin Scharrer, more on this package later, and -the ubiquitous \textsf{xcolor}.\footnote{The \textsf{eforms} package +The package supports the \app{dvips}, \app{pdflatex}, \app{lualatex}, +\app{xelatex}, \textsf{dvipdfm}, and \textsf{dvipdfmx} applications. + +The only required packages are the \pkg{eforms} package (dated +2012/06/20 or later), which is part of the \pkg{AeB Bundle}, and +\pkg{collectbox} by Martin Scharrer, more on this package later, and +the ubiquitous \pkg{xcolor}.\footnote{The \textsf{eforms} package itself brings in other packages, including \textsf{hyperref} and \textsf{insdljs}.} -The package was developed in response to a user of the AeB Bundle who was -interested in developing documents for students with low vision; the idea -is to magnify regions of the document so the student can read more -comfortably. The demonstration files are \texttt{fitr\_demo.tex} which -illustrates the package and some special methods for people with low -vision, and \texttt{fitr\_minimal.tex}, which is the same demo file with -any and extra package stripped out. +\paragraph*{Motivation.} This package was developed in response to a user of the \pkg{AeB Bundle} who +was interested in developing documents for students with \emph{low vision}; +the idea is to magnify regions of the document so the student can read more +comfortably. + +\paragraph*{Demonstration files.} The demonstration files are \texttt{fitr\_demo.tex} which +illustrates the package and some special methods for people with low vision, +and \texttt{fitr\_minimal.tex}, which is the same demo file with any extra +packages stripped out. + +\paragraph*{What's New for Version 1.3.2 (2020/07/09)} The package is extended to support +the PDF creator \app{lualatex}. All common workflows are now automatically +detected: \app{pdflatex}, \app{lualatex}, and \app{xelatex}. If no driver is +specified and none is automatically detected, \app{dvips} is automatically +selected by default. The other drivers \app{dvipdfm} and \app{dvipdfmx} need +to be explicitly specified as the driver (\ameta{driver}). The \ameta{driver} +option is described in the next section. Also, there are several new options, +one of which is \opt{gonative}; when this option is selected, no field or +document JavaScript is used. For the \opt{gonative} option, the workflow +\app{dvips\,->\,ps2pdf} is also supported because there is no document +JavaScript required. \section{The Preamble and Package Options} The minimal preamble for this package is -\begin{Verbatim}[xleftmargin=20pt,commandchars=!()] +\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()] \usepackage[!meta(driver),!meta(options)]{fitr} \end{Verbatim} -The \textsf{hyperref} package is brought in through the \textsf{eforms} package. -Optionally, {\fitrpkg} can be used with other members of AeB (\textsf{web} and -\textsf{exerquiz}, for example). - -Another package requirement is \textsf{collectbox} by Martin Scharrer; -quoting from the abstract of the documentation, -\begin{quote} -This package provides macros to collect and process an macro argument -(i.e. something which looks like a macro argument) as horizontal box -instead as a real macro argument. These ``arguments'' will be stored like -when using \cs{savebox}, \cs{sbox} or the \texttt{lrbox} environment and -allow verbatim or other special code. Instead of explicit braces also -implicit braces in the form of \cs{bgroup} and \cs{egroup} are supported.\dots -\end{quote} +Permissible names for \ameta{driver} are \opt{dvips}, \opt{pdftex}, +\opt{luatex}, \opt{xetex}, \textsf{dvipdfm}, and \textsf{dvipdfmx}. The +\ameta{driver} option is only required for \app{dvipdfm} and \app{dvipdfmx}, +the others are either detected automatically, or is the default driver +(\opt{dvips}). The drivers and options are discussed in more detail below. + +\paragraph*{Package requirements.} The \pkg{hyperref} package is brought in through the \pkg{eforms} package. +Another package requirement is \textsf{collectbox} by Martin Scharrer. The \cs{collectbox} command is used to collect the second argument of -\cs{jdRect}, see the discussion of \cs{jdRect} in Section~\ref*{jdRect}. +\cs{jdRect}, see the discussion of \cs{jdRect} in \hyperref[jdRect]{Section~\ref*{jdRect}}. As a result, the second argument may contain verbatim text in it. Very cool. -The package has ten options: six driver options and four viewing -options. -\begin{itemize} -\item \textbf{Driver Options:} These are \texttt{dvips} (the default), - \texttt{dvipsone}, and \texttt{pdftex} (which includes the use of - lualatex), \texttt{dvipdfm}, \texttt{dvipdfmx}, and \texttt{xetex}. If you - specify one of the first two, it is assumed that you are using - \textbf{Adobe Distiller} as your PDF creator. - -\item[] The \textsf{fitr} package checks whether the \textsf{web} - package is loaded, if so, its uses the driver used by - \textsf{web}; otherwise \textsf{fitr} auto-detects for - \textsf{pdftex} and \textsf{xetex}. If no driver is passed, and - neither \textsf{pdftex} nor \textsf{xetex} are detected, then - \textsf{dvips} is the default driver. - -\item \textbf{Viewing Options:} When you specify \texttt{preview}, the -bounding boxes of the buttons are shown in the dvi-previewer (or the PDF -document); you can turn off this preview by specifying \texttt{!preview} -(or removing \texttt{preview} entirely from the option list). The other -option type is \texttt{viewMagWin}, when this option the viewing window, a -rectangular region, becomes visible in the dvi-previewer (or in the PDF -document); specifying \texttt{!viewMagWin} turns off this type of preview. - -\item[] The effects of the viewing options will be illustrated later in this -document, see \autoref{previewEx} on page~\pageref*{previewEx}. - -\end{itemize} - -\section{The one and only command}\label{jdRect} - -The {\fitrpkg} has only one command, \cs{jdRect}, but there are two forms -of usage. \cs{jdRect} optionally creates a push button or link, and -optionally creates a viewing window. The term \emph{viewing window} refers -to a rectangular region that is created by the \textbf{FitR} destination -viewing specification, see \textbf{Table~8.2 Destination syntax} of the -\textsl{PDF Reference}, version 1.7. A \emph{named destination} is created -and is associated with the viewing window. When we jump to a viewing -window, this window is magnified to the largest extent possible. For -example, click on the either of the two displayed forms of the syntax for -\cs{jdRect}; after jumping to the viewing window, click on the same -display to return to the previous view. +\paragraph*{Package options.} The package has several options, broken down below by +category: Driver, View, and Other options. +\begin{description} +\item[Driver Options:] The major driver options are + \opt{dvips}\FmtMP{\opt{dvips}} (the default), + \opt{pdftex}\FmtMP{\opt{pdftex}}, \opt{luatex}\FmtMP{\opt{luatex}}, and + \opt{xetex}\FmtMP{\opt{xetex}}. Lesser driver options are + \opt{dvipdfm}\FmtMP{\opt{dvipdfm}} and + \opt{dvipdfmx}\FmtMP{\opt{dvipdfmx}}, but there seems to be a bug in + the \cs{includegraphics} command as the bounding box is not correctly + re-scaled. If you specify \opt{dvips}, it is assumed that you are using + \app{Adobe Distiller} as your PDF creator.\footnote{Unless you are also + using the \opt{gonative} option, see the description of this option.} + + The \pkg{fitr} package checks whether the \pkg{web} package is loaded, + if so, the driver of \pkg{web} is used; otherwise \pkg{fitr} + auto-detects for \app{pdftex}, \app{luatex}, and \app{xetex}. If no + driver is passed, and neither \app{pdftex}, \app{luatex}, nor + \app{xetex} are detected, the default driver, \app{dvips}, is used. + +\item[Viewing Options:] When you specify + \opt{preview}\FmtMP{\opt{preview}}, the bounding boxes of the buttons + are shown in the dvi-previewer (or the PDF viewer); you can turn off + this preview by specifying \opt{!preview} (or removing \opt{preview} + entirely from the option list). The other option type is + \opt{viewMagWin}\FmtMP{\opt{viewMagWin}}, when this option the viewing + window, a rectangular region, becomes visible in the dvi-previewer (or + in the PDF document); specifying \opt{!viewMagWin} turns off this type + of preview. + + The effects of the viewing options will be illustrated later in this + document, see \autoref{previewEx} on page~\pageref*{previewEx}. + +\item[Special Effects Options:] There are several options for bringing in + additional document JavaScript for special effects: (1) + \opt{blinkonjmp}\FmtMP{\opt{blinkonjmp}} blinks the border following the jump + to a focused destination; (2) + \opt{blinkonrestore}\FmtMP{\opt{blinkonrestore}} blinks the border following + the restore action; (3) \opt{blink}\FmtMP{\opt{blink}} is a convenience + option that combines the actions of \opt{blinkonjmp} and + \opt{blinkonrestore}. There are negative versions of these options as + well: \opt{!blinkonjmp}, \opt{!blinkonrestore}, and \opt{!blink}. The + default is to have no special effects, in effect \opt{!blink} is the + default. Refer to \hyperref[FX]{Section~\ref*{FX}} for more information + on special effects. + +\item[Other Options:] The \opt{gonative}\FmtMP{\opt{gonative}} option does + not use any field or document JavaScript; as a result, the + \app{dvips\,->\,ps2pdf} is then supported as no document JavaScripts + are employed. + +\end{description} + +\section{The \tops{\protect\cs{jdRect}}{\textbackslash{jdRect}} command}\label{jdRect} + +The {\fitrpkg} has only one command, \cs{jdRect}, which (optionally) +\textbf{j}umps to and/\allowbreak or sets a \textbf{d}estination of a +\textsf{Fit\textbf{Rect}}angle.\footnote{I had some problems +naming this command.} +There are two forms of usage. \cs{jdRect} optionally +creates a push button or link, and optionally creates a viewing window. The +term \emph{viewing window} refers to a rectangular region that is created by +the \textbf{FitR} destination viewing specification, see \textbf{Table~8.2 +Destination syntax} of the \textsl{PDF Reference}, version 1.7. A \emph{named +destination} is created and is associated with the viewing window. When we +jump to a viewing window, this window is magnified to the largest extent +possible. For example, click on the either of the two displayed forms of the +syntax for \cs{jdRect}; after jumping to the viewing window, click on the +same display to return to the previous view. %\previewtrue - +\newtopic\noindent There are two versions of \cs{jdRect}, the command itself, and a \texttt{*} version, \cs{jdRect*}. The syntax follows, along with the expected parameters. -\begin{quote} - \jdRect*[adddestw=10bp,adddesth=10bp]{\cs{jdRect[\meta{key-values}]}} -\end{quote} +\bVerb %\previewOn\viewMagWinOn +\takeMeasure{\string\jdRect[\ameta{key-values}]}% +\setlength{\dimen0}{\bxSize}% +\def\1{\rlap{\hspace*{\dimen0}\sffamily(Click on box to zoom in)}} +\jdRect[width=\bxSize,height=1.5\baselineskip,lift=\baselineskip,adddestw=10bp,adddesth=10bp]\relax +\begin{dCmd}[commandchars=!()]{\bxSize} +!1\jdRect[!ameta(key-values)] +\end{dCmd} +\eVerb +%\begin{quote} +% \jdRect*[adddestw=10bp,adddesth=10bp]{\cs{jdRect[\meta{key-values}]}} +%\end{quote} The above version is used to overlay a region with a button and view window. No content is specified, but is defined by specifying the \texttt{width} and \texttt{height}; it can be positioned using \texttt{shift} and \texttt{lift}. +\newtopic\noindent There is a \texttt{*}-version as well: -\begin{quote} - \jdRect*[adddestw=10bp,adddesth=10bp]{\cs{jdRect*[\meta{key-values}]}\verb!{!\meta{content}\verb!}!} -\end{quote} +\bVerb %\previewOn\viewMagWinOn +\takeMeasure{\string\jdRect[\ameta{key-values}]\darg{\ameta{content}}}% +\setlength{\dimen0}{\bxSize}% +\def\1{\rlap{\hspace*{\dimen0}\sffamily(Click on box to zoom in)}} +\jdRect[width=\bxSize,height=1.5\baselineskip,lift=\baselineskip,adddestw=10bp,adddesth=10bp]\relax +\begin{dCmd}[commandchars=!()]{\bxSize} +!1\jdRect[!ameta(key-values)]{!ameta(content)} +\end{dCmd} +\eVerb +%\begin{quote} +% \jdRect*[adddestw=10bp,adddesth=10bp]{\cs{jdRect*[\meta{key-values}]}\verb!{!\meta{content}\verb!}!} +%\end{quote} The second parameter \meta{content} is required when the \texttt{*} is present. This version is meant to enclose \meta{content} within the button and view window. The \texttt{width} and \texttt{height} keys are ignored, @@ -210,6 +297,7 @@ but \texttt{shift} and \texttt{lift} are obeyed (though you may \texttt{shift} or \texttt{lift} the button/view window away from the content). +\paragraph*{Description of \ameta{key-values}.} Before illustrating the \cs{jdRect} command, we first discuss its key-value pairs. \begin{itemize} @@ -234,7 +322,7 @@ key-value pairs. \autoref{displayEqEx} on page~\pageref*{displayEqEx}. \item \texttt{height=\meta{length}}: Similar comments here as was made - for the \texttt{width} key. This key is 0used to set the height of + for the \texttt{width} key. This key is used to set the height of the button/viewing window. The default is 0pt. It is required when \texttt{*} is not present. See \autoref{displayEqEx} on page~\pageref*{displayEqEx}. @@ -250,13 +338,13 @@ key-value pairs. the same dimensions as the underlying button. The \texttt{adddestw} key-value pair is used to widen the viewing window; \texttt{adddestw=.2in} widens the window by \texttt{.2in} on the left and \texttt{.2in} on the -right. See Figure~\ref*{bvw}, page~\pageref*{bvw}. +right. See \hyperref[bvw]{Figure~\ref*{bvw}}, page~\pageref*{bvw}. \item \texttt{adddesth=\meta{length}}: Similar to \texttt{adddestw} but for height. The \texttt{adddesth} key-value pair is used to increase the height the viewing window; \texttt{adddesth=.2in} increases the height of the window by \texttt{.2in} on the top and \texttt{.2in} in the bottom. -See Figure~\ref*{bvw}, page~\pageref*{bvw}. +See \hyperref[bvw]{Figure~\ref*{bvw}} below. \begin{figure}[htb] \begin{center}\setlength\fboxsep{0pt} \fbox{\parbox[c][.9in]{2.4in} @@ -272,13 +360,13 @@ See Figure~\ref*{bvw}, page~\pageref*{bvw}. window. Clicking the same region again restores the previous view. \item[] When \texttt{button} is \texttt{false}, the button is not created, -but the viewing window is still created. You can then jump to the viewing -window with a separate link or button. When \texttt{button=false}, use the -\texttt{dest} key to assigned a numbed destination to viewing window. -({\fitrpkg} automatically creates the definition names internally, they -are used by the buttons. If no button is created, name the destination so -your know its name and can reference it in link that jumps to that viewing -area.) + but the viewing window is still created. You can then jump to the + viewing window with a separate link or button. When + \texttt{button=false}, use the \texttt{dest} key to assign a name + (\ameta{name}) to the viewing window. ({\fitrpkg} automatically creates + the destination names internally, they are used by the buttons. If no + button is created, name the destination so you know its name and can + reference it in link that jumps to that viewing area.) \item \texttt{link=jmp|restore} If \texttt{link} has a value, then @@ -290,19 +378,20 @@ area.) \texttt{nodest} key as well; no viewing window will be created around the link, as it is unlikely you'll want to jump to a link. -\def\RungePic{\kern0pt\includegraphics[width=\marginparwidth]{runge}} + +\def\RungePic{\kern0pt\includegraphics[width=1in]{runge}} \def\jrOpts#1#2{link=#1,dest=#2} \item[] For example click on the link \textbf{\jdRect*[nodest,\jrOpts{jmp}{rungePic},adddestw=10,adddesth=10]{Carl Runge}}% -\marginpar{\jdRect*[\jrOpts{restore}{rungePic},adddestw=\marginparsep, -adddesth=\marginparpush]{\parbox[t]{\marginparwidth}{\RungePic\\ +\marginpar{\raggedleft\jdRect*[\jrOpts{restore}{rungePic},adddestw=\marginparsep, +adddesth=\marginparpush]{\parbox[t]{1in}{\RungePic\\ \normalcolor\centering\footnotesize\textsf{Carl Runge}}}} and jump to the picture of Runge in the margin. Click on the picture of Runge and return to the previous view. The jump to the picture from the text ``Carl Runge'' is as follows: -\begin{Verbatim}[xleftmargin=20pt] +\begin{Verbatim}[xleftmargin=\amtIndent] \jdRect*[nodest,link=jmp,dest=rungePic, adddestw=10bp,adddesth=10bp]{Carl Runge} \end{Verbatim} @@ -313,24 +402,24 @@ the destination of the jump link is the destination \texttt{rungePic}. \item[] The color of the link is determined by \cs{@linkcolor}, a \textsf{hyperref} command that holds a named color. This can be redefined at anytime, directly using -\begin{Verbatim}[xleftmargin=20pt] +\begin{Verbatim}[xleftmargin=\amtIndent] \makeatletter \def\@linkcolor{blue} \makeatother \end{Verbatim} or, if you are using the \texttt{pro} option with the \textsf{web} package, you can say, -\begin{Verbatim}[xleftmargin=20pt] -\selectColors{linkColor=red} +\begin{Verbatim}[xleftmargin=\amtIndent] +\selectColors{linkColor=blue} \end{Verbatim} When using the \textsf{web} package, the default is \texttt{webgreen}. \item[] The action to restore the previous view is as follows: -\begin{Verbatim}[xleftmargin=20pt] -\marginpar{\jdRect*[link=restore,dest=rungePic, - adddestw=\marginparsep,adddesth=\marginparpush - ]{\parbox[t]{\marginparwidth}{\RungePic\\ - \normalcolor\centering\footnotesize\textsf{Carl Runge}}}} +\begin{Verbatim}[xleftmargin=\amtIndent] +\marginpar{\raggedleft\jdRect*[link=restore,dest=rungePic, + adddestw=\marginparsep,adddesth=\marginparpush + ]{\parbox[t]{1in}{\RungePic\\ + \normalcolor\centering\footnotesize\textsf{Carl Runge}}}} \end{Verbatim} The picture is placed in the margin using \cs{marginpar}; the command \cs{RungePic} is a convenience macro that uses \cs{includegraphics} in @@ -353,37 +442,66 @@ destination the Carl Runge link jumps to. allows for special effects (FX) when a viewing window is jumped to and when the view is restored. The default value of \texttt{allowFX} is \texttt{true} allow special effects if there - is any defined. By saying \texttt{allowFX=false}, no special + are any defined. By saying \texttt{allowFX=false}, no special effects are used, even if some are defined. \item[] An example of special effects you say? Try clicking on the Pythagorean Theorem \jdRect*[allowFX,adddestw=10bp,adddesth=10bp]{$ a^2 + b^2 = c^2 $} +The default is to allow special effects, the default is set by the command, +\bVerb\takeMeasure{\string\renewcommand\darg{\string\allowFXDefault}\darg{true}}% +\begin{dCmd}[commandchars=!()]{\bxSize} +\renewcommand{\allowFXDefault}{true} +\end{dCmd} +\eVerb By declaring \verb~\renewcommand{\allowFXDefault}{false}~, the default +is now set to no special effects. \end{itemize} +\paragraph*{Passing KV-pairs to the push button of \cs{jdRect}.}\label{para:Presets} When \cs{jdRect} +produces a push button, you can pass \pkg{eforms} key-value pairs (KV-pairs) to +the underlying push button. +\bVerb\takeMeasure{\string\newcommand\darg{\string\overlayPresets}\darg{\string\H\darg{I}\string\BG\darg{}\string\BC\darg{}\string\S\darg{S}}}% +\begin{dCmd}[commandchars=!()]{\bxSize} +\newcommand{\overlayPresets}{\H{I}\BG{}\BC{}\S{S}} +\restoreOverlayPresets +\end{dCmd} +\eVerb See the \textsf{eforms} manual for the meaning of these cryptic symbols. +The initial value of \cs{overlayPresets} create transparent push +buttons. In subsequent examples, we will redefine \cs{overlayPresets} to +change the visibility of the overlay buttons. The command +\cs{restoreOverlayPresets} returns any re-definition of \cs{overlayPresets} +to its default definition, which is shown above. + \section{Some Examples} \everymath{\displaystyle} -In this section, several examples are presented that illustrate the -options of \cs{jdRect}. +In this section, several examples are presented that illustrate the options +of the \cs{jdRect} command. The examples in this section are created with +\begin{Verbatim}[xleftmargin=\amtIndent] +\renewcommand{\allowFXDefault}{false} +\end{Verbatim} +in force. There is one example +where we set \opt{allowFX=true}. Additional discussion on special effects +(FX) may be found in \hyperref[FX]{Section~\ref*{FX}}. -\begin{example}\label{previewEx}\previewtrue\viewMagWintrue +\begin{example}\label{previewEx}\previewOn\viewMagWinOn \textbf{Illustrate Preview Rectangles.} The \texttt{preview} and \texttt{viewMagWin} options just set Boolean switches. In this example, we -manually gives these switches a value of \texttt{true} +manually give these switches a value of \texttt{true} (\cs{previewtrue}\cs{viewMagWintrue}). Take a close look at the following -function -\jdRect*{$ f(x) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^x e^{-t^2/2}\,\text{d}t$}, -or the more general form -\jdRect*[adddestw=20bp,adddesth=10bp]{$ f(x;\mu;\sigma) = \frac{1}{\sigma\sqrt{2\pi}}\int_{-\infty}^x e^{-\frac{(t-\mu)^2}{2\sigma^2}}\,\text{d}t$} -The preview rectangles are shown: For the one on the left, the dimensions -of the push button and the viewing rectangle are the same; for one on the -right, the dimensions of the viewing window have been increased by -using \texttt{adddestw=20bp,adddesth=10bp}. When you jump to each of these -viewing windows, you the one on the left is magnified much more than the -one on the right; the larger viewing window allows the user to see some of -the surrounding text.\fitit +function \jdRect*{$ f(x) = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^x +e^{-t^2/2}\,\text{d}t$}, or the more general form +\jdRect*[adddestw=20bp,adddesth=10bp]{$ f(x;\mu;\sigma) = +\frac{1}{\sigma\sqrt{2\pi}}\int_{-\infty}^x +e^{-\frac{(t-\mu)^2}{2\sigma^2}}\,\text{d}t$} The preview rectangles are +shown: For the one on the left, the dimensions of the push button and the +viewing rectangle are the same; for one on the right, the dimensions of the +viewing window have been increased by using +\texttt{adddestw=20bp,adddesth=10bp}. When you jump to each of these viewing +windows, the one on the left is magnified much more than the one on the +right, but the larger viewing window allows the user to see some of the +surrounding text.\fitit \end{example} \begin{example}\label{displayEqEx} @@ -405,8 +523,8 @@ Find the system of equations satisfied by \jdRect*[adddestw=10,adddesth=10]{$r,s, a, b, c, w_1, w_2, w_3$} that will make the above algorithm a third order method. -The verbatim listing of this set of aligned equations is -\begin{Verbatim}[xleftmargin=20pt,numbers=left] +The verbatim listing of this set of aligned equations is, +\begin{Verbatim}[xleftmargin=\amtIndent,numbers=left] \begin{align*} \jdRect[height=1.3in,width=2.6in,lift=16pt,shift=-15pt, adddestw=10bp,adddesth=10bp] @@ -417,17 +535,19 @@ K &= w_1 K_1+ w_2 K_2+ w_3 K_3\\ y_{n+1} &= y_n+K \end{align*} \end{Verbatim} -This is an example of \cs{jdRect} (the non-\texttt{*} version), so there -is no second argument. In this case, we create our button dimensions -using \texttt{height=1.3in,width=2.6in}, line~(2). Note the positioning -of the \cs{jdRect} command, the upper-left point of the display. We then -use \texttt{lift=16pt,shift=-15pt} to move the button around to cover the +This is an example of \cs{jdRect} (the non-\texttt{*} version), so there is +no second argument. In this case, we create our button dimensions using +\texttt{height=1.3in,width=2.6in}, line~(2). Note the positioning of the +\cs{jdRect} command, the upper-left point of the display. We then use +\texttt{lift=16pt,shift=-15pt} to move the button around to cover the equations, line~(2); finally, we increase the dimensions of the viewing -window in line~(3) with \texttt{adddestw=10bp,adddesth=10bp}. Now, how -were the values of these keys determined? By trial and error, while the +window in line~(3) with \texttt{adddestw=10bp,adddesth=10bp}. Now, how were +the values of these keys determined? By trial and error, while the \texttt{preview} and \texttt{viewMagWin} options were in effect. Below are the same equations with \cs{previewtrue} and \cs{viewMagWintrue}, locally -invoked:\previewtrue\viewMagWintrue +invoked:\previewOn\viewMagWinOn\footnote{You can also use the commands +\cs{previewOn}, \cs{previewOff}, \cs{viewMagWinOn}, and \cs{viewMagWinOff} as +a convenient way of turning on or off these switches.} \begin{align*} \jdRect[height=1.3in,width=2.6in,lift=16pt,shift=-15pt, adddestw=10bp,adddesth=10bp] @@ -448,33 +568,29 @@ modes.\fitit \end{example} \begin{example}\label{CustomAppr} -\textbf{Customizing the appearance.} The properties of the underlying push button -is to be visible, but does not print. The background and the border are -transparent. The default properties are passed to the push button using a -presets command: -\begin{Verbatim}[xleftmargin=20pt] -\newcommand{\overlayPresets}{\H{I}\BG{}\BC{}\S{S}} -\end{Verbatim} -See the \textsf{eforms} manual for the meaning of these cryptic symbols. -You can modify these settings locally, within a group, or globally. In -this example, we change the border to red dashed line. We redefine -\cs{overlayPresets} as follows: -\begin{Verbatim}[numbers=left,xleftmargin=20pt] +\textbf{Customizing the appearance.} The among the properties of the +underlying push button is to be visible, but does not print. The background +and the border are transparent. The default properties of the button overlay +are passed to the push button using \cs{overlayPresets}, introduced earlier +on \hyperref[para:Presets]{page~\pageref*{para:Presets}}. You can modify these +settings locally, within a group, or globally. In this example, we change the +border to red dashed line. We redefine \cs{overlayPresets} as follows: +\begin{Verbatim}[xleftmargin=\amtIndent] \renewcommand{\overlayPresets}{\H{I}\BG{}\BC{red}\S{D}} \end{Verbatim} \renewcommand{\overlayPresets}{\H{I}\BG{}\BC{red}\S{D}}% -The changes are in line~(2), we say \verb!\BC{red}! (the \textsf{xcolor} package is +In the re-definition, \verb!\BC{red}! is declared (the \textsf{xcolor} package is required here for named colors; otherwise, we would say \verb~\BC{1 0 0}~), -and we've change \verb!\S{S}! to \verb~\S{D}~, which gives a dashed +\verb!\S{S}! is changed to \verb~\S{D}~, which gives a dashed (\texttt{D}) border as opposed to a solid (\texttt{S}) border. Now to illustrate this. My name is \jdRect*{D. P. Story!}; lets increase the viewing window, shall we? My name is \jdRect*[adddestw=10bp,adddesth=10bp]{D. P. Story!}. Keep in mind that we are overlaying a push button; if you want the underlying text to have a color, you need to color it yourself: -\jdRect*[adddestw=10bp,adddesth=10bp]{\textcolor{blue}{D. P. Story}!} +\jdRect*[allowFX,adddestw=10bp,adddesth=10bp]{\textcolor{blue}{D. P. Story}!} This last button has code, -\begin{Verbatim}[xleftmargin=20pt] -\jdRect*[adddestw=10bp,adddesth=10bp]% +\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()] +\jdRect*[!textbf(allowFX),adddestw=10bp,adddesth=10bp]% {\textcolor{blue}{D. P. Story}!} \end{Verbatim} As the changes to the preset appearance are inside a group, after this @@ -482,72 +598,124 @@ example (environment)) \cs{overlayPresets} will revert to its definition that was in effect outside the example.\fitit \end{example} -\section{Special Effects} +\section{Special Effects (FX)}\label{FX} + +\subsection{Built-in FX} + +There are two built-in JavaScript functions \texttt{pbJmpHook()} and +\texttt{pbRestoreHook()}; the first blinks the view window just after the +focused jump, and the latter blinks the view window after the previous view +is restored. These built-in functions are not available by default, they are +brought into the document with the options \opt{blinkonjmp} and +\opt{blinkonrestore}. The option \opt{blink} is equivalent to specifying both +\opt{blinkonjmp} and \opt{blinkonrestore}. This document was compiled by inputting +the \pkg{fitr} package as \verb~\usepackage[blink]{fitr}~. + +\subsubsection{FX examples} + +\begin{example} +\textbf{FX and Verbatim.} Zoom in on verbatim text +\jdRect*[allowFX,adddestw=10bp,adddesth=10bp] +{\verb!#$$%&$%^&$%^$!} which can be handled by \cs{jdRect*} command. The listing is, +\begin{Verbatim}[xleftmargin=\amtIndent,commandchars={~()}] +\jdRect*[~textbf(allowFX),adddestw=10bp,adddesth=10bp] +{\verb!#$$%&$%^&$%^$!} which can be handled by +\verb!\jdRect*! command. The listing is, +\end{Verbatim} +Notice that \texttt{allowFX} is specified. This key does not normally +appear in the option list, its default value is normally \texttt{true}; +however, for this document, the following definition was made in the preamble, +\begin{Verbatim}[xleftmargin=\amtIndent] +\renewcommand\allowFXDefault{false} +\end{Verbatim} +This (re)definition of \cs{allowFXDefault} sets the default value of +\texttt{allowFX} to \texttt{false}. This is that earlier, the special effects +would not be seen, by default. To see their effect, we have to explicitly put +\texttt{allowFX} to \texttt{true}, which is what the single key does. (Or, +you can say \texttt{allowFX=true}, but that is five more key presses.)\fitit +\end{example} + +\begin{example}\label{fx} +\textbf{FX.} Jump to the +{\renewcommand{\overlayPresets}{\H{I}\BG{}\BC{blue}\S{D}}% +\jdRect*[allowFX,adddestw=10bp,adddesth=10bp]{{\fitrpkg} Package!}} Click +on the verbatim region below to view the listing up close. +\bVerb\takeMeasure{Jump to the +\string\jdRect*[\textbf{allowFX},adddestw=10bp,adddesth=10bp]\%}% +\jdRect*[allowFX,adddestw=10bp,adddesth=10bp] +{\noindent\begin{minipage}{\bxSize} +\begin{Verbatim}[commandchars=!()] +\renewcommand{\overlayPresets}{\H{I}\BG{}\BC{blue}\S{D}}% +... +Jump to the \jdRect*[!textbf(allowFX),adddestw=10bp,adddesth=10bp]% + {{\fitrpkg} Package!} +\end{Verbatim} +\end{minipage}}\eVerb +We redefined the \cs{overlayPresets} command, choosing an initial border of +blue, in this way, the document consumer sees that s/he can zoom in on the +text. + +%\previewOn\viewMagWinOn +\jdRect[allowFX,height=4\baselineskip,width=340pt,adddestw=10,adddesth=10,lift=-\baselineskip]% +By the way, you can also zoom in on displayed verbatim text using \cs{jdRect} only. +% lift=16pt,shift=-15pt, +\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()] +\renewcommand{\overlayPresets}{\H{I}\BG{}\BC{blue}\S{D}}% +... +Jump to the \jdRect*[!textbf(allowFX),adddestw=10bp,adddesth=10bp]% + {{\fitrpkg} Package!} +\end{Verbatim} +This is done by explicitly enclosing the verbatim region as follows: +\begin{Verbatim}[xleftmargin=\amtIndent,commandchars=!()] +\jdRect[!textbf(allowFX),height=4\baselineskip,width=340pt, + adddestw=10,adddesth=10,lift=-\baselineskip]% +By the way, ... +\end{Verbatim} +and, in this instance, is placed at the beginning of the sentence.\fitit +\end{example} + + +\subsection{Custom FX} For the standard set up, where there is a push button that overlays the -content along with the viewing window is jumps to, there are two -JavaScript ``hooks'' that can be exploited +content along with the viewing window it jumps to, there are two JavaScript +``hooks'' that can be exploited. These are document author defined. \begin{itemize} - \item \texttt{overlayJmpHook()} is an undefined JavaScript + \item \texttt{pbJmpHookCustom()} is an undefined JavaScript function that is executed after the jump to the viewing window. (It is enclosed in a \texttt{try/catch} construct that catches the error thrown.) The document author can define - \texttt{overlayJmpHook()} to perform some action following the - jump. The distribution of {\fitrpkg} comes with one - definition, \texttt{jmpHookBlink.js}, which blinks the border - following the jump. - \item \texttt{overlayRestoreHook()} is an undefined JavaScript + \texttt{pbJmpHookCustom()} to perform some action following the + jump. + \item \texttt{pbRestoreHookCustom()} is an undefined JavaScript function that is executed following the restored view action. The document author needs to make a custom definition if - special effects are desired. The distribution of {\fitrpkg} - comes with one definition, \texttt{restoreHookBlink.js}, - which blinks the border following the restore action. + special effects are desired. \end{itemize} -The preamble of this document says, -\begin{Verbatim}[xleftmargin=20pt] -\usepackage[js=restoreHookBlink,js=jmpHookBlink]{lmacs} -\end{Verbatim} -The \textsf{lmacs} package is a new package I made available to CTAN, its -a simple package that imports files with extensions of \texttt{.def}, \texttt{.cfg}, and -\texttt{.js}. We import \texttt{restoreHookBlink.js} and -\texttt{jmpHookBlink.js} using a key-value method, where the key is one of -the supported extensions; thus \texttt{js=restoreHookBlink} will import -the file texttt{restoreHookBlink.js} if it exists. By the way, another -nice feature of \textsf{lmacs} is that you can prefix an exclamation point -(!) to cancel out that import, for example, if we wanted to use \texttt{jmpHookBlink} -but not \texttt{restoreHookBlink} we say -\begin{Verbatim}[xleftmargin=20pt] -\usepackage[!js=restoreHookBlink,js=jmpHookBlink]{lmacs} -\end{Verbatim} - -\begin{example}\label{fx}\renewcommand{\overlayPresets}{\H{I}\BG{}\BC{blue}\S{D}}% -\textbf{Special Effects.} Jump to the -\jdRect*[allowFX,adddestw=10bp,adddesth=10bp]{{\fitrpkg} Package!} - -The verbatim listing is -\begin{Verbatim}[xleftmargin=20pt,numbers=left] -\renewcommand{\overlayPresets}{\H{I}\BG{}\BC{blue}\S{D}}% -... -Jump to the \jdRect*[allowFX,adddestw=10bp,adddesth=10bp]% - {{\fitrpkg} Package!} +The distribution comes with two skeleton custom JavaScript functions, defined +in the files \texttt{jmpHook.js} and \texttt{restoreHook.js}. Study the two +built-in functions, \texttt{pbJmpHook()} and \texttt{pbRestoreHook()}, which +are part of this package, as a guide for writing your own special effects. To +use your custom JavaScript functions, place +\begin{Verbatim}[xleftmargin=\amtIndent] +\usepackage[js=jmpHook,js=restoreHook]{lmacs} \end{Verbatim} -We redefined the \cs{overlayPresets} command, choosing an initial border -of blue. In line~(4), I've used \texttt{allowFX}, this key does not -normally to appear in the option list, its default value is normally -\texttt{true}; however, for this document, the following definition was -made in the preamble -\begin{Verbatim}[xleftmargin=20pt] -\renewcommand\allowFXDefault{false} +in the preamble of your document.\footnote{The alternative is to copy and +paste the \env{indDLJS} environments directly into the preamble.} The +\textsf{lmacs} package is a new package I made available to CTAN, it's a +simple package that imports files with extensions of \texttt{.def}, +\texttt{.cfg}, and \texttt{.js}. We import \texttt{jmpHook.js} and +\texttt{restoreHook.js} using a key-value method, where the key is one of the +supported extensions; thus \texttt{js=jmpHook} will import the file +\texttt{jmpHook.js} if it exists. By the way, another nice feature of +\textsf{lmacs} is that you can prefix an exclamation point (!) to cancel out +that import, for example, if we wanted to use \texttt{jmpHook} but not +\texttt{restoreHook} specify, +\begin{Verbatim}[xleftmargin=\amtIndent] +\usepackage[js=jmpHook,!js=restoreHook]{lmacs} \end{Verbatim} -This (re)definition of \cs{allowFXDefault} sets the default value of -\texttt{allowFX} to \texttt{false}. This was done so the special effects -JavaScript functions could be imported (using \texttt{lmacs}) but their -effects would not be seen, by default. To see their effect, we have to -explicitly put \texttt{allowFX} to \texttt{true}, which is what the single -key does. (Or, you can say \texttt{allowFX=true}, but that is five more key -presses.)\fitit -\end{example} +\newtopic\noindent Now, I simply must get back to my retirement. \dps \end{document} diff --git a/texmf-dist/doc/latex/fitr/fitr_minimal.tex b/texmf-dist/doc/latex/fitr/fitr_minimal.tex deleted file mode 100644 index 160f38fa..00000000 --- a/texmf-dist/doc/latex/fitr/fitr_minimal.tex +++ /dev/null @@ -1,92 +0,0 @@ -% -% This file works for Adobe Distiller as the PDF creator, with drivers dvips or dvipsone. -% It also works for pdftex (and luatex), dvipdfm, dvipdfmx, and xetex. -% -\documentclass[11pt]{article} -\usepackage{amsmath} -\usepackage[dvipsone,!preview,!viewMagWin]{fitr} -\usepackage[js=restoreHookBlink,js=jmpHookBlink]{lmacs} -\usepackage{graphicx} - -\hypersetup -{% - pdftitle={Jumping to a Rectangular Region}, - pdfauthor={D. P. Story}, - pdfsubject={Demo file to test the FitR view destination of PDF}, - pdfkeywords={LaTeX, PDF, Acrobat, JavaScript} -} - -\parindent0pt \parskip6pt \pagestyle{empty} - -% \renewcommand{\overlayPresets}{\H{I}\S{D}\BG{}\BC{blue}} -% \renewcommand{\allowFXDefault}{false} - -\begin{document} - -\begin{center}\sffamily\bfseries\Large - Jumping to a Rectangular Region\\[1ex]\normalsize\normalcolor - Dr. D. P. Story, \href{http://www.acrotex.net}{Acro\!\TeX.NeT} -\end{center} - -\textbf{Introduction.} This document demonstrates a technique designed to -help people with low vision read material by providing them with a -convenient way to magnify specific regions of the document. This is -especially useful for reading technical material such as mathematics, as -is demonstrated here. - -\textbf{Instructions:} Click on any of the mathematics to magnify a region -around it, the border will blink briefly to focus your attention on it. -To restore the previous view, click on the region again, -the formula is briefly highlighted by a blinking border so -can quickly find your place in the document. - - -\textbf{Sample Mathematical Text.} Consider the problem of numerically -solving the first order differential equation -\jdRect*[adddestw=60,adddesth=20]{$y'=f(t,y)$} on -\jdRect*[adddestw=1in,adddesth=30]{$[t_{start}, t_{end}]$}. Suppose we -want to classify third order \textsf{Runge-Kutta} type methods. Start with -\begin{align*} -\jdRect[height=1.3in,width=2.6in,lift=16pt,shift=-15pt,adddestw=10,adddesth=10] % -K_1 &= hf(t_n, y_n)\\ -K_2 &= hf(t_n +r h, y_n+aK_1)\\ -K_3 &= hf(t_n +s h, y_n+bK_1+cK_2)\\ -K &= w_1 K_1+ w_2 K_2+ w_3 K_3\\ -y_{n+1} &= y_n+K -\end{align*} -Find the system of equations satisfied by -\jdRect*[adddestw=10,adddesth=10]{$r,s, a, b, c, w_1, w_2, w_3$} -that will make the above algorithm a third order method. - -\textbf{Inline links.} Links can be provided within the text to jump to a -magnified region that needs to be inspected more closely. The links below -are different from the ones above. After jumping to a magnified rectangle, -restore the preview view by clicking on the rectangle. - -\def\RungePic{\includegraphics[width=\marginparwidth]{runge}} -\def\KuttaPic{\includegraphics[width=\marginparwidth]{Kutta}} -\def\jrOpts#1#2{link=#1,dest=#2} - -\textbf{\jdRect*[nodest,\jrOpts{jmp}{rungePic},adddestw=10,adddesth=10]{Carl Runge}}% -\marginpar{\jdRect*[\jrOpts{restore}{rungePic},adddestw=\marginparsep, -adddesth=\marginparpush]{\parbox[b]{\marginparwidth}{\RungePic\\ -\normalcolor\centering\footnotesize\textsf{Carl Runge}}}} (1867-1944) -was the third of four sons from a well-to-do German merchant family. He -is remembered for his \textsf{Runge-Kutta} method for solving -differential equations. - -\textbf{\jdRect*[nodest,\jrOpts{jmp}{KuttaPic}]{Martin Kutta}}% -\marginpar{\jdRect*[\jrOpts{restore}{KuttaPic},adddestw=\marginparsep, -adddesth=\marginparpush]{\parbox[b]{\marginparwidth}{\KuttaPic\\ -\normalcolor\centering\footnotesize\textsf{Martin Kutta}}}} (1867-1944) -extended the Runge's method of solving ordinary differential equations. He -is also known for his work on airfoils. - -% Again, don't forget to press -%\textbf{Alt+Left Arrow} to return to the view you had before you clicked -%on the link. - -\begin{flushright} -This work was motivated by Mohsen M. -\end{flushright} -\end{document} diff --git a/texmf-dist/doc/latex/fitr/jmpHookBlink.js b/texmf-dist/doc/latex/fitr/jmpHookBlink.js deleted file mode 100644 index c6ea043e..00000000 --- a/texmf-dist/doc/latex/fitr/jmpHookBlink.js +++ /dev/null @@ -1,41 +0,0 @@ -% -% This script hooks into the DLJS of fitr to blink the field -% border when the user clicks in it. Length of the blink -% is 1250 milli-seconds. -% -\begin{insDLJS}[overlayJmpHook]{jfitr}{Blink border after jump} -function overlayJmpHook(event) { - toggleBC.field=event.target; - toggleBC.field=event.target; - toggleBC.startColor=event.target.strokeColor; - toggleBC.altColor=(color.equal(toggleBC.startColor,color.transparent))?% -color.red:color.transparent; - oSIJ=app.setInterval("toggleBC();",250); - oTOJ=app.setTimeOut("app.clearInterval(oSIJ); resetBC();",1250); -} -if (typeof toggleBC != "function" ) { - function toggleBC() { - var oField=toggleBC.field; - oField.strokeColor=% - (color.equal(oField.strokeColor,toggleBC.startColor))?% -toggleBC.altColor:toggleBC.startColor; - } - function resetBC() { - toggleBC.field.strokeColor=toggleBC.startColor; - } -} -\end{insDLJS} -\endinput - -function toggleBC() { - var oField=toggleBC.field; - oField.strokeColor=% -(color.equal(oField.strokeColor,toggleBC.startColor))?% -toggleBC.altColor:toggleBC.startColor; -} - -%function toggleBC() { -% var oField=toggleBC.field; -% oField.strokeColor=% -%(color.equal(oField.strokeColor,color.transparent))?color.red:color.transparent; -%} diff --git a/texmf-dist/doc/latex/fitr/restoreHookBlink.js b/texmf-dist/doc/latex/fitr/restoreHookBlink.js deleted file mode 100644 index 77f6077e..00000000 --- a/texmf-dist/doc/latex/fitr/restoreHookBlink.js +++ /dev/null @@ -1,33 +0,0 @@ -% -% This script hooks into the DLJS of fitr to blink the field -% border when the user clicks in it. Length of the blink -% is 1250 milli-seconds. -% -\begin{insDLJS}[overlayRestoreHook]{rfitr}{Blink border on restore} -function overlayRestoreHook(event,bRestore) { - if (!bRestore) return; - toggleBC.field=event.target; - toggleBC.startColor=event.target.strokeColor; - toggleBC.altColor=(color.equal(toggleBC.startColor,color.transparent))?% -color.red:color.transparent; - oSIR=app.setInterval("toggleBC();",250); - oTOR=app.setTimeOut("app.clearInterval(oSIR); resetBC();",1250); -} -if (typeof toggleBC != "function" ) { - function toggleBC() { - var oField=toggleBC.field; - oField.strokeColor=% - (color.equal(oField.strokeColor,toggleBC.startColor))?% -toggleBC.altColor:toggleBC.startColor; - } - function resetBC() { - toggleBC.field.strokeColor=toggleBC.startColor; - } -} -\end{insDLJS} -\endinput -function toggleBC() { - var oField=toggleBC.field; - oField.strokeColor=% -(color.equal(oField.strokeColor,color.transparent))?color.red:color.transparent; -} diff --git a/texmf-dist/doc/latex/fitr/runge.bb b/texmf-dist/doc/latex/fitr/runge.bb deleted file mode 100644 index fc1a526a..00000000 --- a/texmf-dist/doc/latex/fitr/runge.bb +++ /dev/null @@ -1,5 +0,0 @@ -%%Title: C:/Users/D. P. Story/Desktop/examples/runge.pdf -%%Creator: extractbb 20120420 -%%BoundingBox: 0 0 269 326 -%%CreationDate: Wed Jun 27 19:32:48 2012 - diff --git a/texmf-dist/doc/latex/fitr/runge.eps b/texmf-dist/doc/latex/fitr/runge.eps deleted file mode 100644 index 283816ea..00000000 Binary files a/texmf-dist/doc/latex/fitr/runge.eps and /dev/null differ diff --git a/texmf-dist/doc/latex/fitr/runge.jpg b/texmf-dist/doc/latex/fitr/runge.jpg deleted file mode 100644 index db05c74b..00000000 Binary files a/texmf-dist/doc/latex/fitr/runge.jpg and /dev/null differ diff --git a/texmf-dist/doc/latex/fitr/runge.pdf b/texmf-dist/doc/latex/fitr/runge.pdf deleted file mode 100644 index 85ee459f..00000000 Binary files a/texmf-dist/doc/latex/fitr/runge.pdf and /dev/null differ diff --git a/texmf-dist/doc/latex/fitr/runge.xbb b/texmf-dist/doc/latex/fitr/runge.xbb deleted file mode 100644 index 6475eae1..00000000 --- a/texmf-dist/doc/latex/fitr/runge.xbb +++ /dev/null @@ -1,6 +0,0 @@ -%%Title: C:/Users/D. P. Story/Desktop/examples/runge.jpg -%%Creator: extractbb 20120420 -%%BoundingBox: 0 0 269 326 -%%HiResBoundingBox: 0.000000 0.000000 268.800000 326.400000 -%%CreationDate: Wed Jun 27 15:21:16 2012 - -- cgit v1.2.3