|
| 1 | +\RequirePackage[l2tabu, orthodox]{nag} |
| 2 | +%\documentclass{article} |
| 3 | + |
| 4 | +\usepackage[left=1.in, right=1.in, top=1.25in, bottom=1.25in]{geometry} |
| 5 | + |
| 6 | +% FONTS |
| 7 | +%\usepackage[T1]{fontenc} |
| 8 | + |
| 9 | +% Replace default Latin Modern typewriter with its proportional counterpart |
| 10 | +% http://www.tug.dk/FontCatalogue/lmoderntypewriterprop/ |
| 11 | +%\renewcommand*\ttdefault{lmvtt} |
| 12 | + |
| 13 | + |
| 14 | +%%% OPTION 1 - Fourier Math + New Century Schoolbook + ParaType Sans |
| 15 | + |
| 16 | +% % Import Fourier Math (this imposes its own New Century Schoolbook type) |
| 17 | +% % http://www.ctan.org/tex-archive/fonts/fouriernc/ |
| 18 | +%\usepackage{fouriernc} |
| 19 | +%\usepackage{amsmath} |
| 20 | +% % Replace with TeX Gyre Schola version of New Century Schoolbook (must scale!) |
| 21 | +% % http://www.tug.dk/FontCatalogue/tgschola/ |
| 22 | +%\usepackage[scale=0.92]{tgschola} |
| 23 | +%\usepackage[scaled=0.88]{PTSans} |
| 24 | + |
| 25 | +%% OPTION 2 - MathDesign Math + Bitstream Charter + ParaType Sans |
| 26 | + |
| 27 | +% Import MathDesign (this brings along Bitstream Charter) |
| 28 | +% http://www.ctan.org/tex-archive/fonts/mathdesign/ |
| 29 | +\usepackage[bitstream-charter]{mathdesign} |
| 30 | +\usepackage{amsmath} |
| 31 | +\usepackage[scaled=0.92]{PTSans} |
| 32 | + |
| 33 | + |
| 34 | +% %%% OPTION 3 - MTPRO 2 Math + Termes Times + ParaType Sans |
| 35 | + |
| 36 | +% \usepackage{tgtermes} |
| 37 | +% \usepackage{amsmath} |
| 38 | +% \usepackage[subscriptcorrection, |
| 39 | +% amssymbols, |
| 40 | +% mtpbb, |
| 41 | +% mtpcal, |
| 42 | +% nofontinfo % suppresses all warnings |
| 43 | +% ]{mtpro2} |
| 44 | +% \usepackage{scalefnt,letltxmacro} |
| 45 | +% \LetLtxMacro{\oldtextsc}{\textsc} |
| 46 | +% \renewcommand{\textsc}[1]{\oldtextsc{\scalefont{1.10}#1}} |
| 47 | +% \usepackage[scaled=0.92]{PTSans} |
| 48 | + |
| 49 | +% Use default fonts here |
| 50 | +% \usepackage{amsmath} |
| 51 | +% \usepackage{amssymb} |
| 52 | +\usepackage{xfrac} |
| 53 | + |
| 54 | +\usepackage{titling} |
| 55 | + |
| 56 | +% COLOR |
| 57 | +\usepackage[table,usenames,dvipsnames]{xcolor} |
| 58 | +\definecolor{shadecolor}{gray}{0.9} |
| 59 | + |
| 60 | +% SPACING and TEXT |
| 61 | +\usepackage[final,expansion=alltext]{microtype} |
| 62 | +\usepackage[english]{babel} |
| 63 | +\usepackage[parfill]{parskip} |
| 64 | +\usepackage{afterpage} |
| 65 | +\usepackage{framed} |
| 66 | +\usepackage{verbatim} |
| 67 | +\usepackage{setspace} |
| 68 | + |
| 69 | +%redefine the leftbar environment to accept a width and coloring options |
| 70 | +\renewenvironment{leftbar}[1][\hsize] |
| 71 | +{% |
| 72 | + \def\FrameCommand |
| 73 | + {% |
| 74 | + {\color{Gray}\vrule width 3pt}% |
| 75 | + \hspace{10pt}% |
| 76 | + %\hspace{0pt}\fboxsep=\FrameSep\colorbox{black!10}% |
| 77 | + }% |
| 78 | + \MakeFramed{\hsize#1\advance\hsize-\width\FrameRestore}% |
| 79 | +}% |
| 80 | +{\endMakeFramed} |
| 81 | + |
| 82 | +% define a paragraph header function |
| 83 | +\DeclareRobustCommand{\parhead}[1]{\textbf{#1}~} |
| 84 | + |
| 85 | +% EDITING |
| 86 | +% line numbering in left margin |
| 87 | +\usepackage{lineno} |
| 88 | +\renewcommand\linenumberfont{\normalfont |
| 89 | + \footnotesize |
| 90 | + \sffamily |
| 91 | + \color{SkyBlue}} |
| 92 | +% ragged paragraphs in right margin |
| 93 | +\usepackage{ragged2e} |
| 94 | +\DeclareRobustCommand{\sidenote}[1]{\marginpar{ |
| 95 | + \RaggedRight |
| 96 | + \textcolor{Plum}{\textsf{#1}}}} |
| 97 | +% paragraph counter in right margin |
| 98 | +\newcommand{\parnum}{\bfseries\P\arabic{parcount}} |
| 99 | +\newcounter{parcount} |
| 100 | +\newcommand\p{% |
| 101 | + \stepcounter{parcount}% |
| 102 | + \leavevmode\marginpar[\hfill\parnum]{\parnum}% |
| 103 | +} |
| 104 | +% paragraph helper |
| 105 | +%\DeclareRobustCommand{\PP}{\textcolor{Plum}{\P} } |
| 106 | + |
| 107 | +% \usepackage[bottom]{footmisc} |
| 108 | +\usepackage[symbol]{footmisc} |
| 109 | +\renewcommand{\thefootnote}{\arabic{footnote}} |
| 110 | + |
| 111 | +% COUNTERS |
| 112 | +\usepackage[inline]{enumitem} |
| 113 | +\renewcommand{\labelenumi}{\color{black!67}{\arabic{enumi}.}} |
| 114 | +\renewcommand{\labelenumii}{{\color{black!67}(\alph{enumii})}} |
| 115 | +\renewcommand{\labelitemi}{{\color{black!67}\textbullet}} |
| 116 | + |
| 117 | +% FIGURES |
| 118 | +\usepackage{graphicx} |
| 119 | +\usepackage[labelfont={it, small}, font=small]{caption} |
| 120 | +\usepackage[format=hang]{subcaption} |
| 121 | +% \usepackage{ccaption} |
| 122 | + |
| 123 | +% APPENDIX FIGURES |
| 124 | +\usepackage{chngcntr} |
| 125 | + |
| 126 | +% TABLES |
| 127 | +\usepackage{booktabs} |
| 128 | +\usepackage{longtable} |
| 129 | +\usepackage{hhline} |
| 130 | + |
| 131 | +% ALGORITHMS |
| 132 | +\usepackage[algoruled]{algorithm2e} |
| 133 | +\usepackage{listings} |
| 134 | +\usepackage{fancyvrb} |
| 135 | +\fvset{fontsize=\normalsize} |
| 136 | + |
| 137 | +% THEOREMS |
| 138 | +\usepackage{amsthm} |
| 139 | +\newtheorem{proposition}{Proposition} |
| 140 | +\newtheorem{lemma}{Lemma} |
| 141 | + |
| 142 | +% BIBLIOGRAPHY |
| 143 | +\usepackage[numbers]{natbib} |
| 144 | + |
| 145 | +% HYPERREF |
| 146 | +\usepackage[colorlinks,linktoc=all]{hyperref} |
| 147 | +\usepackage[all]{hypcap} |
| 148 | +\hypersetup{citecolor=MidnightBlue} |
| 149 | +\hypersetup{linkcolor=black} |
| 150 | +\hypersetup{urlcolor=MidnightBlue} |
| 151 | + |
| 152 | +% CLEVEREF must come after HYPERREF |
| 153 | +\usepackage[nameinlink]{cleveref} |
| 154 | + |
| 155 | +% ACRONYMS |
| 156 | +\usepackage[acronym,smallcaps,nowarn]{glossaries} |
| 157 | +% \makeglossaries |
| 158 | + |
| 159 | +% COLOR DEFINITIONS |
| 160 | +\newcommand{\red}[1]{\textcolor{BrickRed}{#1}} |
| 161 | +\newcommand{\orange}[1]{\textcolor{BurntOrange}{#1}} |
| 162 | +\newcommand{\green}[1]{\textcolor{OliveGreen}{#1}} |
| 163 | +\newcommand{\blue}[1]{\textcolor{MidnightBlue}{#1}} |
| 164 | +\newcommand{\gray}[1]{\textcolor{black!60}{#1}} |
| 165 | + |
| 166 | +% LISTINGS DEFINTIONS |
| 167 | +\lstdefinestyle{mystyle}{ |
| 168 | + commentstyle=\color{OliveGreen}, |
| 169 | + keywordstyle=\color{BurntOrange}, |
| 170 | + numberstyle=\tiny\color{black!60}, |
| 171 | + stringstyle=\color{MidnightBlue}, |
| 172 | + basicstyle=\ttfamily, |
| 173 | + breakatwhitespace=false, |
| 174 | + breaklines=true, |
| 175 | + captionpos=b, |
| 176 | + keepspaces=true, |
| 177 | + numbers=left, |
| 178 | + numbersep=5pt, |
| 179 | + showspaces=false, |
| 180 | + showstringspaces=false, |
| 181 | + showtabs=false, |
| 182 | + tabsize=2 |
| 183 | +} |
| 184 | +\lstset{style=mystyle} |
| 185 | + |
| 186 | +\usepackage[colorinlistoftodos, |
| 187 | + prependcaption, |
| 188 | + textsize=small, |
| 189 | + backgroundcolor=yellow, |
| 190 | + linecolor=lightgray, |
| 191 | + bordercolor=lightgray]{todonotes} |
| 192 | + |
| 193 | + |
| 194 | +% Define an environment for solutions |
| 195 | +\newenvironment{solution} |
| 196 | + { |
| 197 | + \color{MidnightBlue} |
| 198 | + \noindent\textbf{Solution:} |
| 199 | + } |
| 200 | + { |
| 201 | + \newpage |
| 202 | + } |
| 203 | +%-------------------------------------------------- |
0 commit comments