Created
March 18, 2019 23:03
-
-
Save siddMahen/ab3e5791be066c8a2ecce9f10ccef661 to your computer and use it in GitHub Desktop.
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
% A collection of frequently used commands | |
% This file is located in ~/Library/texmf/tex/latex/common/ | |
\NeedsTeXFormat{LaTeX2e} | |
\ProvidesPackage{common}[2018/10/27 v1.0 Siddharth Mahendraker] | |
% -- Typography -- | |
\RequirePackage[utf8]{inputenc} | |
\RequirePackage{microtype} | |
\RequirePackage{parskip} | |
% -- Fonts -- | |
\RequirePackage{mathpazo} | |
%\RequirePackage{palatino} | |
\RequirePackage{eulervm} | |
\usepackage[scaled=.90]{helvet} | |
\usepackage{courier} | |
\RequirePackage[T1]{fontenc} | |
% -- Math -- | |
\RequirePackage{amsmath} | |
\RequirePackage{amssymb} | |
\RequirePackage{mathtools} | |
\RequirePackage{amsthm} | |
\RequirePackage{thmtools, thm-restate} | |
% -- Fixes amsthm error which occurs when using parskip | |
% -- See https://tex.stackexchange.com/questions/25346/wrong-spacing-before-theorem-environment-amsthm | |
\begingroup | |
\makeatletter | |
\@for\theoremstyle:=definition,remark,plain\do{% | |
\expandafter\g@addto@macro\csname th@\theoremstyle\endcsname{% | |
\addtolength\thm@preskip\parskip | |
}% | |
} | |
\endgroup | |
\declaretheorem[name=Theorem,% | |
refname={theorem,theorems},% | |
Refname={Theorem,Theorems},% | |
within=section]{theorem} | |
\declaretheorem[name=Proposition,% | |
refname={proposition,propositions},% | |
Refname={Proposition,Propositions},% | |
sibling=theorem]{proposition} | |
\declaretheorem[name=Lemma,% | |
refname={lemma,lemmas},% | |
Refname={Lemma,Lemmas},% | |
sibling=theorem]{lemma} | |
\declaretheorem[name=Definition,% | |
refname={definition,definitions},% | |
Refname={Definition,Definitions},% | |
sibling=theorem]{definition} | |
\declaretheorem[name=Corollary,% | |
refname={corollary,corollaries},% | |
Refname={Corollary,Corollaries},% | |
sibling=theorem]{corollary} | |
% -- Misc. -- | |
\RequirePackage{hyperref} | |
\RequirePackage{color} | |
\RequirePackage{array} | |
\RequirePackage{url} | |
% -- Common commands and abbreviations -- | |
\providecommand{\F}{} | |
\renewcommand{\F}{\mathbb{F}} | |
\providecommand{\Q}{} | |
\renewcommand{\Q}{\mathbb{Q}} | |
\providecommand{\C}{} | |
\renewcommand{\C}{\mathbb{C}} | |
\providecommand{\Z}{} | |
\renewcommand{\Z}{\mathbb{Z}} | |
\providecommand{\R}{} | |
\renewcommand{\R}{\mathbb{R}} | |
\providecommand{\A}{} | |
\renewcommand{\A}{\mathbb{A}} | |
\providecommand{\P}{} | |
\renewcommand{\P}{\mathbb{P}} | |
%\renewcommand{\to}{\longrightarrow} | |
\providecommand{\O}{} | |
\renewcommand{\O}{\mathcal{O}} | |
\providecommand{\p}{} | |
\renewcommand{\p}{\mathfrak{p}} | |
\providecommand{\q}{} | |
\renewcommand{\q}{\mathfrak{q}} | |
\DeclareMathOperator{\x}{\times} | |
\DeclareMathOperator{\tr}{tr} | |
\DeclareMathOperator{\ind}{Ind} | |
\DeclareMathOperator{\im}{im} | |
\newcommand{\mat}[4]{% | |
\bigl( | |
\begin{smallmatrix} | |
#1 \\% | |
#3 | |
\end{smallmatrix} | |
\bigr)} | |
\newcommand{\Mat}[4]{% | |
\begin{pmatrix} | |
#1 & #2 \\% | |
#3 & #4 | |
\end{pmatrix}} | |
\newcommand{\legendre}[2]{\genfrac{(}{)}{}{}{#1}{#2}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment