From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/101146 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: referencing and stoppers Date: Sat, 30 Jun 2018 12:20:57 +0200 Message-ID: <5B375989.1020107@gmail.com> References: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4069440337385797017==" X-Trace: blaine.gmane.org 1530353967 10076 195.159.176.226 (30 Jun 2018 10:19:27 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 30 Jun 2018 10:19:27 +0000 (UTC) User-Agent: Postbox 5.0.25 (Macintosh/20180328) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Jun 30 12:19:23 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 1fZCyQ-0002WI-C8 for gctc-ntg-context-518@m.gmane.org; Sat, 30 Jun 2018 12:19:22 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 179253B98C; Sat, 30 Jun 2018 12:21:13 +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 VmE6vOl2KW10; Sat, 30 Jun 2018 12:21:12 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 576BC3B993; Sat, 30 Jun 2018 12:21:12 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 48D343B991 for ; Sat, 30 Jun 2018 12:21:11 +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 1wMQQxTeCxxJ for ; Sat, 30 Jun 2018 12:21:10 +0200 (CEST) Original-Received: from mail-wr0-f170.google.com (mail-wr0-f170.google.com [209.85.128.170]) (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 91ABA3B98C for ; Sat, 30 Jun 2018 12:21:00 +0200 (CEST) Original-Received: by mail-wr0-f170.google.com with SMTP id c13-v6so11006252wrq.2 for ; Sat, 30 Jun 2018 03:21:00 -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=RNCF4tm8nbPLCcgLsWEp/wy20DA+coKgbMQEAH8sguU=; b=nplgFm0r5tzhTxcyflyh22tKVqCBygwSTRseRnfNCb1OkUPD6uupX7z1HRFHQZhm/Y L1xJIsUSns6zmYgWLwGGK65XroeZBkkvcxuFRNTQkmbPevs0TFo8ctWyA87ArfrXgtgT JdOWH2CnFWFkK68EiNKRTG6zhIDCY7Nze64230B0kMnrXyWIw56Wp0cPgQGhug3lhFDa gu9e6KFHAy+4+725nKUaB3u6R1egx2aBkciyvwztKUoQXJRrLafK1nUkawkdbgYPxJOW /pduBYkzZeNu0w9NOIFj4/zXlzlgsvRcZE7jrO6mBvixSYvnELhcx358PTCq+mHxF2Va 4HLw== 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=RNCF4tm8nbPLCcgLsWEp/wy20DA+coKgbMQEAH8sguU=; b=eb4Q0CjOE2H1uOVpq0CUytaNekkdeeVld++xm7pooXSQnDJpyWH9kc1AX7a7CspdHe NcUNIehOPg+BDGJk14HQJu4uL3o805/N9n/b9quUPMOvkigAHay11nEYvQAmBXRgxOj/ 3npmTfhUXTXbC9cemoqMPzNBsERvVWkbxi2eaR8i3CUwYvL8YPxH+654K0hlR7QFTGBP IjA0UMvA1sDSRM6vjp1H4eKqf4vC2kNuxRZ03AhLE291lM/phMSOdOne0PAo6Uy6HalU +53Il3tqo/+KhHhNSitHZ+Dy8EbWiqTt0fZkYi0AyzU2kzatnlVUeg/KJbkXFtezo9bW GlUA== X-Gm-Message-State: APt69E39ur8Lz0Lub0FUhLnhUzOD89za8m2CqKH0Th+PIIZOunq+yEIo vH+wPFFnRNMN1Nn9q9pLc5uFQx0h X-Google-Smtp-Source: AAOMgpcfokMQy7oieVm4RUzlE8FUf4ybrx4kqHccK5k57nQjT9oXbXQTd1BvgTHPn2gdJnojSAkHTA== X-Received: by 2002:a5d:478d:: with SMTP id w13-v6mr13767576wrq.188.1530354060059; Sat, 30 Jun 2018 03:21:00 -0700 (PDT) Original-Received: from [192.168.1.12] (x4dbd62c3.dyn.telefonica.de. [77.189.98.195]) by smtp.gmail.com with ESMTPSA id d10-v6sm1531130wrq.76.2018.06.30.03.20.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 30 Jun 2018 03:20:59 -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:101146 Archived-At: This is a multi-part message in MIME format. --===============4069440337385797017== Content-Type: multipart/alternative; boundary="------------020806010900030200080703" This is a multi-part message in MIME format. --------------020806010900030200080703 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit You can use the \setupreferencestructureprefix command set a different value for the stopper but you have to ensure the key takes a value because a empty argument is ignored. Instead of the argument I used in my example (\symbol[none]) you can also use a unicode character without width, e.g. \zerowidthspace. \setupreferencestructureprefix [section] [default] [prefixstopper={\symbol[none]}] %\setupreferencestructureprefix [section] [default] [prefixstopper=\zerowidthspace] 1. Argument: section name -> section == \section / \startsection 2. Argument: reference type -> default == \in 3. Argument: settings which differ from \setuphead Wolfgang > Idris Samawi Hamid ادريس سماوي حامد > 29. Juni 2018 um 16:22 > Dear gang, > > For, e.g., \setuphead[...][alternative=text], one often wants the > stopper to appear in the main text sectioning but not in the > references to those sections. For example (attached and below): > > ======= > \setuphead[chapter] [alternative=normal] > \setuphead[subsection][alternative=text] > \setuphead[subsection][distance=0em, > textdistance=0.7em, > sectionstopper=., > criterium=local] > \setupwhitespace[big] > \starttext > > \startchapter[title={First},reference={}] > \startsubsection[title={},reference={reference1}] > \input ward > > See \in{Sections}[reference3] and \in{Section}[reference4]. > \stopsubsection > \startsubsection[title={},reference={reference2}] > \input ward > \stopsubsection > \stopchapter > > \startchapter[title={Second}] > \startsubsection[title={},reference={reference3}] > \input ward > \stopsubsection > \startsubsection[title={},reference={reference4}] > \input ward > > See \in{Sections}[reference1] and \in{Section}[reference2]. > \stopsubsection > \stopchapter > \stoptext > ======= > > See Sections 2.1. and Section 2.2.. > See Sections 1.1. and Section 1.2.. > > SHOULD BE > > See Sections 2.1 and Section 2.2. > See Sections 1.1 and Section 1.2. > > Is there a straightforward way to remove the stopper from the \in > reference while maintaining it in the main sectioning but removing it > in the referencing? > > If there is no straightforward way, what is the best workaround? > > As mentioned at the outset, this is not an uncommon scenario. If there > is no straightforward way, would like to make it a feature request. > > Thank you in advance for your help. > > Idris > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry > to the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ --------------020806010900030200080703 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit You can use the \setupreferencestructureprefix command set a different value for
the stopper but you have to ensure the key takes a value because a empty
argument is ignored. Instead of the argument I used in my example (\symbol[none])
you can also use a unicode character without width, e.g. \zerowidthspace.


\setupreferencestructureprefix [section] [default] [prefixstopper={\symbol[none]}]
%\setupreferencestructureprefix [section] [default] [prefixstopper=\zerowidthspace]

  1. Argument: section name -> section == \section / \startsection
  2. Argument: reference type -> default == \in
  3. Argument: settings which differ from \setuphead


Wolfgang
Dear gang,

For, e.g., \setuphead[...][alternative=text], one often wants the stopper to appear in the main text sectioning but not in the references to those sections. For example (attached and below):

=======
\setuphead[chapter]   [alternative=normal]
\setuphead[subsection][alternative=text]
\setuphead[subsection][distance=0em,
                       textdistance=0.7em,
                       sectionstopper=.,
                       criterium=local]
\setupwhitespace[big]
\starttext

\startchapter[title={First},reference={}]
\startsubsection[title={},reference={reference1}]
\input ward

See \in{Sections}[reference3] and \in{Section}[reference4].
\stopsubsection
\startsubsection[title={},reference={reference2}]
\input ward
\stopsubsection
\stopchapter

\startchapter[title={Second}]
\startsubsection[title={},reference={reference3}]
\input ward
\stopsubsection
\startsubsection[title={},reference={reference4}]
\input ward

See \in{Sections}[reference1] and \in{Section}[reference2].
\stopsubsection
\stopchapter
\stoptext
=======

See Sections 2.1. and Section 2.2..
See Sections 1.1. and Section 1.2..

SHOULD BE

See Sections 2.1 and Section 2.2.
See Sections 1.1 and Section 1.2.

Is there a straightforward way to remove the stopper from the \in reference while maintaining it in the main sectioning but removing it in the referencing?

If there is no straightforward way, what is the best workaround?

As mentioned at the outset, this is not an uncommon scenario. If there is no straightforward way, would like to make it a feature request.

Thank you in advance for your help.

Idris
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________

--------------020806010900030200080703-- --===============4069440337385797017== 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 --===============4069440337385797017==--