-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcustom.sty
94 lines (82 loc) · 2.71 KB
/
custom.sty
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
\newcommand{\tbf}{\textbf}
\renewcommand{\rm}{\textrm}
\renewcommand{\b}{\pmb}
\renewcommand{\d}{{\rm d}}
\newcommand{\Ty}{{\textit{Thank you} }}
\newcommand{\ty}{{\textit{thank you} }}
% Don't add extraneous bibliography entries to the table of contents!
% They're not even indented correctly...
\newcommand\myputbib[1]{%
\addtocontents{toc}{\protect\setcounter{tocdepth}{-1}}
\putbib[#1]
\addtocontents{toc}{\protect\setcounter{tocdepth}{1}}
}
\newcommand{\mypublishedas}[2]{
\begin{bibunit}
\renewcommand{\bibsection}{}
\renewcommand{\bibnumfmt}[1]{}
\nocite{#2}\myputbib{#1}
\end{bibunit}
}
% Definitions stolen from aastex
\newcommand\ion[2]{#1$\;${%
\ifx\@currsize\normalsize\small \else
\ifx\@currsize\small\footnotesize \else
\ifx\@currsize\footnotesize\scriptsize \else
\ifx\@currsize\scriptsize\tiny \else
\ifx\@currsize\large\normalsize \else
\ifx\@currsize\Large\large
\fi\fi\fi\fi\fi\fi
\rmfamily\@Roman{#2}}\relax}%
\newcommand\arcdeg{\mbox{$^\circ$}}%
\newcommand\arcmin{\mbox{$^\prime$}}%
\newcommand\arcsec{\mbox{$^{\prime\prime}$}}%
% For algorithms
\usepackage[noend]{algpseudocode}
\newcommand*\Let[2]{\State #1 $\gets$ #2}
\algrenewcommand\algorithmicrequire{\textbf{Precondition:}}
\algrenewcommand\algorithmicensure{\textbf{Postcondition:}}
% Math operators
\DeclareMathOperator{\argmin}{argmin}
\DeclareMathOperator{\tr}{tr}
% Formatting for the TOC
\renewcommand{\cftchapterfont}{\normalfont\bfseries}% titles in bold
\renewcommand{\cftchapterpagefont}{\normalfont\bfseries}% page numbers in bold
\renewcommand{\cftchapterleader}{\hfill}% dot leaders in bold
\setlength{\cftbeforechapterskip}{1em}
% Witty epigraphs
\setlength\epigraphwidth{.8\textwidth}
\setlength\epigraphrule{0pt}
\newcommand{\myepigraph}[2]{\epigraph{\Large\itshape``#1''}{\large ---#2}}
% Add a blank page
\newcommand{\blankpage}{
\newpage
\thispagestyle{empty}
\mbox{}
\newpage
}
% Tikz definitions
\tikzset{
base/.style = {text width=3cm, text centered,},
node/.style = {base, draw, minimum height=1.5cm, fill=white, semithick, scale=0.8},
process/.style = {node, rectangle, fill=black!15},
data/.style = {node, rectangle, rounded corners},
line/.style = {draw, semithick, color=black!90},
arrow/.style = {line, -to},
arrow-dashed/.style = {arrow, dashed},
% styles for drawing lines with 2 elbows
-|-/.style={
to path={
(\tikztostart) -| ($(\tikztostart)!#1!(\tikztotarget)$) |- (\tikztotarget)
\tikztonodes
}
},
-|-/.default=0.5,
|-|/.style={
to path={
(\tikztostart) |- ($(\tikztostart)!#1!(\tikztotarget)$) -| (\tikztotarget)
\tikztonodes
}
},
|-|/.default=0.5,
}