summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ptolemaicastronomy
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-04-06 21:06:59 +0000
committerKarl Berry <karl@freefriends.org>2019-04-06 21:06:59 +0000
commit356b6f8b38041bb39183b2b1d2c1d2c00eb941c0 (patch)
tree8ad4eb6e46cbadc5e8a57cdcee49cb65ef61ae4b /Master/texmf-dist/tex/latex/ptolemaicastronomy
parent7e6d3578613f3a5e14a3273bbe252ea335144b87 (diff)
ptolemaicastronomy (6apr19)
git-svn-id: svn://tug.org/texlive/trunk@50810 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ptolemaicastronomy')
-rw-r--r--Master/texmf-dist/tex/latex/ptolemaicastronomy/ptolemaicastronomy.sty114
1 files changed, 114 insertions, 0 deletions
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'.