ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Again: LuaTeX error: invalid escape sequence near '\i'
@ 2013-04-19 21:27 Jan Heinen
  2013-04-19 21:35 ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Jan Heinen @ 2013-04-19 21:27 UTC (permalink / raw)
  To: ntg-context

An example which was working with ConText (version beginning 
2012) - and now I get an error:

\define\imagepath {/home/janis/images}
\starttext
   \externalfigure[\imagepath/test.jpg]
\stoptext

LuaTeX error [string "\directlua "]:1: invalid escape 
sequence near '\i'


Without my parameter \imagepath there ist no problem.
And if I want to see the "echo" of the parameter with
\imagepath
I get "/home/janis/images" which I expect.

I need parameters very often. How can I use my parameter 
\imagepath in \externafigure?


Regards
Janis

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Again: LuaTeX error: invalid escape sequence near '\i'
  2013-04-19 21:27 Again: LuaTeX error: invalid escape sequence near '\i' Jan Heinen
@ 2013-04-19 21:35 ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2013-04-19 21:35 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Jan Heinen

On 4/19/2013 11:27 PM, Jan Heinen wrote:
> An example which was working with ConText (version beginning 2012) - and
> now I get an error:
>
> \define\imagepath {/home/janis/images}
> \starttext
>    \externalfigure[\imagepath/test.jpg]
> \stoptext
>
> LuaTeX error [string "\directlua "]:1: invalid escape sequence near '\i'
>
>
> Without my parameter \imagepath there ist no problem.

\defineexpandble\imagepath {/home/janis/images}

> And if I want to see the "echo" of the parameter with
> \imagepath
> I get "/home/janis/images" which I expect.
>
> I need parameters very often. How can I use my parameter \imagepath in
> \externafigure?
>
>
> Regards
> Janis
>
> ___________________________________________________________________________________
>
> 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
> ___________________________________________________________________________________
>


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Again: LuaTeX error: invalid escape sequence near '\i'
  2013-04-20  0:16 Jan Heinen
  2013-04-20  0:45 ` Hans Hagen
@ 2013-04-20  0:48 ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2013-04-20  0:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Jan Heinen

btw, the \i that lua reports is a side effect of lua being more strict 
in escaping characters, so that might be a compatibility issue, although 
can argue that the old lua behaviour was a buglet

Hans



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Again: LuaTeX error: invalid escape sequence near '\i'
  2013-04-20  0:16 Jan Heinen
@ 2013-04-20  0:45 ` Hans Hagen
  2013-04-20  0:48 ` Hans Hagen
  1 sibling, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2013-04-20  0:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Jan Heinen

On 4/20/2013 2:16 AM, Jan Heinen wrote:
> In last year Context this worked:
>  >> \define\imagepath {/home/janis/images}
>  >>  \externalfigure[\imagepath/test.jpg]
>
> Now this change is necesarry:
>  > \defineexpandble\imagepath {/home/janis/images}
>
> Where do the change come from: Context, Tex or Luatex? Is there a
> genereal change which we have to take care off?
>
> Last year I made a book with a lot of programming in Context and I would
> like to use the code for the next book.

at some point we decided to make \define generate an unexpandable 
command (which is what one wants in most cases)

so, it's just the \define command (and in your case you could as well 
use \def but it's then best to use \ImagePath as one never knows if 
\imagepath isn't some internal command

(of course you can also use \setupexternfigures)

Hans



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
     tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Again: LuaTeX error: invalid escape sequence near '\i'
@ 2013-04-20  0:16 Jan Heinen
  2013-04-20  0:45 ` Hans Hagen
  2013-04-20  0:48 ` Hans Hagen
  0 siblings, 2 replies; 6+ messages in thread
From: Jan Heinen @ 2013-04-20  0:16 UTC (permalink / raw)
  To: ntg-context

In last year Context this worked:
 >> \define\imagepath {/home/janis/images}
 >>  \externalfigure[\imagepath/test.jpg]

Now this change is necesarry:
 > \defineexpandble\imagepath {/home/janis/images}

Where do the change come from: Context, Tex or Luatex? Is 
there a genereal change which we have to take care off?

Last year I made a book with a lot of programming in Context 
and I would like to use the code for the next book.

Regards
Janis

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Again: LuaTeX error: invalid escape sequence near '\i'
@ 2013-04-20  0:08 Jan Heinen
  0 siblings, 0 replies; 6+ messages in thread
From: Jan Heinen @ 2013-04-20  0:08 UTC (permalink / raw)
  To: ntg-context

The following two commands seem to do the same:
\defineexpandable\...
\def\...

And this two also do the same:
\define\...
\unexpanded\def\...


\def is a low-level-command and shouldn't be used. Right?

Regards
Janis

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-04-20  0:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-19 21:27 Again: LuaTeX error: invalid escape sequence near '\i' Jan Heinen
2013-04-19 21:35 ` Hans Hagen
2013-04-20  0:08 Jan Heinen
2013-04-20  0:16 Jan Heinen
2013-04-20  0:45 ` Hans Hagen
2013-04-20  0:48 ` Hans Hagen

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).