%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Generic LaTeX Template %% %% http://zs.freeshell.org/latexgeneric.tex.txt %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Note: Usage examples are preceded by double-% below %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % DOCUMENT CLASS: \documentclass[11pt,a4paper,oneside]{article} % [10pt,11pt,12pt,a4paper,letterpaper,oneside,twoside,twocolumn]{article,report,book,letter} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % GENERAL-PURPOSE VARIABLES: \newcommand\setvar[2]{\def#1{#2}} \newcommand\getvar[1]{{#1}} %% \setvar{\doctitle}{Report 123} % assign a value to a variable %% \getvar{\doctitle} % retrieve the value of a variable %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % PAGE MARGINS (ensure this is first package to load): \usepackage[left=1in,right=1in,top=.6in,bottom=0.6in,includehead,includefoot]{geometry} %[left=,right=,top=,bottom=,nohead,includehead,nofoot,includefoot] %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % TYPEFACES, FONTS & SYMBOLS: \usepackage{mathptmx} %[scaled=0.95]{mathptmx,mathpazo,helvet,avant,courier,chancery,bookman,newcent,utopia,charter,pifont} % Descriptive names for typefaces: \def\tfAvantGarde{pag} \def\tfBookman{pbk} \def\tfCharter{bch} \def\tfCourier{pcr} \def\tfHelvetica{phv} \def\tfNewCenturySchoolbook{pnc} \def\tfPalatino{ppl} \def\tfPalatinoSmallCaps{pplx} \def\tfPalatinoSmallCapsOldDigits{pplj} \def\tfTimes{ptm} \def\tfZapfChancery{pzc} \def\tfUtopia{put} \def\tfSymbol{psy} \def\tfZapfDingbats{pzd} \newcommand\setrm[1]{\renewcommand{\rmdefault}{#1}} % roman typeface \newcommand\setsf[1]{\renewcommand{\sfdefault}{#1}} % san serif typeface \newcommand\settt[1]{\renewcommand{\ttdefault}{#1}} % typewriter typeface %% \setrm{\tfPalatino} % set the roman typeface to Palatino %% \settt{\tfCourier} % set the typewriter typeface to Courier % Change footnote symbols to *, dags, etc: \renewcommand{\thefootnote}{\fnsymbol{footnote}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MATH: \usepackage{amsmath,amssymb,amstext} % Equations: \newcommand{\eqnl}[1]{\begin{equation*}{#1}\end{equation*}} % use \tag{4.2a} to assign an explicit reference \newcommand{\eq}[2]{\begin{equation}\label{#1}{#2}\end{equation}} \renewcommand{\eqref}[1]{(\ref{#1})} %% \eqnl{F_n=F_{n-1}+F_{n-2}} % insert equation without a label %% \eq{fibo}{F_n=F_{n-1}+F_{n-2}} % insert equation and assigns it a label %% \eqref{fibo} % cite the equation % Multi-line equations: \newenvironment{meqn}{\begin{array}{rrcl}}{\end{array}} \newcommand{\meqnline}[4]{\displaystyle{#1}&\displaystyle{#2}&\displaystyle{#3}&\displaystyle{#4}\\} %% \begin{meqn} %% \meqnline{ }{3x}{=}{2x+1} %% \meqnline{\Rightarrow}{ x}{=}{ 1} %% \end{meqn} % Multi-case expressions: \newenvironment{mcase}{\left\{\begin{array}{ll}}{\end{array}\right.} \newcommand{\mcaseline}[2]{\displaystyle{#1}&\displaystyle\quad{#2}\\} %% \begin{mcase} %% \mcaseline{ x}{x \geq 0} %% \mcaseline{-x}{x < 0} %% \end{mcase} % Matrices: \newcommand{\onebytwo}[2]{\ensuremath{\left[\begin{array}{cc}{#1}&{#2}\end{array}\right]}} \newcommand{\twobyone}[2]{\ensuremath{\left[\begin{array}{c}{#1}\\{#2}\end{array}\right]}} \newcommand{\twobytwo}[4]{\ensuremath{\left[\begin{array}{cc}{#1}&{#2}\\{#3}&{#4}\end{array}\right]}} %% \twobytwo{1}{0}{0}{1} % insert the identity matrix %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % HEADERS, FOOTERS AND PAGE NUMBERS: \pagestyle{plain} %{plain,empty,headings,myheadings} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} \fancyhead[LO]{\scriptsize{Left-Odd}} \fancyhead[CO]{\scriptsize{Center-Odd}} \fancyhead[RO]{\scriptsize{Right-Odd}} \fancyfoot[CO]{\small{\thepage}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % COLORS: \usepackage[usenames]{color} %% \definecolor{MyDarkBlue}{rgb}{0,0.08,0.45} %% {\color{MyDarkBlue}This text is dark blue} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % GRAPHICS AND FIGURES: \usepackage{graphicx} \newcommand{\myfig}[4]{\begin{figure}[ht]\centering\includegraphics[#4]{#1}\caption{#3\label{#2}}\end{figure}} %% \myfig{mypic.png}{fig:mypic}{This is My Picture}{width=\textwidth} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % SOURCE CODE: \newcommand{\mysourcecode}[1]{\begin{framed}\textbf{\textsf{#1}}\hrule\small\vspace{-.5em}\verbatiminput{#1}\vspace{-.5em}\end{framed}} %% \mysourcecode{helloworld.c} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % TABLES: \usepackage{multicol} \usepackage{multirow} \usepackage{tabularx} \renewcommand\arraystretch{1.2} %default=1.0 \setlength{\extrarowheight}{1.1mm} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % PARAGRAPHS: \setlength{\parskip}{0.5ex plus 0.2ex minus 0.2ex} \setlength{\parindent}{3ex} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % INDENTATION: \renewenvironment{indent} {\begin{list}{} {\setlength{\topsep}{0em} \setlength{\leftmargin}{2em} \setlength{\rightmargin}{0em} \setlength{\listparindent}{0em} \setlength{\itemindent}{0em} \setlength{\parsep}{1em plus 0.5em}} \item}{\end{list}} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % DATE AND TIME: \usepackage{datetime} \def\datetimestamp{\the\year-\the\month-\the\day~(\shortdayofweekname{\day}{\month}{\year})~\ampmtime} \usepackage{ifthen} \newcommand{\longmonth}[1]{% \ifthenelse{\equal{#1}{1}}{January}{}\ifthenelse{\equal{#1}{2}}{February}{}\ifthenelse{\equal{#1}{3}}{March}{}% \ifthenelse{\equal{#1}{4}}{April}{}\ifthenelse{\equal{#1}{5}}{May}{}\ifthenelse{\equal{#1}{6}}{June}{}% \ifthenelse{\equal{#1}{7}}{July}{}\ifthenelse{\equal{#1}{8}}{August}{}\ifthenelse{\equal{#1}{9}}{September}{}% \ifthenelse{\equal{#1}{10}}{October}{}\ifthenelse{\equal{#1}{11}}{November}{}\ifthenelse{\equal{#1}{12}}{December}{}} \newcommand{\shortmonth}[1]{% \ifthenelse{\equal{#1}{1}}{Jan}{}\ifthenelse{\equal{#1}{2}}{Feb}{}\ifthenelse{\equal{#1}{3}}{Mar}{}% \ifthenelse{\equal{#1}{4}}{Apr}{}\ifthenelse{\equal{#1}{5}}{May}{}\ifthenelse{\equal{#1}{6}}{Jun}{}% \ifthenelse{\equal{#1}{7}}{Jul}{}\ifthenelse{\equal{#1}{8}}{Aug}{}\ifthenelse{\equal{#1}{9}}{Sep}{}% \ifthenelse{\equal{#1}{10}}{Oct}{}\ifthenelse{\equal{#1}{11}}{Nov}{}\ifthenelse{\equal{#1}{12}}{Dec}{}} %% \longmonth{1} % insert "January" %% \shortmonth{1} % insert "Jan" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % PDF BOOKMARKS AND METADATA (ensure this is last package to load): \usepackage[bookmarks, bookmarksnumbered=false, bookmarksopen=false, bookmarksopenlevel={}, bookmarkstype={}, pdfpagemode={}, % None, UseOutlines, UseThumbs, FullScreen unicode=false, pdftitle={}, pdfauthor={}, pdfsubject={}, pdfcreator={}, pdfproducer={}, pdfkeywords={}, pdfpagemode=None, pdfstartview=FitH, % FitH, FitV, FitB, FitBH, FitBV breaklinks=false, colorlinks=true, linkcolor=red, % normal internal links anchorcolor=black, % for anchor text citecolor=green, % bibliographical citations in text filecolor=magenta, % URLs which open local files menucolor=red, % Acrobat menu items pagecolor=red, % links to other pages urlcolor=blue]{hyperref} %% \href{mailto:abc@email.com?subject=Hello\%20World}{abc@email.com} % insert a hyperlink %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % MISCELLANEOUS SHORTCUTS: \def\ssdB{\mathrm{dB}} \def\ds{\displaystyle} \renewcommand{\vec}[1]{\mathbf{#1}} \newcommand{\defeq}[0]{\mathrel{\mathop:}=} %%%%%%%%%%%%%%%%%%%%%%%%% %% THE ACTUAL DOCUMENT %% %%%%%%%%%%%%%%%%%%%%%%%%% \begin{document} Hello World! \end{document}