diff options
author | Yigit Sever | 2020-12-02 00:29:04 +0300 |
---|---|---|
committer | Yigit Sever | 2020-12-02 00:29:04 +0300 |
commit | 18539f03d200fb94d59f102207213c3c80cdc5d7 (patch) | |
tree | bbba81b4f4fb1bb747833ee6b913c64c28065e6d /answer_sheet/quiver.sty | |
parent | a10bc230a9644e0a951b62c1450f25aec698a063 (diff) | |
download | hw3-18539f03d200fb94d59f102207213c3c80cdc5d7.tar.gz hw3-18539f03d200fb94d59f102207213c3c80cdc5d7.tar.bz2 hw3-18539f03d200fb94d59f102207213c3c80cdc5d7.zip |
both a and b
Diffstat (limited to 'answer_sheet/quiver.sty')
-rw-r--r-- | answer_sheet/quiver.sty | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/answer_sheet/quiver.sty b/answer_sheet/quiver.sty new file mode 100644 index 0000000..57d154b --- /dev/null +++ b/answer_sheet/quiver.sty | |||
@@ -0,0 +1,36 @@ | |||
1 | % *** quiver *** | ||
2 | % A package for drawing commutative diagrams exported from https://q.uiver.app. | ||
3 | % | ||
4 | % This package is currently a wrapper around the `tikz-cd` package, importing necessary TikZ | ||
5 | % libraries, and defining a new TikZ style for curves of a fixed height. | ||
6 | % | ||
7 | % Version: 1.0.1 | ||
8 | % Authors: | ||
9 | % - varkor (https://github.com/varkor) | ||
10 | % - AndréC (https://tex.stackexchange.com/users/138900/andr%C3%A9c) | ||
11 | |||
12 | \NeedsTeXFormat{LaTeX2e} | ||
13 | \ProvidesPackage{quiver}[2020/11/27 quiver] | ||
14 | |||
15 | % `tikz-cd` is necessary to draw commutative diagrams. | ||
16 | \RequirePackage{tikz-cd} | ||
17 | % `calc` is necessary to draw curved arrows. | ||
18 | \usetikzlibrary{calc} | ||
19 | % `pathmorphing` is necessary to draw squiggly arrows. | ||
20 | \usetikzlibrary{decorations.pathmorphing} | ||
21 | |||
22 | % A TikZ style for curved arrows of a fixed height, due to AndréC. | ||
23 | \tikzset{curve/.style={settings={#1},to path={(\tikztostart) | ||
24 | .. controls ($(\tikztostart)!\pv{pos}!(\tikztotarget)!\pv{height}!270:(\tikztotarget)$) | ||
25 | and ($(\tikztostart)!1-\pv{pos}!(\tikztotarget)!\pv{height}!270:(\tikztotarget)$) | ||
26 | .. (\tikztotarget)\tikztonodes}}, | ||
27 | settings/.code={\tikzset{quiver/.cd,#1} | ||
28 | \def\pv##1{\pgfkeysvalueof{/tikz/quiver/##1}}}, | ||
29 | quiver/.cd,pos/.initial=0.35,height/.initial=0} | ||
30 | |||
31 | % TikZ arrowhead/tail styles. | ||
32 | \tikzset{tail reversed/.code={\pgfsetarrowsstart{tikzcd to}}} | ||
33 | \tikzset{2tail/.code={\pgfsetarrowsstart{Implies[reversed]}}} | ||
34 | \tikzset{2tail reversed/.code={\pgfsetarrowsstart{Implies}}} | ||
35 | |||
36 | \endinput | ||