From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/8761 Path: main.gmane.org!not-for-mail From: Henning Hraban Ramm Newsgroups: gmane.comp.tex.context Subject: Re: Calculated Header Text Date: Mon, 22 Jul 2002 21:33:58 +0200 Sender: owner-ntg-context@let.uu.nl Message-ID: <200207222133.58822.angerweit@gmx.net> References: <5.1.0.14.1.20020719231618.03c90e28@remote-1> <5.1.0.14.1.20020722003916.033b07e0@remote-1> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Trace: main.gmane.org 1035399143 30308 80.91.224.250 (23 Oct 2002 18:52:23 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 23 Oct 2002 18:52:23 +0000 (UTC) Cc: ntg-context@ntg.nl Original-To: Hans Hagen In-Reply-To: <5.1.0.14.1.20020722003916.033b07e0@remote-1> Xref: main.gmane.org gmane.comp.tex.context:8761 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:8761 Am Montag, 22. Juli 2002 00:47 schrieb Hans Hagen: > Bad luck: TeX cannot handle marks that are burried deeply (as in > alignments) What a pity! It could be so easy... > Good Luck: We can fake 'm (using a few low level user macros) > > \def\RegisterPageMark#1#2% #1=Class #2=Text > {\iftrialtypesetting \else > \doglobal\increment\NameCounter > \textreference[#1:t:\NameCounter]{#2}% > \doifreferencefoundelse{#1:t:\NameCounter} > {\doifundefined{#1:f:\currentrealreference} > {\setxvalue{#1:f:\currentrealreference}% > {\noexpand\in[#1:t:\NameCounter]}}% > \setxvalue{#1:l:\currentrealreference}% > {\noexpand\in[#1:t:\NameCounter]}}% > {}% > \fi} > > \def\GetFirstOnPage#1{\getvalue{#1:f:\realfolio}} % #1=Class > \def\GetLastOnPage #1{\getvalue{#1:l:\realfolio}} % #1=Class Looks complicated -- and doesn't work either. That is, it shows nothing in the header as before. I tried the \getvalue... outside the tabulation and the whole thing with other names than "Name" -- nothing. Not even your recurse-example works. > >How can I get the first > > n characters of a text? > \def\getthreetokens#1% > {\dogetthreetokens#1\empty\empty\empty\relax} > > \def\dogetthreetokens#1#2#3#4\relax > {#1#2#3} But that works! Thank you! > An alternative is to use the boundtext and limitatetext (nicer) macros > described in supp-box Yeah, even better, so I can define the max width not only as "3 chars". Grüßlis vom Hraban! -- Henning Hraban Ramm Minervaweg 2 CH-8280 Kreuzlingen Telefon +41-71-6712494 --- http://www.angerweit.de http://www.fiee.net http://www.ramm.ch ---