/
gak-article.cls
95 lines (78 loc) · 2.74 KB
/
gak-article.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{gak-article}[2024/02/26 GAK Article Template]
%% KOMA options
\LoadClass{scrartcl}
\KOMAoptions{numbers=endperiod}
\setkomafont{disposition}{\bfseries}
\setkomafont{title}{\normalfont\Huge}
\setkomafont{section}{\centering\normalfont\scshape\large}
%% Font stuff
\usepackage[T1]{fontenc}
\usepackage{mlmodern}
\renewcommand{\bfdefault}{b}
% \usepackage[adobe-utopia]{mathdesign}
\usepackage{microtype}
%% Various nice packages
\RequirePackage{breakcites}
\RequirePackage{xparse}
\RequirePackage{amsmath}
\RequirePackage{amssymb}
\RequirePackage{amsthm}
\RequirePackage[svgnames]{xcolor}
\RequirePackage{wasysym}
\RequirePackage{stmaryrd}
\RequirePackage{fontawesome}
\RequirePackage{jmsdelim}
\RequirePackage{mathtools}
\RequirePackage{thmtools}
\RequirePackage[pdfusetitle,hyperfootnotes=false]{hyperref}
\RequirePackage[capitalize,nameinlink]{cleveref}
%% Cleverref options
\crefname{equation}{}{}
\crefname{chapter}{\S\!\!}{\S\!\!}
\crefname{section}{\S\!\!}{\S\!\!}
% Create counter for diagrams
\newcounter{diagram}
% Create diagram environment
\newenvironment{diagram}[1][]{%
\begin{equation}%
\begin{tikzpicture}[#1, baseline=(current bounding box.center)]%
\setcounter{diagram}{\theequation}
\addtocounter{diagram}{-1}
\refstepcounter{diagram}
}{%
\end{tikzpicture}%
\end{equation}%
}
\crefname{diagram}{Diagram}{Diagrams}
%% Make description and labelling environments nicer
\setkomafont{descriptionlabel}{\normalfont\bfseries}
\setkomafont{labelinglabel}{\normalfont\bfseries}
\setkomafont{labelingseparator}{\normalfont}
%% AMS Theorem options
\theoremstyle{definition}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{rul}[theorem]{Rule}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{notation}[theorem]{Notation}
\newtheorem{construction}[theorem]{Construction}
%% With longer examples and remarks, it's nice to have an end clearly defined, particularly when
%% there's a page break involved.
\newtheorem{examplex}[theorem]{Example}
\newenvironment{example}
{\pushQED{\qed}\renewcommand{\qedsymbol}{$\lhd$}\examplex}
{\popQED\endexamplex}
\newtheorem{remarkx}[theorem]{Remark}
\newenvironment{remark}
{\pushQED{\qed}\renewcommand{\qedsymbol}{$\lhd$}\remarkx}
{\popQED\endremarkx}
\theoremstyle{remark}
\newtheorem{assumption}[theorem]{Assumption}
\newtheorem{convention}[theorem]{Convention}
%% From https://tex.stackexchange.com/questions/42726/align-but-show-one-equation-number-at-the-end
\NewDocumentCommand{\TagEq}{o}{\IfValueTF{#1}{\tag{#1}}{\stepcounter{equation}\tag{\theequation}}}
\allowdisplaybreaks%