My LaTex Header

I want to share my commonly used latex header here. It is not a template, basically it is only a collection of packages which is useful (at least in my mind).

This header is for my personal use: writing something like homework, course notes, technique reports or resume, and so on. For academic paper we will have the IEEE or ACM template (.sty files), but these packages can still be used for adjusting the display style (although it is not recommended to do that).

Note that you might need to manually update your packages since some of the following packages are not installed by default.


\documentclass[10pt]{article}

\usepackage[english]{babel}
% commonly used package for math equations, figures, and colored display
\usepackage{amsmath,graphicx,amssymb,amsfonts,subfigure,flafter,float,framed,color}
\usepackage{algorithmic}
\usepackage{multicol}

% change page margin
\usepackage[top=1.2in, bottom=0.8in, left=0.8in, right=0.8in]{geometry}

% change the font 
\usepackage[T1]{fontenc}
\usepackage{bera}
\usepackage{sectsty}
\allsectionsfont{\usefont{T1}{pbk}{b}{sc}\selectfont}

% enumitem package sets the indent and margin between items
\usepackage{enumitem}
\setlist{nolistsep}
\setlist[itemize]{leftmargin=2em}

% change the style of page header and page footer
\usepackage{fancyhdr}
\pagestyle{fancy}
\lhead{Name}
\rhead{Date}
\chead{Other Description}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}

% change margin, line spacing and other parameters
\renewcommand{\baselinestretch}{1.25}
\setlength{\parskip}{0.25em}
\setlength{\headheight}{12.5pt}
\setlength{\parindent}{0pt}

% add color 
\definecolor{shadecolor}{gray}{0.9}

% simplify commonly used commands
\newcommand{\mb}{\mathbf}
\newcommand{\mr}{\mathrm}
\newcommand{\vc}{\vspace{1em}}
\newcommand{\vq}{\vc\hrulefill\vc}
\newcommand{\tb}{\textbf}

\begin{document}

\end{document}

Comments

Popular posts from this blog

Maximum Gap

[ITint5] Maximum Subarray for a Circular Array

[CC150] Chapter 4 Trees and Graphs