mirror of https://github.com/hearot/notes
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.6 KiB
Plaintext
41 lines
1.6 KiB
Plaintext
1 year ago
|
% *** 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
|