From fa9b6f2b9bcb80778e63ef2aa4e17c7573de0015 Mon Sep 17 00:00:00 2001
From: Ian Jauslin <ian.jauslin@roma1.infn.it>
Date: Tue, 24 May 2016 13:39:23 +0000
Subject: Initial commit

---
 doc/hhtop-doc/src/toolbox.sty | 50 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 doc/hhtop-doc/src/toolbox.sty

(limited to 'doc/hhtop-doc/src/toolbox.sty')

diff --git a/doc/hhtop-doc/src/toolbox.sty b/doc/hhtop-doc/src/toolbox.sty
new file mode 100644
index 0000000..c606711
--- /dev/null
+++ b/doc/hhtop-doc/src/toolbox.sty
@@ -0,0 +1,50 @@
+%%
+%% A collection of useful commands
+%%
+
+
+%% larger skip
+\newskip\hugeskipamount
+  \hugeskipamount=24pt plus8pt minus8pt
+\def\hugeskip{\vskip\hugeskipamount}
+
+
+%% penalty before large blocks
+\def\preblock{
+  \penalty-500
+}
+
+%% listparpenalty prevents page breaks before lists
+\newcount\prevparpenalty
+\def\listparpenalty{
+  \prevparpenalty=\@beginparpenalty
+  \@beginparpenalty=10000
+}
+%% back to previous value
+\def\unlistparpenalty{
+  \@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}}
+
+%% array spanning the entire line
+\newlength\largearray@width
+\setlength\largearray@width\textwidth
+\addtolength\largearray@width{-10pt}
+\def\largearray{\begin{array}{@{}>{\displaystyle}l@{}}\hphantom{\hspace{\largearray@width}}\\[-.5cm]}
+\def\endlargearray{\end{array}}
+
+%% qedsquare
+\def\qed{\penalty10000\hfill\penalty10000$\square$}
-- 
cgit v1.2.3-70-g09d2

