Ian Jauslin
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'toolbox.sty')
-rw-r--r--toolbox.sty13
1 files changed, 13 insertions, 0 deletions
diff --git a/toolbox.sty b/toolbox.sty
index 7f5738e..5713be0 100644
--- a/toolbox.sty
+++ b/toolbox.sty
@@ -34,6 +34,17 @@
\@beginparpenalty=\prevparpenalty
}
+%% prevent page breaks after displayed equations
+\newcount\prevpostdisplaypenalty
+\def\nopagebreakaftereq{
+ \prevpostdisplaypenalty=\postdisplaypenalty
+ \postdisplaypenalty=10000
+}
+%% back to previous value
+\def\restorepagebreakaftereq{
+ \postdisplaypenalty=\prevpostdisplaypenalty
+}
+
%% stack relations in subscript or superscript
\def\mAthop#1{\displaystyle\mathop{\scriptstyle #1}}
@@ -44,3 +55,5 @@
\def\largearray{\begin{array}{@{}>{\displaystyle}l@{}}\hphantom{\hspace{\largearray@width}}\\[-.5cm]}
\def\endlargearray{\end{array}}
+%% qedsquare
+\def\qed{\penalty10000\hfill\penalty10000$\square$}