ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* setupitemgroup and 'command='
@ 2017-05-24 16:28 Thomas Floeren
  2017-05-24 17:31 ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Floeren @ 2017-05-24 16:28 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,


I used to use the “command=” parameter when setting up itemize. Now I noticed that it introduces a spurious horizontal whitespace after the item symbol when the item is of type “\sym{}”.

I also noticed that the problem goes away if I use “inner=” instead of “command=”.


Example:

\setuppapersize [A6] 

\starttext
\start
\setupitemize [each][command={\setupwhitespace[none]}]
With \type{\command=}
\startitemize 
\item \dorecurse{20}{bla } 
\sym{Y} \dorecurse{20}{bla } 
\stopitemize
\stop

\setupitemize [each][inner={\setupwhitespace[none]}]
With \type{\inner=}
\startitemize 
\item \dorecurse{20}{bla } 
\sym{Y} \dorecurse{20}{bla } 
\stopitemize

\stoptext


This is with ConTeXt 2017.05.15 21:48. With an older ConTeXt, for example 2015.01.13 15:54, “inner=” and “command=” deliver identical, correct results.

So, I’m asking, has “command=” been deprecated or is it just a bug?

Or was I using it the wrong way, and “inner=” is the only correct parameter in the example above?

Thanks for any info,
Best wishes,

– Tom


-- 
For macOS:
http://dflect.net/context-typeset-tool/


___________________________________________________________________________________
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: setupitemgroup and 'command='
  2017-05-24 16:28 setupitemgroup and 'command=' Thomas Floeren
@ 2017-05-24 17:31 ` Hans Hagen
  2017-05-24 20:03   ` Thomas Floeren
  0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2017-05-24 17:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Thomas Floeren

On 5/24/2017 6:28 PM, Thomas Floeren wrote:
> Hi,
> 
> 
> I used to use the “command=” parameter when setting up itemize. Now I noticed that it introduces a spurious horizontal whitespace after the item symbol when the item is of type “\sym{}”.
> 
> I also noticed that the problem goes away if I use “inner=” instead of “command=”.

command is applied to the text, try command=\WORD and after \sym is a 
space so it depends on what command does with it

> Example:
> 
> \setuppapersize [A6]
> 
> \starttext
> \start
> \setupitemize [each][command={\setupwhitespace[none]}]
> With \type{\command=}
> \startitemize
> \item \dorecurse{20}{bla }
> \sym{Y} \dorecurse{20}{bla }
> \stopitemize
> \stop
> 
> \setupitemize [each][inner={\setupwhitespace[none]}]
> With \type{\inner=}
> \startitemize
> \item \dorecurse{20}{bla }
> \sym{Y} \dorecurse{20}{bla }
> \stopitemize
> 
> \stoptext
> 
> 
> This is with ConTeXt 2017.05.15 21:48. With an older ConTeXt, for example 2015.01.13 15:54, “inner=” and “command=” deliver identical, correct results.
> 
> So, I’m asking, has “command=” been deprecated or is it just a bug?
> 
> Or was I using it the wrong way, and “inner=” is the only correct parameter in the example above?
\setupitemize [each][nowhite]


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
        tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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: setupitemgroup and 'command='
  2017-05-24 17:31 ` Hans Hagen
@ 2017-05-24 20:03   ` Thomas Floeren
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Floeren @ 2017-05-24 20:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hans, thanks for your swift reply…



> On 24. May 2017, at 19:31, Hans Hagen <pragma@wxs.nl> wrote:
> 
> On 5/24/2017 6:28 PM, Thomas Floeren wrote:
>> Hi,
>> I used to use the “command=” parameter when setting up itemize. Now I noticed that it introduces a spurious horizontal whitespace after the item symbol when the item is of type “\sym{}”.
>> I also noticed that the problem goes away if I use “inner=” instead of “command=”.
> 
> command is applied to the text, try command=\WORD and after \sym is a space so it depends on what command does with it


I see, \WORD does not introduce the whitespace. But I don’t understand why \setupwhitespace[none] should do anything with the space after \sym, what \WORD doesn’t do.


> 
>> Example:
>> \setuppapersize [A6]
>> \starttext
>> \start
>> \setupitemize [each][command={\setupwhitespace[none]}]
>> With \type{\command=}
>> \startitemize
>> \item \dorecurse{20}{bla }
>> \sym{Y} \dorecurse{20}{bla }
>> \stopitemize
>> \stop
>> \setupitemize [each][inner={\setupwhitespace[none]}]
>> With \type{\inner=}
>> \startitemize
>> \item \dorecurse{20}{bla }
>> \sym{Y} \dorecurse{20}{bla }
>> \stopitemize
>> \stoptext
>> This is with ConTeXt 2017.05.15 21:48. With an older ConTeXt, for example 2015.01.13 15:54, “inner=” and “command=” deliver identical, correct results.
>> So, I’m asking, has “command=” been deprecated or is it just a bug?
>> Or was I using it the wrong way, and “inner=” is the only correct parameter in the example above?
> \setupitemize [each][nowhite]


Tried that, but it does not the same as \setupwhitespace[none]. (It completely annihilates any whitespace.)

Compile this to see what I mean:



\definepapersize[Tmp][width=120mm,height=400mm]
\setuppapersize [Tmp]
\setupwhitespace[2\lineheight]

\startbuffer
bla, bla\crlf bla, bla 
\stopbuffer

\starttext

Normal text:

\getbuffer\par
\getbuffer

Itemize, unmodified:
\startitemize 
\item \getbuffer 
\sym{Y} \getbuffer 
\stopitemize

\start
\setupitemize [each][command={\setupwhitespace[none]}]
Itemize with \type{command={\setupwhitespace[none]}}:
\startitemize 
\item \getbuffer 
\sym{Y} \getbuffer 
\stopitemize
\stop

\start
\setupitemize [each][inner={\setupwhitespace[none]}]
Itemize with \type{inner={\setupwhitespace[none]}}:
\startitemize 
\item \getbuffer 
\sym{Y} \getbuffer 
\stopitemize
\stop

\start
\setupitemize [each][nowhite]
Itemize with \type{nowhite}:
\startitemize 
\item \getbuffer 
\sym{Y} \getbuffer 
\stopitemize
\stop

\stoptext


So it seems the only ways to get the desired result are either inner={\setupwhitespace[none]} or command={\setupwhitespace[none]}, where the first one seems to work correctly and the latter one introduces the whitespace with recent Betas. (well, recent = younger than 2 years or so)

Should I change all my existing documents to “inner”?


Thanks,
best,

– Tom

-- 
For macOS:	
http://dflect.net/context-typeset-tool/
___________________________________________________________________________________
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:[~2017-05-24 20:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-24 16:28 setupitemgroup and 'command=' Thomas Floeren
2017-05-24 17:31 ` Hans Hagen
2017-05-24 20:03   ` Thomas Floeren

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).