From cf851af1ed8aa38c1a1ffd9d69e512b9d831cfcc Mon Sep 17 00:00:00 2001 From: Hong Xu Date: Tue, 7 Aug 2018 11:23:02 -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 | 4 ++-- notation_example.tex | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/math_commands.tex b/math_commands.tex index da669ee..477f790 100644 --- a/math_commands.tex +++ b/math_commands.tex @@ -53,8 +53,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}}}} diff --git a/notation_example.tex b/notation_example.tex index 3b9928f..207cb80 100644 --- a/notation_example.tex +++ b/notation_example.tex @@ -42,6 +42,7 @@ \usepackage{multirow} \usepackage{colortbl} \usepackage{booktabs} +\usepackage{mathtools} % This allows us to cite chapters by name, which was useful for making the % acknowledgements page \usepackage{nameref}