texlive[56872] Master: causets (7nov20)

commits+karl at tug.org commits+karl at tug.org
Sat Nov 7 23:01:51 CET 2020


Revision: 56872
          http://tug.org/svn/texlive?view=revision&revision=56872
Author:   karl
Date:     2020-11-07 23:01:51 +0100 (Sat, 07 Nov 2020)
Log Message:
-----------
causets (7nov20)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/causets/
    trunk/Master/texmf-dist/doc/latex/causets/README.md
    trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example1.pdf
    trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example1.tex
    trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example2.pdf
    trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example2.tex
    trunk/Master/texmf-dist/doc/latex/causets/causets.pdf
    trunk/Master/texmf-dist/doc/latex/causets/causets.tex
    trunk/Master/texmf-dist/tex/latex/causets/
    trunk/Master/texmf-dist/tex/latex/causets/causets.sty
    trunk/Master/tlpkg/tlpsrc/causets.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/causets/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/causets/README.md	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/causets/README.md	2020-11-07 22:01:51 UTC (rev 56872)
@@ -0,0 +1,51 @@
+LaTeX Package: causets
+======================
+This is a LaTeX package to create (Hasse) diagrams of causal sets - short causets (locally finite, partially ordered sets) to be used inline with text or mathematical expressions, as well as with TikZ pictures. 
+
+The three main commands (macros) are 
+```tex
+% causet generated from a permutation:
+\pcauset{..,i,..,j,..}
+% causet generated from a permutation, but some links are removed:
+\rcauset{..,i,..,j,..}{..,i/j,..}
+% causet with events positioned by a permutation, links are specified explicitly:
+\causet{..,i,..,j,..}{..,i/j,..}
+```
+
+For a full documentation, please see causets.pdf.
+
+Additional Packages
+===================
+This package is built on the package `tikz`, which is usually included in the standard LaTeX installations. 
+
+Bug Reports
+===========
+Problems with the package are reported here:
+https://github.com/c-minz/LaTeX-causets/issues
+
+If you find a bug, please report it by including:
+* Comprehensive problem description - including error or warning messages (if any).
+* Minimal test file that shows the problem.
+* Used drivers/programs with version informations.
+* Version information about used packages and programs.
+* Please no other files than the minimal test file (*.tex).
+
+Bug reports can be send to the maintainer:
+  C. Minz
+  christoph{dot}minz[AT]gmail{dot}com
+
+Information on Distribution
+===========================
+Copyright 2020 by C. Minz
+
+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
+
+This work has the LPPL maintenance status "maintained".
+
+The current maintainer of this work is C. Minz.
+https://github.com/c-minz
+
+
+This work consists of the files causets.sty, causets.tex, causets.pdf, causet_tikz_example1.tex, causet_tikz_example1.pdf, causet_tikz_example2.tex, causet_tikz_example2.pdf


Property changes on: trunk/Master/texmf-dist/doc/latex/causets/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example1.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example1.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example1.pdf	2020-11-07 00:53:03 UTC (rev 56871)
+++ trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example1.pdf	2020-11-07 22:01:51 UTC (rev 56872)

Property changes on: trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example1.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example1.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example1.tex	2020-11-07 22:01:51 UTC (rev 56872)
@@ -0,0 +1,18 @@
+\documentclass[tikz]{standalone}
+\usepackage[permutation,huge,neon]{causets}
+\usetikzlibrary{fit,shapes.geometric}
+\begin{document}
+\begin{tikzpicture}
+	\begin{scope}[xshift=3cm, yshift=-1cm]
+		\drawpcauset{5,2,7,3,6,1,4}
+		\draw[red, double] (0, 0) circle[radius=0.1];
+	\end{scope}
+	\node[draw=blue, inner sep=1pt, thick, ellipse, fit=(E4) (E6) (E7)] (Finf) {};
+	\node[draw=blue] (FinfLabel) at (6.5, -0.5) {future infinity};
+	\node[draw=red] (centerLabel) at (0.5, -0.5) {center};
+	\node[draw=green!50!black] (myEventLabel) at (5.5, -2.5) {event (E2)};
+	\draw[ultra thick, blue, ->] (FinfLabel) -- (Finf);
+	\draw[ultra thick, red, ->] (centerLabel) -- (3, -1);
+	\draw[ultra thick, green!50!black, ->] (myEventLabel) -- (E2);
+\end{tikzpicture}
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example1.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example2.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example2.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example2.pdf	2020-11-07 00:53:03 UTC (rev 56871)
+++ trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example2.pdf	2020-11-07 22:01:51 UTC (rev 56872)

Property changes on: trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example2.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example2.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example2.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example2.tex	2020-11-07 22:01:51 UTC (rev 56872)
@@ -0,0 +1,69 @@
+\documentclass[tikz]{standalone}
+\usepackage[blue]{causets}
+\usetikzlibrary{fit,shapes.geometric}
+\begin{document}
+\begin{tikzpicture}[-stealth, line width=2pt]
+	\matrix[nodes={draw, fill=yellow!10, thin, circle, inner sep=0.6ex, minimum size=5ex}, row sep=1.5cm, column sep=0.1cm]
+	{
+		\node (C1234) {\pcauset{1,2,3,4}}; 
+	& \node (C1243) {\pcauset{1,2,4,3}}; 
+	& \node[fill=yellow!20] (C1423) {\pcauset{1,4,2,3}}; 
+	& \node (C1324) {\pcauset{1,3,2,4}}; 
+	& \node (C1432) {\pcauset{1,4,3,2}}; 
+	& \node[fill=yellow!30] (C4123) {\pcauset{4,1,2,3}}; 
+	& \node[fill=yellow!30] (C4132) {\pcauset{4,1,3,2}}; 
+	& \node[fill=yellow!20] (C3124) {\pcauset{3,1,2,4}}; 
+	& & \node[fill=yellow!20] (C3412) {\pcauset{3,4,1,2}}; 
+	& \node[fill=yellow!30] (C3142) {\pcauset{3,1,4,2}}; 
+	& \node[fill=yellow!30] (C4312) {\pcauset{4,3,1,2}}; 
+	& \node (C2134) {\pcauset{2,1,3,4}}; 
+	& \node (C2143) {\pcauset{2,1,4,3}}; 
+	& \node[fill=yellow!20] (C4213) {\pcauset{4,2,1,3}}; 
+	& \node (C3214) {\pcauset{3,2,1,4}}; 
+	& \node (C4321) {\pcauset{4,3,2,1}}; 
+	\\
+	\\
+	& & \node (C123) {\pcauset{1,2,3}}; 
+	& & & \node (C132) {\pcauset{1,3,2}}; 
+	& & & \node[fill=yellow!20] (C312) {\pcauset{3,1,2}}; 
+	& & & \node (C213) {\pcauset{2,1,3}}; 
+	& & & \node (C321) {\pcauset{3,2,1}}; 
+	\\
+	& & & & & \node (C12) {\pcauset{1,2}}; 
+	& & & & & & \node (C21) {\pcauset{2,1}}; 
+	\\
+	& & & & & & & & \node (C1) {\pcauset{1}}; 
+	\\
+	};
+	\draw (C1) -- node[below left] {$p_{12}$} (C12);
+	\draw (C12) -- node[below left] {$p_{123}$} (C123);
+	\draw (C123) -- node[sloped, midway, below] {$p_{1234}$} (C1234);
+	\draw (C123) -- node[sloped, near end, below] {$p_{1243}$} (C1243);
+	\draw (C123) -- node[sloped, midway, below] {$p_{1423}$} (C1423);
+	\draw (C123) -- node[sloped, near start, below] {$p_{4123}$} (C4123);
+	\draw (C12) -- node[left] {$p_{132}$} (C132);
+	\draw (C132) -- node[sloped, near start, below] {$p_{1342}$} (C1423);
+	\draw (C132) -- node[sloped, near end, below] {$p_{1324}$} (C1324);
+	\draw (C132) -- node[sloped, midway, above] {$p_{1432}$} (C1432);
+	\draw (C132) -- node[sloped, near start, below] {$p_{4132}$} (C4132);
+	\draw (C12) -- node[below right] {$p_{312}$} (C312);
+	\draw (C312) -- node[sloped, near end, above] {$p_{3124}$} (C3124);
+	\draw (C312) -- node[sloped, near end, above] {$p_{3412}$} (C3412);
+	\draw (C312) -- node[sloped, near end, above] {$p_{3142}$} (C3142);
+	\draw (C312) -- node[sloped, near start, below] {$p_{4312}$} (C4312);
+	\draw (C1) -- node[below right] {$p_{21}$} (C21);
+	\draw (C21) -- node[below left] {$p_{231}$} (C312);
+	\draw (C312) -- node[sloped, near start, below] {$p_{2341}$} (C4123);
+	\draw (C312) -- node[sloped, near end, above] {$p_{2431}$} (C4132);
+	\draw (C21) -- node[right] {$p_{213}$} (C213);
+	\draw (C213) -- node[sloped, midway, above] {$p_{2134}$} (C2134);
+	\draw (C213) -- node[sloped, near start, below] {$p_{2413}$} (C3142);
+	\draw (C213) -- node[sloped, near end, below] {$p_{2143}$} (C2143);
+	\draw (C213) -- node[sloped, near start, below] {$p_{4213}$} (C4213);
+	\draw (C21) -- node[below right] {$p_{321}$} (C321);
+	\draw (C321) -- node[sloped, near start, below] {$p_{3421}$} (C4312);
+	\draw (C321) -- node[sloped, midway, above] {$p_{3241}$} (C4213);
+	\draw (C321) -- node[sloped, near end, above] {$p_{3214}$} (C3214);
+	\draw (C321) -- node[sloped, midway, below] {$p_{4321}$} (C4321);
+\end{tikzpicture}
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/causets/causet_tikz_example2.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/causets/causets.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/causets/causets.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/causets/causets.pdf	2020-11-07 00:53:03 UTC (rev 56871)
+++ trunk/Master/texmf-dist/doc/latex/causets/causets.pdf	2020-11-07 22:01:51 UTC (rev 56872)

Property changes on: trunk/Master/texmf-dist/doc/latex/causets/causets.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/causets/causets.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/causets/causets.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/causets/causets.tex	2020-11-07 22:01:51 UTC (rev 56872)
@@ -0,0 +1,570 @@
+\documentclass[12pt]{article}
+\usepackage[a4paper, left = 2.5cm, right = 2.5cm, top = 2.5cm, bottom = 2.5cm]{geometry}
+\usepackage[english]{babel}
+\usepackage{lmodern}
+\linespread{1.20} % line spreading
+\setlength{\parindent}{2em} % paragraph indent
+\setlength{\parskip}{0em} % space between paragraphs
+\usepackage{titlesec} % change headline formats
+\renewcommand{\thesection}{\arabic{section}}
+\titlespacing*{\section}{0pt}{15pt}{5pt}
+\titleformat{\section}{\large\bfseries\sffamily}{\thetitle}{17pt}{}{}
+\usepackage{fancyhdr} % advanced header and footer
+\pagestyle{fancy}
+\fancypagestyle{plain}{\fancyhf{}\renewcommand{\headrulewidth}{0.0pt}}
+\setlength{\headheight}{16.0pt}
+\fancyhead[L]{\sffamily causets - Documentation}
+\fancyhead[C]{}
+\fancyhead[R]{\sffamily \nouppercase{\rightmark}}
+\renewcommand{\headrulewidth}{0.2pt}
+\renewcommand{\footrulewidth}{0.0pt}
+\fancyfoot[L]{}
+\fancyfoot[C]{}
+\fancyfoot[R]{\sffamily \thepage}
+\usepackage{hyperref} % cross references
+\hypersetup{%
+	bookmarksopen = true, %
+	bookmarksopenlevel = 0, %
+	bookmarksnumbered = true, %
+	pdftitle = {{Package Documentation: causets}}, %
+	pdfauthor = {{Christoph Minz}}, %
+	pdfstartpage = 1, %
+	pdfstartview = {FitH}, %
+	breaklinks = false, %
+	colorlinks = true, %
+	linkcolor = black!50!blue, %
+	citecolor = black, %
+	filecolor = black, %
+	menucolor = black, %
+	urlcolor = black!25!blue %
+}
+\usepackage{booktabs} % book table style
+\usepackage{multirow} % spanning multiple rows
+\usepackage{listings} % code environments
+\lstset{ 
+	backgroundcolor=\color{yellow!50!black!10},
+	basicstyle=\ttfamily\footnotesize,
+	breakatwhitespace=true,
+	breaklines=true,
+	captionpos=b,
+	commentstyle=\color{green!25!gray},
+	keepspaces=true,
+	keywordstyle=\color{black},
+	language=TeX,
+	numbers=left,
+	numbersep=5pt,
+	numberstyle=\tiny\color{gray},
+	rulecolor=\color{black},
+	showspaces=false,
+	showstringspaces=false,
+	showtabs=false,
+	stepnumber=1,
+	stringstyle=\color{purple!50!black},
+	tabsize=2
+}
+
+\usepackage{amsmath}
+\usepackage{causets}
+\renewcommand{\causetsDirectory}{.}
+
+\title{{\small package}\\[0.5cm] \huge causets \\[0.2cm]{\small version 1.0}\\[0.5cm]}
+\author{Christoph Minz}
+
+\begin{document}
+
+{\sffamily\maketitle}
+
+\begin{center}
+$\displaystyle
+	\largecausets
+	\left\{ 
+		\pcauset{3,2,1}, 
+		\pcauset{3,1,2}, 
+		\pcauset{2,1,3}, 
+		\pcauset{1,3,2}, 
+		\pcauset{1,2,3} 
+	\right\} 
+$
+\\
+$\displaystyle
+	\largecausets
+	\causetsDrawLabelstrue
+	\left\{ 
+		\pcauset{3,2,1}, 
+		\pcauset{4,5,3,1,2}, 
+		\pcauset{2,1,3}, 
+		\pcauset{1,3,2}, 
+		\pcauset{1,2,3} 
+	\right\} 
+$
+\\
+$\displaystyle
+	\largecausets
+	\causetsDrawPermutationtrue
+	\left\{ 
+		\pcauset{3,2,1}, 
+		\pcauset{3,1,2}, 
+		\pcauset{2,1,3}, 
+		\pcauset{1,3,2}, 
+		\pcauset{1,2,3} 
+	\right\} 
+$
+\end{center}
+
+\vspace{2em}
+
+\section*{What Is the Purpose of This Package?}
+\label{sec:Purpose}
+Causal set theory is a proposed framework for quantum gravity. 
+Causal sets (\textbf{causets} for short) are locally finite, partially ordered sets. 
+Though one can describe them mathematically as a set with a partial order, it is usually much simpler to just draw (Hasse) diagrams. 
+
+This package implements some simple functionality to produce such diagrams for causets by drawing them as TikZ graphics. 
+The drawing algorithm makes use of the fact that every finite causet that embeds in $\smash{1 + 1}$ dimensional Minkowski spacetime can be represented by a product of two total orders (2D-orders), where one order can be the total order of the integers labeling the causet elements, while the other is a permutation of the labels\footnote{See \url{https://arxiv.org/abs/0706.0375} and \url{https://arxiv.org/abs/2011.02965} for more details on 2D-orders and causal sets.}. 
+The idea is then used as a blueprint to draw diagrams for any generic causet, so that it becomes easy to draw causets and even use them in mathematical expressions. 
+
+\clearpage
+\section{Introduction - the Main Commands}
+\label{sec:Introduction}
+This package is built on the package \lstinline\xA7tikz\xA7 to draw the diagrams. 
+To import the \lstinline\xA7causets\xA7 package into a \LaTeX\ file, write 
+\begin{lstlisting}
+\usepackage{causets}
+\end{lstlisting}
+in the preamble of the document. 
+
+For a more demonstrative introduction in this first section, I use the package options \lstinline\xA7black\xA7 (only black and white diagrams) and \lstinline\xA7permutation\xA7 (also shows the permutation), 
+\begin{lstlisting}
+\usepackage[black,permutation]{causets}
+\end{lstlisting}
+The three main commands of this package are 
+\begin{lstlisting}
+\pcauset{..,i,..,k,..,j,..}
+\rcauset{...}{..,i/j,..}
+\causet{...}{..,i/j,..}
+\end{lstlisting}
+The first command takes a permutation of the integers $[ 1, N ]$ (where $N$ is the cardinality of the causet). 
+The permutation determines the event positions and causal structure such that events $i$ and $j$ are linked if $i < j$ and there is no $k > j$ between $i$ and $j$. 
+The second command does the same, but ignores links between event pairs \lstinline\xA7i/j\xA7 as given in the second argument. 
+The third command only uses the permutation to position the events, the links have to be explicitly specified by event pairs \lstinline\xA7i/j\xA7 in the second argument. 
+
+Any causet that can be embedded in $1 + 1$ dimensional Minkowski spacetime can also be described by the product of two total orders (a 2D-order). 
+Let the causets elements be labeled by an increasing null coordinate $u$ (pointing upwards along the right axis of the grids under the diagrams below), then the causal relation (partial order) implies a label permutation along the null coordinate $v$ (pointing upwards along the left axis of the grids under the diagrams below). 
+This permutation is the input of the \lstinline\xA7\pcauset\xA7 command that computes the causal relation from the permutation. 
+See example 1 in \autoref{tab:MainCommandsExamples}. 
+\causetsSetColorsBlack
+\causetsDrawPermutationtrue
+\begin{table}[h!]
+	\begin{tabular*}{\textwidth}{lp{0.72\textwidth}c}
+		\toprule
+		\#
+	& command 
+	& inline output 
+	\\\midrule
+		1 
+	& \lstinline\xA7\pcauset{4,7,2,6,1,5,3}\xA7
+	& \pcauset{4,7,2,6,1,5,3}
+	\\\midrule
+		2 
+	& \lstinline\xA7\rcauset{4,7,2,6,1,5,3}{2/5}\xA7
+	& \rcauset{4,7,2,6,1,5,3}{2/5}
+	\\\midrule
+		3 
+	& \lstinline\xA7\causet{4,7,2,6,1,5,3}{1/3,1/5,2/3,2/6,4/5,4/6,4/7}\xA7
+	& \causet{4,7,2,6,1,5,3}{1/3,1/5,2/3,2/6,4/5,4/6,4/7}
+	\\\bottomrule
+	\end{tabular*}
+	\caption{\label{tab:MainCommandsExamples} Examples for the three main commands of the package.}
+\end{table}
+\causetsSetColorsGray
+\causetsDrawPermutationfalse
+
+Every causet that does not embed in $1 + 1$ dimensional Minkowski spacetime can be made embeddable by adding links to it. 
+Adding the minimal number of links yields permutations that should be used to determine the coordinates of the diagram. 
+The links that have been added to obtain the permutation need to be removed from the generated causet, which is specified by link pairs \lstinline\xA7i/j\xA7. 
+See example 2 in \autoref{tab:MainCommandsExamples}. 
+
+In some situations, it might be easier to specify the list of link pairs that exist, instead of removing links. 
+For this purpose, use the \lstinline\xA7\causet\xA7 command. 
+As an example, we rewrite the example 2 by specifying all existing links as pairs, see example 3 in \autoref{tab:MainCommandsExamples}. 
+Note that the \lstinline\xA7\rcauset\xA7 command was actually much shorter for this particular example. 
+However, if the list of link pairs in the \lstinline\xA7\rcauset\xA7 command is very long, specifying all existing link pairs instead with the \lstinline\xA7\causet\xA7 yields a faster performance. 
+
+As an example for the use in mathematical expressions, here is the code for the first set of causets on the title page:
+\begin{lstlisting}
+\usepackage{causets}
+... % ... \begin{document} ...
+\begin{align*}
+	\left\{ 
+		\pcauset{3,2,1}, \pcauset{3,1,2}, \pcauset{2,1,3}, \pcauset{1,3,2}, \pcauset{1,2,3} 
+	\right\}. 
+\end{align*}
+\end{lstlisting}
+\vspace{-1.5em}
+\begin{align*}
+	\left\{ 
+		\pcauset{3,2,1}, 
+		\pcauset{3,1,2}, 
+		\pcauset{2,1,3}, 
+		\pcauset{1,3,2}, 
+		\pcauset{1,2,3} 
+	\right\} 
+	. 
+\end{align*}
+(Note that here the package is imported without any options.) 
+
+Of course, a given causet might have more than one representing permutation, so that any of those permutations may be used. 
+However, you may consider it a good practice to choose the permutation that starts with the larger integer, so that disjoint elements appear to the right in the graphs. 
+For example, you may write \lstinline\xA7\pcauset{3,1,2}\xA7, \pcauset{3,1,2}, as opposed to \lstinline\xA7\pcauset{2,3,1}\xA7, \pcauset{2,3,1}. 
+
+It is possible to use dots in a permutation so that TikZ will auto-complete the list. 
+For example, the command \lstinline\xA7\pcauset{14,...,10,8,2,1,9,3,4,...,7}\xA7 will generate the diagram 
+\begin{align*}
+	\causetsSetColorsBlack
+	\causetsDrawPermutationtrue
+	\pcauset{14,...,10,8,2,1,9,3,4,...,7}
+\end{align*}
+which is the same as \lstinline\xA7\pcauset{14,13,12,11,10,8,2,1,9,3,4,5,6,7}\xA7. (This graphic uses the package options \lstinline\xA7black\xA7 and \lstinline\xA7permutation\xA7 again.) 
+
+\clearpage
+\section{Package Options}
+\label{sec:PackageOptions}
+Each of the package options can either be specified in square brackets when declaring the package (option applies globally) or be changed with a macro at any point in the document (option applies to the local scope). 
+
+If no options are used, an output like \rcauset{4,2,7,6,1,5,3}{2/5} is obtained with the commands  
+\begin{lstlisting}
+\usepackage{causets}
+... % ... \begin{document} ...
+\rcauset{4,2,7,6,1,5,3}{2/5}
+\end{lstlisting}
+The package options and their macros are shown in \autoref{tab:PackageOptions}, using the same example. 
+
+\begin{table}
+	\begin{tabular*}{\textwidth}{p{0.75\textwidth}c}
+		\toprule
+		package option 
+	& inline output 
+	\\\midrule
+		\lstinline\xA7\usepackage[permutation]{causets}\xA7 shows permutations 
+	& \multirow{3}{5em}{%
+		\causetsDrawPermutationtrue \rcauset{4,2,7,6,1,5,3}{2/5}}
+	\\
+		~~(\lstinline\xA7\causetsDrawPermutationtrue\xA7 activates the option) 
+	\\
+		~~(\lstinline\xA7\causetsDrawPermutationfalse\xA7 deactivates the option) 
+	\\\midrule
+		\lstinline\xA7\usepackage[labeled]{causets}\xA7 shows labeled events 
+	& \multirow{3}{5em}{%
+		\causetsDrawLabelstrue \rcauset{4,2,7,6,1,5,3}{2/5}}
+	\\
+		~~(\lstinline\xA7\causetsDrawLabelstrue\xA7 activates the option) 
+	\\
+		~~(\lstinline\xA7\causetsDrawLabelsfalse\xA7 deactivates the option) 
+	\\\midrule
+		\lstinline\xA7\usepackage[unlinked]{causets}\xA7 hides links 
+	& \multirow{3}{5em}{%
+		\causetsDrawLinksfalse \rcauset{4,2,7,6,1,5,3}{2/5}}
+	\\
+		~~(\lstinline\xA7\causetsDrawLinksfalse\xA7 activates the option) 
+	\\
+		~~(\lstinline\xA7\causetsDrawLinkstrue\xA7 deactivates the option) 
+	\\\midrule
+		\lstinline\xA7\usepackage[tiny]{causets}\xA7 for tiny diagrams 
+	& \multirow{2}{5em}{%
+		\tinycausets \rcauset{4,2,7,6,1,5,3}{2/5}}
+	\\
+		~~(\lstinline\xA7\tinycausets\xA7 sets tiny sizes) 
+	\\
+		\lstinline\xA7\usepackage[small]{causets}\xA7 for small diagrams 
+	& \multirow{2}{5em}{%
+		\smallcausets \rcauset{4,2,7,6,1,5,3}{2/5}}
+	\\
+		~~(\lstinline\xA7\smallcausets\xA7 sets small sizes) 
+	\\
+		\lstinline\xA7\usepackage[large]{causets}\xA7 for large diagrams 
+	& \multirow{3}{5em}{%
+		\largecausets \rcauset{4,2,7,6,1,5,3}{2/5}}
+	\\
+		~~(\lstinline\xA7\largecausets\xA7 sets large sizes) 
+	\\
+	\\
+		\lstinline\xA7\usepackage[huge]{causets}\xA7 for huge diagrams 
+	& \multirow{4}{5em}{%
+		\hugecausets \rcauset{4,2,7,6,1,5,3}{2/5}}
+	\\
+		~~(\lstinline\xA7\hugecausets\xA7 sets huge sizes) 
+	\\
+	\\
+		~~(\lstinline\xA7\normalcausets\xA7 resets to normal sizes) 
+	\\
+		(\lstinline\xA7\causetsSetSizes{}{}{}{}{}{}\xA7 for user-defined sizes, see \autoref{sec:Sizes}) 
+	\\\midrule
+		\lstinline\xA7\usepackage[black]{causets}\xA7 for black and white causets 
+	& \multirow{2}{5em}{%
+		\causetsSetColorsBlack \rcauset{4,2,7,6,1,5,3}{2/5}}
+	\\
+		~~(\lstinline\xA7\causetsSetColorsBlack\xA7 activates the option) 
+	\\
+		\lstinline\xA7\usepackage[gray]{causets}\xA7 for gray scale causets (default)
+	& \multirow{2}{5em}{%
+		\causetsSetColorsGray \rcauset{4,2,7,6,1,5,3}{2/5}}
+	\\
+		~~(\lstinline\xA7\causetsSetColorsGray\xA7 activates the option) 
+	\\
+		\lstinline\xA7\usepackage[blue]{causets}\xA7 for blue causets 
+	& \multirow{2}{5em}{%
+		\causetsSetColorsBlue \rcauset{4,2,7,6,1,5,3}{2/5}}
+	\\
+		~~(\lstinline\xA7\causetsSetColorsBlue\xA7 activates the option) 
+	\\
+		\lstinline\xA7\usepackage[neon]{causets}\xA7 for brightly colored causets 
+	& \multirow{2}{5em}{%
+		\causetsSetColorsNeon \rcauset{4,2,7,6,1,5,3}{2/5}}
+	\\
+		~~(\lstinline\xA7\causetsSetColorsNeon\xA7 activates the option) 
+	\\
+		(more color formatting options in \autoref{sec:Colors}) 
+	\\\midrule
+		\lstinline\xA7\usepackage[spacelike]{causets}\xA7 shows a partial order for spacelike separated events, but only with the \lstinline\xA7\pcauset\xA7 commands
+	& \multirow{2}{5em}{%
+		\causetsDrawSeparationstrue \pcauset{2,4,1,3}}
+	\\
+		~~(\lstinline\xA7\causetsDrawSeparationstrue\xA7 activates the option) 
+	\\
+		~~(\lstinline\xA7\causetsDrawSeparationsfalse\xA7 deactivates the option) 
+	\\\bottomrule
+	\end{tabular*}
+	\caption{\label{tab:PackageOptions} All package options.}
+\end{table}
+
+All these options can also be combined, but only one of the size and color options. 
+The last option (\lstinline\xA7spacelike\xA7) is only supported by the \lstinline\xA7\pcauset\xA7 commands (and ignored by the other commands), so that the last example uses \lstinline\xA7\pcauset{2,4,1,3}\xA7. 
+
+\section{Modifiers for the Main Commands}
+\label{sec:Modifiers}
+The permutations and labels for causets can be switched on globally with the package options \lstinline\xA7permutation\xA7 and \lstinline\xA7labeled\xA7, or at any point in the document with the switches \lstinline\xA7\causetsDrawPermutationtrue\xA7 and \lstinline\xA7\causetsDrawLabelstrue\xA7, respectively. 
+
+To show only single causets with either of these options, there exist short hand macros for all three main commands. 
+Each main command can be followed by a capital letter \lstinline\xA7P\xA7 (to show the permutation), \lstinline\xA7L\xA7 (to show event labels), or \lstinline\xA7X\xA7 (to show both). 
+\begin{lstlisting}
+\usepackage{causets}
+... % ... \begin{document} ...
+Causets with permutations (and labels) \pcausetP{4,1,2,3}, \pcausetX{1,2,3,4}, \pcausetL{1,2,4,3}, and without any \pcauset{2,4,1,3}.
+\end{lstlisting}
+Causets with permutations (and labels) \pcausetP{4,1,2,3}, \pcausetX{1,2,3,4}, \pcausetL{1,2,4,3}, and without any \pcauset{2,4,1,3}. 
+
+All main commands have an optional argument in which any TikZ commands can be used to change the style of the causet. 
+By default, the optional argument is set to \lstinline\xA7causet\xA7, which is a TikZ style defined by the package to align the output with the baseline of the text, see the examples here. 
+\begin{lstlisting}
+Without an optional argument \pcauset{2,4,5,1,3} aligns the center just above the baseline. Using \pcauset[]{2,4,5,1,3}, the bottom of the diagram will be aligned with the baseline; and with \pcauset[baseline=1mm]{2,4,5,1,3} the center is placed 1mm below the baseline.
+\end{lstlisting}
+Without an optional argument \pcauset{2,4,5,1,3} aligns the center just above the baseline. Using \pcauset[]{2,4,5,1,3}, the bottom of the diagram will be aligned with the baseline; and with \pcauset[baseline=1mm]{2,4,5,1,3} the center is placed 1mm below the baseline.
+
+\section{Some Common Causets}
+\label{sec:CommonCausets}
+There are a few short hand macros for small common causets:
+\begin{lstlisting}
+\causetFence{1}, \causetFence{2}, \ldots, \causetFence{10},
+\causetClosedFence{1}, \causetClosedFence{2}, \ldots, \causetClosedFence{10},
+\causetCrown
+\end{lstlisting}
+\causetFence{1}, \causetFence{2}, \ldots, \causetFence{10}, 
+\causetClosedFence{1}, \causetClosedFence{2}, \ldots, \causetClosedFence{10}, 
+\causetCrown
+
+\section{Changing Sizes and Mathematical Expressions}
+\label{sec:Sizes}
+Apart from the pre-defined sizes \lstinline\xA7tiny\xA7, \lstinline\xA7small\xA7, \lstinline\xA7normal\xA7, \lstinline\xA7large\xA7 and \lstinline\xA7huge\xA7, sizes can be defined with a macro similar to 
+\begin{lstlisting}
+\causetsSetSizes{0.30ex}{0.02ex}{0.01ex}{0.16ex}{0.05ex}{0.16} % tiny
+\causetsSetSizes{0.60ex}{0.04ex}{0.02ex}{0.32ex}{0.10ex}{0.32} % small
+\causetsSetSizes{0.90ex}{0.06ex}{0.03ex}{0.48ex}{0.15ex}{0.48} % normal
+\causetsSetSizes{1.35ex}{0.09ex}{0.05ex}{0.75ex}{0.20ex}{0.75} % large
+\causetsSetSizes{1.80ex}{0.12ex}{0.07ex}{1.00ex}{0.25ex}{1.00} % huge
+\end{lstlisting}
+The arguments set the following size macros in order: 
+\begin{enumerate}
+  \item \lstinline\xA7\causetTileSize\xA7 as size of the tiles in the permutation 
+  	(measured in any absolute unit, like cm, or any relative unit, like ex)
+  \item \lstinline\xA7\causetRegionLine\xA7 as thickness for the line surrounding the permutation region 
+  	(measured in any absolute unit, like cm, or any relative unit, like ex)
+  \item \lstinline\xA7\causetGridLine\xA7 as line thickness of the permutation grid 
+  	(measured in any absolute unit, like cm, or any relative unit, like ex)
+  \item \lstinline\xA7\causetEventSize\xA7 as diameter of the events 
+  	(measured in any absolute unit, like cm, or any relative unit, like ex)
+  \item \lstinline\xA7\causetLinkWidth\xA7 as link thickness 
+  	(measured in any absolute unit, like cm, or any relative unit, like ex)
+  \item \lstinline\xA7\causetTextScale\xA7 as the scaling factor of text relative to the normal font size
+\end{enumerate}
+
+For example: 
+\begin{lstlisting}
+\causetsSetSizes{1.50ex}{0.15ex}{0.06ex}{1.30ex}{0.35ex}{1.00}
+\pcausetL{13,8,14,9,3,15,12,1,6,5,11,7,2,10,4}
+\end{lstlisting}
+\causetsSetSizes{1.50ex}{0.15ex}{0.06ex}{1.30ex}{0.35ex}{1.00}
+\pcausetL{13,8,14,9,3,15,12,1,6,5,11,7,2,10,4}
+\normalcausets
+
+Causets diagrams can also be used in mathematical expression, where the size may be adjusted when they are used in indices or limits. 
+For example: 
+\begin{lstlisting}
+\begin{equation}
+		\sum_{C \in \smallcausets
+			\left\{
+				\pcauset{1,2,3},
+				\;\pcauset{1,3,2,4},
+				\;\pcauset{1,4,3,2,5},
+				\;\pcauset{1,5,4,3,2,6}
+			\right\}}
+		| C | 
+	= \left| \pcauset{1,2,3} \right| 
+		+ \left| \pcauset{1,3,2,4} \right| 
+		+ \left| \pcauset{1,4,3,2,5} \right| 
+		+ \left| \pcauset{1,5,4,3,2,6} \right| 
+\end{equation}
+\end{lstlisting}
+\begin{equation}
+		\sum_{C \in \smallcausets
+			\left\{
+				\pcauset{1,2,3}, 
+				\;\pcauset{1,3,2,4}, 
+				\;\pcauset{1,4,3,2,5}, 
+				\;\pcauset{1,5,4,3,2,6} 
+			\right\}}
+		| C | 
+	= \left| \pcauset{1,2,3} \right| 
+		+ \left| \pcauset{1,3,2,4} \right| 
+		+ \left| \pcauset{1,4,3,2,5} \right| 
+		+ \left| \pcauset{1,5,4,3,2,6} \right| 
+\end{equation}
+
+\section{Changing Colors}
+\label{sec:Colors}
+This package uses the following colors 
+\begin{itemize}\itemsep0em 
+  \item \lstinline\xA7causetRegionColor\xA7 for the lines of the permutation frame
+  \item \lstinline\xA7causetGridColor\xA7 for the lines of the permutation grid
+  \item \lstinline\xA7causetTileColor\xA7 for the occupied tiles
+  \item \lstinline\xA7causetULabelColor\xA7 for the $u$ labels
+  \item \lstinline\xA7causetVLabelColor\xA7 for the $v$ labels
+  \item \lstinline\xA7causetEventColor\xA7 for the events
+  \item \lstinline\xA7causetLabelColor\xA7 for the label text
+  \item \lstinline\xA7causetLinkColor\xA7 for the links
+  \item \lstinline\xA7causetSeparationColor\xA7 for the spacelike separations.
+\end{itemize}
+Any of these colors can be set to a new value with the \lstinline\xA7\colorlet\xA7 macro, for example 
+\begin{lstlisting}
+\colorlet{causetEventColor}{purple}
+\end{lstlisting}
+redefines the event color to purple. 
+
+\section{Standalone causets}
+\label{sec:Standalone}
+For any document that contains many (large) causet diagrams or the same causets that are used repeatedly, the compilation time can be reduced by putting the commands in external files using the \lstinline\xA7standalone\xA7 package. 
+
+For example, create a file named \lstinline\xA7mycauset.tex\xA7 in the subdirectory \lstinline\xA7causets.standalone/\xA7 with the following code: 
+\begin{lstlisting}
+\documentclass[tikz]{standalone}
+\usepackage{causets}
+\begin{document}
+\pcausetL{13,8,14,9,3,15,12,1,6,5,11,7,2,10,4}
+\end{document}
+\end{lstlisting}
+The compiled version is then included with the macro \lstinline\xA7\causetfile{mycauset}\xA7. 
+This macro also accepts one optional argument \lstinline\xA7[#1]\xA7 and redirects the input to 
+\begin{lstlisting}
+\includegraphics[#1]{\causetsDirectory/#2}
+\end{lstlisting}
+The macro \lstinline\xA7\causetsDirectory\xA7 is pre-defined to \lstinline\xA7causets.standalone\xA7, but may be renewed to any desired directory with 
+\begin{lstlisting}
+\renewcommand{\causetsDirectory}{my_causet_directory}
+\end{lstlisting}
+
+The examples in \autoref{sec:TikZ} are show examples of standalone files that use the \lstinline\xA7causets\xA7 package. 
+To include these graphics into this document, the causets directory has been set to the same directory as the main tex file: 
+\begin{lstlisting}
+\renewcommand{\causetsDirectory}{.}
+\end{lstlisting}
+
+\section{Advanced Style Changes}
+The optional argument of the main commands is not restricted to baseline adjustments (as discussed in \autoref{sec:Modifiers}). 
+You may use TikZ options to change the output of the macros, for example: 
+\begin{lstlisting}
+\usepackage{causets}
+... % ... \begin{document} ...
+A labeled causet with red-framed semi-transparent labels, \pcausetL[causet,causetLabels/.style={draw=red, fill=white, opacity=0.8, inner sep=1pt, scale=1.2}]{2,4,5,1,3}.
+\end{lstlisting}
+A labeled causet with red-framed semi-transparent labels, \pcausetL[causet,causetLabels/.style={draw=red, fill=white, opacity=0.8, inner sep=1pt, scale=1.2}]{2,4,5,1,3}.
+
+In the same way, it is possible to modify the existing styles of all parts of the diagrams, which means that the default drawing styles are extended by the options passed to (in the order these parts are drawn) 
+\begin{enumerate}\itemsep0em 
+  \item the occupied permutation tiles (\lstinline\xA7causetTiles/.style={...}\xA7), 
+  \item the event nodes (graph vertices) (\lstinline\xA7causetEvents/.style={...}\xA7), 
+  \item the permutation grid (\lstinline\xA7causetGrid/.style={...}\xA7), 
+  \item the permutation region (\lstinline\xA7causetRegion/.style={...}\xA7), 
+  \item the permutation $u$ labels (\lstinline\xA7causetULabels/.style={...}\xA7), 
+  \item the permutation $v$ labels (\lstinline\xA7causetVLabels/.style={...}\xA7), 
+  \item the links (graph edges) (\lstinline\xA7causetLinks/.style={...}\xA7), 
+  \item the spacelike separations (\lstinline\xA7causetSeparations/.style={...}\xA7), 
+  \item and the event labels (\lstinline\xA7causetLabels/.style={...}\xA7). 
+\end{enumerate}
+In order to manually define the full style of the parts in the diagram - not extending, but \emph{overwriting all} drawing options - use the following style options (in the order these parts are drawn): 
+\begin{enumerate}\itemsep0em 
+  \item the occupied permutation tiles (\lstinline\xA7causetTilesStyle/.style={...}\xA7), 
+  \item the event nodes (graph vertices) (\lstinline\xA7causetEventsStyle/.style={...}\xA7), 
+  \item the permutation grid (\lstinline\xA7causetGridStyle/.style={...}\xA7), 
+  \item the permutation region (\lstinline\xA7causetRegionStyle/.style={...}\xA7), 
+  \item the permutation $u$ labels (\lstinline\xA7causetULabelsStyle/.style={...}\xA7), 
+  \item the permutation $v$ labels (\lstinline\xA7causetVLabelsStyle/.style={...}\xA7), 
+  \item the links (graph edges) (\lstinline\xA7causetLinksStyle/.style={...}\xA7), 
+  \item the spacelike separations (\lstinline\xA7causetSeparationsStyle/.style={...}\xA7), 
+  \item and the event labels (\lstinline\xA7causetLabelsStyle/.style={...}\xA7). 
+\end{enumerate}
+Of course, it is also possible to redefine any of these styles with a \lstinline\xA7\tikzset{...}\xA7 in the preamble of the document. 
+So for example 
+\begin{lstlisting}
+\usepackage{causets}
+\tikzset{causetEvents/.style={rectangle}}
+... % ... \begin{document} ...
+\pcauset{2,4,5,1,3}
+\end{lstlisting}
+will generate {\tikzset{causetEvents/.style={rectangle}}\pcauset{2,4,5,1,3}}. 
+
+\section{Using causets with TikZ}
+\label{sec:TikZ}
+Since the package is TikZ based, using a causet within a TikZ picture is simple. 
+Each of the three main commands is based on a draw command in TikZ that has the same name but starts with \lstinline\xA7\draw...\xA7. 
+The \lstinline\xA7\draw\xA7 macros, however, do not support an optional argument (since this can be specified directly in a TikZ picture) and they also do not have any short hand macros ending in \lstinline\xA7P\xA7, \lstinline\xA7L\xA7 or \lstinline\xA7X\xA7. 
+
+The two following examples are given by external (standalone) TikZ graphics and included with \lstinline\xA7\causetfile{...}\xA7. 
+More details on using causets in standalone files are given in \autoref{sec:Standalone}. 
+
+Note that the output of the \lstinline\xA7\draw\xA7 macros has the point (0,0) in the center, so to shift it, we can enclose it in a TikZ scope, for example: 
+\lstinputlisting{causet_tikz_example1.tex}
+\causetfile{causet_tikz_example1}
+
+Note that this example also shows how to use the event nodes that are generated by the \lstinline\xA7\drawpcauset\xA7 macro. 
+The green arrow points to the node of the second causet event \lstinline\xA7(E5)\xA7. 
+The causet events, event labels, $u$-axis labels, and $v$-axis lables are the nodes \lstinline\xA7(Ei)\xA7, \lstinline\xA7(ELi)\xA7, \lstinline\xA7(EULi)\xA7, and \lstinline\xA7(EVLi)\xA7, respectively, where $\smash{i \in [ 1, N ]}$ for a causet with $N$ events. 
+
+It is also possible to use multiple causets in more complicated graphics, like a tree for example, but note that whenever a causet is actually a text of a node within a TikZ picture (like in the following), we need to use the \lstinline\xA7\pcauset\xA7 (\lstinline\xA7\rcauset\xA7 or \lstinline\xA7\causet\xA7) commands without the \lstinline\xA7draw\xA7 prefix again: 
+\lstinputlisting{causet_tikz_example2.tex}
+\hspace{-3.0ex}\causetfile{causet_tikz_example2}
+
+\clearpage
+\section{Bug Reports and Package Requests}
+\label{sec:PackageDevelopment}
+Problems with the package are reported here: \\
+\url{https://github.com/c-minz/LaTeX-causets/issues}
+
+If you have a problem when using the package or you would like to have another feature to be implemented, please write a message to \\
+christoph(dot)minz(AT)gmail(dot)com\\
+For reporting a bug, it is much appreciated if you do the following:
+\begin{itemize}
+  \item Check the issues reported previously if your problem is already listed. 
+  \item Describe your problem including the errors and warning messages, information about the drivers and programs versions. 
+  \item Provide a minimal working test file (only a single .tex file) that demonstrates the problem. 
+\end{itemize}
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/causets/causets.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/tex/latex/causets/causets.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/causets/causets.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/causets/causets.sty	2020-11-07 22:01:51 UTC (rev 56872)
@@ -0,0 +1,408 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{causets}[2020/10/25 Package to draw causal set diagrams]
+%% Copyright 2020 by C. Minz
+%
+% 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
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work is C. Minz.
+% https://github.com/c-minz
+%
+% This work consists of the files causets.sty, causets.tex,  
+% causets.pdf, causet_tikz_example1.tex, causet_tikz_example1.pdf, 
+% causet_tikz_example2.tex, causet_tikz_example2.pdf
+
+\RequirePackage{tikz}
+
+%% size options:
+\newcommand*{\causetsSetSizes}[6]{%
+\def\causetTileSize{#1}%
+\def\causetRegionLine{#2}%
+\def\causetGridLine{#3}%
+\def\causetEventSize{#4}%
+\def\causetLinkWidth{#5}%
+\def\causetTextScale{#6}%
+}
+\newcommand*{\tinycausets}{%
+\causetsSetSizes{0.30ex}{0.02ex}{0.01ex}{0.16ex}{0.05ex}{0.16}}
+\newcommand*{\smallcausets}{%
+\causetsSetSizes{0.60ex}{0.04ex}{0.02ex}{0.32ex}{0.10ex}{0.32}}
+\newcommand*{\normalcausets}{%
+\causetsSetSizes{0.90ex}{0.06ex}{0.03ex}{0.48ex}{0.15ex}{0.48}}
+\newcommand*{\largecausets}{%
+\causetsSetSizes{1.35ex}{0.09ex}{0.05ex}{0.75ex}{0.20ex}{0.75}}
+\newcommand*{\hugecausets}{%
+\causetsSetSizes{1.80ex}{0.12ex}{0.07ex}{1.00ex}{0.25ex}{1.00}}
+
+%% color options:
+\newcommand*{\causetsSetColorsBlack}{%
+	\colorlet{causetRegionColor}{black}%
+	\colorlet{causetGridColor}{black}%
+	\colorlet{causetTileColor}{white}%
+	\colorlet{causetEventColor}{black}%
+	\colorlet{causetLabelColor}{black}%
+	\colorlet{causetLinkColor}{black}%
+	\colorlet{causetSeparationColor}{black}%
+	\colorlet{causetULabelColor}{black}%
+	\colorlet{causetVLabelColor}{black}%
+}
+\newcommand*{\causetsSetColorsGray}{%
+	\colorlet{causetRegionColor}{black!75}%
+	\colorlet{causetGridColor}{black!25}%
+	\colorlet{causetTileColor}{black!10!white}%
+	\colorlet{causetEventColor}{black}%
+	\colorlet{causetLabelColor}{black}%
+	\colorlet{causetLinkColor}{black!65!white}%
+	\colorlet{causetSeparationColor}{black!50!white}%
+	\colorlet{causetULabelColor}{black!65!white}%
+	\colorlet{causetVLabelColor}{black!65!white}%
+}
+\newcommand*{\causetsSetColorsBlue}{%
+	\colorlet{causetRegionColor}{black!75}%
+	\colorlet{causetGridColor}{black!25}%
+	\colorlet{causetTileColor}{yellow!75!black!50!white}%
+	\colorlet{causetEventColor}{blue!50!black}%
+	\colorlet{causetLabelColor}{blue!50!black}%
+	\colorlet{causetLinkColor}{cyan!75!black}%
+	\colorlet{causetSeparationColor}{red!65!black}%
+	\colorlet{causetULabelColor}{black!50}%
+	\colorlet{causetVLabelColor}{black!50}%
+}
+\newcommand*{\causetsSetColorsNeon}{%
+	\colorlet{causetRegionColor}{black}%
+	\colorlet{causetGridColor}{green}%
+	\colorlet{causetTileColor}{yellow}%
+	\colorlet{causetEventColor}{blue}%
+	\colorlet{causetLabelColor}{blue}%
+	\colorlet{causetLinkColor}{cyan}%
+	\colorlet{causetSeparationColor}{red}%
+	\colorlet{causetULabelColor}{magenta}%
+	\colorlet{causetVLabelColor}{magenta}%
+}
+
+%% switches:
+\newif\ifcausetsDrawPermutation
+\newif\ifcausetsDrawLabels
+\newif\ifcausetsDrawLinks
+\newif\ifcausetsDrawSeparations
+
+%% delare and execute options:
+\providecommand{\causetsDirectory}{causets.standalone}
+\normalcausets
+\causetsSetColorsGray
+\causetsDrawLinkstrue
+\DeclareOption{gray}{\causetsSetColorsGray}
+\DeclareOption{black}{\causetsSetColorsBlack}
+\DeclareOption{blue}{\causetsSetColorsBlue}
+\DeclareOption{neon}{\causetsSetColorsNeon}
+\DeclareOption{permutation}{\causetsDrawPermutationtrue}
+\DeclareOption{labeled}{\causetsDrawLabelstrue}
+\DeclareOption{spacelike}{\causetsDrawSeparationstrue}
+\DeclareOption{unlinked}{\causetsDrawLinksfalse}
+\DeclareOption{tiny}{\tinycausets}
+\DeclareOption{small}{\smallcausets}
+\DeclareOption{large}{\largecausets}
+\DeclareOption{huge}{\hugecausets}
+\DeclareOption*{\PackageWarning{causets}{The package causets does not support the option: \CurrentOption}}
+\ProcessOptions\relax
+
+%% TikZ styles:
+\tikzset{causet/.style={baseline=-0.707*\causetTileSize}}
+\tikzset{causetRegion/.style={}}
+\tikzset{causetGrid/.style={}}
+\tikzset{causetTiles/.style={}}
+\tikzset{causetEvents/.style={}}
+\tikzset{causetLabels/.style={}}
+\tikzset{causetLinks/.style={}}
+\tikzset{causetSeparations/.style={}}
+\tikzset{causetULabels/.style={}}
+\tikzset{causetVLabels/.style={}}
+\tikzset{causetRegionStyle/.style={causetRegionColor, line width=\causetRegionLine, causetRegion}}
+\tikzset{causetGridStyle/.style={causetGridColor, line width=\causetGridLine, step=\causetTileSize, causetGrid}}
+\tikzset{causetTilesStyle/.style={causetTileColor, line width=\causetGridLine, fill, causetTiles}}
+\tikzset{causetEventsStyle/.style={causetEventColor, circle, fill, inner sep=0pt, minimum size=\causetEventSize, causetEvents}}
+\tikzset{causetLabelsStyle/.style={causetLabelColor, below left, text opacity=1.0, inner sep=0pt, scale=\causetTextScale, causetLabels}}
+\tikzset{causetLinksStyle/.style={causetLinkColor, line width=\causetLinkWidth, arrows=-, causetLinks}}
+\tikzset{causetSeparationsStyle/.style={causetSeparationColor, line width=\causetLinkWidth, dashed, causetSeparations}}
+\tikzset{causetULabelsStyle/.style={causetULabelColor, right=-\causetTextScale*0.5ex, scale=\causetTextScale, rotate=-45, align=left, causetULabels}}
+\tikzset{causetVLabelsStyle/.style={causetVLabelColor, left=-\causetTextScale*0.5ex, scale=\causetTextScale, rotate=45, align=right, causetVLabels}}
+
+%% functions:
+% variables:
+\newcounter{causet at i}
+\newcounter{causet at j}
+\newif\ifcauset at ItemFoundInList
+
+% count the number of events:
+\newcommand*{\causets at readCausetSize}[1]{%
+\setcounter{causet at i}{0}%
+\foreach \causet at p in {#1}{%
+	\stepcounter{causet at i}%
+}%
+\pgfmathsetmacro\causet at N{\value{causet at i}}%
+}
+
+% define and draw events as (E#):
+\newcommand*{\causets at drawEvents}[1]{%
+\setcounter{causet at i}{0}
+\foreach \causet at p in {#1}{%
+	\stepcounter{causet at i}
+	\pgfmathsetmacro\causet at e@U{\causet at p - 1.0}
+	\pgfmathsetmacro\causet at e@V{\value{causet at i} - 1.0}
+	\ifcausetsDrawPermutation
+		\path[causetTilesStyle] ( \causet at e@U * \causetTileSize, \causet at e@V * \causetTileSize ) 
+			rectangle +( \causetTileSize, \causetTileSize );
+	\fi
+	\pgfmathsetmacro\causet at e@U{\causet at p - 0.5}
+	\pgfmathsetmacro\causet at e@V{\value{causet at i} - 0.5}
+	\node[causetEventsStyle] (E\causet at p) 
+		at ( \causet at e@U * \causetTileSize, \causet at e@V * \causetTileSize ) 
+		{};
+}
+}
+
+% draw the permutation and the null coordinate labels:
+\newcommand*{\causets at drawPermutation}[1]{%
+\ifcausetsDrawPermutation
+	\draw[causetGridStyle] ( 0, 0 ) 
+		grid ( \causet at N * \causetTileSize, \causet at N * \causetTileSize );
+	\draw[causetRegionStyle] ( 0, 0 ) 
+		rectangle ( \causet at N * \causetTileSize, \causet at N * \causetTileSize );
+	\setcounter{causet at i}{0}
+	\foreach \causet at p in {#1}{%
+		\stepcounter{causet at i}
+		\node[causetULabelsStyle] (EUL\causet at p) 
+			at ( \value{causet at i} * \causetTileSize - 0.5 * \causetTileSize, 0 ) 
+			{\thecauset at i};
+		\node[causetVLabelsStyle] (EVL\causet at p) 
+			at ( 0, \value{causet at i} * \causetTileSize - 0.5 * \causetTileSize ) 
+			{\causet at p};
+	}
+\fi
+}
+
+% draw event labels:
+\newcommand*{\causets at drawEventLabels}[1]{%
+\ifcausetsDrawLabels
+	\foreach \causet at p in {#1}{%
+		\node[causetLabelsStyle] (EL\causet at p) 
+			at (E\causet at p.south west) {\causet at p};
+	}
+\fi
+}
+
+% draw a causet from a permutation:
+\newcommand*{\drawpcauset}[1]{%
+\causets at readCausetSize{#1}
+\begin{scope}[rotate=45]
+	\begin{scope}[xshift=-\causet at N * \causetTileSize / 2, 
+	              yshift=-\causet at N * \causetTileSize / 2]
+		\causets at drawEvents{#1}
+		\causets at drawPermutation{#1}
+		\ifcausetsDrawLinks
+			\setcounter{causet at i}{0}
+			\foreach \causet at p in {#1}{%
+				\stepcounter{causet at i}
+				\pgfmathsetmacro\causet at qBound{int(\causet at N + 1)}
+				\setcounter{causet at j}{0}
+				\foreach \causet at q in {#1}{%
+					\stepcounter{causet at j}
+					\ifnum\value{causet at j}>\value{causet at i}
+						\ifnum\causet at q<\causet at qBound
+							\ifnum\causet at p<\causet at q
+								\draw[causetLinksStyle] (E\causet at p) -- (E\causet at q);
+								\xdef\causet at qBound{\causet at q}
+							\fi
+						\fi
+					\fi
+				}
+			}
+		\fi
+		\ifcausetsDrawSeparations
+			\setcounter{causet at i}{0}
+			\foreach \causet at p in {#1}{%
+				\stepcounter{causet at i}
+				\edef\causet at qBound{0}
+				\setcounter{causet at j}{0}
+				\foreach \causet at q in {#1}{%
+					\stepcounter{causet at j}
+					\ifnum\value{causet at j}>\value{causet at i}
+						\ifnum\causet at q>\causet at qBound
+							\ifnum\causet at p>\causet at q
+								\draw[causetSeparationsStyle] (E\causet at q) -- (E\causet at p);
+								\xdef\causet at qBound{\causet at q}
+							\fi
+						\fi
+					\fi
+				}
+			}
+		\fi
+		\causets at drawEventLabels{#1}
+	\end{scope}
+\end{scope}
+}
+
+% draw a causet from a permutation and a link-pair list:
+\newcommand*{\drawcauset}[2]{%
+\causets at readCausetSize{#1}
+\begin{scope}[rotate=45]
+	\begin{scope}[xshift=-\causet at N * \causetTileSize / 2, 
+	              yshift=-\causet at N * \causetTileSize / 2]
+		\causets at drawEvents{#1}
+		\causets at drawPermutation{#1}
+		\ifcausetsDrawLinks
+			\foreach \causet at From/\causet at To in {#2}{%
+				\draw[causetLinksStyle] (E\causet at From) -- (E\causet at To);
+			}
+		\fi
+		\causets at drawEventLabels{#1}
+	\end{scope}
+\end{scope}
+}
+
+% draw a causet from a permutation removes links given in a link-pair list:
+\newcommand*{\drawrcauset}[2]{%
+\causets at readCausetSize{#1}
+\begin{scope}[rotate=45]
+	\begin{scope}[xshift=-\causet at N * \causetTileSize / 2, 
+	              yshift=-\causet at N * \causetTileSize / 2]
+		\causets at drawEvents{#1}
+		\causets at drawPermutation{#1}
+		\ifcausetsDrawLinks
+			\setcounter{causet at i}{0}
+			\foreach \causet at p in {#1}{%
+				\stepcounter{causet at i}
+				\pgfmathsetmacro\causet at qBound{int(\causet at N + 1)}
+				\setcounter{causet at j}{0}
+				\foreach \causet at q in {#1}{
+					\stepcounter{causet at j}
+					\ifnum\value{causet at j}>\value{causet at i}
+						\ifnum\causet at q<\causet at qBound
+							\ifnum\causet at p<\causet at q
+								\global\causet at ItemFoundInListfalse
+								\foreach \causet at From/\causet at To in {#2}{%
+									\pgfmathparse{and( equal( int(\causet at From), int(\causet at p) ), equal( int(\causet at To), int(\causet at q) ) )}
+									\ifnum\pgfmathresult=1
+										\global\causet at ItemFoundInListtrue
+									\fi
+								}
+								\ifcauset at ItemFoundInList
+									% skip link
+								\else
+									\draw[causetLinksStyle] (E\causet at p) -- (E\causet at q);
+								\fi
+								\xdef\causet at qBound{\causet at q}
+							\fi
+						\fi
+					\fi
+				}
+			}
+		\fi
+		\causets at drawEventLabels{#1}
+	\end{scope}
+\end{scope}
+}
+
+% insert a TikZ picture with a causet from a permutation:
+\newcommand*{\pcauset}[2][causet]{%
+\begin{tikzpicture}[#1]\drawpcauset{#2}\end{tikzpicture}}
+
+% insert a TikZ picture with a causet from a permutation and a link-pair list:
+\newcommand*{\causet}[3][causet]{%
+\begin{tikzpicture}[#1]\drawcauset{#2}{#3}\end{tikzpicture}}
+
+% insert a TikZ picture with a causet from a permutation removes links given 
+% in a link-pair list:
+\newcommand*{\rcauset}[3][causet]{%
+\begin{tikzpicture}[#1]\drawrcauset{#2}{#3}\end{tikzpicture}}
+
+%% short-hand functions:
+\newcommand*{\causetfile}[2][]{%
+\includegraphics[#1]{\causetsDirectory/#2}}
+
+\newcommand*{\pcausetP}[2][causet]{%
+{\causetsDrawPermutationtrue\pcauset[#1]{#2}}}
+
+\newcommand*{\pcausetL}[2][causet]{%
+{\causetsDrawLabelstrue\pcauset[#1]{#2}}}
+
+\newcommand*{\pcausetX}[2][causet]{%
+{\causetsDrawPermutationtrue\pcausetL[#1]{#2}}}
+	
+\newcommand*{\causetP}[3][causet]{%
+{\causetsDrawPermutationtrue\causet[#1]{#2}{#3}}}
+
+\newcommand*{\causetL}[3][causet]{%
+{\causetsDrawLabelstrue\causet[#1]{#2}{#3}}}
+
+\newcommand*{\causetX}[3][causet]{%
+{\causetsDrawPermutationtrue\causetL[#1]{#2}{#3}}}
+	
+\newcommand*{\rcausetP}[3][causet]{%
+{\causetsDrawPermutationtrue\rcauset[#1]{#2}{#3}}}
+
+\newcommand*{\rcausetL}[3][causet]{%
+{\causetsDrawLabelstrue\rcauset[#1]{#2}{#3}}}
+
+\newcommand*{\rcausetX}[3][causet]{%
+{\causetsDrawPermutationtrue\rcausetL[#1]{#2}{#3}}}
+
+%% some standard causets:
+\newcommand*{\causetFence}[2][causet]{%
+\ifcase#2%
+\or%=1
+\pcauset[#1]{1,2}%
+\or%=2
+\pcauset[#1]{3,1,4,2}%
+\or%=3
+\pcauset[#1]{5,3,6,1,4,2}%
+\or%=4
+\pcauset[#1]{7,5,8,3,6,1,4,2}%
+\or%=5
+\pcauset[#1]{9,7,10,5,8,3,6,1,4,2}%
+\or%=6
+\pcauset[#1]{11,9,12,7,10,5,8,3,6,1,4,2}%
+\or%=7
+\pcauset[#1]{13,11,14,9,12,7,10,5,8,3,6,1,4,2}%
+\or%=8
+\pcauset[#1]{15,13,16,11,14,9,12,7,10,5,8,3,6,1,4,2}%
+\or%=9
+\pcauset[#1]{17,15,18,13,16,11,14,9,12,7,10,5,8,3,6,1,4,2}%
+\or%=10
+\pcauset[#1]{19,17,20,15,18,13,16,11,14,9,12,7,10,5,8,3,6,1,4,2}%
+\fi%
+}
+
+\newcommand*{\causetClosedFence}[2][causet]{%
+\ifcase#2%
+\or%=1
+\pcauset[#1]{1,2}%
+\or%=2
+\pcauset[#1]{2,1,4,3}%
+\or%=3
+\rcauset[#1]{4,2,6,1,5,3}{2/5}%
+\or%=4
+\rcauset[#1]{6,4,8,2,7,1,5,3}{2/5,4/7}%
+\or%=5
+\rcauset[#1]{8,6,10,4,9,2,7,1,5,3}{2/5,4/7,6/9}%
+\or%=6
+\rcauset[#1]{10,8,12,6,11,4,9,2,7,1,5,3}{2/5,4/7,6/9,8/11}%
+\or%=7
+\rcauset[#1]{12,10,14,8,13,6,11,4,9,2,7,1,5,3}{2/5,4/7,6/9,8/11,10/13}%
+\or%=8
+\rcauset[#1]{14,12,16,10,15,8,13,6,11,4,9,2,7,1,5,3}{2/5,4/7,6/9,8/11,10/13,12/15}%
+\or%=9
+\rcauset[#1]{16,14,18,12,17,10,15,8,13,6,11,4,9,2,7,1,5,3}{2/5,4/7,6/9,8/11,10/13,12/15,14/17}%
+\or%=10
+\rcauset[#1]{18,16,20,14,19,12,17,10,15,8,13,6,11,4,9,2,7,1,5,3}{2/5,4/7,6/9,8/11,10/13,12/15,14/17,16/19}%
+\fi%
+}
+
+\newcommand*{\causetCrown}[1][causet]{%
+\causetClosedFence[#1]{3}%
+}


Property changes on: trunk/Master/texmf-dist/tex/latex/causets/causets.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2020-11-07 00:53:03 UTC (rev 56871)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2020-11-07 22:01:51 UTC (rev 56872)
@@ -153,7 +153,7 @@
     canoniclayout cantarell
     capt-of captcont captdef caption carbohydrates carlisle carlito carolmin-ps
     cascade cascadilla cases casyl
-    catchfile catchfilebetweentags catcodes catechis catoptions
+    catchfile catchfilebetweentags catcodes catechis catoptions causets
     cbcoptic cbfonts cbfonts-fd
     cc-pl ccaption ccfonts ccicons cclicenses ccool
     cd cd-cover cdpbundl

Added: trunk/Master/tlpkg/tlpsrc/causets.tlpsrc
===================================================================
Modified: trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2020-11-07 00:53:03 UTC (rev 56871)
+++ trunk/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc	2020-11-07 22:01:51 UTC (rev 56872)
@@ -36,6 +36,7 @@
 depend bytefield
 depend calculation
 depend cascade
+depend causets
 depend ccfonts
 depend ccool
 depend chemarrow



More information about the tex-live-commits mailing list.