[NTG-context] Blocks in margin with overflow of text

2018-08-22 Thread Fabrice Couvreur
Hello,
The idea is to put all the examples of the course in the margin. I see that
the text is sometimes overflowing. How to improve the code ?
Thanks.
Fabrice

\definemeasure[Margin][3.5cm]


\setuplayout
  [
backspace=20mm,
width=120mm,
height=middle,
footer=\bodyfontsize,
header=3\bodyfontsize,
headerdistance=\bodyfontsize,
bottom=3\bodyfontsize,
location={middle},
margin=\measure{Margin},
rightmargin=4.5cm,
marking=on,
  ]

\definefloat
   [recipe]
   [figure]

\setupfloat
   [recipe]
   [default={margin,none}]

\defineconversionset [digit] [] [n]

\setupenumerations
  [before={\blank},
   after={\blank},
   alternative=serried,
   title=yes,
   distance=1em,
  %headcommand=\groupedcommand{}{~---~},
   distance=none,
   prefix=yes,
   prefixsegments=chapter,
   way=bychapter,
   prefixconversionset=digit,
   titlestyle=bold,
   width=broad]

\defineenumeration
   [example]
   [text=Exemple,
style=italic]


\showframe

\starttext
\startchapter[title=First chapter]
\placerecipe{}{
  \startexample
   \input ward
   \stopexample}
\stopchapter
\startchapter[title=Second chapter]
\placerecipe{}{
  \startexample
   \input ward
  \stopexample}
\stopchapter
\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
___

[NTG-context] Emacs + latest beta

2018-08-22 Thread Fabrice Couvreur
Hello,
Sorry to insist, but could anyone help me understand the problem I'm having
in using Emacs with standalone context ?
The following file compiles perfectly from a terminal :

/home/aragorn/texlive/2018/bin/x86_64-linux/context  test.tex

/home/aragorn/context/tex/texmf-linux-64/bin/context  test.tex (latest beta)

With Emacs, it compiles perfectly if you use the 2018 texlive context
binary.

If I want to use the latest beta context binary, I need to add this to my
~/.emacs file :

(setenv "PATH" "/home/aragorn/context/tex/texmf-linux-64/bin/:$PATH" t)

And there, I encounter a compilation problem :

Running `ConTeXt Full' on `pouf' with ``context --purgeall --nonstop
pouf.tex''resolvers   | trees | analyzing 'home:texmf'
mtx-context | run 1: luatex
--fmt="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en"
--interaction="nonstopmode" --jobname="pouf"
--lua="/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en.lui"
--no-parse-first-line --c:currentrun=1 --c:fulljobname="./pouf.tex"
--c:input="./pouf.tex" --c:kindofrun=1 --c:maxnofruns=9 --c:nonstopmode
--c:purgeall "cont-yes.mkiv"

This is LuaTeX, Version 1.08.0 (TeX Live 2018)
 system commands enabled.

resolvers   > trees > analyzing 'home:texmf'
open source > level 1, order 1, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
job > passes > version mismatch: 1.3 <> 1.31
system  >
system  > ConTeXt  ver: 2018.08.20 17:47 MKIV beta  fmt: 2018.8.20
int: english/english
system  >
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name
'/home/aragorn/context/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
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'

system  > files > jobname 'pouf', input './pouf', result 'pouf'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name '/home/aragorn/pouf.tex'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
structure   > sectioning > chapter @ level 2 : 0.1 -> First chapter
metapost> initializing instance 'metafun:1' using format 'metafun'
and method 'default'
metapost> loading 'metafun' as
'/home/aragorn/context/tex/texmf-context/metapost/context/base/mpiv/metafun.mpiv'
using method 'default'
metapost> initializing number mode 'scaled'

lua error   > lua error on line 10 in file /home/aragorn/pouf.tex:

...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: attempt to
call a nil value (global 'getid')
stack traceback:
...ext/tex/texmf-context/tex/context/base/mkiv/node-nut.lua:190: in
upvalue 'getexpansion'
...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:343: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:338>
...ext/tex/texmf-context/tex/context/base/mkiv/font-mps.lua:437: in
local 'boxtomp'
...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1894: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/mlib-pps.lua:1891>
(...tail calls...)

 1
 2 \startusableMPgraphic{NumberHead}
 3  draw outlinetext.f
 4  ("\bf\namedheadnumber{chapter}")
 5  (withcolor "lightgray")
 6   ysized 50pt ;
 7 \stopusableMPgraphic
 8
 9 \unexpanded\def\processMPheadnumber#1%
10 >>{\useMPgraphic{NumberHead}}
11
12 \setuphead
13[chapter]
14[command=\HeadTitle,
15 headstyle=\ss,
16 numbercommand=\processMPheadnumber,
17]
18
19
20 \unexpanded\def\HeadTitle#1#2%


open source > level 3, order 4, name
'/home/aragorn/context/tex/texmf-context/tex/context/sample/common/ward.tex'
close source> level 3, order 4, name
'/home/aragorn/context/tex/texmf-context/tex/context/sample/common/ward.tex'
backend > xmp > using file
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/lpdf-pdx.xml'
pages   > flushing realpage 1, userpage 1, subpage 1
close source> level 2, order 4, name '/home/aragorn/pouf.tex'
close source> level 1, order 4, name
'/home/aragorn/context/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'

mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path:
/home/aragorn/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.007 seconds, 1 scans with
scantime 0.000 seconds, 0 shared scans, 31 found files, scanned paths:
/home/aragorn/texmf
mkiv lua stats  > stored bytecode data: 437 modules (0.226 sec), 93 tables