Skip to content

Instantly share code, notes, and snippets.

@elclanrs
Last active August 29, 2015 14:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elclanrs/d2ede3ebdd798f710b57 to your computer and use it in GitHub Desktop.
Save elclanrs/d2ede3ebdd798f710b57 to your computer and use it in GitHub Desktop.
\documentclass[oneside,12pt]{article}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{
listings,titlesec,sectsty,setspace,caption,
enumerate,tabularx,
graphicx,fancyhdr,framed,
microtype,ragged2e,
}
% Fonts
\usepackage[utf8x]{inputenc}
\usepackage{libertine}
\usepackage{XCharter}
\usepackage[defaultmono]{droidmono}
\allsectionsfont{\bfseries\sffamily}
\setstretch{1.0}
% Colors
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
\definecolor{azure}{rgb}{.94,1.0,1.0}
\definecolor{denim}{rgb}{.08,.38,.74}
\definecolor{lightgray}{rgb}{.9,.9,.9}
\definecolor{darkgray}{rgb}{.4,.4,.4}
\definecolor{darkergray}{rgb}{.15,.15,.15}
\definecolor{mauve}{rgb}{.58,0,.82}
\definecolor{brightgreen}{rgb}{0,.6,0}
% Links
\usepackage[colorlinks,linkcolor=denim,urlcolor=denim]{hyperref}
\usepackage[all]{hypcap}
\urlstyle{sf}
% Code
\lstdefinelanguage{js}{
keywords={typeof, new, true, false, catch, function, return, null, catch, switch, var, if, in, while, do, else, case, break},
keywordstyle=\color{blue}\bfseries,
ndkeywords={class, export, boolean, throw, implements, import, this},
ndkeywordstyle=\color{mauve}\bfseries,
identifierstyle=\color{darkergray},
sensitive=false,
comment=[l]{//},
morecomment=[s]{/*}{*/},
commentstyle=\color{gray}\ttfamily,
stringstyle=\color{brightgreen}\ttfamily,
morestring=[b]',
morestring=[b]"
}
\lstset{
language=js,
extendedchars=true,
basicstyle=\small\ttfamily,
showstringspaces=false,
showspaces=false,
numbers=left,
numberstyle=\small\ttfamily\color{gray},
tabsize=2,
breaklines=true,
showtabs=false,
captionpos=b
}
% Document
\fancypagestyle{plain}{
\renewcommand{\headrulewidth}{0pt}
\setlength{\headheight}{20pt}
\lhead{\includegraphics[width=2in]{logo.png}}
\chead{}
\rhead{\raisebox{4pt}{\footnotesize\textsc{\color{gray}{title}}}}
\fancyfoot[C]{\textcolor{gray}{\thepage}}
}
\pagestyle{plain}
\color{darkergray}
\captionsetup{labelfont=bf}
\begin{document}
% Title
\title{\huge\bfseries\sffamily{The Title}}
\author{The Author}
\date{\today}
\maketitle
% TOC
\setcounter{tocdepth}{2}
\tableofcontents
\newpage
\end{document}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment