From: Bruce Horrocks <ntg@scorecrow.com>
To: ntg-context mailing list <ntg-context@ntg.nl>
Subject: [NTG-context] Re: Calling C code from ConTeXt LMTX
Date: Sun, 15 Sep 2024 21:29:48 +0100 [thread overview]
Message-ID: <0F3B2569-C75B-47EA-9D34-289A55BF0C65@scorecrow.com> (raw)
In-Reply-To: <CALOhoe+AT7_r6SvsfJB1VGFkFJzoRdEjyWrZ+iVGX_oqeFNhXw@mail.gmail.com>
> On 14 Sep 2024, at 21:46, Florent Michel <florent.m42@gmail.com> 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
___________________________________________________________________________________
next prev parent reply other threads:[~2024-09-15 20:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-14 20:46 [NTG-context] " Florent Michel
2024-09-15 20:29 ` Bruce Horrocks [this message]
2024-09-15 21:11 ` [NTG-context] " Florent Michel
2024-09-16 10:59 ` Bruce Horrocks
2024-09-16 11:15 ` Henning Hraban Ramm
2024-09-16 12:06 ` Bruce Horrocks
2024-09-16 12:58 ` Florent Michel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0F3B2569-C75B-47EA-9D34-289A55BF0C65@scorecrow.com \
--to=ntg@scorecrow.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).