From 09b0073c8ee54754680735a622abb0f86f6ce420 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 31 Jul 2023 20:11:33 +0000 Subject: quiver (31jul23) git-svn-id: svn://tug.org/texlive/trunk@67779 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/quiver/README.md | 15 +++ Master/texmf-dist/doc/latex/quiver/quiver-doc.pdf | Bin 0 -> 189078 bytes Master/texmf-dist/doc/latex/quiver/quiver-doc.tex | 149 ++++++++++++++++++++++ Master/texmf-dist/tex/latex/quiver/quiver.sty | 40 ++++++ Master/tlpkg/bin/tlpkg-ctan-check | 2 +- Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc | 1 + Master/tlpkg/tlpsrc/quiver.tlpsrc | 0 7 files changed, 206 insertions(+), 1 deletion(-) create mode 100644 Master/texmf-dist/doc/latex/quiver/README.md create mode 100644 Master/texmf-dist/doc/latex/quiver/quiver-doc.pdf create mode 100644 Master/texmf-dist/doc/latex/quiver/quiver-doc.tex create mode 100644 Master/texmf-dist/tex/latex/quiver/quiver.sty create mode 100644 Master/tlpkg/tlpsrc/quiver.tlpsrc (limited to 'Master') diff --git a/Master/texmf-dist/doc/latex/quiver/README.md b/Master/texmf-dist/doc/latex/quiver/README.md new file mode 100644 index 00000000000..5334dfda8b9 --- /dev/null +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/doc/latex/quiver/quiver-doc.pdf b/Master/texmf-dist/doc/latex/quiver/quiver-doc.pdf new file mode 100644 index 00000000000..4a1ec780c66 Binary files /dev/null and b/Master/texmf-dist/doc/latex/quiver/quiver-doc.pdf differ diff --git a/Master/texmf-dist/doc/latex/quiver/quiver-doc.tex b/Master/texmf-dist/doc/latex/quiver/quiver-doc.tex new file mode 100644 index 00000000000..312b139eb75 --- /dev/null +++ b/Master/texmf-dist/doc/latex/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/Master/texmf-dist/tex/latex/quiver/quiver.sty b/Master/texmf-dist/tex/latex/quiver/quiver.sty new file mode 100644 index 00000000000..d1d7d07e840 --- /dev/null +++ b/Master/texmf-dist/tex/latex/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 diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index b9a84433eca..5e9d06e75b4 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -703,7 +703,7 @@ my @TLP_working = qw( pygmentex pyluatex python pythonhighlight pythonimmediate pythontex qcircuit qcm qobitree qrbill qrcode qsharp qstest qsymbols qtree qualitype quantikz quantumarticle quattrocento - quickreaction quicktype quiz2socrative quizztex + quickreaction quicktype quiver quiz2socrative quizztex quotchap quoting quotmark quran quran-bn quran-de quran-ur qyxf-book r_und_s ragged2e raleway ran_toks randbild diff --git a/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc b/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc index 817623199c7..78aac554a72 100644 --- a/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-mathscience.tlpsrc @@ -191,6 +191,7 @@ depend pseudocode depend pythonhighlight depend qsharp depend quickreaction +depend quiver depend rank-2-roots depend rbt-mathnotes depend rec-thy diff --git a/Master/tlpkg/tlpsrc/quiver.tlpsrc b/Master/tlpkg/tlpsrc/quiver.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d -- cgit v1.2.3