[NTG-context] makeupwidth in externalfigure yields invalid escape sequence

2012-12-31 Thread Andreas Mang
Hi there,

did I miss something or is there a problem with the use of makeupwidth in 
conection with the externalfigure command in the latest beta?

The error I get (minimal example below) is:

! LuaTeX error [string \directlua ]:1: invalid escape sequence near '\m'.

Cheers,
Andreas


ConTeXt  ver: 2012.12.28 20:30 MKIV

%%% minimal example %%%

\starttext 
\externalfigure[cow][width=5cm] % works
\externalfigure[cow][width=0.5\makeupwidth] % error
\stoptext

%%% minimal example %%%


Bart Simpson mode:

You should never update your context version during holidays.
You should never update your context version during holidays.
You should never update your context version during holidays.
You should never update your context version during holidays.

Happy New Year's Eve to y'all.


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


Re: [NTG-context] makeupwidth in externalfigure yields invalid escape sequence

2012-12-31 Thread Peter Münster
On Mon, Dec 31 2012, Andreas Mang wrote:

 \externalfigure[cow][width=0.5\makeupwidth] % error

Here a patch that helps:

http://www.ntg.nl/pipermail/ntg-context/2012/068393.html

Then, type context --make.

-- 
   Peter
___
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
___


Re: [NTG-context] \savebuffer

2012-12-31 Thread Hans Hagen

On 12/29/2012 6:29 PM, Wolfgang Schuster wrote:

Hi Hans,

can you add a \savebuffer variant which works like the first version of the 
command where

   \savebuffer[buffername][filename]

saved the buffer as filename and not as \jobname-filename.tmp like it 
currently does.


Instead of a new command a key-val-version of \savebuffer would do the job as 
well, e.g.

   \savebuffer[list=buffername,file=filename,prefix=no]

or something similar.


next beta:

\starttext

\startbuffer[test]
crap
\stopbuffer

\savebuffer[test][whatever]

\savebuffer[list=test,file=something,prefix=no]

\stoptext

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


Re: [NTG-context] MetaPost Animations

2012-12-31 Thread Jeong Dal
Dear Wolfgang,

Thank you for the explanation, and your sample works nicely.

I  enclosed \processMPbuffer using \startframe and \stopframe as following.
Then  I got a 'undefined control sequence' error.
If I use '\framed[]' instead of '\startframe … \stopframe', then it gave all 7 
circles of different radius in two pages without error.
If I add \startanimation … \stopanimation, the only change is the appearance 
of menu at the bottom of the last circle.(no animation)

What is wrong in the code?

Best regards,

Dalyoung


Happy New Year to all listers!!!



\startbuffer[circles]
path p;
numeric n, u;
u := 1cm;
n:=\recurselevel*u;
p := fullcircle scaled n;
draw p;
\stopbuffer

\usemodule[animation]
\setupinteraction[state=start]

\starttext
%\startanimation[menu=yes]
\dorecurse{7}{
\startframe
%   \framed[]%{\processMPbuffer[circles]}}
\processMPbuffer[circles]
\stopframe
}
%\stopanimation
\stoptext


! Undefined control sequence.
system  tex  error on line 23 in file test-ani.tex: Undefined control 
sequence ...
13 \setupinteraction[state=start]
14
15 \starttext
16
17 %\startanimation[menu=yes]
18 \dorecurse{7}{
19 \startframe
20 %\framed[]%{\processMPbuffer[circles]}}
21 \processMPbuffer[circles]
22 \stopframe
23  }
24 %\stopanimation
25
26 \stoptext
27
\121 #1#2- \startframe
\processMPbuffer [circles] \stopframe
\syst_helpers_recurse_indeed_yes ...curse_content
\syst_helpers_recurse_indeed
to be read again
{
inserted text
2
\syst_helpers_recurse_indeed ...the \innerrecurse
}{#2}
l.23 }




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

Re: [NTG-context] Percent in mkii mathmode is rendering wrongly using lucida.

2012-12-31 Thread Yue Wang
When will the team push the fixed code to the mainstream? I think users
need both \delta and percent.


On Thu, Dec 27, 2012 at 7:18 PM, Mojca Miklavec 
mojca.miklavec.li...@gmail.com wrote:

 On Fri, Dec 28, 2012 at 1:21 AM, Yue Wang wrote:
  Hi Hans,
 
  can you fix the problem? thanks a lot.
 
  test document:
  %mkii
  \usetypescript[lucida][texnansi]
  \setupbodyfont[lucida,12pt]
  \starttext
  5\%  $5\%$
  \stoptext

 Citing myself:

 On Sat, Feb 20, 2010 at 6:22 AM, Mojca Miklavec wrote:
  On Tue, Dec 1, 2009 at 10:16, Hans Hagen wrote:
  Yue Wang wrote:
 
  I am writing my journal article using Lucida. The following code didn't
  work:
 
  \usetypescriptfile[type-buy]
  \usetypescript[lucida][texnansi]
  \setupbodyfont[lucida,12pt]
  \starttext $\Delta$\stoptext
 
  If I change
  \definefontsynonym [MathRoman] [LucidaBright]
  into
  \definefontsynonym [MathRoman] [LucidaNewMath-Roman] %
 LucidaBright
 
  it starts working, but probably break other things (would need a bit
  more extensive tests).
 
  Mojca

 and it seems that *exactly that* change breaks it.

 To start with, it's not only percentage sign. There are more. You
 could start with constructions like
 \definemathsymbol [percent]  [nothing] [tf] [37]
 in math-lbr.mkii. That works, but I'm not yet sure how to redefine the
 character itself since the following doesn't work:
 \definemathcharacter [37]  [nothing] [tf] [37]

 One needs to test

 \usetypescript[lucida][ec]
 \usetypescript[modern][ec]
 \showfont[hlcrm]
 \showfont[rm-lmr12]

 and redefine/reassign all characters that are different than in LM.
 An alternative is to change the font back to LucidaBright and redefine
 all characters that are different there.

 Mojca

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

Re: [NTG-context] MetaPost Animations

2012-12-31 Thread Wolfgang Schuster

Am 01.01.2013 um 04:50 schrieb Jeong Dal hak...@me.com:

 Dear Wolfgang,
 
 Thank you for the explanation, and your sample works nicely.
 
 I  enclosed \processMPbuffer using \startframe and \stopframe as following.
 Then  I got a 'undefined control sequence' error.
 If I use '\framed[]' instead of '\startframe … \stopframe', then it gave all 
 7 circles of different radius in two pages without error.
 If I add \startanimation … \stopanimation, the only change is the 
 appearance of menu at the bottom of the last circle.(no animation)
 
 What is wrong in the code?

1. The \frame and \startframe commands are only available *in* the animation 
environment where they are locally defined.

2. Although \framed sound similar to \frame there is no relation between both 
commands.

3. You have to expand the loop value *before* it is passed to metapost, see 
below.

\usemodule[animation]
\setupinteraction[state=start]

\startuseMPgraphic{circles}{counter}
path p;
numeric n, u;
u := 1cm;
n:=\MPvar{counter}*u;
p := fullcircle scaled n;
draw p;
\stopuseMPgraphic

\starttext
\startanimation[menu=yes]
\dorecurse{7}{%
\startframe
\useMPgraphic{circles}{counter=#1}%
\stopframe}
\stopanimation
\stoptext

4. You can also include the metapost code in the frame but you have to expand 
the \recurselevel value with the \expanded command (I have to upload a new 
version of the module first because \startframe isn’t expandable yet).

\usemodule[animation]
\setupinteraction[state=start]

\starttext
\startanimation[menu=yes]
\dorecurse{7}{\expanded
   {\startframe
\startMPcode
path p;
numeric n, u;
u := 1cm;
n:=\recurselevel*u;
p := fullcircle scaled n;
draw p;
\stopMPcode
\stopframe}}
\stopanimation
\stoptext

5. Use a PDF viewer with javascript support (e.g. Adobe Reader) to view the 
animation.

Kind regards and a happy new year,
Wolfgang
___
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
___