From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/116087 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sylvain Hubert via ntg-context Newsgroups: gmane.comp.tex.context Subject: Re: TOC colors and in-page anchors Date: Wed, 28 Sep 2022 18:20:32 +0800 Message-ID: References: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3535318350467519127==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31629"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Sylvain Hubert , ntg-context mailing list To: Bruce Horrocks Original-X-From: ntg-context-bounces@ntg.nl Wed Sep 28 12:21:18 2022 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 1odUBp-0007zI-CY for gctc-ntg-context-518@m.gmane-mx.org; Wed, 28 Sep 2022 12:21:17 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 051D5360E5D; Wed, 28 Sep 2022 12:20:49 +0200 (CEST) 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 k3VGpkDA0Zdg; Wed, 28 Sep 2022 12:20:47 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id ABEEC360E69; Wed, 28 Sep 2022 12:20:47 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8DEF2360E5D for ; Wed, 28 Sep 2022 12:20:46 +0200 (CEST) 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 P7CR08H58KHy for ; Wed, 28 Sep 2022 12:20:44 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.218.46; helo=mail-ej1-f46.google.com; envelope-from=champignoom@gmail.com; receiver= Original-Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (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 9F76F360E51 for ; Wed, 28 Sep 2022 12:20:44 +0200 (CEST) Original-Received: by mail-ej1-f46.google.com with SMTP id dv25so26060592ejb.12 for ; Wed, 28 Sep 2022 03:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=SK6VQj5aY94TQ3/mdLOPLrCLOFPRlq9BQ+EcDlvuTds=; b=Zb5V1KfdLMdvLhou0bdUMdL9ADlv3pWeChuzmLh50IIQsm0UHeia771Er1xyLwRf2H EeYIi+3/kvu1w7LAAnBjTaXT2a+fNFOQcF2NL7P2P5KHJ1hm7j/4XEPcZAsx9S9bebU7 dKIxg/+XwvAOjNxT2mHcOaqGKhsYXxFNHXT15JJQ49mj7oxoLD/mSduffkng2sNI8Zbt XA9ID5nHYmv0tlFgHj03h/Kn5lVoANOK2Ew2jXiTN+ckeKTg0N3HCBKP5VZwXllaXtKo VCL0Akrkx+YEi2wBmGKLC5VrJcFtZ83t9WqowV/tYZe5qxZTLH3PMZdTnxoVbXXqAgiW ykZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=SK6VQj5aY94TQ3/mdLOPLrCLOFPRlq9BQ+EcDlvuTds=; b=zlbhrtKxrfCp/naEB7cWPxy5uV1drX7AKZADcs7Ycte6cC36qe+GDVT2zDaT9rZwbQ FYBzLyX+N1OF5vaVhAuEUqfpBunODGEMb4RxVntP11ouL1k8E5u782rkeVMhNreS5gzL JrqQPfVUHWGTjmTT6GfYymOHr3elq6egSHcJ1TPE5/snsIyRDA1hQiDD2vrmUl+PoQ36 NB/jGmtYlotazkG0ku4sq4dUNk122ApOD2pOVIeegfaVo3WVt7++GG4slBswns1D8uZC kseHYz10mx9Ylf02veP1S2Qe9sbxb377yXsTyd2ymBY9C7Fiac7m9G5qPz+7I904482O Bg3Q== X-Gm-Message-State: ACrzQf0HBpYFVvSJIwmRDcMKIFFBcP5Lqg8cJsqH5gQobIgU68a8JXIG AwMhpGpdHyaeAjy9QbV8ubbJ3CNRrEjdeKyToWp8fhhgTIETqJ/N X-Google-Smtp-Source: AMsMyM4EMpUOvSl6ELGMX58sW1XJ7qa1dnFoedEnTf8juexdFPq7bMnSaVn16+VwbERh7tSaazcoWn8ft062aLZZNm0= X-Received: by 2002:a17:907:7614:b0:787:9dfb:e5a3 with SMTP id jx20-20020a170907761400b007879dfbe5a3mr585333ejc.468.1664360444214; Wed, 28 Sep 2022 03:20:44 -0700 (PDT) In-Reply-To: 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:116087 Archived-At: --===============3535318350467519127== Content-Type: multipart/alternative; boundary="0000000000000e437c05e9ba1d4c" --0000000000000e437c05e9ba1d4c Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Thanks for the pointers, but unfortunately I cannot reproduce the second fix with either the system pdf viewer or the browser one. \usemodule[ipsum] \setupinteraction[state=3Dstart,focus=3Dstandard] \starttext \completecontent \section{s1}\ipsum \section{s2}\ipsum \section{s3}\ipsum \section{s4}\ipsum \section{s5}\ipsum \section{s6}\ipsum \stoptext context version: 2022.09.11 20:44 The viewer is on 'Continuous Scoll' mode both before and after the click, but clicking s4 still jumps to the beginning of page 2. On Wed, 28 Sept 2022 at 16:43, Bruce Horrocks wrote: > > > > On 28 Sep 2022, at 09:18, Sylvain Hubert via ntg-context < > ntg-context@ntg.nl> wrote: > > > > Dear list, > > > > \usemodule[ipsum] > > \setupinteraction[state=3Dstart] > > > > \starttext > > \completecontent > > \section{s1}\ipsum > > \section{s2}\ipsum > > \section{s3}\ipsum > > \section{s4}\ipsum > > \section{s5}\ipsum > > \section{s6}\ipsum > > \stoptext > > > > In the table of contents, s1 and s2 (at page 1) are rendered in red, > while others in green. > > > > Moreover, when I click s4, it jumps to page 2 without locating the > section precisely within the page. > > This is not the case when using the latex hyperref package. > > > > Does anyone know how to make the colors uniform and the links precise? > > > > Any help is appreciated. > > The colour change is because those links are on the same page that you ar= e > jumping to. When you have more text in your document they will be > consistent. You can override the colors with > \setupinteraction[state=3Dstart,color=3Dblack] for example if you wish. > > You need focus=3Dstandard to jump direct but only when the viewer is in > scrolling mode. It's explained on the Wiki. > > > =E2=80=94 > Bruce Horrocks > Hampshire, UK > > --0000000000000e437c05e9ba1d4c Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks for the pointers, but unfortunately I cannot reprod= uce the second fix with either the system pdf viewer or the browser one.
=C2=A0 =C2=A0 \usemodule[ipsum]
=C2=A0 =C2=A0 \setupint= eraction[state=3Dstart,focus=3Dstandard]

=C2=A0 =C2=A0 \starttext=C2=A0 =C2=A0 \completecontent
=C2=A0 =C2=A0 \section{s1}\ipsum
=C2= =A0 =C2=A0 \section{s2}\ipsum
=C2=A0 =C2=A0 \section{s3}\ipsum
=C2=A0= =C2=A0 \section{s4}\ipsum
=C2=A0 =C2=A0 \section{s5}\ipsum
=C2=A0 = =C2=A0 \section{s6}\ipsum
=C2=A0 =C2=A0 \stoptext

context version: 2022.09.11 20:44

The viewe= r is on 'Continuous Scoll' mode both before and after the click, bu= t clicking s4 still jumps to the beginning of page 2.

On Wed, 28 Sept = 2022 at 16:43, Bruce Horrocks <ntg@= scorecrow.com> wrote:


> On 28 Sep 2022, at 09:18, Sylvain Hubert via ntg-context <ntg-context@ntg.nl>= wrote:
>
> Dear list,
>
>=C2=A0 =C2=A0 =C2=A0\usemodule[ipsum]
>=C2=A0 =C2=A0 =C2=A0\setupinteraction[state=3Dstart]
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0\starttext
>=C2=A0 =C2=A0 =C2=A0\completecontent
>=C2=A0 =C2=A0 =C2=A0\section{s1}\ipsum
>=C2=A0 =C2=A0 =C2=A0\section{s2}\ipsum
>=C2=A0 =C2=A0 =C2=A0\section{s3}\ipsum
>=C2=A0 =C2=A0 =C2=A0\section{s4}\ipsum
>=C2=A0 =C2=A0 =C2=A0\section{s5}\ipsum
>=C2=A0 =C2=A0 =C2=A0\section{s6}\ipsum
>=C2=A0 =C2=A0 =C2=A0\stoptext
>
> In the table of contents, s1 and s2 (at page 1) are rendered in red, w= hile others in green.
>
> Moreover, when I click s4, it jumps to page 2 without locating the sec= tion precisely within the page.
> This is not the case when using the latex hyperref package.
>
> Does anyone know how to make the colors uniform and the links precise?=
>
> Any help is appreciated.

The colour change is because those links are on the same page that you are = jumping to. When you have more text in your document they will be consisten= t. You can override the colors with \setupinteraction[state=3Dstart,color= =3Dblack] for example if you wish.

You need focus=3Dstandard to jump direct but only when the viewer is in scr= olling mode. It's explained on the Wiki.
<https://wiki.contextgarden.net/Command/se= tupinteraction>

=E2=80=94
Bruce Horrocks
Hampshire, UK

--0000000000000e437c05e9ba1d4c-- --===============3535318350467519127== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cHM6Ly93d3cubnRnLm5sL21haWxtYW4v bGlzdGluZm8vbnRnLWNvbnRleHQKd2VicGFnZSAgOiBodHRwczovL3d3dy5wcmFnbWEtYWRlLm5s IC8gaHR0cDovL2NvbnRleHQuYWFuaGV0Lm5ldAphcmNoaXZlICA6IGh0dHBzOi8vYml0YnVja2V0 Lm9yZy9waGcvY29udGV4dC1taXJyb3IvY29tbWl0cy8Kd2lraSAgICAgOiBodHRwczovL2NvbnRl eHRnYXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCg== --===============3535318350467519127==--