ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Aditya Mahajan <adityam@umich.edu>
To: hajtmar@gyza.cz, mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Inserting non-standard TeX macro parameters to Lua variables
Date: Thu, 19 Aug 2010 19:12:23 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LNX.2.00.1008191911370.19511@ybpnyubfg.ybpnyqbznva> (raw)
In-Reply-To: <4C6DB514.9050100@gyza.cz>

On Fri, 20 Aug 2010, Jaroslav Hajtmar wrote:

> Hello all,
>
> I'm looking for a way to insert any character (CSV separator) into a 
> variable. Manually insert a double (or single) quote is not a problem, but 
> how to use the universal way to not have to change the macro definitions?
> Is there another possibility to insert a macro parameter into a Lua variable 
> than the use double or single quote?
>
> Any "universal" alternative is unfortunately impossible:
> For example: \def\setseparatorC#1{\directlua{Sep=#1 }}  ???
>
> Thanx Jaroslav
>
> Here is my minimal example:
>
>
> \def\setseparatorA#1{\directlua{Sep="#1"}}
> \def\setseparatorB#1{\directlua{Sep='#1'}}

Untested. Try

\unprotect
\def\setseparator#1{\directlua{sep=\!!bs#1\!!es}}
\protect

Aditya
___________________________________________________________________________________
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:[~2010-08-19 23:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-19 22:49 Jaroslav Hajtmar
2010-08-19 23:12 ` Aditya Mahajan [this message]
2010-08-19 23:25   ` Jaroslav Hajtmar

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=alpine.LNX.2.00.1008191911370.19511@ybpnyubfg.ybpnyqbznva \
    --to=adityam@umich.edu \
    --cc=hajtmar@gyza.cz \
    --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).