add quiver.sty package
This commit is contained in:
parent
e8be9fcb16
commit
0b631683d7
2 changed files with 64 additions and 0 deletions
|
@ -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.
|
||||
|
|
62
src/quiver/quiver.pysty
Normal file
62
src/quiver/quiver.pysty
Normal file
|
@ -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
|
Loading…
Reference in a new issue