-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-misc.tex
79 lines (68 loc) · 2.48 KB
/
setup-misc.tex
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
% Layout
\clubpenalty10000
\widowpenalty10000
\displaywidowpenalty10000
% TikZ Libraries
\usetikzlibrary{positioning,calc,external}
%\tikzexternalize[prefix=figures/]%, force remake]
\sisetup{
mode=match,
reset-math-version=false,
}
% Editing / Collab
\newcommand{\todo}[2][]{\ignorespaces\leavevmode
\if\relax\detokenize{#1}\relax
{\color{red}[TODO: #2]}%
\else
{\color{red}[TODO (#1): #2]}%
\fi
}
\newcommand{\note}[1]{\ignorespaces\leavevmode{\color{orange}#1}}
\definecolor{change}{HTML}{0096b8}
\newcommand{\change}[1]{\ignorespaces\leavevmode{\color{change}#1}}
%
\theoremstyle{plain}% default
\newtheorem{thm}{Theorem}
\newtheorem{cor}{Corollary}
\newtheorem{lem}{Lemma}
\newtheorem{prop}{Proposition}
\theoremstyle{definition}
\newtheorem{defn}{Definition}%[section]
\newtheorem{prob}{Problem}
\newtheorem*{prob*}{Problem Statement}
\theoremstyle{remark}
\newtheorem{rem}{Remark}
\newtheorem*{rem*}{Remark}
\newtheoremstyle{example}{\topsep}{\topsep}{}{}{\itshape}{.}{ }{}
\theoremstyle{example}
\newtheorem{example}{Example}
\newtheorem*{example*}{Example}
% Autoref Commands/Names
\newcommand*{\thmautorefname}{Theorem}
\newcommand*{\corautorefname}{Corollary}
\newcommand*{\lemautorefname}{Lemma}
\newcommand*{\propautorefname}{Proposition}
\newcommand*{\probautorefname}{Problem}
\newcommand*{\remautorefname}{Remark}
\newcommand*{\exampleautorefname}{Example}
\addto\extrasenglish{%
\renewcommand*{\sectionautorefname}{Section}
\renewcommand*{\subsectionautorefname}{Section}
}
% Correct section spacing when using titlesec package
\IfPackageLoadedTF{titlesec}{%
\ifCLASSOPTIONconference%
\titlespacing{\section}{0pt}{1.5ex plus 1.5ex minus 0.5ex}{0.7ex plus 1ex minus 0ex} %conference
\titlespacing{\subsection}{0pt}{1.5ex plus 1.5ex minus 0.5ex}{0.7ex plus .5ex minus 0ex} %conference
\else
\titlespacing{\section}{0pt}{3.0ex plus 1.5ex minus 1.5ex}{0.7ex plus 1ex minus 0ex} %journal
\titlespacing{\subsection}{0pt}{3.5ex plus 1.5ex minus 1.5ex}{0.7ex plus .5ex minus 0ex} %journal
\fi
\def\thesubsubsection{\thesubsection\arabic{subsubsection}}
\def\thesubsubsectiondis{\arabic{subsubsection})}
\def\theparagraphdis{\alph{paragraph})}
\titleformat{\subsubsection}[runin]{\normalfont\normalsize\itshape}{\thesubsubsectiondis}{.5em}{}[:]
\titlespacing*{\subsubsection}{\parindent}{0ex plus 0.1ex minus 0.1ex}{1ex}
\titleformat{\paragraph}[runin]{\normalfont\normalsize\itshape}{\theparagraphdis}{.5em}{}[:]
\titlespacing*{\paragraph}{2\parindent}{0ex plus 0.1ex minus 0.1ex}{1ex}
}{}