ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Stefan Wachter <stefan.wachter@gmx.de>
Subject: problem with goto - was: How to implement a changing navigation bar?
Date: Thu, 23 Sep 2004 11:57:25 +0200	[thread overview]
Message-ID: <41529E05.40809@gmx.de> (raw)
In-Reply-To: <41212842.9020800@wxs.nl>

[-- Attachment #1: Type: text/plain, Size: 3364 bytes --]

Hi Hans,

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

\definelayer[navbar]
\setupbackgrounds[text][leftmargin][background=navbar]
\startsetups NavBar
... some quite complicated code setting up the navigation bar layer ...
\stopsetups

\setupfootertexts[\setups{NavBar}]

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>
                    \endgroup
\dosingletexts ...atetexts {#1#2#5}{#6{}{}{}}}}}}}
                                                   \egroup
<argument> ...tk \v!voet \v!tekst \c!middentekst }
                                                   \hss }\hskip 
-\zetbreedte ...

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

\dodoplacelayouttextline ... \c!kantlijntekst }}}}
                                                   \fi \ifdim 
\rechtermargebr...
...
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.

Thanks,
--Stefan


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


[-- Attachment #2: inhalt.tex --]
[-- Type: application/x-tex, Size: 29282 bytes --]

[-- Attachment #3: Type: text/plain, Size: 139 bytes --]

_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context

      reply	other threads:[~2004-09-23  9:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-16 16:12 Stefan Wachter
2004-08-16 15:58 ` Vit Zyka
2004-08-16 17:40   ` Stefan Wachter
2004-08-16 17:46     ` Vit Zyka
2004-08-17 15:53   ` Hans Hagen
2004-08-16 21:33 ` Hans Hagen
2004-09-23  9:57   ` Stefan Wachter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41529E05.40809@gmx.de \
    --to=stefan.wachter@gmx.de \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).