texlive[59975] Master: easing (18jul21)

commits+karl at tug.org commits+karl at tug.org
Sun Jul 18 22:23:12 CEST 2021


Revision: 59975
          http://tug.org/svn/texlive?view=revision&revision=59975
Author:   karl
Date:     2021-07-18 22:23:12 +0200 (Sun, 18 Jul 2021)
Log Message:
-----------
easing (18jul21)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/easing/
    trunk/Master/texmf-dist/doc/latex/easing/README
    trunk/Master/texmf-dist/doc/latex/easing/easing.pdf
    trunk/Master/texmf-dist/source/latex/easing/
    trunk/Master/texmf-dist/source/latex/easing/easing.dtx
    trunk/Master/texmf-dist/source/latex/easing/easing.ins
    trunk/Master/texmf-dist/tex/latex/easing/
    trunk/Master/texmf-dist/tex/latex/easing/pgflibraryeasing.code.tex
    trunk/Master/tlpkg/tlpsrc/easing.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/easing/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easing/README	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/easing/README	2021-07-18 20:23:12 UTC (rev 59975)
@@ -0,0 +1,18 @@
+easing -- easing functions for pgfmath
+
+DESCRIPTION
+
+This library implements a collection of easing functions, and adds
+them to the PGF mathematical engine.
+
+Works with TeX and LaTeX. The latest version (0.1) of this package was
+tested with PGF version 3.19a.
+
+LICENSE
+
+This material is subject to the LaTeX Project Public License version
+1.3 or later.
+
+CHANGELOG
+
+0.1 2021/07/18 - initial release.


Property changes on: trunk/Master/texmf-dist/doc/latex/easing/README
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/easing/easing.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/easing/easing.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/easing/easing.pdf	2021-07-18 20:22:29 UTC (rev 59974)
+++ trunk/Master/texmf-dist/doc/latex/easing/easing.pdf	2021-07-18 20:23:12 UTC (rev 59975)

Property changes on: trunk/Master/texmf-dist/doc/latex/easing/easing.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/easing/easing.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/easing/easing.dtx	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/easing/easing.dtx	2021-07-18 20:23:12 UTC (rev 59975)
@@ -0,0 +1,1073 @@
+% \iffalse meta-comment
+%
+% Copyright (C) 2021 Lo̍h Ka-tsùn
+%
+% This file may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version.  The latest version of this
+% license is in:
+%
+%     http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of LaTeX version
+% 2005/12/01 or later.
+%
+% \fi
+% \iffalse
+%<*driver>
+\documentclass{ltxdoc}
+\usepackage{parskip}
+\usepackage{pgfplots}
+\usepgflibrary{easing}
+% \usepackage{hyperref}
+\newcommand{\pgf}{\textsc{pgf}}
+\EnableCrossrefs
+\CodelineIndex
+\RecordChanges
+\CheckSum{594}
+\changes{0.1}{2021/07/18}{Initial version}
+\begin{document}
+\DocInput{easing.dtx}
+\end{document}
+%</driver>
+% \fi
+% ^^A for drawing nice little graphs of the functions. pgfplots is
+% ^^A probably overkill for this, so here's some ad-hoc TikZ-ing;
+% ^^A hopefully to be tidied up substantially in a future version:
+%
+%   \def\graphmargindefaulty{0.16}
+%   \def\graphmarginx{0.12}
+%   \edef\graphmarginy{\graphmargindefaulty}
+% \newenvironment{easinggraph}{%
+% \begin{tikzpicture}[x=2.8cm,y=2.8cm]
+%   \fill[white!97!black, use as bounding box]
+%     (-\graphmarginx,-\graphmarginy) rectangle
+%     ({1+\graphmarginx},{1+\graphmarginy});
+%   \draw[white!60!black]
+%     ({1+\graphmarginx},0) -- (-\graphmarginx,0) node[left] {$0$}
+%     ({1+\graphmarginx},1) -- (-\graphmarginx,1) node[left] {$1$};
+%   \draw[white!60!black,dashed]
+%     (0,1) -- (0,-\graphmarginy) node[below] {$a$}
+%     (1,1) -- (1,-\graphmarginy) node[below] {$b$};
+% }{\end{tikzpicture}}
+% \newcommand{\easinggraphplot}[2]{%
+%   \pgfmathparse{#2}
+%   \draw[white!\pgfmathresult!black,thick]
+%     (-\graphmarginx,0) -- (0,0)
+%     \foreach\x in{0,0.01,...,1}{--(\x,{#1(0,1,\x)})}
+%     -- (1,1) -- ({1+\graphmarginx},1);
+% }
+% \newcommand{\easinggraphplotfive}[4]{%
+%   \easinggraphlabel{#1\easingtype}{
+%     \foreach[count=\countv]\paramv
+%       in{#4}{\pgfmathparse{
+%         18*(5-\countv)}{\color{
+%         white!\pgfmathresult!black}\ifnum\countv=1\relax
+%         #3=\else,\fi\paramv}}}
+%   \foreach[count=\countv]\paramv in{#4}{%
+%     \pgfkeys{/easing/#1/#2=\paramv}
+%     \easinggraphplot{#1\easingtype}{18*(5-\countv)}
+%   }
+% }
+% \newcommand{\easinggraphlabel}[2]{%
+%   \node[anchor=text] at (-\graphmarginx,{1+\graphmarginy})
+%     {\footnotesize\tt\raisebox{\baselineskip}{\parbox{3.5cm}{#1\\[-0.4ex]#2}}};
+% }
+% \newcommand{\foreachtypeeasinggraph}[1]{%
+%   \vspace{2\baselineskip}
+%   \foreach[count=\easingtypen]\easingtype in{easein,step,easeout}{%
+%   \ifnum\easingtypen>1\hspace{\fill}\fi
+%   \begin{easinggraph}#1\end{easinggraph}
+%   }
+%   \vspace{\baselineskip}
+% }
+%
+% ^^A for printing code listings. again, there's probably a "proper"
+% ^^A way to do this, but this is good enough i guess
+%
+% \newenvironment{fakelisting}{
+%   \begingroup\parskip 0pt\par\hrulefill}{
+%   \vspace{-1.3\baselineskip}\hrulefill\endgroup
+%   \vspace{\parskip}}
+%
+% ^^A body of documentation proper begins here.
+%
+% \title{The \textsf{easing}\thanks{version 0.1, dated
+% 2021/07/18. This version was tested with \pgf{} version 3.1.9a}
+% \ Library for \pgf}
+%
+% \author{Loh Ka-tsun\thanks{\texttt{loh.ka.tsun at gmail.com}}}
+% \date{}
+% \maketitle
+%
+% \thispagestyle{empty}
+% \vspace{-2em}
+% \begin{center}
+% \begin{easinggraph}
+% \easinggraphplot{smootherstep}{46}
+% \easinggraphplot{smoothstep}{0}
+% \end{easinggraph}
+% \end{center}
+%
+% \tableofcontents\pagebreak
+%
+% \section{Introduction}
+% This library adds easing functions to the \pgf{} mathematical engine.
+%
+% \section{Installation}
+%
+% The \textsf{easing} library is a \pgf{} library; it works both with
+% \LaTeX{} and with plain \TeX{}. Once the file
+% |pgflibraryeasing.code.tex| is in a directory searched by \TeX, the
+% library can be loaded as follows:
+%
+% with plain \TeX:
+% \begin{fakelisting}\begin{verbatim}
+% \input pgf
+% \usepgflibrary{easing}
+% \end{verbatim}\end{fakelisting}
+%
+% with \LaTeX:
+% \begin{fakelisting}\begin{verbatim}
+% \usepackage{pgf}
+% \usepgflibrary{easing}
+% \end{verbatim}\end{fakelisting}
+%
+% The \textsf{easing} library is compatible with, but does not depend
+% on, the floating point unit library provided by \pgf{}. To use both
+% \textsf{easing} and the FPU, the FPU (or any packages/libraries
+% which use the FPU, such as \textsf{pgfplots}) must be loaded
+% before the \textsf{easing} library.
+%
+% \section{Usage}
+%
+% The routines implemented by the \textsf{easing} library are added to
+% \pgf{}'s mathematical engine with |\pgfmathdeclarefunction|, so that
+% they are recognised by by |\pgfmathparse| and can be used in any
+% expression which is processed by the parser.
+% As a first example, the following code produces plots of the
+% function |smoothstep(|$a$|,|$b$|,|$x$|)| against the argument $x$,
+% with one endpoint $a=0$ and the other endpoint $b$ ranging through
+% the integers $-1$ to $3$:
+%
+% \vspace{\parskip}
+% \hspace{-0.05\textwidth}
+% \begin{minipage}[h]{0.55\textwidth}
+% \tikzpicture
+% \axis[
+%   width=\textwidth, ^^A we lie a little and omit this from the source listing
+%   domain=-1.2:3.2, samples=64,
+%   xmin=-1.2, xmax=3.2,
+%   cycle list={[samples of colormap=6 of viridis]},
+%   no marks, thick]
+% \pgfplotsinvokeforeach{-1,...,3}{\addplot{smoothstep(0,#1,x)};}
+% \endaxis
+% \endtikzpicture
+% \end{minipage}%
+% \begin{minipage}[h]{0.5\textwidth}
+% \begin{fakelisting}\begin{verbatim}
+% \input pgfplots
+% \usepgflibrary{easing}
+% \tikzpicture
+% \axis[
+%   domain=-1.2:3.2, samples=64,
+%   xmin=-1.2, xmax=3.2,
+%   cycle list={
+%     [samples of colormap=6 of viridis]},
+%   no marks, thick]
+% \pgfplotsinvokeforeach{-1,...,3}{
+%   \addplot{smoothstep(0,#1,x)};}
+% \endaxis
+% \endtikzpicture
+% \end
+% \end{verbatim}\end{fakelisting}
+% \end{minipage}
+% \vspace{\parskip}
+%
+% (This example also demonstrates the behaviour of the easing
+% functions in some special cases: when the endpoints $b\le a$, and in
+% particular the degenerate case where $a=b$, in which the library
+% chooses to consider the function that is $1$ for all $x\ge 0$ and
+% $0$ otherwise.)
+%
+% Like all functions declared in this way, the functions implemented
+% by \textsf{easing} are also available as ``public'' macros, such as
+% |\pgfmathsmoothstep|:
+%
+% \vspace{\parskip}
+% \begin{minipage}[h]{0.5\textwidth}
+% \foreach\x in{0,0.25,...,1}{
+%   \pgfmathsmoothstep{0}{1}{\x}
+%   $S_1(\x)=\pgfmathresult$\par
+% }
+% \end{minipage}%
+% \begin{minipage}[h]{0.5\textwidth}
+% \begin{fakelisting}\begin{verbatim}
+% \input pgf
+% \usepgflibrary{easing}
+% \foreach\x in{0,0.25,...,1}{
+%   \pgfmathsmoothstep{0}{1}{\x}
+%   $S_1(\x)=\pgfmathresult$\par
+% }
+% \end
+% \end{verbatim}\end{fakelisting}
+% \end{minipage}
+% \vspace{\parskip}
+%
+% See Part VIII of the \pgf{} manual for more details on the
+% mathematical engine.
+%
+% \subsection{Naming conventions}
+%
+% For each shape, three functions are declared, all of which take
+% three arguments $a,b$, and $x$. Where $a<b$, all of these function
+% take value $0$ whenever $x\le a$ and $1$ whenever $x\ge b$. The
+% names of the functions adhere to the following pattern:
+%
+% \begin{itemize}
+%
+% \item The \emph{ease-in} form \meta{shape}|easein(|$a$|,|$b$|,|$x$|)| has easing
+% applied near the endpoint $a$.
+%
+% \item The \emph{ease-out} form \meta{shape}|easeout(|$a$|,|$b$|,|$x$|)| has
+% easing applied near the endpoint $b$. Its graph is that of the
+% ease-in form reflected about both axes.
+%
+% \item The \emph{step function} form \meta{shape}|step(|$a$|,|$b$|,|$x$|)| has
+% easing applied near both endpoints. Its graph is that of the ease-in
+% and ease-out forms concatenated then appropriately scaled.
+%
+% \end{itemize}
+%
+% \vspace{\parskip}
+% \begin{minipage}[h]{0.5\textwidth}
+% \tikzpicture
+% \foreach\x in{0,...,12}{
+%   \draw[gray,dashed]
+%     (0,-1) -- (0,4) (5,-1) -- (5,4);
+%   \draw[thick]
+%     ({5*smootheasein(0,12,\x)},3)
+%     circle (0.25)
+%     ({5*smoothstep(0,12,\x)},1.5)
+%     circle (0.25)
+%     ({5*smootheaseout(0,12,\x)},0)
+%     circle (0.25);
+% }
+% \endtikzpicture
+% \end{minipage}%
+% \begin{minipage}[h]{0.5\textwidth}
+% \begin{fakelisting}\begin{verbatim}
+% \input tikz
+% \usepgflibrary{easing}
+% \tikzpicture
+% \foreach\x in{0,...,12}{
+%   \draw[gray,dashed]
+%     (0,-1) -- (0,4) (5,-1) -- (5,4);
+%   \draw[thick]
+%     ({5*smootheasein(0,12,\x)},3)
+%     circle (0.25)
+%     ({5*smoothstep(0,12,\x)},1.5)
+%     circle (0.25)
+%     ({5*smootheaseout(0,12,\x)},0)
+%     circle (0.25);
+% }
+% \endtikzpicture
+% \end
+% \end{verbatim}\end{fakelisting}
+% \end{minipage}
+% \vspace{\parskip}
+%
+% \subsection{Specifying parameters}
+%
+% Some of these shapes can be modified by adjusting one or more
+% parameters, which is done through |pgfkeys|: the parameter
+% \meta{param} for functions of shape \meta{shape} is specified by
+% setting the \pgf{} key |/easing/|\meta{shape}|/|\meta{param}:
+%
+% \vspace{\parskip}
+% \begin{minipage}[h]{0.5\textwidth}
+% \hspace{-0.11\textwidth}
+% \tikzpicture
+% \axis[
+%   width=1.1\textwidth, ^^A give up on understanding how pgfplots
+%                        ^^A computes the width of a graph and just
+%                        ^^A eyeball it
+%   domain=-0.2:1.2, samples=64,
+%   xmin=0, xmax=1, enlarge x limits,
+%   cycle list={
+%     [samples of colormap=6 of viridis]},
+%   no marks, thick]
+% \pgfplotsinvokeforeach{0,...,4}{
+%   \pgfkeys{easing,back/overshoot=#1}
+%   \addplot{backeaseout(0,1,x)};
+% }
+% \endaxis
+% \endtikzpicture
+% \end{minipage}%
+% \begin{minipage}[h]{0.5\textwidth}
+% \begin{fakelisting}\begin{verbatim}
+% \input pgfplots
+% \usepgflibrary{easing}
+% \tikzpicture
+% \axis[
+%   domain=-0.2:1.2, samples=64,
+%   xmin=0, xmax=1, enlarge x limits,
+%   cycle list={
+%     [samples of colormap=6 of viridis]},
+%   no marks, thick]
+% \pgfplotsinvokeforeach{0,...,4}{
+%   \pgfkeys{easing,back/overshoot=#1}
+%   \addplot{backeaseout(0,1,x)};
+% }
+% \endaxis
+% \endtikzpicture
+% \end
+% \end{verbatim}\end{fakelisting}
+% \end{minipage}
+% \vspace{\parskip}
+%
+% Setting a parameter affects the ease-in, step, and ease-out forms of
+% the relevant function at once.
+%
+% For detailed descriptions of the parameters admitted by each shape,
+% see the following section.
+%
+% \section{List of easing function shapes}
+%
+% An exhaustive list follows of all the easing functions implemented
+% by the \textsf{easing} library. For clarity, where mathematical
+% expressions are given for functions, they are written in terms of
+% a parameter $t$ equal to $\frac{x}{b-a}$.
+%
+% \subsection{Polynomials}
+%
+% \subsubsection{The \texttt{smooth} and \texttt{smoother} shapes}
+%
+% The step function form of the |smooth| shape is a third-order
+% Hermite polynomial interpolation between $0$ and $1$, so that the
+% first derivate at the endpoints are zero. It is defined $3t^2-2t^3$
+% for $0\le t\le 1$.
+%
+% The step function form of the |smoother| shape is a fifth-order
+% Hermite polynomial interpolation between $0$ and $1$, so that the
+% first and second derivatives at the endpoints are zero. It is defined
+% $10t^3-15t^4+6t^5$ for $0\le t\le 1$.
+%
+% \foreachtypeeasinggraph{%
+%     \easinggraphlabel{smooth\easingtype}{{\color{white!46!black}smoother\easingtype}}
+%     \easinggraphplot{smoother\easingtype}{46}
+%     \easinggraphplot{smooth\easingtype}{0}
+% }
+%
+% \subsubsection{The \texttt{pow} shape and friends (\texttt{linear}, \texttt{quad},
+% \texttt{cubic}, \texttt{quart}, and \texttt{quint})}
+%
+% Polynomial easing. The ease-in form is defined as $t^n$ for $0\le
+% t\le 1$, where the exponent $n$ is set with the \pgf{} key
+% |/easing/pow/exponent|, and should be greater than $0$. The parameter
+% defaults to $n=2.4$.
+%
+% When $n=1$, the function is linear between $0$ and $1$. For
+% $0<n\le1$, the ease-in form has discontinuous derivative at $0$.
+%
+% The shapes |linear|, |quad|, |cubic|, |quart|, and |quint| are the
+% same functions as |pow| with $n=1,\dots,5$,
+% respectively. Computations for these shapes are implemented with
+% \TeX{} registers, which is a little faster and more accurate than
+% setting the argument then evaluating the equivalent |pow| function.
+%
+% \foreachtypeeasinggraph{%
+%   \easinggraphplotfive{pow}{exponent}{n}{0.5,1,2,3,4}}
+%
+% \subsubsection{The \texttt{back} shape}
+%
+% Anticipatory easing. The ease-in form is defined as $t^2(1-t)s+t^3$
+% for $0\le t\le 1$, where the parameter $s$ is set with the \pgf{} key
+% |/easing/back/overshoot|. The parameter defaults to $s=1.6$.
+%
+% When $s\le0$, there is no overshoot. When $s=0$, the function is
+% equivalent to |pow| with $n=3$.
+%
+% \def\graphmarginy{0.3}
+% \foreachtypeeasinggraph{%
+%   \easinggraphplotfive{back}{overshoot}{s}{-0.8,0.0,0.8,1.6,2.4}}
+% \edef\graphmarginy{\graphmargindefaulty}
+%
+% \subsection{Trigonometric and exponential}
+%
+% \subsubsection{The \texttt{sine} shape}
+%
+% An easing function that looks like a section of a sinusoid. The ease-out form is
+% defined as $\sin(\frac{\pi}{2}t)$ for $0\le t\le 1$.
+%
+% This shape admits no parameters.
+%
+% \foreachtypeeasinggraph{%
+%   \easinggraphlabel{\phantom{nothing here}}{sine\easingtype}
+%   \easinggraphplot{sine\easingtype}{0}}
+%
+% \subsubsection{The \texttt{exp} shape}
+%
+% An easing function that looks like an exponential function. The
+% ease-in form is defined as $e^{c (t-1)}$ for $0\le t\le 1$, where
+% the parameter $c$ is set with the \pgf{} key |/easing/exp/speed|,
+% and should be greater than $0$. The parameter defaults to
+% $c=7.2$.
+%
+% Because of the nature of the exponential function, this shape is
+% only approximately continuous at the endpoints $a$ and $b$. In
+% practice, the discontinuity only becomes noticeable for small
+% $c$, around $c\le 4$.
+%
+% \foreachtypeeasinggraph{%
+%   \easinggraphplotfive{exp}{speed}{c}{4,7,10,13,16}}
+%
+% \subsection{Other}
+%
+% \subsubsection{The \texttt{circ} shape}
+%
+% An easing function whose graph is part of an ellipse. This shape
+% admits no parameters.
+%
+% \foreachtypeeasinggraph{%
+%   \easinggraphlabel{\phantom{nothing here}}{circ\easingtype}
+%   \easinggraphplot{circ\easingtype}{0}}
+%
+% \subsubsection{The \texttt{elastic} shape}
+%
+% Easing function that looks like a damped harmonic oscillator. The
+% ease-out form is defined as $e^c(t-1)\cos(2\pi f (1-t))$. This shape
+% admits two parameters:
+%
+% \begin{itemize}
+%
+% \item The frequency $f$ is the number of oscillations between the
+% endpoints. It is set with the \pgf{} key
+% |/easing/elastic/frequency|, and should be greater than $0$. The
+% frequency defaults to $f=3$.
+%
+% \item The damping coefficient $b$ affects the speed at which the
+% amplitude decays. It is set with the \pgf{} key
+% |/easing/elastic/damping|, and should be greater than zero. The
+% damping coefficient defaults to $b=7.2$.
+%
+% \end{itemize}
+%
+% The function overshoots the range $[0,1]$ when $f>0.5$. For $0<f\le
+% 1$, this function becomes a family of anticipatory easing curves
+% that look slightly different from the |back| shape but are more
+% expensive to compute.
+%
+% ^^A twiddle with the size of the background so that the curves don't
+% ^^A overshoot the box
+%
+% \def\graphmarginy{0.5}
+% \foreachtypeeasinggraph{%
+%   \easinggraphplotfive{elastic}{frequency}{f}{0.5,1.4,2.3,3.2,4.1}}
+% \edef\graphmarginy{\graphmargindefaulty}
+%
+% \StopEventually{\PrintChanges}
+% \section{Implementation}
+%
+% \begin{macro}{\ifeasing at withfpu}
+% \begin{macro}{\easing at divide}
+%
+% This library uses \TeX{} registers and \pgf's mathematical engine for
+% computations.
+%
+% It is possible that the user is loading this library together with
+% the floating point unit library.  We save the basic routines from
+% |pgfmath|, so that when this happens, the FPU doesn't break
+% everything when it does a switcharoo with the |pgfmath| macros.
+%
+%    \begin{macrocode}
+\newif\ifeasing at withfpu
+\expandafter\ifx\csname pgflibraryfpuifactive\endcsname\relax
+\easing at withfpufalse
+\else
+\easing at withfputrue
+\fi
+\ifeasing at withfpu
+\let\easing at cos\pgfmath at basic@cos@
+\let\easing at divide\pgfmath at basic@divide@
+\let\easing at exp\pgfmath at basic@exp@
+\let\easing at ln\pgfmath at basic@ln@
+\let\easing at sqrt\pgfmath at basic@sqrt@
+\else
+\let\easing at cos\pgfmathcos@
+\let\easing at divide\pgfmathdivide@
+\let\easing at exp\pgfmathexp@
+\let\easing at ln\pgfmathln@
+\let\easing at sqrt\pgfmathsqrt@
+\fi
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\easing at linearstep@ne}
+% \begin{macro}{\easing at linearstep@fixed}
+% \begin{macro}{\easing at linearstep@float}
+% \begin{macro}{\easing at linearstep}
+%
+% In absence of the FPU, the next section of code defines
+% |\easing at linearstep|, which expects as arguments plain numbers
+% (i.e. things that can be assigned to dimension registers). The net
+% effect of |\easing at linearstep{#1}{#2}{#3}| is to set
+% |\pgfmathresult| to
+% $\frac{\mathtt{\#3}-\mathtt{\#1}}{\mathtt{\#2}-\mathtt{\#1}}$,
+% clamped to between $0$ and $1$.
+%
+% If the FPU is loaded, |\easing at linearstep| is instead named
+% |\easing at linearstep@fixed|, and we additionally define
+% |\easing at linearstep@float|, which expects FPU-format floats as
+% arguments. We do not format the output as a float since the FPU is
+% smart enough to do that conversion quietly on its own.
+%
+% The |\easing at linearstep| routine is the first step in the definition
+% of all other routines that compute easing functions.
+%
+%    \begin{macrocode}
+\def\easing at linearstep@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \ifdim1pt<\pgf at x\pgf at x 1pt\fi
+  \ifdim0pt>\pgf at x\pgf at x 0pt\fi
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\expandafter\def
+\csname easing at linearstep\ifeasing at withfpu @fixed\fi\endcsname#1#2#3{%
+  \begingroup
+  \pgf at xa#3pt
+  \pgf at xb#2pt
+  \pgf at xc#1pt
+  \ifdim\pgf at xb=\pgf at xc
+  \edef\pgfmathresult{\ifdim\pgf at xa>\pgf at xb 1\else 0\fi}%
+  \else
+  \advance\pgf at xa-\pgf at xc
+  \advance\pgf at xb-\pgf at xc
+  \easing at divide{\pgfmath at tonumber\pgf at xa}{\pgfmath at tonumber\pgf at xb}%
+  \easing at linearstep@ne\pgfmathresult
+  \fi
+  \pgfmathsmuggle\pgfmathresult
+  \endgroup
+}%
+\ifeasing at withfpu
+\def\easing at linearstep@float#1#2#3{%
+  \begingroup
+  \pgfmathfloatsubtract{#3}{#1}%
+  \edef\pgf at tempa{\pgfmathresult}%
+  \pgfmathfloatsubtract{#2}{#1}%
+  \edef\pgf at tempb{\pgfmathresult}%
+  \pgfmathfloatifflags{\pgf at tempb}{0}{%
+    \pgfmathfloatifflags{\pgf at tempa}{-}{%
+      \edef\pgfmathresult{0}%
+    }{%
+      \edef\pgfmathresult{1}%
+    }%
+  }{%
+    \pgfmathfloatdivide\pgf at tempa\pgf at tempb
+    \pgfmathfloattofixed{\pgfmathresult}%
+    \easing at linearstep@ne\pgfmathresult
+  }%
+  \pgfmathsmuggle\pgfmathresult
+  \endgroup
+}%
+\def\easing at linearstep#1#2#3{%
+  \pgflibraryfpuifactive{%
+    \easing at linearstep@float{#1}{#2}{#3}}{%
+    \easing at linearstep@fixed{#1}{#2}{#3}}%
+}%
+\fi
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\easing at linearstep@easein at ne}
+% \begin{macro}{\easing at linearstep@easeout at ne}
+%
+% The linear ease-in and ease-out functions are identical to the
+% linear step function. We define the respective macros so as not to
+% surprise the user with their absence.
+%
+%    \begin{macrocode}
+\let\easing at lineareasein\easing at linearstep
+\pgfmathdeclarefunction{lineareasein}{3}{%
+  \easing at lineareasein{#1}{#2}{#3}}%
+\let\easing at lineareaseout\easing at linearstep
+\pgfmathdeclarefunction{lineareaseout}{3}{%
+  \easing at lineareasein{#1}{#2}{#3}}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
+% ^^A the next few macros have long names, so we scoot this page to
+% ^^A the right to make space in the margins:
+%
+% \begingroup
+% \addtolength\oddsidemargin{50pt}
+% \addtolength\evensidemargin{50pt}
+%
+% \begin{macro}{\easing at derive@easein at nefromstep@ne}
+% \begin{macro}{\easing at derive@easeout at nefromstep@ne}
+% \begin{macro}{\easing at derive@step at nefromeasein@ne}
+% \begin{macro}{\easing at derive@easeout at nefromeasein@ne}
+%
+% The pattern in general is that, for each shape, we define the
+% one-parameter version of the step, ease-in, and ease-out routines
+% interpolating between values $0$ at $1$ at the ends of the unit
+% interval. Then by composing with |\easing at linearstep|, we obtain the
+% three-parameter versions that allow the user to specify the begin
+% and end points of the interpolation.
+%
+% Most of the time it suffices to define just one of the three
+% one-parameter versions of a shape to be able to infer the form of
+% all three. This is done with the  |\easing at derive|--|from|-- macros.
+%
+%    \begin{macrocode}
+\def\easing at derive@easein at nefromstep@ne#1{%
+  \expandafter\def\csname easing@#1easein at ne\endcsname##1{%
+    \begingroup
+    \pgf at x##1 pt
+    \divide\pgf at x 2
+    \csname easing@#1step at ne\endcsname{\pgfmath at tonumber\pgf at x}%
+    \pgf at x\pgfmathresult pt
+    \multiply\pgf at x 2
+    \pgfmathreturn\pgf at x
+    \endgroup
+  }%
+}%
+\def\easing at derive@easeout at nefromstep@ne#1{%
+  \expandafter\def\csname easing@#1easeout at ne\endcsname##1{%
+    \begingroup
+    \pgf at x##1 pt
+    \divide\pgf at x 2
+    \advance\pgf at x 0.5pt
+    \csname easing@#1step at ne\endcsname{\pgfmath at tonumber\pgf at x}%
+    \pgf at x\pgfmathresult pt
+    \multiply\pgf at x 2
+    \advance\pgf at x -1pt
+    \pgfmathreturn\pgf at x
+    \endgroup
+  }%
+}%
+\def\easing at derive@step at nefromeasein@ne#1{%
+  \expandafter\def\csname easing@#1step at ne\endcsname##1{%
+    \begingroup
+    \pgf at x##1 pt
+    \multiply\pgf at x 2
+    \ifdim\pgf at x<1pt
+    \csname easing@#1easein at ne\endcsname{\pgfmath at tonumber\pgf at x}%
+    \pgf at x\pgfmathresult pt
+    \divide\pgf at x 2
+    \else
+    \multiply\pgf at x -1
+    \advance\pgf at x 2pt
+    \csname easing@#1easein at ne\endcsname{\pgfmath at tonumber\pgf at x}%
+    \pgf at x\pgfmathresult pt
+    \divide\pgf at x 2
+    \multiply\pgf at x -1
+    \advance\pgf at x 1pt
+    \fi
+    \pgfmathreturn\pgf at x
+    \endgroup
+  }%
+}%
+\def\easing at derive@easeout at nefromeasein@ne#1{%
+  \expandafter\def\csname easing@#1easeout at ne\endcsname##1{%
+    \begingroup
+    \pgf at x##1pt
+    \multiply\pgf at x -1
+    \advance\pgf at x 1pt
+    \csname easing@#1easein at ne\endcsname{\pgfmath at tonumber\pgf at x}%
+    \pgf at x\pgfmathresult pt
+    \multiply\pgf at x -1
+    \advance\pgf at x 1pt
+    \pgfmathreturn\pgf at x
+    \endgroup
+  }%
+}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \endgroup ^^A marginpar modifications
+%
+% \begin{macro}{\easing at pgfmathinstall}
+%
+% The three-parameter versions of each routine is installed
+% into the mathematical engine, so that they are available in
+% |\pgfmathparse|.
+%
+%    \begin{macrocode}
+\def\easing at pgfmathinstall#1{%
+  \pgfmathdeclarefunction{#1step}{3}{%
+    \easing at linearstep{##1}{##2}{##3}%
+    \csname easing@#1step at ne\endcsname\pgfmathresult
+  }%
+  \pgfmathdeclarefunction{#1easein}{3}{%
+    \easing at linearstep{##1}{##2}{##3}%
+    \csname easing@#1easein at ne\endcsname\pgfmathresult
+  }%
+  \pgfmathdeclarefunction{#1easeout}{3}{%
+    \easing at linearstep{##1}{##2}{##3}%
+    \csname easing@#1easeout at ne\endcsname\pgfmathresult
+  }%
+}%
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\easing at smoothstep@ne}
+% \begin{macro}{\easing at smootheasein@ne}
+% \begin{macro}{\easing at smootheaseout@ne}
+%
+% The |smooth| shape.
+%
+%    \begin{macrocode}
+\def\easing at smoothstep@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \edef\pgf at temp{\pgfmath at tonumber\pgf at x}%
+  \multiply\pgf at x-2
+  \advance\pgf at x 3pt
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\easing at derive@easein at nefromstep@ne{smooth}%
+\easing at derive@easeout at nefromstep@ne{smooth}%
+\easing at pgfmathinstall{smooth}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\easing at smootherstep@ne}
+% \begin{macro}{\easing at smoothereasein@ne}
+% \begin{macro}{\easing at smoothereaseout@ne}
+%
+% The |smoother| shape.
+%
+%    \begin{macrocode}
+\def\easing at smootherstep@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \edef\pgf at temp{\pgfmath at tonumber\pgf at x}%
+  \multiply\pgf at x 6
+  \advance\pgf at x -15pt
+  \pgf at x\pgf at temp\pgf at x
+  \advance\pgf at x 10pt
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\easing at derive@easein at nefromstep@ne{smoother}%
+\easing at derive@easeout at nefromstep@ne{smoother}%
+\easing at pgfmathinstall{smoother}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\easing at powstep@ne}
+% \begin{macro}{\easing at poweasein@ne}
+% \begin{macro}{\easing at poweaseout@ne}
+%
+% The |pow| shape.
+%
+% Because of some wonkiness in the FPU, |\pgfmath at pow@basic@| actually
+% doesn't work. Instead of invoking the |pow| function, we compute
+% $t^n$ approximately by computing $e^{n\ln t}$ using |ln| and |exp|
+% instead (which is what |pgfmath| does anyway when the exponent is
+% not an integer.)
+%
+%    \begin{macrocode}
+\pgfkeys{/easing/.is family}%
+\pgfkeys{easing,
+  pow/exponent/.estore in=\easing at param@pow at exponent,
+  pow/exponent/.default=2.4,
+  pow/exponent}%
+\def\easing at poweasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \ifdim\pgf at x=0pt
+  \edef\pgfmathresult{0}%
+  \else
+  \easing at ln{#1}%
+  \pgf at x\pgfmathresult pt
+  \pgf at x\easing at param@pow at exponent\pgf at x
+  \easing at exp{\pgfmath at tonumber\pgf at x}%
+  \fi
+  \pgfmathsmuggle\pgfmathresult
+  \endgroup
+}%
+\easing at derive@easeout at nefromeasein@ne{pow}%
+\easing at derive@step at nefromeasein@ne{pow}%
+\easing at pgfmathinstall{pow}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\easing at quadstep@ne}
+% \begin{macro}{\easing at quadeasein@ne}
+% \begin{macro}{\easing at quadeaseout@ne}
+%
+% \begin{macro}{\easing at cubicstep@ne}
+% \begin{macro}{\easing at cubiceasein@ne}
+% \begin{macro}{\easing at cubiceaseout@ne}
+%
+% \begin{macro}{\easing at quartstep@ne}
+% \begin{macro}{\easing at quarteasein@ne}
+% \begin{macro}{\easing at quarteaseout@ne}
+%
+% \begin{macro}{\easing at quintstep@ne}
+% \begin{macro}{\easing at quinteasein@ne}
+% \begin{macro}{\easing at quinteaseout@ne}
+%
+% The |quad|--, |cubic|--, |quart|--, and |quint|-- routines have
+% explicit definitions.
+%
+%    \begin{macrocode}
+\def\easing at quadeasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \edef\pgf at temp{\pgfmath at tonumber\pgf at x}%
+  \pgf at x\pgf at temp\pgf at x
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\easing at derive@step at nefromeasein@ne{quad}%
+\easing at derive@easeout at nefromeasein@ne{quad}%
+\easing at pgfmathinstall{quad}%
+%
+\def\easing at cubiceasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \edef\pgf at temp{\pgfmath at tonumber\pgf at x}%
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\easing at derive@step at nefromeasein@ne{cubic}%
+\easing at derive@easeout at nefromeasein@ne{cubic}%
+\easing at pgfmathinstall{cubic}%
+%
+\def\easing at quarteasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \edef\pgf at temp{\pgfmath at tonumber\pgf at x}%
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\easing at derive@step at nefromeasein@ne{quart}%
+\easing at derive@easeout at nefromeasein@ne{quart}%
+\easing at pgfmathinstall{quart}%
+%
+\def\easing at quinteasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \edef\pgf at temp{\pgfmath at tonumber\pgf at x}%
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\easing at derive@step at nefromeasein@ne{quint}%
+\easing at derive@easeout at nefromeasein@ne{quint}%
+\easing at pgfmathinstall{quint}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\easing at backstep@ne}
+% \begin{macro}{\easing at backeasein@ne}
+% \begin{macro}{\easing at backeaseout@ne}
+%
+% The |back| shape.
+%
+%    \begin{macrocode}
+\pgfkeys{easing,
+  back/overshoot/.estore in=\easing at param@back at overshoot,
+  back/overshoot/.default=1.6,
+  back/overshoot}%
+\def\easing at backeasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \edef\pgf at temp{\pgfmath at tonumber\pgf at x}%
+  \advance\pgf at x -1pt
+  \pgf at x\easing at param@back at overshoot\pgf at x
+  \advance\pgf at x\pgf at temp pt
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\easing at derive@step at nefromeasein@ne{back}%
+\easing at derive@easeout at nefromeasein@ne{back}%
+\easing at pgfmathinstall{back}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\easing at sinestep@ne}
+% \begin{macro}{\easing at sineeasein@ne}
+% \begin{macro}{\easing at sineeaseout@ne}
+%
+% The |sine| shape.
+%
+% We write down both the |easein| and |step| forms of this, since they
+% are simple compared to what would have been obtained by
+% |\easing at derive|--.
+%
+%    \begin{macrocode}
+\def\easing at sineeasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \multiply\pgf at x 90
+  \easing at cos{\pgfmath at tonumber\pgf at x}%
+  \pgf at x\pgfmathresult pt
+  \multiply\pgf at x -1
+  \advance\pgf at x 1pt
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\def\easing at sinestep@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \multiply\pgf at x 180
+  \easing at cos{\pgfmath at tonumber\pgf at x}%
+  \pgf at x\pgfmathresult pt
+  \divide\pgf at x 2
+  \multiply\pgf at x -1
+  \advance\pgf at x 0.5pt
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\easing at derive@easeout at nefromeasein@ne{sine}%
+\easing at pgfmathinstall{sine}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\easing at expstep@ne}
+% \begin{macro}{\easing at expeasein@ne}
+% \begin{macro}{\easing at expeaseout@ne}
+%
+% The |exp| shape.
+%
+%    \begin{macrocode}
+\pgfkeys{easing,
+  exp/speed/.estore in=\easing at param@exponent at speed,
+  exp/speed/.default=7.2,
+  exp/speed}%
+\def\easing at expeasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \advance\pgf at x -1pt
+  \pgf at x\easing at param@exponent at speed\pgf at x
+  \easing at exp{\pgfmath at tonumber\pgf at x}%
+  \pgfmathsmuggle\pgfmathresult
+  \endgroup
+}%
+\easing at derive@step at nefromeasein@ne{exp}%
+\easing at derive@easeout at nefromeasein@ne{exp}%
+\easing at pgfmathinstall{exp}%
+%    \end{macrocode}
+%
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\easing at circstep@ne}
+% \begin{macro}{\easing at circeasein@ne}
+% \begin{macro}{\easing at circeaseout@ne}
+%
+% The |circ| shape.
+%
+%    \begin{macrocode}
+\def\easing at circeasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \advance\pgf at x -1pt
+  \edef\pgf at temp{\pgfmath at tonumber\pgf at x}%
+  \pgf at x\pgf at temp\pgf at x
+  \multiply\pgf at x -1
+  \advance\pgf at x 1pt
+  \easing at sqrt{\pgfmath at tonumber\pgf at x}%
+  \pgfmathsmuggle\pgfmathresult
+  \endgroup
+}%
+\easing at derive@step at nefromeasein@ne{circ}%
+\easing at derive@easeout at nefromeasein@ne{circ}%
+\easing at pgfmathinstall{circ}%
+%    \end{macrocode}
+%
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \begin{macro}{\easing at elasticstep@ne}
+% \begin{macro}{\easing at elasticeasein@ne}
+% \begin{macro}{\easing at elasticeaseout@ne}
+%
+% The |elastic| shape.
+%
+%    \begin{macrocode}
+\pgfkeys{easing,
+  elastic/frequency/.estore in=\easing at param@elastic at frequency,
+  elastic/damping/.estore in=\easing at param@elastic at damping,
+  elastic/frequency/.default=3,
+  elastic/damping/.default=7.2,
+  elastic/frequency, elastic/damping}%
+\def\easing at elasticeasein@ne#1{%
+  \begingroup
+  \pgf at xa#1pt
+  \advance\pgf at xa -1pt
+  \pgf at xb-\pgf at xa
+  \pgf at xa\easing at param@elastic at damping\pgf at xa
+  \easing at exp{\pgfmath at tonumber\pgf at xa}%
+  \pgf at xa\pgfmathresult pt
+  \pgf at xb 360\pgf at xb
+  \pgf at xb\easing at param@elastic at frequency\pgf at xb
+  \easing at cos{\pgfmath at tonumber\pgf at xb}%
+  \pgf at xa\pgfmathresult\pgf at xa
+  \pgfmathreturn\pgf at xa
+  \endgroup
+}%
+\easing at derive@step at nefromeasein@ne{elastic}%
+\easing at derive@easeout at nefromeasein@ne{elastic}%
+\easing at pgfmathinstall{elastic}%
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
+% \Finale


Property changes on: trunk/Master/texmf-dist/source/latex/easing/easing.dtx
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/source/latex/easing/easing.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/easing/easing.ins	                        (rev 0)
+++ trunk/Master/texmf-dist/source/latex/easing/easing.ins	2021-07-18 20:23:12 UTC (rev 59975)
@@ -0,0 +1,44 @@
+%% Copyright (C) 2021 Loh Ka-tsun
+%%
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 of this license
+%% or (at your option) any later version.  The latest version of this
+%% license is in:
+%%
+%%     http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+\input docstrip.tex
+\keepsilent
+\askforoverwritefalse
+\usedir{tex/generic/easing}
+\preamble
+
+This is a generated file.
+
+Copyright (C) 2021 Loh Ka-tsun
+
+This file may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, either version 1.3 of this license
+or (at your option) any later version.  The latest version of this
+license is in:
+
+     http://www.latex-project.org/lppl.txt
+
+and version 1.3 or later is part of all distributions of LaTeX version
+2005/12/01 or later.
+
+\endpreamble
+\generate{\file{pgflibraryeasing.code.tex}{\from{easing.dtx}{package}}}
+\obeyspaces
+\Msg{*********************************************************}
+\Msg{* To finish the installation, move the following file   *}
+\Msg{* into a directory searched by TeX:                     *}
+\Msg{*                                                       *}
+\Msg{*     pgflibraryeasing.code.tex                         *}
+\Msg{*                                                       *}
+\Msg{* To produce the documentation, run the file easing.dtx *}
+\Msg{* through LaTeX.                                        *}
+\Msg{*********************************************************}
+\endbatchfile

Added: trunk/Master/texmf-dist/tex/latex/easing/pgflibraryeasing.code.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/easing/pgflibraryeasing.code.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/easing/pgflibraryeasing.code.tex	2021-07-18 20:23:12 UTC (rev 59975)
@@ -0,0 +1,380 @@
+%%
+%% This is file `pgflibraryeasing.code.tex',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% easing.dtx  (with options: `package')
+%% 
+%% This is a generated file.
+%% 
+%% Copyright (C) 2021 Loh Ka-tsun
+%% 
+%% This file may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 of this license
+%% or (at your option) any later version.  The latest version of this
+%% license is in:
+%% 
+%%      http://www.latex-project.org/lppl.txt
+%% 
+%% and version 1.3 or later is part of all distributions of LaTeX version
+%% 2005/12/01 or later.
+%% 
+\newif\ifeasing at withfpu
+\expandafter\ifx\csname pgflibraryfpuifactive\endcsname\relax
+\easing at withfpufalse
+\else
+\easing at withfputrue
+\fi
+\ifeasing at withfpu
+\let\easing at cos\pgfmath at basic@cos@
+\let\easing at divide\pgfmath at basic@divide@
+\let\easing at exp\pgfmath at basic@exp@
+\let\easing at ln\pgfmath at basic@ln@
+\let\easing at sqrt\pgfmath at basic@sqrt@
+\else
+\let\easing at cos\pgfmathcos@
+\let\easing at divide\pgfmathdivide@
+\let\easing at exp\pgfmathexp@
+\let\easing at ln\pgfmathln@
+\let\easing at sqrt\pgfmathsqrt@
+\fi
+\def\easing at linearstep@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \ifdim1pt<\pgf at x\pgf at x 1pt\fi
+  \ifdim0pt>\pgf at x\pgf at x 0pt\fi
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\expandafter\def
+\csname easing at linearstep\ifeasing at withfpu @fixed\fi\endcsname#1#2#3{%
+  \begingroup
+  \pgf at xa#3pt
+  \pgf at xb#2pt
+  \pgf at xc#1pt
+  \ifdim\pgf at xb=\pgf at xc
+  \edef\pgfmathresult{\ifdim\pgf at xa>\pgf at xb 1\else 0\fi}%
+  \else
+  \advance\pgf at xa-\pgf at xc
+  \advance\pgf at xb-\pgf at xc
+  \easing at divide{\pgfmath at tonumber\pgf at xa}{\pgfmath at tonumber\pgf at xb}%
+  \easing at linearstep@ne\pgfmathresult
+  \fi
+  \pgfmathsmuggle\pgfmathresult
+  \endgroup
+}%
+\ifeasing at withfpu
+\def\easing at linearstep@float#1#2#3{%
+  \begingroup
+  \pgfmathfloatsubtract{#3}{#1}%
+  \edef\pgf at tempa{\pgfmathresult}%
+  \pgfmathfloatsubtract{#2}{#1}%
+  \edef\pgf at tempb{\pgfmathresult}%
+  \pgfmathfloatifflags{\pgf at tempb}{0}{%
+    \pgfmathfloatifflags{\pgf at tempa}{-}{%
+      \edef\pgfmathresult{0}%
+    }{%
+      \edef\pgfmathresult{1}%
+    }%
+  }{%
+    \pgfmathfloatdivide\pgf at tempa\pgf at tempb
+    \pgfmathfloattofixed{\pgfmathresult}%
+    \easing at linearstep@ne\pgfmathresult
+  }%
+  \pgfmathsmuggle\pgfmathresult
+  \endgroup
+}%
+\def\easing at linearstep#1#2#3{%
+  \pgflibraryfpuifactive{%
+    \easing at linearstep@float{#1}{#2}{#3}}{%
+    \easing at linearstep@fixed{#1}{#2}{#3}}%
+}%
+\fi
+\let\easing at lineareasein\easing at linearstep
+\pgfmathdeclarefunction{lineareasein}{3}{%
+  \easing at lineareasein{#1}{#2}{#3}}%
+\let\easing at lineareaseout\easing at linearstep
+\pgfmathdeclarefunction{lineareaseout}{3}{%
+  \easing at lineareasein{#1}{#2}{#3}}%
+\def\easing at derive@easein at nefromstep@ne#1{%
+  \expandafter\def\csname easing@#1easein at ne\endcsname##1{%
+    \begingroup
+    \pgf at x##1 pt
+    \divide\pgf at x 2
+    \csname easing@#1step at ne\endcsname{\pgfmath at tonumber\pgf at x}%
+    \pgf at x\pgfmathresult pt
+    \multiply\pgf at x 2
+    \pgfmathreturn\pgf at x
+    \endgroup
+  }%
+}%
+\def\easing at derive@easeout at nefromstep@ne#1{%
+  \expandafter\def\csname easing@#1easeout at ne\endcsname##1{%
+    \begingroup
+    \pgf at x##1 pt
+    \divide\pgf at x 2
+    \advance\pgf at x 0.5pt
+    \csname easing@#1step at ne\endcsname{\pgfmath at tonumber\pgf at x}%
+    \pgf at x\pgfmathresult pt
+    \multiply\pgf at x 2
+    \advance\pgf at x -1pt
+    \pgfmathreturn\pgf at x
+    \endgroup
+  }%
+}%
+\def\easing at derive@step at nefromeasein@ne#1{%
+  \expandafter\def\csname easing@#1step at ne\endcsname##1{%
+    \begingroup
+    \pgf at x##1 pt
+    \multiply\pgf at x 2
+    \ifdim\pgf at x<1pt
+    \csname easing@#1easein at ne\endcsname{\pgfmath at tonumber\pgf at x}%
+    \pgf at x\pgfmathresult pt
+    \divide\pgf at x 2
+    \else
+    \multiply\pgf at x -1
+    \advance\pgf at x 2pt
+    \csname easing@#1easein at ne\endcsname{\pgfmath at tonumber\pgf at x}%
+    \pgf at x\pgfmathresult pt
+    \divide\pgf at x 2
+    \multiply\pgf at x -1
+    \advance\pgf at x 1pt
+    \fi
+    \pgfmathreturn\pgf at x
+    \endgroup
+  }%
+}%
+\def\easing at derive@easeout at nefromeasein@ne#1{%
+  \expandafter\def\csname easing@#1easeout at ne\endcsname##1{%
+    \begingroup
+    \pgf at x##1pt
+    \multiply\pgf at x -1
+    \advance\pgf at x 1pt
+    \csname easing@#1easein at ne\endcsname{\pgfmath at tonumber\pgf at x}%
+    \pgf at x\pgfmathresult pt
+    \multiply\pgf at x -1
+    \advance\pgf at x 1pt
+    \pgfmathreturn\pgf at x
+    \endgroup
+  }%
+}%
+\def\easing at pgfmathinstall#1{%
+  \pgfmathdeclarefunction{#1step}{3}{%
+    \easing at linearstep{##1}{##2}{##3}%
+    \csname easing@#1step at ne\endcsname\pgfmathresult
+  }%
+  \pgfmathdeclarefunction{#1easein}{3}{%
+    \easing at linearstep{##1}{##2}{##3}%
+    \csname easing@#1easein at ne\endcsname\pgfmathresult
+  }%
+  \pgfmathdeclarefunction{#1easeout}{3}{%
+    \easing at linearstep{##1}{##2}{##3}%
+    \csname easing@#1easeout at ne\endcsname\pgfmathresult
+  }%
+}%
+\def\easing at smoothstep@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \edef\pgf at temp{\pgfmath at tonumber\pgf at x}%
+  \multiply\pgf at x-2
+  \advance\pgf at x 3pt
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\easing at derive@easein at nefromstep@ne{smooth}%
+\easing at derive@easeout at nefromstep@ne{smooth}%
+\easing at pgfmathinstall{smooth}%
+\def\easing at smootherstep@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \edef\pgf at temp{\pgfmath at tonumber\pgf at x}%
+  \multiply\pgf at x 6
+  \advance\pgf at x -15pt
+  \pgf at x\pgf at temp\pgf at x
+  \advance\pgf at x 10pt
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\easing at derive@easein at nefromstep@ne{smoother}%
+\easing at derive@easeout at nefromstep@ne{smoother}%
+\easing at pgfmathinstall{smoother}%
+\pgfkeys{/easing/.is family}%
+\pgfkeys{easing,
+  pow/exponent/.estore in=\easing at param@pow at exponent,
+  pow/exponent/.default=2.4,
+  pow/exponent}%
+\def\easing at poweasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \ifdim\pgf at x=0pt
+  \edef\pgfmathresult{0}%
+  \else
+  \easing at ln{#1}%
+  \pgf at x\pgfmathresult pt
+  \pgf at x\easing at param@pow at exponent\pgf at x
+  \easing at exp{\pgfmath at tonumber\pgf at x}%
+  \fi
+  \pgfmathsmuggle\pgfmathresult
+  \endgroup
+}%
+\easing at derive@easeout at nefromeasein@ne{pow}%
+\easing at derive@step at nefromeasein@ne{pow}%
+\easing at pgfmathinstall{pow}%
+\def\easing at quadeasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \edef\pgf at temp{\pgfmath at tonumber\pgf at x}%
+  \pgf at x\pgf at temp\pgf at x
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\easing at derive@step at nefromeasein@ne{quad}%
+\easing at derive@easeout at nefromeasein@ne{quad}%
+\easing at pgfmathinstall{quad}%
+\def\easing at cubiceasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \edef\pgf at temp{\pgfmath at tonumber\pgf at x}%
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\easing at derive@step at nefromeasein@ne{cubic}%
+\easing at derive@easeout at nefromeasein@ne{cubic}%
+\easing at pgfmathinstall{cubic}%
+\def\easing at quarteasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \edef\pgf at temp{\pgfmath at tonumber\pgf at x}%
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\easing at derive@step at nefromeasein@ne{quart}%
+\easing at derive@easeout at nefromeasein@ne{quart}%
+\easing at pgfmathinstall{quart}%
+\def\easing at quinteasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \edef\pgf at temp{\pgfmath at tonumber\pgf at x}%
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\easing at derive@step at nefromeasein@ne{quint}%
+\easing at derive@easeout at nefromeasein@ne{quint}%
+\easing at pgfmathinstall{quint}%
+\pgfkeys{easing,
+  back/overshoot/.estore in=\easing at param@back at overshoot,
+  back/overshoot/.default=1.6,
+  back/overshoot}%
+\def\easing at backeasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \edef\pgf at temp{\pgfmath at tonumber\pgf at x}%
+  \advance\pgf at x -1pt
+  \pgf at x\easing at param@back at overshoot\pgf at x
+  \advance\pgf at x\pgf at temp pt
+  \pgf at x\pgf at temp\pgf at x
+  \pgf at x\pgf at temp\pgf at x
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\easing at derive@step at nefromeasein@ne{back}%
+\easing at derive@easeout at nefromeasein@ne{back}%
+\easing at pgfmathinstall{back}%
+\def\easing at sineeasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \multiply\pgf at x 90
+  \easing at cos{\pgfmath at tonumber\pgf at x}%
+  \pgf at x\pgfmathresult pt
+  \multiply\pgf at x -1
+  \advance\pgf at x 1pt
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\def\easing at sinestep@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \multiply\pgf at x 180
+  \easing at cos{\pgfmath at tonumber\pgf at x}%
+  \pgf at x\pgfmathresult pt
+  \divide\pgf at x 2
+  \multiply\pgf at x -1
+  \advance\pgf at x 0.5pt
+  \pgfmathreturn\pgf at x
+  \endgroup
+}%
+\easing at derive@easeout at nefromeasein@ne{sine}%
+\easing at pgfmathinstall{sine}%
+\pgfkeys{easing,
+  exp/speed/.estore in=\easing at param@exponent at speed,
+  exp/speed/.default=7.2,
+  exp/speed}%
+\def\easing at expeasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \advance\pgf at x -1pt
+  \pgf at x\easing at param@exponent at speed\pgf at x
+  \easing at exp{\pgfmath at tonumber\pgf at x}%
+  \pgfmathsmuggle\pgfmathresult
+  \endgroup
+}%
+\easing at derive@step at nefromeasein@ne{exp}%
+\easing at derive@easeout at nefromeasein@ne{exp}%
+\easing at pgfmathinstall{exp}%
+\def\easing at circeasein@ne#1{%
+  \begingroup
+  \pgf at x#1pt
+  \advance\pgf at x -1pt
+  \edef\pgf at temp{\pgfmath at tonumber\pgf at x}%
+  \pgf at x\pgf at temp\pgf at x
+  \multiply\pgf at x -1
+  \advance\pgf at x 1pt
+  \easing at sqrt{\pgfmath at tonumber\pgf at x}%
+  \pgfmathsmuggle\pgfmathresult
+  \endgroup
+}%
+\easing at derive@step at nefromeasein@ne{circ}%
+\easing at derive@easeout at nefromeasein@ne{circ}%
+\easing at pgfmathinstall{circ}%
+\pgfkeys{easing,
+  elastic/frequency/.estore in=\easing at param@elastic at frequency,
+  elastic/damping/.estore in=\easing at param@elastic at damping,
+  elastic/frequency/.default=3,
+  elastic/damping/.default=7.2,
+  elastic/frequency, elastic/damping}%
+\def\easing at elasticeasein@ne#1{%
+  \begingroup
+  \pgf at xa#1pt
+  \advance\pgf at xa -1pt
+  \pgf at xb-\pgf at xa
+  \pgf at xa\easing at param@elastic at damping\pgf at xa
+  \easing at exp{\pgfmath at tonumber\pgf at xa}%
+  \pgf at xa\pgfmathresult pt
+  \pgf at xb 360\pgf at xb
+  \pgf at xb\easing at param@elastic at frequency\pgf at xb
+  \easing at cos{\pgfmath at tonumber\pgf at xb}%
+  \pgf at xa\pgfmathresult\pgf at xa
+  \pgfmathreturn\pgf at xa
+  \endgroup
+}%
+\easing at derive@step at nefromeasein@ne{elastic}%
+\easing at derive@easeout at nefromeasein@ne{elastic}%
+\easing at pgfmathinstall{elastic}%
+\endinput
+%%
+%% End of file `pgflibraryeasing.code.tex'.


Property changes on: trunk/Master/texmf-dist/tex/latex/easing/pgflibraryeasing.code.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2021-07-18 20:22:29 UTC (rev 59974)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2021-07-18 20:23:12 UTC (rev 59975)
@@ -263,7 +263,7 @@
     dtxtut ducksay duckuments duerer duerer-latex duotenzor dutchcal
     dvdcoll dvgloss dviasm dviincl dviinfox
     dvipsconfig dynamicnumber dynblocks dynkin-diagrams dyntree
-  e-french ean ean13isbn easy easy-todo
+  e-french ean ean13isbn easing easy easy-todo
     easybook easyfig easyfloats easyformat easylist easyreview
     ebezier ebgaramond ebgaramond-maths ebong ebook ebproof ebsthesis
     ec ecc ecclesiastic ecltree eco ecobiblatex

Modified: trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2021-07-18 20:22:29 UTC (rev 59974)
+++ trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2021-07-18 20:23:12 UTC (rev 59975)
@@ -73,6 +73,7 @@
 depend drawmatrix
 depend drawstack
 depend dyntree
+depend easing
 depend ebproof
 depend econometrics
 depend eltex

Added: trunk/Master/tlpkg/tlpsrc/easing.tlpsrc
===================================================================


More information about the tex-live-commits mailing list.