ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Troy Henderson <thenders@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: \abovedisplayskip and \belowdisplayskip
Date: Thu, 6 Sep 2012 21:54:31 -0500	[thread overview]
Message-ID: <CAFP+xFKxib26oZcSkbZAi2Wn6kwEfs1gd6yS8i2rwX6uNcjUzw@mail.gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1133 bytes --]

It is my understanding that \abovedisplayskip and \belowdisplayskip should
adjust how much (rubber) spacing that is allowed between display math
formulas.  I have attached a ConTeXt file (bug.tex) that seems to indicate
that setting these skips does not affect this (rubber) spacing.  I have
also translated this ConTeXt file line-by-line to a LaTeX file (bug.ltx)
and attached it.

Both files produce a PDF (using `context bug.tex` and `pdflatex bug.ltx`)
in which the spacing between the formula changes from page 1 to page 2
simply by adding the final formula.  However, by changing \adjustdisplay{0}
to \adjustdisplay{1}, the LaTeX file produces a 3 page document where the
spacing between formula does not change (as expected) on the first two
pages and thus requires a third page to typeset the final formula.
However, making this same adjustment in the ConTeXt file does not seem to
affect the output.

I would appreciate any thoughts as to why this is happening, and I would
equally appreciate a solution to keeping the spacing the same in the
ConTeXt file and thus bumping that last formula to a third page.

Troy Henderson

[-- Attachment #1.2: Type: text/html, Size: 1162 bytes --]

[-- Attachment #2: bug.tex --]
[-- Type: application/x-tex, Size: 769 bytes --]

[-- Attachment #3: bug.ltx --]
[-- Type: text/x-tex, Size: 660 bytes --]

\documentclass{minimal}
\usepackage[paperwidth=600pt,paperheight=450pt]{geometry}

\def\adjustdisplay#1 {
	\ifnum#1>0
		\newdimen\mydimen
		\mydimen\abovedisplayskip \abovedisplayskip\mydimen
		\mydimen\belowdisplayskip \belowdisplayskip\mydimen
	\fi
}

\def\foo{
	\vskip0.5ex
	\[\frac{x}{1} = \frac{1}{x-1}\]
	\vskip0.5ex
	\[x(x-1)=1\]
	\vskip0.5ex
	\[x^2-x=1\]
	\vskip0.5ex
	\[x^2-x-1=0\]
	\vskip0.5ex
	\[x=\frac{1+\sqrt{5}}{2},\frac{1-\sqrt{5}}{2}\]
}

\begin{document}

	\pagestyle{empty}
	\fontsize{20}{24}\selectfont
	\adjustdisplay{0}

	\foo

	\clearpage

	\foo\vskip0.5ex
	\[\phi = \frac{x}{1} = x =\frac{1+\sqrt{5}}{2} \approx 1.618\]

\end{document}

[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

             reply	other threads:[~2012-09-07  2:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-07  2:54 Troy Henderson [this message]
2012-09-07  3:13 ` Aditya Mahajan
2012-09-07  4:17   ` Troy Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFP+xFKxib26oZcSkbZAi2Wn6kwEfs1gd6yS8i2rwX6uNcjUzw@mail.gmail.com \
    --to=thenders@gmail.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).