ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* pagemark code works no more with arranging 3SIDE
@ 2003-08-08 20:19 Henning Hraban Ramm
  2003-08-11 12:34 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Henning Hraban Ramm @ 2003-08-08 20:19 UTC (permalink / raw)


Hello esp. Hans!

I told you more than once about my address book. ;-)
You wrote this nice code for me,
that calculates the first and last name on the page:

---

\def\RegisterPageMark#1#2% #1=Class #2=Text
	{\iftrialtypesetting \else
	\doglobal\increment\MNamCounter%
	\textreference[#1:t:\MNamCounter]{#2}%
	\doifreferencefoundelse{#1:t:\MNamCounter}
	{\doifundefined{#1:f:\currentrealreference}%
	{\setxvalue{#1:f:\currentrealreference}%
	{\noexpand\in[#1:t:\MNamCounter]}}
	\setxvalue{#1:l:\currentrealreference}%
	{\noexpand\in[#1:t:\MNamCounter]}}%
	{}%
	\fi}

\def\GetFirstOnPage#1{\getvalue{#1:f:\realfolio}} % #1=Class
\def\GetLastOnPage#1{\getvalue{#1:l:\realfolio}} % #1=Class

\setupheadertexts	[][\GetFirstOnPage{MNam}--\GetLastOnPage{MNam}]

\def\Name#1{\bf #1\RegisterPageMark{MNam}{\FirstNCharacters{4}{#1}}}

---

It doesn't work with the arranging "3SIDE" or even "XY" with three 
pages on A4 landscape.
The headers show only the dash.
I can't tell how arranging is involved in this counter stuff.

Is there a simple solution?


Grüßlis vom Hraban!
-- 
http://www.fiee.net/texnique/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-08-11 20:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-08 20:19 pagemark code works no more with arranging 3SIDE Henning Hraban Ramm
2003-08-11 12:34 ` Hans Hagen
2003-08-11 20:42   ` Henning Hraban Ramm

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).