Last active
May 12, 2019 07:41
-
-
Save jeasinema/224ce6ef72e83855dd6937714a11c9cb to your computer and use it in GitHub Desktop.
Some useful macros for writing technical papers
This file contains 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
% packages | |
\usepackage{amsmath,amsfonts,amssymb,amsthm} | |
\usepackage{hyperref} | |
\usepackage{xspace} | |
\usepackage{algorithm} | |
\usepackage{algorithmic} | |
\usepackage{color} | |
\usepackage{graphicx} | |
\usepackage{mathtools} | |
\usepackage{footmisc} | |
\usepackage{subfigure} | |
% amsthm config | |
\newtheorem{assumption}{Assumption} | |
\newtheorem{theorem}{Theorem} | |
\newtheorem{lemma}{Lemma} | |
\newtheorem{corollary}{Corollary} | |
\newtheorem{proposition}{Proposition} | |
\newtheorem{remark}{Remark} | |
\newtheorem{definition}{Definition} | |
% autoref config | |
\newcommand{\assumptionautorefname}{Assumption} | |
\newcommand{\theoremautorefname}{Theorem} | |
\newcommand{\lemmaautorefname}{Lemma} | |
\newcommand{\corollaryautorefname}{Corollary} | |
\newcommand{\propositionautorefname}{Proposition} | |
\newcommand{\remarkautorefname}{Remark} | |
\newcommand{\definitionautorefname}{Definition} | |
\newcommand{\figureautorefname}{Figure} | |
\newcommand{\subfigureautorefname}{Figure} | |
\newcommand{\tableautorefname}{Table} | |
\newcommand{\algorithmautorefname}{Algorithm} | |
\newcommand{\algorithmicautorefname}{Algorithm} | |
\newcommand{\sectionautorefname}{Section} | |
\newcommand{\subsectionautorefname}{Section} | |
\newcommand{\subsubsectionautorefname}{Section} | |
% change algorithm heading | |
\renewcommand{\algorithmicrequire}{\textbf{Input:}} | |
\renewcommand{\algorithmicensure}{\textbf{Output:}} | |
% common operators | |
\newcommand{\argmin}{\mathop{\mathrm{argmin}}} | |
\newcommand{\argmax}{\mathop{\mathrm{argmax}}} | |
% common abbreviations | |
\providecommand{\eg}{\textit{e.g.}\@\xspace} | |
\providecommand{\ie}{\textit{i.e.}\@\xspace} | |
\providecommand{\wrt}{\textit{w.r.t.}\@\xspace} | |
\providecommand{\etal}{\textit{et al}\@\xspace} | |
% extra spaces | |
\newenvironment{hproof}{ | |
\renewcommand{\proofname}{Proof (sketch)}\proof}{\endproof} | |
% reviewer tag | |
\def\mxj#1{{\color{red}{\bf [Xiaojian:} {\it{#1}}{\bf ]}}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment