* 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
* Re: pagemark code works no more with arranging 3SIDE
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
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2003-08-11 12:34 UTC (permalink / raw)
At 22:19 08/08/2003 +0200, Henning Hraban Ramm wrote:
>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?
Can you make me a small test file?
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
information: http://www.pragma-ade.com/roadmap.pdf
documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: pagemark code works no more with arranging 3SIDE
2003-08-11 12:34 ` Hans Hagen
@ 2003-08-11 20:42 ` Henning Hraban Ramm
0 siblings, 0 replies; 3+ messages in thread
From: Henning Hraban Ramm @ 2003-08-11 20:42 UTC (permalink / raw)
Am Montag, 11.08.03, um 14:34 Uhr (Europe/Zurich) schrieb Hans Hagen:
> Can you make me a small test file?
Here you are:
--- snip ---
\starttext
\enableregime [il1]
\definepapersize [filius][width=92mm, height=172mm]
\setuppapersize [filius][A4,landscape]
\setuparranging [3SIDE]
\setupbodyfont [ss,7pt]
% alternative, but markings don't show:
%\setuppaper [nx=3,ny=1, dx=0mm,dy=0mm,
topspace=19mm,backspace=10.5mm]
%\setuplayout [page] [topspace=19mm, backspace=10.5mm,
% location=middle, marking=on]
%\setuparranging [XY]
\setuplayout [location=middle,
alternative=singlesided,
grid=no, marking=on,
leftmargin=10mm, leftmargindistance=0mm,
topspace=2mm, header=4mm, footer=0mm,
width=77mm, height=166mm]
\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
\setuppagenumbering [state=start, location={header,inleft}]
\setupheadertexts [][\GetFirstOnPage{MNam}--\GetLastOnPage{MNam}]
\def\Name#1{\bf #1\RegisterPageMark{MNam}{\FirstNCharacters{4}{#1}}}
\startalignment [right]
\setuptabulate [distance=none,indenting=none,inner={}]
\starttabulate[|w(30mm)k0|w(30mm)k0|w(18mm)k0|]
\HL
% \input adrlst.tex % script-generated table entries from database like:
\NC\Name{Alter, Hugo}\NC alter.hugo@t-online.de\NC\NC\NR
\NC Hugostraße 77 \NC D-66127 Saarbrücken \NC +49 +6898-12345\NC\NR
\HL
\NC\Name{Zoller, Stefan}\NC stefan.zoller@gmx.ch\NC0179-123456\NC\NR
\NC Zollstraße 1\NC CH-8274 Tägerwilen\NC +41 +71-12345\NC\NR
\HL
\stoptabulate
\stopalignment
\stoptext
--- snap ---
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).