Skip to content

Instantly share code, notes, and snippets.

@dongkwan-kim
Created October 4, 2021 08:51
Show Gist options
  • Save dongkwan-kim/18c7eed501cf3f5722200f44a5090aca to your computer and use it in GitHub Desktop.
Save dongkwan-kim/18c7eed501cf3f5722200f44a5090aca to your computer and use it in GitHub Desktop.
My LaTeX patterns
\newcommand\todo[1]{\textcolor{red}{#1}}
\newcommand\g[1]{\textcolor{gray}{#1}}
\newcommand*{\scale}[2][4]{\scalebox{#1}{$#2$}}%
\newcommand*{\resize}[2]{\resizebox{#1}{!}{$#2$}}%
\newcommand\ko[1]{
\begin{CJK}{UTF8}{} % require \usepackage{CJKutf8}
\CJKfamily{mj}
#1
\end{CJK}
}
\newcommand{\comment}[1]{}
\newcommand{\pvalue}[0]{\textit{p}-value}
\newcommand{\ttest}[0]{\textit{t}-test}
\newcommand{\MLP}[0]{\mathrm{MLP}}
\newcommand{\Transformer}[0]{\mathrm{Transformer}}
\newcommand{\BiMLP}[0]{\mathrm{Bi-MLP}}
\newcommand{\PE}[0]{\mathrm{PE}}
\newcommand{\idx}[0]{\texttt{idx}}
\newcommand{\topk}[0]{\mathrm{top}_k}
\newcommand{\where}[0]{\mathrm{where}}
\newcommand{\textor}[0]{\textrm{or}}
\newcommand{\cat}[0]{\mathbin\Vert}
\newcommand{\khop}[0]{k\text{-hop}}
\newcommand{\vscore}[0]{\overrightarrow{\textrm{score}}}
% table color
\usepackage{xcolor}
\usepackage{colortbl}
\usepackage{soul}
\definecolor{weakgray}{HTML}{e7e7e7}
\definecolor{weakblue}{HTML}{E3F2FD}
\definecolor{weakred}{HTML}{FFEBEE}
\definecolor{midblue}{HTML}{bbdefb}
\definecolor{midred}{HTML}{ffcdd2}
\newcommand\cellwg{\cellcolor{weakgray}}
\newcommand\cellwb{\cellcolor{weakblue}}
\newcommand\cellwr{\cellcolor{weakred}}
\newcommand\cellmb{\cellcolor{midblue}}
\newcommand\cellmr{\cellcolor{midred}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment