From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/35463 Path: news.gmane.org!not-for-mail From: Hans van der Meer Newsgroups: gmane.comp.tex.context Subject: error in textbackground with metapost Date: Wed, 18 Jul 2007 23:14:46 +0200 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: multipart/mixed; boundary="===============2123996574==" X-Trace: sea.gmane.org 1184793289 20025 80.91.229.12 (18 Jul 2007 21:14:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 18 Jul 2007 21:14:49 +0000 (UTC) To: NTG ConTeXt Original-X-From: ntg-context-bounces@ntg.nl Wed Jul 18 23:14:44 2007 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1IBGr2-0000fh-HT for gctc-ntg-context-518@m.gmane.org; Wed, 18 Jul 2007 23:14:40 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id F3B321FD4A; Wed, 18 Jul 2007 23:14:39 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 09546-01; Wed, 18 Jul 2007 23:14:32 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id C1F261FD09; Wed, 18 Jul 2007 23:14:30 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 50A971FD09 for ; Wed, 18 Jul 2007 23:14:28 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07995-05 for ; Wed, 18 Jul 2007 23:14:25 +0200 (CEST) Original-Received: from smtp.science.uva.nl (smtp.science.uva.nl [146.50.4.84]) by ronja.ntg.nl (Postfix) with ESMTP id 4D0031FCFF for ; Wed, 18 Jul 2007 23:14:25 +0200 (CEST) Original-Received: from 119-72.uva.surfnetthuis.nl [145.98.119.72] by smtp.science.uva.nl with ESMTP (sendmail 8.11.6p2/config 11.38). id l6ILEM017606; Wed, 18 Jul 2007 23:14:23 +0200 X-Organisation: Faculty of Science, University of Amsterdam, The Netherlands X-URL: http://www.science.uva.nl/ X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: by amavisd-new X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:35463 Archived-At: --===============2123996574== Content-Type: multipart/alternative; boundary=Apple-Mail-1-327656073 --Apple-Mail-1-327656073 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed There must be something badly amiss in the textbackground processing. Below a small example demonstrating the problem. When a block falls badly on a page boundary an error occurs as shown. One may have to tweak the \blank[] in order to get the error depending on local font settings etc. In my case 0.78 shoved the second block to page 2 without an error but from 0.79 onwards the error occurs. At 0.66 the block is split after the third line, but at 0.68 again the error shows. TeX complains as follows. ! Argument of \dodoubletestempty has an extra }. \par } \doifnextcharelse ...token =#1\def \!!stringa {#2} \def \!!stringb {#3}\futur... \doMPpositiongraphic ...ta {#1:}\setupMPvariables [self=pbg:1, mp=mpos:par:c... \dodoublegroupempty #1->\def \dodogetargument ## 1{\def \dodogetargument {\do... \dohandleMPpositiongraphicrange ...ositiongraphic {#3}{#4}\fi \fi ... l.29 third line ? Process aborted ======================================================================== === % metapost based variable backgrounds \setupcolors[state=start] \definetextbackground[code][frame=off,location=paragraph, backgroundcolor=cyan,color=red,backgroundoffset=0pt] \definetyping[TEST] \setuptyping[TEST][option=JV, before={\bgroup\setupinterlinespace[line=3ex]% \testpage[1]\starttextbackground[code]}, after={\stoptextbackground\egroup}] \setupbodyfont[14pt] \starttext Testing textbackground\crlf \startTEST first line second line third line fourth line fifth line \stopTEST \blank[0.73\textheight] \startTEST first line second line third line fourth line fifth line \stopTEST \stoptext Hans van der Meer --Apple-Mail-1-327656073 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1

There must be something = badly amiss in the textbackground processing.
Below a small = example demonstrating the problem.

When a block falls badly on = a page boundary an error occurs as shown. One may have to tweak the = \blank[] in order to get the error depending on local font settings etc. =

In my case = 0.78 shoved the second block to page 2 without an error but from 0.79 = onwards the error occurs. At 0.66 the block is split after the third = line, but at 0.68 again the error shows.

TeX complains as = follows.

! = Argument of \dodoubletestempty has an extra }.
<inserted = text>
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \par =
<to be read again>
=A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0=A0 }
\doifnextcharelse ...token =3D#1\def \!!stringa = {#2}
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 \def \!!stringb = {#3}\futur...

\doMPpositiongraphic ...ta = {#1:}\setupMPvariables
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 [self=3Dpbg:1,= mp=3Dmpos:par:c...

\dodoublegroupempty = #1->\def \dodogetargument ##
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 1{\def = \dodogetargument {\do...

\dohandleMPpositiongraphicran= ge ...ositiongraphic
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 {#3}{#4}\fi = \fi
...
l.29 third line
=A0 =A0 =A0 =A0 =A0= =A0 =A0=A0
?
Process aborted


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
% metapost based = variable = backgrounds
\setupcolors[state=3Dstart]
\definetextbac= kground[code][frame=3Doff,location=3Dparagraph,
=A0 =A0 = backgroundcolor=3Dcyan,color=3Dred,backgroundoffset=3D0pt]

\definetyping[TEST]
\setuptyping[TEST][option=3DJV,
= before=3D{\bgroup\setupinterlinespace[line=3D3ex]%
= \testpage[1]\starttextbackground[code]},
= after=3D{\stoptextbackground\egroup}]

\setupbodyfont[14pt]

\starttext

Testing = textbackground\crlf

\startTEST
first = line
second line
third line
fourth = line
fifth line
\stopTEST

\blank[0.73\textheight]
=

\startTEST
first = line
second line
third line
fourth = line
fifth line
\stopTEST

\stoptext


Hans van der Meer


= --Apple-Mail-1-327656073-- --===============2123996574== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============2123996574==--