summaryrefslogtreecommitdiff
path: root/texmf-dist
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-08-03 12:18:45 +0900
committerNorbert Preining <norbert@preining.info>2020-08-03 12:18:45 +0900
commit6d01229a1f06834661f6e820e861a4be03a7f860 (patch)
tree63a79b6ed9300d9267d430d06b0ef33a2bea2a82 /texmf-dist
parent05d9e348e9ce7fb895782424da35d989a0396a44 (diff)
fitr update
Diffstat (limited to 'texmf-dist')
-rw-r--r--texmf-dist/doc/latex/fitr/Kutta.epsbin344944 -> 0 bytes
-rw-r--r--texmf-dist/doc/latex/fitr/Kutta.xbb6
-rw-r--r--texmf-dist/doc/latex/fitr/README.md14
-rw-r--r--texmf-dist/doc/latex/fitr/examples/fitr_demo.pdfbin0 -> 201415 bytes
-rw-r--r--texmf-dist/doc/latex/fitr/examples/fitr_demo.tex (renamed from texmf-dist/doc/latex/fitr/fitr_demo.tex)63
-rw-r--r--texmf-dist/doc/latex/fitr/examples/fitr_minimal.tex (renamed from texmf-dist/doc/latex/fitr/fitr_minimal.tex)66
-rw-r--r--texmf-dist/doc/latex/fitr/examples/graphics/Kutta.bb (renamed from texmf-dist/doc/latex/fitr/Kutta.bb)1
-rw-r--r--texmf-dist/doc/latex/fitr/examples/graphics/Kutta.epsbin0 -> 354365 bytes
-rw-r--r--texmf-dist/doc/latex/fitr/examples/graphics/Kutta.jpeg (renamed from texmf-dist/doc/latex/fitr/Kutta.jpeg)bin9863 -> 9863 bytes
-rw-r--r--texmf-dist/doc/latex/fitr/examples/graphics/Kutta.pdf (renamed from texmf-dist/doc/latex/fitr/Kutta.pdf)bin15308 -> 15308 bytes
-rw-r--r--texmf-dist/doc/latex/fitr/examples/graphics/Kutta.xbb6
-rw-r--r--texmf-dist/doc/latex/fitr/examples/graphics/runge.bb (renamed from texmf-dist/doc/latex/fitr/runge.bb)0
-rw-r--r--texmf-dist/doc/latex/fitr/examples/graphics/runge.eps (renamed from texmf-dist/doc/latex/fitr/runge.eps)bin413683 -> 413683 bytes
-rw-r--r--texmf-dist/doc/latex/fitr/examples/graphics/runge.jpg (renamed from texmf-dist/doc/latex/fitr/runge.jpg)bin7628 -> 7628 bytes
-rw-r--r--texmf-dist/doc/latex/fitr/examples/graphics/runge.pdf (renamed from texmf-dist/doc/latex/fitr/runge.pdf)bin13182 -> 13182 bytes
-rw-r--r--texmf-dist/doc/latex/fitr/examples/graphics/runge.xbb6
-rw-r--r--texmf-dist/doc/latex/fitr/examples/jmpHook.js12
-rw-r--r--texmf-dist/doc/latex/fitr/examples/restoreHook.js12
-rw-r--r--texmf-dist/doc/latex/fitr/fitr.pdfbin0 -> 2740104 bytes
-rw-r--r--texmf-dist/doc/latex/fitr/fitr_demo.pdfbin80760 -> 0 bytes
-rw-r--r--texmf-dist/doc/latex/fitr/fitr_man.pdfbin177690 -> 283808 bytes
-rw-r--r--texmf-dist/doc/latex/fitr/fitr_man.tex614
-rw-r--r--texmf-dist/doc/latex/fitr/jmpHookBlink.js41
-rw-r--r--texmf-dist/doc/latex/fitr/restoreHookBlink.js33
-rw-r--r--texmf-dist/doc/latex/fitr/runge.xbb6
-rw-r--r--texmf-dist/source/latex/fitr/fitr.dtx771
-rw-r--r--texmf-dist/tex/latex/fitr/fitr.sty793
27 files changed, 1470 insertions, 974 deletions
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
--- a/texmf-dist/doc/latex/fitr/Kutta.eps
+++ /dev/null
Binary files 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
--- /dev/null
+++ b/texmf-dist/doc/latex/fitr/examples/fitr_demo.pdf
Binary files differ
diff --git a/texmf-dist/doc/latex/fitr/fitr_demo.tex b/texmf-dist/doc/latex/fitr/examples/fitr_demo.tex
index 7fe7536f..3ec611fe 100644
--- a/texmf-dist/doc/latex/fitr/fitr_demo.tex
+++ b/texmf-dist/doc/latex/fitr/examples/fitr_demo.tex
@@ -1,15 +1,17 @@
%
-% 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.
+% Works for all workflows.
+% If gonative is specified, dvips->ps2pdf works as well.
%
\documentclass[11pt]{article}
-\usepackage{amsmath}
-\usepackage[forcolorpaper,pro]{web}
-\usepackage{eforms}
-\usepackage[!preview,!viewMagWin]{fitr}
-\usepackage[js=restoreHookBlink,js=jmpHookBlink]{lmacs}
+\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},
@@ -29,6 +31,8 @@
\nocopyright
\norevisionLabel
+\def\cs#1{\texttt{\char`\\#1}}
+
\selectColors{linkColor=blue}
\parindent0pt \parskip6pt \pagestyle{empty}
@@ -77,8 +81,8 @@ 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\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}}%
@@ -103,4 +107,45 @@ is also known for his work on airfoils.
\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/fitr_minimal.tex b/texmf-dist/doc/latex/fitr/examples/fitr_minimal.tex
index 160f38fa..953c3ffb 100644
--- a/texmf-dist/doc/latex/fitr/fitr_minimal.tex
+++ b/texmf-dist/doc/latex/fitr/examples/fitr_minimal.tex
@@ -1,23 +1,29 @@
%
-% 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.
+% Works for all workflows.
+% If gonative is specified, dvips->ps2pdf works as well.
%
\documentclass[11pt]{article}
-\usepackage{amsmath}
-\usepackage[dvipsone,!preview,!viewMagWin]{fitr}
-\usepackage[js=restoreHookBlink,js=jmpHookBlink]{lmacs}
+\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}
+ 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}
@@ -25,7 +31,7 @@
\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}
+ Dr. D. P. Story, \href{http://www.acrotex.net}{Acro\negthinspace\TeX.NeT}
\end{center}
\textbf{Introduction.} This document demonstrates a technique designed to
@@ -63,8 +69,8 @@ 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\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}}%
@@ -89,4 +95,46 @@ is also known for his work on airfoils.
\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/Kutta.bb b/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.bb
index 52e9f93c..9c53f11e 100644
--- a/texmf-dist/doc/latex/fitr/Kutta.bb
+++ b/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.bb
@@ -2,4 +2,3 @@
%%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
--- /dev/null
+++ b/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.eps
Binary files differ
diff --git a/texmf-dist/doc/latex/fitr/Kutta.jpeg b/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.jpeg
index d847cb2a..d847cb2a 100644
--- a/texmf-dist/doc/latex/fitr/Kutta.jpeg
+++ b/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.jpeg
Binary files differ
diff --git a/texmf-dist/doc/latex/fitr/Kutta.pdf b/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.pdf
index e737d265..e737d265 100644
--- a/texmf-dist/doc/latex/fitr/Kutta.pdf
+++ b/texmf-dist/doc/latex/fitr/examples/graphics/Kutta.pdf
Binary files 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/runge.bb b/texmf-dist/doc/latex/fitr/examples/graphics/runge.bb
index fc1a526a..fc1a526a 100644
--- a/texmf-dist/doc/latex/fitr/runge.bb
+++ b/texmf-dist/doc/latex/fitr/examples/graphics/runge.bb
diff --git a/texmf-dist/doc/latex/fitr/runge.eps b/texmf-dist/doc/latex/fitr/examples/graphics/runge.eps
index 283816ea..283816ea 100644
--- a/texmf-dist/doc/latex/fitr/runge.eps
+++ b/texmf-dist/doc/latex/fitr/examples/graphics/runge.eps
Binary files differ
diff --git a/texmf-dist/doc/latex/fitr/runge.jpg b/texmf-dist/doc/latex/fitr/examples/graphics/runge.jpg
index db05c74b..db05c74b 100644
--- a/texmf-dist/doc/latex/fitr/runge.jpg
+++ b/texmf-dist/doc/latex/fitr/examples/graphics/runge.jpg
Binary files differ
diff --git a/texmf-dist/doc/latex/fitr/runge.pdf b/texmf-dist/doc/latex/fitr/examples/graphics/runge.pdf
index 85ee459f..85ee459f 100644
--- a/texmf-dist/doc/latex/fitr/runge.pdf
+++ b/texmf-dist/doc/latex/fitr/examples/graphics/runge.pdf
Binary files 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
--- /dev/null
+++ b/texmf-dist/doc/latex/fitr/fitr.pdf
Binary files 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
--- a/texmf-dist/doc/latex/fitr/fitr_demo.pdf
+++ /dev/null
Binary files differ
diff --git a/texmf-dist/doc/latex/fitr/fitr_man.pdf b/texmf-dist/doc/latex/fitr/fitr_man.pdf
index b70ee265..7c851822 100644
--- a/texmf-dist/doc/latex/fitr/fitr_man.pdf
+++ b/texmf-dist/doc/latex/fitr/fitr_man.pdf
Binary files 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/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.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
-
diff --git a/texmf-dist/source/latex/fitr/fitr.dtx b/texmf-dist/source/latex/fitr/fitr.dtx
index eabd27e9..68045cdd 100644
--- a/texmf-dist/source/latex/fitr/fitr.dtx
+++ b/texmf-dist/source/latex/fitr/fitr.dtx
@@ -1,8 +1,8 @@
%\iffalse
%<*copyright>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% fitr.sty package, 2016-04-04 %%
-%% Copyright (C) 2012--2016 D. P. Story %%
+%% fitr.sty package, %%
+%% Copyright (C) 2012--2020 D. P. Story %%
%% dpstory@uakron.edu %%
%% %%
%% This program can redistributed and/or modified under %%
@@ -14,16 +14,24 @@
%</copyright>
%<package>\NeedsTeXFormat{LaTeX2e}[1997/12/01]
%<package>\ProvidesPackage{fitr}
-%<package> [2016/04/09 v1.2e Support for FitR destinations (dps)]
+%<package> [2020/07/09 v1.3.2 Support for FitR destinations (dps)]
%<*driver>
\documentclass{ltxdoc}
-\usepackage[colorlinks,hyperindex]{hyperref}
+\usepackage[colorlinks,hyperindex=false]{hyperref}
\usepackage{fancyvrb,array,calc}
%\pdfstringdefDisableCommands{\let\\\textbackslash}
-%\EnableCrossrefs \CodelineIndex
+\EnableCrossrefs
+\CodelineIndex
\RecordChanges
+\let\env\texttt
+\let\opt\texttt
+\let\app\textsf
+\let\pkg\textsf
+\def\EXCL{!}
+\def\nmpsep#1{\hskip-\marginparsep\texttt{#1}}
\bgroup\ttfamily
\gdef\brpr#1{\char123\relax#1\char125\relax}\egroup
+\let\darg\brpr
\def\ameta#1{\ensuremath{\langle\textsl{\texttt{#1}}\rangle}}
\def\meta#1{\textsl{\texttt{#1}}}
\def\SUB#1{\ensuremath{{}_{\mbox{\scriptsize\ttfamily#1}}}}
@@ -51,6 +59,9 @@
\item\relax}
{\endlist}
\makeatother
+\InputIfFileExists{aebdocfmt.def}{\PackageInfo{fitr}{Inputting aebdocfmt.def}}
+ {\def\IndexOpt{\DescribeMacro}\def\IndexKey{\DescribeMacro}\let\setupFullwidth\relax
+ \PackageInfo{fitr}{aebdocfmt.def cannot be found}}
\begin{document}
\def\CMD#1{\textbackslash#1}
\GetFileInfo{fitr.sty}
@@ -61,23 +72,22 @@
\maketitle
\tableofcontents
\let\Email\texttt
- \renewenvironment{theglossary}{%
- \let\efill\relax
- \begin{itemize}}{\end{itemize}}
- \value{GlossaryColumns}=1
\DocInput{fitr.dtx}
- \PrintIndex
+\IfFileExists{\jobname.ind}{\newpage\setupFullwidth\PrintIndex}{\paragraph*{Index}
+ The index goes here.\\Execute
+ \texttt{makeindex -s gind.ist -o fitr.ind fitr.idx} on the command line
+ and recompile \texttt{fitr.dtx}.}
+\IfFileExists{\jobname.gls}{\PrintChanges}{\paragraph*{Change History} The list of
+ changes goes here.\\Execute
+ \texttt{makeindex -s gglo.ist -o fitr.gls fitr.glo} on the command line
+ and recompile \texttt{fitr.dtx}.}
\end{document}
%</driver>
% \fi
-% \MakeShortVerb{|}
-% \StopEventually{}
%
-% \DoNotIndex{\def,\edef,\gdef,\xdef,\global,\long,\let}
-% \DoNotIndex{\expandafter,\string,\the,\ifx,\else,\fi}
-% \DoNotIndex{\csname,\endcsname,\relax,\begingroup,\endgroup}
-% \DoNotIndex{\DeclareTextCommand,\DeclareTextCompositeCommand}
-% \DoNotIndex{\space,\@empty,\special}
+% \MakeShortVerb{|}
+% \InputIfFileExists{aebdonotindex.def}{\PackageInfo{artthreads}{Inputting aebdonotindex.def}}
+% {\PackageInfo{fitr}{aebdonotindex.def cannot be found}}
%
% \begin{macrocode}
%<*package>
@@ -94,19 +104,25 @@
%
% When using a dvi-ps-pdf work flow (with Distiller as the PDF creator), the
% package uses the \textbf{pdfmark} for the \textsf{FitR} view-type destination:
-%\begin{verbatim}
-% [ /Dest/<name>/View [ /FitR left bottom right top ]/DEST pdfmark
-%\end{verbatim}
-% For the \texttt{pdftex} option, we use \cs{pdfdest} a primitive of
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9},commandchars={!()}]
+% [ /Dest/!ameta(name)/View [ /FitR left bottom right top ]/DEST pdfmark
+%\end{Verbatim}
+% For the \opt{pdftex} or \opt{luatex} option, we use \cs{pdfdest} a primitive of
% that utility:
-%\begin{verbatim}
-% \pdfdest name {<name>} fitr
-% width <width>
-% height <height>
-% depth <depth>
-%\end{verbatim}
-% For the \texttt{dvipdfm}, \texttt{dvipdfmx}, and \texttt{xetex} options,
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9},commandchars={!()}]
+%\pdfdest name {!ameta(name)} fitr
+% width !ameta(wd)
+% height !ameta(ht)
+% depth !ameta(dp)
+%\end{Verbatim}
+% For the \opt{dvipdfm}, \opt{dvipdfmx}, and \opt{xetex} options,
% the problem of computing the \textsf{FitR} rectangle is a little trickier.
+%\begin{Verbatim}[xleftmargin=\parindent,codes={\catcode`\%=9},commandchars={!~^}]
+%\@pdfm@mark{dest (!ameta~name^) %
+% [ @thispage /FitR @xpos @ypos @urx!ameta~name^ @ury!ameta~name^ ]}}}}%
+%\end{Verbatim}
+%where \texttt{@urx\ameta{name}} and \texttt{@ury\ameta{name}} are the calculated upper right $x$ and
+%$y$ coordinate of the bounding box.\par
%\medskip\noindent
%The \textsl{PDF Reference} describes \textsf{FitR} as,
%\begin{quote}
@@ -119,109 +135,172 @@
% to zoom in on a rectangular region.
%
% \section{Options and Required Packages}
+% \changes{v1.3.2}{2020/07/09}{Bad upload for v1.3.1, corrected problem.}
% \begin{macrocode}
\RequirePackage{xkeyval}
\RequirePackage{ifpdf}[2006/02/20]
\RequirePackage{ifxetex}[2006/08/21]
% \end{macrocode}
-% \paragraph*{Driver options.} Three options, \DescribeMacro{dvips, dvipsone}\texttt{dvips} (the default)
-% and \texttt{dvipsone}, both of which require \textbf{Adobe Distiller}
-% as the PDF creator; the \DescribeMacro{pdftex}\texttt{pdftex} allows for the same functionality
-% for the \textsf{pdflatex} executable. We also support \DescribeMacro{dvipdfm,dvipdfmx,xetex}\texttt{dvipdfm}
+% (2020/07/03) Added \pkg{ifluatex} package for later testing
+% \changes{v1.3}{2020/07/03}{Added \string\pkg{ifluatex} package}
+% \begin{macrocode}
+\RequirePackage{ifluatex}
+% \end{macrocode}
+% \paragraph*{Driver options.} Three options, \IndexOpt{dvips}\IndexOpt{dvipsone}\app{dvips} (the default)
+% and \app{dvipsone}, both of which require \textbf{Adobe Distiller}
+% as the PDF creator; the \IndexOpt{pdftex}\app{pdflatex} and \IndexOpt{luatex}\app{luatex} allows for the same functionality
+% for the \textsf{pdflatex} executable. We also support \IndexOpt{dvipdfm}\IndexOpt{dvipdfmx}\IndexOpt{xetex}\texttt{dvipdfm}
% and its extensions, \texttt{dvipdfmx} and \texttt{xetex}.
%
-% \paragraph*{Preview options.} The \DescribeMacro{preview}\texttt{preview}
-% option is a carry over from \textsf{eforms}. When selected, all form fields are outlined; useful when
-% setting the location of fields in a dvi previewer. The other option is \texttt{viewMagWin}
-% \DescribeMacro{viewMagWin} will show the viewing windows surrounding the target. This is the rectangle
+% \paragraph*{Auto detection of drivers.} The drivers \app{pdflatex}, \app{lualatex}, and \app{xelatex} are automatically
+% detected, so there is no need to specify their respective options: \opt{pdftex}, \opt{luatex}, and \app{xetex}.
+%
+% \paragraph*{Preview options.} The \IndexOpt{preview}\texttt{preview}
+% option is a carry over from \pkg{eforms}. When selected, all form fields are outlined; useful when
+% setting the location of fields in a dvi previewer. The other option is \opt{viewMagWin}
+% \IndexOpt{viewMagWin} will show the viewing windows surrounding the target. This is the rectangle
% that will be jumped to. Use this option to adjust the size of the window to your needs.
% When either of the last two options has an exclamation point prior, that means to
% turn off the switch. You can conveniently use \texttt{viewMagWin} to see the viewing window,
-% then change it to \DescribeMacro{!viewMagWin}\texttt{!viewMagWin} to remove the visible window. Cool.
-% Similarly, you can turn off \texttt{preview} using \DescribeMacro{!preview}\texttt{!preview}.
+% then change it to \IndexOpt[\protect\EXCL]{!viewMagWin}\opt{!viewMagWin} to remove the visible window. Cool.
+% Similarly, you can turn off \opt{preview} using \IndexOpt[\protect\EXCL]{!preview}\opt{!preview}.
% \begin{macrocode}
% \end{macrocode}
-% We create the \cs{ifpreview} and \cs{ifviewMagWin}, and declare the options.
+% We create \cs{ifpreview} and \cs{ifviewMagWin}, and declare the options.
% \begin{macrocode}
\@ifundefined{ifpreview}{\newif\ifpreview \previewfalse}{}
\@ifundefined{ifviewMagWin}{\newif\ifviewMagWin \viewMagWinfalse}{}
\let\fitr@driver\@empty
+% \end{macrocode}
+% The \opt{pdftex} option
+% \begin{macrocode}
\DeclareOptionX{pdftex}{\gdef\fitr@driver{pdftex}%
- \PassOptionsToPackage{\fitr@driver}{hyperref}%
- \PassOptionsToPackage{\fitr@driver}{eforms}%
-}
+ \PassOptionsToPackage{\fitr@driver}{hyperref}%
+ \PassOptionsToPackage{\fitr@driver}{eforms}}
\def\fitr@pdftex@driver{pdftex}
% \end{macrocode}
+% The \opt{luatex} option
+% \begin{macrocode}
+\DeclareOptionX{luatex}{\gdef\fitr@driver{luatex}%
+ \PassOptionsToPackage{\fitr@driver}{hyperref}%
+ \PassOptionsToPackage{\fitr@driver}{eforms}}
+\def\fitr@pdftex@driver{luatex}
+% \end{macrocode}
% Distiller based drivers.
% \begin{macrocode}
\DeclareOptionX{dvips}{\gdef\fitr@driver{dvips}%
- \PassOptionsToPackage{\fitr@driver}{hyperref}%
- \PassOptionsToPackage{\fitr@driver}{eforms}%
-}
+ \PassOptionsToPackage{\fitr@driver}{hyperref}%
+ \PassOptionsToPackage{\fitr@driver}{eforms}}
\def\fitr@dvips@driver{dvips}
\DeclareOptionX{dvipsone}{\gdef\fitr@driver{dvipsone}%
- \PassOptionsToPackage{\fitr@driver}{hyperref}%
- \PassOptionsToPackage{\fitr@driver}{eforms}%
-}
+ \PassOptionsToPackage{\fitr@driver}{hyperref}%
+ \PassOptionsToPackage{\fitr@driver}{eforms}}
\def\fitr@dvipsone@driver{dvipsone}
% \end{macrocode}
-% \textsf{dvipdfm} and its variants.
+% \app{dvipdfm} and its variants.
% \begin{macrocode}
\newif \if@fitr@dvipdfm \@fitr@dvipdfmfalse
\DeclareOptionX{dvipdfm}{\gdef\fitr@driver{dvipdfm}%
- \@fitr@dvipdfmtrue
- \PassOptionsToPackage{\fitr@driver}{hyperref}%
- \PassOptionsToPackage{\fitr@driver}{eforms}%
-}
+ \@fitr@dvipdfmtrue
+ \PassOptionsToPackage{\fitr@driver}{hyperref}%
+ \PassOptionsToPackage{\fitr@driver}{eforms}}
\def\fitr@dvipdfm@driver{dvipdfm}
\DeclareOptionX{dvipdfmx}{\gdef\fitr@driver{dvipdfmx}%
- \@fitr@dvipdfmtrue
- \PassOptionsToPackage{\fitr@driver}{hyperref}%
- \PassOptionsToPackage{\fitr@driver}{eforms}%
-}
+ \@fitr@dvipdfmtrue
+ \PassOptionsToPackage{\fitr@driver}{hyperref}%
+ \PassOptionsToPackage{\fitr@driver}{eforms}}
\def\fitr@dvipdfmx@driver{dvipdfmx}
\DeclareOptionX{xetex}{\gdef\fitr@driver{xetex}%
- \@fitr@dvipdfmtrue
- \PassOptionsToPackage{\fitr@driver}{hyperref}%
- \PassOptionsToPackage{\fitr@driver}{eforms}%
-}
+ \@fitr@dvipdfmtrue
+ \PassOptionsToPackage{\fitr@driver}{hyperref}%
+ \PassOptionsToPackage{\fitr@driver}{eforms}}
\def\fitr@xetex@driver{xetex}
% \end{macrocode}
+% \leavevmode
+% \IndexOpt{preview}^^A
+% \IndexOpt[\protect\EXCL]{!preview}^^A
+% \IndexOpt{viewMagWin}^^A
+% \IndexOpt[\protect\EXCL]{!viewMagWin}^^A
+% Various preview options.
% \begin{macrocode}
\DeclareOptionX{preview}{\previewtrue}
\DeclareOptionX{!preview}{\previewfalse}
\DeclareOptionX{viewMagWin}{\viewMagWintrue}
\DeclareOptionX{!viewMagWin}{\viewMagWinfalse}
% \end{macrocode}
+% \leavevmode
+% \DescribeMacro{\previewOn}^^A
+% \DescribeMacro{\previewOff}^^A
+% \DescribeMacro{\viewMagWinOn}^^A
+% \DescribeMacro{\viewMagWinOff}^^A
+% Some convenience macros to locally turn on or off \opt{preview} and
+% \opt{viewMagWin}.
+% \changes{v1.3.1}{2020/07/06}{Added commands to locally turn on the \string\opt{preview}
+% and \string\opt{viewMagWin} options}
+% \begin{macrocode}
+\providecommand{\previewOn}{\previewtrue}
+\providecommand{\previewOff}{\previewfalse}
+\providecommand{\viewMagWinOn}{\viewMagWintrue}
+\providecommand{\viewMagWinOff}{\viewMagWinfalse}
+% \end{macrocode}
+% \leavevmode\IndexOpt{gonative}^^A
+% When the \opt{gonative} option is specified, field and document JavaScript
+% \emph{are not used}, as a result, no special effects are implemented.
+% This gives a basic document that can be compiled successfully
+% with the \app{dvips\,\texttt{->}\,ps2pdf} workflow.
+% \changes{v1.3.1}{2020/07/06}{Added \string\opt{gonative} option}
+% \begin{macrocode}
+\newif\ifFRusedljs \FRusedljstrue
+\DeclareOptionX{gonative}{\FRusedljsfalse}
+% \end{macrocode}
+% \leavevmode\IndexOpt{blinkonjmp}^^A
+% \IndexOpt[\protect\EXCL]{!blinkonjmp}^^A
+% Target region blinks on jump
+% \changes{v1.3.1}{2020/07/06}{Added \string\opt{blinkonjmp} and \string\opt{!blinkonjmp} options}
+% \begin{macrocode}
+\newif\ifFRblinkonjmp \FRblinkonjmpfalse
+\DeclareOptionX{blinkonjmp}{\FRblinkonjmptrue}
+\DeclareOptionX{!blinkonjmp}{\FRblinkonjmpfalse}
+% \end{macrocode}
+% \leavevmode\IndexOpt{blinkonrestore}^^A
+% \IndexOpt[\protect\EXCL]{!blinkonrestore}^^A
+% Target region blinks on restore
+% \changes{v1.3.1}{2020/07/06}{Added \string\opt{blinkonrestore} and \string\opt{!blinkonrestore} options}
+% \begin{macrocode}
+\newif\ifFRblinkonrestore \FRblinkonrestorefalse
+\DeclareOptionX{blinkonrestore}{\FRblinkonrestoretrue}
+\DeclareOptionX{!blinkonrestore}{\FRblinkonrestorefalse}
+% \end{macrocode}
+% \leavevmode\IndexOpt{blink}^^A
+% \IndexOpt[\protect\EXCL]{!blink}^^A
+% A convenience option, \opt{blink} is equivalent to \opt{blinkonjmp} and \opt{blinkonrestore}.
+% \changes{v1.3.1}{2020/07/06}{Added \string\opt{blink} and \string\opt{!blink} options}
+% \begin{macrocode}
+\DeclareOptionX{blink}{\FRblinkonjmptrue\FRblinkonrestoretrue}
+\DeclareOptionX{!blink}{\FRblinkonjmpfalse\FRblinkonrestorefalse}
+% \end{macrocode}
% Before processing options, try for automatic driver detection.
% \begin{macrocode}
-\@ifpackageloaded{web}{%
- \ExecuteOptionsX{\eq@driver@name}%
-}{%
- \ifpdf\ExecuteOptionsX{pdftex}\else
- \ifxetex\ExecuteOptionsX{xetex}\fi\fi
+\@ifpackageloaded{web}{\ExecuteOptionsX{\eq@driver@name}}{%
+ \ifluatex\ExecuteOptionsX{pdftex}\else
+ \ifpdf\ExecuteOptionsX{pdftex}\else
+ \ifxetex\ExecuteOptionsX{xetex}\else
+ \@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}}
+ {\ExecuteOptionsX{dvipsone}}\fi\fi\fi
}
% \end{macrocode}
-% Process the options
+% \paragraph*{Process the options}
% \begin{macrocode}
\ProcessOptionsX
% \end{macrocode}
+% \paragraph*{Required packages}
% \begin{macrocode}
\RequirePackage{xcolor}
-\ifx\fitr@driver\@empty
- \def\fitr@driver{dvips}
- \def\fitr@loadPkgs{%
- \RequirePackage[dvips]{hyperref}
- \RequirePackage[dvips]{eforms}}%
-\else
- \def\fitr@loadPkgs{%
- \RequirePackage{hyperref}
- \RequirePackage{eforms}[2016/04/05]}
-\fi
-\fitr@loadPkgs
% \end{macrocode}
-% Minimal packages \textsf{calc} and \textsf{eforms} (which inputs \textsf{hyperref}).
+% Minimal packages \pkg{calc} and \pkg{eforms} (which inputs \pkg{hyperref}).
% \begin{macrocode}
+%\RequirePackage{hyperref}
+\RequirePackage{eforms}[2020/07/05]
\RequirePackage{calc}
% \end{macrocode}
% We also require \textsf{collectbox}, a cool way of collecting an argument which enables
@@ -234,38 +313,48 @@
% \begin{macrocode}
\newcounter{magCnt}
\newbox\fitr@bbox
-\newcount\fitr@height \newcount\fitr@width \newcount\fitr@depth
+\newcount\fitr@height
+\newcount\fitr@width
+\newcount\fitr@depth
\newlength\fitr@length
% \end{macrocode}
-% \begin{macro}{\get@fitr@dimen}
-% \cs{get@fitr@dimen}\verb!{!\meta{content}\verb!}!: this command encloses \meta{content}
+% For \app{xelatex} we adjust field sizes to conform to the same sizes produced
+% by \app{pdflatex} and \app{latex}. For \app{lualatex}, make a definition
+% so it can be process just like \app{pdflatex}.
+% \changes{v1.3}{2020/07/03}{Add a test for xetex and luatex}
+% \begin{macrocode}
+\ifxetex\makeXasPDOff\fi
+\ifluatex\protected\def\pdfdest{\pdfextension dest }\fi
+% \end{macrocode}
+% \begin{macro}{\get@fitr@dimen}\nmpsep{\darg{\ameta{content}}}
+% Tthis command encloses \ameta{content}
% in the box register \cmd{\fitr@bbox} (an \cs{hbox}) and transfers
% dimension info to the count registers \cmd{\fitr@height},
-% \cmd{\fitr@width}, and \cmd{\fitr@depth}, To typeset \meta{content} you must
+% \cmd{\fitr@width}, and \cmd{\fitr@depth}. To typeset \ameta{content},
% \cmd{\unhbox}\cmd{\fitr@bbox}.
% \begin{macrocode}
\def\get@fitr@dimen#1{%
- \setbox\fitr@bbox=\hbox{#1}%
- \fitr@height=\ht\fitr@bbox
- \xdef\fitr@height@l{\the\ht\fitr@bbox}%
- \fitr@width=\wd\fitr@bbox
- \xdef\fitr@width@l{\the\wd\fitr@bbox}%
- \fitr@depth=\dp\fitr@bbox
- \xdef\fitr@depth@l{\the\dp\fitr@bbox}%
- \setlength\fitr@length{\ht\fitr@bbox+\dp\fitr@bbox}%
- \edef\fitr@@height{\the\fitr@length}%
+ \setbox\fitr@bbox=\hbox{#1}%
+ \fitr@height=\ht\fitr@bbox
+ \xdef\fitr@height@l{\the\ht\fitr@bbox}%
+ \fitr@width=\wd\fitr@bbox
+ \xdef\fitr@width@l{\the\wd\fitr@bbox}%
+ \fitr@depth=\dp\fitr@bbox
+ \xdef\fitr@depth@l{\the\dp\fitr@bbox}%
+ \setlength\fitr@length{\ht\fitr@bbox+\dp\fitr@bbox}%
+ \edef\fitr@@height{\the\fitr@length}%
}
% \end{macrocode}
% \end{macro}
-% The following commands are some PostScript for the \textsf{dvips} executable.
-%
-% \paragraph*{dvips.}
-% Uses \cmd{\fitr@bbox}; \texttt{\#1} is amount to widen box; \texttt{\#2} amount to heighten box.
+% \paragraph*{dvips.} The following commands are some PostScript for the \textsf{dvips} executable.
+% \begin{macrocode}
+% \end{macrocode}
+% \leavevmode\DescribeMacro\FitRbboxB\nmpsep{\darg{\ameta{amt-wd}}\darg{\ameta{amt-ht}}}
% \begin{macrocode}
\def\fitr@urxury@fixup#1#2#3{}
\ifx\fitr@driver\fitr@dvips@driver
\headerps@out{/TeXtoPDF {65536 div DVImag mul} def % sp to pts
-/SPtoDvips{TeXtoPDF PDFToDvips} def} % dp to dots
+/SPtoDvips{TeXtoPDF PDFToDvips} def} % sp to dots
\def\FitRbboxB#1#2{% Uses \fitr@bbox
currentpoint 2 copy DvipsToPDF \the\fitr@depth\space TeXtoPDF add
neg vsize add 72 sub #2\space sub exch % y1
@@ -274,9 +363,10 @@
TeXtoPDF add 72 add #1\space add exch % x2
DvipsToPDF \the\fitr@height \space TeXtoPDF sub
neg vsize add 72 sub #2\space add} % y2
-\else\ifx\fitr@driver\fitr@dvipsone@driver
+\else
+\ifx\fitr@driver\fitr@dvipsone@driver
% \end{macrocode}
-% \paragraph*{dvipsone.} Uses \cmd{\fitr@bbox}; \texttt{\#1} is amount to widen box; \texttt{\#2} amount to heighten box.
+% \paragraph*{dvipsone.} Definition of \cs{FitRbbox} for \app{dvipsone}.
% \begin{macrocode}
\special{!/TeXtoPDF {65536 div mag 1000 div mul} def
/PDFtoTeX {65536 mul mag 1000 div div} def}
@@ -288,9 +378,9 @@
DvipsToPDF 72 add #1\space add exch % x2
\the\fitr@height\space sub DvipsToPDF neg
PageHeight add 72 sub #2\space add} % y2
-\else\ifx\fitr@driver\fitr@pdftex@driver
+\else\ifpdf
% \end{macrocode}
-% \paragraph*{pdftex.}
+% \paragraph*{pdftex.} Definition of \cs{FitRbbox} for \app{pdftex} and \app{luatex}.
% Uses \cmd{\fitr@bbox}; \texttt{\#1} is amount to widen box;
% \texttt{\#2} amount to heighten box.
%
@@ -300,117 +390,127 @@
% \cs{fitr@pdftex@view@width\string|height\string|depth}.
% \begin{macrocode}
\def\FitRbboxB#1#2{%
- \fitr@length=#1bp
- \fitr@length=2\fitr@length
- \advance\fitr@length\wd\fitr@bbox
- \edef\fitr@pdftex@view@width{\the\fitr@length}%
- \fitr@length=#2bp
- \advance\fitr@length\ht\fitr@bbox
- \edef\fitr@pdftex@view@height{\the\fitr@length}%
- \fitr@length=#2bp
- \advance\fitr@length\dp\fitr@bbox
- \edef\fitr@pdftex@view@depth{\the\fitr@length}%
+ \fitr@length=#1bp
+ \fitr@length=2\fitr@length
+ \advance\fitr@length\wd\fitr@bbox
+ \edef\fitr@pdftex@view@width{\the\fitr@length}%
+ \fitr@length=#2bp
+ \advance\fitr@length\ht\fitr@bbox
+ \edef\fitr@pdftex@view@height{\the\fitr@length}%
+ \fitr@length=#2bp
+ \advance\fitr@length\dp\fitr@bbox
+ \edef\fitr@pdftex@view@depth{\the\fitr@length}%
}
\else\if@fitr@dvipdfm
% \end{macrocode}
% \paragraph*{dvipdfm/dvipdfmx/xetex.} The primitive \verb!\special{pdf: dest (name)...}! is used
-% along with the primitive variables \texttt{@xpos} and \texttt{@ypos}.
+% along with the primitive variables \texttt{@xpos} and \texttt{@ypos}. The third argument is \ameta{name}.
% \begin{macrocode}
\def\FitRbboxB#1#2#3{%
- \smash{\raisebox{-\fitr@depth@l-#2bp}%
- {\makebox[0pt][l]{\hspace*{-#1bp}%
+ \smash{\raisebox{-\fitr@depth@l-#2bp}%
+ {\makebox[0pt][l]{\hspace*{-#1bp}%
% \end{macrocode}
% The values of \texttt{@xpos} and \texttt{@ypos} correspond to the coordinates
% of the lower left corner. The values of \texttt{@urx\#3} and \texttt{@ury\#3}
% are calculated in \cs{fitr@urxury@fixup} as the coordinates of the upper right
% corner.
% \begin{macrocode}
- \@pdfm@mark{dest (#3) %
- [ @thispage /FitR @xpos @ypos @urx#3\space @ury#3\space ]}}}}%
-}
+ \@pdfm@mark{dest (#3) %
+ [ @thispage /FitR @xpos @ypos @urx#3\space @ury#3\space ]}}}}}
% \end{macrocode}
% \cs{fitr@urxury@fixup} is placed just after \cs{fitr@bbox}.
% \begin{macrocode}
\def\fitr@urxury@fixup#1#2#3{%
- \smash{\raisebox{\fitr@height@l+#2bp}%
- {\makebox[0pt][l]{\hspace*{#1bp}%
+ \smash{\raisebox{\fitr@height@l+#2bp}%
+ {\makebox[0pt][l]{\hspace*{#1bp}%
% \end{macrocode}
% We raise up to the upper right corner of the content box and define
% \texttt{@urx\#3} and \texttt{@ury\#3} as the current values of
% \texttt{@xpos} and \texttt{@ypos},
% \begin{macrocode}
- \@pdfm@mark{obj @urx#3\space @xpos}%
- \@pdfm@mark{obj @ury#3\space @ypos}}}}%
+ \@pdfm@mark{obj @urx#3\space @xpos}%
+ \@pdfm@mark{obj @ury#3\space @ypos}}}}%
}
\fi\fi\fi\fi
% \end{macrocode}
-% We use a short macro from \textsf{graphics} package.
-% We do not require the \textsf{graphics} command
+% We use a short macro from \pkg{graphics} package.
+% We do not require the \pkg{graphics} command
% so we redefine it under a different name.
% \begin{macrocode}
\def\fitr@defaultbp#1#2{%
\afterassignment\fitr@def@bp\dimen@#2bp\relax{#1}{#2}}
\def\fitr@def@bp#1\relax#2#3{%
- \if!#1!%
- \def#2{#3}%
- \else
- \dimen@.99626\dimen@
- \edef#2{\strip@pt\dimen@}%
- \fi}
+ \if!#1!%
+ \def#2{#3}%
+ \else
+ \dimen@.99626\dimen@
+ \edef#2{\strip@pt\dimen@}%
+ \fi}
% \end{macrocode}
% The major command of this package is \cs{jdRect}. Its second required argument
% has several key-value pairs that are recognized.
% Options for the \cs{jdRect} command.
%
-% \medskip\noindent\DescribeMacro{lift} is the amount of lift (performed by \cs{raisebox}. The vlue
+% \medskip\noindent\IndexKey{lift}^^A
+% is the amount of lift (performed by \cs{raisebox}. The value
% can be a positive or negative length. Positive to translate upward, negative to translate downward.
% The default is \texttt{0pt}.
% \begin{macrocode}
\define@key{fitr}{lift}[0pt]{{\setlength\@tempdima{#1}%
- \xdef\fitr@temp@length{\the\@tempdima}}%
- \edef\fitr@@lift{\fitr@temp@length}}
+ \xdef\fitr@temp@length{\the\@tempdima}}%
+ \edef\fitr@@lift{\fitr@temp@length}}
\def\fitr@@lift{0pt}
% \end{macrocode}
-% \DescribeMacro{shift} the amount of horizontal shift, positive to the right, negative to the left.
+% \leavevmode\IndexKey{shift}^^A
+% is the amount of horizontal shift, positive to the right, negative to the left.
% The default is \texttt{0pt}
% \begin{macrocode}
\define@key{fitr}{shift}[0pt]{{\setlength\@tempdima{#1}%
- \xdef\fitr@temp@length{\the\@tempdima}}%
- \edef\fitr@@shift{\fitr@temp@length}}
+ \xdef\fitr@temp@length{\the\@tempdima}}%
+ \edef\fitr@@shift{\fitr@temp@length}}
\def\fitr@@shift{0pt}
% \end{macrocode}
-% \DescribeMacro{width}\DescribeMacro{height} are the dimensions of the bounding box
+% \leavevmode
+% \IndexKey{width}^^A
+% \IndexKey{height}^^A
+% are the dimensions of the bounding box
% for the button/view rectangle. These dimensions are ignored when the first optional
% parameter of \cmd{\jdRect} is nonempty.
% \begin{macrocode}
\define@key{fitr}{width}[0pt]{{\setlength\@tempdima{#1}%
- \xdef\fitr@temp@length{\the\@tempdima}}%
- \edef\fitr@@width{\fitr@temp@length}}
+ \xdef\fitr@temp@length{\the\@tempdima}}%
+ \edef\fitr@@width{\fitr@temp@length}}
\def\fitr@@width{0pt}
\define@key{fitr}{height}[0pt]{{\setlength\@tempdima{#1}%
- \xdef\fitr@temp@length{\the\@tempdima}}%
- \edef\fitr@@height{\fitr@temp@length}}
+ \xdef\fitr@temp@length{\the\@tempdima}}%
+ \edef\fitr@@height{\fitr@temp@length}}
\def\fitr@@height{0pt}
% \end{macrocode}
-% \DescribeMacro{ref} is the reference point. Values are \texttt{t} (the default),
+% \leavevmode\IndexKey{ref}^^A
+% is the reference point. Values are \texttt{t} (the default),
% \texttt{c} center, and \texttt{b} bottom. When the optional first parameter of
% \cmd{\jdRect} is nonempty, the default is \texttt{b}.
% \begin{macrocode}
\define@choicekey+{fitr}{ref}[\val\nr]{t,c,b}[t]%
- {\edef\fitr@@refPt{\val}}{}
+ {\edef\fitr@@refPt{\val}}{}
\def\fitr@@refPt{t}
% \end{macrocode}
-% \DescribeMacro{adddestw}\DescribeMacro{adddesth} add additional length around
+% \leavevmode
+% \IndexKey{adddestw}^^A
+% \IndexKey{adddesth}^^A
+% add additional length around
% the (internal) box. This larger rectangle is the view window.
% \begin{macrocode}
\define@key{fitr}{adddestw}[0]{%
- \fitr@defaultbp{\fitr@@adddestw}{#1}}
+ \fitr@defaultbp{\fitr@@adddestw}{#1}}
\def\fitr@@adddestw{0}
\define@key{fitr}{adddesth}[0]{%
- \fitr@defaultbp{\fitr@@adddesth}{#1}}
+ \fitr@defaultbp{\fitr@@adddesth}{#1}}
\def\fitr@@adddesth{0}
% \end{macrocode}
-% \DescribeMacro{button} is a Boolean. If \texttt{true} (the default), \cmd{\jdRect}
+% \leavevmode
+% \IndexKey{button}^^A
+% is a Boolean. If \texttt{true} (the default), \cmd{\jdRect}
% creates a push button around the content. When the user pushes the button, the viewer
% zooms in to the view window. Clicking again restores the previous view. When \texttt{button}
% is \texttt{false}, the button is not created, but the viewing window is. You can then jump to the
@@ -419,7 +519,9 @@
\define@boolkey{fitr}{button}[true]{}
\KV@fitr@buttontrue
% \end{macrocode}
-% \DescribeMacro{link} is an key, which if taken, a link rather than a push button,
+% \leavevmode
+% \IndexKey{link}^^A
+% is an key, which if taken, a link rather than a push button,
% is created. The \texttt{link} key takes one of two values: \texttt{jmp}, \texttt{restore}.
% \begin{itemize}
% \item When \texttt{link=jmp}, a link is created that jumps to the destination determined by
@@ -433,23 +535,34 @@
{\edef\fitr@@link{\nr}}{}
\let\fitr@@link\@empty
% \end{macrocode}
-% \DescribeMacro{nodest}\texttt{nodest} is a Boolean, which if \texttt{true},
+% \leavevmode
+% \IndexKey{nodest}^^A
+% is a Boolean, which if \texttt{true},
% causes \cs{jdRect} not to generate a destination at the current link (or button).
% \begin{macrocode}
\define@boolkey{fitr}{nodest}[true]{}
\KV@fitr@nodestfalse
% \end{macrocode}
-% \DescribeMacro{dest} When \texttt{button=true} (the default), the name of the destination
+% \leavevmode
+% \IndexKey{dest}^^A
+% When \texttt{button=true} (the default), the name of the destination
% is automatically generated, internally. When \texttt{button=false}, you need to specify
% a destination to reference in a separate link or push button.
% \begin{macrocode}
\define@key{fitr}{dest}[]{\def\fitr@@dest{#1}}
\let\fitr@@dest\@empty
% \end{macrocode}
+% \leavevmode\IndexKey{allowFX}^^A
+% A Boolean switch (of sorts). The \texttt{fitr} package
+% 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
+% are any defined. By saying \texttt{allowFX=false}, no special
+% effects are used, even if some are defined.
% \begin{macrocode}
\define@choicekey+{fitr}{allowFX}[\val\nr]{true,false}[true]%
- {\edef\fitr@allowFX{\val}}{}
-\def\allowFXDefault{true}
+ {\edef\fitr@allowFX{\val}}{}
+\newcommand{\allowFXDefault}{true}
\let\fitr@allowFX\@empty
% \end{macrocode}
% \paragraph{The main command.}
@@ -480,7 +593,7 @@
%
%\medskip\noindent Syntax for \cs{jdRect} has two forms:
%\begin{quote}
-% \cs{jdRect[\meta{key-values}]}
+% \cs{jdRect[\ameta{KV-pairs}]}
%\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};
@@ -488,16 +601,16 @@
%
% There is a \texttt{*}-version as well:
%\begin{quote}
-% \cs{jdRect*[\meta{key-values}]}\verb!{!\meta{content}\verb!}!
+% \cs{jdRect*[\ameta{KV-pairs}]\darg{\ameta{content}}}
%\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.
+% This version is meant to enclose \ameta{content} within the button and view window.
% \texttt{width} and \texttt{height} are ignored, but \texttt{shift} and \texttt{lift} are obeyed (though
% you may \texttt{shift} or \texttt{lift} the button/view window away from the content).
% \begin{macrocode}
\newcommand{\jdRect}{\begingroup
- \@ifstar{\let\fitr@istar=1\set@rectjd}%
- {\let\fitr@istar=0\set@rectjd}}
+ \@ifstar{\let\fitr@istar\ef@One\set@rectjd}%
+ {\let\fitr@istar\ef@Zero\set@rectjd}}
% \end{macrocode}
% For links, we use the link color of \textsf{hyperref}. The definition of
% \cmd{\ef@colorthislink} is in \textsf{eforms}.
@@ -512,214 +625,235 @@
% We process the key-values before gathering the \cs{collectbox}
% so we can insert the link color, if this is a link!
% \begin{macrocode}
- \edef\temp@exp{\noexpand\setkeys{fitr}{#1}}\temp@exp
- \ifx\fitr@@link\@empty\let\fitr@bcode\relax\fi
+ \edef\temp@exp{\noexpand\setkeys{fitr}{#1}}\temp@exp
+ \ifx\fitr@@link\@empty\let\fitr@bcode\relax\fi
% \end{macrocode}
% If this is \cs{jdRect*}, we collect the second argument using
% \cs{collectbox}, and move on to \cs{set@@rectjd}.
% \begin{macrocode}
- \if\fitr@istar1%
- \def\fitr@next{\collectbox[\fitr@bcode]{\set@@rectjd}}\else
+ \ifx\fitr@istar\ef@One
+ \def\fitr@next{\collectbox[\fitr@bcode]{\set@@rectjd}}\else
% \end{macrocode}
% Otherwise, we just move on to \cs{set@@rectjd}.
% \begin{macrocode}
- \def\fitr@next{\set@@rectjd}\fi\fitr@next
-}
+ \def\fitr@next{\set@@rectjd}\fi\fitr@next}
% \end{macrocode}
% The third and final stage in the expansion of \cs{jdRect}
% \begin{macrocode}
\def\set@@rectjd{%
- \stepcounter{magCnt}\def\fitr@setBL{0pt}%
- \ifx\fitr@@dest\@empty
- \def\fitr@namedDest{fitrDestn\the\value{magCnt}}\else
- \edef\fitr@namedDest{\fitr@@dest}\fi
- \if\fitr@istar1\def\fitr@@refPt{b}\fi
+ \stepcounter{magCnt}\def\fitr@setBL{0pt}%
+ \ifx\fitr@@dest\@empty
+ \def\fitr@namedDest{fitrDestn\the\value{magCnt}}\else
+ \edef\fitr@namedDest{\fitr@@dest}\fi
+ \ifx\fitr@istar\ef@One\def\fitr@@refPt{b}\fi
% \end{macrocode}
% If the user specifies the \texttt{link} option, we cancel the \texttt{button} option.
% \begin{macrocode}
- \ifx\fitr@@link\@empty\else\KV@fitr@buttonfalse\fi
+ \ifx\fitr@@link\@empty\else\KV@fitr@buttonfalse\fi
% \end{macrocode}
% If content is explicitly passed in the optional second parameter
% we put it in a box and take its measurements. We'll insert the content
% instead of an empty filled \cs{parbox}.
% \begin{macrocode}
- \if\fitr@istar1%
- \edef\fitr@@width{\the\wd\collectedbox}%
- \edef\fitr@setBL{\the\dp\collectedbox}%
- \setlength{\fitr@length}{\ht\collectedbox+\dp\collectedbox}%
- \edef\fitr@@height{\the\fitr@length}%
- \fi
+ \ifx\fitr@istar\ef@One
+ \edef\fitr@@width{\the\wd\collectedbox}%
+ \edef\fitr@setBL{\the\dp\collectedbox}%
+ \setlength{\fitr@length}{\ht\collectedbox+\dp\collectedbox}%
+ \edef\fitr@@height{\the\fitr@length}%
+ \fi
% \end{macrocode}
% Now, we fit the content into \cs{fitr@bbox} using \cs{get@fitr@dimen}.
% \begin{macrocode}
- \ifx\fitr@@link\@empty
- \ifKV@fitr@button\let\fitr@FLB@ction\fitr@OverlayJmpBtn\else
+ \ifx\fitr@@link\@empty
+ \ifKV@fitr@button\let\fitr@FLB@ction\fitr@OverlayJmpBtn\else
% \end{macrocode}
% \cs{Bbox} is defined in \textsf{eforms}.
% \begin{macrocode}
- \@ifundefined{ef@Bbox}{\let\fitr@FLB@ction\Bbox}%
- {\let\fitr@FLB@ction\ef@Bbox}\fi
+ \@ifundefined{ef@Bbox}{\let\fitr@FLB@ction\Bbox}%
+ {\let\fitr@FLB@ction\ef@Bbox}\fi
\else\def\fitr@FLB@ction{\hfill\vfill\@gobbletwo}\fi
% \end{macrocode}
% And overlay the button/link/box
% \begin{macrocode}
- \get@fitr@dimen{%
- \parbox[\fitr@@refPt][\fitr@@height]{\fitr@@width}%
- {\kern0pt\fitr@FLB@ction{\fitr@@width}{\fitr@@height}\kern0pt}%
- }%
+ \get@fitr@dimen{%
+ \parbox[\fitr@@refPt][\fitr@@height]{\fitr@@width}%
+ {\kern0pt\fitr@FLB@ction{\fitr@@width}{\fitr@@height}\kern0pt}}%
% \end{macrocode}
% Now place the button/box according to the user's options.
% \begin{macrocode}
- \makebox[0pt][l]{\hspace*{\fitr@@shift}\smash{%
- \raisebox{\fitr@@lift-\fitr@setBL}{%
- \ifKV@fitr@nodest\else\setFitRDest{\fitr@@adddestw}%
- {\fitr@@adddesth}{\fitr@namedDest}\fi
- \unhbox\fitr@bbox\ifKV@fitr@nodest\else\fitr@urxury@fixup
- {\fitr@@adddestw}{\fitr@@adddesth}{\fitr@namedDest}\fi
- }}}%
- \setlength{\fboxsep}{0pt}%
+ \makebox[0pt][l]{\hspace*{\fitr@@shift}\smash{%
+ \raisebox{\fitr@@lift-\fitr@setBL}{%
+ \ifKV@fitr@nodest\else\setFitRDest{\fitr@@adddestw}%
+ {\fitr@@adddesth}{\fitr@namedDest}\fi
+ \unhbox\fitr@bbox\ifKV@fitr@nodest\else\fitr@urxury@fixup
+ {\fitr@@adddestw}{\fitr@@adddesth}{\fitr@namedDest}\fi
+ }}}%
+ \setlength{\fboxsep}{0pt}%
% \end{macrocode}
% We attempt to represent the bounding box of the view window.
% We display the bounding view window only if the \texttt{nodest}
% option was not taken, and the \cs{ifviewMagWin} is true.
% \begin{macrocode}
- \ifKV@fitr@nodest\else\ifviewMagWin
- \fitr@length=\fitr@@adddestw bp
- \fitr@length=2\fitr@length
- \addtolength{\fitr@length}{\fitr@@width}%
- \edef\fitr@@width{\the\fitr@length}%
- \fitr@length=\fitr@@adddesth bp
- \fitr@length=2\fitr@length
- \addtolength{\fitr@length}{\fitr@@height}%
- \edef\fitr@@height{\the\fitr@length}%
- \setlength\fitr@length{-\fitr@@adddestw bp}%
- \addtolength\fitr@length{\fitr@@shift}%
- \makebox[0pt][l]{\hspace*{\fitr@length}\smash{%
- \setlength\fitr@length{\fitr@@lift-\fitr@setBL}%
- \if\fitr@@refPt b%
- \addtolength\fitr@length{-\fitr@@adddesth bp}\else
- \if\fitr@@refPt t%
- \addtolength\fitr@length{\fitr@@adddesth bp}%
- \fi\fi
- \raisebox{\fitr@length}%
- {\fbox{\parbox[\fitr@@refPt][\fitr@@height]%
- {\fitr@@width}{\kern0pt\hfill\vfill\kern0pt}}}}%
- }%
- \fi\fi
+ \ifKV@fitr@nodest\else\ifviewMagWin
+ \fitr@length=\fitr@@adddestw bp
+ \fitr@length=2\fitr@length
+ \addtolength{\fitr@length}{\fitr@@width}%
+ \edef\fitr@@width{\the\fitr@length}%
+ \fitr@length=\fitr@@adddesth bp
+ \fitr@length=2\fitr@length
+ \addtolength{\fitr@length}{\fitr@@height}%
+ \edef\fitr@@height{\the\fitr@length}%
+ \setlength\fitr@length{-\fitr@@adddestw bp}%
+ \addtolength\fitr@length{\fitr@@shift}%
+ \makebox[0pt][l]{\hspace*{\fitr@length}\smash{%
+ \setlength\fitr@length{\fitr@@lift-\fitr@setBL}%
+ \if\fitr@@refPt b%
+ \addtolength\fitr@length{-\fitr@@adddesth bp}\else
+ \if\fitr@@refPt t%
+ \addtolength\fitr@length{\fitr@@adddesth bp}%
+ \fi\fi
+ \raisebox{\fitr@length}%
+ {\fbox{\parbox[\fitr@@refPt][\fitr@@height]%
+ {\fitr@@width}{\kern0pt\hfill\vfill\kern0pt}}}}%
+ }%
+ \fi\fi
% \end{macrocode}
% If the user passes content through the optional first parameter, we
% typeset it to the right of the material above (which did not change
% the position of the current point.
% \begin{macrocode}
- \if\fitr@@link0\let\fitr@FLB@ction\fitr@OverlayJmpLnk\else
- \if\fitr@@link1\let\fitr@FLB@ction\fitr@OverlayRestoreLnk\else
- \let\fitr@FLB@ction\relax\let\fitr@bcode\relax\fi\fi
- \if\fitr@istar1\gdef\fitr@next{\fitr@FLB@ction{\BOXCONTENT}}\else
- \let\fitr@next\relax\fi\fitr@next
- \endgroup}
+ \if\fitr@@link\ef@Zero
+ \let\fitr@FLB@ction\fitr@OverlayJmpLnk\else
+ \if\fitr@@link\ef@One
+ \let\fitr@FLB@ction\fitr@OverlayRestoreLnk\else
+ \let\fitr@FLB@ction\relax\let\fitr@bcode\relax\fi\fi
+ \ifx\fitr@istar\ef@One
+ \gdef\fitr@next{\fitr@FLB@ction{\BOXCONTENT}}\else
+ \let\fitr@next\relax\fi\fitr@next
+ \endgroup}
% \end{macrocode}
% The code for the \textbf{\textsf{FitR}} destination.
% \begin{macrocode}
\def\setFitRDest#1#2#3{%
- \if@fitr@dvipdfm
- \FitRbboxB{#1}{#2}{#3}%
- \else
- \ifx\fitr@driver\fitr@pdftex@driver
- \FitRbboxB{#1}{#2}%
+ \if@fitr@dvipdfm
+ \FitRbboxB{#1}{#2}{#3}%
+ \else
+ \ifpdf
+ \FitRbboxB{#1}{#2}%
% \end{macrocode}
% We shift the rectangle \texttt{\#1bp} to the left without changing
% the current point. Then use the \textsf{pdftex} primitive \cs{pdfdest}.
% \begin{macrocode}
- \makebox[0pt][l]{\hspace*{-#1bp}%
- \pdfdest name {#3} fitr
- width \fitr@pdftex@view@width\space
- height \fitr@pdftex@view@height\space
- depth \fitr@pdftex@view@depth\space
- }%
+ \makebox[0pt][l]{\hspace*{-#1bp}%
+ \pdfdest name {#3} fitr
+ width \fitr@pdftex@view@width\space
+ height \fitr@pdftex@view@height\space
+ depth \fitr@pdftex@view@depth\space
+ }%
% \end{macrocode}
% The \textbf{PostScript} code for the \textbf{\textsf{FitR}} destination, for the
% case of \texttt{dvips} and \texttt{dvipsone}.
% \begin{macrocode}
\else\literalps@out{%
[ /Dest/#3/View [ /FitR \FitRbboxB{#1}{#2} ]/DEST pdfmark}%
- \fi\fi
+ \fi\fi
}
% \end{macrocode}
% \paragraph*{Form fields.} The \textsf{eforms} package allows for what is
% called presets. We gather some useful options in one group, and pass them
% all together. \DescribeMacro{\overlayPresets}\cmd{\overlayPresets} sets
% some defaults for the push button that surrounding the content.
+% The \DescribeMacro\restoreOverlayPresets\cmd{\restoreOverlayPresets} restores
+% the default definition for \cs{overlayPresets}.
+% \changes{v1.3.1}{2020/07/06}{Added \string\cs{restoreOverlayPresets}}
% \begin{macrocode}
\newcommand{\overlayPresets}{\H{I}\BG{}\BC{}\S{S}}
+\newcommand{\restoreOverlayPresets}{%
+ \def\overlayPresets{\H{I}\BG{}\BC{}\S{S}}}
% \end{macrocode}
% The \cs{fitr@OverlayJmpBtn} is a \cs{pushButton} that is used internally.
-% It calls document JavaScript \texttt{overlayJmpBtnAction()} for a mouse
+% It calls document JavaScript \texttt{pbJmpBtnAction()} for a mouse
% up action.
% \begin{macrocode}
\def\fitr@OverlayJmpBtn#1#2{%
- \ifx\fitr@allowFX\@empty
- \def\allowFXcode{bAllowFX=\allowFXDefault}\else
- \def\allowFXcode{bAllowFX=\fitr@allowFX}\fi
- \pushButton[\presets{\overlayPresets}\F{-\FPrint}\autoCenter{n}
- \A{\JS{\allowFXcode;\r overlayJmpBtnAction(%
-event,"\fitr@namedDest","\fitr@namedDest");}}]{\fitr@namedDest}{#1}{#2}}
+ \ifx\fitr@allowFX\@empty
+ \def\allowFXcode{bAllowFX=\allowFXDefault}\else
+ \def\allowFXcode{bAllowFX=\fitr@allowFX}\fi
+ \pushButton[\presets{\overlayPresets}\F{-\FPrint}\autoCenter{n}
+ \A{\ifFRusedljs\JS{\allowFXcode;\r
+ pbJmpBtnAction(event,"\fitr@namedDest","\fitr@namedDest");}\else
+ \GoToD(\fitr@namedDest)\fi}]{\fitr@namedDest}{#1}{#2}}
% \end{macrocode}
% \begin{macrocode}
-
-\ifHy@colorlinks\def\overlayJmpLnkPresets{}\else
- \def\overlayJmpLnkPresets{\Color{\@linkcolor}\W{1}}
+\ifHy@colorlinks\def\pbJmpLnkPresets{}\else
+ \def\pbJmpLnkPresets{\Color{\@linkcolor}\W{1}}
\fi
-%\def\overlayJmpLnkPresets{\Color{\@linkcolor}\W{1}}\fi
\def\fitr@OverlayJmpLnk#1{\setLink[%
- \presets{\overlayJmpLnkPresets}
- \A{\JS{overlayJmpLnkAction("\fitr@namedDest");}}]{#1}}
+ \presets{\pbJmpLnkPresets}
+ \A{\ifFRusedljs\JS{% dps
+ pbJmpLnkAction("\fitr@namedDest");}\else
+ \GoToD(\fitr@namedDest)\fi}]{#1}}
\def\fitr@OverlayRestoreLnk#1{\setLink[%
- \presets{\overlayJmpLnkPresets}
- \A{\JS{overlayRestoreLnkAction("\fitr@namedDest");}}]{#1}}
+ \presets{\pbJmpLnkPresets}
+ \A{\ifFRusedljs\JS{% dps
+ pbRestoreLnkAction("\fitr@namedDest");}\else
+ \Named{GoBack}\fi}]{#1}}
% \end{macrocode}
%
% \section{Document JavaScript}
% The document JavaScript for \textsf{fitr}.
% \begin{macrocode}
-\begin{insDLJS}[_fitrLoaded]{fitr}{JS for the fitr Package}
+\ifFRusedljs
+\begin{insDLJS*}[_fitrLoaded]{fitr}
+\begin{newsegment}{JS for the fitr Package}
var _fitrLoaded=true;
var restoreViewState;
var savedRestore=false;
-var aSavedRestore=new Array();
+var oSavedRestore=new Object();
var bAllowFX=true;
% \end{macrocode}
-% This is the function that the hidden overlayed button calls when the
+% \leavevmode\IndexOpt{pbJmpBtnAction}\nmpsep{(event,fname,dname)}
+% This is the function that the transparent overlay button calls when the
% user clicks on it.
% \begin{macrocode}
-function overlayJmpBtnAction(event,fname,dname) {
+function pbJmpBtnAction(event,fname,dname) {
if (event.shift) shiftRestoreView(fname,dname);
else jumpToDest(fname,dname);
}
+% \end{macrocode}
+% \leavevmode\IndexOpt{shiftRestoreView}\nmpsep{(fname,dname)} The function to call
+% to restore a previously save view.
+% \begin{macrocode}
function shiftRestoreView(fname,dname) {
var bRestore=restoreView(fname,dname);
% \end{macrocode}
-% \DescribeMacro{overlayRestoreHook} is a undefined function that the document
-% author can define to create additional code that s/he want executed following
-% the restore.
+% Try built-in store view special effects
+% \begin{macrocode}
+ if (bAllowFX) try {pbRestoreHook(event,bRestore);}catch(e){}
+% \end{macrocode}
+% \leavevmode
+% \IndexJS{pbRestoreHookCustom}\nmpsep{(fname,dname)}
+% A custom function to perform special effects on restore.
% \begin{macrocode}
- if (bAllowFX)
- try { overlayRestoreHook(event,bRestore); } catch(e) {}
+ if (bAllowFX) try {pbRestoreHookCustom(event,bRestore);}catch(e){}
}
% \end{macrocode}
-% When the user clicks on the overlay button, \texttt{overlayJmpBtnAction()}
+% \leavevmode
+% \IndexJS{jumpToDest}\nmpsep{(fname,dname)}
+% When the user clicks on the overlay button, \texttt{pbJmpBtnAction()}
% calls \texttt{jumpToDest}. The function stores the current state before
% jumping.
% \begin{macrocode}
function jumpToDest(fname,dname) {
- if ( typeof aSavedRestore[fname]=="undefined")
- aSavedRestore[fname]=[false,{}];
+ if ( typeof oSavedRestore[fname]=="undefined")
+ oSavedRestore[fname]=[false,{}];
else {
% \end{macrocode}
-% If \texttt{aSavedRestore[fname][0]} is true, that means we have zoomed
+% If \texttt{oSavedRestore[fname][0]} is true, that means we have zoomed
% into the expression, but have not zoomed out again. We'll go ahead and zoom out
% by calling \texttt{shiftRestoreView()}, which does just that.
% \begin{macrocode}
- if (aSavedRestore[fname][0]) {
+ if (oSavedRestore[fname][0]) {
shiftRestoreView(fname,dname)
% \end{macrocode}
% When restoring, we return from this call; we don't want to
@@ -728,43 +862,49 @@ function jumpToDest(fname,dname) {
return;
}
}
- if (!aSavedRestore[fname][0]){
- aSavedRestore[fname][1]=this.viewState;
- aSavedRestore[fname][0]=true;
+ if (!oSavedRestore[fname][0]){
+ oSavedRestore[fname][1]=this.viewState;
+ oSavedRestore[fname][0]=true;
}
% \end{macrocode}
% Jump to the named destination.
% \begin{macrocode}
this.gotoNamedDest(dname);
% \end{macrocode}
-% \DescribeMacro{overlayJmpHook} is a undefined function that the document
-% author can define to create additional code that s/he want executed following
-% the jump.
+% Try the built-in zoom-in special effects.
% \begin{macrocode}
- if (bAllowFX) try { overlayJmpHook(event); } catch(e) {}
+ if (bAllowFX) try { pbJmpHook(event); }catch(e){}
+% \end{macrocode}
+% \leavevmode\IndexJS{pbJmpHookCustom}\nmpsep{(event)} is a custom function that
+% is executed as part of the zoom-in action.
+% \begin{macrocode}
+ if (bAllowFX) try { pbJmpHookCustom(event); }catch(e){}
}
% \end{macrocode}
-% When the user shift-clicks on the overlay button, \texttt{overlayJmpBtnAction()}
+% \leavevmode\IndexJS{restoreView}\nmpsep{(fname,dname)}
+% When the user shift-clicks on the overlay button, \texttt{pbJmpBtnAction()}
% calls \texttt{restoreView}. This function restores the view before the user
% magnified the view.
% \begin{macrocode}
function restoreView(fname,dname) {
- if ( typeof aSavedRestore[fname]=="undefined")
- aSavedRestore[fname]=[false,{}];
- if ( aSavedRestore[fname][0]){
- this.viewState=aSavedRestore[fname][1];
- aSavedRestore[fname][0]=false;
+ if ( typeof oSavedRestore[fname]=="undefined")
+ oSavedRestore[fname]=[false,{}];
+ if ( oSavedRestore[fname][0] ) {
+ this.viewState=oSavedRestore[fname][1];
+ oSavedRestore[fname][0]=false;
return true;
}
else return false;
}
% \end{macrocode}
-% \texttt{overlayJmpLnkAction()} is used when the \texttt{link=jmp} key-value pair is
-% specified. A link does not have a name, so we don't use an array of
+% \leavevmode\IndexJS{pbJmpLnkAction}\nmpsep{(\ameta{dname})}
+% is used when the \texttt{link=jmp} key-value pair is
+% specified. We jump to the named destination \ameta{dname}.
+% A link does not have a name, so we don't use an array of
% stored view state as we do for push buttons. We use a single variable
% for all links.
% \begin{macrocode}
-function overlayJmpLnkAction(dname) {
+function pbJmpLnkAction(dname) {
if (!savedRestore){
restoreViewState=this.viewState;
savedRestore=true;
@@ -772,16 +912,89 @@ function overlayJmpLnkAction(dname) {
this.gotoNamedDest(dname);
}
% \end{macrocode}
-% \texttt{overlayRestoreLnkAction()} is used when the \texttt{link=restore} key-value pair is
+% \leavevmode\IndexJS{pbRestoreLnkAction}\nmpsep{(\ameta{dname})}
+% is used when the \texttt{link=restore} key-value pair is
% specified. We restore the previously saved view state.
% \begin{macrocode}
-function overlayRestoreLnkAction(dname) {
+function pbRestoreLnkAction(dname) {
if (savedRestore){
this.viewState=restoreViewState;
savedRestore=false;
}
}
-\end{insDLJS}
+\end{newsegment}
+\ifFRblinkonjmp
+% \end{macrocode}
+% 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{macrocode}
+\begin{newsegment}{Blink border after jump}
+% \end{macrocode}
+% \leavevmode\IndexJS{pbJmpHook}\nmpsep{(event)}
+% blinks the border of an pb push button just after the jmp to
+% focus in on a rectangular region.
+% \begin{macrocode}
+function pbJmpHook(event) {
+ 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{newsegment}
+\fi % \ifFRblinkonjmp
+\ifFRblinkonrestore
+% \end{macrocode}
+% 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{macrocode}
+\begin{newsegment}{Blink border on restore}
+% \end{macrocode}
+% \leavevmode\IndexJS{pbRestoreHook}\nmpsep{(event,bRestore)}
+% Supplies special effects on restore: \texttt{event} is the event object
+% that called this function; \texttt{bRestore} is a Boolean switch, it is
+% true when we are restoring, and false when we are not.
+% \begin{macrocode}
+function pbRestoreHook(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{newsegment}
+\fi % \ifFRblinkonrestore
+\end{insDLJS*}
+\fi % \ifFRusedljs
% \end{macrocode}
% \begin{macrocode}
%</package>
diff --git a/texmf-dist/tex/latex/fitr/fitr.sty b/texmf-dist/tex/latex/fitr/fitr.sty
index 00f1f160..17831240 100644
--- a/texmf-dist/tex/latex/fitr/fitr.sty
+++ b/texmf-dist/tex/latex/fitr/fitr.sty
@@ -1,362 +1,431 @@
-%%
-%% This is file `fitr.sty',
-%% generated with the docstrip utility.
-%%
-%% The original source files were:
-%%
-%% fitr.dtx (with options: `copyright,package')
-%%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% fitr.sty package, 2016-04-04 %%
-%% Copyright (C) 2012--2016 D. P. Story %%
-%% dpstory@uakron.edu %%
-%% %%
-%% This program can redistributed and/or modified under %%
-%% the terms of the LaTeX Project Public License %%
-%% Distributed from CTAN archives in directory %%
-%% macros/latex/base/lppl.txt; either version 1 of the %%
-%% License, or (at your option) any later version. %%
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-\NeedsTeXFormat{LaTeX2e}[1997/12/01]
-\ProvidesPackage{fitr}
- [2016/04/09 v1.2e Support for FitR destinations (dps)]
-\RequirePackage{xkeyval}
-\RequirePackage{ifpdf}[2006/02/20]
-\RequirePackage{ifxetex}[2006/08/21]
-\@ifundefined{ifpreview}{\newif\ifpreview \previewfalse}{}
-\@ifundefined{ifviewMagWin}{\newif\ifviewMagWin \viewMagWinfalse}{}
-\let\fitr@driver\@empty
-\DeclareOptionX{pdftex}{\gdef\fitr@driver{pdftex}%
- \PassOptionsToPackage{\fitr@driver}{hyperref}%
- \PassOptionsToPackage{\fitr@driver}{eforms}%
-}
-\def\fitr@pdftex@driver{pdftex}
-\DeclareOptionX{dvips}{\gdef\fitr@driver{dvips}%
- \PassOptionsToPackage{\fitr@driver}{hyperref}%
- \PassOptionsToPackage{\fitr@driver}{eforms}%
-}
-\def\fitr@dvips@driver{dvips}
-\DeclareOptionX{dvipsone}{\gdef\fitr@driver{dvipsone}%
- \PassOptionsToPackage{\fitr@driver}{hyperref}%
- \PassOptionsToPackage{\fitr@driver}{eforms}%
-}
-\def\fitr@dvipsone@driver{dvipsone}
-\newif \if@fitr@dvipdfm \@fitr@dvipdfmfalse
-\DeclareOptionX{dvipdfm}{\gdef\fitr@driver{dvipdfm}%
- \@fitr@dvipdfmtrue
- \PassOptionsToPackage{\fitr@driver}{hyperref}%
- \PassOptionsToPackage{\fitr@driver}{eforms}%
-}
-\def\fitr@dvipdfm@driver{dvipdfm}
-\DeclareOptionX{dvipdfmx}{\gdef\fitr@driver{dvipdfmx}%
- \@fitr@dvipdfmtrue
- \PassOptionsToPackage{\fitr@driver}{hyperref}%
- \PassOptionsToPackage{\fitr@driver}{eforms}%
-}
-\def\fitr@dvipdfmx@driver{dvipdfmx}
-\DeclareOptionX{xetex}{\gdef\fitr@driver{xetex}%
- \@fitr@dvipdfmtrue
- \PassOptionsToPackage{\fitr@driver}{hyperref}%
- \PassOptionsToPackage{\fitr@driver}{eforms}%
-}
-\def\fitr@xetex@driver{xetex}
-\DeclareOptionX{preview}{\previewtrue}
-\DeclareOptionX{!preview}{\previewfalse}
-\DeclareOptionX{viewMagWin}{\viewMagWintrue}
-\DeclareOptionX{!viewMagWin}{\viewMagWinfalse}
-\@ifpackageloaded{web}{%
- \ExecuteOptionsX{\eq@driver@name}%
-}{%
- \ifpdf\ExecuteOptionsX{pdftex}\else
- \ifxetex\ExecuteOptionsX{xetex}\fi\fi
-}
-\ProcessOptionsX
-\RequirePackage{xcolor}
-\ifx\fitr@driver\@empty
- \def\fitr@driver{dvips}
- \def\fitr@loadPkgs{%
- \RequirePackage[dvips]{hyperref}
- \RequirePackage[dvips]{eforms}}%
-\else
- \def\fitr@loadPkgs{%
- \RequirePackage{hyperref}
- \RequirePackage{eforms}[2016/04/05]}
-\fi
-\fitr@loadPkgs
-\RequirePackage{calc}
-\RequirePackage{collectbox}
-\newcounter{magCnt}
-\newbox\fitr@bbox
-\newcount\fitr@height \newcount\fitr@width \newcount\fitr@depth
-\newlength\fitr@length
-\def\get@fitr@dimen#1{%
- \setbox\fitr@bbox=\hbox{#1}%
- \fitr@height=\ht\fitr@bbox
- \xdef\fitr@height@l{\the\ht\fitr@bbox}%
- \fitr@width=\wd\fitr@bbox
- \xdef\fitr@width@l{\the\wd\fitr@bbox}%
- \fitr@depth=\dp\fitr@bbox
- \xdef\fitr@depth@l{\the\dp\fitr@bbox}%
- \setlength\fitr@length{\ht\fitr@bbox+\dp\fitr@bbox}%
- \edef\fitr@@height{\the\fitr@length}%
-}
-\def\fitr@urxury@fixup#1#2#3{}
-\ifx\fitr@driver\fitr@dvips@driver
-\headerps@out{/TeXtoPDF {65536 div DVImag mul} def % sp to pts
-/SPtoDvips{TeXtoPDF PDFToDvips} def} % dp to dots
-\def\FitRbboxB#1#2{% Uses \fitr@bbox
- currentpoint 2 copy DvipsToPDF \the\fitr@depth\space TeXtoPDF add
- neg vsize add 72 sub #2\space sub exch % y1
- DvipsToPDF 72 add #1\space sub exch % x1
- 4 2 roll exch DvipsToPDF \the\fitr@width\space
- TeXtoPDF add 72 add #1\space add exch % x2
- DvipsToPDF \the\fitr@height \space TeXtoPDF sub
- neg vsize add 72 sub #2\space add} % y2
-\else\ifx\fitr@driver\fitr@dvipsone@driver
-\special{!/TeXtoPDF {65536 div mag 1000 div mul} def
-/PDFtoTeX {65536 mul mag 1000 div div} def}
-\def\FitRbboxB#1#2{%
- currentpoint 2 copy \the\fitr@depth\space add DvipsToPDF
- neg PageHeight add 72 sub #2\space sub % y1
- exch DvipsToPDF 72 add #1\space sub exch % x1
- 4 2 roll exch \the\fitr@width\space add
- DvipsToPDF 72 add #1\space add exch % x2
- \the\fitr@height\space sub DvipsToPDF neg
- PageHeight add 72 sub #2\space add} % y2
-\else\ifx\fitr@driver\fitr@pdftex@driver
-\def\FitRbboxB#1#2{%
- \fitr@length=#1bp
- \fitr@length=2\fitr@length
- \advance\fitr@length\wd\fitr@bbox
- \edef\fitr@pdftex@view@width{\the\fitr@length}%
- \fitr@length=#2bp
- \advance\fitr@length\ht\fitr@bbox
- \edef\fitr@pdftex@view@height{\the\fitr@length}%
- \fitr@length=#2bp
- \advance\fitr@length\dp\fitr@bbox
- \edef\fitr@pdftex@view@depth{\the\fitr@length}%
-}
-\else\if@fitr@dvipdfm
-\def\FitRbboxB#1#2#3{%
- \smash{\raisebox{-\fitr@depth@l-#2bp}%
- {\makebox[0pt][l]{\hspace*{-#1bp}%
- \@pdfm@mark{dest (#3) %
- [ @thispage /FitR @xpos @ypos @urx#3\space @ury#3\space ]}}}}%
-}
-\def\fitr@urxury@fixup#1#2#3{%
- \smash{\raisebox{\fitr@height@l+#2bp}%
- {\makebox[0pt][l]{\hspace*{#1bp}%
- \@pdfm@mark{obj @urx#3\space @xpos}%
- \@pdfm@mark{obj @ury#3\space @ypos}}}}%
-}
-\fi\fi\fi\fi
-\def\fitr@defaultbp#1#2{%
- \afterassignment\fitr@def@bp\dimen@#2bp\relax{#1}{#2}}
-\def\fitr@def@bp#1\relax#2#3{%
- \if!#1!%
- \def#2{#3}%
- \else
- \dimen@.99626\dimen@
- \edef#2{\strip@pt\dimen@}%
- \fi}
-\define@key{fitr}{lift}[0pt]{{\setlength\@tempdima{#1}%
- \xdef\fitr@temp@length{\the\@tempdima}}%
- \edef\fitr@@lift{\fitr@temp@length}}
-\def\fitr@@lift{0pt}
-\define@key{fitr}{shift}[0pt]{{\setlength\@tempdima{#1}%
- \xdef\fitr@temp@length{\the\@tempdima}}%
- \edef\fitr@@shift{\fitr@temp@length}}
-\def\fitr@@shift{0pt}
-\define@key{fitr}{width}[0pt]{{\setlength\@tempdima{#1}%
- \xdef\fitr@temp@length{\the\@tempdima}}%
- \edef\fitr@@width{\fitr@temp@length}}
-\def\fitr@@width{0pt}
-\define@key{fitr}{height}[0pt]{{\setlength\@tempdima{#1}%
- \xdef\fitr@temp@length{\the\@tempdima}}%
- \edef\fitr@@height{\fitr@temp@length}}
-\def\fitr@@height{0pt}
-\define@choicekey+{fitr}{ref}[\val\nr]{t,c,b}[t]%
- {\edef\fitr@@refPt{\val}}{}
-\def\fitr@@refPt{t}
-\define@key{fitr}{adddestw}[0]{%
- \fitr@defaultbp{\fitr@@adddestw}{#1}}
-\def\fitr@@adddestw{0}
-\define@key{fitr}{adddesth}[0]{%
- \fitr@defaultbp{\fitr@@adddesth}{#1}}
-\def\fitr@@adddesth{0}
-\define@boolkey{fitr}{button}[true]{}
-\KV@fitr@buttontrue
-\define@choicekey+{fitr}{link}[\val\nr]{jmp,restore}[]
- {\edef\fitr@@link{\nr}}{}
-\let\fitr@@link\@empty
-\define@boolkey{fitr}{nodest}[true]{}
-\KV@fitr@nodestfalse
-\define@key{fitr}{dest}[]{\def\fitr@@dest{#1}}
-\let\fitr@@dest\@empty
-\define@choicekey+{fitr}{allowFX}[\val\nr]{true,false}[true]%
- {\edef\fitr@allowFX{\val}}{}
-\def\allowFXDefault{true}
-\let\fitr@allowFX\@empty
-\newcommand{\jdRect}{\begingroup
- \@ifstar{\let\fitr@istar=1\set@rectjd}%
- {\let\fitr@istar=0\set@rectjd}}
-\@eqlinktxtcolor{\@linkcolor}
-\newcommand{\fitr@bcode}{\ef@colorthislink}%
-\newcommand{\set@rectjd}[1][]{\def\fitr@jdrect@argi{#1}%
- \edef\temp@exp{\noexpand\setkeys{fitr}{#1}}\temp@exp
- \ifx\fitr@@link\@empty\let\fitr@bcode\relax\fi
- \if\fitr@istar1%
- \def\fitr@next{\collectbox[\fitr@bcode]{\set@@rectjd}}\else
- \def\fitr@next{\set@@rectjd}\fi\fitr@next
-}
-\def\set@@rectjd{%
- \stepcounter{magCnt}\def\fitr@setBL{0pt}%
- \ifx\fitr@@dest\@empty
- \def\fitr@namedDest{fitrDestn\the\value{magCnt}}\else
- \edef\fitr@namedDest{\fitr@@dest}\fi
- \if\fitr@istar1\def\fitr@@refPt{b}\fi
- \ifx\fitr@@link\@empty\else\KV@fitr@buttonfalse\fi
- \if\fitr@istar1%
- \edef\fitr@@width{\the\wd\collectedbox}%
- \edef\fitr@setBL{\the\dp\collectedbox}%
- \setlength{\fitr@length}{\ht\collectedbox+\dp\collectedbox}%
- \edef\fitr@@height{\the\fitr@length}%
- \fi
- \ifx\fitr@@link\@empty
- \ifKV@fitr@button\let\fitr@FLB@ction\fitr@OverlayJmpBtn\else
- \@ifundefined{ef@Bbox}{\let\fitr@FLB@ction\Bbox}%
- {\let\fitr@FLB@ction\ef@Bbox}\fi
- \else\def\fitr@FLB@ction{\hfill\vfill\@gobbletwo}\fi
- \get@fitr@dimen{%
- \parbox[\fitr@@refPt][\fitr@@height]{\fitr@@width}%
- {\kern0pt\fitr@FLB@ction{\fitr@@width}{\fitr@@height}\kern0pt}%
- }%
- \makebox[0pt][l]{\hspace*{\fitr@@shift}\smash{%
- \raisebox{\fitr@@lift-\fitr@setBL}{%
- \ifKV@fitr@nodest\else\setFitRDest{\fitr@@adddestw}%
- {\fitr@@adddesth}{\fitr@namedDest}\fi
- \unhbox\fitr@bbox\ifKV@fitr@nodest\else\fitr@urxury@fixup
- {\fitr@@adddestw}{\fitr@@adddesth}{\fitr@namedDest}\fi
- }}}%
- \setlength{\fboxsep}{0pt}%
- \ifKV@fitr@nodest\else\ifviewMagWin
- \fitr@length=\fitr@@adddestw bp
- \fitr@length=2\fitr@length
- \addtolength{\fitr@length}{\fitr@@width}%
- \edef\fitr@@width{\the\fitr@length}%
- \fitr@length=\fitr@@adddesth bp
- \fitr@length=2\fitr@length
- \addtolength{\fitr@length}{\fitr@@height}%
- \edef\fitr@@height{\the\fitr@length}%
- \setlength\fitr@length{-\fitr@@adddestw bp}%
- \addtolength\fitr@length{\fitr@@shift}%
- \makebox[0pt][l]{\hspace*{\fitr@length}\smash{%
- \setlength\fitr@length{\fitr@@lift-\fitr@setBL}%
- \if\fitr@@refPt b%
- \addtolength\fitr@length{-\fitr@@adddesth bp}\else
- \if\fitr@@refPt t%
- \addtolength\fitr@length{\fitr@@adddesth bp}%
- \fi\fi
- \raisebox{\fitr@length}%
- {\fbox{\parbox[\fitr@@refPt][\fitr@@height]%
- {\fitr@@width}{\kern0pt\hfill\vfill\kern0pt}}}}%
- }%
- \fi\fi
- \if\fitr@@link0\let\fitr@FLB@ction\fitr@OverlayJmpLnk\else
- \if\fitr@@link1\let\fitr@FLB@ction\fitr@OverlayRestoreLnk\else
- \let\fitr@FLB@ction\relax\let\fitr@bcode\relax\fi\fi
- \if\fitr@istar1\gdef\fitr@next{\fitr@FLB@ction{\BOXCONTENT}}\else
- \let\fitr@next\relax\fi\fitr@next
- \endgroup}
-\def\setFitRDest#1#2#3{%
- \if@fitr@dvipdfm
- \FitRbboxB{#1}{#2}{#3}%
- \else
- \ifx\fitr@driver\fitr@pdftex@driver
- \FitRbboxB{#1}{#2}%
- \makebox[0pt][l]{\hspace*{-#1bp}%
- \pdfdest name {#3} fitr
- width \fitr@pdftex@view@width\space
- height \fitr@pdftex@view@height\space
- depth \fitr@pdftex@view@depth\space
- }%
- \else\literalps@out{%
- [ /Dest/#3/View [ /FitR \FitRbboxB{#1}{#2} ]/DEST pdfmark}%
- \fi\fi
-}
-\newcommand{\overlayPresets}{\H{I}\BG{}\BC{}\S{S}}
-\def\fitr@OverlayJmpBtn#1#2{%
- \ifx\fitr@allowFX\@empty
- \def\allowFXcode{bAllowFX=\allowFXDefault}\else
- \def\allowFXcode{bAllowFX=\fitr@allowFX}\fi
- \pushButton[\presets{\overlayPresets}\F{-\FPrint}\autoCenter{n}
- \A{\JS{\allowFXcode;\r overlayJmpBtnAction(%
-event,"\fitr@namedDest","\fitr@namedDest");}}]{\fitr@namedDest}{#1}{#2}}
-
-\ifHy@colorlinks\def\overlayJmpLnkPresets{}\else
- \def\overlayJmpLnkPresets{\Color{\@linkcolor}\W{1}}
-\fi
-\def\fitr@OverlayJmpLnk#1{\setLink[%
- \presets{\overlayJmpLnkPresets}
- \A{\JS{overlayJmpLnkAction("\fitr@namedDest");}}]{#1}}
-\def\fitr@OverlayRestoreLnk#1{\setLink[%
- \presets{\overlayJmpLnkPresets}
- \A{\JS{overlayRestoreLnkAction("\fitr@namedDest");}}]{#1}}
-\begin{insDLJS}[_fitrLoaded]{fitr}{JS for the fitr Package}
-var _fitrLoaded=true;
-var restoreViewState;
-var savedRestore=false;
-var aSavedRestore=new Array();
-var bAllowFX=true;
-function overlayJmpBtnAction(event,fname,dname) {
- if (event.shift) shiftRestoreView(fname,dname);
- else jumpToDest(fname,dname);
-}
-function shiftRestoreView(fname,dname) {
- var bRestore=restoreView(fname,dname);
- if (bAllowFX)
- try { overlayRestoreHook(event,bRestore); } catch(e) {}
-}
-function jumpToDest(fname,dname) {
- if ( typeof aSavedRestore[fname]=="undefined")
- aSavedRestore[fname]=[false,{}];
- else {
- if (aSavedRestore[fname][0]) {
- shiftRestoreView(fname,dname)
- return;
- }
- }
- if (!aSavedRestore[fname][0]){
- aSavedRestore[fname][1]=this.viewState;
- aSavedRestore[fname][0]=true;
- }
- this.gotoNamedDest(dname);
- if (bAllowFX) try { overlayJmpHook(event); } catch(e) {}
-}
-function restoreView(fname,dname) {
- if ( typeof aSavedRestore[fname]=="undefined")
- aSavedRestore[fname]=[false,{}];
- if ( aSavedRestore[fname][0]){
- this.viewState=aSavedRestore[fname][1];
- aSavedRestore[fname][0]=false;
- return true;
- }
- else return false;
-}
-function overlayJmpLnkAction(dname) {
- if (!savedRestore){
- restoreViewState=this.viewState;
- savedRestore=true;
- }
- this.gotoNamedDest(dname);
-}
-function overlayRestoreLnkAction(dname) {
- if (savedRestore){
- this.viewState=restoreViewState;
- savedRestore=false;
- }
-}
-\end{insDLJS}
-\endinput
-%%
-%% End of file `fitr.sty'.
+%%
+%% This is file `fitr.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% fitr.dtx (with options: `copyright,package')
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% fitr.sty package, %%
+%% Copyright (C) 2012--2020 D. P. Story %%
+%% dpstory@uakron.edu %%
+%% %%
+%% This program can redistributed and/or modified under %%
+%% the terms of the LaTeX Project Public License %%
+%% Distributed from CTAN archives in directory %%
+%% macros/latex/base/lppl.txt; either version 1 of the %%
+%% License, or (at your option) any later version. %%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\NeedsTeXFormat{LaTeX2e}[1997/12/01]
+\ProvidesPackage{fitr}
+ [2020/07/09 v1.3.2 Support for FitR destinations (dps)]
+\RequirePackage{xkeyval}
+\RequirePackage{ifpdf}[2006/02/20]
+\RequirePackage{ifxetex}[2006/08/21]
+\RequirePackage{ifluatex}
+\@ifundefined{ifpreview}{\newif\ifpreview \previewfalse}{}
+\@ifundefined{ifviewMagWin}{\newif\ifviewMagWin \viewMagWinfalse}{}
+\let\fitr@driver\@empty
+\DeclareOptionX{pdftex}{\gdef\fitr@driver{pdftex}%
+ \PassOptionsToPackage{\fitr@driver}{hyperref}%
+ \PassOptionsToPackage{\fitr@driver}{eforms}}
+\def\fitr@pdftex@driver{pdftex}
+\DeclareOptionX{luatex}{\gdef\fitr@driver{luatex}%
+ \PassOptionsToPackage{\fitr@driver}{hyperref}%
+ \PassOptionsToPackage{\fitr@driver}{eforms}}
+\def\fitr@pdftex@driver{luatex}
+\DeclareOptionX{dvips}{\gdef\fitr@driver{dvips}%
+ \PassOptionsToPackage{\fitr@driver}{hyperref}%
+ \PassOptionsToPackage{\fitr@driver}{eforms}}
+\def\fitr@dvips@driver{dvips}
+\DeclareOptionX{dvipsone}{\gdef\fitr@driver{dvipsone}%
+ \PassOptionsToPackage{\fitr@driver}{hyperref}%
+ \PassOptionsToPackage{\fitr@driver}{eforms}}
+\def\fitr@dvipsone@driver{dvipsone}
+\newif \if@fitr@dvipdfm \@fitr@dvipdfmfalse
+\DeclareOptionX{dvipdfm}{\gdef\fitr@driver{dvipdfm}%
+ \@fitr@dvipdfmtrue
+ \PassOptionsToPackage{\fitr@driver}{hyperref}%
+ \PassOptionsToPackage{\fitr@driver}{eforms}}
+\def\fitr@dvipdfm@driver{dvipdfm}
+\DeclareOptionX{dvipdfmx}{\gdef\fitr@driver{dvipdfmx}%
+ \@fitr@dvipdfmtrue
+ \PassOptionsToPackage{\fitr@driver}{hyperref}%
+ \PassOptionsToPackage{\fitr@driver}{eforms}}
+\def\fitr@dvipdfmx@driver{dvipdfmx}
+\DeclareOptionX{xetex}{\gdef\fitr@driver{xetex}%
+ \@fitr@dvipdfmtrue
+ \PassOptionsToPackage{\fitr@driver}{hyperref}%
+ \PassOptionsToPackage{\fitr@driver}{eforms}}
+\def\fitr@xetex@driver{xetex}
+\DeclareOptionX{preview}{\previewtrue}
+\DeclareOptionX{!preview}{\previewfalse}
+\DeclareOptionX{viewMagWin}{\viewMagWintrue}
+\DeclareOptionX{!viewMagWin}{\viewMagWinfalse}
+\providecommand{\previewOn}{\previewtrue}
+\providecommand{\previewOff}{\previewfalse}
+\providecommand{\viewMagWinOn}{\viewMagWintrue}
+\providecommand{\viewMagWinOff}{\viewMagWinfalse}
+\newif\ifFRusedljs \FRusedljstrue
+\DeclareOptionX{gonative}{\FRusedljsfalse}
+\newif\ifFRblinkonjmp \FRblinkonjmpfalse
+\DeclareOptionX{blinkonjmp}{\FRblinkonjmptrue}
+\DeclareOptionX{!blinkonjmp}{\FRblinkonjmpfalse}
+\newif\ifFRblinkonrestore \FRblinkonrestorefalse
+\DeclareOptionX{blinkonrestore}{\FRblinkonrestoretrue}
+\DeclareOptionX{!blinkonrestore}{\FRblinkonrestorefalse}
+\DeclareOptionX{blink}{\FRblinkonjmptrue\FRblinkonrestoretrue}
+\DeclareOptionX{!blink}{\FRblinkonjmpfalse\FRblinkonrestorefalse}
+\@ifpackageloaded{web}{\ExecuteOptionsX{\eq@driver@name}}{%
+ \ifluatex\ExecuteOptionsX{pdftex}\else
+ \ifpdf\ExecuteOptionsX{pdftex}\else
+ \ifxetex\ExecuteOptionsX{xetex}\else
+ \@ifundefined{l@tex@@@@driver}{\ExecuteOptionsX{dvips}}
+ {\ExecuteOptionsX{dvipsone}}\fi\fi\fi
+}
+\ProcessOptionsX
+\RequirePackage{xcolor}
+\RequirePackage{eforms}[2020/07/05]
+\RequirePackage{calc}
+\RequirePackage{collectbox}
+\newcounter{magCnt}
+\newbox\fitr@bbox
+\newcount\fitr@height
+\newcount\fitr@width
+\newcount\fitr@depth
+\newlength\fitr@length
+\ifxetex\makeXasPDOff\fi
+\ifluatex\protected\def\pdfdest{\pdfextension dest }\fi
+\def\get@fitr@dimen#1{%
+ \setbox\fitr@bbox=\hbox{#1}%
+ \fitr@height=\ht\fitr@bbox
+ \xdef\fitr@height@l{\the\ht\fitr@bbox}%
+ \fitr@width=\wd\fitr@bbox
+ \xdef\fitr@width@l{\the\wd\fitr@bbox}%
+ \fitr@depth=\dp\fitr@bbox
+ \xdef\fitr@depth@l{\the\dp\fitr@bbox}%
+ \setlength\fitr@length{\ht\fitr@bbox+\dp\fitr@bbox}%
+ \edef\fitr@@height{\the\fitr@length}%
+}
+\def\fitr@urxury@fixup#1#2#3{}
+\ifx\fitr@driver\fitr@dvips@driver
+\headerps@out{/TeXtoPDF {65536 div DVImag mul} def % sp to pts
+/SPtoDvips{TeXtoPDF PDFToDvips} def} % sp to dots
+\def\FitRbboxB#1#2{% Uses \fitr@bbox
+ currentpoint 2 copy DvipsToPDF \the\fitr@depth\space TeXtoPDF add
+ neg vsize add 72 sub #2\space sub exch % y1
+ DvipsToPDF 72 add #1\space sub exch % x1
+ 4 2 roll exch DvipsToPDF \the\fitr@width\space
+ TeXtoPDF add 72 add #1\space add exch % x2
+ DvipsToPDF \the\fitr@height \space TeXtoPDF sub
+ neg vsize add 72 sub #2\space add} % y2
+\else
+\ifx\fitr@driver\fitr@dvipsone@driver
+\special{!/TeXtoPDF {65536 div mag 1000 div mul} def
+/PDFtoTeX {65536 mul mag 1000 div div} def}
+\def\FitRbboxB#1#2{%
+ currentpoint 2 copy \the\fitr@depth\space add DvipsToPDF
+ neg PageHeight add 72 sub #2\space sub % y1
+ exch DvipsToPDF 72 add #1\space sub exch % x1
+ 4 2 roll exch \the\fitr@width\space add
+ DvipsToPDF 72 add #1\space add exch % x2
+ \the\fitr@height\space sub DvipsToPDF neg
+ PageHeight add 72 sub #2\space add} % y2
+\else\ifpdf
+\def\FitRbboxB#1#2{%
+ \fitr@length=#1bp
+ \fitr@length=2\fitr@length
+ \advance\fitr@length\wd\fitr@bbox
+ \edef\fitr@pdftex@view@width{\the\fitr@length}%
+ \fitr@length=#2bp
+ \advance\fitr@length\ht\fitr@bbox
+ \edef\fitr@pdftex@view@height{\the\fitr@length}%
+ \fitr@length=#2bp
+ \advance\fitr@length\dp\fitr@bbox
+ \edef\fitr@pdftex@view@depth{\the\fitr@length}%
+}
+\else\if@fitr@dvipdfm
+\def\FitRbboxB#1#2#3{%
+ \smash{\raisebox{-\fitr@depth@l-#2bp}%
+ {\makebox[0pt][l]{\hspace*{-#1bp}%
+ \@pdfm@mark{dest (#3) %
+ [ @thispage /FitR @xpos @ypos @urx#3\space @ury#3\space ]}}}}}
+\def\fitr@urxury@fixup#1#2#3{%
+ \smash{\raisebox{\fitr@height@l+#2bp}%
+ {\makebox[0pt][l]{\hspace*{#1bp}%
+ \@pdfm@mark{obj @urx#3\space @xpos}%
+ \@pdfm@mark{obj @ury#3\space @ypos}}}}%
+}
+\fi\fi\fi\fi
+\def\fitr@defaultbp#1#2{%
+ \afterassignment\fitr@def@bp\dimen@#2bp\relax{#1}{#2}}
+\def\fitr@def@bp#1\relax#2#3{%
+ \if!#1!%
+ \def#2{#3}%
+ \else
+ \dimen@.99626\dimen@
+ \edef#2{\strip@pt\dimen@}%
+ \fi}
+\define@key{fitr}{lift}[0pt]{{\setlength\@tempdima{#1}%
+ \xdef\fitr@temp@length{\the\@tempdima}}%
+ \edef\fitr@@lift{\fitr@temp@length}}
+\def\fitr@@lift{0pt}
+\define@key{fitr}{shift}[0pt]{{\setlength\@tempdima{#1}%
+ \xdef\fitr@temp@length{\the\@tempdima}}%
+ \edef\fitr@@shift{\fitr@temp@length}}
+\def\fitr@@shift{0pt}
+\define@key{fitr}{width}[0pt]{{\setlength\@tempdima{#1}%
+ \xdef\fitr@temp@length{\the\@tempdima}}%
+ \edef\fitr@@width{\fitr@temp@length}}
+\def\fitr@@width{0pt}
+\define@key{fitr}{height}[0pt]{{\setlength\@tempdima{#1}%
+ \xdef\fitr@temp@length{\the\@tempdima}}%
+ \edef\fitr@@height{\fitr@temp@length}}
+\def\fitr@@height{0pt}
+\define@choicekey+{fitr}{ref}[\val\nr]{t,c,b}[t]%
+ {\edef\fitr@@refPt{\val}}{}
+\def\fitr@@refPt{t}
+\define@key{fitr}{adddestw}[0]{%
+ \fitr@defaultbp{\fitr@@adddestw}{#1}}
+\def\fitr@@adddestw{0}
+\define@key{fitr}{adddesth}[0]{%
+ \fitr@defaultbp{\fitr@@adddesth}{#1}}
+\def\fitr@@adddesth{0}
+\define@boolkey{fitr}{button}[true]{}
+\KV@fitr@buttontrue
+\define@choicekey+{fitr}{link}[\val\nr]{jmp,restore}[]
+ {\edef\fitr@@link{\nr}}{}
+\let\fitr@@link\@empty
+\define@boolkey{fitr}{nodest}[true]{}
+\KV@fitr@nodestfalse
+\define@key{fitr}{dest}[]{\def\fitr@@dest{#1}}
+\let\fitr@@dest\@empty
+\define@choicekey+{fitr}{allowFX}[\val\nr]{true,false}[true]%
+ {\edef\fitr@allowFX{\val}}{}
+\newcommand{\allowFXDefault}{true}
+\let\fitr@allowFX\@empty
+\newcommand{\jdRect}{\begingroup
+ \@ifstar{\let\fitr@istar\ef@One\set@rectjd}%
+ {\let\fitr@istar\ef@Zero\set@rectjd}}
+\@eqlinktxtcolor{\@linkcolor}
+\newcommand{\fitr@bcode}{\ef@colorthislink}%
+\newcommand{\set@rectjd}[1][]{\def\fitr@jdrect@argi{#1}%
+ \edef\temp@exp{\noexpand\setkeys{fitr}{#1}}\temp@exp
+ \ifx\fitr@@link\@empty\let\fitr@bcode\relax\fi
+ \ifx\fitr@istar\ef@One
+ \def\fitr@next{\collectbox[\fitr@bcode]{\set@@rectjd}}\else
+ \def\fitr@next{\set@@rectjd}\fi\fitr@next}
+\def\set@@rectjd{%
+ \stepcounter{magCnt}\def\fitr@setBL{0pt}%
+ \ifx\fitr@@dest\@empty
+ \def\fitr@namedDest{fitrDestn\the\value{magCnt}}\else
+ \edef\fitr@namedDest{\fitr@@dest}\fi
+ \ifx\fitr@istar\ef@One\def\fitr@@refPt{b}\fi
+ \ifx\fitr@@link\@empty\else\KV@fitr@buttonfalse\fi
+ \ifx\fitr@istar\ef@One
+ \edef\fitr@@width{\the\wd\collectedbox}%
+ \edef\fitr@setBL{\the\dp\collectedbox}%
+ \setlength{\fitr@length}{\ht\collectedbox+\dp\collectedbox}%
+ \edef\fitr@@height{\the\fitr@length}%
+ \fi
+ \ifx\fitr@@link\@empty
+ \ifKV@fitr@button\let\fitr@FLB@ction\fitr@OverlayJmpBtn\else
+ \@ifundefined{ef@Bbox}{\let\fitr@FLB@ction\Bbox}%
+ {\let\fitr@FLB@ction\ef@Bbox}\fi
+ \else\def\fitr@FLB@ction{\hfill\vfill\@gobbletwo}\fi
+ \get@fitr@dimen{%
+ \parbox[\fitr@@refPt][\fitr@@height]{\fitr@@width}%
+ {\kern0pt\fitr@FLB@ction{\fitr@@width}{\fitr@@height}\kern0pt}}%
+ \makebox[0pt][l]{\hspace*{\fitr@@shift}\smash{%
+ \raisebox{\fitr@@lift-\fitr@setBL}{%
+ \ifKV@fitr@nodest\else\setFitRDest{\fitr@@adddestw}%
+ {\fitr@@adddesth}{\fitr@namedDest}\fi
+ \unhbox\fitr@bbox\ifKV@fitr@nodest\else\fitr@urxury@fixup
+ {\fitr@@adddestw}{\fitr@@adddesth}{\fitr@namedDest}\fi
+ }}}%
+ \setlength{\fboxsep}{0pt}%
+ \ifKV@fitr@nodest\else\ifviewMagWin
+ \fitr@length=\fitr@@adddestw bp
+ \fitr@length=2\fitr@length
+ \addtolength{\fitr@length}{\fitr@@width}%
+ \edef\fitr@@width{\the\fitr@length}%
+ \fitr@length=\fitr@@adddesth bp
+ \fitr@length=2\fitr@length
+ \addtolength{\fitr@length}{\fitr@@height}%
+ \edef\fitr@@height{\the\fitr@length}%
+ \setlength\fitr@length{-\fitr@@adddestw bp}%
+ \addtolength\fitr@length{\fitr@@shift}%
+ \makebox[0pt][l]{\hspace*{\fitr@length}\smash{%
+ \setlength\fitr@length{\fitr@@lift-\fitr@setBL}%
+ \if\fitr@@refPt b%
+ \addtolength\fitr@length{-\fitr@@adddesth bp}\else
+ \if\fitr@@refPt t%
+ \addtolength\fitr@length{\fitr@@adddesth bp}%
+ \fi\fi
+ \raisebox{\fitr@length}%
+ {\fbox{\parbox[\fitr@@refPt][\fitr@@height]%
+ {\fitr@@width}{\kern0pt\hfill\vfill\kern0pt}}}}%
+ }%
+ \fi\fi
+ \if\fitr@@link\ef@Zero
+ \let\fitr@FLB@ction\fitr@OverlayJmpLnk\else
+ \if\fitr@@link\ef@One
+ \let\fitr@FLB@ction\fitr@OverlayRestoreLnk\else
+ \let\fitr@FLB@ction\relax\let\fitr@bcode\relax\fi\fi
+ \ifx\fitr@istar\ef@One
+ \gdef\fitr@next{\fitr@FLB@ction{\BOXCONTENT}}\else
+ \let\fitr@next\relax\fi\fitr@next
+ \endgroup}
+\def\setFitRDest#1#2#3{%
+ \if@fitr@dvipdfm
+ \FitRbboxB{#1}{#2}{#3}%
+ \else
+ \ifpdf
+ \FitRbboxB{#1}{#2}%
+ \makebox[0pt][l]{\hspace*{-#1bp}%
+ \pdfdest name {#3} fitr
+ width \fitr@pdftex@view@width\space
+ height \fitr@pdftex@view@height\space
+ depth \fitr@pdftex@view@depth\space
+ }%
+ \else\literalps@out{%
+ [ /Dest/#3/View [ /FitR \FitRbboxB{#1}{#2} ]/DEST pdfmark}%
+ \fi\fi
+}
+\newcommand{\overlayPresets}{\H{I}\BG{}\BC{}\S{S}}
+\newcommand{\restoreOverlayPresets}{%
+ \def\overlayPresets{\H{I}\BG{}\BC{}\S{S}}}
+\def\fitr@OverlayJmpBtn#1#2{%
+ \ifx\fitr@allowFX\@empty
+ \def\allowFXcode{bAllowFX=\allowFXDefault}\else
+ \def\allowFXcode{bAllowFX=\fitr@allowFX}\fi
+ \pushButton[\presets{\overlayPresets}\F{-\FPrint}\autoCenter{n}
+ \A{\ifFRusedljs\JS{\allowFXcode;\r
+ pbJmpBtnAction(event,"\fitr@namedDest","\fitr@namedDest");}\else
+ \GoToD(\fitr@namedDest)\fi}]{\fitr@namedDest}{#1}{#2}}
+\ifHy@colorlinks\def\pbJmpLnkPresets{}\else
+ \def\pbJmpLnkPresets{\Color{\@linkcolor}\W{1}}
+\fi
+\def\fitr@OverlayJmpLnk#1{\setLink[%
+ \presets{\pbJmpLnkPresets}
+ \A{\ifFRusedljs\JS{% dps
+ pbJmpLnkAction("\fitr@namedDest");}\else
+ \GoToD(\fitr@namedDest)\fi}]{#1}}
+\def\fitr@OverlayRestoreLnk#1{\setLink[%
+ \presets{\pbJmpLnkPresets}
+ \A{\ifFRusedljs\JS{% dps
+ pbRestoreLnkAction("\fitr@namedDest");}\else
+ \Named{GoBack}\fi}]{#1}}
+\ifFRusedljs
+\begin{insDLJS*}[_fitrLoaded]{fitr}
+\begin{newsegment}{JS for the fitr Package}
+var _fitrLoaded=true;
+var restoreViewState;
+var savedRestore=false;
+var oSavedRestore=new Object();
+var bAllowFX=true;
+function pbJmpBtnAction(event,fname,dname) {
+ if (event.shift) shiftRestoreView(fname,dname);
+ else jumpToDest(fname,dname);
+}
+function shiftRestoreView(fname,dname) {
+ var bRestore=restoreView(fname,dname);
+ if (bAllowFX) try {pbRestoreHook(event,bRestore);}catch(e){}
+ if (bAllowFX) try {pbRestoreHookCustom(event,bRestore);}catch(e){}
+}
+function jumpToDest(fname,dname) {
+ if ( typeof oSavedRestore[fname]=="undefined")
+ oSavedRestore[fname]=[false,{}];
+ else {
+ if (oSavedRestore[fname][0]) {
+ shiftRestoreView(fname,dname)
+ return;
+ }
+ }
+ if (!oSavedRestore[fname][0]){
+ oSavedRestore[fname][1]=this.viewState;
+ oSavedRestore[fname][0]=true;
+ }
+ this.gotoNamedDest(dname);
+ if (bAllowFX) try { pbJmpHook(event); }catch(e){}
+ if (bAllowFX) try { pbJmpHookCustom(event); }catch(e){}
+}
+function restoreView(fname,dname) {
+ if ( typeof oSavedRestore[fname]=="undefined")
+ oSavedRestore[fname]=[false,{}];
+ if ( oSavedRestore[fname][0] ) {
+ this.viewState=oSavedRestore[fname][1];
+ oSavedRestore[fname][0]=false;
+ return true;
+ }
+ else return false;
+}
+function pbJmpLnkAction(dname) {
+ if (!savedRestore){
+ restoreViewState=this.viewState;
+ savedRestore=true;
+ }
+ this.gotoNamedDest(dname);
+}
+function pbRestoreLnkAction(dname) {
+ if (savedRestore){
+ this.viewState=restoreViewState;
+ savedRestore=false;
+ }
+}
+\end{newsegment}
+\ifFRblinkonjmp
+\begin{newsegment}{Blink border after jump}
+function pbJmpHook(event) {
+ 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{newsegment}
+\fi % \ifFRblinkonjmp
+\ifFRblinkonrestore
+\begin{newsegment}{Blink border on restore}
+function pbRestoreHook(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{newsegment}
+\fi % \ifFRblinkonrestore
+\end{insDLJS*}
+\fi % \ifFRusedljs
+\endinput
+%%
+%% End of file `fitr.sty'.