summaryrefslogtreecommitdiff
path: root/macros/latex/contrib
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-07-10 03:02:35 +0000
committerNorbert Preining <norbert@preining.info>2020-07-10 03:02:35 +0000
commitb3cf6973881fee79b4abb0be96dcfd5330bfeeea (patch)
tree43938d7ef0bdc8d688f2ed5fef9b92cde2da9607 /macros/latex/contrib
parent36846a866c020aa9369708b527a1297fcd5215f9 (diff)
CTAN sync 202007100302
Diffstat (limited to 'macros/latex/contrib')
-rw-r--r--macros/latex/contrib/fitr/README.md14
-rw-r--r--macros/latex/contrib/fitr/doc/fitr_man.pdfbin177690 -> 0 bytes
-rw-r--r--macros/latex/contrib/fitr/doc/fitr_man.tex553
-rw-r--r--macros/latex/contrib/fitr/docs/fitr.pdfbin0 -> 2740104 bytes
-rw-r--r--macros/latex/contrib/fitr/docs/fitr_man.pdfbin0 -> 283808 bytes
-rw-r--r--macros/latex/contrib/fitr/docs/fitr_man.tex721
-rw-r--r--macros/latex/contrib/fitr/examples/Kutta.epsbin344944 -> 0 bytes
-rw-r--r--macros/latex/contrib/fitr/examples/Kutta.xbb6
-rw-r--r--macros/latex/contrib/fitr/examples/fitr_demo.pdfbin80760 -> 201415 bytes
-rw-r--r--macros/latex/contrib/fitr/examples/fitr_demo.tex63
-rw-r--r--macros/latex/contrib/fitr/examples/fitr_minimal.tex66
-rw-r--r--macros/latex/contrib/fitr/examples/graphics/Kutta.bb (renamed from macros/latex/contrib/fitr/examples/Kutta.bb)1
-rw-r--r--macros/latex/contrib/fitr/examples/graphics/Kutta.epsbin0 -> 354365 bytes
-rw-r--r--macros/latex/contrib/fitr/examples/graphics/Kutta.jpeg (renamed from macros/latex/contrib/fitr/examples/Kutta.jpeg)bin9863 -> 9863 bytes
-rw-r--r--macros/latex/contrib/fitr/examples/graphics/Kutta.pdf (renamed from macros/latex/contrib/fitr/examples/Kutta.pdf)bin15308 -> 15308 bytes
-rw-r--r--macros/latex/contrib/fitr/examples/graphics/Kutta.xbb6
-rw-r--r--macros/latex/contrib/fitr/examples/graphics/runge.bb (renamed from macros/latex/contrib/fitr/examples/runge.bb)0
-rw-r--r--macros/latex/contrib/fitr/examples/graphics/runge.eps (renamed from macros/latex/contrib/fitr/examples/runge.eps)bin413683 -> 413683 bytes
-rw-r--r--macros/latex/contrib/fitr/examples/graphics/runge.jpg (renamed from macros/latex/contrib/fitr/examples/runge.jpg)bin7628 -> 7628 bytes
-rw-r--r--macros/latex/contrib/fitr/examples/graphics/runge.pdf (renamed from macros/latex/contrib/fitr/examples/runge.pdf)bin13182 -> 13182 bytes
-rw-r--r--macros/latex/contrib/fitr/examples/graphics/runge.xbb6
-rw-r--r--macros/latex/contrib/fitr/examples/jmpHook.js12
-rw-r--r--macros/latex/contrib/fitr/examples/jmpHookBlink.js41
-rw-r--r--macros/latex/contrib/fitr/examples/restoreHook.js12
-rw-r--r--macros/latex/contrib/fitr/examples/restoreHookBlink.js33
-rw-r--r--macros/latex/contrib/fitr/examples/runge.xbb6
-rw-r--r--macros/latex/contrib/fitr/fitr.dtx771
-rw-r--r--macros/latex/contrib/thuthesis/CHANGELOG.md15
-rw-r--r--macros/latex/contrib/thuthesis/data/appendix-survey.tex7
-rw-r--r--macros/latex/contrib/thuthesis/data/chap01.tex18
-rw-r--r--macros/latex/contrib/thuthesis/math_commands.tex292
-rw-r--r--macros/latex/contrib/thuthesis/spine.pdfbin17265 -> 17319 bytes
-rw-r--r--macros/latex/contrib/thuthesis/thusetup.tex42
-rw-r--r--macros/latex/contrib/thuthesis/thuthesis-author-year.bst335
-rw-r--r--macros/latex/contrib/thuthesis/thuthesis-bachelor.bst331
-rw-r--r--macros/latex/contrib/thuthesis/thuthesis-example.pdfbin877114 -> 875812 bytes
-rw-r--r--macros/latex/contrib/thuthesis/thuthesis-numeric.bst331
-rw-r--r--macros/latex/contrib/thuthesis/thuthesis.dtx58
-rw-r--r--macros/latex/contrib/thuthesis/thuthesis.pdfbin1075310 -> 1080107 bytes
39 files changed, 2252 insertions, 1488 deletions
diff --git a/macros/latex/contrib/fitr/README.md b/macros/latex/contrib/fitr/README.md
index 5f7d97b5d5..933a1743a9 100644
--- a/macros/latex/contrib/fitr/README.md
+++ b/macros/latex/contrib/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/macros/latex/contrib/fitr/doc/fitr_man.pdf b/macros/latex/contrib/fitr/doc/fitr_man.pdf
deleted file mode 100644
index b70ee2656b..0000000000
--- a/macros/latex/contrib/fitr/doc/fitr_man.pdf
+++ /dev/null
Binary files differ
diff --git a/macros/latex/contrib/fitr/doc/fitr_man.tex b/macros/latex/contrib/fitr/doc/fitr_man.tex
deleted file mode 100644
index 690f498f9a..0000000000
--- a/macros/latex/contrib/fitr/doc/fitr_man.tex
+++ /dev/null
@@ -1,553 +0,0 @@
-% makeindex < aebpro_man.idx > aebpro_man.ind
-\documentclass{article}
-\usepackage[fleqn]{amsmath}
-\usepackage[
- web={centertitlepage,designv,forcolorpaper,
- usesf,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{myriadpro}
-\usepackage[altbullet]{lucidbry}
-
-\renewcommand\allowFXDefault{false}
-
-
-%\usepackage{makeidx}
-%\makeindex
-\usepackage{acroman}
-
-\makeatletter
-\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$}
-
-\makeatother
-%\usepackage[active]{srcltx}
-
-\urlstyle{rm}
-\def\fitrpkg{\textsf{f{i}tr}}
-
-\DeclareDocInfo
-{
- university={\AcroTeX.Net},
- title={\texorpdfstring{The}{The manual for the} f{i}tr Package\texorpdfstring{\\
- 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},
- 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$}}$}
-
-\universityLayout{fontsize=Large}
-\titleLayout{fontsize=LARGE}
-\authorLayout{fontsize=Large}
-\tocLayout{fontsize=Large,color=aeb}
-\sectionLayout{indent=-62.5pt,fontsize=large,color=aeb}
-\subsectionLayout{indent=-31.25pt,color=aeb}
-\subsubsectionLayout{indent=0pt,color=aeb}
-\subsubDefaultDing{\texorpdfstring{$\bullet$}{\textrm\textbullet}}
-
-%\pagestyle{empty}
-\parindent0pt
-\parskip\medskipamount
-
-
-\definePath\bgPath{"C:/Users/Public/Documents/%
- ManualBGs/Manual_BG_Print_AeB.pdf"}
-\begin{docassembly}
-\addWatermarkFromFile({%
- bOnTop: false,
- cDIPath: \bgPath
-})
-\executeSave()
-\end{docassembly}
-
-\begin{document}
-
-\maketitle
-
-\selectColors{linkColor=black}
-\tableofcontents
-\selectColors{linkColor=webgreen}
-
-\section{Introduction}
-
-This package is an implementation of the \textbf{FitR} view-type
-destination. The \textsl{PDF Reference} describes \textbf{FitR} as,
-\begin{quote}
- Display the page designated by page, with its contents
- magnified just enough to fit the rectangle specified by the
- coordinates \textsl{left}, \textsl{bottom}, \textsl{right},
- 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
-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.
-
-\section{The Preamble and Package Options}
-
-The minimal preamble for this package is
-\begin{Verbatim}[xleftmargin=20pt,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}
-The \cs{collectbox} command is used to collect the second argument of
-\cs{jdRect}, see the discussion of \cs{jdRect} in 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.
-
-%\previewtrue
-
-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}
-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}.
-
-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}
-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,
-but \texttt{shift} and \texttt{lift} are obeyed (though you may
-\texttt{shift} or \texttt{lift} the button/view window away from the
-content).
-
-Before illustrating the \cs{jdRect} command, we first discuss its
-key-value pairs.
-\begin{itemize}
-\item \texttt{lift=\meta{length}}: This key-value lifts (raises) the
- button/viewing window up (or down); for example,
- \texttt{lift=15pt} (or \texttt{lift=-15pt}). The default is a lift
- of \texttt{0pt}. See \autoref{displayEqEx} on page~\pageref*{displayEqEx}.
-
-\item \texttt{shift=\meta{length}}: The amount of horizontal shift;
- positive to the right, negative to the left. For example,
- \texttt{shift=-1in} shifts the button/viewing window 1 inch to the
- left. The default is \texttt{0pt}. See
- \autoref{displayEqEx} on page~\pageref*{displayEqEx}.
-
-\item \texttt{width=\meta{length}}: When using \cs{jdRect}---as
- opposed to \cs{jdRect*}---, the width of the button and viewing
- window is determined by the \texttt{width} key. For example
- \texttt{width=1in} creates a button/viewing window that is 1 inch
- wide. The value of this key is ignored when the \texttt{*} form of
- the \cs{jdRect} is used. The default value is \texttt{0pt}. This
- key is required when \texttt{*} is not present. See
- \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
- the button/viewing window. The default is 0pt. It is required when
- \texttt{*} is not present. See \autoref{displayEqEx} on
- page~\pageref*{displayEqEx}.
-
-\item \texttt{ref=t|c|b}: The \texttt{ref} key-value pair determines
- the reference point of the button/viewing window. Permissible
- values are \texttt{t} top (the default), \texttt{c} center, and
- \texttt{b} bottom. This key is only obeyed with the \cs{jdRect*}
- form of the command; otherwise, a reference point of \texttt{b} is
- used.
-
-\item \texttt{adddestw=\meta{length}}: The default is for the viewing window to have
-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}.
-
-\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}.
-\begin{figure}[htb]
-\begin{center}\setlength\fboxsep{0pt}
- \fbox{\parbox[c][.9in]{2.4in}
- {\vfill\hfil\fbox{\parbox[c][.5in]{2in}{\hfill\vfill}}\hfil\vfill}}\\[4pt]
- \caption{Button and Viewing Window}\label{bvw}
- {\small\texttt{width=2in,height=.5in,adddestw=.2in,adddesth=.2in}}
-\end{center}
-\end{figure}
-
-\item \texttt{button=true|false}: \texttt{button} is a Boolean switch.
- If \texttt{true} (the default), \cs{jdRect} creates a push button.
- When the user pushes the button, the viewer zooms in to the view
- 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.)
-
-
-\item \texttt{link=jmp|restore} If \texttt{link} has a value, then
- {\fitrpkg} puts \texttt{button=false}. The \texttt{link} key is
- used to create jumps or restore actions to or from a viewing
- window. When \texttt{link=jmp} a jump action is created, the jump
- will be to the value of the \texttt{dest} key. If this is a pure
- link that jumps to another viewing window, then use the
- \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\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\\
-\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]
-\jdRect*[nodest,link=jmp,dest=rungePic,
-adddestw=10bp,adddesth=10bp]{Carl Runge}
-\end{Verbatim}
-The important options are \texttt{nodest,link=jmp,dest=rungePic};
-no (named) viewing window is created, we want to create a jump link here,
-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]
-\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}
-\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}}}}
-\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
-import the picture. The important options are
-\texttt{link=restore,dest=rungePic}, this first key-value pair causes
-\cs{jdRect} to create a restore link, the second one says to create a
-viewing window with a name of \texttt{rungePic}, this is the
-destination the Carl Runge link jumps to.
-
-
-\item \texttt{nodest}: A Boolean switch whose default value is
- \texttt{false}. When \texttt{nodest} is used (making the switch a
- value of \texttt{true}), no viewing window is created.
-
-\item \texttt{dest=\meta{name}}: This key is a way of explicitly naming the
- viewing window (the destination). The destination is normally
- automatically generated when \texttt{button=true}, this key is
- used with the \texttt{link} key, as illustrated above.
-\item \texttt{allowFX}: A Boolean switch (of sorts). The \texttt{fitr}
- 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
- 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 $}
-\end{itemize}
-
-\section{Some Examples}
-
-\everymath{\displaystyle}
-
-In this section, several examples are presented that illustrate the
-options of \cs{jdRect}.
-
-\begin{example}\label{previewEx}\previewtrue\viewMagWintrue
-\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}
-(\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
-\end{example}
-
-\begin{example}\label{displayEqEx}
-\textbf{Display Math.} Displayed math presents a problem. We take the
-following set of equations to illustrate.
-
-Suppose we want to classify third order \textsf{Runge-Kutta} type methods.
-Start with
-\begin{align*}
-\jdRect[height=1.3in,width=2.6in,lift=16pt,shift=-15pt,
- adddestw=10bp,adddesth=10bp]
-K_1 &= hf(t_n, y_n)\\
-K_2 &= hf(t_n +r h, y_n+aK_1)\\
-K_3 &= hf(t_n +s h, y_n+bK_1+cK_2)\\
-K &= w_1 K_1+ w_2 K_2+ w_3 K_3\\
-y_{n+1} &= y_n+K
-\end{align*}
-Find the system of equations satisfied by
-\jdRect*[adddestw=10,adddesth=10]{$r,s, a, b, c, w_1, w_2, w_3$}
-that will make the above algorithm a third order method.
-
-The verbatim listing of this set of aligned equations is
-\begin{Verbatim}[xleftmargin=20pt,numbers=left]
-\begin{align*}
-\jdRect[height=1.3in,width=2.6in,lift=16pt,shift=-15pt,
- adddestw=10bp,adddesth=10bp]
-K_1 &= hf(t_n, y_n)\\
-K_2 &= hf(t_n +r h, y_n+aK_1)\\
-K_3 &= hf(t_n +s h, y_n+bK_1+cK_2)\\
-K &= w_1 K_1+ w_2 K_2+ w_3 K_3\\
-y_{n+1} &= y_n+K
-\end{align*}
-\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
-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
-\texttt{preview} and \texttt{viewMagWin} options were in effect. Below are
-the same equations with \cs{previewtrue} and \cs{viewMagWintrue}, locally
-invoked:\previewtrue\viewMagWintrue
-\begin{align*}
-\jdRect[height=1.3in,width=2.6in,lift=16pt,shift=-15pt,
- adddestw=10bp,adddesth=10bp]
-K_1 &= hf(t_n, y_n)\\
-K_2 &= hf(t_n +r h, y_n+aK_1)\\
-K_3 &= hf(t_n +s h, y_n+bK_1+cK_2)\\
-K &= w_1 K_1+ w_2 K_2+ w_3 K_3\\
-y_{n+1} &= y_n+K
-\end{align*}
-The preview rectangles do not take up any {\TeX} space, so they overlap
-parts of the paragraph content. When you zoom in, you'll see part of the
-part of the word ``invoked:'', as seen in the upper-left corner, at least
-according to the viewing window preview. Is it so?
-
-After you've set the position of the rectangles, and after all changes
-have been made to the underlying content, you don't need the preview
-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]
-\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
-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
-(\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}!}
-This last button has code,
-\begin{Verbatim}[xleftmargin=20pt]
-\jdRect*[adddestw=10bp,adddesth=10bp]%
- {\textcolor{blue}{D. P. Story}!}
-\end{Verbatim}
-As the changes to the preset appearance are inside a group, after this
-example (environment)) \cs{overlayPresets} will revert to its definition
-that was in effect outside the example.\fitit
-\end{example}
-
-\section{Special Effects}
-
-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
-\begin{itemize}
- \item \texttt{overlayJmpHook()} 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
- 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.
-\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!}
-\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}
-\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}
-
-Now, I simply must get back to my retirement. \dps
-
-\end{document}
diff --git a/macros/latex/contrib/fitr/docs/fitr.pdf b/macros/latex/contrib/fitr/docs/fitr.pdf
new file mode 100644
index 0000000000..dce6c11f37
--- /dev/null
+++ b/macros/latex/contrib/fitr/docs/fitr.pdf
Binary files differ
diff --git a/macros/latex/contrib/fitr/docs/fitr_man.pdf b/macros/latex/contrib/fitr/docs/fitr_man.pdf
new file mode 100644
index 0000000000..7c851822ec
--- /dev/null
+++ b/macros/latex/contrib/fitr/docs/fitr_man.pdf
Binary files differ
diff --git a/macros/latex/contrib/fitr/docs/fitr_man.tex b/macros/latex/contrib/fitr/docs/fitr_man.tex
new file mode 100644
index 0000000000..d0898ac60d
--- /dev/null
+++ b/macros/latex/contrib/fitr/docs/fitr_man.tex
@@ -0,0 +1,721 @@
+\documentclass{article}
+\usepackage[fleqn]{amsmath}
+\usepackage[
+ web={centertitlepage,designv,forcolorpaper,
+ latextoc,pro}, %tight,
+ eforms,aebxmp
+]{aeb_pro}
+\usepackage[fortextbook,usecustomdesign,nomarginwrite]{eqexam}
+\usepackage{graphicx,array}
+\usepackage[blink,!preview,!viewMagWin]{fitr}
+
+%\usepackage{myriadpro}
+\usepackage[altbullet]{lucidbry}
+
+
+\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
+
+
+\urlstyle{rm}
+\def\fitrpkg{\textsf{f{i}tr}}
+\let\texorpdfstring\tops
+
+\DeclareDocInfo
+{
+ university={\AcroTeX.Net},
+ 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.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$}}$}
+
+\universityLayout{fontsize=Large}
+\titleLayout{fontsize=LARGE}
+\authorLayout{fontsize=Large}
+\tocLayout{fontsize=Large,color=aeb}
+\sectionLayout{indent=-62.5pt,fontsize=large,color=aeb}
+\subsectionLayout{indent=-31.25pt,color=aeb}
+\subsubsectionLayout{indent=0pt,color=aeb}
+\subsubDefaultDing{\tops{$\bullet$}{\textrm\textbullet}}
+
+%\pagestyle{empty}
+
+
+%\definePath\bgPath{"C:/Users/Public/Documents/%
+% ManualBGs/Manual_BG_Print_AeB.pdf"}
+\chngDocObjectTo{\newDO}{doc}
+\begin{docassembly}
+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}
+\tableofcontents
+\selectColors{linkColor=webgreen}
+
+\section{Introduction}
+
+This package is an implementation of the \textbf{FitR} view-type
+destination. The \textsl{PDF Reference} describes \textbf{FitR} as,
+\begin{quote}
+ Display the page designated by page, with its contents
+ magnified just enough to fit the rectangle specified by the
+ coordinates \textsl{left}, \textsl{bottom}, \textsl{right},
+ and \textsl{top} entirely within the
+ window both horizontally and vertically.
+\end{quote}
+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}.}
+
+\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=\amtIndent,commandchars=!()]
+\usepackage[!meta(driver),!meta(options)]{fitr}
+\end{Verbatim}
+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 \hyperref[jdRect]{Section~\ref*{jdRect}}.
+As a result, the second argument may contain verbatim text in it. Very cool.
+
+\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.
+\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:
+\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,
+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}
+\item \texttt{lift=\meta{length}}: This key-value lifts (raises) the
+ button/viewing window up (or down); for example,
+ \texttt{lift=15pt} (or \texttt{lift=-15pt}). The default is a lift
+ of \texttt{0pt}. See \autoref{displayEqEx} on page~\pageref*{displayEqEx}.
+
+\item \texttt{shift=\meta{length}}: The amount of horizontal shift;
+ positive to the right, negative to the left. For example,
+ \texttt{shift=-1in} shifts the button/viewing window 1 inch to the
+ left. The default is \texttt{0pt}. See
+ \autoref{displayEqEx} on page~\pageref*{displayEqEx}.
+
+\item \texttt{width=\meta{length}}: When using \cs{jdRect}---as
+ opposed to \cs{jdRect*}---, the width of the button and viewing
+ window is determined by the \texttt{width} key. For example
+ \texttt{width=1in} creates a button/viewing window that is 1 inch
+ wide. The value of this key is ignored when the \texttt{*} form of
+ the \cs{jdRect} is used. The default value is \texttt{0pt}. This
+ key is required when \texttt{*} is not present. See
+ \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 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}.
+
+\item \texttt{ref=t|c|b}: The \texttt{ref} key-value pair determines
+ the reference point of the button/viewing window. Permissible
+ values are \texttt{t} top (the default), \texttt{c} center, and
+ \texttt{b} bottom. This key is only obeyed with the \cs{jdRect*}
+ form of the command; otherwise, a reference point of \texttt{b} is
+ used.
+
+\item \texttt{adddestw=\meta{length}}: The default is for the viewing window to have
+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 \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 \hyperref[bvw]{Figure~\ref*{bvw}} below.
+\begin{figure}[htb]
+\begin{center}\setlength\fboxsep{0pt}
+ \fbox{\parbox[c][.9in]{2.4in}
+ {\vfill\hfil\fbox{\parbox[c][.5in]{2in}{\hfill\vfill}}\hfil\vfill}}\\[4pt]
+ \caption{Button and Viewing Window}\label{bvw}
+ {\small\texttt{width=2in,height=.5in,adddestw=.2in,adddesth=.2in}}
+\end{center}
+\end{figure}
+
+\item \texttt{button=true|false}: \texttt{button} is a Boolean switch.
+ If \texttt{true} (the default), \cs{jdRect} creates a push button.
+ When the user pushes the button, the viewer zooms in to the view
+ 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 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
+ {\fitrpkg} puts \texttt{button=false}. The \texttt{link} key is
+ used to create jumps or restore actions to or from a viewing
+ window. When \texttt{link=jmp} a jump action is created, the jump
+ will be to the value of the \texttt{dest} key. If this is a pure
+ link that jumps to another viewing window, then use the
+ \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=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{\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=\amtIndent]
+\jdRect*[nodest,link=jmp,dest=rungePic,
+adddestw=10bp,adddesth=10bp]{Carl Runge}
+\end{Verbatim}
+The important options are \texttt{nodest,link=jmp,dest=rungePic};
+no (named) viewing window is created, we want to create a jump link here,
+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=\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=\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=\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
+import the picture. The important options are
+\texttt{link=restore,dest=rungePic}, this first key-value pair causes
+\cs{jdRect} to create a restore link, the second one says to create a
+viewing window with a name of \texttt{rungePic}, this is the
+destination the Carl Runge link jumps to.
+
+
+\item \texttt{nodest}: A Boolean switch whose default value is
+ \texttt{false}. When \texttt{nodest} is used (making the switch a
+ value of \texttt{true}), no viewing window is created.
+
+\item \texttt{dest=\meta{name}}: This key is a way of explicitly naming the
+ viewing window (the destination). The destination is normally
+ automatically generated when \texttt{button=true}, this key is
+ used with the \texttt{link} key, as illustrated above.
+\item \texttt{allowFX}: A Boolean switch (of sorts). The \texttt{fitr}
+ 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.
+
+\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 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}\previewOn\viewMagWinOn
+\textbf{Illustrate Preview Rectangles.} The \texttt{preview} and
+\texttt{viewMagWin} options just set Boolean switches. In this example, we
+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, 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}
+\textbf{Display Math.} Displayed math presents a problem. We take the
+following set of equations to illustrate.
+
+Suppose we want to classify third order \textsf{Runge-Kutta} type methods.
+Start with
+\begin{align*}
+\jdRect[height=1.3in,width=2.6in,lift=16pt,shift=-15pt,
+ adddestw=10bp,adddesth=10bp]
+K_1 &= hf(t_n, y_n)\\
+K_2 &= hf(t_n +r h, y_n+aK_1)\\
+K_3 &= hf(t_n +s h, y_n+bK_1+cK_2)\\
+K &= w_1 K_1+ w_2 K_2+ w_3 K_3\\
+y_{n+1} &= y_n+K
+\end{align*}
+Find the system of equations satisfied by
+\jdRect*[adddestw=10,adddesth=10]{$r,s, a, b, c, w_1, w_2, w_3$}
+that will make the above algorithm a third order method.
+
+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]
+K_1 &= hf(t_n, y_n)\\
+K_2 &= hf(t_n +r h, y_n+aK_1)\\
+K_3 &= hf(t_n +s h, y_n+bK_1+cK_2)\\
+K &= w_1 K_1+ w_2 K_2+ w_3 K_3\\
+y_{n+1} &= y_n+K
+\end{align*}
+\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
+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
+\texttt{preview} and \texttt{viewMagWin} options were in effect. Below are
+the same equations with \cs{previewtrue} and \cs{viewMagWintrue}, locally
+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]
+K_1 &= hf(t_n, y_n)\\
+K_2 &= hf(t_n +r h, y_n+aK_1)\\
+K_3 &= hf(t_n +s h, y_n+bK_1+cK_2)\\
+K &= w_1 K_1+ w_2 K_2+ w_3 K_3\\
+y_{n+1} &= y_n+K
+\end{align*}
+The preview rectangles do not take up any {\TeX} space, so they overlap
+parts of the paragraph content. When you zoom in, you'll see part of the
+part of the word ``invoked:'', as seen in the upper-left corner, at least
+according to the viewing window preview. Is it so?
+
+After you've set the position of the rectangles, and after all changes
+have been made to the underlying content, you don't need the preview
+modes.\fitit
+\end{example}
+
+\begin{example}\label{CustomAppr}
+\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}}%
+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}~),
+\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*[allowFX,adddestw=10bp,adddesth=10bp]{\textcolor{blue}{D. P. Story}!}
+This last button has code,
+\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
+example (environment)) \cs{overlayPresets} will revert to its definition
+that was in effect outside the example.\fitit
+\end{example}
+
+\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 it jumps to, there are two JavaScript
+``hooks'' that can be exploited. These are document author defined.
+\begin{itemize}
+ \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{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.
+\end{itemize}
+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}
+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}
+
+\newtopic\noindent
+Now, I simply must get back to my retirement. \dps
+
+\end{document}
diff --git a/macros/latex/contrib/fitr/examples/Kutta.eps b/macros/latex/contrib/fitr/examples/Kutta.eps
deleted file mode 100644
index 8ad5349e64..0000000000
--- a/macros/latex/contrib/fitr/examples/Kutta.eps
+++ /dev/null
Binary files differ
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
index 9e43557892..85c26453a5 100644
--- a/macros/latex/contrib/fitr/examples/fitr_demo.pdf
+++ b/macros/latex/contrib/fitr/examples/fitr_demo.pdf
Binary files differ
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
new file mode 100644
index 0000000000..94a31192f2
--- /dev/null
+++ b/macros/latex/contrib/fitr/examples/graphics/Kutta.eps
Binary files differ
diff --git a/macros/latex/contrib/fitr/examples/Kutta.jpeg b/macros/latex/contrib/fitr/examples/graphics/Kutta.jpeg
index d847cb2a7e..d847cb2a7e 100644
--- a/macros/latex/contrib/fitr/examples/Kutta.jpeg
+++ b/macros/latex/contrib/fitr/examples/graphics/Kutta.jpeg
Binary files differ
diff --git a/macros/latex/contrib/fitr/examples/Kutta.pdf b/macros/latex/contrib/fitr/examples/graphics/Kutta.pdf
index e737d265d0..e737d265d0 100644
--- a/macros/latex/contrib/fitr/examples/Kutta.pdf
+++ b/macros/latex/contrib/fitr/examples/graphics/Kutta.pdf
Binary files differ
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
index 283816eabd..283816eabd 100644
--- a/macros/latex/contrib/fitr/examples/runge.eps
+++ b/macros/latex/contrib/fitr/examples/graphics/runge.eps
Binary files differ
diff --git a/macros/latex/contrib/fitr/examples/runge.jpg b/macros/latex/contrib/fitr/examples/graphics/runge.jpg
index db05c74bf0..db05c74bf0 100644
--- a/macros/latex/contrib/fitr/examples/runge.jpg
+++ b/macros/latex/contrib/fitr/examples/graphics/runge.jpg
Binary files differ
diff --git a/macros/latex/contrib/fitr/examples/runge.pdf b/macros/latex/contrib/fitr/examples/graphics/runge.pdf
index 85ee459f91..85ee459f91 100644
--- a/macros/latex/contrib/fitr/examples/runge.pdf
+++ b/macros/latex/contrib/fitr/examples/graphics/runge.pdf
Binary files differ
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
-
diff --git a/macros/latex/contrib/fitr/fitr.dtx b/macros/latex/contrib/fitr/fitr.dtx
index eabd27e925..68045cdd77 100644
--- a/macros/latex/contrib/fitr/fitr.dtx
+++ b/macros/latex/contrib/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/macros/latex/contrib/thuthesis/CHANGELOG.md b/macros/latex/contrib/thuthesis/CHANGELOG.md
index 4ccfabe39f..336c697e0a 100644
--- a/macros/latex/contrib/thuthesis/CHANGELOG.md
+++ b/macros/latex/contrib/thuthesis/CHANGELOG.md
@@ -6,6 +6,18 @@
## [Unreleased]
+## [v6.1.3] - 2020-07-09
+### Added
+- 新增选项 `statement-page-style = empty / plain` 同时控制声明的页眉和页脚。
+
+### Fixed
+- `\record` 命令中,如果 `output` 配置为 `print`,则强制进行 `\cleardoublepage`,保证记录表独立成页。
+- 修正了在导言区设置论文主要语言无效的问题(#560)。
+- 修正了研究生插入扫描版声明页时的页眉。
+
+### Deprecated
+- 选项 `statement-page-number` 已过时。
+
## [v6.1.2] - 2020-06-14
### Changed
- `\statement` 和 `\copyrightpage` 命令都会在 PDF 中生成相应位置的书签。
@@ -593,7 +605,8 @@
-[Unreleased]: https://github.com/tuna/thuthesis/compare/v6.1.2...HEAD
+[Unreleased]: https://github.com/tuna/thuthesis/compare/v6.1.3...HEAD
+[v6.1.3]: https://github.com/tuna/thuthesis/compare/v6.1.2...v6.1.3
[v6.1.2]: https://github.com/tuna/thuthesis/compare/v6.1.1...v6.1.2
[v6.1.1]: https://github.com/tuna/thuthesis/compare/v6.1.0...v6.1.1
[v6.1.0]: https://github.com/tuna/thuthesis/compare/v6.0.2...v6.1.0
diff --git a/macros/latex/contrib/thuthesis/data/appendix-survey.tex b/macros/latex/contrib/thuthesis/data/appendix-survey.tex
index 5b6e24a896..a3c5ef6205 100644
--- a/macros/latex/contrib/thuthesis/data/appendix-survey.tex
+++ b/macros/latex/contrib/thuthesis/data/appendix-survey.tex
@@ -32,14 +32,13 @@ as follows,
which maximizes a real-valued function $f$ of
$x=(x_1,x_2,\cdots,x_n)$ subject to a set of constraints.
-\newcommand\Real{\mathbf{R}}
\newtheorem{mpdef}{Definition}[chapter]
\begin{mpdef}
In SOP, we call $x$ a decision vector, and
$x_1,x_2,\cdots,x_n$ decision variables. The function
$f$ is called the objective function. The set
\begin{equation*}
-S=\left\{x\in\Real^n\bigm|g_j(x)\le 0,\,j=1,2,\cdots,p\right\}
+S=\left\{x\in\real^n\bigm|g_j(x)\le 0,\,j=1,2,\cdots,p\right\}
\end{equation*}
is called the feasible set. An element $x$ in $S$ is called a
feasible solution.
@@ -134,8 +133,8 @@ concerned with analyzing the structure of problems.
\end{figure}
Now we consider a nonlinear programming which is confronted solely with
-maximizing a real-valued function with domain $\Real^n$. Whether derivatives are
-available or not, the usual strategy is first to select a point in $\Real^n$ which
+maximizing a real-valued function with domain $\real^n$. Whether derivatives are
+available or not, the usual strategy is first to select a point in $\real^n$ which
is thought to be the most likely place where the maximum exists. If there is no
information available on which to base such a selection, a point is chosen at
random. From this first point an attempt is made to construct a sequence of
diff --git a/macros/latex/contrib/thuthesis/data/chap01.tex b/macros/latex/contrib/thuthesis/data/chap01.tex
index 6c2e757db2..2dfbcf4ec0 100644
--- a/macros/latex/contrib/thuthesis/data/chap01.tex
+++ b/macros/latex/contrib/thuthesis/data/chap01.tex
@@ -58,10 +58,9 @@
\subsection{基本表格}
\label{sec:basictable}
-模板中关于表格的宏包有三个:\pkg{booktabs}、\pkg{array} 和 \pkg{longtable},命
-令有一个 \cs{hlinewd}。三线表可以用 \pkg{booktabs} 提供
-的 \cs{toprule}、\cs{midrule} 和 \cs{bottomrule}。它们与 \pkg{longtable} 能很好的
-配合使用。如果表格比较简单的话可以直接用命令 \cs{hlinewd}\marg{width} 控制。
+模板中关于表格的宏包有三个:\pkg{booktabs}、\pkg{array} 和 \pkg{longtable}。
+三线表可以用 \pkg{booktabs} 提供 的 \cs{toprule}、\cs{midrule} 和 \cs{bottomrule}。
+它们与 \pkg{longtable} 能很好的配合使用。
\begin{table}[htb]
\centering
\begin{threeparttable}[b]
@@ -105,7 +104,7 @@
\begin{minipage}[t]{0.8\textwidth}
\begin{tabularx}{\linewidth}{|l|X|X|X|X|}
\hline
- \multirow{2}*{\diagbox[width=5em]{x}{y}} & \multicolumn{2}{c|}{First Half} & \multicolumn{2}{c|}{Second Half}\\\cline{2-5}
+ \multirow{2}*{} & \multicolumn{2}{c|}{First Half} & \multicolumn{2}{c|}{Second Half}\\\cline{2-5}
& 1st Qtr &2nd Qtr&3rd Qtr&4th Qtr \\ \hline
East$^{*}$ & 20.4& 27.4& 90& 20.4 \\
West$^{**}$ & 30.6 & 38.6 & 34.6 & 31.6 \\ \hline
@@ -116,9 +115,8 @@
\end{minipage}
\end{table}
-此外,表~\ref{tab:tabexamp1} 同时还演示了另外两个功能:1)通过 \pkg{tabularx} 的
- \texttt{|X|} 扩展实现表格自动放大;2)通过命令 \cs{diagbox} 在表头部分
-插入反斜线。
+此外,表~\ref{tab:tabexamp1} 同时还演示了通过 \pkg{tabularx} 的
+ \texttt{|X|} 扩展实现表格自动放大功能。
为了使我们的例子更接近实际情况,我会在必要的时候插入一些“无关”文字,以免太多图
表同时出现,导致排版效果不太理想。第一个出场的当然是我的最爱:风流潇洒、骏马绝尘、
@@ -405,7 +403,6 @@ x&\equiv y+1\pod{m^2}
乾,反复道也。或跃在渊,进无咎也。飞龙在天,大人造也。亢龙有悔,盈不可久也。用九,
天德不可为首也。   
-\newcommand\dif{\mathop{}\!\mathrm{d}}
\begin{lemma}
《猫和老鼠》是我最爱看的动画片。
\begin{multline*}%\tag*{[a]} % 这个不出现在索引中
@@ -540,9 +537,8 @@ p(y|\vx) = \frac{p(\vx,y)}{p(\vx)}=
\end{equation}
论文里面公式越多,\TeX{} 就越 happy。再看一个 \pkg{amsmath} 的例子:
-\newcommand{\envert}[1]{\left\lvert#1\right\rvert}
\begin{equation}\label{detK2}
-\det\mK(t=1,t_1,\dots,t_n)=\sum_{I\in\vn}(-1)^{\envert{I}}
+\det\mK(t=1,t_1,\dots,t_n)=\sum_{I\in\vn}(-1)^{\abs{I}}
\prod_{i\in I}t_i\prod_{j\in I}(D_j+\lambda_jt_j)\det\mA
^{(\lambda)}(\overline{I}|\overline{I})=0.
\end{equation}
diff --git a/macros/latex/contrib/thuthesis/math_commands.tex b/macros/latex/contrib/thuthesis/math_commands.tex
deleted file mode 100644
index e3636b612a..0000000000
--- a/macros/latex/contrib/thuthesis/math_commands.tex
+++ /dev/null
@@ -1,292 +0,0 @@
-% !TeX root = ./thuthesis-example.tex
-
-% Adapted for use with thuthesis.
-% Original code is at https://github.com/goodfeli/dlbook_notation/blob/master/math_commands.tex
-
-%%%%% NEW MATH DEFINITIONS %%%%%
-
-\newcommand\ceil[1]{\lceil #1 \rceil}
-\newcommand\floor[1]{\lfloor #1 \rfloor}
-
-
-% Vectors
-\newcommand\Vector[1]{\symbf{#1}}
-
-\newcommand\0{{\Vector{0}}}
-\newcommand\vzero{{\Vector{0}}}
-\newcommand\1{{\Vector{1}}}
-\newcommand\vone{{\Vector{1}}}
-
-\newcommand\va{{\Vector{a}}}
-\newcommand\vb{{\Vector{b}}}
-\newcommand\vc{{\Vector{c}}}
-\newcommand\vd{{\Vector{d}}}
-\newcommand\ve{{\Vector{e}}}
-\newcommand\vf{{\Vector{f}}}
-\newcommand\vg{{\Vector{g}}}
-\newcommand\vh{{\Vector{h}}}
-\newcommand\vi{{\Vector{i}}}
-\newcommand\vj{{\Vector{j}}}
-\newcommand\vk{{\Vector{k}}}
-\newcommand\vl{{\Vector{l}}}
-\newcommand\vm{{\Vector{m}}}
-\newcommand\vn{{\Vector{n}}}
-\newcommand\vo{{\Vector{o}}}
-\newcommand\vp{{\Vector{p}}}
-\newcommand\vq{{\Vector{q}}}
-\newcommand\vr{{\Vector{r}}}
-\newcommand\vs{{\Vector{s}}}
-\newcommand\vt{{\Vector{t}}}
-\newcommand\vu{{\Vector{u}}}
-\newcommand\vv{{\Vector{v}}}
-\newcommand\vw{{\Vector{w}}}
-\newcommand\vx{{\Vector{x}}}
-\newcommand\vy{{\Vector{y}}}
-\newcommand\vz{{\Vector{z}}}
-
-\newcommand\valpha{{\Vector{\alpha}}}
-\newcommand\vbeta{{\Vector{\beta}}}
-\newcommand\vgamma{{\Vector{\gamma}}}
-\newcommand\vdelta{{\Vector{\delta}}}
-\newcommand\vepsilon{{\Vector{\epsilon}}}
-\newcommand\vtheta{{\Vector{\theta}}}
-\newcommand\viota{{\Vector{\iota}}}
-\newcommand\vkappa{{\Vector{\kappa}}}
-\newcommand\vlambda{{\Vector{\lambda}}}
-\newcommand\vmu{{\Vector{\mu}}}
-\newcommand\vnu{{\Vector{\nu}}}
-\newcommand\vxi{{\Vector{\xi}}}
-\newcommand\vpi{{\Vector{\pi}}}
-\newcommand\vrho{{\Vector{\rho}}}
-\newcommand\vsigma{{\Vector{\sigma}}}
-\newcommand\vtau{{\Vector{\tau}}}
-\newcommand\vupsilon{{\Vector{\upsilon}}}
-\newcommand\vphi{{\Vector{\phi}}}
-\newcommand\vchi{{\Vector{\chi}}}
-\newcommand\vpsi{{\Vector{\psi}}}
-\newcommand\vomega{{\Vector{\omega}}}
-
-
-% Matrix
-\newcommand\MATRIX[1]{\symbf{#1}}
-
-\newcommand\mA{{\MATRIX{A}}}
-\newcommand\mB{{\MATRIX{B}}}
-\newcommand\mC{{\MATRIX{C}}}
-\newcommand\mD{{\MATRIX{D}}}
-\newcommand\mE{{\MATRIX{E}}}
-\newcommand\mF{{\MATRIX{F}}}
-\newcommand\mG{{\MATRIX{G}}}
-\newcommand\mH{{\MATRIX{H}}}
-\newcommand\mI{{\MATRIX{I}}}
-\newcommand\mJ{{\MATRIX{J}}}
-\newcommand\mK{{\MATRIX{K}}}
-\newcommand\mL{{\MATRIX{L}}}
-\newcommand\mM{{\MATRIX{M}}}
-\newcommand\mN{{\MATRIX{N}}}
-\newcommand\mO{{\MATRIX{O}}}
-\newcommand\mP{{\MATRIX{P}}}
-\newcommand\mQ{{\MATRIX{Q}}}
-\newcommand\mR{{\MATRIX{R}}}
-\newcommand\mS{{\MATRIX{S}}}
-\newcommand\mT{{\MATRIX{T}}}
-\newcommand\mU{{\MATRIX{U}}}
-\newcommand\mV{{\MATRIX{V}}}
-\newcommand\mW{{\MATRIX{W}}}
-\newcommand\mX{{\MATRIX{X}}}
-\newcommand\mY{{\MATRIX{Y}}}
-\newcommand\mZ{{\MATRIX{Z}}}
-
-\newcommand\mGamma{{\MATRIX{\Gamma}}}
-\newcommand\mDelta{{\MATRIX{\Delta}}}
-\newcommand\mTheta{{\MATRIX{\Theta}}}
-\newcommand\mLambda{{\MATRIX{\Lambda}}}
-\newcommand\mXi{{\MATRIX{\Xi}}}
-\newcommand\mPi{{\MATRIX{\Pi}}}
-\newcommand\mSigma{{\MATRIX{\Sigma}}}
-\newcommand\mUpsilon{{\MATRIX{\Upsilon}}}
-\newcommand\mPhi{{\MATRIX{\Phi}}}
-\newcommand\mPsi{{\MATRIX{\Psi}}}
-\newcommand\mOmega{{\MATRIX{\Omega}}}
-
-
-% Tensor
-\newcommand\tens[1]{\symbfsf{#1}}
-\newcommand\tA{{\tens{A}}}
-\newcommand\tB{{\tens{B}}}
-\newcommand\tC{{\tens{C}}}
-\newcommand\tD{{\tens{D}}}
-\newcommand\tE{{\tens{E}}}
-\newcommand\tF{{\tens{F}}}
-\newcommand\tG{{\tens{G}}}
-\newcommand\tH{{\tens{H}}}
-\newcommand\tI{{\tens{I}}}
-\newcommand\tJ{{\tens{J}}}
-\newcommand\tK{{\tens{K}}}
-\newcommand\tL{{\tens{L}}}
-\newcommand\tM{{\tens{M}}}
-\newcommand\tN{{\tens{N}}}
-\newcommand\tO{{\tens{O}}}
-\newcommand\tP{{\tens{P}}}
-\newcommand\tQ{{\tens{Q}}}
-\newcommand\tR{{\tens{R}}}
-\newcommand\tS{{\tens{S}}}
-\newcommand\tT{{\tens{T}}}
-\newcommand\tU{{\tens{U}}}
-\newcommand\tV{{\tens{V}}}
-\newcommand\tW{{\tens{W}}}
-\newcommand\tX{{\tens{X}}}
-\newcommand\tY{{\tens{Y}}}
-\newcommand\tZ{{\tens{Z}}}
-
-
-% Graph
-\newcommand\gA{{\mathcal{A}}}
-\newcommand\gB{{\mathcal{B}}}
-\newcommand\gC{{\mathcal{C}}}
-\newcommand\gD{{\mathcal{D}}}
-\newcommand\gE{{\mathcal{E}}}
-\newcommand\gF{{\mathcal{F}}}
-\newcommand\gG{{\mathcal{G}}}
-\newcommand\gH{{\mathcal{H}}}
-\newcommand\gI{{\mathcal{I}}}
-\newcommand\gJ{{\mathcal{J}}}
-\newcommand\gK{{\mathcal{K}}}
-\newcommand\gL{{\mathcal{L}}}
-\newcommand\gM{{\mathcal{M}}}
-\newcommand\gN{{\mathcal{N}}}
-\newcommand\gO{{\mathcal{O}}}
-\newcommand\gP{{\mathcal{P}}}
-\newcommand\gQ{{\mathcal{Q}}}
-\newcommand\gR{{\mathcal{R}}}
-\newcommand\gS{{\mathcal{S}}}
-\newcommand\gT{{\mathcal{T}}}
-\newcommand\gU{{\mathcal{U}}}
-\newcommand\gV{{\mathcal{V}}}
-\newcommand\gW{{\mathcal{W}}}
-\newcommand\gX{{\mathcal{X}}}
-\newcommand\gY{{\mathcal{Y}}}
-\newcommand\gZ{{\mathcal{Z}}}
-
-
-% Sets
-\newcommand\sA{{\mathbb{A}}}
-\newcommand\sB{{\mathbb{B}}}
-\newcommand\sC{{\mathbb{C}}}
-\newcommand\sD{{\mathbb{D}}}
-% Don't use a set called E, because this would be the same as our symbol
-% for expectation.
-\newcommand\sF{{\mathbb{F}}}
-\newcommand\sG{{\mathbb{G}}}
-\newcommand\sH{{\mathbb{H}}}
-\newcommand\sI{{\mathbb{I}}}
-\newcommand\sJ{{\mathbb{J}}}
-\newcommand\sK{{\mathbb{K}}}
-\newcommand\sL{{\mathbb{L}}}
-\newcommand\sM{{\mathbb{M}}}
-\newcommand\sN{{\mathbb{N}}}
-\newcommand\sO{{\mathbb{O}}}
-\newcommand\sP{{\mathbb{P}}}
-\newcommand\sQ{{\mathbb{Q}}}
-\newcommand\sR{{\mathbb{R}}}
-\newcommand\sS{{\mathbb{S}}}
-\newcommand\sT{{\mathbb{T}}}
-\newcommand\sU{{\mathbb{U}}}
-\newcommand\sV{{\mathbb{V}}}
-\newcommand\sW{{\mathbb{W}}}
-\newcommand\sX{{\mathbb{X}}}
-\newcommand\sY{{\mathbb{Y}}}
-\newcommand\sZ{{\mathbb{Z}}}
-
-
-% Random variables
-\newcommand\RandomVariable[1]{\symit{#1}}
-
-\newcommand\rA{{\RandomVariable{A}}}
-\newcommand\rB{{\RandomVariable{B}}}
-\newcommand\rC{{\RandomVariable{C}}}
-\newcommand\rD{{\RandomVariable{D}}}
-\newcommand\rE{{\RandomVariable{E}}}
-\newcommand\rF{{\RandomVariable{F}}}
-\newcommand\rG{{\RandomVariable{G}}}
-\newcommand\rH{{\RandomVariable{H}}}
-\newcommand\rI{{\RandomVariable{I}}}
-\newcommand\rJ{{\RandomVariable{J}}}
-\newcommand\rK{{\RandomVariable{K}}}
-\newcommand\rL{{\RandomVariable{L}}}
-\newcommand\rM{{\RandomVariable{M}}}
-\newcommand\rN{{\RandomVariable{N}}}
-\newcommand\rO{{\RandomVariable{O}}}
-\newcommand\rP{{\RandomVariable{P}}}
-\newcommand\rQ{{\RandomVariable{Q}}}
-\newcommand\rR{{\RandomVariable{R}}}
-\newcommand\rS{{\RandomVariable{S}}}
-\newcommand\rT{{\RandomVariable{T}}}
-\newcommand\rU{{\RandomVariable{U}}}
-\newcommand\rV{{\RandomVariable{V}}}
-\newcommand\rW{{\RandomVariable{W}}}
-\newcommand\rX{{\RandomVariable{X}}}
-\newcommand\rY{{\RandomVariable{Y}}}
-\newcommand\rZ{{\RandomVariable{Z}}}
-
-% Random vectors
-\newcommand\RandomVector[1]{\symbf{#1}}
-
-\newcommand\rvA{{\RandomVector{A}}}
-\newcommand\rvB{{\RandomVector{B}}}
-\newcommand\rvC{{\RandomVector{C}}}
-\newcommand\rvD{{\RandomVector{D}}}
-\newcommand\rvE{{\RandomVector{E}}}
-\newcommand\rvF{{\RandomVector{F}}}
-\newcommand\rvG{{\RandomVector{G}}}
-\newcommand\rvH{{\RandomVector{H}}}
-\newcommand\rvI{{\RandomVector{I}}}
-\newcommand\rvJ{{\RandomVector{J}}}
-\newcommand\rvK{{\RandomVector{K}}}
-\newcommand\rvL{{\RandomVector{L}}}
-\newcommand\rvM{{\RandomVector{M}}}
-\newcommand\rvN{{\RandomVector{N}}}
-\newcommand\rvO{{\RandomVector{O}}}
-\newcommand\rvP{{\RandomVector{P}}}
-\newcommand\rvQ{{\RandomVector{Q}}}
-\newcommand\rvR{{\RandomVector{R}}}
-\newcommand\rvS{{\RandomVector{S}}}
-\newcommand\rvT{{\RandomVector{T}}}
-\newcommand\rvU{{\RandomVector{U}}}
-\newcommand\rvV{{\RandomVector{V}}}
-\newcommand\rvW{{\RandomVector{W}}}
-\newcommand\rvX{{\RandomVector{X}}}
-\newcommand\rvY{{\RandomVector{Y}}}
-\newcommand\rvZ{{\RandomVector{Z}}}
-
-\newcommand\laplace{\mathrm{Laplace}} % Laplace distribution
-
-\newcommand\E{\mathbb{E}}
-\newcommand\Ls{\mathcal{L}}
-\newcommand\R{\mathbb{R}}
-\newcommand\emp{\tilde{p}}
-\newcommand\lr{\alpha}
-\newcommand\reg{\lambda}
-\newcommand\rect{\mathrm{rectifier}}
-\newcommand\softmax{\mathrm{softmax}}
-\newcommand\sigmoid{\sigma}
-\newcommand\softplus{\zeta}
-\newcommand\KL{D_{\mathrm{KL}}}
-\newcommand\Var{\mathrm{Var}}
-\newcommand\standarderror{\mathrm{SE}}
-\newcommand\Cov{\mathrm{Cov}}
-% Wolfram Mathworld says $L^2$ is for function spaces and $\ell^2$ is for vectors
-% But then they seem to use $L^2$ for vectors throughout the site, and so does
-% wikipedia.
-\newcommand\normlzero{L^0}
-\newcommand\normlone{L^1}
-\newcommand\normltwo{L^2}
-\newcommand\normlp{L^p}
-\newcommand\normmax{L^\infty}
-
-\DeclareMathOperator*{\argmax}{arg\,max}
-\DeclareMathOperator*{\argmin}{arg\,min}
-
-\DeclareMathOperator{\sign}{sign}
-\DeclareMathOperator{\Tr}{Tr}
-\let\ab\allowbreak
diff --git a/macros/latex/contrib/thuthesis/spine.pdf b/macros/latex/contrib/thuthesis/spine.pdf
index dabd941d2c..f4e9ef526e 100644
--- a/macros/latex/contrib/thuthesis/spine.pdf
+++ b/macros/latex/contrib/thuthesis/spine.pdf
Binary files differ
diff --git a/macros/latex/contrib/thuthesis/thusetup.tex b/macros/latex/contrib/thuthesis/thusetup.tex
index c1545ad811..bba4722092 100644
--- a/macros/latex/contrib/thuthesis/thusetup.tex
+++ b/macros/latex/contrib/thuthesis/thusetup.tex
@@ -89,11 +89,11 @@
%
include-spine = false,
%
- % 生成的声明页是否要插入页码(默认 false)
+ % 生成的声明页是否要插入页眉和页脚(默认 empty)
% 仅在需要进行电子签名时,才需要打开这一选项
- % 插入的扫描声明页总是会有页码,不受这一选项影响
+ % 插入的扫描声明页总是会生成页眉(研究生)和页脚,不受这一选项影响
%
- statement-page-number = false,
+ % statement-page-style = plain,
%
% 密级和年限
% 秘密, 机密, 绝密
@@ -126,9 +126,6 @@
\usepackage{threeparttable}
\pretocmd{\TPTnoteSettings}{\footnotesize}{}{}
-% 表格中的反斜线
-\usepackage{diagbox}
-
% 确定浮动对象的位置,可以使用 H,强制将浮动对象放到这里(可能效果很差)
\usepackage{float}
@@ -148,29 +145,26 @@
% 给自定义的宏后面自动加空白
% \usepackage{xspace}
-% 借用 ltxdoc 里面的几个命令。
-\def\cmd#1{\cs{\expandafter\cmd@to@cs\string#1}}
-\def\cmd@to@cs#1#2{\char\number`#2\relax}
-\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
-
-\newcommand*{\meta}[1]{{%
- \ensuremath{\langle}\rmfamily\itshape#1\/\ensuremath{\rangle}}}
-\providecommand\marg[1]{%
- {\ttfamily\char`\{}\meta{#1}{\ttfamily\char`\}}}
-\providecommand\oarg[1]{%
- {\ttfamily[}\meta{#1}{\ttfamily]}}
-\providecommand\parg[1]{%
- {\ttfamily(}\meta{#1}{\ttfamily)}}
-\providecommand\pkg[1]{{\sffamily#1}}
-
% 定义所有的图片文件在 figures 子目录下
\graphicspath{{figures/}}
-% 数学命令
-\input{math_commands.tex}
-
% 定义自己常用的东西
% \def\myname{薛瑞尼}
+% 数学命令
+\newcommand\dif{\mathop{}\!\mathrm{d}} % 微分符号
+\newcommand\real{{\mathbf{R}}} % 实数集
+\newcommand\abs[1]{\lvert#1\rvert}
+\newcommand\VECTOR{\symbf} % 向量
+\newcommand\MATRIX{\symbf} % 矩阵
+\newcommand\vn{{\VECTOR{n}}}
+\newcommand\vx{{\VECTOR{x}}}
+\newcommand\mA{{\MATRIX{A}}}
+\newcommand\mK{{\MATRIX{K}}}
+
+% 借用 ltxdoc 里面的几个命令方便写文档。
+\DeclareRobustCommand\cs[1]{\texttt{\char`\\#1}}
+\providecommand\pkg[1]{{\sffamily#1}}
+
% hyperref 宏包在最后调用
\usepackage{hyperref}
diff --git a/macros/latex/contrib/thuthesis/thuthesis-author-year.bst b/macros/latex/contrib/thuthesis/thuthesis-author-year.bst
index 370aa0520f..071d19764f 100644
--- a/macros/latex/contrib/thuthesis/thuthesis-author-year.bst
+++ b/macros/latex/contrib/thuthesis/thuthesis-author-year.bst
@@ -1,5 +1,5 @@
%%
-%% This is file `versions/thu/thuthesis-author-year.bst',
+%% This is file `variants/thu/thuthesis-author-year.bst',
%% generated with the docstrip utility.
%%
%% The original source files were:
@@ -8,9 +8,9 @@
%% -------------------------------------------------------------------
%% GB/T 7714-2015 BibTeX Style
%% https://github.com/CTeX-org/gbt7714-bibtex-style
-%% Version: 2019/03/21 v1.1.1
+%% Version: 2020/06/08 v2.0.2
%% -------------------------------------------------------------------
-%% Copyright (C) 2016-2019 by Zeping Lee <zepinglee AT gmail.com>
+%% Copyright (C) 2016-2020 by Zeping Lee <zepinglee AT gmail.com>
%% -------------------------------------------------------------------
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -26,15 +26,23 @@ INTEGERS {
period.between.author.year
sentence.case.title
link.title
+ title.in.journal
show.mark
+ space.before.mark
+ show.medium.type
slash.for.extraction
in.booktitle
- italic.jounal
+ abbreviate.journal
+ italic.journal
bold.journal.volume
show.missing.address.publisher
+ only.start.page
+ show.urldate
show.url
show.doi
+ show.preprint
show.note
+ show.english.translation
lang.zh.order
lang.ja.order
lang.en.order
@@ -49,15 +57,23 @@ FUNCTION {load.config}
#1 'period.between.author.year :=
#1 'sentence.case.title :=
#0 'link.title :=
+ #1 'title.in.journal :=
#1 'show.mark :=
+ #1 'space.before.mark :=
+ #1 'show.medium.type :=
#1 'slash.for.extraction :=
#0 'in.booktitle :=
- #0 'italic.jounal :=
+ #0 'abbreviate.journal :=
+ #0 'italic.journal :=
#0 'bold.journal.volume :=
#0 'show.missing.address.publisher :=
+ #0 'only.start.page :=
+ #1 'show.urldate :=
#1 'show.url :=
#0 'show.doi :=
+ #0 'show.preprint :=
#0 'show.note :=
+ #0 'show.english.translation :=
#1 'lang.zh.order :=
#2 'lang.ja.order :=
#3 'lang.en.order :=
@@ -67,12 +83,14 @@ FUNCTION {load.config}
ENTRY
{ address
+ archivePrefix
author
booktitle
date
doi
edition
editor
+ eprint
howpublished
institution
journal
@@ -88,13 +106,14 @@ ENTRY
school
series
title
+ translation
translator
url
urldate
volume
year
}
- { entry.lang entry.is.electronic entry.numbered }
+ { entry.lang entry.is.electronic is.pure.electronic entry.numbered }
{ label extra.label sort.label short.list entry.mark entry.url }
INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
@@ -270,6 +289,12 @@ FUNCTION {output.check}
FUNCTION {fin.entry}
{ add.period$
write$
+ show.english.translation entry.lang lang.zh = and
+ { ")"
+ write$
+ }
+ 'skip$
+ if$
newline$
}
@@ -474,15 +499,20 @@ FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
+ ""
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ nameptr #1 >
+ { ", " * }
+ 'skip$
+ if$
nameptr max.num.authors >
- { bbl.et.al
+ { bbl.et.al *
#1 'namesleft :=
}
{ t "others" =
- { bbl.et.al }
+ { bbl.et.al * }
{ t get.str.lang 'name.lang :=
name.lang lang.en =
{ t #1 "{vv~}{ll}{~f{~}}" format.name$
@@ -494,14 +524,11 @@ FUNCTION {format.names}
}
{ t #1 "{ll}{ff}" format.name$ }
if$
+ *
}
if$
}
if$
- nameptr #1 >
- { ", " swap$ * * }
- 'skip$
- if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
@@ -861,12 +888,51 @@ FUNCTION {format.series.vol.num.booktitle}
if$
}
-FUNCTION {format.journal}
-{ journal
- italic.jounal entry.lang lang.en = and
- 'italicize
+FUNCTION {remove.period}
+{ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$ 'tmp.str :=
+ tmp.str "." = not
+ { s tmp.str * 's := }
+ 'skip$
+ if$
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ s
+}
+
+FUNCTION {abbreviate}
+{ remove.period
+ 't :=
+ t "l" change.case$ 's :=
+ ""
+ s "physical review letters" =
+ { "Phys Rev Lett" }
'skip$
if$
+ 's :=
+ s empty$
+ { t }
+ { pop$ s }
+ if$
+}
+
+FUNCTION {format.journal}
+{ journal empty$ not
+ { journal
+ abbreviate.journal
+ 'abbreviate
+ 'skip$
+ if$
+ italic.journal entry.lang lang.en = and
+ 'italicize
+ 'skip$
+ if$
+ }
+ { "" }
+ if$
}
FUNCTION {set.entry.mark}
@@ -885,15 +951,24 @@ FUNCTION {format.mark}
type$ "phdthesis" = type$ "mastersthesis" = or type$ "patent" = or
medium empty$ not or entry.is.electronic or
and
- { medium empty$ not
- { entry.mark "/" * medium * 'entry.mark := }
- { entry.is.electronic
- { entry.mark "/OL" * 'entry.mark := }
- 'skip$
+ { entry.mark
+ show.medium.type
+ { medium empty$ not
+ { "/" * medium * }
+ { entry.is.electronic
+ { "/OL" * }
+ 'skip$
+ if$
+ }
if$
}
+ 'skip$
+ if$
+ 'entry.mark :=
+ space.before.mark
+ { " [" entry.mark * "]" * }
+ { "\allowbreak[" entry.mark * "]" * }
if$
- " [" entry.mark * "]" *
}
{ "" }
if$
@@ -1075,7 +1150,9 @@ FUNCTION {format.editdate}
}
FUNCTION {format.urldate}
-{ urldate empty$ not entry.is.electronic and
+{ urldate empty$ not
+ show.urldate show.url and is.pure.electronic or and
+ url empty$ not and
{ "\allowbreak[" urldate * "]" * }
{ "" }
if$
@@ -1106,6 +1183,18 @@ FUNCTION {format.pages}
if$
}
+FUNCTION {format.extracted.pages}
+{ pages empty$
+ { "" }
+ { pages
+ only.start.page
+ 'extract.before.dash
+ 'hyphenate
+ if$
+ }
+ if$
+}
+
FUNCTION {format.journal.volume}
{ volume empty$ not
{ bold.journal.volume
@@ -1127,7 +1216,9 @@ FUNCTION {format.journal.number}
FUNCTION {format.journal.pages}
{ pages empty$
{ "" }
- { ":\penalty0 " pages hyphenate * }
+ { ": "
+ format.extracted.pages *
+ }
if$
}
@@ -1199,9 +1290,15 @@ FUNCTION {check.url}
}
FUNCTION {format.url}
+{ entry.url
+}
+
+FUNCTION {output.url}
{ entry.url empty$ not
- { new.block entry.url }
- { "" }
+ { new.block
+ entry.url output
+ }
+ 'skip$
if$
}
@@ -1235,7 +1332,7 @@ FUNCTION {is.in.url}
FUNCTION {format.doi}
{ ""
- doi empty$ not show.doi and
+ doi empty$ not
{ "" 's :=
doi 't :=
#0 'numnames :=
@@ -1263,11 +1360,16 @@ FUNCTION {format.doi}
t #2 global.max$ substring$ 't :=
}
while$
- 's :=
- s empty$ not
- { new.block s }
- { "" }
- if$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {output.doi}
+{ doi empty$ not show.doi and
+ show.english.translation entry.lang lang.zh = and not and
+ { new.block
+ format.doi output
}
'skip$
if$
@@ -1292,6 +1394,27 @@ FUNCTION {check.electronic}
if$
}
+FUNCTION {format.eprint}
+{ ""
+ archivePrefix empty$ not
+ { archivePrefix * ": " *
+ "\eprint{https://" *
+ archivePrefix "l" change.case$ * ".org/abs/" * eprint * "}{" *
+ eprint * "}" *
+ }
+ { eprint }
+ if$
+}
+
+FUNCTION {output.eprint}
+{ show.preprint eprint empty$ not and
+ { new.block
+ format.eprint output
+ }
+ 'skip$
+ if$
+}
+
FUNCTION {format.note}
{ note empty$ not show.note and
{ note }
@@ -1299,6 +1422,30 @@ FUNCTION {format.note}
if$
}
+FUNCTION {output.translation}
+{ show.english.translation entry.lang lang.zh = and
+ { translation empty$ not
+ { translation }
+ { "[English translation missing!]" }
+ if$
+ " (in Chinese)" * output
+ write$
+ format.doi duplicate$ empty$ not
+ { newline$
+ write$
+ }
+ 'pop$
+ if$
+ " \\" write$
+ newline$
+ "(" write$
+ ""
+ before.all 'output.state :=
+ }
+ 'skip$
+ if$
+}
+
FUNCTION {empty.misc.check}
{ author empty$ title empty$
year empty$
@@ -1311,6 +1458,7 @@ FUNCTION {empty.misc.check}
FUNCTION {monograph}
{ output.bibitem
+ output.translation
author empty$ not
{ format.authors }
{ editor empty$ not
@@ -1339,8 +1487,8 @@ FUNCTION {monograph}
format.address.publisher output
format.pages bbl.colon output.after
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1348,6 +1496,7 @@ FUNCTION {monograph}
FUNCTION {incollection}
{ output.bibitem
+ output.translation
format.authors output
author format.key output
period.between.author.year
@@ -1369,10 +1518,10 @@ FUNCTION {incollection}
format.edition output
new.block
format.address.publisher output
- format.pages bbl.colon output.after
+ format.extracted.pages bbl.colon output.after
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1380,6 +1529,7 @@ FUNCTION {incollection}
FUNCTION {periodical}
{ output.bibitem
+ output.translation
format.authors output
author format.key output
period.between.author.year
@@ -1396,8 +1546,8 @@ FUNCTION {periodical}
new.block
format.address.publisher output
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1405,6 +1555,7 @@ FUNCTION {periodical}
FUNCTION {article}
{ output.bibitem
+ output.translation
format.authors output
author format.key output
period.between.author.year
@@ -1413,17 +1564,21 @@ FUNCTION {article}
if$
format.year "year" output.check
new.block
- format.title "title" output.check
- "J" set.entry.mark
- format.mark "" output.after
- new.block
+ title.in.journal
+ { format.title "title" output.check
+ "J" set.entry.mark
+ format.mark "" output.after
+ new.block
+ }
+ 'skip$
+ if$
format.journal "journal" output.check
format.journal.volume output
format.journal.number "" output.after
format.journal.pages "" output.after
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1431,6 +1586,7 @@ FUNCTION {article}
FUNCTION {patent}
{ output.bibitem
+ output.translation
format.authors output
author format.key output
period.between.author.year
@@ -1445,8 +1601,8 @@ FUNCTION {patent}
new.block
format.date "year" output.check
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1455,7 +1611,9 @@ FUNCTION {patent}
FUNCTION {electronic}
{ #1 #1 check.electronic
#1 'entry.is.electronic :=
+ #1 'is.pure.electronic :=
output.bibitem
+ output.translation
format.authors output
author format.key output
period.between.author.year
@@ -1472,8 +1630,49 @@ FUNCTION {electronic}
format.pages bbl.colon output.after
format.editdate "" output.after
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {preprint}
+{ output.bibitem
+ output.translation
+ author empty$ not
+ { format.authors }
+ { editor empty$ not
+ { format.editors }
+ { "empty author and editor in " cite$ * warning$
+ bbl.anonymous
+ }
+ if$
+ }
+ if$
+ output
+ period.between.author.year
+ 'new.sentence
+ 'skip$
+ if$
+ format.year "year" output.check
+ new.block
+ title.in.journal
+ { format.series.vol.num.title "title" output.check
+ "Z" set.entry.mark
+ format.mark "" output.after
+ new.block
+ }
+ 'skip$
+ if$
+ format.translators output
+ new.sentence
+ format.edition output
+ new.block
+ output.eprint
+ format.pages bbl.colon output.after
+ format.urldate "" output.after
+ output.url
new.block
format.note output
fin.entry
@@ -1486,10 +1685,14 @@ FUNCTION {misc}
'incollection
{ publisher empty$ not
'monograph
- { entry.is.electronic
- 'electronic
- { "Z" set.entry.mark
- monograph
+ { eprint empty$ not show.preprint and
+ 'preprint
+ { entry.is.electronic
+ 'electronic
+ { "Z" set.entry.mark
+ monograph
+ }
+ if$
}
if$
}
@@ -1589,10 +1792,7 @@ FUNCTION {techreport}
misc
}
-FUNCTION {unpublished}
-{ "Z" set.entry.mark
- misc
-}
+FUNCTION {unpublished} { misc }
FUNCTION {default.type} { misc }
@@ -1918,6 +2118,7 @@ FUNCTION {presort}
{ set.entry.lang
set.entry.numbered
show.url show.doi check.electronic
+ #0 'is.pure.electronic :=
calc.label
label sortify
" "
@@ -2007,19 +2208,25 @@ FUNCTION {begin.bib}
write$ newline$
"\providecommand{\url}[1]{#1}"
write$ newline$
- "\expandafter\ifx\csname urlstyle\endcsname\relax\relax\else"
+ "\expandafter\ifx\csname urlstyle\endcsname\relax\else"
write$ newline$
" \urlstyle{same}\fi"
write$ newline$
- show.doi
- { "\providecommand{\href}[2]{\url{#2}}"
+ "\expandafter\ifx\csname href\endcsname\relax"
+ write$ newline$
+ " \DeclareUrlCommand\doi{\urlstyle{rm}}"
+ write$ newline$
+ " \def\eprint#1#2{#2}"
+ write$ newline$
+ "\else"
+ write$ newline$
+ " \def\doi#1{\href{https://doi.org/#1}{\nolinkurl{#1}}}"
+ write$ newline$
+ " \let\eprint\href"
write$ newline$
- "\providecommand{\doi}[1]{\href{https://doi.org/#1}{#1}}"
+ "\fi"
write$ newline$
}
- 'skip$
- if$
-}
FUNCTION {end.bib}
{ newline$
diff --git a/macros/latex/contrib/thuthesis/thuthesis-bachelor.bst b/macros/latex/contrib/thuthesis/thuthesis-bachelor.bst
index 412acbe2c2..bb91ba5c09 100644
--- a/macros/latex/contrib/thuthesis/thuthesis-bachelor.bst
+++ b/macros/latex/contrib/thuthesis/thuthesis-bachelor.bst
@@ -1,5 +1,5 @@
%%
-%% This is file `versions/thu/thuthesis-bachelor.bst',
+%% This is file `variants/thu/thuthesis-bachelor.bst',
%% generated with the docstrip utility.
%%
%% The original source files were:
@@ -8,9 +8,9 @@
%% -------------------------------------------------------------------
%% GB/T 7714-2015 BibTeX Style
%% https://github.com/CTeX-org/gbt7714-bibtex-style
-%% Version: 2019/03/21 v1.1.1
+%% Version: 2020/06/08 v2.0.2
%% -------------------------------------------------------------------
-%% Copyright (C) 2016-2019 by Zeping Lee <zepinglee AT gmail.com>
+%% Copyright (C) 2016-2020 by Zeping Lee <zepinglee AT gmail.com>
%% -------------------------------------------------------------------
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -26,15 +26,23 @@ INTEGERS {
period.between.author.year
sentence.case.title
link.title
+ title.in.journal
show.mark
+ space.before.mark
+ show.medium.type
slash.for.extraction
in.booktitle
- italic.jounal
+ abbreviate.journal
+ italic.journal
bold.journal.volume
show.missing.address.publisher
+ only.start.page
+ show.urldate
show.url
show.doi
+ show.preprint
show.note
+ show.english.translation
}
FUNCTION {load.config}
@@ -43,25 +51,35 @@ FUNCTION {load.config}
#3 'max.num.authors :=
#1 'sentence.case.title :=
#0 'link.title :=
+ #1 'title.in.journal :=
#1 'show.mark :=
+ #1 'space.before.mark :=
+ #1 'show.medium.type :=
#1 'slash.for.extraction :=
#0 'in.booktitle :=
- #0 'italic.jounal :=
+ #0 'abbreviate.journal :=
+ #0 'italic.journal :=
#0 'bold.journal.volume :=
#0 'show.missing.address.publisher :=
+ #0 'only.start.page :=
+ #1 'show.urldate :=
#1 'show.url :=
#1 'show.doi :=
+ #0 'show.preprint :=
#0 'show.note :=
+ #0 'show.english.translation :=
}
ENTRY
{ address
+ archivePrefix
author
booktitle
date
doi
edition
editor
+ eprint
howpublished
institution
journal
@@ -77,13 +95,14 @@ ENTRY
school
series
title
+ translation
translator
url
urldate
volume
year
}
- { entry.lang entry.is.electronic entry.numbered }
+ { entry.lang entry.is.electronic is.pure.electronic entry.numbered }
{ label extra.label sort.label short.list entry.mark entry.url }
INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
@@ -259,6 +278,12 @@ FUNCTION {output.check}
FUNCTION {fin.entry}
{ add.period$
write$
+ show.english.translation entry.lang lang.zh = and
+ { ")"
+ write$
+ }
+ 'skip$
+ if$
newline$
}
@@ -463,15 +488,20 @@ FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
+ ""
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ nameptr #1 >
+ { ", " * }
+ 'skip$
+ if$
nameptr max.num.authors >
- { bbl.et.al
+ { bbl.et.al *
#1 'namesleft :=
}
{ t "others" =
- { bbl.et.al }
+ { bbl.et.al * }
{ t get.str.lang 'name.lang :=
name.lang lang.en =
{ t #1 "{vv~}{ll}{~f{~}}" format.name$
@@ -483,14 +513,11 @@ FUNCTION {format.names}
}
{ t #1 "{ll}{ff}" format.name$ }
if$
+ *
}
if$
}
if$
- nameptr #1 >
- { ", " swap$ * * }
- 'skip$
- if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
@@ -850,12 +877,51 @@ FUNCTION {format.series.vol.num.booktitle}
if$
}
-FUNCTION {format.journal}
-{ journal
- italic.jounal entry.lang lang.en = and
- 'italicize
+FUNCTION {remove.period}
+{ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$ 'tmp.str :=
+ tmp.str "." = not
+ { s tmp.str * 's := }
+ 'skip$
+ if$
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ s
+}
+
+FUNCTION {abbreviate}
+{ remove.period
+ 't :=
+ t "l" change.case$ 's :=
+ ""
+ s "physical review letters" =
+ { "Phys Rev Lett" }
'skip$
if$
+ 's :=
+ s empty$
+ { t }
+ { pop$ s }
+ if$
+}
+
+FUNCTION {format.journal}
+{ journal empty$ not
+ { journal
+ abbreviate.journal
+ 'abbreviate
+ 'skip$
+ if$
+ italic.journal entry.lang lang.en = and
+ 'italicize
+ 'skip$
+ if$
+ }
+ { "" }
+ if$
}
FUNCTION {set.entry.mark}
@@ -871,15 +937,24 @@ FUNCTION {set.entry.mark}
FUNCTION {format.mark}
{ show.mark
- { medium empty$ not
- { entry.mark "/" * medium * 'entry.mark := }
- { entry.is.electronic
- { entry.mark "/OL" * 'entry.mark := }
- 'skip$
+ { entry.mark
+ show.medium.type
+ { medium empty$ not
+ { "/" * medium * }
+ { entry.is.electronic
+ { "/OL" * }
+ 'skip$
+ if$
+ }
if$
}
+ 'skip$
+ if$
+ 'entry.mark :=
+ space.before.mark
+ { " [" entry.mark * "]" * }
+ { "\allowbreak[" entry.mark * "]" * }
if$
- "\allowbreak[" entry.mark * "]" *
}
{ "" }
if$
@@ -1061,7 +1136,9 @@ FUNCTION {format.editdate}
}
FUNCTION {format.urldate}
-{ urldate empty$ not entry.is.electronic and
+{ urldate empty$ not
+ show.urldate show.url and is.pure.electronic or and
+ url empty$ not and
{ "\allowbreak[" urldate * "]" * }
{ "" }
if$
@@ -1092,6 +1169,18 @@ FUNCTION {format.pages}
if$
}
+FUNCTION {format.extracted.pages}
+{ pages empty$
+ { "" }
+ { pages
+ only.start.page
+ 'extract.before.dash
+ 'hyphenate
+ if$
+ }
+ if$
+}
+
FUNCTION {format.journal.volume}
{ volume empty$ not
{ bold.journal.volume
@@ -1113,7 +1202,9 @@ FUNCTION {format.journal.number}
FUNCTION {format.journal.pages}
{ pages empty$
{ "" }
- { ":\penalty0 " pages hyphenate * }
+ { ": "
+ format.extracted.pages *
+ }
if$
}
@@ -1185,9 +1276,15 @@ FUNCTION {check.url}
}
FUNCTION {format.url}
+{ entry.url
+}
+
+FUNCTION {output.url}
{ entry.url empty$ not
- { new.block entry.url }
- { "" }
+ { new.block
+ entry.url output
+ }
+ 'skip$
if$
}
@@ -1221,7 +1318,7 @@ FUNCTION {is.in.url}
FUNCTION {format.doi}
{ ""
- doi empty$ not show.doi and
+ doi empty$ not
{ "" 's :=
doi 't :=
#0 'numnames :=
@@ -1249,11 +1346,16 @@ FUNCTION {format.doi}
t #2 global.max$ substring$ 't :=
}
while$
- 's :=
- s empty$ not
- { new.block s }
- { "" }
- if$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {output.doi}
+{ doi empty$ not show.doi and
+ show.english.translation entry.lang lang.zh = and not and
+ { new.block
+ format.doi output
}
'skip$
if$
@@ -1278,6 +1380,27 @@ FUNCTION {check.electronic}
if$
}
+FUNCTION {format.eprint}
+{ ""
+ archivePrefix empty$ not
+ { archivePrefix * ": " *
+ "\eprint{https://" *
+ archivePrefix "l" change.case$ * ".org/abs/" * eprint * "}{" *
+ eprint * "}" *
+ }
+ { eprint }
+ if$
+}
+
+FUNCTION {output.eprint}
+{ show.preprint eprint empty$ not and
+ { new.block
+ format.eprint output
+ }
+ 'skip$
+ if$
+}
+
FUNCTION {format.note}
{ note empty$ not show.note and
{ note }
@@ -1285,6 +1408,30 @@ FUNCTION {format.note}
if$
}
+FUNCTION {output.translation}
+{ show.english.translation entry.lang lang.zh = and
+ { translation empty$ not
+ { translation }
+ { "[English translation missing!]" }
+ if$
+ " (in Chinese)" * output
+ write$
+ format.doi duplicate$ empty$ not
+ { newline$
+ write$
+ }
+ 'pop$
+ if$
+ " \\" write$
+ newline$
+ "(" write$
+ ""
+ before.all 'output.state :=
+ }
+ 'skip$
+ if$
+}
+
FUNCTION {empty.misc.check}
{ author empty$ title empty$
year empty$
@@ -1297,6 +1444,7 @@ FUNCTION {empty.misc.check}
FUNCTION {monograph}
{ output.bibitem
+ output.translation
author empty$ not
{ format.authors }
{ editor empty$ not
@@ -1321,8 +1469,8 @@ FUNCTION {monograph}
format.year "year" output.check
format.pages bbl.colon output.after
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1330,6 +1478,7 @@ FUNCTION {monograph}
FUNCTION {incollection}
{ output.bibitem
+ output.translation
format.authors output
author format.key output
new.block
@@ -1347,10 +1496,10 @@ FUNCTION {incollection}
new.block
format.address.publisher output
format.year "year" output.check
- format.pages bbl.colon output.after
+ format.extracted.pages bbl.colon output.after
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1358,6 +1507,7 @@ FUNCTION {incollection}
FUNCTION {periodical}
{ output.bibitem
+ output.translation
format.authors output
author format.key output
new.block
@@ -1370,8 +1520,8 @@ FUNCTION {periodical}
format.address.publisher output
format.date "year" output.check
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1379,21 +1529,26 @@ FUNCTION {periodical}
FUNCTION {article}
{ output.bibitem
+ output.translation
format.authors output
author format.key output
new.block
- format.title "title" output.check
- "J" set.entry.mark
- format.mark "" output.after
- new.block
+ title.in.journal
+ { format.title "title" output.check
+ "J" set.entry.mark
+ format.mark "" output.after
+ new.block
+ }
+ 'skip$
+ if$
format.journal "journal" output.check
format.date "year" output.check
format.journal.volume output
format.journal.number "" output.after
format.journal.pages "" output.after
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1401,6 +1556,7 @@ FUNCTION {article}
FUNCTION {patent}
{ output.bibitem
+ output.translation
format.authors output
author format.key output
new.block
@@ -1410,8 +1566,8 @@ FUNCTION {patent}
new.block
format.date "year" output.check
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1420,7 +1576,9 @@ FUNCTION {patent}
FUNCTION {electronic}
{ #1 #1 check.electronic
#1 'entry.is.electronic :=
+ #1 'is.pure.electronic :=
output.bibitem
+ output.translation
format.authors output
author format.key output
new.block
@@ -1436,8 +1594,45 @@ FUNCTION {electronic}
format.pages bbl.colon output.after
format.editdate "" output.after
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {preprint}
+{ output.bibitem
+ output.translation
+ author empty$ not
+ { format.authors }
+ { editor empty$ not
+ { format.editors }
+ { "empty author and editor in " cite$ * warning$
+ ""
+ }
+ if$
+ }
+ if$
+ output
+ new.block
+ title.in.journal
+ { format.series.vol.num.title "title" output.check
+ "Z" set.entry.mark
+ format.mark "" output.after
+ new.block
+ }
+ 'skip$
+ if$
+ format.translators output
+ new.sentence
+ format.edition output
+ new.block
+ output.eprint
+ format.year "year" output.check
+ format.pages bbl.colon output.after
+ format.urldate "" output.after
+ output.url
new.block
format.note output
fin.entry
@@ -1450,10 +1645,14 @@ FUNCTION {misc}
'incollection
{ publisher empty$ not
'monograph
- { entry.is.electronic
- 'electronic
- { "Z" set.entry.mark
- monograph
+ { eprint empty$ not show.preprint and
+ 'preprint
+ { entry.is.electronic
+ 'electronic
+ { "Z" set.entry.mark
+ monograph
+ }
+ if$
}
if$
}
@@ -1542,10 +1741,7 @@ FUNCTION {techreport}
misc
}
-FUNCTION {unpublished}
-{ "Z" set.entry.mark
- misc
-}
+FUNCTION {unpublished} { misc }
FUNCTION {default.type} { misc }
@@ -1746,6 +1942,7 @@ FUNCTION {presort}
{ set.entry.lang
set.entry.numbered
show.url show.doi check.electronic
+ #0 'is.pure.electronic :=
calc.label
label sortify
" "
@@ -1814,19 +2011,25 @@ FUNCTION {begin.bib}
write$ newline$
"\providecommand{\url}[1]{#1}"
write$ newline$
- "\expandafter\ifx\csname urlstyle\endcsname\relax\relax\else"
+ "\expandafter\ifx\csname urlstyle\endcsname\relax\else"
write$ newline$
" \urlstyle{same}\fi"
write$ newline$
- show.doi
- { "\providecommand{\href}[2]{\url{#2}}"
+ "\expandafter\ifx\csname href\endcsname\relax"
+ write$ newline$
+ " \DeclareUrlCommand\doi{\urlstyle{rm}}"
+ write$ newline$
+ " \def\eprint#1#2{#2}"
+ write$ newline$
+ "\else"
+ write$ newline$
+ " \def\doi#1{\href{https://doi.org/#1}{\nolinkurl{#1}}}"
+ write$ newline$
+ " \let\eprint\href"
write$ newline$
- "\providecommand{\doi}[1]{\href{https://doi.org/#1}{#1}}"
+ "\fi"
write$ newline$
}
- 'skip$
- if$
-}
FUNCTION {end.bib}
{ newline$
diff --git a/macros/latex/contrib/thuthesis/thuthesis-example.pdf b/macros/latex/contrib/thuthesis/thuthesis-example.pdf
index 5fff934faf..7b6a0b2a4c 100644
--- a/macros/latex/contrib/thuthesis/thuthesis-example.pdf
+++ b/macros/latex/contrib/thuthesis/thuthesis-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/thuthesis/thuthesis-numeric.bst b/macros/latex/contrib/thuthesis/thuthesis-numeric.bst
index c8cd10f4b8..234b065a7d 100644
--- a/macros/latex/contrib/thuthesis/thuthesis-numeric.bst
+++ b/macros/latex/contrib/thuthesis/thuthesis-numeric.bst
@@ -1,5 +1,5 @@
%%
-%% This is file `versions/thu/thuthesis-numeric.bst',
+%% This is file `variants/thu/thuthesis-numeric.bst',
%% generated with the docstrip utility.
%%
%% The original source files were:
@@ -8,9 +8,9 @@
%% -------------------------------------------------------------------
%% GB/T 7714-2015 BibTeX Style
%% https://github.com/CTeX-org/gbt7714-bibtex-style
-%% Version: 2019/03/21 v1.1.1
+%% Version: 2020/06/08 v2.0.2
%% -------------------------------------------------------------------
-%% Copyright (C) 2016-2019 by Zeping Lee <zepinglee AT gmail.com>
+%% Copyright (C) 2016-2020 by Zeping Lee <zepinglee AT gmail.com>
%% -------------------------------------------------------------------
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
@@ -26,15 +26,23 @@ INTEGERS {
period.between.author.year
sentence.case.title
link.title
+ title.in.journal
show.mark
+ space.before.mark
+ show.medium.type
slash.for.extraction
in.booktitle
- italic.jounal
+ abbreviate.journal
+ italic.journal
bold.journal.volume
show.missing.address.publisher
+ only.start.page
+ show.urldate
show.url
show.doi
+ show.preprint
show.note
+ show.english.translation
}
FUNCTION {load.config}
@@ -43,25 +51,35 @@ FUNCTION {load.config}
#3 'max.num.authors :=
#1 'sentence.case.title :=
#0 'link.title :=
+ #1 'title.in.journal :=
#1 'show.mark :=
+ #1 'space.before.mark :=
+ #1 'show.medium.type :=
#1 'slash.for.extraction :=
#0 'in.booktitle :=
- #0 'italic.jounal :=
+ #0 'abbreviate.journal :=
+ #0 'italic.journal :=
#0 'bold.journal.volume :=
#0 'show.missing.address.publisher :=
+ #0 'only.start.page :=
+ #1 'show.urldate :=
#1 'show.url :=
#0 'show.doi :=
+ #0 'show.preprint :=
#0 'show.note :=
+ #0 'show.english.translation :=
}
ENTRY
{ address
+ archivePrefix
author
booktitle
date
doi
edition
editor
+ eprint
howpublished
institution
journal
@@ -77,13 +95,14 @@ ENTRY
school
series
title
+ translation
translator
url
urldate
volume
year
}
- { entry.lang entry.is.electronic entry.numbered }
+ { entry.lang entry.is.electronic is.pure.electronic entry.numbered }
{ label extra.label sort.label short.list entry.mark entry.url }
INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash }
@@ -259,6 +278,12 @@ FUNCTION {output.check}
FUNCTION {fin.entry}
{ add.period$
write$
+ show.english.translation entry.lang lang.zh = and
+ { ")"
+ write$
+ }
+ 'skip$
+ if$
newline$
}
@@ -463,15 +488,20 @@ FUNCTION {format.names}
{ 's :=
#1 'nameptr :=
s num.names$ 'numnames :=
+ ""
numnames 'namesleft :=
{ namesleft #0 > }
{ s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't :=
+ nameptr #1 >
+ { ", " * }
+ 'skip$
+ if$
nameptr max.num.authors >
- { bbl.et.al
+ { bbl.et.al *
#1 'namesleft :=
}
{ t "others" =
- { bbl.et.al }
+ { bbl.et.al * }
{ t get.str.lang 'name.lang :=
name.lang lang.en =
{ t #1 "{vv~}{ll}{~f{~}}" format.name$
@@ -483,14 +513,11 @@ FUNCTION {format.names}
}
{ t #1 "{ll}{ff}" format.name$ }
if$
+ *
}
if$
}
if$
- nameptr #1 >
- { ", " swap$ * * }
- 'skip$
- if$
nameptr #1 + 'nameptr :=
namesleft #1 - 'namesleft :=
}
@@ -850,12 +877,51 @@ FUNCTION {format.series.vol.num.booktitle}
if$
}
-FUNCTION {format.journal}
-{ journal
- italic.jounal entry.lang lang.en = and
- 'italicize
+FUNCTION {remove.period}
+{ 't :=
+ "" 's :=
+ { t empty$ not }
+ { t #1 #1 substring$ 'tmp.str :=
+ tmp.str "." = not
+ { s tmp.str * 's := }
+ 'skip$
+ if$
+ t #2 global.max$ substring$ 't :=
+ }
+ while$
+ s
+}
+
+FUNCTION {abbreviate}
+{ remove.period
+ 't :=
+ t "l" change.case$ 's :=
+ ""
+ s "physical review letters" =
+ { "Phys Rev Lett" }
'skip$
if$
+ 's :=
+ s empty$
+ { t }
+ { pop$ s }
+ if$
+}
+
+FUNCTION {format.journal}
+{ journal empty$ not
+ { journal
+ abbreviate.journal
+ 'abbreviate
+ 'skip$
+ if$
+ italic.journal entry.lang lang.en = and
+ 'italicize
+ 'skip$
+ if$
+ }
+ { "" }
+ if$
}
FUNCTION {set.entry.mark}
@@ -874,15 +940,24 @@ FUNCTION {format.mark}
type$ "phdthesis" = type$ "mastersthesis" = or type$ "patent" = or
medium empty$ not or entry.is.electronic or
and
- { medium empty$ not
- { entry.mark "/" * medium * 'entry.mark := }
- { entry.is.electronic
- { entry.mark "/OL" * 'entry.mark := }
- 'skip$
+ { entry.mark
+ show.medium.type
+ { medium empty$ not
+ { "/" * medium * }
+ { entry.is.electronic
+ { "/OL" * }
+ 'skip$
+ if$
+ }
if$
}
+ 'skip$
+ if$
+ 'entry.mark :=
+ space.before.mark
+ { " [" entry.mark * "]" * }
+ { "\allowbreak[" entry.mark * "]" * }
if$
- " [" entry.mark * "]" *
}
{ "" }
if$
@@ -1064,7 +1139,9 @@ FUNCTION {format.editdate}
}
FUNCTION {format.urldate}
-{ urldate empty$ not entry.is.electronic and
+{ urldate empty$ not
+ show.urldate show.url and is.pure.electronic or and
+ url empty$ not and
{ "\allowbreak[" urldate * "]" * }
{ "" }
if$
@@ -1095,6 +1172,18 @@ FUNCTION {format.pages}
if$
}
+FUNCTION {format.extracted.pages}
+{ pages empty$
+ { "" }
+ { pages
+ only.start.page
+ 'extract.before.dash
+ 'hyphenate
+ if$
+ }
+ if$
+}
+
FUNCTION {format.journal.volume}
{ volume empty$ not
{ bold.journal.volume
@@ -1116,7 +1205,9 @@ FUNCTION {format.journal.number}
FUNCTION {format.journal.pages}
{ pages empty$
{ "" }
- { ":\penalty0 " pages hyphenate * }
+ { ": "
+ format.extracted.pages *
+ }
if$
}
@@ -1188,9 +1279,15 @@ FUNCTION {check.url}
}
FUNCTION {format.url}
+{ entry.url
+}
+
+FUNCTION {output.url}
{ entry.url empty$ not
- { new.block entry.url }
- { "" }
+ { new.block
+ entry.url output
+ }
+ 'skip$
if$
}
@@ -1224,7 +1321,7 @@ FUNCTION {is.in.url}
FUNCTION {format.doi}
{ ""
- doi empty$ not show.doi and
+ doi empty$ not
{ "" 's :=
doi 't :=
#0 'numnames :=
@@ -1252,11 +1349,16 @@ FUNCTION {format.doi}
t #2 global.max$ substring$ 't :=
}
while$
- 's :=
- s empty$ not
- { new.block s }
- { "" }
- if$
+ }
+ 'skip$
+ if$
+}
+
+FUNCTION {output.doi}
+{ doi empty$ not show.doi and
+ show.english.translation entry.lang lang.zh = and not and
+ { new.block
+ format.doi output
}
'skip$
if$
@@ -1281,6 +1383,27 @@ FUNCTION {check.electronic}
if$
}
+FUNCTION {format.eprint}
+{ ""
+ archivePrefix empty$ not
+ { archivePrefix * ": " *
+ "\eprint{https://" *
+ archivePrefix "l" change.case$ * ".org/abs/" * eprint * "}{" *
+ eprint * "}" *
+ }
+ { eprint }
+ if$
+}
+
+FUNCTION {output.eprint}
+{ show.preprint eprint empty$ not and
+ { new.block
+ format.eprint output
+ }
+ 'skip$
+ if$
+}
+
FUNCTION {format.note}
{ note empty$ not show.note and
{ note }
@@ -1288,6 +1411,30 @@ FUNCTION {format.note}
if$
}
+FUNCTION {output.translation}
+{ show.english.translation entry.lang lang.zh = and
+ { translation empty$ not
+ { translation }
+ { "[English translation missing!]" }
+ if$
+ " (in Chinese)" * output
+ write$
+ format.doi duplicate$ empty$ not
+ { newline$
+ write$
+ }
+ 'pop$
+ if$
+ " \\" write$
+ newline$
+ "(" write$
+ ""
+ before.all 'output.state :=
+ }
+ 'skip$
+ if$
+}
+
FUNCTION {empty.misc.check}
{ author empty$ title empty$
year empty$
@@ -1300,6 +1447,7 @@ FUNCTION {empty.misc.check}
FUNCTION {monograph}
{ output.bibitem
+ output.translation
author empty$ not
{ format.authors }
{ editor empty$ not
@@ -1324,8 +1472,8 @@ FUNCTION {monograph}
format.year "year" output.check
format.pages bbl.colon output.after
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1333,6 +1481,7 @@ FUNCTION {monograph}
FUNCTION {incollection}
{ output.bibitem
+ output.translation
format.authors output
author format.key output
new.block
@@ -1350,10 +1499,10 @@ FUNCTION {incollection}
new.block
format.address.publisher output
format.year "year" output.check
- format.pages bbl.colon output.after
+ format.extracted.pages bbl.colon output.after
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1361,6 +1510,7 @@ FUNCTION {incollection}
FUNCTION {periodical}
{ output.bibitem
+ output.translation
format.authors output
author format.key output
new.block
@@ -1373,8 +1523,8 @@ FUNCTION {periodical}
format.address.publisher output
format.date "year" output.check
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1382,21 +1532,26 @@ FUNCTION {periodical}
FUNCTION {article}
{ output.bibitem
+ output.translation
format.authors output
author format.key output
new.block
- format.title "title" output.check
- "J" set.entry.mark
- format.mark "" output.after
- new.block
+ title.in.journal
+ { format.title "title" output.check
+ "J" set.entry.mark
+ format.mark "" output.after
+ new.block
+ }
+ 'skip$
+ if$
format.journal "journal" output.check
format.date "year" output.check
format.journal.volume output
format.journal.number "" output.after
format.journal.pages "" output.after
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1404,6 +1559,7 @@ FUNCTION {article}
FUNCTION {patent}
{ output.bibitem
+ output.translation
format.authors output
author format.key output
new.block
@@ -1413,8 +1569,8 @@ FUNCTION {patent}
new.block
format.date "year" output.check
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
new.block
format.note output
fin.entry
@@ -1423,7 +1579,9 @@ FUNCTION {patent}
FUNCTION {electronic}
{ #1 #1 check.electronic
#1 'entry.is.electronic :=
+ #1 'is.pure.electronic :=
output.bibitem
+ output.translation
format.authors output
author format.key output
new.block
@@ -1439,8 +1597,45 @@ FUNCTION {electronic}
format.pages bbl.colon output.after
format.editdate "" output.after
format.urldate "" output.after
- format.url output
- format.doi output
+ output.url
+ output.doi
+ new.block
+ format.note output
+ fin.entry
+}
+
+FUNCTION {preprint}
+{ output.bibitem
+ output.translation
+ author empty$ not
+ { format.authors }
+ { editor empty$ not
+ { format.editors }
+ { "empty author and editor in " cite$ * warning$
+ ""
+ }
+ if$
+ }
+ if$
+ output
+ new.block
+ title.in.journal
+ { format.series.vol.num.title "title" output.check
+ "Z" set.entry.mark
+ format.mark "" output.after
+ new.block
+ }
+ 'skip$
+ if$
+ format.translators output
+ new.sentence
+ format.edition output
+ new.block
+ output.eprint
+ format.year "year" output.check
+ format.pages bbl.colon output.after
+ format.urldate "" output.after
+ output.url
new.block
format.note output
fin.entry
@@ -1453,10 +1648,14 @@ FUNCTION {misc}
'incollection
{ publisher empty$ not
'monograph
- { entry.is.electronic
- 'electronic
- { "Z" set.entry.mark
- monograph
+ { eprint empty$ not show.preprint and
+ 'preprint
+ { entry.is.electronic
+ 'electronic
+ { "Z" set.entry.mark
+ monograph
+ }
+ if$
}
if$
}
@@ -1556,10 +1755,7 @@ FUNCTION {techreport}
misc
}
-FUNCTION {unpublished}
-{ "Z" set.entry.mark
- misc
-}
+FUNCTION {unpublished} { misc }
FUNCTION {default.type} { misc }
@@ -1760,6 +1956,7 @@ FUNCTION {presort}
{ set.entry.lang
set.entry.numbered
show.url show.doi check.electronic
+ #0 'is.pure.electronic :=
calc.label
label sortify
" "
@@ -1828,19 +2025,25 @@ FUNCTION {begin.bib}
write$ newline$
"\providecommand{\url}[1]{#1}"
write$ newline$
- "\expandafter\ifx\csname urlstyle\endcsname\relax\relax\else"
+ "\expandafter\ifx\csname urlstyle\endcsname\relax\else"
write$ newline$
" \urlstyle{same}\fi"
write$ newline$
- show.doi
- { "\providecommand{\href}[2]{\url{#2}}"
+ "\expandafter\ifx\csname href\endcsname\relax"
+ write$ newline$
+ " \DeclareUrlCommand\doi{\urlstyle{rm}}"
+ write$ newline$
+ " \def\eprint#1#2{#2}"
+ write$ newline$
+ "\else"
+ write$ newline$
+ " \def\doi#1{\href{https://doi.org/#1}{\nolinkurl{#1}}}"
+ write$ newline$
+ " \let\eprint\href"
write$ newline$
- "\providecommand{\doi}[1]{\href{https://doi.org/#1}{#1}}"
+ "\fi"
write$ newline$
}
- 'skip$
- if$
-}
FUNCTION {end.bib}
{ newline$
diff --git a/macros/latex/contrib/thuthesis/thuthesis.dtx b/macros/latex/contrib/thuthesis/thuthesis.dtx
index fe1a16b6fa..f96a2d4b72 100644
--- a/macros/latex/contrib/thuthesis/thuthesis.dtx
+++ b/macros/latex/contrib/thuthesis/thuthesis.dtx
@@ -17,7 +17,7 @@
%
% \iffalse
%<*driver>
-\ProvidesFile{thuthesis.dtx}[2020/06/14 6.1.2 Tsinghua University Thesis Template]
+\ProvidesFile{thuthesis.dtx}[2020/07/09 6.1.3 Tsinghua University Thesis Template]
\documentclass{ltxdoc}
\usepackage{dtx-style}
@@ -798,15 +798,15 @@
% 也可以使用 \cs{inlinecite}\marg{key} 临时使用正文模式的引用标注。
%
% \paragraph{著者-出版年制}
-% 著者-出版年制的参考文献引用有三种模式:
+% 著者-出版年制的参考文献引用有两种模式:
% \begin{enumerate}
% \item \cs{citep}:著者与年份均在括号中,比如“(Zhang, 2008)”,
% 同默认的 \cs{cite} 命令;
% \item \cs{citet}:著者姓名作为正文的一部分,比如“Zhang (2008)”;
-% \item \cs{citeyear}:只插入年份,但不含括号,比如“2008”。
% \end{enumerate}
%
-% 关于参考文献引用的更多细节参考 \pkg{natbib} 的文档。
+% 另外还有 \cs{citeauthor}、\cs{citeyear} 等命令分别标注文献的著者姓名和年份,
+% 更多的引用文献标注法参考 \pkg{natbib} 的文档。
%
% \subsection{其他部分}
%
@@ -877,14 +877,15 @@
% \statement[scan-statement.pdf]
% \end{latex}
%
-% 由于打印版和电子版有空白页的差别,声明的页码可能不同。所以编译声明页时默认不加页码,
-% 在签字后插入扫描页时再补上页码,防止页码冲突。
+% 由于打印版和电子版有空白页的差别,声明的页码可能不同。
+% 所以编译声明页时默认不加页眉和页脚,
+% 在签字后插入扫描页时再补上页眉和页脚,防止页码冲突。
%
-% \DescribeOption{statement-page-number}
+% \DescribeOption{statement-page-style}
% 如果需要编译时也加页码(如直接对电子版进行签名而不是插入扫描页),可以使用在 \cs{statement} 前设置
% \begin{latex}
% \thusetup{
-% statement-page-number = true,
+% statement-page-style = plain,
% }
% \end{latex}
% 注意,插入扫描页总是会加页码,不受该选项控制。
@@ -1082,7 +1083,7 @@
% \begin{macrocode}
%<cls>\NeedsTeXFormat{LaTeX2e}[2017/04/15]
%<cls>\ProvidesClass{thuthesis}
-%<cls>[2020/06/14 6.1.2 Tsinghua University Thesis Template]
+%<cls>[2020/07/09 6.1.3 Tsinghua University Thesis Template]
% \end{macrocode}
%
% 报错
@@ -1090,6 +1091,9 @@
\newcommand\thu@error[1]{%
\ClassError{thuthesis}{#1}{}%
}
+\newcommand\thu@warning[1]{%
+ \ClassWarning{thuthesis}{#1}%
+}
% \end{macrocode}
%
% 检查 \LaTeXe{} kernel 版本
@@ -1116,7 +1120,7 @@
%<*cls>
\hyphenation{Thu-Thesis}
\def\thuthesis{ThuThesis}
-\def\version{6.1.2}
+\def\version{6.1.3}
\RequirePackage{kvdefinekeys}
\RequirePackage{kvsetkeys}
\RequirePackage{kvoptions}
@@ -1779,6 +1783,7 @@
BoldFont = *-bold,
ItalicFont = *-italic,
BoldItalicFont = *-bolditalic,
+ Ligatures = CommonOff,
]%
}
\newcommand\thu@load@font@xits{%
@@ -2141,7 +2146,7 @@
% \begin{macrocode}
\let\thu@main@language\thu@language
\thu@option@hook{language}{%
- \ifx\@begindocumenthook\@undefined
+ \ifx\@begindocumenthook\@undefined\else
\let\thu@main@language\thu@language
\fi
}
@@ -2203,7 +2208,7 @@
\thu@set@chapter@names
\thu@option@hook{degree}{\thu@set@chapter@names}
\thu@option@hook{language}{%
- \ifx\@begindocumenthook\@undefined
+ \ifx\@begindocumenthook\@undefined\else
\thu@set@chapter@names
\fi
}
@@ -2341,13 +2346,6 @@
\pagestyle{plain}
% \end{macrocode}
%
-% 用于声明页,不含页脚。
-% \begin{macrocode}
-\fancypagestyle{nofooter}{%
- \fancyfoot{}%
-}
-% \end{macrocode}
-%
% \cs{chapter} 会调用特殊的 page style。
% \begin{macrocode}
\ctexset{chapter/pagestyle = plain}
@@ -3823,6 +3821,14 @@
% 声明部分(支持扫描文件替换)
% \begin{macrocode}
\thu@define@key{
+ statement-page-style = {
+ name = statement@page@style,
+ choices = {
+ empty,
+ plain,
+ },
+ default = empty,
+ },
statement-page-number = {
name = statement@page@number,
choices = {
@@ -3832,6 +3838,12 @@
default = false,
},
}
+\thu@option@hook{statement-page-number}{%
+ \thu@warning{%
+ The "statement-page-number" option is deprecated.
+ Use "statement-page-style" instead%
+ }%
+}
\newcommand\statement[1][]{%
\ifthu@degree@bachelor
\cleardoublepage
@@ -3840,7 +3852,7 @@
\ifx\thu@@tmp\@empty
\thu@chapter*{\thu@statement@name}%
\ifthu@statement@page@number@false
- \thispagestyle{nofooter}%
+ \thispagestyle{\thu@statement@page@style}%
\fi
\thu@statement@text\par
\ifthu@degree@graduate
@@ -3852,6 +3864,7 @@
\thu@backdate\thu@underline[2.5cm]\relax}%
\else
\includepdf[pagecommand={%
+ \markboth{\thu@statement@name}{}%
\thu@phantomsection
\addcontentsline{toc}{chapter}{\thu@statement@name}%
}]{#1}%
@@ -4273,7 +4286,7 @@
%
% \begin{macrocode}
\newcommand{\record}[1]{%
- \clearpage
+ \cleardoublepage
\thu@pdfbookmark{0}{综合论文训练记录表}%
\includepdf[pages=-]{#1}%
}
@@ -4675,7 +4688,7 @@
\RequirePackage{fontspec}[2017/01/20]
\RequirePackage{amsmath}
\RequirePackage{unicode-math}
-\RequirePackage[UTF8,scheme=chinese]{ctex}
+\RequirePackage[UTF8,scheme=chinese,fontset=fandol]{ctex}
\RequirePackage[
top=2.5cm, bottom=2.5cm,
left=4cm, right=2cm,
@@ -4732,6 +4745,7 @@
ItalicFont = *-italic,
BoldItalicFont = *-bolditalic,
Scale = MatchLowercase,
+ Ligatures = CommonOff,
]{texgyrecursor}
}
\unimathsetup{
diff --git a/macros/latex/contrib/thuthesis/thuthesis.pdf b/macros/latex/contrib/thuthesis/thuthesis.pdf
index 1891336779..d2d3ee64d7 100644
--- a/macros/latex/contrib/thuthesis/thuthesis.pdf
+++ b/macros/latex/contrib/thuthesis/thuthesis.pdf
Binary files differ