texlive[44175] Master/texmf-dist: perfectcut (3may17)

commits+karl at tug.org commits+karl at tug.org
Wed May 3 23:29:26 CEST 2017


Revision: 44175
          http://tug.org/svn/texlive?view=revision&revision=44175
Author:   karl
Date:     2017-05-03 23:29:26 +0200 (Wed, 03 May 2017)
Log Message:
-----------
perfectcut (3may17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/perfectcut/README
    trunk/Master/texmf-dist/doc/latex/perfectcut/perfectcut.pdf
    trunk/Master/texmf-dist/doc/latex/perfectcut/perfectcut.tex
    trunk/Master/texmf-dist/tex/latex/perfectcut/perfectcut.sty

Modified: trunk/Master/texmf-dist/doc/latex/perfectcut/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/perfectcut/README	2017-05-03 21:29:13 UTC (rev 44174)
+++ trunk/Master/texmf-dist/doc/latex/perfectcut/README	2017-05-03 21:29:26 UTC (rev 44175)
@@ -16,6 +16,15 @@
 
 Release notes:
 
+  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
+               deprecated.
+             * The option mathstyle is introduced, to use when scalerel is
+               too slow.
+  2.1 06/15: * the spacing inside cases can be contolled with \cutcasebarskip
+             * corrected a bug where vertical bars would shrink horizontally
+             * corrected the spacing of middle delimiters
   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
@@ -42,7 +51,7 @@
 
 
 Author: Guillaume Munch-Maccagnoni
-http://www.pps.univ-paris-diderot.fr/~munch/
+https://github.com/gadmm/perfectcut
 
 
 This work may be distributed and/or modified under the conditions of
@@ -53,8 +62,8 @@
 and version 1.3 or later is part of all distributions of LaTeX version
 2005/12/01 or later.
 
-The work consists in the files "perfectcut.sty", "perfectcut.tex" and
-the derived files.
+The work consists in the files "perfectcut.sty", "perfectcut.lyx",
+"perfectcut.tex", and the derived files.
 
 This work has the LPPL maintenance status `maintained'.
 The Current Maintainer of this work is Guillaume Munch-Maccagnoni.

Modified: trunk/Master/texmf-dist/doc/latex/perfectcut/perfectcut.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/perfectcut/perfectcut.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/perfectcut/perfectcut.tex	2017-05-03 21:29:13 UTC (rev 44174)
+++ trunk/Master/texmf-dist/doc/latex/perfectcut/perfectcut.tex	2017-05-03 21:29:26 UTC (rev 44175)
@@ -2,7 +2,7 @@
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %%%
 %%% Author: Guillaume Munch-Maccagnoni
-%%% http://www.pps.univ-paris-diderot.fr/~munch/
+%%% https://github.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
@@ -27,28 +27,21 @@
 
 \begin{document}
 \global\long\def\cut#1#2{\perfectcut{#1}{#2}}
+
 \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{http://www.pps.univ-paris-diderot.fr/~munch/}{http://www.pps.univ-paris-diderot.fr/$\sim$munch/}%
-}}
+\date{23rd April 2017}
 
-
-\date{2nd November 2014}
-
 \maketitle
 
-
 \tableofcontents{}
 
-
 \section{Use}
 
-
 \paragraph{Original use}
 
 This package supplies the following commands:
@@ -58,9 +51,9 @@
 \toprule 
 Command & Produces\tabularnewline
 \midrule
-\texttt{\textbackslash{}perfectcut\{\#1\}\{\#2\}} & $\perfectcut{\#1}{\#2}$\tabularnewline
-\texttt{\textbackslash{}perfectbra\{\#1\}} & $\perfectbra{\#1}$\tabularnewline
-\texttt{\textbackslash{}perfectket\{\#1\}} & $\perfectket{\#1}$\tabularnewline
+\texttt{\textbackslash perfectcut\{\#1\}\{\#2\}} & $\perfectcut{\#1}{\#2}$\tabularnewline
+\texttt{\textbackslash perfectbra\{\#1\}} & $\perfectbra{\#1}$\tabularnewline
+\texttt{\textbackslash perfectket\{\#1\}} & $\perfectket{\#1}$\tabularnewline
 \bottomrule
 \end{tabular}\quad{}%
 \begin{tabular}{ll}
@@ -67,46 +60,37 @@
 \toprule 
 Command & Produces\tabularnewline
 \midrule
-\texttt{\textbackslash{}perfectcase\{\#1\}} & $\perfectcase{\#1}{\#2}$\tabularnewline
-\texttt{\textbackslash{}perfectbrackets\{\#1\}} & $\perfectbrackets{\#1}$\tabularnewline
-\texttt{\textbackslash{}perfectparens\{\#1\}} & $\perfectparens{\#1}$\tabularnewline
+\texttt{\textbackslash perfectcase\{\#1\}} & $\perfectcase{\#1}{\#2}$\tabularnewline
+\texttt{\textbackslash perfectbrackets\{\#1\}} & $\perfectbrackets{\#1}$\tabularnewline
+\texttt{\textbackslash perfectparens\{\#1\}} & $\perfectparens{\#1}$\tabularnewline
 \bottomrule
 \end{tabular}
 \par\end{center}
 
 The effect of these commands is to let the delimiters grow according
-to the number of nested \texttt{\textbackslash{}perfect}\texttt{\emph{command}}s
+to the number of nested \texttt{\textbackslash perfect}\texttt{\emph{command}}s
 (regardless of the size of contents). The package is originally intended
 for solving a notational issue regarding the representation of abstract-machine-like
 calculi in proof theory and computer science.
 
-
 \paragraph{General use}
 
-The package also defines \texttt{\textbackslash{}perfectunary} and
-\texttt{\textbackslash{}perfectbinary} for defining custom delimiters
-that behave similarly to the above ones. These commands should be considered when
-facing the need of nested delimiters that consistently grow regardless
-of the contents. (See ``Advanced Use''.)\medskip{}
+The package also defines \texttt{\textbackslash perfectunary} and
+\texttt{\textbackslash perfectbinary} for defining custom delimiters
+that behave similarly to the above ones. These commands should be
+considered when facing the need of nested delimiters that consistently
+grow regardless of the contents. (See ``Advanced Use''.)
 
-
-If the package causes incompatibility errors, refer to the option
-\texttt{nomathstyle} below.
-
-
 \section{Example}
 
 
-
-
 \subsection{Using \texttt{perfectcut.sty}}
 
 \global\long\def\cut#1#2{\cutprimitive{#1}{#2}}
 
+\noindent \texttt{\footnotesize{}\textbackslash usepackage\{perfectcut\}}~\\
+\texttt{\footnotesize{}\textbackslash let\textbackslash cut\textbackslash perfectcut}
 
-\noindent \texttt{\footnotesize{}\textbackslash{}usepackage\{perfectcut\}}~\\
-\texttt{\footnotesize{}\textbackslash{}let\textbackslash{}cut\textbackslash{}perfectcut}{\footnotesize \par}
-
 \begin{center}
 \fbox{\begin{minipage}[t]{0.8\columnwidth}%
 The following states the idempotency of an adjunction: 
@@ -114,12 +98,11 @@
 \cut t{\mt x.\cut{\mu\alpha.\cut ue}{e'}}=\cut{\mu\alpha.\cut t{\mt x.\cut ue}}{e'}
 \]
 
-
 The following states the commutativity of a strong monad:
 \[
 \cut t{\mt x.\cut u{\mt y.\cut ve}}=\cut u{\mt y.\cut t{\mt x.\cut ve}}
 \]
-Using \texttt{\textbackslash{}underline} to mark redexes:
+Using \texttt{\textbackslash underline} to mark redexes:
 \begin{align*}
  & \delta(V,x.y,x.y)\\
  & =\mu{\star}.\cut V{\perfectcase{\mt x.\underline{\cut y{\star}}}{\mt x.\underline{\cut y{\star}}}}\\
@@ -131,16 +114,14 @@
 \end{minipage}}
 \par\end{center}
 
+\subsection{Using \texttt{\textbackslash left}, \texttt{\textbackslash middle}
+and \texttt{\textbackslash right} instead}
 
-\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\}}
 
-
-\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\}}{\footnotesize \par}
-
 \begin{center}
 \fbox{\parbox[t]{0.8\columnwidth}{%
 The following states the idempotency of an adjunction: 
@@ -148,14 +129,12 @@
 \fakecut t{\mt x.\fakecut{\mu\alpha.\fakecut ue}{e'}}=\fakecut{\mu\alpha.\fakecut t{\mt x.\fakecut ue}}{e'}
 \]
 
-
 The following states the commutativity of a strong monad:
 \[
 \fakecut t{\mt x.\fakecut u{\mt y.\fakecut ve}}=\fakecut u{\mt y.\fakecut t{\mt x.\fakecut ve}}
 \]
 
-
-Using \texttt{\textbackslash{}underline} to mark redexes:
+Using \texttt{\textbackslash underline} to mark redexes:
 \begin{align*}
  & \delta(V,x.y,x.y)\\
  & =\mu{\star}.\fakecut V{\left[\mt x.\underline{\fakecut y{\star}}\middle|\mt x.\underline{\fakecut y{\star}}\right]}\\
@@ -173,7 +152,6 @@
 grow, and the spacing could be improved. The package is designed to
 fix these issues.
 
-
 \section{Advanced use}
 
 The package lets you define your own growing delimiters. Let us first
@@ -180,22 +158,20 @@
 stress that the size of these delimiters is entirely determined by
 the number of nestings and is insensitive to the size of the contents.
 If you need the size of the contents to be taken into account then
-it is probably sufficient to use \texttt{\textbackslash{}left} and
-\texttt{\textbackslash{}right} while tweaking \texttt{\textbackslash{}delimitershortfall}
-and \texttt{\textbackslash{}delimiterfactor}.
+it is probably sufficient to use \texttt{\textbackslash left} and
+\texttt{\textbackslash right} while tweaking \texttt{\textbackslash delimitershortfall}
+and \texttt{\textbackslash delimiterfactor}.
 
-
 \subsection{Example}
 
 The following displays a set $\{\#1\mid\#2\}$ with delimiters appropriately
-sized if there are other \texttt{\textbackslash{}perfectcommands}
+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}}
 
 \[
@@ -202,15 +178,13 @@
 \fbox{\ensuremath{\Set{\perfectparens{a}}{\perfectparens{b}}}}
 \]
 
-
-
 \subsection{Custom delimiters}
 \begin{description}
-\item [{\texttt{\textbackslash{}perfectunary\#1\#2\#3\#4}}] Displays \texttt{\#2}
+\item [{\texttt{\textbackslash perfectunary\#1\#2\#3\#4}}] Displays \texttt{\#2}
 \texttt{\#4} \texttt{\#3} where \texttt{\#2} and \texttt{\#3} are
 delimiters. The delimiters grow according to \texttt{\#1} which must
 be one of \texttt{IncreaseHeight}, \texttt{CurrentHeight}, or \texttt{CurrentHeightPlusOne}.
-\item [{\texttt{\textbackslash{}perfectbinary\#1\#2\#3\#4\#5\#6}}] Displays
+\item [{\texttt{\textbackslash perfectbinary\#1\#2\#3\#4\#5\#6}}] Displays
 \texttt{\#2} \texttt{\#5} \texttt{\#3} \texttt{\#6} \texttt{\#4} where
 \texttt{\#2}, \texttt{\#3} and \texttt{\#4} are delimiters. The delimiters
 grow according to \texttt{\#1} which must be one of \texttt{IncreaseHeight},
@@ -226,53 +200,41 @@
 \toprule 
 Command & Produces & Growth & Inserts skips\tabularnewline
 \midrule
-\texttt{\textbackslash{}perfectcut\{\#1\}\{\#2\}} & $\perfectcut{\#1}{\#2}$ & \texttt{IncreaseHeight} & Yes\tabularnewline
-\texttt{\textbackslash{}perfectbra\{\#1\}} & $\perfectbra{\#1}$ & \texttt{IncreaseHeight} & Yes\tabularnewline
-\texttt{\textbackslash{}perfectket\{\#1\}} & $\perfectket{\#1}$ & \texttt{IncreaseHeight} & Yes\tabularnewline
-\texttt{\textbackslash{}perfectcase\{\#1\}} & $\perfectcase{\#1}{\#2}$ & \texttt{CurrentHeightPlusOne} & Yes\tabularnewline
-\texttt{\textbackslash{}perfectbrackets\{\#1\}} & $\perfectbrackets{\#1}$ & \texttt{CurrentHeightPlusOne} & Only inside\tabularnewline
-\texttt{\textbackslash{}perfectparens\{\#1\}} & $\perfectparens{\#1}$ & \texttt{CurrentHeight} & Only inside\tabularnewline
-\texttt{\textbackslash{}perfectunary\{\#1\}}~\\
+\texttt{\textbackslash perfectcut\{\#1\}\{\#2\}} & $\perfectcut{\#1}{\#2}$ & \texttt{IncreaseHeight} & Yes\tabularnewline
+\texttt{\textbackslash perfectbra\{\#1\}} & $\perfectbra{\#1}$ & \texttt{IncreaseHeight} & Yes\tabularnewline
+\texttt{\textbackslash perfectket\{\#1\}} & $\perfectket{\#1}$ & \texttt{IncreaseHeight} & Yes\tabularnewline
+\texttt{\textbackslash perfectcase\{\#1\}} & $\perfectcase{\#1}{\#2}$ & \texttt{CurrentHeightPlusOne} & Yes\tabularnewline
+\texttt{\textbackslash perfectbrackets\{\#1\}} & $\perfectbrackets{\#1}$ & \texttt{CurrentHeightPlusOne} & Only inside\tabularnewline
+\texttt{\textbackslash perfectparens\{\#1\}} & $\perfectparens{\#1}$ & \texttt{CurrentHeight} & Only inside\tabularnewline
+\texttt{\textbackslash perfectunary\{\#1\}}~\\
 \texttt{~\{\#2\}\{\#3\}\{\#4\}} & $\#2\,\#4\,\#3$ & \#1 & No\tabularnewline
-\texttt{\textbackslash{}perfectbinary\{\#1\}}~\\
+\texttt{\textbackslash perfectbinary\{\#1\}}~\\
 \texttt{~\{\#2\}\{\#3\}\{\#4\}\{\#5\}\{\#6\}} & $\#2\,\#5\,\#3\,\#6\,\#4$ & \#1 & No\tabularnewline
 \bottomrule
 \end{tabular}
 \par\end{center}
 
-
 \section{Options}
 
+\subsection{Option \texttt{mathstyle}}
 
-\subsection{Option \texttt{nomathstyle}}
+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 use of \texttt{\textbackslash{}currentmathstyle} from the package
-\texttt{mathstyle} prevents the exponential blowup in recursions that
-would occur if we used \texttt{\textbackslash{}mathpalette} instead.
-To record the \texttt{\textbackslash{}currentmath\-style}, \texttt{mathstyle}
-redefines many  primitives and is therefore a source of incompatibilities.
-If you run into such issues, please refer to the \texttt{mathstyle}
-manual.
-
-If you want to  disable the loading of \texttt{mathstyle}, use the
-\texttt{nomathstyle} option.  With the \texttt{nomathstyle} option,
-the style is set to \texttt{\textbackslash{}cutstyle}, which you must
- define by hand to be \texttt{\textbackslash{}displaystyle}, \texttt{\textbackslash{}textstyle
-}(default), \texttt{\textbackslash{}scriptstyle},  \texttt{\textbackslash{}scriptscriptstyle}.
-This means that cuts in subscripts and superscripts do  not have the
-proper size unless \texttt{\textbackslash{}cutstyle }is redefined.
-
-
 \subsection{Option \texttt{realVert}}
 
 With the option \texttt{realVert}, the double bars are obtained with
-the \texttt{\textbackslash{}Vert} command. Without it, two \texttt{\textbackslash{}vert}
-symbols are used and their spacing is controlled with  \texttt{\textbackslash{}cutinterbarskip}.
-But, if \texttt{realVert} is not activated, then a penalty (\texttt{binoppenalty})
+the \texttt{\textbackslash Vert} command. But without it, two \texttt{\textbackslash vert}
+symbols are used and their spacing is controlled with  \texttt{\textbackslash cutinterbarskip}.
+Also, if \texttt{realVert} is not activated, then a penalty (\texttt{binoppenalty})
 is added, such that $\cut{\mu\alpha.\cut ab}{\mt x.\cut cd}$ splits
 across lines.
 
-
 \subsection{Option \texttt{fixxits}}
 
 For some reason that the author was unable to identify, the vertical
@@ -279,7 +241,6 @@
 alignment is wrong with the Opentype XITS math font with XeTeX. The
 option \texttt{fixxits} fixes this behaviour.
 
-
 \subsection{Customisation}
 
 The following mu-skips can be redefined in your preamble:
@@ -289,10 +250,10 @@
 \toprule 
 Command & Defines the spacing...\tabularnewline
 \midrule
-\texttt{\textbackslash{}cutbarskip=5.0mu plus 8mu minus 2.0mu} & around bars\tabularnewline
-\texttt{\textbackslash{}cutangleskip=0.0mu plus 8mu minus 1.0mu} & around delimiters (inside)\tabularnewline
-\texttt{\textbackslash{}cutangleouterskip=0.0mu plus 8mu minus 0mu} & around delimiters (outside)\tabularnewline
-\texttt{\textbackslash{}cutinterbarskip=0.8mu plus 0mu minus 0mu} & between bars (excl. \texttt{realVert})\tabularnewline
+\texttt{\textbackslash cutbarskip=5.0mu plus 8mu minus 2.0mu} & around bars\tabularnewline
+\texttt{\textbackslash cutangleskip=0.0mu plus 8mu minus 1.0mu} & around delimiters (inside)\tabularnewline
+\texttt{\textbackslash cutangleouterskip=0.0mu plus 8mu minus 0mu} & around delimiters (outside)\tabularnewline
+\texttt{\textbackslash cutinterbarskip=0.8mu plus 0mu minus 0mu} & between bars (excl. \texttt{realVert})\tabularnewline
 \bottomrule
 \end{tabular}
 \par\end{center}
@@ -299,14 +260,13 @@
 
 \noindent (1 mu equals $1/18$ of an em in the current math font.)
 
-
 \section{Reimplementation of fixed-size delimiters}
 
 In addition, I provide the following corrections and generalisations
-of  \texttt{\textbackslash{}big},\texttt{\textbackslash{}bigg}, etc.
+of  \texttt{\textbackslash big},\texttt{\textbackslash bigg}, etc.
 Why not using the latter? Because both the plain \TeX{} and the \texttt{amsmath}
 versions can be incorrect when changing the math font, the font size,
-the math style or \texttt{\textbackslash{}delimitershortfall}. Moreover,
+the math style or \texttt{\textbackslash delimitershortfall}. Moreover,
 Opentype math fonts sometimes offer more than five sizes. For this
 package we need a robust solution.
 
@@ -316,49 +276,45 @@
 Command & Example & \tabularnewline
 \midrule 
 \multicolumn{3}{l}{\emph{\#1-th size of delimiter \#2}}\tabularnewline
-\texttt{\textbackslash{}nthleft\{\#1\}\{\#2\} } & \texttt{\textbackslash{}nthleft\{2\}(} & $\nthleft{2}($\tabularnewline\addlinespace[0.1em]
-\texttt{\textbackslash{}nthmiddle\{\#1\}\{\#2\}} & \texttt{\textbackslash{}nthmiddle\{2\}\textbackslash{}Vert} & $\nthmiddle{2}\Vert$\tabularnewline\addlinespace[0.1em]
-\texttt{\textbackslash{}nthright\{\#1\}\{\#2\}} & \texttt{\textbackslash{}nthright\{2\})} & $\nthright{2})$\tabularnewline\addlinespace[0.1em]
+\texttt{\textbackslash nthleft\{\#1\}\{\#2\} } & \texttt{\textbackslash nthleft\{2\}(} & $\nthleft{2}($\tabularnewline\addlinespace[0.1em]
+\texttt{\textbackslash nthmiddle\{\#1\}\{\#2\}} & \texttt{\textbackslash nthmiddle\{2\}\textbackslash Vert} & $\nthmiddle{2}\Vert$\tabularnewline\addlinespace[0.1em]
+\texttt{\textbackslash nthright\{\#1\}\{\#2\}} & \texttt{\textbackslash nthright\{2\})} & $\nthright{2})$\tabularnewline\addlinespace[0.1em]
 \multicolumn{1}{l}{\emph{delimiter \#2 of height at least \#1}} &  & \tabularnewline\addlinespace[0.1em]
-\texttt{\textbackslash{}lenleft\{\#1\}\{\#2\}}  & \texttt{\textbackslash{}lenleft\{3.2mm\}{[}} & $\lenleft{3mm}[$\tabularnewline\addlinespace[0.1em]
-\texttt{\textbackslash{}lenmiddle\{\#1\}\{\#2\}} & \texttt{\textbackslash{}lenmiddle\{3.2mm\}|} & $\lenmiddle{3mm}|$\tabularnewline\addlinespace[0.1em]
-\texttt{\textbackslash{}lenright\{\#1\}\{\#2\}} & \texttt{\textbackslash{}lenright\{3.2mm\}{]}} & $\lenright{3mm}]$\tabularnewline\addlinespace[0.1em]
+\texttt{\textbackslash lenleft\{\#1\}\{\#2\}}  & \texttt{\textbackslash lenleft\{3.2mm\}{[}} & $\lenleft{3mm}[$\tabularnewline\addlinespace[0.1em]
+\texttt{\textbackslash lenmiddle\{\#1\}\{\#2\}} & \texttt{\textbackslash lenmiddle\{3.2mm\}|} & $\lenmiddle{3mm}|$\tabularnewline\addlinespace[0.1em]
+\texttt{\textbackslash lenright\{\#1\}\{\#2\}} & \texttt{\textbackslash lenright\{3.2mm\}{]}} & $\lenright{3mm}]$\tabularnewline\addlinespace[0.1em]
 \multicolumn{3}{l}{\emph{delimiter \#2 of height exactly \#1 obtained by scaling the
 above one}}\tabularnewline\addlinespace[0.1em]
-\texttt{\textbackslash{}reallenleft\{\#1\}\{\#2\}}  & \texttt{\textbackslash{}reallenleft\{3.2mm\}{[}} & $\reallenleft{3mm}[$\tabularnewline\addlinespace[0.1em]
-\texttt{\textbackslash{}reallenmiddle\{\#1\}\{\#2\}} & \texttt{\textbackslash{}reallenmiddle\{3.2mm\}|} & $\reallenmiddle{3mm}|$\tabularnewline\addlinespace[0.1em]
-\texttt{\textbackslash{}reallenright\{\#1\}\{\#2\}} & \texttt{\textbackslash{}reallenright\{3.2mm\}{]}} & $\reallenright{3mm}]$\tabularnewline
+\texttt{\textbackslash reallenleft\{\#1\}\{\#2\}}  & \texttt{\textbackslash reallenleft\{3.2mm\}{[}} & $\reallenleft{3mm}[$\tabularnewline\addlinespace[0.1em]
+\texttt{\textbackslash reallenmiddle\{\#1\}\{\#2\}} & \texttt{\textbackslash reallenmiddle\{3.2mm\}|} & $\reallenmiddle{3mm}|$\tabularnewline\addlinespace[0.1em]
+\texttt{\textbackslash reallenright\{\#1\}\{\#2\}} & \texttt{\textbackslash reallenright\{3.2mm\}{]}} & $\reallenright{3mm}]$\tabularnewline
 \bottomrule
 \end{tabular}  
 \par\end{center}
 
+\subsection{Example with \texttt{\textbackslash nthleft}}
 
-\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}
 
-\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}
-
 \[
 (\big(\Big(\bigg(\Bigg(
 \]
-The above uses the \texttt{\textbackslash{}big} commands from the
+The above uses the \texttt{\textbackslash big} commands from the
 \texttt{amsmath} package. The \texttt{amsmath} package corrects issues
 with the original \TeX{} commands, but I could still notice inconsistencies,
-such as \texttt{\textbackslash{}big} starting at size 2, under some
-font combinations. \texttt{\textbackslash{}nthleft}, \texttt{\textbackslash{}nthright}
-and \texttt{\textbackslash{}nthmiddle} are implemented in a more robust
+such as \texttt{\textbackslash big} starting at size 2, under some
+font combinations. \texttt{\textbackslash nthleft}, \texttt{\textbackslash nthright}
+and \texttt{\textbackslash nthmiddle} are implemented in a more robust
 way.
 
-
 \section{License}
 
 This work may be distributed and/or modified under the conditions

Modified: trunk/Master/texmf-dist/tex/latex/perfectcut/perfectcut.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/perfectcut/perfectcut.sty	2017-05-03 21:29:13 UTC (rev 44174)
+++ trunk/Master/texmf-dist/tex/latex/perfectcut/perfectcut.sty	2017-05-03 21:29:26 UTC (rev 44175)
@@ -2,23 +2,23 @@
 %%%%%%%%%%%%%%%%%%%
 %%%
 %%% Author: Guillaume Munch-Maccagnoni
-%%% http://www.pps.univ-paris-diderot.fr/~munch/
-%%% 
+%%% http://guillaume.munch.name/
+%%%
 %%% This work 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. Refer to the README file.
-%%% 
 %%%
-\ProvidesPackage{perfectcut}[03/11/2014 Perfect Cut v2.0]
+%%%
+\ProvidesPackage{perfectcut}[04/22/2017 Perfect Cut v2.2]
 %%% Option processing
 \newif\ifcut at mathstyle@
-\cut at mathstyle@true
+\cut at mathstyle@false
 \newif\ifcut at realVert@
 \cut at realVert@false
 \newif\ifcut at fixxits@
 \cut at fixxits@false
-\DeclareOption{nomathstyle}{\cut at mathstyle@false}
-\let\cutstyle\textstyle
+\DeclareOption{nomathstyle}{\cut at mathstyle@false}%backwards compat
+\DeclareOption{mathstyle}{\cut at mathstyle@true}
 \DeclareOption{realVert}{\cut at realVert@true}
 \DeclareOption{fixxits}{\cut at fixxits@true}
 \ProcessOptions*
@@ -29,6 +29,7 @@
 \newmuskip\cutbarskip
 \newmuskip\cutinterbarskip
 \newmuskip\cutangleouterskip
+\newmuskip\cutcasebarskip
 \newif\ifcutdebug
 %%% Exported commands
 %%See end of file for a more detailed description of the commands 
@@ -54,6 +55,7 @@
 \cutangleskip=0.0mu plus 8mu minus 1.0mu
 \cutangleouterskip=0.0mu plus 8mu minus 0.0mu
 \cutinterbarskip=1.4mu plus 0mu minus 0mu
+\cutcasebarskip=3.0mu plus 5.0mu minus 1.5mu
 \cutdebugfalse%% print the size after each \rangle?
 %%% Various reimplementations of \left, \right and \middle.
 %% \nthleft{4}\langle ==> fourth size of \langle; begins at 0
@@ -83,9 +85,12 @@
 %% setting up mathstyle
 \ifcut at mathstyle@
   \RequirePackage{mathstyle}
-  \def\currentcutstyle{\currentmathstyle}
+  \def\cut at currentcutstyle{\currentmathstyle}
+  \def\cut at setcurrentcutstyle{}
 \else
-  \def\currentcutstyle{\cutstyle}
+  \RequirePackage{scalerel}
+  \def\cut at setcurrentcutstyle{\ThisStyle}
+  \def\cut at currentcutstyle{\SavedStyle}
 \fi
 
 %% sets the behaviour of delimiters to always grow while evaluating #1
@@ -94,7 +99,7 @@
   \global\delimitershortfall=-0.1pt%that's the trick to get perfect growth
   \count0=\delimiterfactor%
   \global\delimiterfactor=901\relax%
-  \hbox{$\m at th\currentcutstyle#1$}%
+  \hbox{$\m at th\cut at currentcutstyle#1$}%
   \global\delimitershortfall=\skip0%
   \global\delimiterfactor=\count0%
 }
@@ -101,7 +106,7 @@
 
 %% scale #2 to size #1 (length)
 \newcommand{\cut at resizetoheight}[2]{%
-  \resizebox{!}{#1}{\hbox{$\m at th\currentcutstyle#2$}}%
+  \resizebox{!}{#1}{\hbox{$\m at th\cut at currentcutstyle#2$}}%
 }
 
 \newsavebox\cut at boxi
@@ -108,10 +113,10 @@
 \newsavebox\cut at boxj
 %% scale #2 to the size of #1. Assumes that #1 goes above and below the base line.
 \newcommand{\cut at resizetoheightof}[2]{%
-  \sbox{\cut at boxi}{$\m at th\currentcutstyle#1$}%
-  \sbox{\cut at boxj}{$\m at th\currentcutstyle#2$}%
+  \sbox{\cut at boxi}{$\m at th\cut at currentcutstyle#1$}%
+  \sbox{\cut at boxj}{$\m at th\cut at currentcutstyle#2$}%
   \raisebox{-\dp\cut at boxi}{%
-    \resizebox{!}{\ht\cut at boxi+\dp\cut at boxi}{%
+    \resizebox{\width}{\ht\cut at boxi+\dp\cut at boxi}{%
       \raisebox{\dp\cut at boxj}{\usebox{\cut at boxj}}%
     }%
   }%
@@ -128,17 +133,17 @@
 %% used in order to have vertical bars of the perfect size
 \newcommand{\cut at matchingldelim}[2]{\mathopen{\cut at resizetoheightof{#1}{\cut at nextldelim{#2}{#1}}}}
 \newcommand{\cut at matchingrdelim}[2]{\mathclose{\cut at resizetoheightof{#1}{\cut at nextrdelim{#2}{#1}}}}
-\newcommand{\cut at matchingmdelim}[2]{\mathrel{\cut at resizetoheightof{#1}{\cut at nextmdelim{#2}{#1}}}}
+\newcommand{\cut at matchingmdelim}[2]{\mathord{\cut at resizetoheightof{#1}{\cut at nextmdelim{#2}{#1}}}}
 
 %% gives the delimiter #2 which is immediately longer than #1 (length)
-\newcommand{\cut at lengthldelim}[2]{\mathopen{\cut at setshortfall{\cut at nextldelim#2{\rule[-0.101pt]{0pt}{#1}}}}}
-\newcommand{\cut at lengthrdelim}[2]{\mathclose{\cut at setshortfall{\cut at nextrdelim#2{\rule[-0.101pt]{0pt}{#1}}}}}
-\newcommand{\cut at lengthmdelim}[2]{\mathrel{\cut at setshortfall{\cut at nextmdelim#2{\rule[-0.101pt]{0pt}{#1}}}}}
+\newcommand{\cut at lengthldelim}[2]{\mathopen{\cut at setcurrentcutstyle{\cut at setshortfall{\cut at nextldelim#2{\rule[-0.101pt]{0pt}{#1}}}}}}
+\newcommand{\cut at lengthrdelim}[2]{\mathclose{\cut at setcurrentcutstyle{\cut at setshortfall{\cut at nextrdelim#2{\rule[-0.101pt]{0pt}{#1}}}}}}
+\newcommand{\cut at lengthmdelim}[2]{\mathord{\cut at setcurrentcutstyle{\cut at setshortfall{\cut at nextmdelim#2{\rule[-0.101pt]{0pt}{#1}}}}}}
 
-%% like the previous one but resized to exactly match #1 (length) 
-\newcommand{\cut at reallengthldelim}[2]{\mathopen{\cut at resizetoheight{#1}{\cut at nextldelim#2{\rule[-0.101pt]{0pt}{#1}}}}}
-\newcommand{\cut at reallengthrdelim}[2]{\mathclose{\cut at resizetoheight{#1}{\cut at nextrdelim#2{\rule[-0.101pt]{0pt}{#1}}}}}
-\newcommand{\cut at reallengthmdelim}[2]{\mathrel{\cut at resizetoheight{#1}{\cut at nextmdelim#2{\rule[-0.101pt]{0pt}{#1}}}}}
+%% like the previous one but resized to exactly match #1 (length)
+\newcommand{\cut at reallengthldelim}[2]{\mathopen{\cut at setcurrentcutstyle{\cut at resizetoheight{#1}{\cut at nextldelim#2{\rule[-0.101pt]{0pt}{#1}}}}}}
+\newcommand{\cut at reallengthrdelim}[2]{\mathclose{\cut at setcurrentcutstyle{\cut at resizetoheight{#1}{\cut at nextrdelim#2{\rule[-0.101pt]{0pt}{#1}}}}}}
+\newcommand{\cut at reallengthmdelim}[2]{\mathord{\cut at setcurrentcutstyle{\cut at resizetoheight{#1}{\cut at nextmdelim#2{\rule[-0.101pt]{0pt}{#1}}}}}}
 
 %I don't get anything about this bug which affects the
 %alignment with respect to the math axis
@@ -165,10 +170,10 @@
   \def\cut at tempnextdelim{#3{#2}}%
   \cut at setshortfall{\cut at iter{#1}\cut at tempnextdelim}%
 }
-%% \cut at nthxdelim gives the #1-th size of the delimiter #2  
-\newcommand{\cut at nthldelim}[2]{\mathopen{\cut at nthdelim{#1}{#2}{\cut at nextldelim}}}
-\newcommand{\cut at nthrdelim}[2]{\mathclose{\cut at nthdelim{#1}{#2}{\cut at nextrdelim}}}
-\newcommand{\cut at nthmdelim}[2]{\mathrel{\cut at nthdelim{#1}{#2}{\cut at nextmdelim}}}
+%% \cut at nthxdelim gives the #1-th size of the delimiter #2
+\newcommand{\cut at nthldelim}[2]{\mathopen{\cut at setcurrentcutstyle{\cut at nthdelim{#1}{#2}{\cut at nextldelim}}}}
+\newcommand{\cut at nthrdelim}[2]{\mathclose{\cut at setcurrentcutstyle{\cut at nthdelim{#1}{#2}{\cut at nextrdelim}}}}
+\newcommand{\cut at nthmdelim}[2]{\mathord{\cut at setcurrentcutstyle{\cut at nthdelim{#1}{#2}{\cut at nextmdelim}}}}
 
 
 %%%% now the main algorithm
@@ -209,9 +214,9 @@
     %computing recursively
     \setcounter{\cut at localheight}{-1}%
     \expandafter\sbox\csname\cut at localsavebox{0}\endcsname%
-      {$\m at th\currentcutstyle#2$}%
+      {$\m at th\cut at currentcutstyle#2$}%
     \expandafter\sbox\csname\cut at localsavebox{1}\endcsname%
-      {$\m at th\currentcutstyle#3$}%
+      {$\m at th\cut at currentcutstyle#3$}%
     \addtocounter{\cut at localheight}{#1}%
     %exporting values outside the local scope
     \setcounter{cut at finalheight}{\value{\cut at localheight}}%
@@ -227,7 +232,7 @@
 %% Calls to cut primitives inside #2 and #4 will have a smaller height.
 %% Arguments #1, #3 and #5 can access the current height in two different
 %% forms via \cut at n and \count0.
-\newcommand{\cut at computeBinary@IncreaseHeight}[5]{%
+\newcommand{\cut at computeBinary@IncreaseHeight}[5]{\cut at setcurrentcutstyle{%
   \cut at computeBinary@main{1}{#2}{#4}%
   \@ifundefined{c@\cut at localheight}{}{% if #2 and #4 did not contain any cut primitive
     \ifnum\value{cut at finalheight}>\value{\cut at localheight}%
@@ -241,7 +246,7 @@
   #3%
   \usebox{\cut at boxright}%
   #5%
-}
+}}
 
 %% 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
@@ -248,7 +253,7 @@
 %% and #4. 
 %% Arguments #1, #3 and #5 can access the current height in two different
 %% forms via \cut at n and \count0.
-\newcommand{\cut at computeBinary@CurrentHeight}[5]{%
+\newcommand{\cut at computeBinary@CurrentHeight}[5]{\cut at setcurrentcutstyle{%
   \cut at computeBinary@main{0}{#2}{#4}%
   \ifnum\value{cut at finalheight}<0%
     \setcounter{cut at finalheight}{0}%
@@ -265,7 +270,7 @@
   #3%
   \usebox{\cut at boxright}%
   #5%
-}
+}}
 
 %% 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
@@ -272,7 +277,7 @@
 %% 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 at n and \count0.
-\newcommand{\cut at computeBinary@CurrentHeightPlusOne}[5]{%
+\newcommand{\cut at computeBinary@CurrentHeightPlusOne}[5]{\cut at setcurrentcutstyle{%
   \cut at computeBinary@main{0}{#2}{#4}
   \@ifundefined{c@\cut at localheight}{}{% if #2 and #4 did not contain any cut primitive
     \ifnum\value{cut at finalheight}>\value{\cut at localheight}%
@@ -287,7 +292,7 @@
   #3%
   \usebox{\cut at boxright}%
   #5%
-}
+}}
 
 %%% Implementation of the particular delimiters
 
@@ -382,9 +387,9 @@
     {\nthleft{\cut at n}[%
      \mskip\cutangleskip}%
     {#1}%
-    {\mskip\cutbarskip%
+    {\mskip\cutcasebarskip%
      \cut at matchvert{\nthleft{\cut at n}[}%
-     \mskip\cutbarskip}%
+     \mskip\cutcasebarskip}%
     {#2}%
     {\mskip\cutangleskip%
      \nthright{\cut at n}]}%



More information about the tex-live-commits mailing list