ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: lua questions
Date: Thu, 29 Jan 2009 13:35:53 +0100	[thread overview]
Message-ID: <3729DF83-96F9-4602-ACDA-3CBC38FFF9E5@uni-bonn.de> (raw)
In-Reply-To: <4979A64B.1080906@wxs.nl>


On Jan 23, 2009, at 12:13 PM, Hans Hagen wrote:

> Thomas A. Schmitz wrote:
>> it uses the syntax lpeg.Ca which my lpeg doesn't recognize and  
>> which I can't find in the lpeg manual.

[useful information snipped]

>
> just run such script using
>
> mtxrun --script yourscript.lua
>
> as luatex (texlua) has the latest lpeg built in)
>

Just one remark: my lpeg is

/*
** $Id: lpeg.c,v 1.98 2008/10/11 20:20:43 roberto Exp $

and doesn't have the lpeg.Ca pattern. The lpeg that comes with luatex is

/*
** $Id: lpeg.c,v 1.86 2008/03/07 17:20:19 roberto Exp $

so it's older, and it does have the lpeg.Ca pattern accumulator.

And can I ask one more question about lpeg? Suppose I have the string

"{\em This string is \quotation{heavily} emphasized.}"

and want to transform that into something like

"\color[red]{This string is \quotation{heavily} emphasized.}"

How would I go about this using lpeg? I must use a lpeg.V somewhere,  
but I can't figure out where and how.

Thanks, and all best

Thomas
___________________________________________________________________________________
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
___________________________________________________________________________________


  parent reply	other threads:[~2009-01-29 12:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-22 21:24 Thomas A. Schmitz
2009-01-23 11:13 ` Hans Hagen
2009-01-23 13:04   ` Thomas A. Schmitz
2009-01-29 12:35   ` Thomas A. Schmitz [this message]
2009-01-29 12:42     ` Taco Hoekwater

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=3729DF83-96F9-4602-ACDA-3CBC38FFF9E5@uni-bonn.de \
    --to=thomas.schmitz@uni-bonn.de \
    --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).