ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: luigi scarso <luigi.scarso@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Using lua with the command line for "macros"
Date: Mon, 14 Oct 2013 03:17:28 +0200	[thread overview]
Message-ID: <CAG5iGsAWj4KrTKnx5rr30H+dRmeThqkdYCshr5bORnbOEjvgpw@mail.gmail.com> (raw)
In-Reply-To: <20131014010107.GA13627@bluemoon.alumni.iitm.ac.in>


[-- Attachment #1.1: Type: text/plain, Size: 981 bytes --]

On Mon, Oct 14, 2013 at 3:01 AM, Kumar Appaiah <a.kumar@alumni.iitm.ac.in>wrote:

> Hi.
>
> At the outset, I understand that this is a slight abuse of LuaTeX and
> this can be done with plain TeX. Nevertheless, I'd like to see if a
> solution exists for this approach.
>
> I'm trying to use Lua with ConTeXt as a macro preprocessor. To be more
> clear, I have files A.lua, B.lua which define some variables:
>
> A.lua:
> var1 = "something for a"
> var2 = "something else for a"
>
> B.lua:
> var1 = "something for b"
> var2 = "something else for b"
>
> And, in my ConTeXt file, I would write:
> …
> I will get \directlua{tex.print(var1) and \directlua{tex.print(var2)}.
> …
>
> Now, with lualatex, I use the --lua command line option to pass the
> initial lua file name. However, for context, I've not found a way to
> do this. Could someone please advise me?
>

Have you seen
http://www.pragma-ade.com/general/manuals/cld-mkiv.pdf
?
-- 
luigi

[-- Attachment #1.2: Type: text/html, Size: 1508 bytes --]

[-- Attachment #2: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  reply	other threads:[~2013-10-14  1:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-14  1:01 Kumar Appaiah
2013-10-14  1:17 ` luigi scarso [this message]
2013-10-14  1:31   ` Kumar Appaiah
2013-10-14  2:48     ` Kumar Appaiah
2013-10-14  7:47       ` Hans Hagen
2013-10-14 11:45         ` Kumar Appaiah

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=CAG5iGsAWj4KrTKnx5rr30H+dRmeThqkdYCshr5bORnbOEjvgpw@mail.gmail.com \
    --to=luigi.scarso@gmail.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).