From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/101108 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Align TOC section numbers flushright Date: Mon, 25 Jun 2018 22:20:03 +0200 Message-ID: <5B314E73.7090905@gmail.com> References: <5B313FD4.3070509@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2286601697802291210==" X-Trace: blaine.gmane.org 1529957911 28401 195.159.176.226 (25 Jun 2018 20:18:31 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 25 Jun 2018 20:18:31 +0000 (UTC) User-Agent: Postbox 5.0.25 (Macintosh/20180328) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Mon Jun 25 22:18:27 2018 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fXXwR-0007JY-6v for gctc-ntg-context-518@m.gmane.org; Mon, 25 Jun 2018 22:18:27 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 0630A3A3DA; Mon, 25 Jun 2018 22:20:19 +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 HWYgepZ-VhvU; Mon, 25 Jun 2018 22:20:18 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 40E6F3A3DC; Mon, 25 Jun 2018 22:20:18 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 45AD73A3DC for ; Mon, 25 Jun 2018 22:20:17 +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 A4aco3eCbiAr for ; Mon, 25 Jun 2018 22:20:16 +0200 (CEST) Original-Received: from mail-wm0-f50.google.com (mail-wm0-f50.google.com [74.125.82.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id B1CC43A3DA for ; Mon, 25 Jun 2018 22:20:06 +0200 (CEST) Original-Received: by mail-wm0-f50.google.com with SMTP id x6-v6so10623088wmc.3 for ; Mon, 25 Jun 2018 13:20:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=m7UFwDtXghKBTUCLWavINeVR+1SUut83kTeTrEgefFQ=; b=CiEKD7qDaYfFbN2sAoPyk6RHufnq+oMA/DCte0tXKaWVHFBiM5at197MvgQjMOj/8g Nj6xN2/KO1PvLL/r8bcP9peLuA9sT+n3LQSynBnLKiC0P3lH6JJAqTyobhM5rbKO+oY4 QArmJ8/pkEszOZnnY3e9OndYJhy5t6hBDi9uaPr6jhnrektSrolprivHEckqbQFmaVku Qgr7eORX27u7vFvVxci19cEqQ096cMiQs7+R63gQ80IiUYC1M3dMI2Ls7oEvxY5NI4as wshHjKDE2HL7xO+6UUhYCLi7duxY2Fsm/HzwxM0oAvWN6L6nYRl2FweNGguhjM87oHcC MK3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=m7UFwDtXghKBTUCLWavINeVR+1SUut83kTeTrEgefFQ=; b=EAYM06pFWGjxUCNFffCNGY4M2FSPHmMjNJuNM8yaoHTozNcc/ivLUnTQEXq5UMFi2h OVsra+59S8ncTcH/lvi3lXTkuaJCZklgaVqqhefu+AfyLU1gdtecSnvvL6EIUfD0IE2S Phi01N8ba+mcmug/UDRQIrLjJddcOOwyihjK9iRvrkT5XVNo3VzeSWZEV7+x9D/eH2wD MgCUwaCPZAs2sNfALaboU+7pKNHuvffHakAGp3oCcK7sKoSDHGp5NbZiQcy4NwUHI1Ci 2cUcIy/4VP7jAM5vQphM3lr15sTRh2BOy7P3zW0laqrlWdGqOlZ+jAQeidJU1pyTgYo5 3qxg== X-Gm-Message-State: APt69E2MoD+IfQ13fE8qpINVB0lsP+R6FR36lhVlHeYUagETLyN4H2GH tnp4jze4lRLkwAnA8YtalodlxFtN X-Google-Smtp-Source: AAOMgpeAzlfMBLroKpcONyMQyUF6a3Bi/GZ446KSJQAcCLZtlMp2ExUJNKWw/n9ziHMGPERs3Ub/vw== X-Received: by 2002:a1c:d483:: with SMTP id l125-v6mr1927315wmg.98.1529958006193; Mon, 25 Jun 2018 13:20:06 -0700 (PDT) Original-Received: from [192.168.1.12] (x5ce30e85.dyn.telefonica.de. [92.227.14.133]) by smtp.gmail.com with ESMTPSA id k17-v6sm191733wmc.23.2018.06.25.13.20.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 13:20:05 -0700 (PDT) In-Reply-To: X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 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.org gmane.comp.tex.context:101108 Archived-At: This is a multi-part message in MIME format. --===============2286601697802291210== Content-Type: multipart/alternative; boundary="------------090408080208000904050906" This is a multi-part message in MIME format. --------------090408080208000904050906 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit > Idris Samawi Hamid ادريس سماوي حامد > 25. Juni 2018 um 21:42 > On Mon, 25 Jun 2018 13:17:40 -0600, Wolfgang Schuster > wrote: > >> >> >> Idris Samawi Hamid ادريس سماوي حامد schrieb: >>> \setuphead[chapter] [conversion=R] >>> >>> \setuplist[chapter][width=2.8em] >>> >>> \definecombinedlist >>> [content] >>> [chapter] >>> [level=chapter, >>> alternative=c, >>> numberalign=flushright] >> >> Use \setuplist to change the numeralign setting, you need also a >> distance value. >> >> \setuplist >> [chapter] >> [alternative=c, >> width=2.8em, >> distance=1em, >> numberalign=flushright] > > Many thanks. Had come up with this awkward workaround: > > \define[1]\FLUSHRIGHT{\hfill#1\hbox to0.7em{}} > > \setuplist[chapter][width=2.8em] > \setuplist[chapter][stopper=.,numbercommand=\FLUSHRIGHT] > > Does the attached tex file look correct? > > \setuplist > [chapter] > [alternative=c, > width=1.85em, > distance=0.5em, > numberalign=flushright, > level=chapter] You can remove the level setting. > \definecombinedlist > [content] > [chapter] > > If one turns on \showframe, one sees that the width value does not > prevent crossing the left side of the textblock (a good thing). OTOH, > getting the TOC numerals to lineup with the left side is a matter of > trial and error. [width=1.85em comes close] > > And if the document is changed so that the wider roman numerals are > not needed, then one has to reset the width value, again by trial and > error. > > So is there a way to make the left side of the textblock flush with > the widest roman? It's by no means urgent, but sine we are supposed to > be able to automate nearly everything.. -) This isn’t supported but adding a sample key (which is supported by enumerations) where you can set a text which is used to calculate the width should be easy. >> The attached file shows which values are valid for \setupcombinedlist. > > Ah, our npp-4-context config files for calltips need updating, I have > > \definecombinedlist [NAME] > [LIST] > [INHERIT: \setuplist] > > but that should be > > \definecombinedlist [NAME] > [LIST] > [INHERIT: \setupcombinedlist] I have the changes only in my local files. Wolfang --------------090408080208000904050906 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On Mon, 25 Jun 2018 13:17:40 -0600, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:



Idris Samawi Hamid ادريس سماوي حامد schrieb:
\setuphead[chapter]   [conversion=R]

\setuplist[chapter][width=2.8em]

\definecombinedlist
[content]
[chapter]
[level=chapter,
alternative=c,
numberalign=flushright]

Use \setuplist to change the numeralign setting, you need also a
distance value.

\setuplist
   [chapter]
   [alternative=c,
    width=2.8em,
    distance=1em,
    numberalign=flushright]

Many thanks. Had come up with this awkward workaround:

\define[1]\FLUSHRIGHT{\hfill#1\hbox to0.7em{}}

\setuplist[chapter][width=2.8em]
\setuplist[chapter][stopper=.,numbercommand=\FLUSHRIGHT]

Does the attached tex file look correct?

\setuplist
  [chapter]
  [alternative=c,
   width=1.85em,
   distance=0.5em,
   numberalign=flushright,
   level=chapter]

You can remove the level setting.

\definecombinedlist
[content]
[chapter]

If one turns on \showframe, one sees that the width value does not prevent crossing the left side of the textblock (a good thing). OTOH, getting the TOC numerals to lineup with the left side is a matter of trial and error. [width=1.85em comes close]

And if the document is changed so that the wider roman numerals are not needed, then one has to reset the width value, again by trial and error.

So is there a way to make the left side of the textblock flush with the widest roman? It's by no means urgent, but sine we are supposed to be able to automate nearly everything.. -)

This isn’t supported but adding a sample key (which is supported by enumerations) where you can set a text which is used to calculate the width should be easy.

The attached file shows which values are valid for \setupcombinedlist.

Ah, our npp-4-context config files for calltips need updating, I have

\definecombinedlist [NAME]
[LIST]
[INHERIT: \setuplist]

but that should be

\definecombinedlist [NAME]
[LIST]
[INHERIT: \setupcombinedlist]

I have the changes only in my local files.

Wolfang
--------------090408080208000904050906-- --===============2286601697802291210== 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 X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============2286601697802291210==--