On 10/2/2010 11:16 AM, Steve Litt wrote:
On Saturday 02 October 2010 08:42:55 Richard Heck wrote:
On 10/02/2010 12:49 AM, Steve Litt wrote:
Hi all,

I'm using a document class derived from the Book class, and that can't
change.

I created a character style that in LyX shows the text, but in the PDF
doesn't show the text and simply sets a variable, which I then put in the
header. So far so good.

But there's trouble in paradise. These variables are dates, and I want
the variable value in the header to be the value on entry to the page.
Instead, it's the value on exit from the page. Is there any way to make
it the value on entry to the page? Maybe some sort of LaTeX break logic?

I've read about this problem elsewhere, and I don't think there is any
solution to it without a massive rewrite of the heading code. Think
about the section headings: You get in the header the section with which
the page ENDS, not the one with which it STARTS.

Thanks Richard,

I've been giving this a lot of thought the past 18 hours. I have a feeling
it's possible, although I'd have to use, what's it called, the ifthenelse
package? Here's the logic:

1) On any chapter start page, the header shows the char style text at the
beginning of the chapter. I'll make sure every chapter start page has such
char style text at its beginning.
2) On any other page, the header shows the latest char style text from
previous pages.

OK, now it sounds to me like I'll need two different char styles. The chapter
start char style directly manipulates the variable that displays on the
header. The other char style manipulates a variable that, on page changes,
gets copied to the variable that displays on the header. I might have to have
some flags or something like that.


Steve,

I gather from this (perhaps incorrectly) that you use a LaTeX macro repeatedly at various points in the text to set the variable value for a page. What happens if you load the afterpage package and put the macro inside \afterpage{}? Hopefully that would say the new value goes into effect after the current page is emitted, which (hopefully) would cause the value at entry to print on the current page.

/Paul



Reply via email to