From: "Ashlock, Tad A" <taashlo@sandia.gov>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: Problem Passing \starttabulate into Lua
Date: Mon, 29 Dec 2008 05:56:12 -0700 [thread overview]
Message-ID: <68E5AC30CE6FA94DB0C3B4E3294B5D3103754222EA@ES01SNLNT.srn.sandia.gov> (raw)
In-Reply-To: <CD5F93D1-00CC-48B4-9A9F-B7E8AD64F779@gmail.com>
On 2008-12-28 at 15:33, Wolfgang Schuster wrote:
>Am 27.12.2008 um 12:20 schrieb Tad Ashlock:
>> I'm trying to create a ConTeXt macro (mkiv) that will manipulate the
>> macro argument's text with Lua and then feed it back into ConTeXt
>> with tex.print(). My approach worked correctly until I called the
>> macro with \starttabulate ... \stoptabulate in the macro's
>> argument. So I started reducing the problem down to a minimum
>> example which surprisingly turned out to have nothing to do with the
>> manipulations I was performing.
[snip]
>
>\def\testmacro
> {\bgroup
> \catcode`\\=12
> \dotestmacro}
>
>\def\dotestmacro#1
> {\ctxlua{d='\luaescapestring{#1}'}%
> \egroup}
>
>\starttext
>
>\testmacro{\starttabulate \NC text \NC text \NC\NR \stoptabulate}
>
>%\ctxlua{tex.sprint(d)}
>
>\stoptext
>
>Wolfgang
Thank you Wolfgang! That's certainly a step in the right direction. But what I (and others?) really need is a way of passing any chunk of ConTeXt code into Lua.
When I changed '\starttabulate' to '\starttabulate[|l|p|]' in your solution above, it broke.
Thanks again,
Tad
___________________________________________________________________________________
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 : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2008-12-29 12:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-27 11:20 Tad Ashlock
2008-12-28 22:33 ` Wolfgang Schuster
2008-12-29 12:56 ` Ashlock, Tad A [this message]
2008-12-29 13:14 ` luigi scarso
2008-12-29 13:28 ` Wolfgang Schuster
2008-12-30 9:06 ` Wolfgang Schuster
2009-01-01 11:00 ` Wolfgang Schuster
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=68E5AC30CE6FA94DB0C3B4E3294B5D3103754222EA@ES01SNLNT.srn.sandia.gov \
--to=taashlo@sandia.gov \
--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).