Re: [NTG-context] Alphabet & color

2020-07-31 Thread Marcus Vinicius Mesquita
Ok, after changing the glyph names in colorfont.lfg things run smoothly but
for six glyphs:

uacute, ucircumflex, udieresis, Uacute, Ucircumflex, Udieresis

Have I hit a bug?

Regards,

Marcus Vinicius

On Fri, Jul 31, 2020 at 3:00 PM Marcus Vinicius Mesquita <
marcusvinicius.mesqu...@gmail.com> wrote:

> Thank you, that was very helpful.
>
> Marcus Vinicius
>
>

-- 
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o corpo
nem seus membros, por ser descanso da alma, primavera do coração, distração
do aflito, entretenimento do solitário, e viático do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)


colorfont.lfg
Description: Binary data
\setupbodyfont[plex,22pt]

\definecolor[colorscheme:1:1][h=002776]  % a
\definecolor[colorscheme:1:2][h=009c3b]  % b
\definecolor[colorscheme:1:3][h=17737e]  % c
\definecolor[colorscheme:1:4][h=ff5733]  % d
\definecolor[colorscheme:1:5][h=493367]  % e
\definecolor[colorscheme:1:6][h=7c6d11]  % f
\definecolor[colorscheme:1:7][h=117c2a]  % g
\definecolor[colorscheme:1:8][h=6d109d]  % h
\definecolor[colorscheme:1:9][h=08d11a]  % i
\definecolor[colorscheme:1:10][h=a81163] % j
\definecolor[colorscheme:1:11][h=7d2830] % k
\definecolor[colorscheme:1:12][h=2868d1] % l
\definecolor[colorscheme:1:13][h=2c11da] % m
\definecolor[colorscheme:1:14][h=cf47bb] % n
\definecolor[colorscheme:1:15][h=27bde2] % o
\definecolor[colorscheme:1:16][h=dc5777] % p
\definecolor[colorscheme:1:17][h=c28201] % q
\definecolor[colorscheme:1:18][h=ffdf00] % r
\definecolor[colorscheme:1:19][h=30a777] % s
\definecolor[colorscheme:1:20][h=722548] % t
\definecolor[colorscheme:1:21][h=ff00ff] % u
\definecolor[colorscheme:1:22][h=e0115f] % v
\definecolor[colorscheme:1:23][h=004c4c] % w
\definecolor[colorscheme:1:24][h=ae0001] % x
\definecolor[colorscheme:1:25][h=696966] % y
\definecolor[colorscheme:1:26][h=7bb3ff] % z

\definefontfeature
   [MyFeaturesA] [default]
   [goodies={colorfont},colorscheme=default]

\definefont[MyFontA][SerifBold*MyFeaturesA]

\starttext

\setfontcolorscheme[1]
\MyFontA
\startlines
aàáâãäå AÀÁÂÃÄÅ
eèéêë EÈÉÊË
iìíîï IÌÍÎÏ
oòóôõö OÒÓÔÕÖ
uùúûü UÙÚÛÜ

\stoptext


mwe.pdf
Description: Adobe PDF document
___
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
___


Re: [NTG-context] Alphabet & color

2020-07-31 Thread Marcus Vinicius Mesquita
Thank you, that was very helpful.

Marcus Vinicius
___
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
___


Re: [NTG-context] Alphabet & color

2020-07-31 Thread Hans Hagen

On 7/31/2020 5:06 PM, Marcus Vinicius Mesquita wrote:

Hi, again

With the suggestions you gave I managed to obtain the functionality I 
need, almost.
Somehow letters with accents like á ã é ó õ and also ç don't get the 
same color of the base letters given in the colorfont.lfg below:


return {
      name = "coloralphabet",
      colorschemes = {
          default = {
          [1] = { "A", "a", "á", "ã", "å", "à", "ä" },
          [2] = { "b", "B" },
          [3] = { "c", "ç", "C", "Ç" },
          [4] = { "d", "D" },
          [5] = { "e", "E" },
          [6] = { "f", "F" },
          [7] = { "g", "G" },
          [8] = { "h", "H" },
          [9] = { "i", "í", "ì", "I", "Í", "Ì" },
          [10] = { "j", "J" },
          [11] = { "k", "K" },
          [12] = { "l", "L" },
          [13] = { "m", "M" },
          [14] = { "n", "ñ", "N", "Ñ" },
          [15] = { "o", "ó", "õ", "ö", "O", "Ó", "Õ", "Ö"  },
          [16] = { "p", "P" },
          [17] = { "q", "Q" },
          [18] = { "r", "R" },
          [19] = { "s", "S" },
          [20] = { "t", "T" },
          [21] = { "u", "ù", "ú", "ü", "U", "Ù", "Ú", "Ü" },
          [22] = { "v", "V" },
          [23] = { "w", "W" },
          [24] = { "x", "X" },
          [25] = { "y", "Y" },
          [26] = { "z", "Z" },
          },
      }
}

The MWE follows below:

\setupbodyfont[plex,22pt]

\definecolor[colorscheme:1:1][h=002776]  % a
\definecolor[colorscheme:1:2][h=009c3b]  % b
\definecolor[colorscheme:1:3][h=17737e]  % c
\definecolor[colorscheme:1:4][h=ff5733]  % d
\definecolor[colorscheme:1:5][h=493367]  % e
\definecolor[colorscheme:1:6][h=7c6d11]  % f
\definecolor[colorscheme:1:7][h=117c2a]  % g
\definecolor[colorscheme:1:8][h=6d109d]  % h
\definecolor[colorscheme:1:9][h=08d11a]  % i
\definecolor[colorscheme:1:10][h=a81163] % j
\definecolor[colorscheme:1:11][h=7d2830] % k
\definecolor[colorscheme:1:12][h=2868d1] % l
\definecolor[colorscheme:1:13][h=2c11da] % m
\definecolor[colorscheme:1:14][h=cf47bb] % n
\definecolor[colorscheme:1:15][h=27bde2] % o
\definecolor[colorscheme:1:16][h=dc5777] % p
\definecolor[colorscheme:1:17][h=c28201] % q
\definecolor[colorscheme:1:18][h=ffdf00] % r
\definecolor[colorscheme:1:19][h=30a777] % s
\definecolor[colorscheme:1:20][h=722548] % t
\definecolor[colorscheme:1:21][h=ff00ff] % u
\definecolor[colorscheme:1:22][h=e0115f] % v
\definecolor[colorscheme:1:23][h=004c4c] % w
\definecolor[colorscheme:1:24][h=ae0001] % x
\definecolor[colorscheme:1:25][h=696966] % y
\definecolor[colorscheme:1:26][h=7bb3ff] % z

\definefontfeature
    [MyFeaturesA] [default]
    [goodies={colorfont},colorscheme=default]

\definefont[MyFontA][SerifBold*MyFeaturesA]

\starttext

\setfontcolorscheme[1] {\MyFontA BRASIL brasil órfão ÓRFÃO mão MÃO bênção}

\stoptext

What needs to be changed?


glyph names ... "oacute" etc as used in plex


Greetings

Marcus Vinicius




--

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


[NTG-context] handle_error_hook in LuaMetaTeX

2020-07-31 Thread Marcel Fabian Krüger
Hi,

thanks for handling
f file consition in LuaMetaTeX. While playing with that, I encountered a
potential bug in the latest LuaMetaTeX version: If handle_error_hook is
executed and returns any number, LuaMetaTeX segfaults. (I'm pretty sure
that this still worked with the previous version) Minimal ConTeXt
example:

\enabledirectives[system.quitonerror=false]
\directlua{
  print(callbacks.register('handle_error_hook', function(...)
return 3
  end))
}
\undefined % Trigger an error
\starttext
\stoptext

This triggers

[...]
system  > ConTeXt  ver: 2020.07.31 10:20 LMTX  fmt: 2020.7.31  int: 
english/english
[...]
tex error   > tex error on line 7 in file ./test_empty_input.tex: ! 
Undefined control sequence

l.7 \undefined
[...]
 9 \stoptext

segmentation fault (core dumped)  
/home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatexcont-yes.mkiv 

valgrind suggests that this is caused by an attempt to access a null
pointer:

==382632== Invalid write of size 4
==382632==at 0x1A581F: ??? (in 
/home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex)
==382632==by 0x1A662F: ??? (in 
/home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex)
==382632==by 0x14BAA8: ??? (in 
/home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex)
==382632==by 0x1DA50E: ??? (in 
/home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex)
==382632==by 0x1DA802: ??? (in 
/home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex)
==382632==by 0x15F956: ??? (in 
/home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex)
==382632==by 0x156E2E: ??? (in 
/home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex)
==382632==by 0x121E97: ??? (in 
/home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex)
==382632==by 0x4A16001: (below main) (in /usr/lib/libc-2.31.so)
==382632==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==382632== 
==382632== 
==382632== Process terminating with default action of signal 11 (SIGSEGV): 
dumping core
==382632==  Access not within mapped region at address 0x0
==382632==at 0x1A581F: ??? (in 
/home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex)
==382632==by 0x1A662F: ??? (in 
/home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex)
==382632==by 0x14BAA8: ??? (in 
/home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex)
==382632==by 0x1DA50E: ??? (in 
/home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex)
==382632==by 0x1DA802: ??? (in 
/home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex)
==382632==by 0x15F956: ??? (in 
/home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex)
==382632==by 0x156E2E: ??? (in 
/home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex)
==382632==by 0x121E97: ??? (in 
/home/marcel/lmtx-install/tex/texmf-linux-64/bin/luametatex)
==382632==by 0x4A16001: (below main) (in /usr/lib/libc-2.31.so)

That me know if you are interested in the coredump.

Best regards,
Marcel
___
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
___


Re: [NTG-context] Alphabet & color

2020-07-31 Thread Marcus Vinicius Mesquita
Hi, again

With the suggestions you gave I managed to obtain the functionality I need,
almost.
Somehow letters with accents like á ã é ó õ and also ç don't get the same
color of the base letters given in the colorfont.lfg below:

return {
 name = "coloralphabet",
 colorschemes = {
 default = {
 [1] = { "A", "a", "á", "ã", "å", "à", "ä" },
 [2] = { "b", "B" },
 [3] = { "c", "ç", "C", "Ç" },
 [4] = { "d", "D" },
 [5] = { "e", "E" },
 [6] = { "f", "F" },
 [7] = { "g", "G" },
 [8] = { "h", "H" },
 [9] = { "i", "í", "ì", "I", "Í", "Ì" },
 [10] = { "j", "J" },
 [11] = { "k", "K" },
 [12] = { "l", "L" },
 [13] = { "m", "M" },
 [14] = { "n", "ñ", "N", "Ñ" },
 [15] = { "o", "ó", "õ", "ö", "O", "Ó", "Õ", "Ö"  },
 [16] = { "p", "P" },
 [17] = { "q", "Q" },
 [18] = { "r", "R" },
 [19] = { "s", "S" },
 [20] = { "t", "T" },
 [21] = { "u", "ù", "ú", "ü", "U", "Ù", "Ú", "Ü" },
 [22] = { "v", "V" },
 [23] = { "w", "W" },
 [24] = { "x", "X" },
 [25] = { "y", "Y" },
 [26] = { "z", "Z" },
 },
 }
}

The MWE follows below:

\setupbodyfont[plex,22pt]

\definecolor[colorscheme:1:1][h=002776]  % a
\definecolor[colorscheme:1:2][h=009c3b]  % b
\definecolor[colorscheme:1:3][h=17737e]  % c
\definecolor[colorscheme:1:4][h=ff5733]  % d
\definecolor[colorscheme:1:5][h=493367]  % e
\definecolor[colorscheme:1:6][h=7c6d11]  % f
\definecolor[colorscheme:1:7][h=117c2a]  % g
\definecolor[colorscheme:1:8][h=6d109d]  % h
\definecolor[colorscheme:1:9][h=08d11a]  % i
\definecolor[colorscheme:1:10][h=a81163] % j
\definecolor[colorscheme:1:11][h=7d2830] % k
\definecolor[colorscheme:1:12][h=2868d1] % l
\definecolor[colorscheme:1:13][h=2c11da] % m
\definecolor[colorscheme:1:14][h=cf47bb] % n
\definecolor[colorscheme:1:15][h=27bde2] % o
\definecolor[colorscheme:1:16][h=dc5777] % p
\definecolor[colorscheme:1:17][h=c28201] % q
\definecolor[colorscheme:1:18][h=ffdf00] % r
\definecolor[colorscheme:1:19][h=30a777] % s
\definecolor[colorscheme:1:20][h=722548] % t
\definecolor[colorscheme:1:21][h=ff00ff] % u
\definecolor[colorscheme:1:22][h=e0115f] % v
\definecolor[colorscheme:1:23][h=004c4c] % w
\definecolor[colorscheme:1:24][h=ae0001] % x
\definecolor[colorscheme:1:25][h=696966] % y
\definecolor[colorscheme:1:26][h=7bb3ff] % z

\definefontfeature
   [MyFeaturesA] [default]
   [goodies={colorfont},colorscheme=default]

\definefont[MyFontA][SerifBold*MyFeaturesA]

\starttext

\setfontcolorscheme[1] {\MyFontA BRASIL brasil órfão ÓRFÃO mão MÃO bênção}

\stoptext

What needs to be changed?

Greetings

Marcus Vinicius


colorfont.lfg
Description: Binary data
\setupbodyfont[plex,22pt]

\definecolor[colorscheme:1:1][h=002776]  % a
\definecolor[colorscheme:1:2][h=009c3b]  % b
\definecolor[colorscheme:1:3][h=17737e]  % c
\definecolor[colorscheme:1:4][h=ff5733]  % d
\definecolor[colorscheme:1:5][h=493367]  % e
\definecolor[colorscheme:1:6][h=7c6d11]  % f
\definecolor[colorscheme:1:7][h=117c2a]  % g
\definecolor[colorscheme:1:8][h=6d109d]  % h
\definecolor[colorscheme:1:9][h=08d11a]  % i
\definecolor[colorscheme:1:10][h=a81163] % j
\definecolor[colorscheme:1:11][h=7d2830] % k
\definecolor[colorscheme:1:12][h=2868d1] % l
\definecolor[colorscheme:1:13][h=2c11da] % m
\definecolor[colorscheme:1:14][h=cf47bb] % n
\definecolor[colorscheme:1:15][h=27bde2] % o
\definecolor[colorscheme:1:16][h=dc5777] % p
\definecolor[colorscheme:1:17][h=c28201] % q
\definecolor[colorscheme:1:18][h=ffdf00] % r
\definecolor[colorscheme:1:19][h=30a777] % s
\definecolor[colorscheme:1:20][h=722548] % t
\definecolor[colorscheme:1:21][h=ff00ff] % u
\definecolor[colorscheme:1:22][h=e0115f] % v
\definecolor[colorscheme:1:23][h=004c4c] % w
\definecolor[colorscheme:1:24][h=ae0001] % x
\definecolor[colorscheme:1:25][h=696966] % y
\definecolor[colorscheme:1:26][h=7bb3ff] % z

\definefontfeature
   [MyFeaturesA] [default]
   [goodies={colorfont},colorscheme=default]

\definefont[MyFontA][SerifBold*MyFeaturesA]

\starttext

\setfontcolorscheme[1] {\MyFontA BRASIL brasil órfão ÓRFÃO mão MÃO bênção}

\stoptext


mwe.pdf
Description: Adobe PDF document
___
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
___


Re: [NTG-context] lmtx update

2020-07-31 Thread Hans Hagen

On 7/31/2020 10:40 AM, Taco Hoekwater wrote:

Hi Hans,


On 31 Jul 2020, at 10:32, Hans Hagen  wrote:

Hi,

Sorry for the long mail ...

One of the changes in lmtx is that we freeze the properties that determine the 
paragraph shape as well as breaking into lines in such a way that we have 
predictable behaviour. As a side effect it can be that existing code (lmtx 
only) will behave differently (will be fixed when we notice) but also that some 
low level user tweaking can not work, i.e. they are just ignored, but only when 
they happen mid paragraph which actually is always debatable anyway.

Now, if for some reasom you get unexpected results and can't wait for a fix, 
you can do this:

  \forgetparagraphfreezing : disables
  \setparagraphfreezing: enables (default)


Are those global or local or can they be prefixed? For example, can we do this:

   \setparagraphfreezing
   ….
   \placefigure[left]{}{} {Bla bla \forgetparagraphfreezing ..  }


the forget will basically tell the system that it should use the normal 
(register) variables ... a freeze stores values in the local par node 
but also stores which parameters are stored, so it is selective (one can 
 freeze specific ones


\snapshotpar \frozenhangaftercode

which now makes me think: i can let a negative value do a specific 
unfreeze (\snapshotpar0 will unfreeze all)



or would that still trigger the built-in freeze ?


the (enabled by default) stored the values right after the par has started

\setparagraphfreezing

so then these values are frozen

a successive change is then not used, but say that you do

\parfillskip100pt

in the middle of a paragraph, then that one will affect the next paragraph

\bgroup
\frozen \parfillskip100pt
\egroup

when this is done inside a paragraph, the assignment is done local, then 
it gets frozen in the current paragraph but it will not affect the next 
paragraph unless of course you used \global


(\frozen is just a prefix and when it's time to do an assignment, just 
like the global state is checked, the frozen state is checked, and 
applied after the normal assignment, of course only for variables that 
deal with the par buildingl it is ignored otherwise; so, \frozen also 
works here: \frozen\advance\leftskip 10pt\relax)


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 / 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
___


Re: [NTG-context] lmtx update

2020-07-31 Thread Taco Hoekwater
Hi Hans,

> On 31 Jul 2020, at 10:32, Hans Hagen  wrote:
> 
> Hi,
> 
> Sorry for the long mail ...
> 
> One of the changes in lmtx is that we freeze the properties that determine 
> the paragraph shape as well as breaking into lines in such a way that we have 
> predictable behaviour. As a side effect it can be that existing code (lmtx 
> only) will behave differently (will be fixed when we notice) but also that 
> some low level user tweaking can not work, i.e. they are just ignored, but 
> only when they happen mid paragraph which actually is always debatable anyway.
> 
> Now, if for some reasom you get unexpected results and can't wait for a fix, 
> you can do this:
> 
>  \forgetparagraphfreezing : disables
>  \setparagraphfreezing: enables (default)

Are those global or local or can they be prefixed? For example, can we do this:

  \setparagraphfreezing
  ….
  \placefigure[left]{}{} {Bla bla \forgetparagraphfreezing ..  }

or would that still trigger the built-in freeze ?


> 
> Of course it might have other side effects once in lmtx we everywhere expect 
> freezing to be enabled. You can take a snapshot with:
> 
>  \freezeparagraphproperties  : snapshot relevant parameters
>  \defrostparagraphproperties : resets snapshot
> 
> More efficient is snapshotting a subcategory:
> 
>  \updateparagraphproperties : all
>  \updateparagraphpenalties  : only penalties
>  \updateparagraphdemerits   : other than penalties
>  \updateparagraphshapes : hangindent etc
> 
> Don't use the low level commands that they use because we take plenty of time 
> to experiment at that level and interfaces might evolve, for instance:
> 
> \frozen\hangindent 30pt
> \frozen\hangafter  2
> 
> is valid and will likely stay.
> 
> We're talking of a conceptually rather different approach. Internally the 
> engine is still doing the same things but we can control it a bit 
> differently. Due to the way ConTeXt is set up, we can make such a paradigm 
> shift without too much troubles. I'll wrap up more details in an article 
> later.
> 
> Other work in progress is: better columns in itemize, esp proper footnote 
> support (not that I ever need that but I know users do so ...), experiments 
> work ok, but I need to check spacing. In general, footnotes (will) behave a 
> bit better, especially those used nested in other mechanisms. A side effect 
> of more control is that we can do other tricks too and we're playing with it 
> (kind of fun).
> 
> More work in progress concerns paragraph wrappers and that will result in a 
> rewrite of some existing mechanism (generic subsystems with instances), but 
> that might as well go unnoticed.
> 
> To give an idea of possibilities, here is an example:
> 
> \definedescription[whatever][alternative=right:bottom]
> 
> \startwhatever{just a small\\example}
>\input ward
> \stopwhatever
> 
> No one ever requested it so see it an a quick and dirty example but don't 
> hesitate to ask for more anyway (we like an occasional challenge).
> 
> Anyway, it might take some weeks / iterations before all this settles down 
> and now you can't say that we didn't warn you.
> 
> So far,
> 
> 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 / 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
> ___

Taco Hoekwater
Elvenkind BV




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


[NTG-context] lmtx update

2020-07-31 Thread Hans Hagen

Hi,

Sorry for the long mail ...

One of the changes in lmtx is that we freeze the properties that 
determine the paragraph shape as well as breaking into lines in such a 
way that we have predictable behaviour. As a side effect it can be that 
existing code (lmtx only) will behave differently (will be fixed when we 
notice) but also that some low level user tweaking can not work, i.e. 
they are just ignored, but only when they happen mid paragraph which 
actually is always debatable anyway.


Now, if for some reasom you get unexpected results and can't wait for a 
fix, you can do this:


  \forgetparagraphfreezing : disables
  \setparagraphfreezing: enables (default)

Of course it might have other side effects once in lmtx we everywhere 
expect freezing to be enabled. You can take a snapshot with:


  \freezeparagraphproperties  : snapshot relevant parameters
  \defrostparagraphproperties : resets snapshot

More efficient is snapshotting a subcategory:

  \updateparagraphproperties : all
  \updateparagraphpenalties  : only penalties
  \updateparagraphdemerits   : other than penalties
  \updateparagraphshapes : hangindent etc

Don't use the low level commands that they use because we take plenty of 
time to experiment at that level and interfaces might evolve, for instance:


\frozen\hangindent 30pt
\frozen\hangafter  2

is valid and will likely stay.

We're talking of a conceptually rather different approach. Internally 
the engine is still doing the same things but we can control it a bit 
differently. Due to the way ConTeXt is set up, we can make such a 
paradigm shift without too much troubles. I'll wrap up more details in 
an article later.


Other work in progress is: better columns in itemize, esp proper 
footnote support (not that I ever need that but I know users do so ...), 
experiments work ok, but I need to check spacing. In general, footnotes 
(will) behave a bit better, especially those used nested in other 
mechanisms. A side effect of more control is that we can do other tricks 
too and we're playing with it (kind of fun).


More work in progress concerns paragraph wrappers and that will result 
in a rewrite of some existing mechanism (generic subsystems with 
instances), but that might as well go unnoticed.


To give an idea of possibilities, here is an example:

\definedescription[whatever][alternative=right:bottom]

\startwhatever{just a small\\example}
\input ward
\stopwhatever

No one ever requested it so see it an a quick and dirty example but 
don't hesitate to ask for more anyway (we like an occasional challenge).


Anyway, it might take some weeks / iterations before all this settles 
down and now you can't say that we didn't warn you.


So far,

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 / 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
___