From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HTML_MESSAGE,MAILING_LIST_MULTI,T_SCC_BODY_TEXT_LINE,URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28741 invoked from network); 10 May 2023 14:04:26 -0000 Received: from zapf.ntg.nl (5.39.185.232) by inbox.vuxu.org with ESMTPUTF8; 10 May 2023 14:04:26 -0000 Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8722D1C0C21; Wed, 10 May 2023 16:03:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.ntg.nl 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 MM8XpgIClqE2; Wed, 10 May 2023 16:03:53 +0200 (CEST) Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id ECB8E1C2F4E; Wed, 10 May 2023 16:03:52 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 6685F1C2F4E for ; Wed, 10 May 2023 16:03:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.ntg.nl 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 EDDefCtVEwpe for ; Wed, 10 May 2023 16:03:49 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.216.50; helo=mail-pj1-f50.google.com; envelope-from=jthryeboah@gmail.com; receiver= Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (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 zapf.ntg.nl (Postfix) with ESMTPS id 13FF41C0C21 for ; Wed, 10 May 2023 16:03:48 +0200 (CEST) Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-24e4f674356so6614476a91.3 for ; Wed, 10 May 2023 07:03:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683727427; x=1686319427; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=r37dB/CA4kXO/RF1k9qj3tPvKkQXbhKisC5UmSGrzdA=; b=nxrpHLePx5hsjojKIt8NGavA27giW3WQfGaJMRKL2RasrxVGUg4vgG3T+9zZnR1i3r sOoWXr0T/0GUdgJuxrMqfU/siNMJblLTJDfhdTjWpkdmJmNQJ7oDho1pNFbbtWeIfL/w sijz+qrNQopLxdAyBciwaUwJ/DL2h4gexx9/6XIGGI8GUN3JQW0IfsXjKY/u+4/TwtKs bgvvWXzsCimyf/sviMBvCzctNUZsGpjOSwxHGM/Ia889fjg/cvF4prCGzHdVbaQHXQiE n7ABDQ0eZIZTPgQHvF3muuqbHR2Ta2dxuXvGWuSOqPYjxEmj28C1QHtYAEabiB6SuL7R 4hRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683727427; x=1686319427; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=r37dB/CA4kXO/RF1k9qj3tPvKkQXbhKisC5UmSGrzdA=; b=M7nS0YZeYwnzqmiPV6imghm+tNMUtBzcdkPV/dPI1DiAIA2UVuNOvZOtoe2P+jsqvs gHXVlA0iz0Tx8MHkdi6W7AFEhPPiogtwsK8+OERT8IkZf/B7lEua81R77CHpTgsmycib wxy0gkD2LcTEsuGLR0mxFszwtBUleTWDYLE/ipFugsNMRbAVo7UAcWQE6GabSz7c1hKp bdVJcfjYRqG81mZiv585S4IgAMfTLYehPFbneFhxNK+FTkTQ++9GlHg/RnX+OSGhFtku J7I4F2JcU3gpdy6PMAh3xJ4U2tQUG2a0uvFOdo3GmW2Bw1JU9n0b8zaLIUkH4EQLCk7h LtGQ== X-Gm-Message-State: AC+VfDwFesBnwEYPfrFpBkpmH38wzjoLc3N03luyLZjDQ0E4jRGx3rsx eYzcs7FU3OFb3MghP0pnlmR7UAc5wYAP0H7uXoSxcT8gjj0YxA== X-Google-Smtp-Source: ACHHUZ756odTw37wPsY3oV6AdP05yHhHclr7OSMm7ETSVzoHQb2eF7KjePUnrRZObHAdA2aBVJg27sOVONQLYkboOWQ= X-Received: by 2002:a17:90a:a009:b0:250:462:d20e with SMTP id q9-20020a17090aa00900b002500462d20emr18200571pjp.45.1683727425525; Wed, 10 May 2023 07:03:45 -0700 (PDT) MIME-Version: 1.0 Date: Wed, 10 May 2023 14:03:33 +0000 Message-ID: To: mailing list for ConTeXt users Subject: [NTG-context] Custom TOC with makeup and setups X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.38 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Jethro Djan via ntg-context Reply-To: mailing list for ConTeXt users Cc: Jethro Djan Content-Type: multipart/mixed; boundary="===============7734692087491260725==" Errors-To: ntg-context-bounces@ntg.nl Sender: "ntg-context" --===============7734692087491260725== Content-Type: multipart/alternative; boundary="00000000000018ddf105fb575781" --00000000000018ddf105fb575781 Content-Type: text/plain; charset="UTF-8" Hello, I am trying to create a presentation where at the start of each section in my presentation, a custom TOC page is shown. When I am at a particular section, the TOC will grey out all other sections (not implemented in my MWE). I have tried different ways but I find using makeups for the TOC page works ok (following https://wiki.contextgarden.net/Command/setuplistalternative and Aditya's presentation slides on their blog). My challenge is that when a makeup page is inserted, it leaves a page with the section name blank before it. How do I fix it? Any other way to achieve this is also welcome. My MWE: \setuppapersize[S6] \startuseMPgraphic{itemize:toc} save p; path p; p := ( (0,-0.5)--(0,0.5)--(0.866,0)--cycle ) scaled 1.5ExHeight; fill p withcolor \MPcolor{Black}; \stopuseMPgraphic \definesymbol[itemize:toc][\useMPgraphic{itemize:toc}] \definelistalternative [toclist] [renderingsetup=list:toclist] \setupheadtext[section=Table of Contents] \startsetups toclist \framed[align=normal, frame=off]{\placelist [section] [criterium=all, alternative=toclist]} \stopsetups \definehspace[tspace][4cm] \setupframed[ height=fit, width=fit, location=middle, frame=off, align=normal, offset=none, ] \startsetups list:toclist {\hbox to \hsize \bgroup \hspace[tspace] \framed[width=10mm,align=flushleft]{\symbol[itemize:toc]}% \framed[empty=yes]{\currentlistentrynumber\currentlistentrypagenumber}% \doifelse\currentlistentrylocation{\namedstructureheadlocation{section}}{% \framed[align=flushright,]{{\bfb\currentlistentrytitle}}% }{\framed[align=flushright,]{\currentlistentrytitle}} \egroup} \stopsetups \definemakeup [toc] [ doublesided=no, page=yes, bottom=, top=, pagestate=start, headerstate=empty, footerstate=empty, setups={toclist}, before=\setups{toc:setups}, ] \startsetups toc:setups \setupbackgrounds[page][background=color, backgroundcolor=blue] \stopsetups \definemakeup [standard] [ doublesided=no, page=right, pagestate=start, headerstate=empty, footerstate=empty, before=\setups{standard:setups}, ] \startsetups standard:setups \setupbackgrounds[page][background=color, backgroundcolor=lightgray] \stopsetups \define\TOC{ \starttocmakeup \stoptocmakeup } \starttext \startstandardmakeup \title{Your Title Here} \stopstandardmakeup \startsection[title={Motivation}] \TOC \startitemize \item something cool \item something else cool \stopitemize \stopsection \startsection[title={Main strands of theory}] \TOC \startitemize \item another cool thing \item cool too \stopitemize \stopsection \stoptext Thanks in advance. Jethro --00000000000018ddf105fb575781 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

I am trying to create a presenta= tion where at the start of each section in my presentation, a custom TOC pa= ge is shown. When I am at a particular section, the TOC will grey out all o= ther sections (not implemented in my MWE). I have tried different ways but = I find using makeups for the TOC page works ok (following https://wiki.context= garden.net/Command/setuplistalternative and Aditya's presentation s= lides on their blog). My challenge is that when a makeup page is inserted, = it leaves a page with the section name blank before it. How do I fix it? An= y other way to achieve this is also welcome. My MWE:

\setuppapersize[S6]
\startuseMPgraphic{itemize:toc}
=C2=A0 save p;= path p;
=C2=A0 p :=3D ( (0,-0.5)--(0,0.5)--(0.866,0)--cycle ) scaled 1.= 5ExHeight;
=C2=A0 fill p withcolor \MPcolor{Black};
\stopuseMPgraphic=

\definesymbol[itemize:toc][\useMPgraphic{itemize:toc}]

\defi= nelistalternative
=C2=A0 [toclist]
=C2=A0 [renderingsetup=3Dlist:tocl= ist]

\setupheadtext[section=3DTable of Contents]

\startsetups= toclist
=C2=A0 \framed[align=3Dnormal, frame=3Doff]{\placelist [section= ] [criterium=3Dall, alternative=3Dtoclist]}
\stopsetups

\definehs= pace[tspace][4cm]
\setupframed[
=C2=A0 height=3Dfit,
=C2=A0 width= =3Dfit,
=C2=A0 location=3Dmiddle,
=C2=A0 frame=3Doff,
=C2=A0 alig= n=3Dnormal,
=C2=A0 offset=3Dnone,
]
\startsetups list:toclist
= =C2=A0 {\hbox to \hsize \bgroup
=C2=A0 \hspace[tspace]
=C2=A0 \framed= [width=3D10mm,align=3Dflushleft]{\symbol[itemize:toc]}%
=C2=A0 \framed[e= mpty=3Dyes]{\currentlistentrynumber\currentlistentrypagenumber}%
=C2=A0 = \doifelse\currentlistentrylocation{\namedstructureheadlocation{section}}{%<= br>=C2=A0 =C2=A0 \framed[align=3Dflushright,]{{\bfb\currentlistentrytitle}}= %
=C2=A0 }{\framed[align=3Dflushright,]{\currentlistentrytitle}}
=C2= =A0 \egroup}
\stopsetups



=C2=A0\definemakeup
=C2=A0 [t= oc]
=C2=A0 [
=C2=A0 =C2=A0 doublesided=3Dno,
=C2=A0 =C2=A0 page=3D= yes,
=C2=A0 =C2=A0 bottom=3D,
=C2=A0 =C2=A0 top=3D,
=C2=A0 =C2=A0 = pagestate=3Dstart,
=C2=A0 =C2=A0 headerstate=3Dempty,
=C2=A0 =C2=A0 f= ooterstate=3Dempty,
=C2=A0 =C2=A0 setups=3D{toclist},
=C2=A0 =C2=A0 b= efore=3D\setups{toc:setups},
=C2=A0 ]
\startsetups toc:setups
=C2= =A0 \setupbackgrounds[page][background=3Dcolor, backgroundcolor=3Dblue]
= \stopsetups

=C2=A0\definemakeup
=C2=A0 [standard]
=C2=A0 [
= =C2=A0 =C2=A0 doublesided=3Dno,
=C2=A0 =C2=A0 page=3Dright,
=C2=A0 = =C2=A0 pagestate=3Dstart,
=C2=A0 =C2=A0 headerstate=3Dempty,
=C2=A0 = =C2=A0 footerstate=3Dempty,
=C2=A0 =C2=A0 before=3D\setups{standard:setu= ps},
=C2=A0 ]
=C2=A0
=C2=A0\startsetups standard:setups
=C2=A0 = =C2=A0 \setupbackgrounds[page][background=3Dcolor, backgroundcolor=3Dlightg= ray]
=C2=A0\stopsetups

=C2=A0\define\TOC{
=C2=A0 \starttocmake= up
=C2=A0 \stoptocmakeup
=C2=A0}

\starttext

\startstand= ardmakeup
=C2=A0 \title{Your Title Here}
\stopstandardmakeup

\= startsection[title=3D{Motivation}]
\TOC
\startitemize

\item so= mething cool
\item something else cool

\stopitemize
\stopsect= ion

\startsection[title=3D{Main strands of theory}]
\TOC
\star= titemize

\item another cool thing
\item cool too

\stopit= emize
\stopsection


\stoptext

Tha= nks in advance.

Jethro
--00000000000018ddf105fb575781-- --===============7734692087491260725== 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://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___________________________________________________________________________________ --===============7734692087491260725==--