\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{zb-basics}[2021/2/23 zb-basics]

\RequirePackage[UKenglish]{babel}

\RequirePackage{scrlayer-scrpage} 
 
\RequirePackage{graphicx}
\RequirePackage{enumitem}

% Font selection 
\RequirePackage[no-math]{fontspec}
\setmainfont{cmun}[
  Extension      = .otf,
  UprightFont    = *rm,
  BoldFont       = *bx,
  ItalicFont     = *ti,
  BoldItalicFont = *ti,
  SlantedFont    = *sl,
  SmallCapsFont  = *rm,
  SmallCapsFeatures = {Letters=SmallCaps},
]

% standard LaTeX packages supported by zbMATH
\RequirePackage{amsmath,amsfonts,amssymb}
\RequirePackage{mathtools}
\RequirePackage{stmaryrd}
\RequirePackage{mathrsfs}
\RequirePackage{tikz-cd}
\RequirePackage{textcomp,gensymb}

% Special Math Operators used by zbMATH
% \Im, \Re (redefinition)
\let\Im\relax\DeclareMathOperator{\Im}{Im}
\let\Re\relax\DeclareMathOperator{\Re}{Re}

% \Aut, \Hom
\DeclareMathOperator{\Aut}{Aut}
\DeclareMathOperator{\Hom}{Hom}

% \ran (analogous to \ker)
\DeclareMathOperator{\ran}{ran}

% \1 (indicator function, from package bbold)
\DeclareSymbolFont{bbold}{U}{bbold}{m}{n}
\DeclareMathSymbol{\1}{\mathord}{bbold}{`1}

% \fint (integral average with slash, from package esint)
\DeclareSymbolFont{esint}{U}{esint}{m}{n}
\DeclareMathSymbol{\fintsymbol}{\mathop}{esint}{'037}
\def\fint{\fintsymbol\nolimits}

% \Sha (Tate-Shafarevich group)
\DeclareMathOperator{\Sha}{\textup{Ш}} 

% write text in zbMath Blue
\definecolor{zbMATHBlue}{rgb}{0, 0.289, 0.6}
\newcommand{\blue}[1]{\textcolor{zbMATHBlue}{#1}}
