From b978c1cdee90dbf4cd09cb528a31371f3bc6ba4b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 10 Feb 2017 23:29:24 +0000 Subject: prooftrees (9feb17) git-svn-id: svn://tug.org/texlive/trunk@43184 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/prooftrees/README | 4 +- .../texmf-dist/doc/latex/prooftrees/prooftrees.pdf | Bin 851947 -> 856540 bytes .../texmf-dist/doc/latex/prooftrees/prooftrees.tex | 66 +++++++++++++++++---- .../texmf-dist/tex/latex/prooftrees/prooftrees.sty | 17 +++++- 4 files changed, 72 insertions(+), 15 deletions(-) diff --git a/Master/texmf-dist/doc/latex/prooftrees/README b/Master/texmf-dist/doc/latex/prooftrees/README index 5a97bc718a6..94b50f64ae3 100644 --- a/Master/texmf-dist/doc/latex/prooftrees/README +++ b/Master/texmf-dist/doc/latex/prooftrees/README @@ -1,4 +1,4 @@ -%% Copyright 2016 Clea F. Rees +%% Copyright 2017 Clea F. Rees % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -34,6 +34,6 @@ belief that prooftrees has bugs is not among them. Clea F. Rees ReesC21 cardiff ac uk -2016/12/06 +2017/02/08 vim: set nospell: diff --git a/Master/texmf-dist/doc/latex/prooftrees/prooftrees.pdf b/Master/texmf-dist/doc/latex/prooftrees/prooftrees.pdf index ece5b9feafb..5ab39f88c1d 100644 Binary files a/Master/texmf-dist/doc/latex/prooftrees/prooftrees.pdf and b/Master/texmf-dist/doc/latex/prooftrees/prooftrees.pdf differ diff --git a/Master/texmf-dist/doc/latex/prooftrees/prooftrees.tex b/Master/texmf-dist/doc/latex/prooftrees/prooftrees.tex index e44e68c10d8..bf00703e2f1 100644 --- a/Master/texmf-dist/doc/latex/prooftrees/prooftrees.tex +++ b/Master/texmf-dist/doc/latex/prooftrees/prooftrees.tex @@ -1,4 +1,4 @@ -%% Copyright 2016 Clea F. Rees +%% Copyright 2017 Clea F. Rees % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -16,11 +16,11 @@ %% % arara: pdflatex: { synctex: true, shell: false } % biber --output_format=bibtex --output_resolve prooftrees.bcf to generate .bib for upload -% sed -i '/1977/s/DATE/YEAR +% sed -i '/1977/s/DATE/YEAR' %% \pdfminorversion=7 \RequirePackage{svn-prov} -\ProvidesFileSVN{$Id: prooftrees.tex 5576 2016-12-06 03:28:22Z cfrees $}[v0.5 \revinfo] +\ProvidesFileSVN{$Id: prooftrees.tex 5848 2017-02-09 02:15:38Z cfrees $}[v0.6 \revinfo] \GetFileInfoSVN* \let\prooftreesdocversion\fileversion \let\prooftreesdocbase\filebase @@ -65,6 +65,17 @@ loadHyperref=true, createIndexEntries=false, ]{doctools} +\usepackage{bookmark} +\hypersetup{% + colorlinks=true, + citecolor={moss}, + extension=pdf, + linkcolor={strawberry}, + linktocpage=true, + pdfcreator={TeX}, + pdfproducer={pdfeTeX}, + urlcolor={blueberry}% +} \usepackage{cleveref} \makeatletter \renewcommand*\Describe@Macro[1]{\endgroup @@ -135,6 +146,8 @@ \newcommand*\fregautotokslabelname{Forest autowrapped toks register} \newcommand*\foptautotokslabelname{Forest autowrapped toks option} \newcommand*\fstylelabelname{Forest style} +\newcommand*\pkgoptlabelname{package option} +\newcommand*\pkglabelname{package} \let\PrintDescribeKey\PrintDescribeMacro \newcommand*\keyval[1]{\texttt{#1}} \NewDocumentCommand\keyname { s O {key} m }{% @@ -296,7 +309,7 @@ \bigskip \begin{abstract} - \noindent \pkg{prooftrees} is a \LaTeXe{} package, based on \pkg{forest}, designed to support the typesetting of proof trees in styles sometimes used in teaching introductory logic courses, especially those aimed at students without a strong background in mathematics. + \noindent \keyname[pkg]{\pkg{prooftrees}} is a \LaTeXe{} package, based on \keyname[pkg]{\pkg{forest}}, designed to support the typesetting of proof trees in styles sometimes used in teaching introductory logic courses, especially those aimed at students without a strong background in mathematics. One textbook which uses proofs of this kind is \textcite{hodges-logic}. \end{abstract} \bigskip @@ -433,7 +446,7 @@ \end{adjustwidth} \end{figure} -\emph{\bfseries Note that this package requires version 2.1 (2016/12/04) of \pkg{forest} \autocite{saso-forest-manual}. +\emph{\bfseries Note that this package requires version 2.1 (2016/12/04) of \keyname[pkg]{\pkg{forest}} \autocite{saso-forest-manual}. It will not work with versions prior to 2.1.} \bigskip @@ -1335,11 +1348,16 @@ To load the package simply add the following to your document's preamble. \begin{latexcode} \usepackage{prooftrees} \end{latexcode} -The package will load \pkg{forest} automatically. -No options are currently supported but any given will be passed to \pkg{forest}. -\Example{\cs{usepackage}[debug]{prooftrees}} would enable \pkg{forest}'s debugging. +\keyname[pkg]{\pkg{prooftrees}} will load \keyname[pkg]{\pkg{forest}} automatically. + +The only option currently supported is \keyname[pkgopt]{\option{tableaux}}. +If this option is specified, the \env{prooftree} environment will be called \env{tableau} instead. +\Example{\cs{usepackage}[tableaux]{prooftrees}} would cause the \env{tableau} environment to be defined \emph{rather than} \env{prooftree}. + +Any other options given will be passed to \keyname[pkg]{\pkg{forest}}. +\Example{\cs{usepackage}[debug]{prooftrees}} would enable \keyname[pkg]{\pkg{forest}}'s debugging. -If one or more of \pkg{forest}'s libraries are to be loaded, it is recommended that these be loaded separately and their defaults applied, if applicable, within a local \TeX{} group so that they do not interfere with \pkg{prooftree}'s environment. +If one or more of \keyname[pkg]{\pkg{forest}}'s libraries are to be loaded, it is recommended that these be loaded separately and their defaults applied, if applicable, within a local \TeX{} group so that they do not interfere with \keyname[pkg]{\pkg{prooftrees}}'s environment. % END sec:llwytho \section{Invocation}\label{sec:invoke} @@ -1354,7 +1372,7 @@ The \meta{tree specification} specifies the tree in the bracket notation parsed {\em {\bfseries - Users of \pkg{forest} should note that the environments \env{prooftree} and \env{forest} differ in important ways.% + Users of \keyname[pkg]{\pkg{forest}} should note that the environments \env{prooftree} and \env{forest} differ in important ways.% }% \begin{itemize} \item \env{prooftree}'s argument is \emph{mandatory}. @@ -1362,6 +1380,11 @@ The \meta{tree specification} specifies the tree in the bracket notation parsed \item \cs{end}\arg{prooftree} \emph{must} follow the \meta{tree specification} \emph{immediately}. \end{itemize}% } + +\DescribeEnv{tableau}\cs{begin}\arg{\env{tableau}}\marg{tree preamble}\meta{tree specification}\cs{end}\arg{\env{tableau}}\AfterLastParam +A substitute for \env{prooftree}, defined \emph{instead} of \env{prooftree} if the package option \option{tableaux} is specified or a \cs{prooftree} macro is already defined when \keyname[pkg]{\pkg{prooftrees}} is loaded. +See \cref{sec:llwytho} for details and \cref{sec:compat} for this option's raison d'ĂȘtre. + % END sec:invoke \section{Proof Tree Anatomy}\label{sec:anatomy} @@ -1859,9 +1882,32 @@ For example, if for some reason you would like bold line numbers, try % END sec:macros +\section{Compatibility}\label{sec:compat} +% BEGIN sec:compat + +Versions of \pkg{prooftrees} prior to 0.5 are incompatible with \pkg{bussproofs}, which also defines a \env{prooftree} environment. +Version 0.6 is compatible with \env{bussproofs} provided +\begin{description}[font=\itshape] + \item[either] \pkg{bussproofs} is loaded \emph{before} \pkg{prooftrees} + \item[or] \pkg{prooftrees} is loaded with option \option{tableaux} (see \cref{sec:llwytho}). +\end{description} +In either case, \pkg{prooftrees} will \emph{not} define a \env{prooftree} environment, but will instead define \env{tableau}. +This allows you to use \env{tableau} for \pkg{prooftrees} trees and \env{prooftree} for \pkg{bussproofs} trees. + +% END sec:compat + \section{Version History}\label{sec:hanes} % BEGIN sec:hanes +\subsection*{0.6}\label{subsec:v0.6} +% BEGIN subsec:v0.6 + +Add compatibility option for use with \pkg{bussproofs}. +See \cref{sec:llwytho}. +Thanks to Peter Smith for suggesting this. + +% END subsec:v0.6 + \subsection*{0.5}\label{subsec:v0.5} % BEGIN subsec:v0.5 diff --git a/Master/texmf-dist/tex/latex/prooftrees/prooftrees.sty b/Master/texmf-dist/tex/latex/prooftrees/prooftrees.sty index 56052313599..fbe1ca2af31 100644 --- a/Master/texmf-dist/tex/latex/prooftrees/prooftrees.sty +++ b/Master/texmf-dist/tex/latex/prooftrees/prooftrees.sty @@ -1,4 +1,4 @@ -%% Copyright 2016 Clea F. Rees +%% Copyright 2017 Clea F. Rees % % This work may be distributed and/or modified under the % conditions of the LaTeX Project Public License, either version 1.3 @@ -16,8 +16,19 @@ %% \NeedsTeXFormat{LaTeX2e} \RequirePackage{svn-prov} -\ProvidesPackageSVN{$Id: prooftrees.sty 5575 2016-12-06 01:30:03Z cfrees $}[v0.5 \revinfo] +\ProvidesPackageSVN{$Id: prooftrees.sty 5848 2017-02-09 02:15:38Z cfrees $}[v0.6 \revinfo] +\RequirePackage{etoolbox} +% define \prooftrees@enw to hold the name of the environment +% default is to name the environment prooftree, this ensures backwards compatibility +\newcommand*\prooftrees@enw{prooftree} +% allow users to change the name to tableau using tableaux +\DeclareOption{tableaux}{\renewcommand*\prooftrees@enw{tableau}} +% just in case +\DeclareOption{tableau}{\renewcommand*\prooftrees@enw{tableau}} \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{forest}} +% if \prooftree is not yet defined, set the name to prooftree; otherwise, use tableau to avoid conflict with bussproofs (which uses 'prooftree' rather than 'bussproof' as one might expect) +\ifundef\prooftree{\renewcommand*\prooftrees@enw{prooftree}}{\renewcommand*\prooftrees@enw{tableau}} +% let users override the default prooftree in case they need to load bussproofs later \ProcessOptions \RequirePackage{forest}[2016/12/04] \RequirePackage{amssymb} @@ -752,7 +763,7 @@ } \environbodyname\prooftreebody \bracketset{action character=@} -\NewEnviron{prooftree}[1]{% \forest/\endforest from egreg's answer at http://tex.stackexchange.com/a/229608/ +\NewEnviron{\prooftrees@enw}[1]{% \forest/\endforest from egreg's answer at http://tex.stackexchange.com/a/229608/ \forest (% stages={% customised definition of stages - we don't use any custom stages, but we do use several custom keylists, where the processing order of these is critical -- cgit v1.2.3