-
Notifications
You must be signed in to change notification settings - Fork 5
/
Macros.tex
41 lines (38 loc) · 1.3 KB
/
Macros.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
%% Macros
\newcommand{\M}[1]{\ensuremath{\textit{#1}}} % \mathup
\newcommand{\imp}{\mathbin{\rightarrow}~}
\newcommand{\Imp}{\mathbin{\Rightarrow}~}
\renewcommand{\iff}{\mathbin{\leftrightarrow}}
\newcommand{\defeq}{\mathrel{\mathop:=}}
\newcommand{\dd}[2]{\ensuremath{#1_1,\dots,#1_{#2}}} % x_1,...,x_n
\newcommand{\ddd}[2]{\ensuremath{#1_1\dots\,#1_{#2}}} % x_1...x_n
\newcommand{\col}{\colon}
\newcommand{\set}[1]{\ensuremath{\{#1\}}}
\newcommand{\mset}[2]{\set{\,#1\mid#2\,}}
\newcommand{\eset}{\ensuremath{\emptyset}}
\newcommand{\incl}{\ensuremath{\subseteq}}
\newcommand{\bnfor}{~|~} %|
\newcommand{\qedsq}{\hfill\ensuremath{_\blacksquare}}
\newcommand{\blankpage}{\newpage
\thispagestyle{empty}
\mbox{}
\newpage}
\renewcommand\qed {{% set up
\parfillskip=0pt % so \par doesnt push \square to left
\widowpenalty=10000 % so we dont break the page before \square
\displaywidowpenalty=10000 % ditto
\finalhyphendemerits=0 % TeXbook exercise 14.32
%
% horizontal
\leavevmode % \nobreak means lines not pages
\unskip % remove previous space or glue
\nobreak % don't break lines
\hfil % ragged right if we spill over
\penalty50 % discouragement to do so
\hskip.2em % ensure some space
\null % anchor following \hfill
\hfill % push \square to right
$\square$% % the end-of-proof mark
%
% vertical
\par}} % build paragraph