| 1 |
% \iffalse meta- |
| 2 |
% |
| 3 |
% Copyright (C) 2018 - 2021 by ChairX |
| 4 |
% |
| 5 |
% This file may be distributed and/or modified under the |
| 6 |
% conditions of the LaTeX Project Public License, either |
| 7 |
% version 1.3 of this license or (at your option) any later |
| 8 |
% version. The latest version of this license is in: |
| 9 |
% |
| 10 |
% http://www.latex-project.org/lppl.txt |
| 11 |
% |
| 12 |
% and version 1.3 or later is part of all distributions of |
| 13 |
% LaTeX version 2005/12/01 or later. |
| 14 |
% |
| 15 |
% This file contains the implementation of all category theory related macros . |
| 16 |
% |
| 17 |
% Macros have to be described by (delete the first %) |
| 18 |
% %\begin{macro}{\macro} |
| 19 |
% % Description of the implementation. |
| 20 |
% % \begin{macrocode} |
| 21 |
%\newcommand{\macro}[] {} |
| 22 |
% % \end{macrocode} |
| 23 |
% %\end{macro} |
| 24 |
% |
| 25 |
% The implementation and description will appear in the implementation |
| 26 |
% part of the documentation. Use \subsubsection{} etc. for structuring. |
| 27 |
% |
| 28 |
% The documentation of the macros defined here has to be written in |
| 29 |
% chairxmathGeneralDoc.dtx |
| 30 |
% \fi |
| 31 |
% |
| 32 |
% First we check of macros should be included: |
| 33 |
% \begin{macrocode} |
| 34 |
\if@loadmath |
| 35 |
% \end{macrocode} |
| 36 |
% |
| 37 |
% \subsubsection{General Math Commands} \label{sec:GeneralMathCommands} |
| 38 |
% |
| 39 |
%\begin{macro}{\I} |
| 40 |
% \begin{macrocode} |
| 41 |
\newcommand{\I}{\mathrm{i}} |
| 42 |
% \end{macrocode} |
| 43 |
%\end{macro} |
| 44 |
% |
| 45 |
%\begin{macro}{\E} |
| 46 |
% \begin{macrocode} |
| 47 |
\newcommand{\E}{\mathrm{e}} |
| 48 |
% \end{macrocode} |
| 49 |
%\end{macro} |
| 50 |
% |
| 51 |
%\begin{macro}{\D} |
| 52 |
% \begin{macrocode} |
| 53 |
\newcommand{\D}{\mathop{}\!\mathrm{d}} |
| 54 |
% \end{macrocode} |
| 55 |
%\end{macro} |
| 56 |
% |
| 57 |
%\begin{macro}{\cc} |
| 58 |
% \begin{macrocode} |
| 59 |
\newcommand{\cc}[1]{\overline{{#1}}} |
| 60 |
% \end{macrocode} |
| 61 |
%\end{macro} |
| 62 |
% |
| 63 |
%\begin{macro}{\sign} |
| 64 |
% \begin{macrocode} |
| 65 |
\newcommand{\sign}{\operatorname{\ch@irxoperatorfont{sign}}} |
| 66 |
% \end{macrocode} |
| 67 |
%\end{macro} |
| 68 |
% |
| 69 |
%\begin{macro}{\RE} |
| 70 |
% \begin{macrocode} |
| 71 |
\newcommand{\RE}{\operatorname{\ch@irxoperatorfont{Re}}} |
| 72 |
% \end{macrocode} |
| 73 |
%\end{macro} |
| 74 |
% |
| 75 |
%\begin{macro}{\IM} |
| 76 |
% \begin{macrocode} |
| 77 |
\newcommand{\IM}{\operatorname{\ch@irxoperatorfont{Im}}} |
| 78 |
% \end{macrocode} |
| 79 |
%\end{macro} |
| 80 |
%\begin{macro}{\Unit} |
| 81 |
% \begin{macrocode} |
| 82 |
\newcommand{\Unit}{\mathbb{1}} |
| 83 |
% \end{macrocode} |
| 84 |
%\end{macro} |
| 85 |
% |
| 86 |
%\begin{macro}{\const} |
| 87 |
% \begin{macrocode} |
| 88 |
\newcommand{\const}{\operatorname{\mathit{const}}} |
| 89 |
% \end{macrocode} |
| 90 |
%\end{macro} |
| 91 |
% |
| 92 |
%\begin{macro}{\canonical} |
| 93 |
% \begin{macrocode} |
| 94 |
\newcommand{\canonical}{\ch@irxscriptfont{can}} |
| 95 |
% \end{macrocode} |
| 96 |
%\end{macro} |
| 97 |
% |
| 98 |
%\begin{macro}{\pt} |
| 99 |
% \begin{macrocode} |
| 100 |
\newcommand{\pt}{\ch@irxoperatorfont{pt}} |
| 101 |
% \end{macrocode} |
| 102 |
%\end{macro} |
| 103 |
% |
| 104 |
%\subsubsection{Restrictions} \label{sec:Restrictions} |
| 105 |
% |
| 106 |
%\begin{macro}{\at} |
| 107 |
% \begin{macrocode} |
| 108 |
\newcommand{\at}[2][\big]{#1\vert_{#2}} |
| 109 |
% \end{macrocode} |
| 110 |
%\end{macro} |
| 111 |
% |
| 112 |
% |
| 113 |
% \subsubsection{Maps and Related Stuff} \label{sec:MapsandRelatedStuff} |
| 114 |
% |
| 115 |
%\begin{macro}{\Map} |
| 116 |
% \begin{macrocode} |
| 117 |
\newcommand{\Map}{\ch@irxoperatorfont{Map}} |
| 118 |
% \end{macrocode} |
| 119 |
%\end{macro} |
| 120 |
% |
| 121 |
%\begin{macro}{\Bij} |
| 122 |
% \begin{macrocode} |
| 123 |
\newcommand{\Bij}{\ch@irxoperatorfont{Bij}} |
| 124 |
% \end{macrocode} |
| 125 |
%\end{macro} |
| 126 |
% |
| 127 |
%\begin{macro}{\argument} |
| 128 |
% \begin{macrocode} |
| 129 |
\newcommand{\argument}{\,\cdot\,} |
| 130 |
% \end{macrocode} |
| 131 |
%\end{macro} |
| 132 |
% |
| 133 |
%\begin{macro}{\domain} |
| 134 |
% \begin{macrocode} |
| 135 |
\newcommand{\domain}{\operatorname{\ch@irxoperatorfont{dom}}} |
| 136 |
% \end{macrocode} |
| 137 |
%\end{macro} |
| 138 |
% |
| 139 |
%\begin{macro}{\range} |
| 140 |
% \begin{macrocode} |
| 141 |
\newcommand{\range}{\operatorname{\ch@irxoperatorfont{range}}} |
| 142 |
% \end{macrocode} |
| 143 |
%\end{macro} |
| 144 |
% |
| 145 |
%\begin{macro}{\id} |
| 146 |
% \begin{macrocode} |
| 147 |
\newcommand{\id}{\operatorname{\ch@irxoperatorfont{id}}} |
| 148 |
% \end{macrocode} |
| 149 |
%\end{macro} |
| 150 |
% |
| 151 |
%\begin{macro}{\pr} |
| 152 |
% \begin{macrocode} |
| 153 |
\newcommand{\pr}{\operatorname{\ch@irxoperatorfont{pr}}} |
| 154 |
% \end{macrocode} |
| 155 |
%\end{macro} |
| 156 |
% |
| 157 |
%\begin{macro}{\inv} |
| 158 |
% \begin{macrocode} |
| 159 |
\newcommand{\inv}{\operatorname{\ch@irxoperatorfont{inv}}} |
| 160 |
% \end{macrocode} |
| 161 |
%\end{macro} |
| 162 |
% |
| 163 |
%\begin{macro}{\ev} |
| 164 |
% \begin{macrocode} |
| 165 |
\newcommand{\ev}{\operatorname{\ch@irxoperatorfont{ev}}} |
| 166 |
% \end{macrocode} |
| 167 |
%\end{macro} |
| 168 |
% |
| 169 |
%\begin{macro}{\image} |
| 170 |
% \begin{macrocode} |
| 171 |
\newcommand{\image}{\operatorname{\ch@irxoperatorfont{im}}} |
| 172 |
% \end{macrocode} |
| 173 |
%\end{macro} |
| 174 |
% |
| 175 |
%\begin{macro}{\graph} |
| 176 |
% \begin{macrocode} |
| 177 |
\newcommand{\graph}{\operatorname{\ch@irxoperatorfont{graph}}} |
| 178 |
% \end{macrocode} |
| 179 |
%\end{macro} |
| 180 |
% |
| 181 |
%\begin{macro}{\coimage} |
| 182 |
% \begin{macrocode} |
| 183 |
\newcommand{\coimage}{\operatorname{\ch@irxoperatorfont{coim}}} |
| 184 |
% \end{macrocode} |
| 185 |
%\end{macro} |
| 186 |
% |
| 187 |
%\begin{macro}{\coker} |
| 188 |
% \begin{macrocode} |
| 189 |
\newcommand{\coker}{\operatorname{\ch@irxoperatorfont{coker}}} |
| 190 |
% \end{macrocode} |
| 191 |
%\end{macro} |
| 192 |
% |
| 193 |
%\begin{macro}{\operator} |
| 194 |
% \begin{macrocode} |
| 195 |
\newcommand{\operator}[1]{\operatorname{\ch@irxoperatorfont{#1}}} |
| 196 |
% \end{macrocode} |
| 197 |
%\end{macro} |
| 198 |
% |
| 199 |
% \subsubsection{Relations} \label{sec:Relations} |
| 200 |
% |
| 201 |
%\begin{macro}{\later} |
| 202 |
% \begin{macrocode} |
| 203 |
\newcommand{\later}{\mathrel{\succcurlyeq}} |
| 204 |
% \end{macrocode} |
| 205 |
%\end{macro} |
| 206 |
% |
| 207 |
%\begin{macro}{\earlier} |
| 208 |
% \begin{macrocode} |
| 209 |
\newcommand{\earlier}{\mathrel{\preccurlyeq}} |
| 210 |
% \end{macrocode} |
| 211 |
%\end{macro} |
| 212 |
% |
| 213 |
%\subsubsection{Sums and Products} |
| 214 |
% |
| 215 |
%\begin{macro}{\bigop} |
| 216 |
% To define sum-like operators that are scaled up in displaystyle we define the following command taken |
| 217 |
% from tex.stackexchange.com/questions/23432/how-to-create-my-own-math-operator-with-limits |
| 218 |
% \begin{macrocode} |
| 219 |
\DeclareRobustCommand\big@p[2][1]{% |
| 220 |
\mathop{\vphantom{\sum}\mathpalette\bigop@{{#1}{#2}}}\slimits@ |
| 221 |
} |
| 222 |
\newcommand{\bigop@}[2]{\bigop@@#1#2} |
| 223 |
\newcommand{\bigop@@}[3]{% |
| 224 |
\vcenter{ |
| 225 |
\sbox\z@{$#1\sum$} |
| 226 |
\hbox{\resizebox{\ifx#1\displaystyle#2\fi\dimexpr\ht\z@+\dp\z@}{!}{$\m@th#3$}} |
| 227 |
} |
| 228 |
} |
| 229 |
% \end{macrocode} |
| 230 |
%\end{macro} |
| 231 |
% |
| 232 |
%\begin{macro}{\bigplus} |
| 233 |
% The command |\DOTSB| is used for correct behaviour of |\dots| before or after the command. |
| 234 |
% \begin{macrocode} |
| 235 |
\newcommand{\bigplus}{\DOTSB\big@p{+}} |
| 236 |
% \end{macrocode} |
| 237 |
%\end{macro} |
| 238 |
% |
| 239 |
%\begin{macro}{\bigtimes} |
| 240 |
% \begin{macrocode} |
| 241 |
\newcommand{\bigtimes}{\DOTSB\big@p{\times}} |
| 242 |
% \end{macrocode} |
| 243 |
%\end{macro} |
| 244 |
% |
| 245 |
%\begin{macro}{\biprod} |
| 246 |
% \begin{macrocode} |
| 247 |
\newcommand{\biprod}{\DOTSB\big@p{\mathrel{\prod\hspace{-0.4cm}\coprod}}} |
| 248 |
% \end{macrocode} |
| 249 |
%\end{macro} |
| 250 |
% |
| 251 |
% \subsubsection{Labels} \label{sec:Labels} |
| 252 |
% |
| 253 |
% Smiley from |wasysym| |
| 254 |
% |
| 255 |
% \begin{macro}{\smiley} |
| 256 |
% \begin{macrocode} |
| 257 |
\newcommand{\smiley}{\ch@irxmathsymbol[\mathord]{wasy}{44}} |
| 258 |
% \end{macrocode} |
| 259 |
% \end{macro} |
| 260 |
% |
| 261 |
% Frownie from |wasysym| |
| 262 |
% |
| 263 |
% \begin{macro}{\frownie} |
| 264 |
% \begin{macrocode} |
| 265 |
\newcommand{\frownie}{\ch@irxmathsymbol[\mathord]{wasy}{47}} |
| 266 |
% \end{macrocode} |
| 267 |
% \end{macro} |
| 268 |
% |
| 269 |
% \begin{macro}{\heart} |
| 270 |
% \begin{macrocode} |
| 271 |
\newcommand{\heart}{\heartsuit} |
| 272 |
% \end{macrocode} |
| 273 |
% \end{macro} |
| 274 |
% |
| 275 |
% \begin{macrocode} |
| 276 |
\fi |
| 277 |
% \end{macrocode} |