-
Notifications
You must be signed in to change notification settings - Fork 398
/
Copy pathheader.tex
149 lines (124 loc) · 5 KB
/
header.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
\documentclass[12pt,twoside,letterpaper,titlepage]{report}
\usepackage{amssymb,amsmath}
% By default mathspec uses no-math, which is passed to fontspec, and creates problem with siunitx
\usepackage[math]{mathspec}
\defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
\usepackage[margin=0.75in, top=1in]{geometry}
% fixltx2e has been merged into LaTeX2e proper
% see: https://latex-project.org/ltnews/ltnews22.pdf
% \usepackage{fixltx2e}
\usepackage{graphicx,grffile}
\makeatletter
\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
\makeatother
% Scale images if necessary, so that they will not overflow the page
% margins by default, and it is still possible to overwrite the defaults
% using explicit options in \includegraphics[width, height, ...]{}
\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
\usepackage[table,svgnames]{xcolor}
\usepackage{framed}
\usepackage{longtable,booktabs}
\usepackage{multirow}
\usepackage{listings}
\usepackage{enumitem}
\PassOptionsToPackage{hyphens}{url}\usepackage[breaklinks=true]{hyperref}
% Background Color for Note/Admonition Boxes
\definecolor{shadecolor}{rgb}{0.9,0.9,0.9}
% Band the Color of Rows in Tables
% unfortunately, doesn't seem to work across the board. Turning off for now
%\rowcolors{1}{white}{lightgray!25!white}
\newenvironment{callout}{\begin{shaded*}\small}{\end{shaded*}}
\newcommand{\warning}[1]{\small{\textbf{\textcolor[rgb]{0.8,0.2,0.2}{#1}}}}
% Font Settings
%\setmainfont[]{Calibri}
%\setmonofont[Mapping=tex-ansi]{Inconsolata}
%\usepackage{newtxtext,newtxmath}
% The depth of numbering for sections
\setcounter{secnumdepth}{4}
% Listing Settings
\lstset{
backgroundcolor=\color{BlanchedAlmond!20!white},
basicstyle=\ttfamily\scriptsize,
breakatwhitespace=false,
breaklines=true,
frame=bottomline,
keepspaces=true,
}
% An environment for describing variables in equations
\newcommand*\wherelistlabel[1]{\ensuremath{#1 =}}
\newenvironment{wherelist}
{\begin{list}
{}
{\addtolength{\leftmargin}{2em}
\setlength{\itemsep}{0pt}
\let\makelabel=\wherelistlabel
}
}
{\end{list} }
% Provide better table spacing
% From https://www.inf.ethz.ch/personal/markusp/teaching/guides/guide-tables.pdf
\renewcommand{\arraystretch}{1.2}
\graphicspath{{media/}}
\pagestyle{headings}
% Define custom commands from Pandoc
\setlength{\emergencystretch}{3em} % prevent overfull lines
\providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
% Redefine (sub)paragraphs to behave more like sections
\ifx\paragraph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\fi
% this is a great package for printing units in a standard way, we should move this way
\usepackage[per-mode=symbol]{siunitx}
% Note: To use a unit without a number, use either `\si{\wattperVolumeFlowRate}`
% or `\SI{}{\wattperVolumeFlowRate}`.
% add some helper unit macros
\DeclareSIUnit\area{\m\squared}
\DeclareSIUnit\volume{\m\cubed}
\DeclareSIUnit\volumeFlowRate{\m\cubed\per\s}
\DeclareSIUnit\massFlowRate{\kg\per\s}
\DeclareSIUnit\density{\kg\per\m\cubed}
\DeclareSIUnit\humidityRatio{\kg\of{W}\per\kg\of{DA}}
\DeclareSIUnit\specificHeatCapacity{\J\per\kg\per\K}
\DeclareSIUnit\specificEnthalpy{\J\per\kg}
\DeclareSIUnit\coefficientOfPerformance{\watt\per\watt}
\DeclareSIUnit\wattperVolumeFlowRate{\watt\s\per\m\cubed} % Displays "W s/m^3"
\DeclareSIUnit\volumeFlowRateperArea{\volumeFlowRate\per\area} % Unused
\DeclareSIUnit\volumeFlowRateperWatt{\volumeFlowRate\per\watt} % Displays "m^3/(s W)"
\DeclareSIUnit\umolperAreaperSecond{\umol\per\area\per\s} % Displays "µmol/(m^2 s)"
\DeclareSIUnit\evapotranspirationRate{\kg\per\area\per\s} % Displays "kg / (m^2 s)"
% Make alias, so its clear these are IP units
\let\DeclareIPUnit\DeclareSIUnit
\let\IP\SI
\let\ip\si
% Add a few IP units, eg use like \IP{80}{\fahrenheit}
\DeclareIPUnit[number-unit-product = \,]
\fahrenheit{ \ensuremath { { } ^ { \circ } } \kern -\scriptspace F }
\DeclareIPUnit\in{in}
\DeclareIPUnit\ft{ft}
\DeclareIPUnit\sqft{\ft\squared}
\DeclareIPUnit\cfm{\ft\cubed\per\minute}
\DeclareIPUnit\CFM{CFM}
\DeclareIPUnit\gal{gal}
\DeclareIPUnit\gpm{gpm}
\DeclareIPUnit\MBH{MBH}
% The current implementation of \degree doesn't use ensuremath and doesn't show
% see https://github.com/josephwright/siunitx/issues/351
% But requried mathspec with options 'math' above fixes it
%\DeclareSIUnit[number-unit-product = \,]
%\degree{ \ensuremath { { } ^ { \circ } } }
% Add a few IP units, eg use like \SI{80}{\fahrenheit}
\DeclareSIUnit[number-unit-product = \,]
\fahrenheit{ \ensuremath { { } ^ { \circ } } \kern -\scriptspace F }
% some additional macros
\newcommand{\PB}[1]{\left(#1\right)}
\newcommand{\RB}[1]{\left[#1\right]}
\newcommand{\CB}[1]{\left\{#1\right\}}
\author{U.S. Department of Energy}
\date{September 30, 2016}