Skip to content

Instantly share code, notes, and snippets.

@aixnr aixnr/common.sty
Last active Jul 11, 2019

Embed
What would you like to do?
% Required Packages
\usepackage[utf8]{inputenc}
\usepackage[letterpaper, left=0.7in, right=0.7in, top=0.5in, bottom=0.5in]{geometry}
\usepackage{parskip} % disable the new paragraph indent
\usepackage{enumitem} % somehow fixes the linespacing for numbering
\usepackage[dvipsnames]{xcolor} % enable color
\usepackage[none]{hyphenat} % disable hyphenation, might clash with other package
\usepackage[document]{ragged2e} % don't justify text
\usepackage{gensymb} % for generic degree commands
\usepackage{amssymb} % more fancy arrows
\usepackage{graphicx} % for adding images
\usepackage{float} % to properly float image without causing a war
\usepackage[font=small,skip=0pt]{caption} % required to better style the caption
\usepackage{hyperref} % to allow hyperlink in document
\usepackage{lmodern} % avoid font-size issue with Latin Modern font
\usepackage[T1]{fontenc} % enable a proper font encoding (8 bit, 256 glyphs)
% Overriding Defaults
\renewcommand{\familydefault}{\sfdefault} % Sans Serif as the default font-family
\renewcommand{\baselinestretch}{1.25} % use 1.25 line-spacing
\pagenumbering{gobble} % turn off page numbering
\graphicspath{{./images/}} % define the path for images
\renewcommand\textbullet{\ensuremath{\bullet}} % stop nagging about font size for bullet point
\captionsetup[figure]{font=small,skip=5pt} % required to better style the caption
\hypersetup{colorlinks=true, linkcolor=blue, urlcolor=blue, citecolor=blue}
\newcommand{\bi}{\begin{itemize}[noitemsep, topsep=0pt]} % itemize with noitemsep
\newcommand{\ei}{\end{itemize}}
\newcommand{\be}{\begin{enumerate}[noitemsep, topsep=0pt]} % enumerate with noitemsep
\newcommand{\ee}{\end{enumerate}}
% Custom Shortcuts
\newcommand{\tred}{\textcolor{red}}
\newcommand{\tpurple}{\textcolor{Fuchsia}}
\newcommand{\tcyan}{\textcolor{cyan}}
\newcommand{\tsup}{\textsuperscript}
\newcommand{\tsub}{\textsubscript}
\newcommand{\pUpDown}{$\downharpoonleft$$\upharpoonright$}
% Colorboxes
\newcommand{\boxorange}[1]{\colorbox{orange}{\textcolor{white}{\textbf{#1}}}}
\newcommand{\boxred}[1]{\colorbox{red}{\textcolor{white}{\textbf{#1}}}}
\newcommand{\boxblack}[1]{\colorbox{black}{\textcolor{white}{\textbf{#1}}}}
\newcommand{\boxblue}[1]{\colorbox{cyan}{\textcolor{white}{\textbf{#1}}}}
% Simplified Units & Symbols
\newcommand{\ul}{$\mu$l} % define microliter
\newcommand{\ug}{$\mu$g} % define microgram
\newcommand{\uM}{$\mu$M} % define micromolar
\newcommand{\um}{$\mu$m} % define micron
\newcommand{\dg}{$\degree$} % define degree
\newcommand{\X}{$\times$} % define multiplication
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.