From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/59031 Path: news.gmane.org!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Lost document background Date: Mon, 24 May 2010 10:51:13 +0200 Message-ID: <4BFA3E01.7020709@googlemail.com> References: <4BFA3D59.9020605@googlemail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1274691098 22638 80.91.229.12 (24 May 2010 08:51:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 24 May 2010 08:51:38 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon May 24 10:51:37 2010 connect(): No such file or directory Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OGTNl-0004ME-VJ for gctc-ntg-context-518@m.gmane.org; Mon, 24 May 2010 10:51:34 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 503EBC9C50; Mon, 24 May 2010 10:51:33 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id YzjbzvvoLjvI; Mon, 24 May 2010 10:51:29 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6E637C9C5C; Mon, 24 May 2010 10:51:29 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id CD483C9C5C for ; Mon, 24 May 2010 10:51:27 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id zsnZbCOFf7qW for ; Mon, 24 May 2010 10:51:16 +0200 (CEST) Original-Received: from mail-bw0-f41.google.com (mail-bw0-f41.google.com [209.85.214.41]) by balder.ntg.nl (Postfix) with ESMTP id 56593C9C50 for ; Mon, 24 May 2010 10:51:16 +0200 (CEST) Original-Received: by bwz2 with SMTP id 2so912348bwz.14 for ; Mon, 24 May 2010 01:51:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=i3nBdS3w/l+wOOCAP7MYj+5elXP+0520b8gZ3xm+YT4=; b=r+NWSAU6tpcHmPkJfNUynkqp5TE7lluBNvzw8l0ESTRoPRSKFalFulgAHXaS8diTvH tvjkG/fgxAzJkdX4+MWOIvh9V47OIUa5l4/WXtV8wqzw/AX5FxBIxTSGE2c0qjII/j2I gPOtVP5UZi5bzHE1Q8J2tQIbclztZFZ22MAGE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=NM1ih2quaH/7hche2EM1W84Paa5IJD/zlzePytiRtKd9Yuzj3xqXtDKJ+zszxh6Iqz HwVxclntnnFQDAWzxd3iUNPrmLeULSjbZUXmYXiIf54w4Vav2kw8wlLxPM8m3X2ZG3fK mVTwP58LyvX2/r9FjRLlFAeV/YYR0ePRfnEIQ= Original-Received: by 10.204.128.68 with SMTP id j4mr1931671bks.49.1274691076065; Mon, 24 May 2010 01:51:16 -0700 (PDT) Original-Received: from [192.168.2.23] (p5B293602.dip.t-dialin.net [91.41.54.2]) by mx.google.com with ESMTPS id d13sm18189051bkd.5.2010.05.24.01.51.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 24 May 2010 01:51:15 -0700 (PDT) User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 In-Reply-To: <4BFA3D59.9020605@googlemail.com> X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:59031 Archived-At: Am 24.05.10 10:48, schrieb Wolfgang Schuster: > Hi Hans, > > under certain circumstances document backgrounds (overlays) are lost. > > > A minimum real live example is this: > > \definelayer[test] > > \setuppagenumbering[alternative=doublesided] > > \setupmakeup[standard][doublesided=empty] % background is lost > %\setupmakeup[standard][doublesided=yes] % background is visible > > \startsetups[test] > \setlayer[test][hoffset=4cm,voffset=7cm]{\tfd text} > \stopsetups > > \setupbackgrounds[page][background=test,setups=test] > > \starttext > > \startstandardmakeup > text > \stopstandardmakeup > > test > > \stoptext > > With 'doublesided=yes' the background is visible but with > 'doublesided=empty' > no background is shown. > > > I spend a few hours to find the reason for this and i was able to produce > a shorter example: > > \defineoverlay[test][\tfd text] > > \setupbackgrounds[page][background=test,state=repeat] > > \starttext > > text\page\page[blank]\null\page > > %\chardef\pageornamentstate\zerocount > > text > > \stoptext > > The problem is that '\page[blank]' sets \pageornamentstate at global > level to '1'. I found a fix in a older ConTeXt version: \def\dopagebreak[#1]% so, page ornaments are reset after a pagebreak command, unless set {\bgroup \flushnotes \edef\prevrealpageno{\the\realpageno}% \ifcase\pageornamentstate \or % disable reset after shipout \global\chardef\pageornamentstate\plustwo \fi \iffirstargument % or if empty i.e. [] \executepagebreakhandlers{#1}% \else % so, no pagebreak when \pagebreak[] ! ! ! \executepagebreakhandler\v!yes \fi \ifnum\prevrealpageno<\realpageno \global\chardef\pageornamentstate\zerocount \fi \egroup} Wolfgang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________