From 05b32aaaea9974339f75bc0dec5be1728609a56c Mon Sep 17 00:00:00 2001 From: Hong Xu Date: Mon, 6 Aug 2018 00:57:44 -0700 Subject: [PATCH] Use \DeclarePairedDelimiter instead of \def to define ceil and floor. Using \DeclarePairedDelimiter offers much more benefit such as auto scaling of the paired operator. See https://tex.stackexchange.com/questions/94410/easily-change-behavior-of-declarepaireddelimiter for some examples. --- math_commands.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/math_commands.tex b/math_commands.tex index 0668f93..e8aa92f 100644 --- a/math_commands.tex +++ b/math_commands.tex @@ -1,6 +1,6 @@ %%%%% NEW MATH DEFINITIONS %%%%% -\usepackage{amsmath,amsfonts,bm} +\usepackage{amsmath,amsfonts,bm,mathtools} % Mark sections of captions for referring to divisions of figures \newcommand{\figleft}{{\em (Left)}} @@ -55,8 +55,8 @@ \def\Partref#1{Part~\ref{#1}} \def\twopartref#1#2{parts \ref{#1} and \ref{#2}} -\def\ceil#1{\lceil #1 \rceil} -\def\floor#1{\lfloor #1 \rfloor} +\DeclarePairedDelimiter{\ceil}{\lceil}{\rceil} +\DeclarePairedDelimiter{\floor}{\lfloor}{\rfloor} \def\1{\bm{1}} \newcommand{\train}{\mathcal{D}} \newcommand{\valid}{\mathcal{D_{\mathrm{valid}}}}