From 356b6f8b38041bb39183b2b1d2c1d2c00eb941c0 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 6 Apr 2019 21:06:59 +0000 Subject: ptolemaicastronomy (6apr19) git-svn-id: svn://tug.org/texlive/trunk@50810 c570f23f-e606-0410-a88d-b1316a301751 --- .../doc/latex/ptolemaicastronomy/README.md | 37 ++ .../doc/latex/ptolemaicastronomy/README.txt | 37 ++ .../ptolemaicastronomy/ptolemaicastronomy.pdf | Bin 0 -> 246152 bytes .../ptolemaicastronomy/ptolemaicastronomy.dtx | 471 +++++++++++++++++++++ .../ptolemaicastronomy/ptolemaicastronomy.ins | 84 ++++ .../ptolemaicastronomy/ptolemaicastronomy.sty | 114 +++++ Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/tlpsrc/collection-pictures.tlpsrc | 1 + Master/tlpkg/tlpsrc/ptolemaicastronomy.tlpsrc | 0 9 files changed, 745 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/ptolemaicastronomy/README.md create mode 100644 Master/texmf-dist/doc/latex/ptolemaicastronomy/README.txt create mode 100644 Master/texmf-dist/doc/latex/ptolemaicastronomy/ptolemaicastronomy.pdf create mode 100644 Master/texmf-dist/source/latex/ptolemaicastronomy/ptolemaicastronomy.dtx create mode 100644 Master/texmf-dist/source/latex/ptolemaicastronomy/ptolemaicastronomy.ins create mode 100644 Master/texmf-dist/tex/latex/ptolemaicastronomy/ptolemaicastronomy.sty create mode 100644 Master/tlpkg/tlpsrc/ptolemaicastronomy.tlpsrc diff --git a/Master/texmf-dist/doc/latex/ptolemaicastronomy/README.md b/Master/texmf-dist/doc/latex/ptolemaicastronomy/README.md new file mode 100644 index 00000000000..1b1d10ff13b --- /dev/null +++ b/Master/texmf-dist/doc/latex/ptolemaicastronomy/README.md @@ -0,0 +1,37 @@ +ptolemaicastronomy +================== + +Diagrams of sphere models for variably strict conditionals (Lewis +counterfactuals) + +Author: Richard Zach +E-mail: rzach@ucalgary.ca +License: Released under the LaTeX Project Public License v1.3c or later +See: http://www.latex-project.org/lppl.txt + +David K. Lewis (Counterfactuals, Blackwell 1973) introduced a sphere +semantics for counterfactual conditionals. He jokingly referred to the +diagrams depicting such sphere models as Ptolemaic astronomy, hence +the name of this package. It has nothing to do with Ptolemy or with +astronomy, sorry. + +The macros provided in this package aid in the construction of +sphere model diagrams in the style of Lewis. The macros all make use +of TikZ. + +See https://github.com/rzach/ptolemaic-astronomy + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/doc/latex/ptolemaicastronomy/README.txt b/Master/texmf-dist/doc/latex/ptolemaicastronomy/README.txt new file mode 100644 index 00000000000..1b1d10ff13b --- /dev/null +++ b/Master/texmf-dist/doc/latex/ptolemaicastronomy/README.txt @@ -0,0 +1,37 @@ +ptolemaicastronomy +================== + +Diagrams of sphere models for variably strict conditionals (Lewis +counterfactuals) + +Author: Richard Zach +E-mail: rzach@ucalgary.ca +License: Released under the LaTeX Project Public License v1.3c or later +See: http://www.latex-project.org/lppl.txt + +David K. Lewis (Counterfactuals, Blackwell 1973) introduced a sphere +semantics for counterfactual conditionals. He jokingly referred to the +diagrams depicting such sphere models as Ptolemaic astronomy, hence +the name of this package. It has nothing to do with Ptolemy or with +astronomy, sorry. + +The macros provided in this package aid in the construction of +sphere model diagrams in the style of Lewis. The macros all make use +of TikZ. + +See https://github.com/rzach/ptolemaic-astronomy + + + + + + + + + + + + + + + diff --git a/Master/texmf-dist/doc/latex/ptolemaicastronomy/ptolemaicastronomy.pdf b/Master/texmf-dist/doc/latex/ptolemaicastronomy/ptolemaicastronomy.pdf new file mode 100644 index 00000000000..82cbc042788 Binary files /dev/null and b/Master/texmf-dist/doc/latex/ptolemaicastronomy/ptolemaicastronomy.pdf differ diff --git a/Master/texmf-dist/source/latex/ptolemaicastronomy/ptolemaicastronomy.dtx b/Master/texmf-dist/source/latex/ptolemaicastronomy/ptolemaicastronomy.dtx new file mode 100644 index 00000000000..e00111ae4be --- /dev/null +++ b/Master/texmf-dist/source/latex/ptolemaicastronomy/ptolemaicastronomy.dtx @@ -0,0 +1,471 @@ +% \iffalse meta-comment +% vim: textwidth=75 +%<*internal> +\iffalse +% +%<*readme> +ptolemaicastronomy +================== + +Diagrams of sphere models for variably strict conditionals (Lewis +counterfactuals) + +Author: Richard Zach +E-mail: rzach@ucalgary.ca +License: Released under the LaTeX Project Public License v1.3c or later +See: http://www.latex-project.org/lppl.txt + +David K. Lewis (Counterfactuals, Blackwell 1973) introduced a sphere +semantics for counterfactual conditionals. He jokingly referred to the +diagrams depicting such sphere models as Ptolemaic astronomy, hence +the name of this package. It has nothing to do with Ptolemy or with +astronomy, sorry. + +The macros provided in this package aid in the construction of +sphere model diagrams in the style of Lewis. The macros all make use +of TikZ. + +See https://github.com/rzach/ptolemaic-astronomy + +% +%<*internal> +\fi +\def\nameofplainTeX{plain} +\ifx\fmtname\nameofplainTeX\else + \expandafter\begingroup +\fi +% +%<*install> +\input docstrip.tex +\keepsilent +\askforoverwritefalse +\preamble + +ptolemaicastronomy +================== + +Diagrams of sphere models for variably strict conditionals (Lewis +counterfactuals) + +Author: Richard Zach +E-mail: rzach@ucalgary.ca +License: Released under the LaTeX Project Public License v1.3c or later +See: http://www.latex-project.org/lppl.txt + +David K. Lewis (Counterfactuals, Blackwell 1973) introduced a sphere +semantics for counterfactual conditionals. He jokingly referred to the +diagrams depicting such sphere models as Ptolemaic astronomy, hence +the name of this package. It has nothing to do with Ptolemy or with +astronomy, sorry. + +The macros provided in this package aid in the construction of +sphere model diagrams in the style of Lewis. The macros all make use +of TikZ. + +for documentation and source code see +https://github.com/rzach/ptolemaic-astronomy + +\endpreamble +\usedir{tex/latex/ptolemaicastronomy} +\generate{ + \file{\jobname.sty}{\from{\jobname.dtx}{package}} +} +% +%\endbatchfile +%<*internal> +\usedir{source/latex/ptolemaicastronomy} +\generate{ + \file{\jobname.ins}{\from{\jobname.dtx}{install}} +} +\nopreamble\nopostamble +\usedir{doc/latex/ptolemaicastronomy} +\generate{ + \file{README.txt}{\from{\jobname.dtx}{readme}} +} +\ifx\fmtname\nameofplainTeX + \expandafter\endbatchfile +\else + \expandafter\endgroup +\fi +% +% \fi +% +% \iffalse +%<*driver> +\ProvidesFile{ptolemaicastronomy.dtx} +% +%\NeedsTeXFormat{LaTeX2e}[1999/12/01] +%\ProvidesPackage{ptolemaicastronomy} +%<*package> + [2018/04/08 v1.00 Diagrams of sphere models for variably strict conditionals (Lewis counterfactuals)] +% +%<*driver> +\documentclass{ltxdoc} +\usepackage[numbered]{hypdoc} +\usepackage{\jobname} +\usepackage{lstdoc} +\EnableCrossrefs +\CodelineIndex +\RecordChanges +\begin{document} + \DocInput{\jobname.dtx} +\end{document} +% +% \fi +% +% \GetFileInfo{\jobname.dtx} +% \DoNotIndex{\newcommand,\newenvironment} +% +%\title{\textsf{ptolemaicastronomy} --- Diagrams of sphere models for variably strict conditionals (Lewis counterfactuals)\thanks{This file +% describes version \fileversion, last revised \filedate.} +%} +%\author{Richard Zach\thanks{\href{http://richardzach.org/}{richardzach.org}, E-mail: rzach@ucalgary.ca}} +%\date{Released \filedate} +% +%\maketitle +% +%\changes{v1.00}{2018/04/08}{First public release} +% +% \section{Introduction} + +% Lewis\footnote{David K. Lewis, \emph{Counterfactuals} (Blackwell +% 1973)} introduced a sphere semantics for counterfactual +% conditionals. He jokingly referred to the diagrams depicting such +% sphere models as ``Ptolemaic astronomy,'' hence the name of this +% package. It has nothing to do with Ptolemy or with astronomy, sorry. + +% The macros provided in this package aid in the construction of +% sphere model diagrams in the style of Lewis. The macros all make use +% of \href{https://ctan.org/tex-archive/graphics/pgf/}{Ti\emph{k}Z}. + +% Source code can be found at \url{https://github.com/rzach/ptolemaic-astronomy} +% +% \section{Usage} +% +% \DescribeMacro{\spheresystem} +% To draw a sphere system with \meta{n} layers, say +% \cmd{\spheresystem}\marg{n}: +% \begin{lstsample}{}{} +% \begin{tikzpicture} +% \spheresystem{5} +% \end{tikzpicture} +% \end{lstsample} +% The width of each layer is determined by the TikZ parameter +% \verb|layerwidth| and defaults to $.5$ TikZ units (so $0.5$ cm by +% default). The radius of the center sphere is \emph{not} +% \verb|layerwidth|, but $\verb|layerwidth| \times (1 - +% \verb|innerfactor|)$. \verb|innerfactor| defaults to $0.4$. +% Spheres are drawn in \verb|dotted| style by default. You can change +% this by passing an option to \cmd{\spheresystem}, e.g., +% to get red, dashed, thick lines and wider layers: +% \begin{lstsample}{}{} +% \begin{tikzpicture} +% \spheresystem[dashed, red, +% thick, layerwidth=.75]{3} +% \end{tikzpicture} +% \end{lstsample} +% \DescribeMacro{\spherelayer} \DescribeMacro{\spherefill} These +% macros shade the \meta{n}-th layer of the sphere model, or the +% entire \meta{n}-th sphere. The fill defaults to \verb|lightgray| and +% can be changed with \oarg{options}. Note that the fill extends to the +% center of the layer boundary line, so you should fill first and then +% draw the spheres. For instance: +% \begin{lstsample}{}{} +% \begin{tikzpicture} +% \spherelayer{3} +% \spherefill[yellow]{1} +% \spheresystem[densely dashed]{3} +% \end{tikzpicture} +% \end{lstsample} +% \DescribeMacro{\proposition} +% \DescribeMacro{\propositionintersect} + +% A proposition is a set of worlds which (usually) intersects with a +% sphere system. A common way of drawing them is as a parabola, and +% often we want to highlight the intersection of the proposition with +% the closest sphere with which it intersects. +% \cmd{\proposition}\marg{direction}\marg{n}\marg{width}\marg{length} +% will draw such a parabola. \meta{direction} is the angle (0 is due +% east and 90 is due north) from which you want the proposition to +% reach into the sphere system. \meta{n} is the innermost layer you +% want it to intersect. \meta{width} and \meta{length} describe the +% triangle with apex \meta{width} degrees and sides of length +% \meta{length}. Use \cmd{\propositionintersect} to also highlight the +% intersection with the \meta{n}-th sphere. E.g., here are +% propositions that intersects the 3rd layer at 45 degrees, with a +% width of 20, 40, and 60 degrees, and the intersection of the first +% one with the innermost sphere it intersects. + +% With the \verb|shift| option you can also position propositions outside the center, e.g., a proposition extending from the north through the west side of the sphere system would use, say, \verb|shift={(-1,-1)}|. + +% \begin{lstsample}{}{} +% \begin{tikzpicture} +% \propositionintersect{45}{3}{20}{3} +% \proposition{45}{3}{40}{3} +% \proposition{45}{3}{60}{3} +% \proposition[shift={(-1,-1)}]{90}{1}{20}{4} +% \spheresystem{5} +% \end{tikzpicture} +% \end{lstsample} + +% The degree of ``pointedness'' of propositions is determined by the +% \verb|tension| parameter, which defaults to $1.7$. Larger values +% make the proposition more bulgy, smaller values more pointy. + +% \begin{lstsample}{}{} +% \begin{tikzpicture} +% \proposition[green, +% proposition/.style={tension=3}]{0}{3}{80}{3} +% \proposition{0}{3}{80}{3} +% \proposition[red, +% proposition/.style={tension=1}]{0}{3}{80}{3} +% \proposition[blue, +% proposition/.style={tension=.5}]{0}{3}{80}{3} +% \spheresystem{5} +% \end{tikzpicture} +% \end{lstsample} + +% \DescribeMacro{\spherepos} +% \cmd{\spherepos}\marg{direction}\marg{n}\marg{code} moves to a +% position in the center of layer \meta{n} in \meta{direction} and +% then executes TikZ \verb|path| code \meta{code}. It's useful to put +% labels or other things into the sphere system. + +% \begin{lstsample}{}{} +% \begin{tikzpicture} +% \propositionintersect{45}{3}{20}{3} +% \spheresystem{5} +% \spherepos[fill,red]{45}{3}{circle[radius=.1]} +% \spherepos{90}{4}{node {$w$}} +% \spherepos{45}{6.5}{node {$\varphi$}} +% \end{tikzpicture} +% \end{lstsample} + +% \DescribeMacro{\sphereintersect} \cmd{\propositionintersect} uses +% \cmd{\sphereintersect}\oarg{options}\marg{n}\marg{code} to fill the +% area between the parabola and the outside edge of the \meta{n}-th +% sphere. (More precisely: what happens is that the area between the +% parabola and the line between its two endpoints is set as the +% clipping path, and then TikZ only shows the part of the shaded +% sphere within that clipping path.) That macro can also be used to +% intersect the respective layer with other paths, and in cases where +% the convex closure of the proposition does not include enough area. +% In that case, the clipping region has to be extended, and the path +% drawn separately. The example below shows what happens when a very +% wide parabola does not completely intersect with a sphere (on the +% right), how to use the trick to get the fill right (on the left), as +% well as how to intersect a more complex path with a sphere. + +% \begin{lstsample}{}{} +% \begin{tikzpicture} +% \propositionintersect{0}{3}{140}{3} +% \sphereintersect{3}{\propositionplot{180}{3}{140}{3} -- (-2,-2)} +% \proposition{180}{3}{140}{3} +% \sphereintersect{4}{plot[smooth] coordinates +% {(1.5,2) (2.5,1) (1.5,0) (2.5,-1) (1.5,-2) (2.5,-3)}} +% \draw[red] plot[smooth] coordinates +% {(1.5,2) (2.5,1) (1.5,0) (2.5,-1) (1.5,-2) (2.5,-3)} ; +% \spheresystem{5} +% \end{tikzpicture} +% \end{lstsample} + +% Finally, a complex example: the Sobel sequence diagram, Figure~2 from Lewis, p.~11: +% \begin{lstsample}{}{} +% \begin{tikzpicture}[scale=.8]\small +% % wider layers, pointier propositions +% \tikzset{layerwidth=1,innerfactor=0, +% proposition/.style={smooth,tension=1}} +% % fill the areas between three props and their innermost spheres +% \sphereintersect{3}{\propositionplot{30}{3.3}{30}{4}} +% \sphereintersect{2}{\propositionplot{30}{2.3}{45}{4}} +% \sphereintersect{1}{\propositionplot{30}{1.3}{60}{4}} +% % draw the sphere system +% \spheresystem{3} +% % draw the propositions +% \draw \propositionplot{30}{3.3}{30}{4}; +% \draw \propositionplot{30}{2.3}{45}{4}; +% \draw \propositionplot{30}{1.3}{60}{4}; +% % draw \psi (coordinates figured out by trial and error) +% \draw plot[smooth,tension=1.2] +% coordinates {(-1.5,3) (1.2,-1) (.8,2.3) (2.8,.7) (3,4)}; +% % draw and label the center world, spheres, and propositions +% \filldraw circle[radius=.05]; +% \node at (-.2,-.2) {$i$}; +% \spherepos{-70}{1.8}{node {$S^1_i$}} +% \spherepos{-70}{2.8}{node {$S^2_i$}} +% \spherepos{-70}{3.8}{node {$S^3_i$}} +% \spherepos{4}{4.3}{node {$\phi_1$} +% node at +(0,.5) {$\phi_2$} +% node at +(0,1) {$\phi_3$}} +% \spherepos{80}{4}{node {$\psi$}} +% \end{tikzpicture} +% \end{lstsample} + +%\StopEventually{^^A +% \PrintChanges +% \PrintIndex +%} +% +% \section{Implementation} +% +% \iffalse +%<*package> +% \fi +% +% \begin{macrocode} +\RequirePackage{tikz} + +\tikzset{ + sphere/.style = {dotted}, + sphere intersection/.style = {fill=lightgray}, + sphere layer/.style = {fill=lightgray}, + proposition/.style={smooth,tension=1.7}, +} +% \end{macrocode} +% \begin{macro}{layerwidth} +% \begin{macro}{innerfactor} +% TikZ parameters used to compute the sphere radii and can be set +% using TikZ's options mechanism or using \cmd{\tikzset}. +% \begin{macrocode} +\pgfkeyssetvalue{/tikz/layerwidth}{.5} +\pgfkeyssetvalue{/tikz/innerfactor}{.4} +% \end{macrocode} +% \end{macro}\end{macro} +% \begin{macro}{\sphereplot} +% \cmd{\sphereplot}\marg{n} gives the plot codes for the \meta{n}-th sphere +% \begin{macrocode} +\newcommand{\sphereplot}[1]{ + circle + [radius=(#1)*\pgfkeysvalueof{/tikz/layerwidth}- + \pgfkeysvalueof{/tikz/layerwidth}*\pgfkeysvalueof{/tikz/innerfactor}] +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\spheresystem} +% \cmd{\spheresystem}\oarg{options}\marg{n} draws a sphere system centered at +% the origin with \meta{n} number of layers +% +% \begin{macrocode} +\newcommand{\spheresystem}[2][]{ + \foreach \i in {1,...,#2}{ + \draw[sphere,#1] \sphereplot{\i} ; + } +} +% \end{macrocode} +% \end{macro} +% + +% +% +% \begin{macro}{\spherelayer} +% \cmd{\spherelayer}\oarg{options}\marg{n} shades the \meta{n}-th layer +% \begin{macrocode} +\newcommand{\spherelayer}[2][]{ + \begin{scope}[even odd rule] + \fill[#1,sphere layer] + \sphereplot{#2-1} \sphereplot{#2} ; + \end{scope} +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\spherefill} +% +% \cmd{\spherefill}\oarg{options}\marg{n} fills the \meta{n}-th sphere +% +% \begin{macrocode} +\newcommand{\spherefill}[2][]{ + \fill[sphere intersection,#1] + \sphereplot{#2} ; +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\sphereintersect} +% \cmd{\sphereintersect}\oarg{options}\marg{n}\marg{path} shades the +% area between \meta{path} and the the \meta{n}-th sphere +% layer. Options only apply to the sphere layer. +% \begin{macrocode} +\newcommand{\sphereintersect}[3][]{ + \begin{scope}[even odd rule] + \path[clip] #3; + \spherefill[#1]{#2} + \end{scope} +} +% \end{macrocode} +% \end{macro} +% +% +% +% \begin{macro}{\propositionplot} +% \cmd{\propositionplot}\oarg{options}\marg{direction}\marg{n}\marg{width}\marg{length} +% produces the \verb|plot| code for a proposition intersecting the \meta{n}-th layer in angle \meta{direction} +% away from the center of the sphere system, with endpoints \meta{length} +% away from the center at an angle of $\meta{direction} \pm \meta{width}/2$. +% \begin{macrocode} +\newcommand{\propositionplot}[4]{ + plot [proposition] + coordinates {+(#1+#3/2:#4) + +(#1:#2*\pgfkeysvalueof{/tikz/layerwidth}- + \pgfkeysvalueof{/tikz/layerwidth}*.9 + -\pgfkeysvalueof{/tikz/layerwidth}*\pgfkeysvalueof{/tikz/innerfactor}) + +(#1-#3/2:#4)} +} +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\proposition} +% \cmd{\proposition}\oarg{options}\marg{direction}\marg{n}\marg{width}\marg{length} +% actually draws the proposition. Note that \meta{options} applies to +% \cmd{\draw}, not to \cs{plot}. +% \begin{macrocode} +\newcommand{\proposition}[5][]{ + \draw[proposition,#1] \propositionplot {#2}{#3}{#4}{#5} ; + } +% \end{macrocode} +% \end{macro} +% +% +% \begin{macro}{\propositionintersect} +% \cmd{\spherepropositionintersect} does the same as \cmd{\sphereproposition} but +% also shades the area of intersection with the \meta{n}-th sphere. +% +% \begin{macrocode} +\newcommand{\propositionintersect}[5][]{ + \begin{scope} + \path[clip] \propositionplot{#2}{#3}{#4}{#5}; + \spherefill[#1]{#3} + \end{scope} + \draw[proposition,#1] \propositionplot{#2}{#3}{#4}{#5}; +} +% \end{macrocode} +% \end{macro} +% +% \begin{macro}{\spherepos} +% \cmd{\spherepos}\oarg{options}\marg{direction}\marg{n}\marg{code} +% shifts the scope to a position in the center of the \meta{n}-th layer in +% direction angle from the center---and then puts a \meta{code} \verb|path| +% there. +%\begin{macrocode} +\newcommand{\spherepos}[4][]{ + \begin{scope}[shift=(#2:#3*\pgfkeysvalueof{/tikz/layerwidth}- + \pgfkeysvalueof{/tikz/layerwidth}/2- + \pgfkeysvalueof{/tikz/layerwidth}*\pgfkeysvalueof{/tikz/innerfactor})] + \path[#1] #4 ; + \end{scope} +} +% \end{macrocode} +% \end{macro} +% +% +% \iffalse +% +% \fi +% +% \Finale +\endinput + diff --git a/Master/texmf-dist/source/latex/ptolemaicastronomy/ptolemaicastronomy.ins b/Master/texmf-dist/source/latex/ptolemaicastronomy/ptolemaicastronomy.ins new file mode 100644 index 00000000000..cb405082036 --- /dev/null +++ b/Master/texmf-dist/source/latex/ptolemaicastronomy/ptolemaicastronomy.ins @@ -0,0 +1,84 @@ +%% +%% This is file `ptolemaicastronomy.ins', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% ptolemaicastronomy.dtx (with options: `install') +%% +%% ptolemaicastronomy +%% ================== +%% +%% Diagrams of sphere models for variably strict conditionals (Lewis +%% counterfactuals) +%% +%% Author: Richard Zach +%% E-mail: rzach@ucalgary.ca +%% License: Released under the LaTeX Project Public License v1.3c or later +%% See: http://www.latex-project.org/lppl.txt +%% +%% David K. Lewis (Counterfactuals, Blackwell 1973) introduced a sphere +%% semantics for counterfactual conditionals. He jokingly referred to the +%% diagrams depicting such sphere models as Ptolemaic astronomy, hence +%% the name of this package. It has nothing to do with Ptolemy or with +%% astronomy, sorry. +%% +%% The macros provided in this package aid in the construction of +%% sphere model diagrams in the style of Lewis. The macros all make use +%% of TikZ. +%% +%% for documentation and source code see +%% https://github.com/rzach/ptolemaic-astronomy +%% +\input docstrip.tex +\keepsilent +\askforoverwritefalse +\preamble + +ptolemaicastronomy +================== + +Diagrams of sphere models for variably strict conditionals (Lewis +counterfactuals) + +Author: Richard Zach +E-mail: rzach@ucalgary.ca +License: Released under the LaTeX Project Public License v1.3c or later +See: http://www.latex-project.org/lppl.txt + +David K. Lewis (Counterfactuals, Blackwell 1973) introduced a sphere +semantics for counterfactual conditionals. He jokingly referred to the +diagrams depicting such sphere models as Ptolemaic astronomy, hence +the name of this package. It has nothing to do with Ptolemy or with +astronomy, sorry. + +The macros provided in this package aid in the construction of +sphere model diagrams in the style of Lewis. The macros all make use +of TikZ. + +for documentation and source code see +https://github.com/rzach/ptolemaic-astronomy + +\endpreamble +\usedir{tex/latex/ptolemaicastronomy} +\generate{ + \file{\jobname.sty}{\from{\jobname.dtx}{package}} +} +\endbatchfile + + + + + + + + + + + + + + +\endinput +%% +%% End of file `ptolemaicastronomy.ins'. diff --git a/Master/texmf-dist/tex/latex/ptolemaicastronomy/ptolemaicastronomy.sty b/Master/texmf-dist/tex/latex/ptolemaicastronomy/ptolemaicastronomy.sty new file mode 100644 index 00000000000..6d132d47091 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ptolemaicastronomy/ptolemaicastronomy.sty @@ -0,0 +1,114 @@ +%% +%% This is file `ptolemaicastronomy.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% ptolemaicastronomy.dtx (with options: `package') +%% +%% ptolemaicastronomy +%% ================== +%% +%% Diagrams of sphere models for variably strict conditionals (Lewis +%% counterfactuals) +%% +%% Author: Richard Zach +%% E-mail: rzach@ucalgary.ca +%% License: Released under the LaTeX Project Public License v1.3c or later +%% See: http://www.latex-project.org/lppl.txt +%% +%% David K. Lewis (Counterfactuals, Blackwell 1973) introduced a sphere +%% semantics for counterfactual conditionals. He jokingly referred to the +%% diagrams depicting such sphere models as Ptolemaic astronomy, hence +%% the name of this package. It has nothing to do with Ptolemy or with +%% astronomy, sorry. +%% +%% The macros provided in this package aid in the construction of +%% sphere model diagrams in the style of Lewis. The macros all make use +%% of TikZ. +%% +%% for documentation and source code see +%% https://github.com/rzach/ptolemaic-astronomy +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{ptolemaicastronomy} + [2018/04/08 v1.00 Diagrams of sphere models for variably strict conditionals (Lewis counterfactuals)] + + + + + + + + + + + + + + +\RequirePackage{tikz} + +\tikzset{ + sphere/.style = {dotted}, + sphere intersection/.style = {fill=lightgray}, + sphere layer/.style = {fill=lightgray}, + proposition/.style={smooth,tension=1.7}, +} +\pgfkeyssetvalue{/tikz/layerwidth}{.5} +\pgfkeyssetvalue{/tikz/innerfactor}{.4} +\newcommand{\sphereplot}[1]{ + circle + [radius=(#1)*\pgfkeysvalueof{/tikz/layerwidth}- + \pgfkeysvalueof{/tikz/layerwidth}*\pgfkeysvalueof{/tikz/innerfactor}] +} +\newcommand{\spheresystem}[2][]{ + \foreach \i in {1,...,#2}{ + \draw[sphere,#1] \sphereplot{\i} ; + } +} + +\newcommand{\spherelayer}[2][]{ + \begin{scope}[even odd rule] + \fill[#1,sphere layer] + \sphereplot{#2-1} \sphereplot{#2} ; + \end{scope} +} +\newcommand{\spherefill}[2][]{ + \fill[sphere intersection,#1] + \sphereplot{#2} ; +} +\newcommand{\sphereintersect}[3][]{ + \begin{scope}[even odd rule] + \path[clip] #3; + \spherefill[#1]{#2} + \end{scope} +} +\newcommand{\propositionplot}[4]{ + plot [proposition] + coordinates {+(#1+#3/2:#4) + +(#1:#2*\pgfkeysvalueof{/tikz/layerwidth}- + \pgfkeysvalueof{/tikz/layerwidth}*.9 + -\pgfkeysvalueof{/tikz/layerwidth}*\pgfkeysvalueof{/tikz/innerfactor}) + +(#1-#3/2:#4)} +} +\newcommand{\proposition}[5][]{ + \draw[proposition,#1] \propositionplot {#2}{#3}{#4}{#5} ; + } +\newcommand{\propositionintersect}[5][]{ + \begin{scope} + \path[clip] \propositionplot{#2}{#3}{#4}{#5}; + \spherefill[#1]{#3} + \end{scope} + \draw[proposition,#1] \propositionplot{#2}{#3}{#4}{#5}; +} +\newcommand{\spherepos}[4][]{ + \begin{scope}[shift=(#2:#3*\pgfkeysvalueof{/tikz/layerwidth}- + \pgfkeysvalueof{/tikz/layerwidth}/2- + \pgfkeysvalueof{/tikz/layerwidth}*\pgfkeysvalueof{/tikz/innerfactor})] + \path[#1] #4 ; + \end{scope} +} +\endinput +%% +%% End of file `ptolemaicastronomy.sty'. diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 2d29b8acd21..3a80214bd72 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -563,7 +563,7 @@ my @TLP_working = qw( pst-vectorian pst-vehicle pst-venn pst-vowel pst-vue3d pst2pdf pstool pstricks pstricks-add pstricks_calcnotes pstring ptex-base ptex-fontmaps ptex-fonts ptex-manual - ptex2pdf ptext ptptex + ptex2pdf ptext ptolemaicastronomy ptptex punk punk-latex punknova purifyeps pxbase pxchfon pxcjkcat pxfonts pxgreeks pxjahyper pxjodel pxpgfmark pxrubrica pxtatescale pxtxalfa pxufont diff --git a/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc b/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc index 22156a79679..9e94aac4525 100644 --- a/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc @@ -113,6 +113,7 @@ depend pmgraph depend postage depend prerex depend productbox +depend ptolemaicastronomy depend pxpgfmark depend qcircuit depend quantikz diff --git a/Master/tlpkg/tlpsrc/ptolemaicastronomy.tlpsrc b/Master/tlpkg/tlpsrc/ptolemaicastronomy.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d -- cgit v1.2.3