From c6b7d46ff1b9b5e7edbed8ee6f65a00d8376222f Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 26 Jul 2019 20:48:47 +0000 Subject: perfectcut (26jul19) git-svn-id: svn://tug.org/texlive/trunk@51744 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/perfectcut/README | 8 +++-- .../texmf-dist/doc/latex/perfectcut/perfectcut.pdf | Bin 181497 -> 162354 bytes .../texmf-dist/doc/latex/perfectcut/perfectcut.tex | 33 +++++++++++++-------- .../texmf-dist/tex/latex/perfectcut/perfectcut.sty | 10 +++---- 4 files changed, 31 insertions(+), 20 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/perfectcut/README b/Master/texmf-dist/doc/latex/perfectcut/README index 72e88ddb9c3..86fe9068d95 100644 --- a/Master/texmf-dist/doc/latex/perfectcut/README +++ b/Master/texmf-dist/doc/latex/perfectcut/README @@ -16,6 +16,8 @@ This package also offers a sound reimplementation of \big, \bigg, etc. Release notes: + 2.3 07/17: * When using scalerel, only use \ThisStyle for the outermost + command due to performance issues. 2.2 04/17: * By default, use the scalerel package instead of the mathstyle package to compute the nested mathstyle. * The option nomathstyle and the command \cutstyle are @@ -28,10 +30,10 @@ Release notes: 2.0 11/14: * The package now offers general-purpose commands for defining arbitrary nested delimiters that consistently grow regardless of the contents (\perfectunary and - \perfectbinary) + \perfectbinary) * Added the behaviours CurrentHeight and CurrentHeightPlusOne alongside the existing behaviour - IncreaseHeight. + IncreaseHeight. * Added the stock commands \perfectcase, \perfectparens, and \perfectbrackets intended for use in the context of abstract-machine-like calculi. @@ -51,7 +53,7 @@ Release notes: Author: Guillaume Munch-Maccagnoni -https://github.com/gadmm/perfectcut +https://gitlab.com/gadmm/perfectcut This work may be distributed and/or modified under the conditions of diff --git a/Master/texmf-dist/doc/latex/perfectcut/perfectcut.pdf b/Master/texmf-dist/doc/latex/perfectcut/perfectcut.pdf index d051e7cb421..0712623288a 100644 Binary files a/Master/texmf-dist/doc/latex/perfectcut/perfectcut.pdf and b/Master/texmf-dist/doc/latex/perfectcut/perfectcut.pdf differ diff --git a/Master/texmf-dist/doc/latex/perfectcut/perfectcut.tex b/Master/texmf-dist/doc/latex/perfectcut/perfectcut.tex index b50aee863a5..23e637d51c8 100644 --- a/Master/texmf-dist/doc/latex/perfectcut/perfectcut.tex +++ b/Master/texmf-dist/doc/latex/perfectcut/perfectcut.tex @@ -2,7 +2,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%% %%% Author: Guillaume Munch-Maccagnoni -%%% https://github.com/gadmm/perfectcut +%%% https://gitlab.com/gadmm/perfectcut %%% %%% This work may be distributed and/or modified under the conditions of %%% the LaTeX Project Public License, either version 1.3 of this license @@ -30,11 +30,12 @@ \global\long\def\mt{\bar{\mu}} + \title{\texttt{perfectcut.sty} documentation} -\author{\noindent {\large{}Guillaume Munch-Maccagnoni}\thanks{\protect\href{https://github.com/gadmm/perfectcut}{https://github.com/gadmm/perfectcut}}} +\author{\noindent {\large{}Guillaume Munch-Maccagnoni}\thanks{\protect\href{https://gitlab.com/gadmm/perfectcut}{https://gitlab.com/gadmm/perfectcut}}} -\date{23rd April 2017} +\date{3rd September 2017} \maketitle @@ -117,7 +118,7 @@ Using \texttt{\textbackslash underline} to mark redexes: \subsection{Using \texttt{\textbackslash left}, \texttt{\textbackslash middle} and \texttt{\textbackslash right} instead} -\global\long\def\fakecut#1#2{\left\langle #1\middle|\mkern-2mu \middle|#2\right\rangle } +\global\long\def\fakecut#1#2{\left\langle #1\middle|\mkern-2mu \middle|#2\right\rangle } \noindent \texttt{\footnotesize{}\textbackslash renewcommand\{\textbackslash cut\}{[}2{]}\{\textbackslash left\textbackslash langle \#1\textbackslash middle|\textbackslash mkern-2mu\textbackslash middle|\#2\textbackslash right\textbackslash rangle\}} @@ -168,9 +169,9 @@ The following displays a set $\{\#1\mid\#2\}$ with delimiters appropriately sized if there are other \texttt{\textbackslash perfectcommands} inside \texttt{\#1} and \texttt{\#2}.\medskip{} -\texttt{\footnotesize{}\textbackslash def\textbackslash Set\#1\#2\{\textbackslash perfectbinary\{IncreaseHeight\}\textbackslash\{|\textbackslash\}\{\#1\textbackslash mathrel\{\}\}\{\textbackslash mathrel\{\}\#2\}\}}{\footnotesize \par} +\texttt{\footnotesize{}\textbackslash def\textbackslash Set\#1\#2\{\textbackslash perfectbinary\{IncreaseHeight\}\textbackslash\{|\textbackslash\}\{\#1\textbackslash mathrel\{\}\}\{\textbackslash mathrel\{\}\#2\}\}}{\footnotesize\par} -\texttt{\footnotesize{}\textbackslash{[}\textbackslash Set\{\textbackslash perfectparens\{a\}\}\{\textbackslash perfectparens\{b\}\}\textbackslash{]}}{\footnotesize \par} +\texttt{\footnotesize{}\textbackslash{[}\textbackslash Set\{\textbackslash perfectparens\{a\}\}\{\textbackslash perfectparens\{b\}\}\textbackslash{]}}{\footnotesize\par} \def\Set#1#2{\perfectbinary{IncreaseHeight}\{|\}{#1\mathrel{}}{\mathrel{}#2}} @@ -178,6 +179,7 @@ inside \texttt{\#1} and \texttt{\#2}.\medskip{} \fbox{\ensuremath{\Set{\perfectparens{a}}{\perfectparens{b}}}} \] + \subsection{Custom delimiters} \begin{description} \item [{\texttt{\textbackslash perfectunary\#1\#2\#3\#4}}] Displays \texttt{\#2} @@ -221,10 +223,16 @@ Command & Produces & Growth & Inserts skips\tabularnewline With this option, the command \texttt{\textbackslash currentmathstyle} from the package \texttt{mathstyle} is used instead of the command \texttt{\textbackslash ThisStyle} from the \texttt{scalerel} package. -The latter (default) uses \texttt{\textbackslash mathchoice} which -has exponential time complexity in the number of nestings. The former -does not use \texttt{\textbackslash mathchoice} but redefines many -primitives and is therefore a source of incompatibilities. +The latter (default) uses \texttt{\textbackslash mathchoice}, and +in order to avoid an exponential time complexity in the number of +nestings, it is only called for the outermost command. Concretely, +with \texttt{mathstyle}, math style changes are taken into account +both inside and outside of \texttt{\textbackslash perfectcommands}, +whereas without it, changes in math style are not obeyed inside a +command. Moreover, using the \texttt{mathstyle} option speeds up compilation. +The downside of using \texttt{mathstyle} is that it redefines many +standard math commands, and is therefore a source of incompatibilities, +notably with \texttt{xypic}. \subsection{Option \texttt{realVert}} @@ -294,15 +302,16 @@ above one}}\tabularnewline\addlinespace[0.1em] \subsection{Example with \texttt{\textbackslash nthleft}} -\texttt{\footnotesize{}\textbackslash nrthleft0(\textbackslash nthleft1(\textbackslash nthleft2(\textbackslash nthleft3(\textbackslash nthleft4(\textbackslash nthleft5(\textbackslash nthleft6(}{\footnotesize \par} +\texttt{\footnotesize{}\textbackslash nrthleft0(\textbackslash nthleft1(\textbackslash nthleft2(\textbackslash nthleft3(\textbackslash nthleft4(\textbackslash nthleft5(\textbackslash nthleft6(}{\footnotesize\par} \[ \nthleft0(\nthleft1(\nthleft2(\nthleft3(\nthleft4(\nthleft5(\nthleft6( \] + \subsection{Example with \texttt{\textbackslash big},\texttt{\textbackslash Big},\texttt{\textbackslash bigg},\texttt{\textbackslash Bigg}} -\texttt{\footnotesize{}(\textbackslash big(\textbackslash Big(\textbackslash bigg(\textbackslash Bigg(}{\footnotesize \par} +\texttt{\footnotesize{}(\textbackslash big(\textbackslash Big(\textbackslash bigg(\textbackslash Bigg(}{\footnotesize\par} \[ (\big(\Big(\bigg(\Bigg( diff --git a/Master/texmf-dist/tex/latex/perfectcut/perfectcut.sty b/Master/texmf-dist/tex/latex/perfectcut/perfectcut.sty index 672333d6da0..8cfb2936ce5 100644 --- a/Master/texmf-dist/tex/latex/perfectcut/perfectcut.sty +++ b/Master/texmf-dist/tex/latex/perfectcut/perfectcut.sty @@ -9,7 +9,7 @@ %%% or (at your option) any later version. Refer to the README file. %%% %%% -\ProvidesPackage{perfectcut}[04/22/2017 Perfect Cut v2.2] +\ProvidesPackage{perfectcut}[06/23/2017 Perfect Cut v2.3] %%% Option processing \newif\ifcut@mathstyle@ \cut@mathstyle@false @@ -32,7 +32,7 @@ \newmuskip\cutcasebarskip \newif\ifcutdebug %%% Exported commands -%%See end of file for a more detailed description of the commands +%%See end of file for a more detailed description of the commands \newcommand{\perfectcut}[2]{\cut@{#1}{#2}}%% displays <#1||#2> \newcommand{\perfectbra}[1]{\cut@bra{#1}}%% displays <#1| \newcommand{\perfectket}[1]{\cut@ket{#1}}%% displays |#2> @@ -89,7 +89,7 @@ \def\cut@setcurrentcutstyle{} \else \RequirePackage{scalerel} - \def\cut@setcurrentcutstyle{\ThisStyle} + \def\cut@setcurrentcutstyle#1{{\ThisStyle{\let\ThisStyle\relax#1}}} \def\cut@currentcutstyle{\SavedStyle} \fi @@ -250,7 +250,7 @@ %% Displays #1#2#3#4#5. Arguments #2 and #4 can contain other cut primitives. %% Does not increase the current height computed by cut primitives inside #2 -%% and #4. +%% and #4. %% Arguments #1, #3 and #5 can access the current height in two different %% forms via \cut@n and \count0. \newcommand{\cut@computeBinary@CurrentHeight}[5]{\cut@setcurrentcutstyle{% @@ -274,7 +274,7 @@ %% Displays #1#2#3#4#5. Arguments #2 and #4 can contain other cut primitives. %% Does not increase the current height computed by cut primitives inside #2 -%% and #4 but the height to display is increased by 1. +%% and #4 but the height to display is increased by 1. %% Arguments #1, #3 and #5 can access the height height in two different %% forms via \cut@n and \count0. \newcommand{\cut@computeBinary@CurrentHeightPlusOne}[5]{\cut@setcurrentcutstyle{% -- cgit v1.2.3