Re: [NTG-context] Problem with last version of ConTeXt

2014-10-20 Thread Hans Hagen

On 10/19/2014 11:45 PM, Jaroslav Hajtmar wrote:

Hello
Thanx Hans for the advice - too me it could attack itself :-).

When I use \tracingall, then I managed to figure out what the problem was.
In fact, there was an error retrieving data from an external file (the
library), and it while trying to load ConTeXt buffer command.

The original content of this buffer was:

\startbuffer[hlavička_kú]%
{\bf Katastrálnímu úřadu pro \VART{SMLOUVA}{KU_kraj} kraj\br%
\expdoifelse{\getvariable{SMLOUVA}{KU_sidlo}}{\empty}{}{se sídlem
\VART{SMLOUVA}{KU_sidlo}\br}%
Katastrálnímu pracovišti \VART{SMLOUVA}{KU_pracoviste}}%
\stopbuffer%

This content has caused the error in the latest version of ConTeXt
standalone (but in past versions of ConTeXt or standalone version of
TeXLive 2014, I did not noticed this error message).


When I made ​​the following changes:

\startbuffer[hlavička_kú]%
\bgroup%
\bf Katastrálnímu úřadu pro \VART{SMLOUVA}{KU_kraj} kraj\br%
\expdoifelse{\getvariable{SMLOUVA}{KU_sidlo}}{\empty}{}{se sídlem
\VART{SMLOUVA}{KU_sidlo}\br}%
Katastrálnímu pracovišti \VART{SMLOUVA}{KU_pracoviste}%
\egroup%
\stopbuffer%


then everything goes smoothly and everything is OK.


maybe some lookahead issue: you load a buffer and the preceding command 
sees the { which confuses it. Sometimes it hels to define macros as 
unexpanded:


\unexpanded\def\random#

\unexpanded\def\VART#1#2{%

-
  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] backgrounds

2014-10-20 Thread Procházka Lukáš Ing . - Pontex s . r . o .

On Mon, 20 Oct 2014 03:46:39 +0200, Hongwen Qiu qiuhong...@gmail.com wrote:


在 2014年10月17日 19:32, Procházka Lukáš Ing. - Pontex s. r. o. 写道:

Source  result attached.

I didn't expect your source even to compile since you missed out the
\starttext thing.


- I succeeded to compile... Of course, the code must contain \starttext, so 
re-attaching...

--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz
Bezová 1658
147 14 Praha 4

Tel: +420 241 096 751
Fax: +420 244 461 038

Bkgs.mkiv
Description: Binary data
___
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] Problem with last version of ConTeXt

2014-10-20 Thread Jaroslav Hajtmar

Thanx one more.
Jaroslav Hajtmar


Dne 20.10.2014 9:16, Hans Hagen napsal(a):
maybe some lookahead issue: you load a buffer and the preceding 
command sees the { which confuses it. Sometimes it hels to define 
macros as unexpanded:


\unexpanded\def\random#

\unexpanded\def\VART#1#2{% 


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

[NTG-context] \startanimation and \dorecurse

2014-10-20 Thread Jeong Dal
Hi,

I tested the following simple code to generate enlarging circles as a test of 
animation.
But it just draw 5 circles in a row.

\usemodule[animation]
\setupinteraction[state=start]
\startbuffer[Circles]
numeric u; u:= 1cm;
draw fullcircle scaled \MPrawvar{Circles}{s}u;
\stopbuffer
\starttext
\startanimation
{ \dorecurse{5}{%
\setupMPvariables[Circles][s=\recurselevel]
\processMPbuffer [Circles]
}}
\stopanimation
\stoptext

It seems to me that \startanimation just treat the figures 
{\dorecurse … } as just one figure.

Is there a way to treat it 5 figures to generate animation? 

Thank you for reading.

Best regards,

Dalyoung


___
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] \startanimation and \dorecurse

2014-10-20 Thread Wolfgang Schuster

 Am 20.10.2014 um 13:32 schrieb Jeong Dal hak...@me.com:
 
 Hi,
 
 I tested the following simple code to generate enlarging circles as a test of 
 animation.
 But it just draw 5 circles in a row.
 
 \usemodule[animation]
 \setupinteraction[state=start]
 \startbuffer[Circles]
 numeric u; u:= 1cm;
 draw fullcircle scaled \MPrawvar{Circles}{s}u;
 \stopbuffer
 \starttext
 \startanimation
 { \dorecurse{5}{%
 \setupMPvariables[Circles][s=\recurselevel]
 \processMPbuffer [Circles]
 }}
 \stopanimation
 \stoptext
 
 It seems to me that \startanimation just treat the figures 
 {\dorecurse … } as just one figure.
 
 Is there a way to treat it 5 figures to generate animation? 
 
 Thank you for reading.

1. You have to expand the \recurselevel value.

2. Don’t put braces around \dorecurse because when \startanimation sees a 
opening braces it assumes you want to put each frame into a group of braces.


Variant 1:

\usemodule[animation]

\setupinteraction[state=start]

\startbuffer[Circles]
numeric u; u:= 1cm;
draw fullcircle scaled \MPrawvar{Circles}{s}u;
\stopbuffer

\starttext

\startanimation
\dorecurse{5}
  {\startexpanded
 \startframe
   \setupMPvariables[Circles][s=\recurselevel]
   \processMPbuffer [Circles]
 \stopframe
   \stopexpanded}
\stopanimation

\stoptext


Variant 2:

\usemodule[animation]

\setupinteraction[state=start]

\startuseMPgraphic{Circles}{s}
numeric u; u:= 1cm;
draw fullcircle scaled \MPvar{s}u;
\stopuseMPgraphic

\starttext

\startanimation
\dorecurse{5}
  {\startexpanded
 \frame{\useMPgraphic{Circles}{s=\recurselevel}}%
   \stopexpanded}
\stopanimation

\stoptext

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
___

Re: [NTG-context] Slanted, double-quoted quotations

2014-10-20 Thread Sander Maijers
I am wondering likewise.

Sander Maijers

On Thu, Oct 16, 2014 at 3:14 AM, Rik r...@panix.com wrote:

 On 2014-10-15 17:06, Wolfgang Schuster wrote:

 Am 15.10.2014 um 21:03 schrieb Rik Kabel cont...@rik.users.panix.com:

  I am not sure I understand the need for symstyle and symcolor. The issue
 is not that the symbols are not styled/colored, but that they do not appear
 at all when a non-normal style is specified. What I see with the example I
 posted is:
 hacaddjd.png
 and I assume that Sander saw a similar issue.

 Note that there are no square brackets present as defined for layer 2.

 I realize that style=normal for level 3 should perhaps be style=\tf,
 since normal is redefined to slanted within the scope of layer 2. With that
 change to my example, I get
 fageaehi.png
 This still has the lack of square brackets, and now in addition lacks
 curly braces for level 3.

 If your fix is meant to repair that, all is well. If not, could you
 explain why “it's deliberate and has always been the case in mkiv”?

 When you use “location=text” context checks the value of the style key,
 when the value of the key is “normal”
 the left and right arguments are used but when you use a different value
 (e.g. slanted) context applies only
 the style and color values.


 Thank you, Wolfgang, for that explanation of what is being done.

 Can you explain why this is done? It would seem, given the name of the
 command, that the delimiter is more important than the styling, and so I
 suspect that there is some historical reason that this behavior was chosen.
 Styling can be done within the text, as can delimiters, but the benefit of
 the command is that it should be able to manage multiple levels
 automatically.

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

[NTG-context] Does \url work like \from?

2014-10-20 Thread Sander Maijers
​Hi,

On http://wiki.contextgarden.net/url#Overview is stated:

 You can use

 \url[aurl]

 as well, which behaves like \from[#1].

I may be wrong to interpret \url a synonym of \from based on the
documentation, as \from has only one parameter though. Test:

\useURL[author_email][mailto:invalid@invalid.invalid][][A Name]

 \setupinteraction[state=start]
 \starttext

 \from[author_email]
 \url[author_email]

 \stoptext


The first URL has 'A Name' as title and is clickable, the second one the
e-mail address and is not clickable.

Best,
Sander
___
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] Slanted, double-quoted quotations

2014-10-20 Thread Rik

On 2014-10-20 10:08, Sander Maijers wrote:

I am wondering likewise.


Sander,

The question has been mooted. The first beta (of two) on 2014-10-16 
resolved the issue, and the result of your example is what the text in 
it describes.


--
rik
___
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] Does \url work like \from?

2014-10-20 Thread Alan BRASLAU
Perhaps you might want to try (untested):
\goto {A Name}[url(mailto:invalid@invalid.invalid)]

Alan

On Mon, 20 Oct 2014 16:18:04 +0200
Sander Maijers s.n.maij...@gmail.com wrote:

 ​Hi,
 
 On http://wiki.contextgarden.net/url#Overview is stated:
 
  You can use
 
  \url[aurl]
 
  as well, which behaves like \from[#1].
 
 I may be wrong to interpret \url a synonym of \from based on the
 documentation, as \from has only one parameter though. Test:
 
 \useURL[author_email][mailto:invalid@invalid.invalid][][A Name]
 
  \setupinteraction[state=start]
  \starttext
 
  \from[author_email]
  \url[author_email]
 
  \stoptext
 
 
 The first URL has 'A Name' as title and is clickable, the second one
 the e-mail address and is not clickable.
 
 Best,
 Sander

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