How to determine where I am on a page.

2010-01-25 Thread Philip Stubbs
I have hacked up my own class file. It does 95% of what I set out to achieve. However, I am stuck with the final bit of polish. I have an element that I don't want to appear at the bottom of a page. Therefore, I need to test to find out how far down the page I am, and if more than 75% of the page

Re: How to determine where I am on a page.

2010-01-25 Thread Jürgen Spitzmüller
Philip Stubbs wrote: I have an element that I don't want to appear at the bottom of a page. Therefore, I need to test to find out how far down the page I am, and if more than 75% of the page is used, insert a \newpage. One possibility:

Re: How to determine where I am on a page.

2010-01-25 Thread rgheck
On 01/25/2010 04:52 AM, Jürgen Spitzmüller wrote: % Conditional pagebreak \def\condbreak#1{% \vskip 0pt plus #1\pagebreak[3]\vskip 0pt plus -#1\relax} As a related question: What does \relax do, and when does one need it? rh

Re: How to determine where I am on a page.

2010-01-25 Thread Jürgen Spitzmüller
rgheck wrote: As a related question: What does \relax do, and when does one need it? http://en.wikibooks.org/wiki/TeX/relax Note, though, that the \condbreak macro is not my doing. I've picked it up eventually on comp.text.tex. Jürgen

Re: How to determine where I am on a page.

2010-01-25 Thread rgheck
On 01/25/2010 07:59 AM, Jürgen Spitzmüller wrote: rgheck wrote: As a related question: What does \relax do, and when does one need it? http://en.wikibooks.org/wiki/TeX/relax Thanks. I thought it must be something like that. rh

How to determine where I am on a page.

2010-01-25 Thread Philip Stubbs
I have hacked up my own class file. It does 95% of what I set out to achieve. However, I am stuck with the final bit of polish. I have an element that I don't want to appear at the bottom of a page. Therefore, I need to test to find out how far down the page I am, and if more than 75% of the page

Re: How to determine where I am on a page.

2010-01-25 Thread Jürgen Spitzmüller
Philip Stubbs wrote: I have an element that I don't want to appear at the bottom of a page. Therefore, I need to test to find out how far down the page I am, and if more than 75% of the page is used, insert a \newpage. One possibility:

Re: How to determine where I am on a page.

2010-01-25 Thread rgheck
On 01/25/2010 04:52 AM, Jürgen Spitzmüller wrote: % Conditional pagebreak \def\condbreak#1{% \vskip 0pt plus #1\pagebreak[3]\vskip 0pt plus -#1\relax} As a related question: What does \relax do, and when does one need it? rh

Re: How to determine where I am on a page.

2010-01-25 Thread Jürgen Spitzmüller
rgheck wrote: As a related question: What does \relax do, and when does one need it? http://en.wikibooks.org/wiki/TeX/relax Note, though, that the \condbreak macro is not my doing. I've picked it up eventually on comp.text.tex. Jürgen

Re: How to determine where I am on a page.

2010-01-25 Thread rgheck
On 01/25/2010 07:59 AM, Jürgen Spitzmüller wrote: rgheck wrote: As a related question: What does \relax do, and when does one need it? http://en.wikibooks.org/wiki/TeX/relax Thanks. I thought it must be something like that. rh

How to determine where I am on a page.

2010-01-25 Thread Philip Stubbs
I have hacked up my own class file. It does 95% of what I set out to achieve. However, I am stuck with the final bit of polish. I have an element that I don't want to appear at the bottom of a page. Therefore, I need to test to find out how far down the page I am, and if more than 75% of the page

Re: How to determine where I am on a page.

2010-01-25 Thread Jürgen Spitzmüller
Philip Stubbs wrote: > I have an element that I don't want to appear at the bottom of a page. > Therefore, I need to test to find out how far down the page I am, and > if more than 75% of the page is used, insert a \newpage. One possibility:

Re: How to determine where I am on a page.

2010-01-25 Thread rgheck
On 01/25/2010 04:52 AM, Jürgen Spitzmüller wrote: % Conditional pagebreak \def\condbreak#1{% \vskip 0pt plus #1\pagebreak[3]\vskip 0pt plus -#1\relax} As a related question: What does \relax do, and when does one need it? rh

Re: How to determine where I am on a page.

2010-01-25 Thread Jürgen Spitzmüller
rgheck wrote: > As a related question: What does \relax do, and when does one need it? http://en.wikibooks.org/wiki/TeX/relax Note, though, that the \condbreak macro is not my doing. I've picked it up eventually on comp.text.tex. Jürgen

Re: How to determine where I am on a page.

2010-01-25 Thread rgheck
On 01/25/2010 07:59 AM, Jürgen Spitzmüller wrote: rgheck wrote: As a related question: What does \relax do, and when does one need it? http://en.wikibooks.org/wiki/TeX/relax Thanks. I thought it must be something like that. rh