[NTG-context] Re: Why the way key-value argument is called affected the document's output?

2024-01-13 Thread Wolfgang Schuster

Ali Ali schrieb am 08.01.2024 um 23:53:

Since in the "setup-en.pdf" on p. 234, in "\setuplayout" the possible values for "grid" key is 
"yes", "no" (default), and "off" respectively.


The commands in the document are not always up to date and somtimes miss 
entries or list no longer valid ones, in this case the NAME placeholder 
is missing.



So what does the "yes " (with a trailing space) sets "grid" key to?


The expected behavior is to ignore invalid arguments and fall back to a 
default (in this case "no")option.


Wolfgang

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Why the way key-value argument is called affected the document's output?

2024-01-08 Thread Ali Ali
Since in the "setup-en.pdf" on p. 234, in "\setuplayout" the possible values 
for "grid" key is "yes", "no" (default), and "off" respectively.

So what does the "yes " (with a trailing space) sets "grid" key to?

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Why the way key-value argument is called affected the document's output?

2024-01-08 Thread Wolfgang Schuster

Ali Ali schrieb am 08.01.2024 um 23:33:

So is
"\setuplayout[grid=yes]"
AND
"\setuplayout[
grid=yes
]"
not same?

I mean, we are initializing "grid" to "yes" in both cases.


No, in the first case you end the value of the grid-key with ] which 
results in "yes" as argument but in the second case you have a linebreak 
before ] which adds a space to the argument which results in "yes " 
(with a trailing space) as argument.


Wolfgang

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Why the way key-value argument is called affected the document's output?

2024-01-08 Thread Ali Ali
So is
"\setuplayout[grid=yes]"
AND
"\setuplayout[
grid=yes
]"
not same?

I mean, we are initializing "grid" to "yes" in both cases.

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

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: Why the way key-value argument is called affected the document's output?

2024-01-08 Thread Hans Hagen

On 1/8/2024 11:05 PM, 1114...@gmail.com wrote:

Hi,

I was cleaning and formatting my context file and then when I compiled it, the 
output I got introduced extra vertical spacings at the section headings that 
weren't there in the previous compilations. I had to spend enormous amount of 
time trying to fix it so to emulate my previous outputs. Turns out the problem 
was how I called one of the key-value argument in the document.

I really wanna know the reason why it did influenced the output?

Provided below is the minimal source code (and it is producing different 
outputs, meaning the vertical spacings are not same, on my device running the 
version released in the September and also tested with the latest release.)


"""
%% differences in outputs, for how "grid=yes" is called.

%% Type 1.
%\setuplayout[grid=yes]


Here you set the grid variable to "yes".


%% Type 2.
%\setuplayout[
%grid=yes
%]


Here you set the grid variable to "yes " so a trailing space.


\setuphead[section][grid=low] %% needed to observe the output difference
\starttext

\title{Alpha}
\subsection{Beta}
\input{knuth}

\stoptext

So this is ok:

\setupfoo
 [a=A,
  b=B]

\setupfoo
 [a=A,
  b=B,
 ]

I'm not aware of funmdamental changes in the parse, apart from that in 
many setup commands one can now do this:


\setupfoo
  [A=\this[works],
   B=\that[doestoo]]

as nested brackets are handled.

Hans

-
  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 / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___