Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.79 KB | None | 0 0
  1. % \documentclass[12pt,letter,twoside=semi]{article}
  2.  
  3. \usepackage{amsmath,amsfonts,amsthm,amssymb,mathtools,physics} % Math packages
  4. \usepackage[utf8]{inputenc} % Required for non-English characters
  5. \usepackage[english]{babel} % Spell-checking
  6. \usepackage[usenames,svgnames,dvipsnames]{xcolor} % Color with dvips names
  7. \usepackage[hidelinks]{hyperref}
  8. \usepackage[parfill]{parskip}
  9. \usepackage[nameinlink]{cleveref}
  10. \usepackage{fancyhdr} % Required for custom headers
  11. \usepackage{lastpage} % Required to determine the last page for the footer
  12. \usepackage{extramarks} % Required for header and footer marks
  13. \usepackage{enumitem} % Allows [label=(\roman*)] and similar to be labels for enumerate
  14. \usepackage[margin=1in]{geometry} % Sets page margin
  15. \usepackage{esdiff} % Defines commands for differentials
  16. \usepackage{listings} % Listings IDE environment
  17. \usepackage[safe]{tipa} % IPA
  18. \usepackage{graphicx} % Easy inclusion of graphics
  19. \usepackage{tikz} % Tikz
  20. \usepackage{microtype}
  21. \usepackage{url}
  22. \usepackage[normalem]{ulem}
  23. \usepackage{stmaryrd}
  24. \usepackage[strings]{underscore}
  25. \usepackage{wasysym}
  26. \usepackage{multirow}
  27. \usepackage{rotating}
  28. \usepackage{prerex}
  29. \graphicspath{{/Users/0nami/Documents/Figures/}}
  30. \usepackage{import,xifthen,pdfpages,transparent} % Allows embedding Inkscape and similar
  31. \mathtoolsset{showonlyrefs} % Only referenced equations are numbered
  32. \usepackage{xfrac} % Allows for slanted fractions using \sfrac{*}{*}
  33. \usepackage{etoolbox}
  34.  
  35. \setlength{\headheight}{22pt}
  36.  
  37. % The following sets up the header and footer
  38. \fancyhf{}
  39. \pagestyle{fancy}
  40. \lhead{\Large{\textbf{\noteCourse}}} %left header
  41. \chead{\noteTitle} %central header
  42. \lfoot{\noteName} %left footer
  43. \rhead{\today} % right header
  44. \rfoot{Page\ \thepage\ of\ \pageref{LastPage}} % right footer
  45. \renewcommand\headrulewidth{0.5pt} % Size of the header rule
  46. % \renewcommand\footrulewidth{0.2pt} % Size of the footer rule [COMMENTED OUT - TEST]
  47.  
  48. % Thoerem
  49. \setlength {\marginparwidth }{2cm}
  50. \usepackage[textsize=scriptsize,shadow]{todonotes}
  51. \usepackage{thmtools}
  52. \usepackage[framemethod=tikz]{mdframed}
  53. \usepackage[many]{tcolorbox}
  54. \tcbuselibrary{theorems}
  55.  
  56. \makeatletter
  57. \newcommand\notefont{\normalfont\sffamily}
  58. \def\tcb@theo@title#1#2#3{%
  59. \ifdefempty{#2}{\setbox\z@=\hbox{#1}}{\setbox\z@=\tcb@theo@form{#1}{#2}}%
  60. \def\temp@a{#3}%
  61. \ifx\temp@a\@empty\relax%
  62. \unhbox\z@\kvtcb@terminatorsign%
  63. \else%
  64. \setbox\z@=\hbox{\unhbox\z@\kvtcb@separatorsign\ }%
  65. \hangindent\wd\z@%
  66. \hangafter=1%
  67. \mbox{\unhbox\z@}{\notefont\kvtcb@desc@delim@left#3\kvtcb@desc@delim@right\kvtcb@terminatorsign}%
  68. \fi%
  69. }
  70. \makeatother
  71.  
  72. \newtcbtheorem[number within = section]{theorem}{Theorem}{%
  73. colback=Red!7,
  74. colframe=Black!40!Red,
  75. sharp corners,
  76. theorem style = break,
  77. fonttitle = \bfseries\sffamily,
  78. coltitle = Black!40!Red,
  79. separator sign dash,
  80. terminator sign none,
  81. description delimiters none,
  82. boxrule = 1pt,
  83. parbox = false,
  84. }{theorem}
  85.  
  86. \newtcbtheorem[use counter from = theorem]{definition}{Definition}{%
  87. colback=RoyalBlue!7,
  88. colframe=NavyBlue!60!RoyalBlue,
  89. theorem style = plain,
  90. fonttitle = \bfseries\sffamily,
  91. coltitle = NavyBlue!60!RoyalBlue,
  92. sharp corners,
  93. separator sign none,
  94. terminator sign dash,
  95. leftrule = 2pt,
  96. bottomrule = 0pt,
  97. toprule = 0pt,
  98. rightrule = 0pt,
  99. parbox = false,
  100. }{def}
  101.  
  102. \newtcbtheorem{keyterms}{Key Terms}{%
  103. colback=ForestGreen!5,
  104. colframe=ForestGreen!70!black,
  105. theorem style = plain,
  106. fonttitle = \bfseries\sffamily,
  107. theorem name,
  108. coltitle = ForestGreen!70!black,
  109. sharp corners,
  110. separator sign none,
  111. terminator sign dash,
  112. leftrule = 2pt,
  113. bottomrule = 0pt,
  114. toprule = 0pt,
  115. rightrule = 0pt,
  116. parbox = false,
  117. }{def}
  118.  
  119. \newtcbtheorem[use counter from = theorem]{example}{Example}{%
  120. colback=ForestGreen!5,
  121. colframe=ForestGreen!70!black,
  122. theorem style = break,
  123. fonttitle = \bfseries\sffamily,
  124. coltitle = ForestGreen!70!black,
  125. separator sign dash,
  126. terminator sign none,
  127. description delimiters none,
  128. boxrule = 0.8pt,
  129. parbox = false,
  130. breakable,
  131. }{exam}
  132.  
  133. \let\homework\undefined
  134. \newtcbtheorem{homework}{Homework}{%
  135. colback=Plum!12,
  136. colframe=BlueViolet!80!Black,
  137. theorem style = break,
  138. fonttitle = \bfseries\sffamily,
  139. coltitle = BlueViolet!80!Black,
  140. separator sign dash,
  141. terminator sign none,
  142. sharp corners,
  143. description delimiters none,
  144. boxrule = 0pt,
  145. theorem name,
  146. parbox = false,
  147. }{hw}
  148.  
  149. \newtcbtheorem{homeworksolution}{Solution}{%
  150. colback=Plum!12,
  151. colframe=BlueViolet!80!Black,
  152. theorem style = plain,
  153. fonttitle = \bfseries\sffamily,
  154. theorem name,
  155. coltitle = BlueViolet!80!Black,
  156. sharp corners,
  157. separator sign none,
  158. terminator sign dash,
  159. leftrule = 2pt,
  160. bottomrule = 0pt,
  161. toprule = 0pt,
  162. rightrule = 0pt,
  163. parbox = false,
  164. breakable,
  165. }{def}
  166.  
  167. \newtcbtheorem[use counter from = theorem]{lemma}{Lemma}{%
  168. colback=BurntOrange!8,
  169. colframe=RawSienna!50,
  170. sharp corners,
  171. theorem style = break,
  172. fonttitle = \bfseries\sffamily,
  173. coltitle = RawSienna,
  174. separator sign dash,
  175. terminator sign none,
  176. description delimiters none,
  177. boxrule = 1pt,
  178. parbox = false,
  179. }{lem}
  180.  
  181. \newtcbtheorem[use counter from = theorem]{corollary}{Corollary}{%
  182. colback=BurntOrange!8,
  183. colframe=RawSienna!50,
  184. sharp corners,
  185. theorem style = break,
  186. fonttitle = \bfseries\sffamily,
  187. coltitle = RawSienna,
  188. separator sign dash,
  189. terminator sign none,
  190. description delimiters none,
  191. boxrule = 1pt,
  192. parbox = false,
  193. }{lem}
  194.  
  195. \newtcbtheorem{remark}{Remark}{%
  196. colback=Black!4,
  197. colframe=Black,
  198. sharp corners,
  199. theorem style = plain,
  200. fonttitle = \bfseries\sffamily,
  201. theorem name,
  202. coltitle = Black,
  203. separator sign none,
  204. terminator sign dash,
  205. description delimiters none,
  206. boxrule = 0pt,
  207. parbox = false,
  208. }{rem}
  209.  
  210. \newtcbtheorem[use counter from = theorem]{proposition}{Proposition}{%
  211. colback=Black!4,
  212. colframe=Black,
  213. sharp corners,
  214. theorem style = break,
  215. fonttitle = \bfseries\sffamily,
  216. coltitle = Black,
  217. separator sign dash,
  218. terminator sign none,
  219. description delimiters none,
  220. boxrule = 0pt,
  221. parbox = false,
  222. }{prop}
  223.  
  224. \newtcbtheorem[use counter from = theorem]{fact}{Fact}{%
  225. colback=Black!4,
  226. colframe=Black,
  227. sharp corners,
  228. theorem style = break,
  229. fonttitle = \bfseries\sffamily,
  230. coltitle = Black,
  231. theorem name,
  232. separator sign dash,
  233. terminator sign none,
  234. description delimiters none,
  235. boxrule = 0pt,
  236. parbox = false,
  237. }{prop}
  238.  
  239. \newtcbtheorem{question}{Question}{%
  240. colback=Plum!12,
  241. colframe=BlueViolet!80!Black,
  242. theorem style = break,
  243. fonttitle = \bfseries\sffamily,
  244. coltitle = BlueViolet!80!Black,
  245. separator sign dash,
  246. terminator sign none,
  247. description delimiters none,
  248. boxrule = 0.8pt,
  249. theorem name,
  250. parbox = false,
  251. }{hw}
  252.  
  253. \newtcbtheorem{exercise}{Exercise}{%
  254. colback=Plum!12,
  255. colframe=BlueViolet!80!Black,
  256. theorem style = break,
  257. fonttitle = \bfseries\sffamily,
  258. coltitle = BlueViolet!80!Black,
  259. separator sign dash,
  260. terminator sign none,
  261. description delimiters none,
  262. boxrule = 0.8pt,
  263. parbox = false,
  264. }{hw}
  265.  
  266. \newtcbtheorem{hwq}{Problem}{%
  267. colback=Black!4,
  268. colframe=Black,
  269. sharp corners,
  270. theorem style = break,
  271. fonttitle = \bfseries\sffamily,
  272. coltitle = Black,
  273. separator sign none,
  274. terminator sign none,
  275. description delimiters none,
  276. boxrule = 0pt,
  277. parbox = false,
  278. }{hw}
  279.  
  280. \newtcbtheorem{hwb}{}{%
  281. colback=Black!4,
  282. colframe=Black,
  283. sharp corners,
  284. theorem style = break,
  285. fonttitle = \bfseries\sffamily,
  286. coltitle = Black,
  287. theorem name,
  288. separator sign none,
  289. terminator sign none,
  290. description delimiters none,
  291. boxrule = 0pt,
  292. parbox = false,
  293. }{hw}
  294.  
  295. \newtheorem*{claim}{Claim}
  296. \newtheorem{abuse}{Abuse of Notation}
  297.  
  298. % The following allows importation of Inkscape and similar images
  299. % Use ctrl + m + f to automatically create the \begin environment for figures
  300. % or ctrl + m + p for pngs
  301. \newcommand{\incfig}[1]{
  302. \def\svgwidth{\columnwidth}
  303. \import{/Users/0nami/Documents/Figures/}{#1.pdf_tex}
  304. }
  305.  
  306. % The following sets up the listings IDE environment
  307. \definecolor{superlightgray}{RGB}{242,242,242} % Creates background colour for code segments
  308. \lstset{frame=single,
  309. language=Python,
  310. aboveskip=3mm,
  311. belowskip=3mm,
  312. showstringspaces=false,
  313. columns=flexible,
  314. basicstyle={\small\ttfamily},
  315. numbers=left,
  316. numberstyle=\tiny\color{gray},
  317. keywordstyle=\color{PineGreen},
  318. commentstyle=\color{gray},
  319. stringstyle=\color{Fuchsia},
  320. breaklines=true,
  321. breakatwhitespace=true,
  322. backgroundcolor=\color{superlightgray},
  323. tabsize=4
  324. }
  325.  
  326. % The following establishes some text shorthands
  327. \newcommand{\defin}[1]{\textsf{\textbf{\textcolor{Cerulean!84!Black}{#1}}}} % Definitions
  328. \newcommand{\disting}[1]{\textbf{\textcolor{OliveGreen}}{#1}} % Distinguished words (green)
  329. \newcommand{\aside}[1]{\textit{\textcolor{Sepia}{#1}}} % Asides
  330. \newcommand{\code}[1]{\texttt{\textcolor{OliveGreen}{#1}}} % Code snippets (short)
  331. \newcommand{\bb}[1]{\mathbb{#1}} % Blackboard bold
  332. \newcommand{\equal}[1]{\mathrel{\overset{\makebox[0pt]{\mbox{\normalfont\tiny\sffamily\textcolor{Magenta}{#1}}}}{=}}} % Text over equality
  333. \newcommand{\hl}{\hline} % \hl for horizontal line
  334. \definecolor{LightYellow}{RGB}{255,255,212} % Defines \hw background colour
  335.  
  336. % The following sets some linear algebra shorthands
  337. \newcommand{\V}[1]{\begin{pmatrix}#1\end{pmatrix}} % \V for fast vectors
  338. \newcommand{\B}[1]{\bar{#1}} % \B for fast bars
  339. \newcommand{\M}[1]{\begin{bmatrix}#1\end{bmatrix}} % \M for fast matrices
  340. \def\<#1,#2>{\langle #1,#2 \rangle} % Allows \<a,b> for langle/rangle notation
  341.  
  342. % The following allows vertical bars in matrices
  343. \makeatletter
  344. \renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%
  345. \hskip -\arraycolsep
  346. \let\@ifnextchar\new@ifnextchar
  347. \array{#1}}
  348. \makeatother
  349.  
  350. \newcommand{\ve}{\varepsilon}
  351. \newcommand{\vp}{\varphi}
  352. \newcommand{\R}{\mathbb{R}}
  353. \newcommand{\N}{\mathbb{N}}
  354. \newcommand{\Z}{\mathbb{Z}}
  355. \newcommand{\C}{\mathbb{C}}
  356. \newcommand{\Q}{\mathbb{Q}}
  357. \newcommand{\F}{\mathbb{F}}
  358. \newcommand{\cR}{\mathcal{R}}
  359. \newcommand{\cN}{\mathcal{N}}
  360.  
  361. \newcommand{\Mod}[1]{\ (\mathrm{mod}\ #1)}
  362.  
  363. \newcommand{\eco}[3]{\begin{corollary}{#1}{#2}#3\end{corollary}}
  364. \newcommand{\ere}[3]{\begin{remark}{#1}{#2}#3\end{remark}}
  365. \newcommand{\ethr}[3]{\begin{theorem}{#1}{#2}#3\end{theorem}}
  366. \newcommand{\ede}[3]{\begin{definition}{#1}{#2}#3\end{definition}}
  367. \newcommand{\eex}[3]{\begin{example}{#1}{#2}#3\end{example}}
  368. \newcommand{\hw}[3]{\begin{homework}{#1}{#2}#3\end{homework}}
  369. \newcommand{\hws}[3]{\begin{homeworksolution}{#1}{#2}#3\end{homeworksolution}}
  370. \newcommand{\kt}[3]{\begin{keyterms}{#1}{#2}#3\end{keyterms}}
  371. \newcommand{\ehw}[3]{\begin{homework}{#1}{#2}#3\end{homework}}
  372. \newcommand{\ehws}[3]{\begin{homeworksolution}{#1}{#2}#3\end{homeworksolution}}
  373. \newcommand{\ekt}[3]{\begin{keyterms}{#1}{#2}#3\end{keyterms}}
  374. \newcommand{\efa}[3]{\begin{fact}{#1}{#2}#3\end{fact}}
  375.  
  376. #input the preamble with all the declaremathoperators
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement