From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/112459 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joey McCollum via ntg-context Newsgroups: gmane.comp.tex.context Subject: Conditional formatting with *frontpart, *bodypart, *backpart modes Date: Thu, 12 Aug 2021 23:34:53 -0400 Message-ID: Reply-To: mailing list for ConTeXt users Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3157349953076653715==" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2963"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Joey McCollum To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 13 05:38:11 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 1mEO1J-0000Su-Ev for gctc-ntg-context-518@m.gmane-mx.org; Fri, 13 Aug 2021 05:38:09 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id D81A728668C; Fri, 13 Aug 2021 05:37:28 +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 G7-z9kQJYTFY; Fri, 13 Aug 2021 05:37:26 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id C0C6F28669D; Fri, 13 Aug 2021 05:37:26 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 8272F286696 for ; Fri, 13 Aug 2021 05:37:24 +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 xSnU6LP4WBW4 for ; Fri, 13 Aug 2021 05:37:22 +0200 (CEST) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.166.171; helo=mail-il1-f171.google.com; envelope-from=jmccollum20140511@gmail.com; receiver= Original-Received: from mail-il1-f171.google.com (mail-il1-f171.google.com [209.85.166.171]) (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 4553828668C for ; Fri, 13 Aug 2021 05:37:22 +0200 (CEST) Original-Received: by mail-il1-f171.google.com with SMTP id i4so9444721ila.1 for ; Thu, 12 Aug 2021 20:37:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=knVJXlWFNcfNw/U4yG9L0qSAIa4cC5hvv0ZSGH7NT84=; b=pnrSZBg3RjVhcxR7R5Vx0Lzj/44nZae9V/LgIK4WGPsVjkKoOviWdHi7v5t8BJfAts FIZQwOOq0Qnx4akG9aLEWvj9Gbx3Gczy4KSE0QNOfCpm7DnDLSj/dWW68PLAba8rJ/OD MyXnS5eTGvgoEhpz/1VBxWAVhJ9LyJvuH4nBrx+DYxhmNN6j1XtVzzh+P6C6VDaLEeEh YG6fRcNtqf0TSeKMuyGPsE5wypCDezeXjG+fohyc6spbNjXpkECIfA6hc+AAf/BA2iKq XMpPFeB8zAwqivLf67b0CHkV1RSZOrXfXTZo2gO8+E/hIAxX7GTA3dLZIRq7beQpdZbV 11Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=knVJXlWFNcfNw/U4yG9L0qSAIa4cC5hvv0ZSGH7NT84=; b=PjN78LxxUBKfLb5+4tj0uGapZQvnBLpO+aZVWnCoWeQwdaFOFitdsaDmyiw3LkqSzW zFxcQhxbekFumgj3OzNEnDEnJtKLAZ90UuZO9IhvNbQFnojgQMnTMyD27RR4j0hVWVWD U3+YwsvLiicieyWOvbRiRscXpr/yvHeZMLukw143dnJ1sxK0Xk6jYKKqNo90peFVSu2+ fE/1uKi6jXW6Z04DHVCrnewvSwnUb9gy0N+USc1sbZNjJll4mRXd5mUo6Pqo8AZOZblJ zfP3auXwVVTroLj4x9EWypLkX8jB8pftbhBAuqTdnMxgwJ1jfUj3a7XFZ2Z0VMMLycel RP1Q== X-Gm-Message-State: AOAM533hjrY+mdvj132FAM26d6uDYvkP/DAUsmDPaOiHu0IDBQxRlcLT SmAJqafEj+yc8fXtdmMakM+PybWqq3z1p1AWi0Q0yKTcako= X-Google-Smtp-Source: ABdhPJyx3pawE6gAiopgBFebItrGGVJVfst09poNzeRJdEU+VIF4Dv9lmdRtwSTMW9FPjwIiqTCM9ZXKsJN0LzW0erI= X-Received: by 2002:a92:6a0d:: with SMTP id f13mr350523ilc.212.1628825840162; Thu, 12 Aug 2021 20:37:20 -0700 (PDT) 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:112459 Archived-At: --===============3157349953076653715== Content-Type: multipart/alternative; boundary="0000000000009a9b1205c96891da" --0000000000009a9b1205c96891da Content-Type: text/plain; charset="UTF-8" Hi, I was curious about the possibility of handling general formatting settings (e.g., page layout, headers and footers, page numbering, alignment, default body font assignment, etc.) conditionally for front, body, and back matter using modes. According to the wiki page at https://wiki.contextgarden.net/Modes, this should be doable with blocks like \startmode[*frontpart] ... \stopmode, but even in the following minimal example, the conditional formatting isn't getting applied: ``` \startmode[*frontpart] \setupbodyfont[modern, 12pt] \stopmode \startmode[*bodypart] \setupbodyfont[pagella, 12pt] \stopmode \startmode[*backpart] \setupbodyfont[termes, 12pt] \stopmode \starttext \startfrontmatter \input knuth\par \stopfrontmatter \startbodymatter \input knuth\par \stopbodymatter \startbackmatter \input knuth\par \stopbackmatter \stoptext ``` Is there something obvious that I'm missing? Or is there a different recommended approach to conditional formatting by front/body/back matter division? Thank you! Joey --0000000000009a9b1205c96891da Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

I was curious about the possibility= of handling general formatting settings (e.g., page layout, headers and fo= oters, page numbering, alignment, default body font assignment, etc.) condi= tionally for front, body, and back matter using modes. According to the wik= i page at=C2=A0https://wik= i.contextgarden.net/Modes, this should be doable with blocks like \star= tmode[*frontpart] ... \stopmode, but even in the following minimal example,= the conditional formatting isn't getting applied:

```

\startmode[*frontpart]

\setupbodyfont[modern, 12pt]<= /p>

\stopmode

\startmode[*bodypart]

\setupbodyfont[pagella, 12pt]=

\stopmode

\startmode[*backpart]

\setupbodyfont[termes, 12pt]<= /p>

\stopmode


\starttext

\startfrontmatter

\input knuth\par

\stopfrontmatter

\startbodymatter

\input knuth\par

\stopbodymatter

\startbackmatter

\input knuth\par

\stopbackmatter

\stoptext

```

Is the= re something obvious that I'm missing? Or is there a different recommen= ded approach to conditional formatting by front/body/back matter division?<= /div>

Thank you!

Joey
--0000000000009a9b1205c96891da-- --===============3157349953076653715== 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== --===============3157349953076653715==--