From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: from cgl.ntg.nl (Cgl.ntg.nl [5.39.185.202]) by inbox.vuxu.org (Postfix) with ESMTP id 5B75E2138B for ; Thu, 25 Apr 2024 16:11:12 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 9B39D4814FB for ; Thu, 25 Apr 2024 16:10:40 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Authentication-Results: cgl.ntg.nl (amavisd-new); dkim=fail (2048-bit key) reason="fail (message has been altered)" header.d=gmail.com Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id yh6P7CcUsefU for ; Thu, 25 Apr 2024 16:10:40 +0200 (CEST) Received: from cgl.ntg.nl (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 5B4684817D2 for ; Thu, 25 Apr 2024 16:09:04 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by cgl.ntg.nl (Postfix) with ESMTP id 139924848AA for ; Thu, 25 Apr 2024 16:08:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at cgl.ntg.nl Received: from cgl.ntg.nl ([127.0.0.1]) by localhost (cgl.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 25E_T-UaJL6u for ; Thu, 25 Apr 2024 16:08:34 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.54; helo=mail-ed1-f54.google.com; envelope-from=fabrice1.couvreur@gmail.com; receiver= Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by cgl.ntg.nl (Postfix) with ESMTPS id 7136E4848A9 for ; Thu, 25 Apr 2024 16:08:34 +0200 (CEST) Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-571c22d9de4so1497699a12.3 for ; Thu, 25 Apr 2024 07:08:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1714054113; x=1714658913; darn=ntg.nl; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=yEH8iMO94NoObFAjgwuKspAEEnZ6ohKfcMhB9X18E1M=; b=VOQUNEkgQrI7HKDV4JKd9dNnujJPs9FRRks10STuvtkZ3DqfLUiONbMgJID5OvvY2G RWCJPmCUCMLT5jlw2yAYx8YJ4AWjk/rrcPOfMYkrmTi3zThLFk7HTvW9Wy5dN0IcsUgQ FbuQeAJEc5EEW1P36bvKEVJ2a1u2v7sRhMJdvgrRyIx9y5qCO7d1VmfFoujOn8vKM2ch LYxwSHDNPs2H3aaCCnCjjUkYWxhpBpa42OSMa2a4cgqcbTFDhhinUJrn9YSg1/K2B3Jl bF4yuUhvLmlMqoBI/on2YgDDWKdlNQERK8Dpgs83dVK2Ar1KjWVOZwWW0bNfCwSxC5ym 5mKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714054113; x=1714658913; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=yEH8iMO94NoObFAjgwuKspAEEnZ6ohKfcMhB9X18E1M=; b=c5PTnmvR3hmaqBW6qxkgBfuErIOhngRmJ4lUny6++qOvjlhahUz9sDe4UMg9GVf+5v 483bMa+pCVX+io9u0iI/CJqY14IK8sqg9u6/LytcquN3Nxlv9vUIAiLyAn4iOp9yhpUp vbnslFzRlKj9+KEPsRglFWLUYMFFtxeDStpmvtXms3lNH649uaJG/GT+ekwuZ2NhvOYm zMs4WZNl+7VI98ACquCz+VI20uHCuvfHTG1ecZnqteYrhW0Mpi4R1qhAlKX67KIwnCmC jwtcAQavZiPKVwm+sbGf25NYa2kkm9yQ6ackt+B7Qm2Zagzp1hx1VNuEXMx0k1WrmWH7 5Deg== X-Gm-Message-State: AOJu0YyaZP7itEp7fWUCn3ndBw+oDao8CBGXh+eWn07XE7YMuiU5Z/Q8 6/e14JrXM8jrF2l9Re4HkJDtZJZDyoONudmH13zngPyuhy7UL/rbrByQv7YYYsA3i6GK9Kj3PqU ACUd++NZxOhnTZlK0/AsJlmLPytRkd5dj X-Google-Smtp-Source: AGHT+IEBy2RfocT1AW4oIb73QWUNL3iJMNjLJtiB/knJsdBosbmNKcsem6fGobojV11WrnD7Agvq76Ulk7YcCZZ8GAE= X-Received: by 2002:a50:cdd1:0:b0:571:be3a:e904 with SMTP id h17-20020a50cdd1000000b00571be3ae904mr3917679edj.8.1714054113170; Thu, 25 Apr 2024 07:08:33 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Fabrice Couvreur Date: Thu, 25 Apr 2024 16:08:28 +0200 Message-ID: To: mailing list for ConTeXt users Message-ID-Hash: 3EB5MB3BXDMPTYI4JJ5T3TDIWI7CWD5S X-Message-ID-Hash: 3EB5MB3BXDMPTYI4JJ5T3TDIWI7CWD5S X-MailFrom: fabrice1.couvreur@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list Reply-To: mailing list for ConTeXt users Subject: [NTG-context] Re: The graph is not visible. List-Id: mailing list for ConTeXt users Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: multipart/mixed; boundary="===============3002729320776480373==" --===============3002729320776480373== Content-Type: multipart/alternative; boundary="0000000000008a9dce0616ec5233" --0000000000008a9dce0616ec5233 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Taco, I knew I wouldn't be able to explain what was happening. The code works perfectly and the figure is clearly visible in the component chapter-14 : \startcomponent[chapter-14] \startMPpage ... \stopMPpage \stopcomponent But if I compile my project, it disappears !! \startproduct[terminale-manual] \startbodymatter \component[chapter-1] \component[chapter-2] \component[chapter-3] \component[chapter-4] \component[chapter-5] \component[chapter-6] \component[chapter-7] \component[chapter-8] \component[chapter-9] \component[chapter-10] \component[chapter-11] \component[chapter-12] \component[chapter-13] \component[chapter-14] \stopbodymatter \stopproduct Le jeu. 25 avr. 2024 =C3=A0 13:36, Taco Hoekwater a =C3= =A9crit : > H Fabrice, > > You did not provide a good minimum test because the graph by itself > renders fine: > > > > Best wishes, > Taco > (if all else fails, you can replace \startMPcode with \startMPpage and > generate a standalone graph that way) > > > On 25 Apr 2024, at 12:27, Fabrice Couvreur > wrote: > > > > Hi, > > I don't know if I can explain the problem I'm having. I made a project > with 14 chapters. In each of them, there are graphics embedding metapost > code. I proceed as follows : I compile each chapter alone with lmtx then = I > compile the project containing the 14 chapters. I didn't encounter any > problems except with a graphic from the last chapter. It is indeed in > chapter 14 but not in the project ! I give the code for this graph. > > Thanks. > > Fabrice > > > > \startMPcode > > > > interim linejoin :=3D mitered; > > interim ahangle :=3D 30; > > numeric u, pi; > > > > pi =3D 3.141592653589793; > > u =3D 1.5cm; > > > > vardef graph_of_function (suffix f) (expr xmin, xmax, > xsep) =3D > > for x =3D xmin step xsep until xmax: (x, f(x)) .. end= for > (xmax, f(xmax)) > > enddef ; > > > > vardef vline (suffix f, g) (expr x) =3D (x, min(f(x), > g(x))) -- (x, max(f(x),g(x))) enddef; > > > > vardef area_between_functions (suffix f, g)(expr a, b, > xsep) =3D > > buildcycle(graph_of_function(f, a, b, xsep), vline(f, > g, b), > > reverse graph_of_function(g, a, b, xsep), reverse > vline(f, g, a)) > > enddef; > > > > vardef xaxis (expr xmin, xmax) =3D (xmin, 0) -- (xmax, 0= ) > enddef ; > > vardef yaxis (expr ymin, ymax) =3D (0, ymin) -- (0, ymax= ) > enddef ; > > > > > > xmin:=3D-pi/2; xmax :=3D 3*pi/2; > > ymin :=3D -1.5; ymax :=3D 5; > > > > > > vardef f(expr x)=3D exp(-x)*(-cos(x)+sin(x)+1) enddef; > > vardef g(expr x)=3D-exp(-x)*cos(x) enddef; > > path C_f, C_g; > > C_f =3D graph_of_function(f,xmin, xmax, .1); > > C_g =3D graph_of_function(g, xmin, xmax, .1); > > > > a :=3D xpart(C_f intersectionpoint C_g); > > b :=3D xpart(reverse C_f intersectionpoint reverse C_g); > > > > fill (area_between_functions(f, g, a, b, 0.1)) scaled u > withcolor 0.4[white, blue]; > > draw C_f scaled u withcolor blue; > > draw C_g scaled u withcolor blue; > > > > > > \stopMPcode > > > _________________________________________________________________________= __________ > > If your question is of interest to others as well, please add an entry > to the Wiki! > > > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > > webpage : https://www.pragma-ade.nl / https://context.aanhet.net > (mirror) > > archive : https://github.com/contextgarden/context > > wiki : https://wiki.contextgarden.net > > > _________________________________________________________________________= __________ > > =E2=80=94 > Taco Hoekwater E: taco@bittext.nl > genderfluid (all pronouns) > > > > _________________________________________________________________________= __________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl > webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror= ) > archive : https://github.com/contextgarden/context > wiki : https://wiki.contextgarden.net > > _________________________________________________________________________= __________ > --0000000000008a9dce0616ec5233 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Taco,
I knew I wouldn't be able to explain what was h= appening.
The code works perfectly and the figure is clearly visible in = the component chapter-14 :

\startcomponent[chapter-14]
\startMPpage
..= .
\stopMPpage
\stopcomponent

But if I compile my project, it disappears= =C2=A0!!

\startproduct[terminale-manual]
=C2=A0\startbodymatte= r
=C2=A0 =C2=A0 =C2=A0 \component[chapter-1]
=C2=A0 =C2=A0 =C2=A0 \co= mponent[chapter-2]
=C2=A0 =C2=A0 =C2=A0 \component[chapter-3]
=C2=A0 = =C2=A0 =C2=A0 \component[chapter-4]
=C2=A0 =C2=A0 =C2=A0 \component[chap= ter-5]
=C2=A0 =C2=A0 =C2=A0 \component[chapter-6]
=C2=A0 =C2=A0 =C2= =A0 \component[chapter-7]
=C2=A0 =C2=A0 =C2=A0 \component[chapter-8]
= =C2=A0 =C2=A0 =C2=A0 \component[chapter-9]
=C2=A0 =C2=A0 =C2=A0 \compone= nt[chapter-10]
=C2=A0 =C2=A0 =C2=A0 \component[chapter-11]
=C2=A0 =C2= =A0 =C2=A0 \component[chapter-12]
=C2=A0 =C2=A0 =C2=A0 \component[chapte= r-13]
=C2=A0 =C2=A0 =C2=A0 \component[chapter-14]
=C2=A0 =C2=A0 \stop= bodymatter
\stopproduct

Le=C2=A0jeu. 25 avr. 2024 =C3=A0=C2=A013:3= 6, Taco Hoekwater <taco@bittext.nl> a =C3=A9crit=C2=A0:
H Fabrice,

You did not provide a good minimum test because the graph by itself renders= fine:



Best wishes,
Taco
(if all else fails, you can replace \startMPcode with \startMPpage and gene= rate a standalone graph that way)

> On 25 Apr 2024, at 12:27, Fabrice Couvreur <
fabrice1.couvreur@gmail.com&g= t; wrote:
>
> Hi,
> I don't know if I can explain the problem I'm having. I made a= project with 14 chapters. In each of them, there are graphics embedding me= tapost code. I proceed as follows : I compile each chapter alone with lmtx = then I compile the project containing the 14 chapters. I didn't encount= er any problems except with a graphic from the last chapter. It is indeed i= n chapter 14 but not in the project ! I give the code for this graph.
> Thanks.
> Fabrice
>
> \startMPcode
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 interim linejoi= n :=3D mitered;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 interim ahangle= :=3D 30;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 numeric u, pi;<= br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 pi =3D 3.141592= 653589793;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 u =3D 1.5cm; >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 vardef graph_of= _function (suffix f) (expr xmin, xmax, xsep) =3D
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fo= r x =3D xmin step xsep until xmax: (x, f(x)) .. endfor (xmax, f(xmax))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 enddef ;
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 vardef vline (s= uffix f, g) (expr x) =3D (x, min(f(x), g(x))) -- (x, max(f(x),g(x))) enddef= ;
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 vardef area_bet= ween_functions (suffix f, g)(expr a, b, xsep) =3D
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bu= ildcycle(graph_of_function(f, a, b, xsep), vline(f, g, b),
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0re= verse graph_of_function(g, a, b, xsep), reverse vline(f, g, a))
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 enddef;
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 vardef xaxis (e= xpr xmin, xmax) =3D (xmin, 0) -- (xmax, 0) enddef ;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 vardef yaxis (e= xpr ymin, ymax) =3D (0, ymin) -- (0, ymax) enddef ;
>
>=C2=A0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 xmin:=3D-pi/2; = xmax :=3D 3*pi/2;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ymin :=3D -1.5;= ymax :=3D 5;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 vardef f(expr x= )=3D exp(-x)*(-cos(x)+sin(x)+1) enddef;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 vardef g(expr x= )=3D-exp(-x)*cos(x) enddef;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 path C_f, C_g;<= br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 C_f =3D graph_o= f_function(f,xmin, xmax, .1);
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 C_g =3D graph_o= f_function(g, xmin, xmax, .1);
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 a :=3D xpart(C_= f intersectionpoint C_g);
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 b :=3D xpart(re= verse C_f intersectionpoint reverse C_g);
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 fill (area_betw= een_functions(f, g, a, b, 0.1)) scaled u withcolor 0.4[white, blue];
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 draw C_f scaled= u withcolor blue;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 draw C_g scaled= u withcolor blue;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 \stopMPcode
> ______________________________________________________________________= _____________
> If your question is of interest to others as well, please add an entry= to the Wiki!
>
> maillist : ntg= -context@ntg.nl / https://mailman.ntg.nl= /mailman3/lists/ntg-context.ntg.nl
> webpage=C2=A0 : https://www.pragma-ade.nl / https://context.aanhe= t.net (mirror)
> archive=C2=A0 : https://github.com/contextgarden/contex= t
> wiki=C2=A0 =C2=A0 =C2=A0: https://wiki.contextgarden.net
> ______________________________________________________________________= _____________

=E2=80=94
Taco Hoekwater=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 E: taco@bittext.nl
genderfluid (all pronouns)


___________________________________________________________________________= ________
If your question is of interest to others as well, please add an entry to t= he Wiki!

maillist : ntg-cont= ext@ntg.nl / https://mailman.ntg.nl/mail= man3/lists/ntg-context.ntg.nl
webpage=C2=A0 : https://www.pragma-ade.nl / https://context.aanhet.net= (mirror)
archive=C2=A0 : https://github.com/contextgarden/context=
wiki=C2=A0 =C2=A0 =C2=A0: https://wiki.contextgarden.net
___________________________________________________________________________= ________
--0000000000008a9dce0616ec5233-- --===============3002729320776480373== 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 / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ --===============3002729320776480373==--