From 383ef4949361c1107bd2c18f33ef8f280ccdc7a6 Mon Sep 17 00:00:00 2001 From: Ian Jauslin Date: Mon, 26 Oct 2015 01:07:55 +0000 Subject: Initial Commit --- toolbox.sty | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 toolbox.sty (limited to 'toolbox.sty') diff --git a/toolbox.sty b/toolbox.sty new file mode 100644 index 0000000..7f5738e --- /dev/null +++ b/toolbox.sty @@ -0,0 +1,46 @@ +%% +%% A collection of useful commands +%% + +%% can call commands even when they are not defined +\def\safe#1{% +\ifdefined#1% +#1% +\else% +{\color{red}\bf?}% +\fi% +} + + +%% 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 +} + +%% 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}} + -- cgit v1.2.3-54-g00ecf