Last active
April 16, 2019 13:29
-
-
Save nicholastay/58fb84ddae682719e409d6cbdb424053 to your computer and use it in GitHub Desktop.
My fairly basic math template for LaTeX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
% Document metadata - set here | |
\newcommand{\metatitle}{<++>} | |
\newcommand{\shorttitle}{<++>} | |
\newcommand{\metaauthor}{Tay, Nicholas} | |
\newcommand{\metaemail}{<++>} | |
\newcommand{\metadate}{<++>} | |
% ------------------- Preamble -------------------- | |
\usepackage[a4paper, margin=2cm, top=3cm, bottom=2cm]{geometry} % A4 paper with my standard margins | |
\usepackage{amsmath} | |
\usepackage{amssymb} | |
\usepackage{mathtools} | |
\usepackage{fancyhdr} | |
\usepackage[shortlabels]{enumitem} | |
%\usepackage{amsthm} | |
%\usepackage{framed} | |
%\usepackage{float} | |
%\usepackage{tikz} | |
%\usepackage{pgfplots} | |
\usepackage[parfill]{parskip} | |
% PDF data + hyperref | |
\usepackage[pdftex, pdfauthor={\metaauthor{} <\metaemail{}>}, pdftitle={\metatitle{}}]{hyperref} | |
% Title | |
\title{\metatitle{}} | |
\author{\metaauthor \\ \href{mailto:\metaemail{}}{\small \textit{\metaemail{}}}} | |
\date{\metadate{}} | |
% Header settings | |
\pagestyle{fancy} | |
\fancyhf{} | |
\lhead{\shorttitle{}} | |
\rhead{\metaauthor{}} | |
\cfoot{\thepage} | |
% Math macros | |
% absolute val | |
\DeclarePairedDelimiter\abs{\lvert}{\rvert} | |
% vectors - use bold, \veca is the old one | |
\let\veca\vec | |
\renewcommand{\vec}[1]{\mathbf{#1}} | |
% more shortcuts | |
\newcommand{\Real}{\mathbb{R}} | |
% ------------------- End Preamble -------------------- | |
\begin{document} | |
\maketitle | |
<++> | |
\end{document} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass{article} | |
% Document metadata | |
\newcommand{\metatitle}{<++>} | |
\newcommand{\shorttitle}{<++>} | |
\newcommand{\metaauthor}{Nicholas Tay} | |
\newcommand{\metaemail}{<++>} | |
\newcommand{\metadate}{<++>} | |
% Slight modification of my standard math.tex for just homework-like stuff | |
% ------------------- Preamble -------------------- | |
\usepackage[a4paper, margin=2cm, top=3cm, bottom=2cm]{geometry} % A4 paper with my standard margins | |
\usepackage{amsmath} | |
\usepackage{amssymb} | |
\usepackage{mathtools} | |
\usepackage{fancyhdr} | |
\usepackage[shortlabels]{enumitem} | |
%\usepackage{amsthm} | |
%\usepackage{cancel} | |
\usepackage[parfill]{parskip} | |
% PDF data + hyperref | |
\usepackage[pdftex, pdfauthor={\metaauthor{} <\metaemail{}>}, pdftitle={\metatitle{}}]{hyperref} | |
% Header settings | |
\pagestyle{fancy} | |
\fancyhf{} | |
\lhead{\metaauthor{}} | |
\chead{\shorttitle{}} | |
\rhead{\metadate{}} | |
\cfoot{\thepage} | |
% Math macros | |
\DeclarePairedDelimiter\abs{\lvert}{\rvert} | |
% vectors - use bold, \veca is the old one | |
\let\veca\vec | |
\renewcommand{\vec}[1]{\mathbf{#1}} | |
% more shortcuts | |
\newcommand{\Real}{\mathbb{R}} | |
\newcommand{\Nat}{\mathbb{N}} | |
\newcommand{\calP}{\mathcal{P}} | |
\newcommand{\T}{\text{\textsf{T}}} | |
\newcommand{\F}{\text{\textsf{F}}} | |
% ------------------- End Preamble -------------------- | |
\begin{document} | |
\thispagestyle{empty} | |
\begin{center} | |
\Large{\textbf{\metatitle{}}} \\ \large{\metaauthor{} \\ \href{mailto:\metaemail{}}{\small \textit{\metaemail{}}} \\ \metadate{}} | |
\end{center} | |
<++> | |
\end{document} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment