-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevolution.sty
100 lines (81 loc) · 2.98 KB
/
evolution.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
94
95
96
97
98
99
100
\ProvidesPackage{evolution} % must match the name of this file
%--------------------------------------------------
% Style for Evolution
%--------------------------------------------------
% Margins
\usepackage[margin=1in]{geometry}
% Font
\usepackage{mathptmx} % Times font (including math)
\usepackage[T1]{fontenc}
% (font size is set with documentclass)
% Section headings
\setcounter{secnumdepth}{0} % do not number sections
\usepackage[compact]{titlesec}
\titleformat*{\section}{\center\bfseries} % also, use titlecase
\titleformat*{\subsection}{\bfseries\itshape} % also, use sentencecase
\titleformat*{\subsubsection}{\itshape}
% Line spacing
\usepackage{setspace}
\newcommand{\stretchby}{1.5}
\setstretch{\stretchby}
% Line numbering
% put after amsmath, for better numbering
% ? though still need to wrap subequations in begin/end{linenomath*}
\usepackage[mathlines]{lineno}
\modulolinenumbers[5]
% \linenumbers % put this after the titlepage
% Paragraphs
\setlength{\parindent}{0.5in}
\setlength{\parskip}{0pt}
% Figures and Tables
\usepackage{graphicx}
\usepackage{booktabs}
\setlength\heavyrulewidth{0.15em}
\cmidrulekern 0.2em
\usepackage{newfloat}
\DeclareFloatingEnvironment[name=Figure]{suppfigure}
\DeclareFloatingEnvironment[name=Table]{supptable}
\renewcommand\thesuppfigure{S\arabic{suppfigure}}
\renewcommand\thesupptable{S\arabic{supptable}}
\usepackage{caption}
\captionsetup{font={stretch=\stretchby}}
% \usepackage{subcaption}
% push figures to end
\usepackage[nolists,nomarkers]{endfloat}
% \renewcommand{\efloatseparator}{\mbox{}} % don't clearpage after each float
\DeclareDelayedFloat{suppfigure}{Supplemental Figures}
\DeclareDelayedFloat{supptable}{Supplemental Tables}
% \usepackage{sidecap}
% \usepackage{array}
% \usepackage{threeparttable}
% Math
\usepackage{bm}
\newcommand{\myvec}[1]{\ensuremath{\bm{\mathsf{#1}}}}
\usepackage{amsmath}
% Citations
\usepackage[authoryear,sectionbib]{natbib}
\bibpunct{(}{)}{;}{a}{}{,} % no comma between author and year
\renewcommand{\bibsection}{\section{Literature Cited}}
\setlength{\bibsep}{1pt}
% Cross-refs
\usepackage[hidelinks, pagebackref=false, colorlinks=true, linkcolor=blue, citecolor=blue]{hyperref} % needs to be loaded before cleveref
\usepackage[capitalize,sort&compress]{cleveref}
\newcommand{\crefrangeconjunction}{--}
\crefname{figure}{Fig.}{Figs.}
\crefname{table}{Table}{Tables}
\crefname{suppfigure}{Fig.}{Figs.}
\crefname{supptable}{Table}{Tables}
% Used on the title page
\usepackage{endnotes}
\renewcommand{\enoteheading}{}
\renewcommand{\enotesize}{\normalsize}
\renewcommand\enoteformat{\rightskip=0pt \leftskip=0pt \parindent=0em \leavevmode\makeenmark\raggedright}
% Formatting of i.e. and e.g. (following space, possible comma, possible italics)
\usepackage{xspace}
\newcommand*{\ie}{i.e.,\xspace}
\newcommand*{\eg}{e.g.,\xspace}
\newcommand*{\vs}{vs.\xspace}
% not sure how much this really helps
\setlength{\emergencystretch}{3em} % prevent overfull lines
\widowpenalty=1000 % avoid orphan lines?
\clubpenalty=1000