From 482121d656757669e3c79292ee8dd055b4d67ff4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler=20=28via=20gitlab=20runner=29?= Date: Wed, 27 Oct 2021 18:27:32 +0000 Subject: [PATCH] add pushout and pullback symbols Build branch algebraic-geometry (64416f6) from kesslermaximilian/LatexPackages --- build_info.json | 10 +++++----- math/mkessler-mathfig.sty | 26 ++++++++++++++++++++++++-- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/build_info.json b/build_info.json index d8feeb8..6a3f7d8 100644 --- a/build_info.json +++ b/build_info.json @@ -1,8 +1,8 @@ { "build_time": "", "source files": { - "version": "v2.2.2-19", - "commit": "7116da1450351cf44b1c93f3bcb0b2875de25ba6", + "version": "v2.2.2-20", + "commit": "64416f686ef411d51bba094b9c9bc778b8833d6f", "dirty": false }, "pytex": { @@ -154,9 +154,9 @@ { "name": "mkessler-mathfig.sty", "source file": "mathfig.pysty", - "build time": "2021/10/24 08:57", - "source version": "v2.2.2-3", - "source commit hash": "1113e0ddd01036e5bad92b18c912e94bbc6f85c4", + "build time": "2021/10/27 18:27", + "source version": "v2.2.2-20", + "source commit hash": "64416f686ef411d51bba094b9c9bc778b8833d6f", "pytex version": "v1.0.0-18", "pytex commit hash": "126d420b7a6ed2d4b2a42d534ab2e12344869643", "dirty": false diff --git a/math/mkessler-mathfig.sty b/math/mkessler-mathfig.sty index a4728f2..653ef22 100644 --- a/math/mkessler-mathfig.sty +++ b/math/mkessler-mathfig.sty @@ -27,7 +27,7 @@ % % Build details: % PyTeX version: v1.0.0-18 (commit 126d420) -% Source code version: v2.2.2-3 (commit 1113e0d) +% Source code version: v2.2.2-20 (commit 64416f6) % % This LaTeX package is free software and distributed under the MIT License. You % may use it freely for your purposes. The latest version of the package can be @@ -39,7 +39,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{mkessler-mathfig}[2021/10/24 - Math figures with TikZ / pgfplots / xy] +\ProvidesPackage{mkessler-mathfig}[2021/10/27 - Math figures with TikZ / pgfplots / xy] % This is just a collection of the packages I use to typeset mathematical figures @@ -54,6 +54,7 @@ \usetikzlibrary{calc, intersections, through, quotes, angles, babel, positioning, snakes} \RequirePackage{tikz-cd} %Commutative diagrams +\RequirePackage{xparse} %%for small diagrams, similar to tikz-cd @@ -63,3 +64,24 @@ % \xyoption{all} % here, but this messes with the catcode of the @ sign (which no package should do!) % so that further parts in this package would get broken + + +\newcommand\pushoutsymbol{\tikz[baseline=0.5,scale=0.2]{ + \draw[-] (0,0) --(0,1) -- (1,1); + \draw (1,0) circle (1.5pt);} +} + +\newcommand\pullbacksymbol{\tikz[baseline=0.5,scale=0.2]{ + \draw[-] (0,0) --(1,0) -- (1,1); + \draw (0,1) circle (1.5pt);} +} + +% This is used in a tikzcd +\NewDocumentCommand\pushout{ O{dr} }{ + \arrow[phantom, pos=0.45]{#1}{\pushoutsymbol} +} + +% This is used in a tikzcd +\NewDocumentCommand\pullback{ O{dr} }{ + \arrow[phantom, pos=0.45]{#1}{\pullbacksymbol} +}