Compatibility Issue with TikZ/Spy Library in ConTeXt: Seeking Solutions
Hello, I am reaching out to seek assistance regarding a compatibility issue I have encountered after installing ConTeXt on a new computer. The problem arises when attempting to compile documents that utilize the spy library; the LuaTeX engine returns the following error message: "error (luacall): invalid number mtx-context | fatal error: return code: 1" Unfortunately, the error message provides no additional clues. To investigate further, I created a minimal example, which you can easily verify at https://context-on-web.eu/. The example employs the spy library within a TikZ environment. Surprisingly, the same example runs without error on my local LaTeX engine, indicating a potential compatibility issue between ConTeXt and the spy library. Here is the minimal example for your reference: \starttext \usemodule[tikz] \usetikzlibrary {spy} \starttikzpicture[spy using overlays={size=12mm}] \draw (0,0) -- (1,1) -- (2,-1); \spy [blue,magnification=5] on (1,1) in node at (3,0); \stoptikzpicture \stoptext I am curious if anyone else has encountered a similar problem with the spy library and ConTeXt and, if so, if there is a known solution. Any insights or guidance would be greatly appreciated. Thank you for your time and assistance. Best regards, Wolfgang Backes
Hello, I am reaching out to seek assistance regarding a compatibility issue I have encountered after installing ConTeXt on a new computer. The problem arises when attempting to compile documents that utilize the spy library; the LuaTeX engine returns the following error message:
"error (luacall): invalid number mtx-context | fatal error: return code: 1"
Unfortunately, the error message provides no additional clues. To investigate further, I created a minimal example, which you can easily verify at https://context-on-web.eu/. The example employs the spy library within a TikZ environment. Surprisingly, the same example runs without error on my local LaTeX engine, indicating a potential compatibility issue between ConTeXt and the spy library.
Here is the minimal example for your reference:
\starttext \usemodule[tikz] \usetikzlibrary {spy} \starttikzpicture[spy using overlays={size=12mm}] \draw (0,0) -- (1,1) -- (2,-1); \spy [blue,magnification=5] on (1,1) in node at (3,0); \stoptikzpicture \stoptext
I am curious if anyone else has encountered a similar problem with the spy library and ConTeXt and, if so, if there is a known solution. Any insights or guidance would be greatly appreciated.
Thank you for your time and assistance.
On 11/24/2023 11:17 AM, wolfgangbackes--- via ntg-context wrote: the log probably mentions some call lua issue .. tikz is somewhat hard to debug but in the end i figured out that it relates to the way it registers function where it assumes that it's the only pqackage in the tex universe put this before you load tikz: \ifdefined\pdfstrcmp\else \def\pdfstrcmp{\directlua{ local a = token.scan_string() local b = token.scan_string() context((a < b and -1) or (a > b and 1) or 0) }} \fi i'll add more efficient ones to the tikz modules 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 -----------------------------------------------------------------
Many thanks for this great magic powder. It works without a hitch. You have made my day! Wolfgang
participants (2)
-
Hans Hagen
-
wolfgangbackes@mail.de