[dev-context] MkIV "isolated expression" with \(start|stop|use)staticMPfigure

Sanjoy Mahajan sanjoy at olin.edu
Sun Apr 14 12:37:13 CEST 2013

With the attached test file, which uses MPinclusions for a
staticMPfigure, I get an "Isolated expression".  I think it's a parser
bug somewhere, because deleting almost any word in the file removes the

The file itself looks a bit crazy.  It is a minimal example generated by
a program to help with debugging.  The program randomly deletes a word
in the file, then tests whether the error still happens.  If yes, it
deletes another word.  If no, it restores the word, and tries again by
choosing another word to delete.  That process reduced the file from 4KB
to 2KB.

Here's the relevant piece of the transcript.  The same error happens at
live.contextgarden.net (so I don't think it's a Debian-specific issue).

  ! terminal: >> r_ladder
  ! Isolated expression.
  <to be read again> 
  <*>  r_ladder;


  system          > tex > error on line 73 in file test-mpfigures.tex: terminal: >> r_ladder
  ! Isolated expression.
  <to be read again> 
  <*>  r_ladder;


  64     \startMPinclusions
  65     def r_ladder := draw unitsquare; enddef;
  66     \stopMPinclusions
  68     \startstaticMPfigure{resistiveladder}
  69       r_ladder;
  70     \stopstaticMPfigure
  72     \usestaticMPfigure[resistiveladder]
  73 >>  
  74     \stoptext

  <inserted text> ...0;;]===], [===[;;]===], false)}

  \meta_process_graphic ...!!es , \MPaskedfigure )}}
                                                    \egroup \placeMPgraphic \m...
  \meta_handle_reusable_graphic ...cess_graphic {#3}
                                                    }\setxvalue {\??mpgraphic ...
  \meta_use_graphic ...aphic \currentMPgraphicname }
                                                    \empty \meta_end_graphic_g...
  <to be read again> 
  \dodoubleemptyonespaced #1#2->#1[{#2}][]


And the start of the output, showing the version information:     

  mtx-context     | run 1: luatex --fmt="/var/lib/texmf/luatex-cache/context/f919750633122078d706dd10f1cfd39b/formats/cont-en" --lua="/var/lib/texmf/luatex-cache/context/f919750633122078d706dd10f1cfd39b/formats/cont-en.lui" --backend="pdf" "./test-mpfigures.tex" \stoptext
  This is LuaTeX, Version beta-0.70.2-2012070301 (TeX Live 2012/Debian)
   \write18 enabled.

  ConTeXt  ver: 2012.05.30 11:26 MKIV  fmt: 2013.4.11  int: english/english

  system          > cont-new.mkiv loaded

If you can think of further tests to run, I'll be happy to try them.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-mpfigures.tex
Type: text/x-tex
Size: 1942 bytes
Desc: minimal test file
URL: <http://www.ntg.nl/pipermail/dev-context/attachments/20130414/5bfa097f/attachment.tex>

More information about the dev-context mailing list