42 lines
756 B
TeX
42 lines
756 B
TeX
%%
|
|
%% 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
|
|
}
|
|
|
|
|
|
%% array spanning the entire line
|
|
\def\largearray{\begin{array}{@{}>{\displaystyle}l@{}}\hphantom{\hspace{\textwidth}}\\[-.5cm]}
|
|
\def\endlargearray{\end{array}}
|
|
|