ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: hack needed (MkIV)
       [not found] <B7C3A1D3-BE06-475B-AF3E-441517DE1874@post.werksatz.com>
@ 2010-08-06 11:18 ` Hans Hagen
  2010-08-06 11:56   ` Steffen Wolfrum
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2010-08-06 11:18 UTC (permalink / raw)
  To: Steffen Wolfrum; +Cc: mailing list for ConTeXt users

On 6-8-2010 10:44, Steffen Wolfrum wrote:

> before coming to Brejlov I am just about to clean all my open threads regarding transition MkII->MkIV.
> One thing is still unanswered - related to grid mode:
>
> In MkII the example below rendered the same with or without grid mode.
> Now in MkIV the lineskiplimit is overruled by grid mode.

forget about comparing to mkii .. a completely different mechanism and 
behaviour will not be mkii compatible (different kind of control)

> But as I still have to use grid, and yet have to make sure that character clashes don't disturb the consistent interlinespace, I have a problem.

in grid mode interlinespace is ignores

> Looking through spac-ver.mkiv gave me the impression that lineskip related code is quite ... precarious.
> But maybe an unofficial hack is doable?

no hack needed

\enabletrackers[nodes.vsnapping]

\starttext % see spac-ver.mkiv: \definegridsnapping

     \switchtobodyfont[42pt] \setupinterlinespace[line=30pt]

     Big text\par written in\par three row

     \setuplayout[grid=strict] \setupinterlinespace[line=30pt]

     Big text\par written in\par three row

\stoptext

with 'yes' the line gets snapped to fit an extra line when too high 
(ht/dp ratio) and your first line is larger than the second and third
(try {yes,line} so see a variant).

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: hack needed (MkIV)
  2010-08-06 11:18 ` hack needed (MkIV) Hans Hagen
@ 2010-08-06 11:56   ` Steffen Wolfrum
  2010-08-06 12:02     ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Steffen Wolfrum @ 2010-08-06 11:56 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users

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


Am 06.08.2010 um 13:18 schrieb Hans Hagen:

> On 6-8-2010 10:44, Steffen Wolfrum wrote:
> 
>> before coming to Brejlov I am just about to clean all my open threads regarding transition MkII->MkIV.
>> One thing is still unanswered - related to grid mode:
>> 
>> In MkII the example below rendered the same with or without grid mode.
>> Now in MkIV the lineskiplimit is overruled by grid mode.
> 
> forget about comparing to mkii .. a completely different mechanism and behaviour will not be mkii compatible (different kind of control)
> 
>> But as I still have to use grid, and yet have to make sure that character clashes don't disturb the consistent interlinespace, I have a problem.
> 
> in grid mode interlinespace is ignores
> 
>> Looking through spac-ver.mkiv gave me the impression that lineskip related code is quite ... precarious.
>> But maybe an unofficial hack is doable?
> 
> no hack needed
> 
> \enabletrackers[nodes.vsnapping]
> 
> \starttext % see spac-ver.mkiv: \definegridsnapping
> 
>    \switchtobodyfont[42pt] \setupinterlinespace[line=30pt]
> 
>    Big text\par written in\par three row
> 
>    \setuplayout[grid=strict] \setupinterlinespace[line=30pt]
> 
>    Big text\par written in\par three row
> 
> \stoptext
> 
> with 'yes' the line gets snapped to fit an extra line when too high (ht/dp ratio) and your first line is larger than the second and third
> (try {yes,line} so see a variant).




sorry, but this is not what is needed (see attached pdf, please)
this tight interlinespace is not possible in MkIV when grid mode is on?

Steffen


[-- Attachment #2: grid_on.pdf --]
[-- Type: application/pdf, Size: 40979 bytes --]

[-- Attachment #3: Type: text/plain, Size: 486 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] 10+ messages in thread

* Re: hack needed (MkIV)
  2010-08-06 11:56   ` Steffen Wolfrum
@ 2010-08-06 12:02     ` Hans Hagen
  2010-08-06 12:22       ` Steffen Wolfrum
  2010-08-06 17:01       ` Steffen Wolfrum
  0 siblings, 2 replies; 10+ messages in thread
From: Hans Hagen @ 2010-08-06 12:02 UTC (permalink / raw)
  To: Steffen Wolfrum; +Cc: mailing list for ConTeXt users

On 6-8-2010 1:56, Steffen Wolfrum wrote:

> sorry, but this is not what is needed (see attached pdf, please)
> this tight interlinespace is not possible in MkIV when grid mode is on?

well, you want things on a grid ... if you don't want that don't use 
grid mode or snap a box on the grid and disable gridmode inside the box

alternatively you can define a grid instance where spacing is handled 
differently,

\setuplayout[grid=none]

you can define variants with different thresholds (for ht and dp), extra 
lines, etc

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: hack needed (MkIV)
  2010-08-06 12:02     ` Hans Hagen
@ 2010-08-06 12:22       ` Steffen Wolfrum
  2010-08-06 13:48         ` life insurance (was hack needed) MkIV Steffen Wolfrum
  2010-08-06 15:28         ` hack needed (MkIV) Hans Hagen
  2010-08-06 17:01       ` Steffen Wolfrum
  1 sibling, 2 replies; 10+ messages in thread
From: Steffen Wolfrum @ 2010-08-06 12:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen


Am 06.08.2010 um 14:02 schrieb Hans Hagen:

> On 6-8-2010 1:56, Steffen Wolfrum wrote:
> 
>> sorry, but this is not what is needed (see attached pdf, please)
>> this tight interlinespace is not possible in MkIV when grid mode is on?
> 
> well, you want things on a grid ... if you don't want that don't use grid mode or snap a box on the grid and disable gridmode inside the box



I just made a test: even without grid mode the "\lineskiplimit-\maxdimen" doesn't work in MkIV as expected.
Please run the example below: it will not show 10pt interlinespace.


\usetypescript[postscript]
\definetypeface[postscript][rm][serif][times][default]

\setupbodyfont[postscript,30pt]\setupinterlinespace[line=10pt]\lineskiplimit-\maxdimen

\starttext

\input tufte \par

\stoptext



Steffen
(ConTeXt  ver: 2010.08.04 13:11 MKIV)
___________________________________________________________________________________
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] 10+ messages in thread

* life insurance (was hack needed) MkIV
  2010-08-06 12:22       ` Steffen Wolfrum
@ 2010-08-06 13:48         ` Steffen Wolfrum
  2010-08-06 15:28         ` hack needed (MkIV) Hans Hagen
  1 sibling, 0 replies; 10+ messages in thread
From: Steffen Wolfrum @ 2010-08-06 13:48 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users


Am 06.08.2010 um 14:22 schrieb Steffen Wolfrum:

> 
> Am 06.08.2010 um 14:02 schrieb Hans Hagen:
> 
>> On 6-8-2010 1:56, Steffen Wolfrum wrote:
>> 
>>> sorry, but this is not what is needed (see attached pdf, please)
>>> this tight interlinespace is not possible in MkIV when grid mode is on?
>> 
>> well, you want things on a grid ... if you don't want that don't use grid mode or snap a box on the grid and disable gridmode inside the box


Sure, these minimal examples somehow look silly. But this is only because I try to make the problem clear in a minimal file.
In real life it is more serious and there it is nothing weird at all. Using "\lineskiplimit-\maxdimen" is more like a life insurance:

Given, you have a predefined interlinespace (eg. the publishing house told you). 
And, for several reasons you want/need to use grid mode.

Everything is set up fine and works nicely ... until on one page, there is a "g" and below is "É" (like in Étude).
Suddenly these two lines seem to have a bigger interline space!

You didn't expect this french word is used in your project. 
But the printer inspected the galley proofs and saw it.

That's really an awkward situation ...


And that's why I need this functionality in MkIV, too. 

Steffen
___________________________________________________________________________________
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] 10+ messages in thread

* Re: hack needed (MkIV)
  2010-08-06 12:22       ` Steffen Wolfrum
  2010-08-06 13:48         ` life insurance (was hack needed) MkIV Steffen Wolfrum
@ 2010-08-06 15:28         ` Hans Hagen
  1 sibling, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2010-08-06 15:28 UTC (permalink / raw)
  To: Steffen Wolfrum; +Cc: mailing list for ConTeXt users

On 6-8-2010 2:22, Steffen Wolfrum wrote:
> \usetypescript[postscript]
> \definetypeface[postscript][rm][serif][times][default]
>
> \setupbodyfont[postscript,30pt]\setupinterlinespace[line=10pt]\lineskiplimit-\maxdimen
>
> \starttext
>
> \input tufte \par
>
> \stoptext

this is because \starttext synchronizes a couple of settings, so you 
have to set the limit just before you need it (and then probably have to 
use it grouped and end the par in the group)

there are more primitive settings that sync regularly so don't depend on 
them being set persistent if you change their value

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: hack needed (MkIV)
  2010-08-06 12:02     ` Hans Hagen
  2010-08-06 12:22       ` Steffen Wolfrum
@ 2010-08-06 17:01       ` Steffen Wolfrum
  2010-08-06 17:40         ` Hans Hagen
  1 sibling, 1 reply; 10+ messages in thread
From: Steffen Wolfrum @ 2010-08-06 17:01 UTC (permalink / raw)
  To: Hans Hagen; +Cc: mailing list for ConTeXt users


Am 06.08.2010 um 14:02 schrieb Hans Hagen:

> On 6-8-2010 1:56, Steffen Wolfrum wrote:
> 
>> sorry, but this is not what is needed (see attached pdf, please)
>> this tight interlinespace is not possible in MkIV when grid mode is on?
> 
> well, you want things on a grid ... if you don't want that don't use grid mode or snap a box on the grid and disable gridmode inside the box
> 
> alternatively you can define a grid instance where spacing is handled differently,
> 
> \setuplayout[grid=none]
> 
> you can define variants with different thresholds (for ht and dp), extra lines, etc


Could you give an example on this (thresholds for ht and dp), please?


Indeed, the new options with grid mode are enormous. I just tried "local" and the result looks as desired. I only can't estimate what side-effects it might have in a real-life-project. 

What does "local" do here, as there are only global settings?!

\usetypescript[postscript]
\definetypeface[postscript][rm][serif][times][default]

\setupbodyfont[postscript,30pt]\setupinterlinespace[line=10pt]

\setuplayout[grid=local]

\starttext

\input tufte \par

\stoptext



Best, Steffen
___________________________________________________________________________________
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] 10+ messages in thread

* Re: hack needed (MkIV)
  2010-08-06 17:01       ` Steffen Wolfrum
@ 2010-08-06 17:40         ` Hans Hagen
  2010-08-06 18:22           ` Steffen Wolfrum
  0 siblings, 1 reply; 10+ messages in thread
From: Hans Hagen @ 2010-08-06 17:40 UTC (permalink / raw)
  To: Steffen Wolfrum; +Cc: mailing list for ConTeXt users

On 6-8-2010 7:01, Steffen Wolfrum wrote:

> Could you give an example on this (thresholds for ht and dp), please?

% none             don't enlarge
% halfline         enlarge by halfline/halfline
% line             enlarge by line/line
% strut            enlarge by ht/dp (default)
% first            align to top line
% last             align to bottom line
% mindepth         round depth down
% maxdepth         round depth up
% minheight        round height down
% maxheight        round height up
% local            use local interline space
% shift:-3tp       vertical shift within box

%D We're not downward compatible with \MKII !

\definegridsnapping[\v!normal]   [\v!maxheight,\v!maxdepth,\v!strut]
\definegridsnapping[\v!standard] [\v!maxheight,\v!maxdepth,\v!strut]
\definegridsnapping[\v!yes]      [\v!maxheight,\v!maxdepth,\v!strut]

\definegridsnapping[\v!strict]   [\v!maxdepth:0.8,\v!maxheight:0.8,\v!strut]
\definegridsnapping[\v!tolerant] [\v!maxdepth:1.2,\v!maxheight:1.2,\v!strut]

\definegridsnapping[\v!top]      [\v!minheight,\v!maxdepth,\v!strut]
\definegridsnapping[\v!bottom]   [\v!maxheight,\v!mindepth,\v!strut]
\definegridsnapping[\v!both]     [\v!minheight,\v!mindepth,\v!strut]

\definegridsnapping[\v!broad]    [\v!maxheight,\v!maxdepth,\v!strut,0.8] 
% maybe 0.85
\definegridsnapping[\v!fit]      [\v!maxheight,\v!maxdepth,\v!strut,1.2] 
% tight 0.15

\definegridsnapping[\v!first]    [\v!first]
\definegridsnapping[\v!last]     [\v!last]
\definegridsnapping[\v!high]     [\v!minheight,\v!maxdepth,\v!none]
\definegridsnapping[\v!low]      [\v!maxheight,\v!mindepth,\v!none]
\definegridsnapping[\v!line]     [\v!line]
\definegridsnapping[\v!strut]    [\v!strut]

\definegridsnapping[\v!max]      [\v!maxdepth,\v!maxheight,\v!strut]
\definegridsnapping[\v!min]      [\v!mindepth,\v!minheight,\v!strut]


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: hack needed (MkIV)
  2010-08-06 17:40         ` Hans Hagen
@ 2010-08-06 18:22           ` Steffen Wolfrum
  2010-08-08 16:27             ` Hans Hagen
  0 siblings, 1 reply; 10+ messages in thread
From: Steffen Wolfrum @ 2010-08-06 18:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen


Am 06.08.2010 um 19:40 schrieb Hans Hagen:

> On 6-8-2010 7:01, Steffen Wolfrum wrote:
> 
>> Could you give an example on this (thresholds for ht and dp), please?
> 
> % none             don't enlarge
> % halfline         enlarge by halfline/halfline
...


This I know, only I don't understand the syntax ;o)

Is this "0.8" the threshold you mentioned ...
\definegridsnapping[\v!strict]   [\v!maxdepth:0.8,\v!maxheight:0.8,\v!strut]

or "0.8" in here ...
\definegridsnapping[\v!broad]    [\v!maxheight,\v!maxdepth,\v!strut,0.8] 

Or is the second kind of abbreviation for the first?


And even more interesting: what does "local" do, I mean really?
"% local            use local interline space"

Do I have local interline space in my example? 
Why does it work the way I wanted it to do???


\usetypescript[postscript]
\definetypeface[postscript][rm][serif][times][default]

\setupbodyfont[postscript,30pt]\setupinterlinespace[line=10pt]

\setuplayout[grid=local]

\starttext

\input tufte \par

\stoptext




Steffen
___________________________________________________________________________________
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] 10+ messages in thread

* Re: hack needed (MkIV)
  2010-08-06 18:22           ` Steffen Wolfrum
@ 2010-08-08 16:27             ` Hans Hagen
  0 siblings, 0 replies; 10+ messages in thread
From: Hans Hagen @ 2010-08-08 16:27 UTC (permalink / raw)
  To: Steffen Wolfrum; +Cc: mailing list for ConTeXt users

On 6-8-2010 8:22, Steffen Wolfrum wrote:
>
> Am 06.08.2010 um 19:40 schrieb Hans Hagen:
>
>> On 6-8-2010 7:01, Steffen Wolfrum wrote:
>>
>>> Could you give an example on this (thresholds for ht and dp), please?
>>
>> % none             don't enlarge
>> % halfline         enlarge by halfline/halfline
> ....
>
>
> This I know, only I don't understand the syntax ;o)
>
> Is this "0.8" the threshold you mentioned ...
> \definegridsnapping[\v!strict]   [\v!maxdepth:0.8,\v!maxheight:0.8,\v!strut]
>
> or "0.8" in here ...
> \definegridsnapping[\v!broad]    [\v!maxheight,\v!maxdepth,\v!strut,0.8]
>
> Or is the second kind of abbreviation for the first?

indeed

in mkii we had all kind of keywords, here we have sets that provide more 
control

> And even more interesting: what does "local" do, I mean really?
> "% local            use local interline space"
>
> Do I have local interline space in my example?

normally grids will obey the global settings, local settings can be 
handy when building boxes with different spacing that then are snapped 
globally as a whole

(section heads already have a grid key for local settings and more 
constructs will have them0

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2010-08-08 16:27 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <B7C3A1D3-BE06-475B-AF3E-441517DE1874@post.werksatz.com>
2010-08-06 11:18 ` hack needed (MkIV) Hans Hagen
2010-08-06 11:56   ` Steffen Wolfrum
2010-08-06 12:02     ` Hans Hagen
2010-08-06 12:22       ` Steffen Wolfrum
2010-08-06 13:48         ` life insurance (was hack needed) MkIV Steffen Wolfrum
2010-08-06 15:28         ` hack needed (MkIV) Hans Hagen
2010-08-06 17:01       ` Steffen Wolfrum
2010-08-06 17:40         ` Hans Hagen
2010-08-06 18:22           ` Steffen Wolfrum
2010-08-08 16:27             ` Hans Hagen

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