ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* mathmatrix and grid
@ 2016-09-30 21:01 Henri Menke
  2016-10-08 18:02 ` Henri Menke
  2016-10-10  9:24 ` Wolfgang Schuster
  0 siblings, 2 replies; 6+ messages in thread
From: Henri Menke @ 2016-09-30 21:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Dear list,

I noticed that when using grid=both then the height of a mathmatrix is rounded down for no apparent reason whereas the depth is rounded up correctly.  Visually it appears to me that the height should be rounded up here.  In the MWE I added a \vrule to show that the determined height of the line definitely does not coincide with what one would expect.

How can I fix that?  MWE is below.

Cheers, Henri

---

\setuplayout[grid=both]
\showgrid

\starttext

\input knuth
\startformula
  \vrule % make lineheight and depth visible
  \startmathmatrix
    \NC A \NR
    \NC B \NR
    \NC C \NR
  \stopmathmatrix
\stopformula
\input tufte

\stoptext
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: mathmatrix and grid
  2016-09-30 21:01 mathmatrix and grid Henri Menke
@ 2016-10-08 18:02 ` Henri Menke
  2016-10-10  9:24 ` Wolfgang Schuster
  1 sibling, 0 replies; 6+ messages in thread
From: Henri Menke @ 2016-10-08 18:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Bump

On 09/30/2016 11:01 PM, Henri Menke wrote:
> Dear list,
> 
> I noticed that when using grid=both then the height of a mathmatrix is rounded down for no apparent reason whereas the depth is rounded up correctly.  Visually it appears to me that the height should be rounded up here.  In the MWE I added a \vrule to show that the determined height of the line definitely does not coincide with what one would expect.
> 
> How can I fix that?  MWE is below.
> 
> Cheers, Henri
> 
> ---
> 
> \setuplayout[grid=both]
> \showgrid
> 
> \starttext
> 
> \input knuth
> \startformula
>   \vrule % make lineheight and depth visible
>   \startmathmatrix
>     \NC A \NR
>     \NC B \NR
>     \NC C \NR
>   \stopmathmatrix
> \stopformula
> \input tufte
> 
> \stoptext
> 

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: mathmatrix and grid
  2016-09-30 21:01 mathmatrix and grid Henri Menke
  2016-10-08 18:02 ` Henri Menke
@ 2016-10-10  9:24 ` Wolfgang Schuster
  2016-10-10  9:44   ` Henri Menke
  1 sibling, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2016-10-10  9:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen


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

> Henri Menke <mailto:henrimenke@gmail.com>
> 30. September 2016 um 23:01
> Dear list,
>
> I noticed that when using grid=both then the height of a mathmatrix is 
> rounded down for no apparent reason whereas the depth is rounded up 
> correctly. Visually it appears to me that the height should be rounded 
> up here. In the MWE I added a \vrule to show that the determined 
> height of the line definitely does not coincide with what one would 
> expect.
>
> How can I fix that? MWE is below.
>
> Cheers, Henri
>
> ---
>
> \setuplayout[grid=both]
> \showgrid
>
> \starttext
>
> \input knuth
> \startformula
> \vrule % make lineheight and depth visible
> \startmathmatrix
> \NC A \NR
> \NC B \NR
> \NC C \NR
> \stopmathmatrix
> \stopformula
> \input tufte
>
> \stoptext
The default spacing modell (3) before and after formulas breaks grid 
alignment
because when you use another alternative (1 or 2) the alignment is correct.


%\setconstantvalue{c_strc_formulas_space_model}{1}
\setconstantvalue{c_strc_formulas_space_model}{2}
%\setconstantvalue{c_strc_formulas_space_model}{3}% default value

\setuplayout[grid=yes]

\showgrid

\starttext

\input knuth
\startformula
x
\stopformula
\input tufte

\stoptext

Wolfgang

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

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: mathmatrix and grid
  2016-10-10  9:24 ` Wolfgang Schuster
@ 2016-10-10  9:44   ` Henri Menke
  2016-10-10 10:30     ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Henri Menke @ 2016-10-10  9:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 10/10/2016 11:24 AM, Wolfgang Schuster wrote:
>> Henri Menke <mailto:henrimenke@gmail.com>
>> 30. September 2016 um 23:01
>> Dear list,
>>
>> I noticed that when using grid=both then the height of a mathmatrix is rounded down for no apparent reason whereas the depth is rounded up correctly. Visually it appears to me that the height should be rounded up here. In the MWE I added a \vrule to show that the determined height of the line definitely does not coincide with what one would expect.
>>
>> How can I fix that? MWE is below.
>>
>> Cheers, Henri
>>
>> ---
>>
>> \setuplayout[grid=both]
>> \showgrid
>>
>> \starttext
>>
>> \input knuth
>> \startformula
>> \vrule % make lineheight and depth visible
>> \startmathmatrix
>> \NC A \NR
>> \NC B \NR
>> \NC C \NR
>> \stopmathmatrix
>> \stopformula
>> \input tufte
>>
>> \stoptext
> The default spacing modell (3) before and after formulas breaks grid alignment
> because when you use another alternative (1 or 2) the alignment is correct.

Dear Wolfgang,

I appreciate your efforts but this does not change anything in my original example.  For reference, I include my updated example

%\setconstantvalue{c_strc_formulas_space_model}{1}
\setconstantvalue{c_strc_formulas_space_model}{2}
%\setconstantvalue{c_strc_formulas_space_model}{3}% default value

\setuplayout[grid=both]

\showgrid

\starttext

\input knuth
\startformula
\vrule % make lineheight and depth visible
\startmathmatrix
\NC A \NR
\NC B \NR
\NC C \NR
\stopmathmatrix
\stopformula
\input tufte

\stoptext

Cheers, Henri

> 
> 
> %\setconstantvalue{c_strc_formulas_space_model}{1}
> \setconstantvalue{c_strc_formulas_space_model}{2}
> %\setconstantvalue{c_strc_formulas_space_model}{3}% default value
> 
> \setuplayout[grid=yes]
> 
> \showgrid
> 
> \starttext
> 
> \input knuth
> \startformula
> x
> \stopformula
> \input tufte
> 
> \stoptext
> 
> Wolfgang
> 
> 
> ___________________________________________________________________________________
> 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: mathmatrix and grid
  2016-10-10  9:44   ` Henri Menke
@ 2016-10-10 10:30     ` Wolfgang Schuster
  2016-10-10 11:54       ` Henri Menke
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2016-10-10 10:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

> Henri Menke <mailto:henrimenke@gmail.com>
> 10. Oktober 2016 um 11:44
> On 10/10/2016 11:24 AM, Wolfgang Schuster wrote:
>>> Henri Menke<mailto:henrimenke@gmail.com>
>>> 30. September 2016 um 23:01
>>> Dear list,
>>>
>>> I noticed that when using grid=both then the height of a mathmatrix is rounded down for no apparent reason whereas the depth is rounded up correctly. Visually it appears to me that the height should be rounded up here. In the MWE I added a \vrule to show that the determined height of the line definitely does not coincide with what one would expect.
>>>
>>> How can I fix that? MWE is below.
>>>
>>> Cheers, Henri
>>>
>>> ---
>>>
>>> \setuplayout[grid=both]
>>> \showgrid
>>>
>>> \starttext
>>>
>>> \input knuth
>>> \startformula
>>> \vrule % make lineheight and depth visible
>>> \startmathmatrix
>>> \NC A \NR
>>> \NC B \NR
>>> \NC C \NR
>>> \stopmathmatrix
>>> \stopformula
>>> \input tufte
>>>
>>> \stoptext
>> The default spacing modell (3) before and after formulas breaks grid alignment
>> because when you use another alternative (1 or 2) the alignment is correct.
>
> Dear Wolfgang,
>
> I appreciate your efforts but this does not change anything in my original example.  For reference, I include my updated example
>
You can add a grid setting for the formula itself, e.g.

     \setupformula[grid=tolerant]

but you should add a blank line before \startformula, otherwise the 
setting for formula is applied to the last paragraph before it.

Wolfgang

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

[-- Attachment #2: Type: text/plain, Size: 485 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: mathmatrix and grid
  2016-10-10 10:30     ` Wolfgang Schuster
@ 2016-10-10 11:54       ` Henri Menke
  0 siblings, 0 replies; 6+ messages in thread
From: Henri Menke @ 2016-10-10 11:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 10/10/2016 12:30 PM, Wolfgang Schuster wrote:
>> Henri Menke <mailto:henrimenke@gmail.com>
>> 10. Oktober 2016 um 11:44
>> On 10/10/2016 11:24 AM, Wolfgang Schuster wrote:
>>>> Henri Menke <mailto:henrimenke@gmail.com>
>>>> 30. September 2016 um 23:01
>>>> Dear list,
>>>>
>>>> I noticed that when using grid=both then the height of a mathmatrix is rounded down for no apparent reason whereas the depth is rounded up correctly. Visually it appears to me that the height should be rounded up here. In the MWE I added a \vrule to show that the determined height of the line definitely does not coincide with what one would expect.
>>>>
>>>> How can I fix that? MWE is below.
>>>>
>>>> Cheers, Henri
>>>>
>>>> ---
>>>>
>>>> \setuplayout[grid=both]
>>>> \showgrid
>>>>
>>>> \starttext
>>>>
>>>> \input knuth
>>>> \startformula
>>>> \vrule % make lineheight and depth visible
>>>> \startmathmatrix
>>>> \NC A \NR
>>>> \NC B \NR
>>>> \NC C \NR
>>>> \stopmathmatrix
>>>> \stopformula
>>>> \input tufte
>>>>
>>>> \stoptext
>>> The default spacing modell (3) before and after formulas breaks grid alignment
>>> because when you use another alternative (1 or 2) the alignment is correct.
>>
>> Dear Wolfgang,
>>
>> I appreciate your efforts but this does not change anything in my original example.  For reference, I include my updated example
>>
> You can add a grid setting for the formula itself, e.g.
> 
>     \setupformula[grid=tolerant]
> 
> but you should add a blank line before \startformula, otherwise the setting for formula is applied to the last paragraph before it.

Dear Wolfgang,

thanks again, this solution works nicely for me.  However, it only represents a workaround.  Do you think it is possible to patch it somehow in the core?  Perhaps the definition of the mathmatrix has to be adjusted somehow (in context/base/mkiv/math-ali.mkiv).

Cheers, Henri

> 
> Wolfgang
> 
> 
> ___________________________________________________________________________________
> 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2016-10-10 11:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-30 21:01 mathmatrix and grid Henri Menke
2016-10-08 18:02 ` Henri Menke
2016-10-10  9:24 ` Wolfgang Schuster
2016-10-10  9:44   ` Henri Menke
2016-10-10 10:30     ` Wolfgang Schuster
2016-10-10 11:54       ` Henri Menke

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