-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Separate style/shortcuts into class and package
- Loading branch information
Showing
5 changed files
with
71 additions
and
53 deletions.
There are no files selected for viewing
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
Binary file not shown.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
% Required for TeX packages | ||
\NeedsTeXFormat{LaTeX2e} | ||
\ProvidesPackage{hw-shortcuts}[2020/03/27 Custom homework shortcuts as a package] | ||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
% Custom commands -- math symbols and math shortcuts | ||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
% Shortcuts for left/right parentheses, square brackets, and curly braces | ||
\newcommand{\lrp}[1]{\left( #1 \right)} | ||
\newcommand{\lrs}[1]{\left[ #1 \right]} | ||
\newcommand{\lrc}[1]{\left{ #1 \right}} | ||
|
||
% Commonly-used sets | ||
\newcommand{\N}{\ensuremath{\mathbb{N}}} | ||
\newcommand{\Z}{\ensuremath{\mathbb{Z}}} | ||
\newcommand{\R}{\ensuremath{\mathbb{R}}} | ||
\newcommand{\Q}{\ensuremath{\mathbb{Q}}} | ||
\newcommand{\C}{\ensuremath{\mathbb{C}}} | ||
|
||
% Powerset and shortcut for derivative | ||
\newcommand{\powerset}{\ensuremath{\mathcal{P}}} | ||
\newcommand{\ddx}{\ensuremath{\frac{d}{dx}}} | ||
|
||
% Probability measure, expectation, and variance formatting | ||
\newcommand{\expect}[1]{\mathbb{E}\left[ #1 \right]} | ||
\newcommand{\prob}[1]{\mathbb{P}\left[ #1 \right]} | ||
\newcommand{\var}[1]{\mathrm{var}\left( #1 \right)} | ||
|
||
% Commonly-used computer science languages | ||
\renewcommand{\P}{\ensuremath{\mathsf{P}}} | ||
\newcommand{\NP}{\ensuremath{\mathsf{NP}}} | ||
\newcommand{\coNP}{\ensuremath{\mathsf{coNP}}} | ||
|
||
% Commonly-used reductions add semantic clarity | ||
\newcommand{\CookReducesTo}{\ensuremath{\leq^P_T}} | ||
\newcommand{\KarpReducesTo}{\ensuremath{\leq^P_m}} |