From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/113488 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: musa furber via ntg-context Newsgroups: gmane.comp.tex.context Subject: Confusing interaction between \writetolist and bookmarks (bug?) Date: Mon, 22 Nov 2021 17:49:45 +0800 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============6772843385056785277==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10780"; mail-complaints-to="usenet@ciao.gmane.io" Cc: musa furber To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Mon Nov 22 10:50:32 2021 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane-mx.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mp5y3-0002b9-Tc for gctc-ntg-context-518@m.gmane-mx.org; Mon, 22 Nov 2021 10:50:31 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id ACD6D289699; Mon, 22 Nov 2021 10:50:02 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id o9UfwfoAIxkU; Mon, 22 Nov 2021 10:50:00 +0100 (CET) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 4D7E4289693; Mon, 22 Nov 2021 10:50:00 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 86641289693 for ; Mon, 22 Nov 2021 10:49:59 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gyYo3FDlGicU for ; Mon, 22 Nov 2021 10:49:58 +0100 (CET) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.219.43; helo=mail-qv1-f43.google.com; envelope-from=musafurber@gmail.com; receiver= Original-Received: from mail-qv1-f43.google.com (mail-qv1-f43.google.com [209.85.219.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 9EE40289692 for ; Mon, 22 Nov 2021 10:49:58 +0100 (CET) Original-Received: by mail-qv1-f43.google.com with SMTP id b11so12017779qvm.7 for ; Mon, 22 Nov 2021 01:49:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=/roo3GPISD21G5g2Bg3cfaXZWaWu7p9aSjQDv5PT5zE=; b=M3Ij4sjvRWq4uQ3hBI4V/PfOGUvJMEyChrHJLbLQVOWd6UKjypkuh6pwNoYhDXHGDV GFDOw7Z/Drq+Z7xV+PUKQz/xkr/8fnppNZzd5ckA0OAFWshiPoAUoA8d/SvkjTk1Zoe8 60fDEkK1WBnXB6aj36U3hQfyZ9qerQjExUILQ3OvaBjTPx88fj0KbhB08qaUGbpeCqnT 9UCvr7IFp+vCWe63xgAaNYyOSA6BE45LBNgLgP7Uo9IItZb8Ets2874txJ15DiKt6CTX zEB+FbTS4zrZG9LQq5PgMBZKM9HUeJROB4FdQpA0j22GSRIDuB397FZ88eE6fGVeP3Jm +g+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=/roo3GPISD21G5g2Bg3cfaXZWaWu7p9aSjQDv5PT5zE=; b=zfqXycpLdM4eSh6nlv5BjQnQQrWIjfMrhMSim/Ae79r7Ezyv3BafR7D0cXVxliBkIf fKsPYBubBJixh7JPQ/pfwp9CVgvLVaR5IMF1HzSyKQ5G6wWq2xoXc+aHueMTpwHPI3PE EURbcQAnazQhCLiLrQ66GtFDP3dYBaqBt/yLhdmw7WmNCDdp6JZROqfV0maPpkMj/XUA Eqha/JMPMiFeum1dTGetphcThIe6CZ9O4uMXswanbt3CI1zL8n2ucn8n1vKcBoVSrZAA 5TnRZKa3rvQKQFuUJaotMFkJMRDrJkVe8TXNzigEzLLlFCq5vVN15DxP7MLjS6OQFN9q A5fQ== X-Gm-Message-State: AOAM532lrTQprYLKQSGr4Ad2QQ4ZQzfvuxQr1vXUL1wZ0C1b2zkD+60I txLbFdc04AN82D46tWy+Ic4aOVVQhEfidOPXBGbEES/ngiCcSw1E X-Google-Smtp-Source: ABdhPJytLkbQBMBa97SEnRYdTd0+xmspBcPyl/UtcYsbeY2Wvoqr61mBLdV5hDrtW5OlS9EyblVDSE2+71L1ZqnBySY= X-Received: by 2002:a05:6214:5286:: with SMTP id kj6mr98867760qvb.50.1637574596789; Mon, 22 Nov 2021 01:49:56 -0800 (PST) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.26 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.io gmane.comp.tex.context:113488 Archived-At: --===============6772843385056785277== Content-Type: multipart/alternative; boundary="00000000000022895405d15d8cc0" --00000000000022895405d15d8cc0 Content-Type: text/plain; charset="UTF-8" I am relatively new to ConTeXt and have encountered something that does not work as I expected it to based on various documentation and examples. My book design requires the front matter to contain an abridged table of contents just for chapters, and a detailed table of contents in the back matter. Everything worked fine -- including the PDF bookmarks and table of contents -- until I started using \writetolist to manually inject additional sections and subsections into their respective lists. The manually injected entries do show up (as I expected), but their corresponding PDF bookmarks get repeated (not what I expected). Here is a M(not)WD: ###begin \setupinteraction[state=start] \placebookmarks[chapter, section][chapter, section] \setupinteractionscreen[option=bookmark] \starttext \startfrontmatter \title{Contents} \placelist[chapter] \stopfrontmatter \startbodymatter \chapter{Chapter ONE} \section{Section ONE} \writetolist[section]{}{Section via writetolist ONE} \chapter{Chapter TWO} \stopbodymatter \startbackmatter \chapter{Detailed Table of Contents} \placecontent[criterium=all] \stopbackmatter \stoptext ###end The repetitions go away when any one of the following is done: -- commenting out the front/body/back commands -- commenting out both contents at front and back -- commenting out just back contents -- commenting out the \writetolist Have I misunderstood something? Many thanks, Musa --00000000000022895405d15d8cc0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I am relatively new to ConTeXt and have encountered s= omething that does not work as I expected it to based on various documentat= ion and examples.

My book design requires the = front matter to contain an abridged table of contents just for chapters, an= d a detailed table of contents in the back matter.

Everything worked fine -- including the PDF bookmarks and table of content= s -- until I started using \writetolist to manually inject additional secti= ons and subsections into their respective lists. The manually injected entr= ies do show up (as I expected), but their corresponding PDF bookmarks get r= epeated (not what I expected).

Here is a M(not= )WD:

###begin
\setupinteraction[= state=3Dstart]
\placebookmarks[chapter, section][chapter, section]
\s= etupinteractionscreen[option=3Dbookmark]

\starttext

=C2=A0 \s= tartfrontmatter
=C2=A0 =C2=A0 \title{Contents}
=C2=A0 =C2=A0 \placeli= st[chapter]
=C2=A0 \stopfrontmatter

=C2=A0 \startbodymatter
= =C2=A0 =C2=A0 \chapter{Chapter ONE}
=C2=A0 =C2=A0 \section{Section ONE}<= br>=C2=A0 =C2=A0 \writetolist[section]{}{Section via writetolist ONE}
= =C2=A0 =C2=A0 \chapter{Chapter TWO}
=C2=A0 \stopbodymatter
=C2=A0 \startbackmatter
=C2=A0 =C2=A0 \chapter{Detailed Table of Conten= ts}
=C2=A0 =C2=A0 \placecontent[criterium=3Dall]
=C2=A0 \stopbackmatt= er

\stoptext
###end

The repetitio= ns go away when any one of the following is done:
-- commenting out the = front/body/back commands
-- commenting out both contents at front and ba= ck
-- commenting out just back contents
-- commenting out the \w= ritetolist

Have I misunderstood something?

Many thanks,
Musa
--00000000000022895405d15d8cc0-- --===============6772843385056785277== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============6772843385056785277==--