ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* referencing and stoppers
@ 2018-06-29 14:22 Idris Samawi Hamid ادريس سماوي حامد
  2018-06-30 10:20 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2018-06-29 14:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1722 bytes --]

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
-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512

[-- Attachment #2: section-space-text.pdf --]
[-- Type: application/pdf, Size: 12599 bytes --]

[-- Attachment #3: section-space-text.tex --]
[-- Type: application/x-tex, Size: 829 bytes --]

[-- Attachment #4: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: referencing and stoppers
  2018-06-29 14:22 referencing and stoppers Idris Samawi Hamid ادريس سماوي حامد
@ 2018-06-30 10:20 ` Wolfgang Schuster
  2018-06-30 13:02   ` Idris Samawi Hamid ادريس سماوي حامد
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2018-06-30 10:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3000 bytes --]

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 ادريس سماوي حامد <mailto:Idris.Hamid@colostate.edu>
> 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
> ___________________________________________________________________________________


[-- Attachment #1.2: Type: text/html, Size: 4695 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: referencing and stoppers
  2018-06-30 10:20 ` Wolfgang Schuster
@ 2018-06-30 13:02   ` Idris Samawi Hamid ادريس سماوي حامد
  0 siblings, 0 replies; 3+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2018-06-30 13:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sat, 30 Jun 2018 04:20:57 -0600, Wolfgang Schuster  
<schuster.wolfgang@gmail.com> wrote:

> 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

Many thanks, this is exactly what was needed!

Your replies and pointers are appreciated and not taken for granted.

Best wishes
Idris

>> Idris Samawi Hamid ادريس سماوي حامد <mailto:Idris.Hamid@colostate.edu>
>> 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
>> ___________________________________________________________________________________
>


-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-06-30 13:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-29 14:22 referencing and stoppers Idris Samawi Hamid ادريس سماوي حامد
2018-06-30 10:20 ` Wolfgang Schuster
2018-06-30 13:02   ` Idris Samawi Hamid ادريس سماوي حامد

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).