From 0b631683d722faf7b0b42af58c22a5648757eba9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Mon, 28 Feb 2022 16:01:53 +0100 Subject: [PATCH] add quiver.sty package --- README.md | 2 ++ src/quiver/quiver.pysty | 62 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 src/quiver/quiver.pysty diff --git a/README.md b/README.md index b463769..eaf7774 100644 --- a/README.md +++ b/README.md @@ -27,3 +27,5 @@ Feel free to send pull requests if you have suggestions for improvements. This is free software. Prior to version 2.6 this has been MIT-licensed. Starting with version 1.6 this is licensed under the LPPL and/or the GPLv3. See `LICENSE.md` for further details. + +The `quiver.sty` package here is taken from [varkor/quiver](https://github.com/varkor/quiver) and licensed under the MIT License. It is redistributed unchanged for dependency reasons of my projects. diff --git a/src/quiver/quiver.pysty b/src/quiver/quiver.pysty new file mode 100644 index 0000000..3714ecd --- /dev/null +++ b/src/quiver/quiver.pysty @@ -0,0 +1,62 @@ +%MIT License +% +% Copyright (c) 2018 varkor +% +% Permission is hereby granted, free of charge, to any person obtaining a copy +% of this software and associated documentation files (the "Software"), to deal +% in the Software without restriction, including without limitation the rights +% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +% copies of the Software, and to permit persons to whom the Software is +% furnished to do so, subject to the following conditions: +% +% The above copyright notice and this permission notice shall be included in all +% copies or substantial portions of the Software. +% +% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +% SOFTWARE. *** 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.2.1 +% 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