diff options
Diffstat (limited to 'macros/latex/contrib/fitr/examples')
20 files changed, 147 insertions, 105 deletions
diff --git a/macros/latex/contrib/fitr/examples/Kutta.eps b/macros/latex/contrib/fitr/examples/Kutta.eps Binary files differdeleted file mode 100644 index 8ad5349e64..0000000000 --- a/macros/latex/contrib/fitr/examples/Kutta.eps +++ /dev/null diff --git a/macros/latex/contrib/fitr/examples/Kutta.xbb b/macros/latex/contrib/fitr/examples/Kutta.xbb deleted file mode 100644 index f8d9a29fb9..0000000000 --- a/macros/latex/contrib/fitr/examples/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/macros/latex/contrib/fitr/examples/fitr_demo.pdf b/macros/latex/contrib/fitr/examples/fitr_demo.pdf Binary files differindex 9e43557892..85c26453a5 100644 --- a/macros/latex/contrib/fitr/examples/fitr_demo.pdf +++ b/macros/latex/contrib/fitr/examples/fitr_demo.pdf diff --git a/macros/latex/contrib/fitr/examples/fitr_demo.tex b/macros/latex/contrib/fitr/examples/fitr_demo.tex index 7fe7536f40..3ec611fef2 100644 --- a/macros/latex/contrib/fitr/examples/fitr_demo.tex +++ b/macros/latex/contrib/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/macros/latex/contrib/fitr/examples/fitr_minimal.tex b/macros/latex/contrib/fitr/examples/fitr_minimal.tex index 160f38fa6d..953c3ffb49 100644 --- a/macros/latex/contrib/fitr/examples/fitr_minimal.tex +++ b/macros/latex/contrib/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/macros/latex/contrib/fitr/examples/Kutta.bb b/macros/latex/contrib/fitr/examples/graphics/Kutta.bb index 52e9f93c6c..9c53f11eec 100644 --- a/macros/latex/contrib/fitr/examples/Kutta.bb +++ b/macros/latex/contrib/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/macros/latex/contrib/fitr/examples/graphics/Kutta.eps b/macros/latex/contrib/fitr/examples/graphics/Kutta.eps Binary files differnew file mode 100644 index 0000000000..94a31192f2 --- /dev/null +++ b/macros/latex/contrib/fitr/examples/graphics/Kutta.eps diff --git a/macros/latex/contrib/fitr/examples/Kutta.jpeg b/macros/latex/contrib/fitr/examples/graphics/Kutta.jpeg Binary files differindex d847cb2a7e..d847cb2a7e 100644 --- a/macros/latex/contrib/fitr/examples/Kutta.jpeg +++ b/macros/latex/contrib/fitr/examples/graphics/Kutta.jpeg diff --git a/macros/latex/contrib/fitr/examples/Kutta.pdf b/macros/latex/contrib/fitr/examples/graphics/Kutta.pdf Binary files differindex e737d265d0..e737d265d0 100644 --- a/macros/latex/contrib/fitr/examples/Kutta.pdf +++ b/macros/latex/contrib/fitr/examples/graphics/Kutta.pdf diff --git a/macros/latex/contrib/fitr/examples/graphics/Kutta.xbb b/macros/latex/contrib/fitr/examples/graphics/Kutta.xbb new file mode 100644 index 0000000000..6cdd0aaa6c --- /dev/null +++ b/macros/latex/contrib/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/macros/latex/contrib/fitr/examples/runge.bb b/macros/latex/contrib/fitr/examples/graphics/runge.bb index fc1a526a84..fc1a526a84 100644 --- a/macros/latex/contrib/fitr/examples/runge.bb +++ b/macros/latex/contrib/fitr/examples/graphics/runge.bb diff --git a/macros/latex/contrib/fitr/examples/runge.eps b/macros/latex/contrib/fitr/examples/graphics/runge.eps Binary files differindex 283816eabd..283816eabd 100644 --- a/macros/latex/contrib/fitr/examples/runge.eps +++ b/macros/latex/contrib/fitr/examples/graphics/runge.eps diff --git a/macros/latex/contrib/fitr/examples/runge.jpg b/macros/latex/contrib/fitr/examples/graphics/runge.jpg Binary files differindex db05c74bf0..db05c74bf0 100644 --- a/macros/latex/contrib/fitr/examples/runge.jpg +++ b/macros/latex/contrib/fitr/examples/graphics/runge.jpg diff --git a/macros/latex/contrib/fitr/examples/runge.pdf b/macros/latex/contrib/fitr/examples/graphics/runge.pdf Binary files differindex 85ee459f91..85ee459f91 100644 --- a/macros/latex/contrib/fitr/examples/runge.pdf +++ b/macros/latex/contrib/fitr/examples/graphics/runge.pdf diff --git a/macros/latex/contrib/fitr/examples/graphics/runge.xbb b/macros/latex/contrib/fitr/examples/graphics/runge.xbb new file mode 100644 index 0000000000..b31c91e31f --- /dev/null +++ b/macros/latex/contrib/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/macros/latex/contrib/fitr/examples/jmpHook.js b/macros/latex/contrib/fitr/examples/jmpHook.js new file mode 100644 index 0000000000..239f8fecdf --- /dev/null +++ b/macros/latex/contrib/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/macros/latex/contrib/fitr/examples/jmpHookBlink.js b/macros/latex/contrib/fitr/examples/jmpHookBlink.js deleted file mode 100644 index c6ea043e77..0000000000 --- a/macros/latex/contrib/fitr/examples/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/macros/latex/contrib/fitr/examples/restoreHook.js b/macros/latex/contrib/fitr/examples/restoreHook.js new file mode 100644 index 0000000000..c5c42fa84d --- /dev/null +++ b/macros/latex/contrib/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/macros/latex/contrib/fitr/examples/restoreHookBlink.js b/macros/latex/contrib/fitr/examples/restoreHookBlink.js deleted file mode 100644 index 77f6077ee4..0000000000 --- a/macros/latex/contrib/fitr/examples/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/macros/latex/contrib/fitr/examples/runge.xbb b/macros/latex/contrib/fitr/examples/runge.xbb deleted file mode 100644 index 6475eae1e0..0000000000 --- a/macros/latex/contrib/fitr/examples/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 - |