Re: [NTG-context] Surprising change in function inspect()

2019-10-22 Thread Tomas Hala
# >
# >I discovered quite surprising change in the output of inspect:
# 
# indeed, i don't want to see that stuff

# you can always use:
# 
#   print(table.serialize(d))

Thanks for the explanation. But there is the difference -- serialize says
only the memory address and not the stuff there. Have we got any other tool?
The reason why I am looking for any replacement is the intention 
to show students how it looks inside. 
 
Tomáš

___
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] Strange error with combination of itemization, footnote and \crlf

2019-10-22 Thread Hans Hagen

On 10/22/2019 2:16 PM, cont...@vivaldi.net wrote:

Hello,

here is a minimal sample which doesn't compile:


\starttext
   \startitemize
     \item
   A\footnote{%
     B
     \startitemize
   \item C
     \stopitemize
   }\crlf
   D

     \item E %  This sample compiles when this line is commented (?!)
   \stopitemize
\stoptext


The error message is:

"
...
...eta/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:465: attempt 
to index a nil value (local 'd')


  2   \startitemize
  3 \item
  4   A\footnote{%
  5 B
  6 \startitemize
  7   \item C
  8 \stopitemize
  9   }\crlf
10   D
11
12 >>  \item E %  This sample compiles when this line is commented
13   \stopitemize
14 \stoptext
15
"

When the "\item E" is commented, the sample compiles successfully.

ConTeXt version: "ConTeXt  ver: 2019.10.11 15:47 MKIV beta  fmt: 
2019.10.16  int: english/english".


Any idea what's going wrong?

side effect of recent attempt to deal with nesting ... fixed in next beta

-
  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] Problem with the bottom line of a header

2019-10-22 Thread Wolfgang Schuster

Fabrice Couvreur schrieb am 22.10.2019 um 10:46:

Hello,
I can not adjust the bottom line of my header even after playing with 
location= and boffset.=


1. Try to create shorter examples, e.g. \setuplayout can be reduced to 
the header setting.


2. You header is not large enough for two lines of text.

3. Use \offset to change the vertical position of the frame in the middle.

\setuplayout
  [header=1cm,
   headerdistance=1cm]

\setupbackgrounds [header] [text] [frame=on]

\defineframed [headerframed] [align=normal]

\setupheadertexts
  [{\offset[y=-\strutdp]{\headerframed{Middle}}}]

\setupheadertexts
  [\headerframed {Left\\Left}]
  [\headerframed {Right}]

\starttext
\samplefile{dawkins}
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Surprising change in function inspect()

2019-10-22 Thread Hans Hagen

On 10/22/2019 4:13 PM, Tomas Hala wrote:

Hi all,

using the source code

==
\starttext
\startluacode
   d={} d.data={"a",0} d.tabulka=function () context("pokus") end
   inspect(d)
   d.tabulka()
\stopluacode
pokus
\stoptext
==

I discovered quite surprising change in the output of inspect:


indeed, i don't want to see that stuff


TL2019:

table={
  ["data"]={ "a", 0 },
}

TL2018 and older:

table={
  ["data"]={ "a", 0 },
  ["tabulka"]=load("\27LuaR\0\1\4\4\4\8\0\25�\13\
\26\
\4\0\0\0\4\0\0\0\0\0\2\4\0\0\0\6\0@\0A@\0\0\29@\0\1\31\0�\0\2\0\0\0\4\8\0\0\0context\0\4\6\0\0\0pokus\0\0\0\0\0\1\0\0\0\0\0\14\0\0\0=[\\directlua]\0\4\0\0\0\4\0\0\0\4\0\0\0\4\0\0\0\4\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0_ENV\0"),
}

you can always use:

  print(table.serialize(d))

-
  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] Surprising change in function inspect()

2019-10-22 Thread Tomas Hala
Hi all,

using the source code

==
\starttext
\startluacode
  d={} d.data={"a",0} d.tabulka=function () context("pokus") end 
  inspect(d)
  d.tabulka()
\stopluacode
pokus
\stoptext
==

I discovered quite surprising change in the output of inspect:

TL2019:

table={
 ["data"]={ "a", 0 },
}

TL2018 and older:

table={
 ["data"]={ "a", 0 },
 ["tabulka"]=load("\27LuaR\0\1\4\4\4\8\0\25�\13\
\26\
\4\0\0\0\4\0\0\0\0\0\2\4\0\0\0\6\0@\0A@\0\0\29@\0\1\31\0�\0\2\0\0\0\4\8\0\0\0context\0\4\6\0\0\0pokus\0\0\0\0\0\1\0\0\0\0\0\14\0\0\0=[\\directlua]\0\4\0\0\0\4\0\0\0\4\0\0\0\4\0\0\0\4\0\0\0\0\0\0\0\1\0\0\0\5\0\0\0_ENV\0"),
}

Is there any way how to persuade the current inspect to add functions to the 
output as before?

Best wishes

Tomáš

___
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] Strange error with combination of itemization, footnote and \crlf

2019-10-22 Thread context

Hello,

here is a minimal sample which doesn't compile:


\starttext
  \startitemize
\item
  A\footnote{%
B
\startitemize
  \item C
\stopitemize
  }\crlf
  D

\item E %  This sample compiles when this line is commented (?!)
  \stopitemize
\stoptext


The error message is:

"
...
...eta/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:465: attempt 
to index a nil value (local 'd')


 2   \startitemize
 3 \item
 4   A\footnote{%
 5 B
 6 \startitemize
 7   \item C
 8 \stopitemize
 9   }\crlf
10   D
11
12 >>  \item E %  This sample compiles when this line is 
commented

13   \stopitemize
14 \stoptext
15
"

When the "\item E" is commented, the sample compiles successfully.

ConTeXt version: "ConTeXt  ver: 2019.10.11 15:47 MKIV beta  fmt: 
2019.10.16  int: english/english".


Any idea what's going wrong?

Best regards,

Lukas
open source > level 1, order 1, name 
'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2019.10.11 15:47 MKIV beta  fmt: 2019.10.16  
int: english/english
system  > 
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name 
'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name 
'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'

system  > jobfiles > using path: d:\\Lukas\\ConTeXt\\Styles
system  > files > jobname 't', input 
'D:\\Lukas\\Jobs\\Chrastany-D5.DSPPS\\SO_201\\~TZ~\\t.mkiv', result 't'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name 
'D://Lukas/Jobs/Chrastany-D5.DSPPS/SO_201/~TZ~/t.mkiv'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded

lua error   > lua error on line 12 in file 
D://Lukas/Jobs/Chrastany-D5.DSPPS/SO_201/~TZ~/t.mkiv:

...eta/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:465: attempt to 
index a nil value (local 'd')

 2   \startitemize
 3 \item
 4   A\footnote{%
 5 B
 6 \startitemize
 7   \item C
 8 \stopitemize
 9   }\crlf
10   D
11 
12 >>  \item E %  This sample compiles when this line is commented
13   \stopitemize
14 \stoptext
15 

\starttext
  \startitemize
\item
  A\footnote{%
B
\startitemize
  \item C
\stopitemize
  }\crlf
  D

\item E %  This sample compiles when this line is commented
  \stopitemize
\stoptext
\starttext
  \startitemize
\item
  A\footnote{%
B
\startitemize
  \item C
\stopitemize
  }\crlf
  D

%\item E %  This sample compiles when this line is commented
  \stopitemize
\stoptext


t-OK.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
___


[NTG-context] Problem with the bottom line of a header

2019-10-22 Thread Fabrice Couvreur
Hello,
I can not adjust the bottom line of my header even after playing with
location= and boffset.=
Thank you.
Fabrice

\definelayout
[first]
[topspace=1cm,
 backspace=3cm,
 cutspace=3cm,
 leftmargin=.75cm,
 leftmargindistance=.5cm,
 rightmargin=1.25cm,
 rightmargindistance=1cm,
 header=1cm,
 headerdistance=1cm,
 footer=1cm,
 footerdistance=1cm,
 width=middle,
 height=middle,
 location=middle]

  \setuplayout
[topspace=1cm,
 backspace=3cm,
 cutspace=3cm,
 leftmargin=.75cm,
 leftmargindistance=.5cm,
 rightmargin=1.25cm,
 rightmargindistance=1cm,
 header=\zeropoint,
 headerdistance=1cm,
 footer=1cm,
 footerdistance=1cm,
 width=middle,
 height=middle,
 location=middle]

  \definelayout
[last]
[first]

  \setupbackgrounds
[header]
[text]
[frame=off,
 topframe=off,
 bottomframe=on,
 framecolor=,
 rulethickness=1pt]

  \defineframed
[headerframed]
[frame=off,
 height=fit,
 width=fit]

\startuseMPgraphic{framewithshadow}
  path p;

p:=origin--(1.05*OverlayWidth,0)--(1.05*OverlayWidth,1.05*OverlayHeight)--
(0,1.05*OverlayHeight)--cycle;
  fill p shifted (3,-3);
  fill p withcolor 0.8white;
  draw p;
  setbounds currentpicture to p;
\stopuseMPgraphic

\defineoverlay[framewithshadow][\useMPgraphic{framewithshadow}]

\definecolor[ColorA][0.8(white)]

\startsetups [headertext]

  \setupheadertexts
 [{\startframed [headerframed]
 [foregroundstyle=bold,background=framewithshadow]
 \getvariable{headertext}{title}
n\high{o}\,\getvariable{headertext}{number}
   \stopframed}]

  \setupheadertexts
 [{\startframed [headerframed]
 [align=flushleft,foregroundstyle=]
 Lycée LA SALLE, Lille\\
 \getvariable{headertext}{location}
   \stopframed}]

 [{\startframed [headerframed]
   [align=flushright,foregroundstyle=]
   \date[d=\getvariable{headertext}{day},m=\getvariable{headertext}{month},
 y=\getvariable{headertext}{year}] [D,month,{ },year]
\stopframed}]

  \stopsetups

  \setvariable{headertext}{set}{\directsetup{headertext}}

  \setvariables
[headertext]
[title={Corrigé du devoir maison},
 number={1},
 day={22},
 month={10},
 year={2019},
 location={Secondes GTE-GTF},
 time={}]

 \starttext

  \input knuth

 \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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___