I am trying to reduce the space above and below equations enclosed in \[
\]. Unfortunately I can't get
\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
\setlength{\abovedisplayshortskip}{0pt}
\setlength{\belowdisplayshortskip}{0pt}
\setlength{\parsep}{0pt}
to do this. I am using the seminar class and amsmath package with tetex.
Thanks,
Juan
Sent via Deja.com http://www.deja.com/
Before you buy.
> I am trying to reduce the space above and below equations enclosed in \[
> \]. Unfortunately I can't get
> \setlength{\abovedisplayskip}{0pt} ...
Appropriate settings are made by the size-changing commands
like \normalsize. You probably have a size setting after
you make your own settings; perhaps just \normalsize in
\begin{document}.
For a simple document, put your settings after \begin{document}.
For a document with equations in other-sized text, you can:
a) make your own document class, with appropriate size-changing
commands, or
b) redefine \selectfont:
\newcommand{\nodisplayskips}{\setlength ...}
\let\oldselectfont\selectfont
\renewcommand\selectfont{\oldselectfont \nodisplayskips}
Donald Arseneau as...@triumf.ca
>Hello,
>
>I am trying to reduce the space above and below equations enclosed in \[
>\]. Unfortunately I can't get
>\setlength{\abovedisplayskip}{0pt}
>\setlength{\belowdisplayskip}{0pt}
>\setlength{\abovedisplayshortskip}{0pt}
>\setlength{\belowdisplayshortskip}{0pt}
>\setlength{\parsep}{0pt}
>
>to do this. I am using the seminar class and amsmath package with tetex.
>
>Thanks,
>Juan
>
Juan,
Had to fix the same problem myself while preparing some camera ready
stuff that I really wanted to look good.
First of all, ``\[ \]'' is supposed to use \abovedisplayshortskip
``when appropriate,'' and, if I recall correctly
\abovedisplayshortskip is 0pt (you can check this with
\the\abovedisplayshortskip ). Unfortunately, older versions of the
amsmath package had a bug that prevented this. So the first thing I
would suggest is to get the latest amsmath package available.
Second, to adjust the \...display...skips , try redefining the lengths
within the \[ \] , e.g.,
\[
\setlength{\abovedisplayskip}{0pt}
\setlength{\belowdisplayskip}{0pt}
x = y
\]
Here's a hack I'm using to force shorter \abovedisplayskips even when
``not appropriate.'' I simply added an optional parameter to the
amsmath definition of \[ with
\[ --> default behavior of \[
\[[short] --> forces the use of \abovedisplayshortskip
\[[half] --> cuts \abovedisplayskip in half
It's not very clever, but it works. You can probably modify it to fit
your needs. (PS: As written, it assumes you are using v2 of the
amsmath package and the ifthen package. It may be wise to also
redefine the \] command as \end{equation*} just in case a later
version of amsmath changes its definition of \] .)
\DeclareRobustCommand{\[}[1][]%
{\begin{equation*}
\ifthenelse{\equal{#1}{}}%
{}%
{\ifthenelse{\equal{#1}{short}}%
{\setlength{\abovedisplayskip}{1\abovedisplayshortskip}}%
{\ifthenelse{\equal{#1}{half}}%
{\setlength{\abovedisplayskip}{.5\abovedisplayskip}}%
{[#1]}%
}}}
Good luck,
Ken