diff options
author | Karl Berry <karl@freefriends.org> | 2014-02-03 23:46:24 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2014-02-03 23:46:24 +0000 |
commit | 91933032894054038bc811d9f2445da230661faa (patch) | |
tree | bd5219dc5c6f50211d03757206e8feab37655ada /Master/texmf-dist/doc | |
parent | 5b1c9fe4a8686f1d474467ad220e0714515d2a73 (diff) |
perfectcut (3feb14)
git-svn-id: svn://tug.org/texlive/trunk@32861 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/latex/perfectcut/README | 47 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/perfectcut/perfectcut.pdf | bin | 0 -> 97135 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/perfectcut/perfectcut.tex | 255 |
3 files changed, 302 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/perfectcut/README b/Master/texmf-dist/doc/latex/perfectcut/README new file mode 100644 index 00000000000..26e1f502afd --- /dev/null +++ b/Master/texmf-dist/doc/latex/perfectcut/README @@ -0,0 +1,47 @@ +perfectcut.sty + +This package defines the command \perfectcut#1#2 which displays a +bracket <#1||#2>. Its effect is to determine the size of the bracket +depending on the number of nested \perfectcut (regardless of the +contents). It is intended for use: +- In proof theory, for term notations of sequent calculus, +- In computer science, for the modeling of abstract machines. + +This package also offers a reimplementation of \big, \bigg, etc. into +arbitrary-size variants. + + +Release notes: + + 1.9 02/14: added \perfectcut,\perfectbra,\perfectket; fixed bug with graphicx + not being included; publication on CTAN + 1.8 01/14: added documentation (no new feature) + 1.7 11/13: added \cutangleouterskip + 1.6 10/13: new commands \cutbraprimitive and \cutketprimitive + 1.5 09/13: possible to disable mathstyle (option nomathstyle, see + the warning below) + 1.4 08/13: possible to choose between \vert\vert and \Vert (option realVert) + (\cutinterbarskip is used only with the former) + 1.3 08/13: fixes the alignment of angles with the math axis + 1.2 06/13: first public release + + +Author: Guillaume Munch-Maccagnoni +http://www.pps.univ-paris-diderot.fr/~munch/ + + +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. +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. + +The work consists in the files "perfectcut.sty", "perfectcut.tex" and +the derived files. + +This work has the LPPL maintenance status `maintained'. +The Current Maintainer of this work is Guillaume Munch-Maccagnoni. + + diff --git a/Master/texmf-dist/doc/latex/perfectcut/perfectcut.pdf b/Master/texmf-dist/doc/latex/perfectcut/perfectcut.pdf Binary files differnew file mode 100644 index 00000000000..ce9750140b9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/perfectcut/perfectcut.pdf diff --git a/Master/texmf-dist/doc/latex/perfectcut/perfectcut.tex b/Master/texmf-dist/doc/latex/perfectcut/perfectcut.tex new file mode 100644 index 00000000000..7744bd007ed --- /dev/null +++ b/Master/texmf-dist/doc/latex/perfectcut/perfectcut.tex @@ -0,0 +1,255 @@ +%%% perfectcut.sty documentation +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%% +%%% Author: Guillaume Munch-Maccagnoni +%%% http://www.pps.univ-paris-diderot.fr/~munch/ +%%% +%%% 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. +%%% +\documentclass[12pt,a4paper,british]{scrartcl} +\usepackage[T1]{fontenc} +\usepackage[latin9]{inputenc} +\setcounter{secnumdepth}{1} +\usepackage{babel} +\usepackage{booktabs} +\usepackage{calc} +\usepackage{amsmath} +\usepackage[unicode=true]{hyperref} + +\makeatletter + +\usepackage{perfectcut} +%% NewTXtext with a bugfix +\let\orig@makefnmark=\@makefnmark +\usepackage{newtxtext} +\let\@makefnmark=\orig@makefnmark +%%End of bugfix + +\usepackage[T1]{fontenc} +\usepackage{newtxmath} +\renewcommand*\ttdefault{txtt} +\usepackage[oldstyle,lining,scale=0.97]{sourcesanspro} +\usepackage[protrusion=true,expansion=true,tracking=false,kerning=true,spacing=true]{microtype} + +\makeatother + +\begin{document} + +\title{\texttt{perfectcut.sty} documentation} +\author{Guillaume Munch-Maccagnoni% +\thanks{\protect\href{http://www.pps.univ-paris-diderot.fr/~munch/}{http://www.pps.univ-paris-diderot.fr/$\sim$munch/}% +}} +\date{January 31st 2014} +\maketitle + +\section{Use} + +This package supplies the following commands: + +\begin{center} +\begin{tabular}{ll} +\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 +\bottomrule +\end{tabular} +\end{center} + +The effect of the commands is to determine the size of the brackets +depending on the number of nested \texttt{\textbackslash{}perfectcut} +(regardless of the contents). It is intended for use: +\begin{itemize} +\item In proof theory, for term notations of sequent calculus, +\item In computer science, for the modeling of abstract machines. +\end{itemize} +It could also be adapted for any visually similar effects as an alternative +to \texttt{\textbackslash{}left}, \texttt{\textbackslash{}right} and +\texttt{\textbackslash{}middle}. (You can contact the author.) + +If the package causes errors see the option \texttt{nomathstyle} below. + + +\section{Example} + +\def\mt{\tilde{\mu}} + + +\noindent \texttt{\footnotesize{The following states the commutativity +of a strong monad:}}~\\ +\texttt{\footnotesize{\textbackslash{}def\textbackslash{}mt\{\textbackslash{}tilde\{\textbackslash{}mu\}\}}}~\\ +\texttt{\footnotesize{\textbackslash{}{[}}}~\\ +\texttt{\footnotesize{\textbackslash{}cut t\{\textbackslash{}mt x.\textbackslash{}cut +u\{\textbackslash{}mt y.\textbackslash{}cut ve\}\}}}~\\ +\texttt{\footnotesize{=\textbackslash{}cut u\{\textbackslash{}mt y.\textbackslash{}cut +t\{\textbackslash{}mt x.\textbackslash{}cut ve\}\}}}~\\ +\texttt{\footnotesize{\textbackslash{}{]}}}~\\ +\texttt{\footnotesize{The following states the idempotency of an adjunction: }}~\\ +\texttt{\footnotesize{\textbackslash{}{[}}}~\\ +\texttt{\footnotesize{\textbackslash{}cut t\{\textbackslash{}mt x.\textbackslash{}cut\{\textbackslash{}mu\textbackslash{}alpha.\textbackslash{}cut +ue\}\{e'\}\}}}~\\ +\texttt{\footnotesize{=\textbackslash{}cut\{\textbackslash{}mu\textbackslash{}alpha.\textbackslash{}cut +t\{\textbackslash{}mt x.\textbackslash{}cut ue\}\}\{e'\}}}~\\ +\texttt{\footnotesize{\textbackslash{}{]}}}{\footnotesize \par} + + +\subsection{Using \texttt{perfectcut.sty}} + +\noindent \texttt{\footnotesize{\textbackslash{}usepackage\{perfectcut\}}}~\\ +\texttt{\footnotesize{\textbackslash{}let\textbackslash{}cut\textbackslash{}perfectcut}}{\footnotesize \par} + +\begin{center} +\framebox{\begin{minipage}[t]{0.8\columnwidth}% +\let\cut\perfectcut +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}} +\] +The following states the idempotency of an adjunction: +\[ +\cut t{\mt x.\cut{\mu\alpha.\cut ue}{e'}}=\cut{\mu\alpha.\cut t{\mt x.\cut ue}}{e'} +\] +% +\end{minipage}} +\end{center} + + +\subsection{Using \texttt{\textbackslash{}left}, \texttt{\textbackslash{}middle} +and \texttt{\textbackslash{}right} instead} + +\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} +\framebox{\begin{minipage}[t]{0.8\columnwidth}% +\newcommand{\cut}[2]{\left\langle #1\middle|\mkern-2mu\middle|#2\right\rangle} +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}} +\] +The following states the idempotency of an adjunction: +\[ +\cut t{\mt x.\cut{\mu\alpha.\cut ue}{e'}}=\cut{\mu\alpha.\cut t{\mt x.\cut ue}}{e'} +\] +% +\end{minipage}} +\end{center} + + +\section{Options} + + +\subsection{Option \texttt{nomathstyle}} + +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}. +In addition, without \texttt{realVert}, a penalty is added for better +line breaks. + + +\subsection{Customisation} + +The following mu-skips can be redefined in your preamble: + +\begin{center} +\begin{tabular}{ll} +\toprule +Command & Defines\tabularnewline +\midrule +\texttt{\textbackslash{}cutbarskip=5.0mu plus 8mu minus 2.0mu} & spacing around bars\tabularnewline +\texttt{\textbackslash{}cutangleskip=0.0mu plus 8mu minus 1.0mu} & spacing around angles (inside)\tabularnewline +\texttt{\textbackslash{}cutangleouterskip=0.0mu plus 8mu minus 0mu} & spacing around angles (outside)\tabularnewline +\texttt{\textbackslash{}cutinterbarskip=0.8mu plus 0mu minus 0mu} & spacing between bars\tabularnewline +\bottomrule +\end{tabular} +\end{center} + +\noindent (1 mu equals $\tfrac{1}{18}$-th 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. +Why not using the latter? Because both the plain \TeX{} +and the \texttt{amsmath} versions are incorrect when changing math +font, font size, math style or \texttt{\textbackslash{}delimitershortfall}. +Moreover, Opentype math fonts in particular offer more sizes. We +want a robust solution. + +\begin{center} +\begin{tabular}{lll} +\toprule +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] +\multicolumn{1}{l}{\emph{delimiter \#2 of length 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] +\multicolumn{3}{l}{\emph{delimiter \#2 of length 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 +\bottomrule +\end{tabular} +\end{center} + + +\subsection{Exemple with \texttt{\textbackslash{}nthleft}} + +\texttt{\footnotesize{\textbackslash{}nthleft0(\textbackslash{}nthleft1(\textbackslash{}nthleft2(\textbackslash{}nthleft3(\textbackslash{}nthleft4(\textbackslash{}nthleft5(}}{\footnotesize \par} + +\[ +\nthleft0(\nthleft1(\nthleft2(\nthleft3(\nthleft4(\nthleft5( +\] + + + +\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( +\] +Note: \texttt{\textbackslash{}big}\texttt{\footnotesize{ }}starts +at at size 2 in some fonts. + + +\section{License} + +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 \texttt{README} +file. +\end{document} |