summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-08-01 03:01:19 +0000
committerNorbert Preining <norbert@preining.info>2023-08-01 03:01:19 +0000
commit84777905249300f2ab97a23141e31f952bceb865 (patch)
tree5621415ee6ecbcbe62e4c500977af3c41aeebd9c /graphics
parent17d547a1effe2cafcdfbf704bdf8cb0484790ef2 (diff)
CTAN sync 202308010301
Diffstat (limited to 'graphics')
-rw-r--r--graphics/pgf/contrib/quiver/README.md15
-rw-r--r--graphics/pgf/contrib/quiver/quiver-doc.pdfbin0 -> 189078 bytes
-rw-r--r--graphics/pgf/contrib/quiver/quiver-doc.tex149
-rw-r--r--graphics/pgf/contrib/quiver/quiver.sty40
4 files changed, 204 insertions, 0 deletions
diff --git a/graphics/pgf/contrib/quiver/README.md b/graphics/pgf/contrib/quiver/README.md
new file mode 100644
index 0000000000..5334dfda8b
--- /dev/null
+++ b/graphics/pgf/contrib/quiver/README.md
@@ -0,0 +1,15 @@
+# quiver: a modern commutative diagram editor
+
+[**quiver**](https://q.uiver.app) is a modern, graphical editor for commutative and pasting
+diagrams, capable of rendering high-quality diagrams for screen viewing, and exporting to LaTeX. The
+**quiver** package is intended to be used in conjunction with the editor, and provides the packages
+and styles that are used by diagrams exported from the editor.
+
+# Licence
+
+This package is subject to the MIT License.
+
+# Author
+
+This package is maintained by varkor (https://github.com/varkor). The repository and issue tracker
+can be found at https://github.com/varkor/quiver.
diff --git a/graphics/pgf/contrib/quiver/quiver-doc.pdf b/graphics/pgf/contrib/quiver/quiver-doc.pdf
new file mode 100644
index 0000000000..4a1ec780c6
--- /dev/null
+++ b/graphics/pgf/contrib/quiver/quiver-doc.pdf
Binary files differ
diff --git a/graphics/pgf/contrib/quiver/quiver-doc.tex b/graphics/pgf/contrib/quiver/quiver-doc.tex
new file mode 100644
index 0000000000..312b139eb7
--- /dev/null
+++ b/graphics/pgf/contrib/quiver/quiver-doc.tex
@@ -0,0 +1,149 @@
+\documentclass[12pt,a4paper]{article}
+
+\usepackage[margin=2.5cm]{geometry}
+\usepackage{microtype}
+
+% For the date.
+\usepackage[UKenglish]{isodate}
+
+% For URLs.
+\usepackage{hyperref}[pdfusetitle]
+\hypersetup{colorlinks,urlcolor=blue}
+\urlstyle{rm}
+
+% For tables.
+\usepackage{tabularray}
+
+% For side-by-side examples.
+\usepackage[skins,listings]{tcolorbox}
+\tcbuselibrary{minted}
+\newtcblisting{tikzexample}{
+ sidebyside,
+ center lower,
+ bicolor,
+ colbacklower=white,
+ sharp corners,
+ frame engine=empty
+}
+
+% The package in question.
+\usepackage{quiver}
+
+\newcommand{\quiver}{\textsf{quiver}}
+\newcommand{\tcd}{\textsf{tikz-cd}}
+\newcommand{\TikZ}{{\rm Ti{\it k}Z}}
+
+\title{\textsf{quiver} \\ \small A modern commutative diagram editor}
+\author{\normalsize \textsf{@varkor}}
+\date{\cleanlookdateon\today}
+
+\begin{document}
+
+\maketitle
+
+\begin{abstract}
+ The \textsf{quiver} package provides compatibility with the \textsf{quiver} commutative diagram editor.
+\end{abstract}
+
+\section{Usage}
+
+The \quiver{} package is intended to be used in conjunction with the \url{https://q.uiver.app/} commutative diagram editor. It functions as a wrapper around the \tcd{} package that provides some extra \TikZ{} styles, which are used in diagrams exported by the editor. However, these styles may be used in isolation of the editor.
+
+To use the \quiver{} package, add the following to the preamble of your document.
+
+\begin{verbatim}
+\usepackage{quiver}
+\end{verbatim}
+
+\section{\TikZ{} styles}
+
+The \quiver{} package provides several styles that are useful in the rendering of commutative diagrams.
+
+\subsection{The \texttt{curve} style}
+
+The typical method of curving arrows in \tcd{} commutative diagrams is to use the \TikZ{} \texttt{bend left} and \texttt{bend right} styles, together with the \texttt{in} and \texttt{out} parameters. These styles facilitate the bending of paths with respect to an angle. However, it is often more convenient to bend a path with respect to a distance (namely, the height of the apex of the curve). This may be achieved with the \texttt{curve} style\footnotemark{}.
+\footnotetext{The \texttt{curve} style is due to Andr\'eC (\url{https://tex.stackexchange.com/users/138900/andr\%C3\%A9c}).}
+
+\begin{tikzexample}
+\begin{tikzcd}
+ a \ar["f", rr, curve={height=-24pt}] && b
+\end{tikzcd}
+\end{tikzexample}
+
+The \texttt{curve} style takes two (optional) named parameters.
+
+\begin{itemize}
+ \item \texttt{height} specifies the height of the apex of the curve. It is a signed distance (default \texttt{0}).
+ \item \texttt{pos} specifies the position of the control point for the curve. It is a value between \texttt{0.0} and \texttt{1.0} (default \texttt{0.35}).
+\end{itemize}
+
+\begin{tikzexample}
+\begin{tikzcd}
+ a \ar["f", rr, curve={height=-24pt, pos=0.2}] && b
+\end{tikzcd}
+\end{tikzexample}
+
+\begin{tikzexample}
+\begin{tikzcd}
+ a \ar["f", rr, curve={height=-24pt, pos=0.5}] && b
+\end{tikzcd}
+\end{tikzexample}
+
+\begin{tikzexample}
+\begin{tikzcd}
+ a \ar["f", rr, curve={height=-24pt, pos=0.8}] && b
+\end{tikzcd}
+\end{tikzexample}
+
+\subsection{Arrowhead and tail styles}
+
+The \tcd{} package provides several arrowhead and tail styles. The \quiver{} package provides the following additional styles.
+
+\begin{center}
+ \begin{tblr}{cc}
+ {\bf Style} & {\bf Appearance} \\
+ \texttt{tail reversed} &
+ % https://q.uiver.app/?q=WzAsMixbMCwwXSxbMSwwXSxbMCwxLCIiLDAseyJzdHlsZSI6eyJ0YWlsIjp7Im5hbWUiOiJhcnJvd2hlYWQifX19XV0=
+ \begin{tikzcd}[ampersand replacement=\&]
+ {} \& {}
+ \arrow[tail reversed, from=1-1, to=1-2]
+ \end{tikzcd}
+ \\
+ \texttt{2tail} &
+ % https://q.uiver.app/?q=WzAsMixbMCwwXSxbMSwwXSxbMCwxLCIiLDAseyJsZXZlbCI6Miwic3R5bGUiOnsidGFpbCI6eyJuYW1lIjoibW9ubyJ9fX1dXQ==
+ \begin{tikzcd}[ampersand replacement=\&]
+ {} \& {}
+ \arrow[Rightarrow, 2tail, from=1-1, to=1-2]
+ \end{tikzcd}
+ \\
+ \texttt{2tail reversed} &
+ % https://q.uiver.app/?q=WzAsMixbMCwwXSxbMSwwXSxbMCwxLCIiLDAseyJsZXZlbCI6Miwic3R5bGUiOnsidGFpbCI6eyJuYW1lIjoiYXJyb3doZWFkIn19fV1d
+ \begin{tikzcd}[ampersand replacement=\&]
+ {} \& {}
+ \arrow[Rightarrow, 2tail reversed, from=1-1, to=1-2]
+ \end{tikzcd}
+ \\
+ \texttt{no body} &
+ % https://q.uiver.app/?q=WzAsMixbMCwwXSxbMSwwXSxbMCwxLCIiLDAseyJzdHlsZSI6eyJib2R5Ijp7Im5hbWUiOiJub25lIn19fV1d
+ \begin{tikzcd}[ampersand replacement=\&]
+ {} \& {}
+ \arrow[no body, from=1-1, to=1-2]
+ \end{tikzcd}
+ \end{tblr}
+\end{center}
+
+\section{Version history}
+
+The \quiver{} version number is tied to the editor version number. This is reflected in the history below: not every editor update corresponds to a package update.
+
+\begin{center}
+ \begin{tblr}{colspec={ccX[c]},row{even}=black!5}
+ {\bf Version} & {\bf Date} & {\bf Release notes} \\
+ 1.0.0 & 2020-11-10 & First public version. Imports necessary packages and defines the \texttt{curve} style. \\
+ 1.0.1 & 2020-11-27 & Added the \texttt{tail reversed}, \texttt{2tail}, and \texttt{2tail reversed} styles. \\
+ 1.1.0 & 2020-12-18 & Added a dependency. \\
+ 1.2.0 & 2021-01-11 & Added the \texttt{no body} style.
+ \end{tblr}
+\end{center}
+
+\end{document}
diff --git a/graphics/pgf/contrib/quiver/quiver.sty b/graphics/pgf/contrib/quiver/quiver.sty
new file mode 100644
index 0000000000..d1d7d07e84
--- /dev/null
+++ b/graphics/pgf/contrib/quiver/quiver.sty
@@ -0,0 +1,40 @@
+% *** quiver ***
+% A package for drawing commutative diagrams exported from https://q.uiver.app.
+%
+% This package is currently a wrapper around the `tikz-cd` package, importing necessary TikZ
+% libraries, and defining a new TikZ style for curves of a fixed height.
+%
+% Version: 1.3.0
+% Authors:
+% - varkor (https://github.com/varkor)
+% - AndréC (https://tex.stackexchange.com/users/138900/andr%C3%A9c)
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{quiver}[2021/01/11 quiver]
+
+% `tikz-cd` is necessary to draw commutative diagrams.
+\RequirePackage{tikz-cd}
+% `amssymb` is necessary for `\lrcorner` and `\ulcorner`.
+\RequirePackage{amssymb}
+% `calc` is necessary to draw curved arrows.
+\usetikzlibrary{calc}
+% `pathmorphing` is necessary to draw squiggly arrows.
+\usetikzlibrary{decorations.pathmorphing}
+
+% A TikZ style for curved arrows of a fixed height, due to AndréC.
+\tikzset{curve/.style={settings={#1},to path={(\tikztostart)
+ .. controls ($(\tikztostart)!\pv{pos}!(\tikztotarget)!\pv{height}!270:(\tikztotarget)$)
+ and ($(\tikztostart)!1-\pv{pos}!(\tikztotarget)!\pv{height}!270:(\tikztotarget)$)
+ .. (\tikztotarget)\tikztonodes}},
+ settings/.code={\tikzset{quiver/.cd,#1}
+ \def\pv##1{\pgfkeysvalueof{/tikz/quiver/##1}}},
+ quiver/.cd,pos/.initial=0.35,height/.initial=0}
+
+% TikZ arrowhead/tail styles.
+\tikzset{tail reversed/.code={\pgfsetarrowsstart{tikzcd to}}}
+\tikzset{2tail/.code={\pgfsetarrowsstart{Implies[reversed]}}}
+\tikzset{2tail reversed/.code={\pgfsetarrowsstart{Implies}}}
+% TikZ arrow styles.
+\tikzset{no body/.style={/tikz/dash pattern=on 0 off 1mm}}
+
+\endinput