[NTG-context] problem with goto - was: How to implement a changing navigation bar?

Stefan Wachter stefan.wachter at gmx.de
Thu Sep 23 11:57:25 CEST 2004

Hi Hans,

I implemented my changing navigation bar like you proposed, i.e. using a 
layer that is "refreshed" by the footer text:

\startsetups NavBar
... some quite complicated code setting up the navigation bar layer ...


Everything works now, but I was not able to use the \goto makro inside 
the navigation layer setup code. It seems that the \goto makro somehow 
interferes with the output routine. Therefore I had to replace the \goto 
makro in the setup code with my self written \PrevOrNextPage makro. This 
makro writes a "raw" pdftex link. (Sometime ago you hinted me to replace 
my \PrevOrNextPage makro by the \goto makro.)

Using the \goto makro I get the following error message:

! Missing } inserted.
<inserted text>
<to be read again>
\dosingletexts ...atetexts {#1#2#5}{#6{}{}{}}}}}}}
<argument> ...tk \v!voet \v!tekst \c!middentekst }
                                                   \hss }\hskip 
-\zetbreedte ...

\dododoplacelayouttextline ...#2 #3}\hbox to #1{#4

\dodoplacelayouttextline ... \c!kantlijntekst }}}}
                                                   \fi \ifdim 
l.211 ...t\crlf{} Die Landesregierung\blank[small]

Can you please have a look on the example? I attach a file that when it 
is texexecuted produces the above error. When you comment out line 150 
in the file and use line 148 instead, then the example works fine.


Hans Hagen wrote:
> Stefan Wachter wrote:
>> Hi all,
>> I use an overlay to implement a navigation bar in the left margin of a 
>> document. It seems to me that the processing of the overlay is done 
>> only once and not for every page again. In addition, the \lastpage is 
>> not available.
> page, paper and text backgrounda are calculated each page, unless you 
> say \setupbackgrounds[state=repeat], in which case all are recalculated; 
> if you put something in a layer it happens directly (but the layer may 
> be flushed later)
>> Does anyone know a solution? Maybe headers/footers are a solution. But 
>> how is absolute positioning accomplished with them?
> you can put a layer in the background of the header area and that do 
> something:
> \startsetups whatever
>  \setlayer[thatlayer][....positioning...]{\the\pageno}
> \stopsetups
> \setupheadertexts[\setups{whatever}]
>> PS: Here is my current implementation:
>> \definelayer[navbar]
>> \setupbackgrounds[text][leftmargin][background=navbar]
>> \setlayer[navbar][x=0cm,y=10cm]{\the\pageno}
> lastpage etc only make sense in the output routine (during page 
> building) since one does not know where tex will break the page.
> H
> -----------------------------------------------------------------
>                                          Hans Hagen | PRAGMA ADE
>              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>     tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
>                                             | www.pragma-pod.nl
> -----------------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: inhalt.tex
Type: application/x-tex
Size: 28779 bytes
Desc: not available
Url : http://www.ntg.nl/pipermail/ntg-context/attachments/20040923/95036204/inhalt-0001.tex

More information about the ntg-context mailing list