Thanks Bruce for your very helpful reply!
The reason for my question was indeed consistency, e.g. ensuring figure
captions stay up to date with what the figures show when changing
parameters. Thinking more about it, the second solution you mention seems
to be a better option, though - I can simply define the parameters in an
external file and read it from both the PDF solver and ConTeXt to ensure
consistency. Thanks for mentioning it!
Thank you also for mentioning \executesystemcommand, which I was not aware
of!
Best regards,
Florent
Le dim. 15 sept. 2024 à 21:31, Bruce Horrocks
On 14 Sep 2024, at 21:46, Florent Michel
wrote: TL;DR: Could building LuaMetaTeX with the `-fPIC` flag for the Lua library have negative consequences? Is there a better way to be able to call external C functions from ConTeXt?
This seems a bit drastic. Why can’t you achieve what you want to achieve by using other methods?
For example you could setup a workflow whereby you pre-calculate your DE’s and format the results to include as input files. Or you could pre-calculate your DEs and plot them using one of any number of plotting programs and include the plots as TIFFs or PNGs.
If you’re familiar with compiling C code using tools like `make` then why not use a makefile to control the production of your DE plots and your ConTeXt document to ensure that everything is consistent?
If you absolutely must run the DE calculations as the ConTeXt document is processed then there is \executesystemcommand.
— Bruce Horrocks Hampshire, UK
___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net
___________________________________________________________________________________