[NTG-context] Alter text to "Figure"

2017-02-27 Thread Procházka Lukáš Ing .

Hello,

how to alter auto-text to figures placed by 
"\placefloat[]{Caption}{\externalfigure[]}" to be:

"Figure 1.  Caption"

instead of

"Figure 1  Caption",

IOW, how to add "." after the figure "auto-text"?

Best regards,

Lukas


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

Tel: +420 241 096 751 (+420 720 951 172)
Fax: +420 244 461 038

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] which command would give the same effect as \pause in beamer ?

2017-02-27 Thread Otared Kavian
Dear Mohammad Hossein,

Thank you for sharing this rawsteps-mkiv code: it works very smoothly and 
nicely: I haven’t done yet a real life presentation with it, but on your 
examples and a few other simple ones, your code works very well.

Best regards: OK

> On 27 Feb 2017, at 19:28, Mohammad Hossein Bateni  wrote:
> 
> I once ported RawSteps to MkIV but have not touched it in a while (and 
> probably won't have time to anytime soon).  Ten months ago, it used to work 
> almost fine.
> 
> https://github.com/bateni/rawsteps-mkiv 
> 
> 
> On Mon, Feb 27, 2017 at 12:00 PM, Otared Kavian  > wrote:
> Hi,
> 
> If you use mkii you can still use RawSteps, but in mkiv it does not work 
> properly and should be rewritten. 
> However, as Hans indicates, one can use \startsetp and friends, as shown in 
> the example presentations found in your directory
>   texmf/doc/context/presentations
> 
> Best regrads: OK
> 
>> On 27 Feb 2017, at 15:53, kaddour kardio > > wrote:
>> 
>> http://wiki.contextgarden.net/RawSteps 
>>  is it still relevant dear Hans ?
>> 
>> On Mon, Feb 27, 2017 at 3:37 PM, Hans Hagen > > wrote:
>> On 2/27/2017 1:16 PM, dam...@thiriet.web4me.fr 
>>  wrote:
>> Hello,
>> 
>> 
>> I have been switching to conTEXt to prepare some of my teaching stuff. I 
>> have read the context ref manual, the wiki and browsed the web, but couldn't 
>> find anything related to so-called overlays in beamer (I justed greped mail 
>> archives for 2015–2017).
>> What would be the conTEXt way to have a list or whatever else displayed in a 
>> slide in such a way that point 2 is hidden until you press space, and so on.
>> In beamer, you would make it this way
>> 
>> \begin{frame}
>>\begin{itemize}
>>   \item 1
>>   \pause
>>   \item 2
>>   \pause
>>  \item 3
>> \end{frame}
>> 
>> Or even better,
>> 
>> \begin{frame}
>>\begin{itemize}[<+->]
>>   \item 1
>>   \item 2
>>  \item 3
>> \end{frame}
>> 
>> I read about \starthiding and \stophiding in the manual, but as far as I 
>> understand, this is not exactly what I am looking for.
>> I don't think postponing would help either.
>> 
>> Any suggestion will be welcome. I am using texlive 2015 version (nothing 
>> newer is available yet in OpenBSD).
>> Have a nice day,
>> 
>> texmf/doc/context/presentations
>> 
>> has examples ... you can have steps (pre-stepwise)
>> 
>> Hans
>> 
>> 
>> -
>>   Hans Hagen | PRAGMA ADE
>>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>tel: 038 477 53 69 | www.pragma-ade.nl  | 
>> 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://context.aanhet.net 
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> 
>> wiki : http://contextgarden.net 
>> ___
>> 
>> 
>> 
>> -- 
>> Dr YAHYAOUI Mohamed Kaddour, cardiologue.Clinique EL ABRAR.
>> ___
>> 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://context.aanhet.net 
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> 
>> 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 
> 

Re: [NTG-context] which command would give the same effect as \pause in beamer ?

2017-02-27 Thread Mohammad Hossein Bateni
I once ported RawSteps to MkIV but have not touched it in a while (and
probably won't have time to anytime soon).  Ten months ago, it used to work
almost fine.

https://github.com/bateni/rawsteps-mkiv

On Mon, Feb 27, 2017 at 12:00 PM, Otared Kavian  wrote:

> Hi,
>
> If you use mkii you can still use RawSteps, but in mkiv it does not work
> properly and should be rewritten.
> However, as Hans indicates, one can use \startsetp and friends, as shown
> in the example presentations found in your directory
> texmf/doc/context/presentations
>
> Best regrads: OK
>
> On 27 Feb 2017, at 15:53, kaddour kardio  wrote:
>
> http://wiki.contextgarden.net/RawSteps is it still relevant dear Hans ?
>
> On Mon, Feb 27, 2017 at 3:37 PM, Hans Hagen  wrote:
>
>> On 2/27/2017 1:16 PM, dam...@thiriet.web4me.fr wrote:
>>
>>> Hello,
>>>
>>>
>>> I have been switching to conTEXt to prepare some of my teaching stuff. I
>>> have read the context ref manual, the wiki and browsed the web, but
>>> couldn't find anything related to so-called overlays in beamer (I justed
>>> greped mail archives for 2015–2017).
>>> What would be the conTEXt way to have a list or whatever else displayed
>>> in a slide in such a way that point 2 is hidden until you press space, and
>>> so on.
>>> In beamer, you would make it this way
>>>
>>> \begin{frame}
>>>\begin{itemize}
>>>   \item 1
>>>   \pause
>>>   \item 2
>>>   \pause
>>>  \item 3
>>> \end{frame}
>>>
>>> Or even better,
>>>
>>> \begin{frame}
>>>\begin{itemize}[<+->]
>>>   \item 1
>>>   \item 2
>>>  \item 3
>>> \end{frame}
>>>
>>> I read about \starthiding and \stophiding in the manual, but as far as I
>>> understand, this is not exactly what I am looking for.
>>> I don't think postponing would help either.
>>>
>>> Any suggestion will be welcome. I am using texlive 2015 version (nothing
>>> newer is available yet in OpenBSD).
>>> Have a nice day,
>>>
>>
>> texmf/doc/context/presentations
>>
>> has examples ... you can have steps (pre-stepwise)
>>
>> Hans
>>
>>
>> -
>>   Hans Hagen | PRAGMA ADE
>>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>tel: 038 477 53 69 | www.pragma-ade.nl | 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/list
>> info/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : http://contextgarden.net
>> 
>> ___
>>
>
>
>
> --
> Dr YAHYAOUI Mohamed Kaddour, cardiologue.Clinique EL ABRAR.
> 
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Formula numbering conversion

2017-02-27 Thread Antoine Cailliau
I try to replicate the following :
https://mailman.ntg.nl/pipermail/ntg-context/2006/021038.html (i.e. the
equivalent of \tag in latex/amsmath). More precisely this:

> %8<--
> \def\placeformulatag%
>{\dosingleempty\doplaceformulatag}
> \def\doplaceformulatag[#1]#2%
>{\let\normalstopformula\stopformula
> \def\stopformula%
>  {\normalstopformula
>   \restorenumber[formula]
>   \egroup
>   \let\stopformula\normalstopformula}
>   \bgroup
>   \savenumber[formula]
>   \def\dummyconversion##1{#2}
>   \defineconversion[dummyconversion][\dummyconversion]
>   \setupformulas[conversion=dummyconversion]
>   \placeformula[#1]}
>
> \starttext
> \placeformulatag[tag]{test} \startformula
>E = mc^2
> \stopformula
> See \in formula[tag] for a tagged formula
> \stoptext
> %8<-


However, the following (simpler) code produce an "Undefined control
sequence" when using \in command.

\starttext
> {
>   \def\a#1{test}
>   \defineconversion[a][\a]
>   \setupformulae[numberconversion=a]
>   \placeformula[test]
>   \startformula E = mc^2 \stopformula
> }
> This is my reference: \in{formula}[test].
> \stoptext


The following code, does not produce the error, but is not practical for
the reproducing the \tag command.

>
> \starttext
> {
>   \def\a#1{test}
>   \defineconversion[a][\a]
>   \setupformulae[numberconversion=a]
>   \placeformula[test]
>   \startformula E = mc^2 \stopformula
>   This is my reference: \in{formula}[test].
> }
> \stoptext


What am I doing wrong? I guess the command \a is no longer defined when the
compiler hit \in but how can I ensure that such local definition stay
accessible ?

Thank you in advance,

Antoine C.


On 27 February 2017 at 17:28, Antoine Cailliau 
wrote:

> Thanks.
>
> I updated the wiki.
>
> On 27 February 2017 at 17:18, Pablo Rodriguez  wrote:
>
>> On 02/27/2017 04:55 PM, Antoine Cailliau wrote:
>> > The following code is documented to change the numbering of the
>> equations.
>> > However, this still use numerals for the equations.
>> > [...]
>> > Is this a bug ? Is it the correct way to change the numbering ?
>>
>> Hi Antoine,
>>
>> it’s numberconversion (as it reads in “ConTeXt Commands”):
>>
>> \setupformulas[numberconversion=greek]
>> \setupbodyfont[dejavu]
>> \starttext
>> \placeformula[test]
>> \startformula E = mc^2 \stopformula
>> \stoptext
>>
>> BTW, if this is wrong documented in the wiki, please correct it for
>> future reference.
>>
>> Pablo
>> --
>> http://www.ousia.tk
>> 
>> ___
>> 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/list
>> info/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] which command would give the same effect as \pause in beamer ?

2017-02-27 Thread Otared Kavian
Hi,

If you use mkii you can still use RawSteps, but in mkiv it does not work 
properly and should be rewritten. 
However, as Hans indicates, one can use \startsetp and friends, as shown in the 
example presentations found in your directory
texmf/doc/context/presentations

Best regrads: OK

> On 27 Feb 2017, at 15:53, kaddour kardio  wrote:
> 
> http://wiki.contextgarden.net/RawSteps 
>  is it still relevant dear Hans ?
> 
> On Mon, Feb 27, 2017 at 3:37 PM, Hans Hagen  > wrote:
> On 2/27/2017 1:16 PM, dam...@thiriet.web4me.fr 
>  wrote:
> Hello,
> 
> 
> I have been switching to conTEXt to prepare some of my teaching stuff. I have 
> read the context ref manual, the wiki and browsed the web, but couldn't find 
> anything related to so-called overlays in beamer (I justed greped mail 
> archives for 2015–2017).
> What would be the conTEXt way to have a list or whatever else displayed in a 
> slide in such a way that point 2 is hidden until you press space, and so on.
> In beamer, you would make it this way
> 
> \begin{frame}
>\begin{itemize}
>   \item 1
>   \pause
>   \item 2
>   \pause
>  \item 3
> \end{frame}
> 
> Or even better,
> 
> \begin{frame}
>\begin{itemize}[<+->]
>   \item 1
>   \item 2
>  \item 3
> \end{frame}
> 
> I read about \starthiding and \stophiding in the manual, but as far as I 
> understand, this is not exactly what I am looking for.
> I don't think postponing would help either.
> 
> Any suggestion will be welcome. I am using texlive 2015 version (nothing 
> newer is available yet in OpenBSD).
> Have a nice day,
> 
> texmf/doc/context/presentations
> 
> has examples ... you can have steps (pre-stepwise)
> 
> Hans
> 
> 
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>tel: 038 477 53 69 | www.pragma-ade.nl  | 
> 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://context.aanhet.net 
> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> 
> wiki : http://contextgarden.net 
> ___
> 
> 
> 
> -- 
> Dr YAHYAOUI Mohamed Kaddour, cardiologue.Clinique EL ABRAR.
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Formula numbering conversion

2017-02-27 Thread Antoine Cailliau
Thanks.

I updated the wiki.

On 27 February 2017 at 17:18, Pablo Rodriguez  wrote:

> On 02/27/2017 04:55 PM, Antoine Cailliau wrote:
> > The following code is documented to change the numbering of the
> equations.
> > However, this still use numerals for the equations.
> > [...]
> > Is this a bug ? Is it the correct way to change the numbering ?
>
> Hi Antoine,
>
> it’s numberconversion (as it reads in “ConTeXt Commands”):
>
> \setupformulas[numberconversion=greek]
> \setupbodyfont[dejavu]
> \starttext
> \placeformula[test]
> \startformula E = mc^2 \stopformula
> \stoptext
>
> BTW, if this is wrong documented in the wiki, please correct it for
> future reference.
>
> Pablo
> --
> http://www.ousia.tk
> 
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Formula numbering conversion

2017-02-27 Thread Pablo Rodriguez
On 02/27/2017 04:55 PM, Antoine Cailliau wrote:
> The following code is documented to change the numbering of the equations.
> However, this still use numerals for the equations.
> [...]
> Is this a bug ? Is it the correct way to change the numbering ?

Hi Antoine,

it’s numberconversion (as it reads in “ConTeXt Commands”):

\setupformulas[numberconversion=greek]
\setupbodyfont[dejavu]
\starttext
\placeformula[test]
\startformula E = mc^2 \stopformula
\stoptext

BTW, if this is wrong documented in the wiki, please correct it for
future reference.

Pablo
-- 
http://www.ousia.tk
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Formula numbering conversion

2017-02-27 Thread Antoine Cailliau
The following code is documented to change the numbering of the equations.

However, this still use numerals for the equations.

\setupformulas[conversion=characters]

\starttext

\placeformula[test]
\startformula E = mc^2 \stopformula

\stoptext

Is this a bug ? Is it the correct way to change the numbering ?

Any help is welcome. Thank you in advance,

Antoine C.
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Lua code and percent sign

2017-02-27 Thread Antoine Cailliau
Thank you
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] which command would give the same effect as \pause in beamer ?

2017-02-27 Thread kaddour kardio
http://wiki.contextgarden.net/RawSteps is it still relevant dear Hans ?

On Mon, Feb 27, 2017 at 3:37 PM, Hans Hagen  wrote:

> On 2/27/2017 1:16 PM, dam...@thiriet.web4me.fr wrote:
>
>> Hello,
>>
>>
>> I have been switching to conTEXt to prepare some of my teaching stuff. I
>> have read the context ref manual, the wiki and browsed the web, but
>> couldn't find anything related to so-called overlays in beamer (I justed
>> greped mail archives for 2015–2017).
>> What would be the conTEXt way to have a list or whatever else displayed
>> in a slide in such a way that point 2 is hidden until you press space, and
>> so on.
>> In beamer, you would make it this way
>>
>> \begin{frame}
>>\begin{itemize}
>>   \item 1
>>   \pause
>>   \item 2
>>   \pause
>>  \item 3
>> \end{frame}
>>
>> Or even better,
>>
>> \begin{frame}
>>\begin{itemize}[<+->]
>>   \item 1
>>   \item 2
>>  \item 3
>> \end{frame}
>>
>> I read about \starthiding and \stophiding in the manual, but as far as I
>> understand, this is not exactly what I am looking for.
>> I don't think postponing would help either.
>>
>> Any suggestion will be welcome. I am using texlive 2015 version (nothing
>> newer is available yet in OpenBSD).
>> Have a nice day,
>>
>
> texmf/doc/context/presentations
>
> has examples ... you can have steps (pre-stepwise)
>
> Hans
>
>
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>tel: 038 477 53 69 | www.pragma-ade.nl | 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/list
> info/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
> ___
>



-- 
Dr YAHYAOUI Mohamed Kaddour, cardiologue.Clinique EL ABRAR.
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] which command would give the same effect as \pause in beamer ?

2017-02-27 Thread Hans Hagen

On 2/27/2017 1:16 PM, dam...@thiriet.web4me.fr wrote:

Hello,


I have been switching to conTEXt to prepare some of my teaching stuff. I have 
read the context ref manual, the wiki and browsed the web, but couldn't find 
anything related to so-called overlays in beamer (I justed greped mail archives 
for 2015–2017).
What would be the conTEXt way to have a list or whatever else displayed in a 
slide in such a way that point 2 is hidden until you press space, and so on.
In beamer, you would make it this way

\begin{frame}
   \begin{itemize}
  \item 1
  \pause
  \item 2
  \pause
 \item 3
\end{frame}

Or even better,

\begin{frame}
   \begin{itemize}[<+->]
  \item 1
  \item 2
 \item 3
\end{frame}

I read about \starthiding and \stophiding in the manual, but as far as I 
understand, this is not exactly what I am looking for.
I don't think postponing would help either.

Any suggestion will be welcome. I am using texlive 2015 version (nothing newer 
is available yet in OpenBSD).
Have a nice day,


texmf/doc/context/presentations

has examples ... you can have steps (pre-stepwise)

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Lua code and percent sign

2017-02-27 Thread Hans Hagen

On 2/27/2017 2:11 PM, Antoine Cailliau wrote:

The following code, from the wiki, results in a compilation error:

\starttext
\ctxlua{context(string.format("\%.2f", math.pi))}
\stoptext


\startluacode
 ...
\stopluacode


but not in macros where the % is normally a comment again



The error is:

[\directlua]:1: invalid escape sequence near '\%'
1 \starttext
2
3 >>  \ctxlua{context(string.format("\%.2f", math.pi))}
4
5 \stoptext


I ended using \letterpercent command but it is not very convenient.

Any help is welcome,

Antoine C.

Full log:

mtx-context | warning: synctex is enabled
mtx-context | run 1: luatex

--fmt="/usr/local/texlive/2015/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en"
--jobname="luapercent"

--lua="/usr/local/texlive/2015/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en.lui"
--no-parse-first-line --synctex=1 --c:autogenerate --c:currentrun=1
--c:directives="system.synctex=1"
--c:fulljobname="/Users/acailliau/Desktop/luapercent.tex"
--c:input="/Users/acailliau/Desktop/luapercent.tex" --c:kindofrun=1
--c:maxnofruns=9 --c:synctex="1" "cont-yes.mkiv"
This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238)
 \write18 enabled.
system  > synctex functionality is enabled (1)!
open source > 1 > 1 >
/usr/local/texlive/2015/texmf-dist/tex/context/base/cont-yes.mkiv
ConTeXt  ver: 2015.05.18 12:26 MKIV current  fmt: 2016.4.25  int:
english/english
system  > 'cont-new.mkiv' loaded
open source > 2 > 2 >
/usr/local/texlive/2015/texmf-dist/tex/context/base/cont-new.mkiv
close source> 2 > 2 >
/usr/local/texlive/2015/texmf-dist/tex/context/base/cont-new.mkiv
system  > files > jobname 'luapercent', input
'/Users/acailliau/Desktop/luapercent', result 'luapercent'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > 2 > 3 > /Users/acailliau/Desktop/luapercent.tex
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded
lua error   > error on line 3 in file
/Users/acailliau/Desktop/luapercent.tex:
[\directlua]:1: invalid escape sequence near '\%'
1 \starttext
2
3 >>  \ctxlua{context(string.format("\%.2f", math.pi))}
4
5 \stoptext

? Type  to proceed, S to scroll future error messages,
R to run without stopping, Q to run quietly,
I to insert something,
1 or ... or 9 to ignore the next 1 to 9 tokens of input,
H for help, X to quit.
? close source> 2 > 3 > /Users/acailliau/Desktop/luapercent.tex
close source> 1 > 3 >
/usr/local/texlive/2015/texmf-dist/tex/context/base/cont-yes.mkiv
mkiv lua stats  > used config file:
selfautoparent:/texmfcnf.lua;selfautoparent:/texmf-dist/web2c/texmfcnf.lua
mkiv lua stats  > used cache path:

/usr/local/texlive/2015/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9
mkiv lua stats  > synctex tracing: synctex has been enabled (extra
log file generated)
mkiv lua stats  > resource resolver: loadtime 0.117 seconds, 0 scans
with scantime 0.000 seconds, 0 shared scans, 8 found files, scanned
paths:
mkiv lua stats  > stored bytecode data: 371 modules (0.309 sec), 78
tables (0.008 sec), 449 chunks (0.316 sec)
mkiv lua stats  > traced context: maxstack: 1132, freed: 0,
unreachable: 1132
mkiv lua stats  > running in nuts mode: yes
mkiv lua stats  > cleaned up reserved nodes: 41 nodes, 439 lists of 438
mkiv lua stats  > node memory usage: 2 glue, 2 penalty, 6 attribute,
26 glue_spec, 2 attribute_list, 2 temp
mkiv lua stats  > node list callback tasks: 6 unique task lists, 2
instances (re)created, 3 calls
mkiv lua stats  > used backend: pdf (backend for directly generating
pdf output)
mkiv lua stats  > loaded patterns: en::2, load time: 0.000
mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000 seconds
loading
mkiv lua stats  > callbacks: 60 direct, 243 indirect, 303 total
mkiv lua stats  > result saved in file: luapercent.pdf,
compresslevel 3, objectcompresslevel 3
mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf,
lmroman12-regular.otf
mkiv lua stats  > fonts load time: 0.180 seconds
mkiv lua stats  > used platform: osx-64, type: unix, binary subtree: bin
mkiv lua stats  > luatex banner: this is luatex, version beta-0.80.0
(tex live 2015) (rev 5238)
mkiv lua stats  > control sequences: 43101 of 65536 + 10
mkiv lua stats  > lua properties: engine: lua, used memory: 67 MB
(ctx: 66 MB), hash type: lua, hash chars: min(64,40), symbol mask:
utf (τεχ)
mkiv lua stats  > runtime: 0.540 seconds
mtx-context 

[NTG-context] Lua code and percent sign

2017-02-27 Thread Antoine Cailliau
The following code, from the wiki, results in a compilation error:

\starttext
> \ctxlua{context(string.format("\%.2f", math.pi))}
> \stoptext


The error is:

[\directlua]:1: invalid escape sequence near '\%'
> 1 \starttext
> 2
> 3 >>  \ctxlua{context(string.format("\%.2f", math.pi))}
> 4
> 5 \stoptext


I ended using \letterpercent command but it is not very convenient.

Any help is welcome,

Antoine C.

Full log:

mtx-context | warning: synctex is enabled
> mtx-context | run 1: luatex
> --fmt="/usr/local/texlive/2015/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en"
> --jobname="luapercent"
> --lua="/usr/local/texlive/2015/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en.lui"
> --no-parse-first-line --synctex=1 --c:autogenerate --c:currentrun=1
> --c:directives="system.synctex=1"
> --c:fulljobname="/Users/acailliau/Desktop/luapercent.tex"
> --c:input="/Users/acailliau/Desktop/luapercent.tex" --c:kindofrun=1
> --c:maxnofruns=9 --c:synctex="1" "cont-yes.mkiv"
> This is LuaTeX, Version beta-0.80.0 (TeX Live 2015) (rev 5238)
>  \write18 enabled.
> system  > synctex functionality is enabled (1)!
> open source > 1 > 1 >
> /usr/local/texlive/2015/texmf-dist/tex/context/base/cont-yes.mkiv
> ConTeXt  ver: 2015.05.18 12:26 MKIV current  fmt: 2016.4.25  int:
> english/english
> system  > 'cont-new.mkiv' loaded
> open source > 2 > 2 >
> /usr/local/texlive/2015/texmf-dist/tex/context/base/cont-new.mkiv
> close source> 2 > 2 >
> /usr/local/texlive/2015/texmf-dist/tex/context/base/cont-new.mkiv
> system  > files > jobname 'luapercent', input
> '/Users/acailliau/Desktop/luapercent', result 'luapercent'
> fonts   > latin modern fonts are not preloaded
> languages   > language 'en' is active
> open source > 2 > 3 > /Users/acailliau/Desktop/luapercent.tex
> fonts   > preloading latin modern fonts (second stage)
> fonts   > 'fallback modern-designsize rm 12pt' is loaded
> lua error   > error on line 3 in file
> /Users/acailliau/Desktop/luapercent.tex:
> [\directlua]:1: invalid escape sequence near '\%'
> 1 \starttext
> 2
> 3 >>  \ctxlua{context(string.format("\%.2f", math.pi))}
> 4
> 5 \stoptext
>
> ? Type  to proceed, S to scroll future error messages,
> R to run without stopping, Q to run quietly,
> I to insert something,
> 1 or ... or 9 to ignore the next 1 to 9 tokens of input,
> H for help, X to quit.
> ? close source> 2 > 3 > /Users/acailliau/Desktop/luapercent.tex
> close source> 1 > 3 >
> /usr/local/texlive/2015/texmf-dist/tex/context/base/cont-yes.mkiv
> mkiv lua stats  > used config file:
> selfautoparent:/texmfcnf.lua;selfautoparent:/texmf-dist/web2c/texmfcnf.lua
> mkiv lua stats  > used cache path:
> /usr/local/texlive/2015/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9
> mkiv lua stats  > synctex tracing: synctex has been enabled (extra log
> file generated)
> mkiv lua stats  > resource resolver: loadtime 0.117 seconds, 0 scans with
> scantime 0.000 seconds, 0 shared scans, 8 found files, scanned paths:
> mkiv lua stats  > stored bytecode data: 371 modules (0.309 sec), 78 tables
> (0.008 sec), 449 chunks (0.316 sec)
> mkiv lua stats  > traced context: maxstack: 1132, freed: 0, unreachable:
> 1132
> mkiv lua stats  > running in nuts mode: yes
> mkiv lua stats  > cleaned up reserved nodes: 41 nodes, 439 lists of 438
> mkiv lua stats  > node memory usage: 2 glue, 2 penalty, 6 attribute, 26
> glue_spec, 2 attribute_list, 2 temp
> mkiv lua stats  > node list callback tasks: 6 unique task lists, 2
> instances (re)created, 3 calls
> mkiv lua stats  > used backend: pdf (backend for directly generating pdf
> output)
> mkiv lua stats  > loaded patterns: en::2, load time: 0.000
> mkiv lua stats  > jobdata time: 0.001 seconds saving, 0.000 seconds loading
> mkiv lua stats  > callbacks: 60 direct, 243 indirect, 303 total
> mkiv lua stats  > result saved in file: luapercent.pdf, compresslevel 3,
> objectcompresslevel 3
> mkiv lua stats  > loaded fonts: 2 files: latinmodern-math.otf,
> lmroman12-regular.otf
> mkiv lua stats  > fonts load time: 0.180 seconds
> mkiv lua stats  > used platform: osx-64, type: unix, binary subtree: bin
> mkiv lua stats  > luatex banner: this is luatex, version beta-0.80.0 (tex
> live 2015) (rev 5238)
> mkiv lua stats  > control sequences: 43101 of 65536 + 10
> mkiv lua stats  > lua properties: engine: lua, used memory: 67 MB (ctx: 66
> MB), hash type: lua, hash chars: min(64,40), symbol mask: utf (τεχ)
> mkiv lua stats  > runtime: 0.540 seconds
> mtx-context | fatal error: return code: 1
___
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://context.aanhet.net

[NTG-context] which command would give the same effect as \pause in beamer ?

2017-02-27 Thread damien
Hello,


I have been switching to conTEXt to prepare some of my teaching stuff. I have 
read the context ref manual, the wiki and browsed the web, but couldn't find 
anything related to so-called overlays in beamer (I justed greped mail archives 
for 2015–2017).
What would be the conTEXt way to have a list or whatever else displayed in a 
slide in such a way that point 2 is hidden until you press space, and so on.
In beamer, you would make it this way

\begin{frame}
   \begin{itemize}
  \item 1 
  \pause
  \item 2
  \pause
 \item 3
\end{frame} 

Or even better, 

\begin{frame}
   \begin{itemize}[<+->]
  \item 1 
  \item 2
 \item 3
\end{frame} 

I read about \starthiding and \stophiding in the manual, but as far as I 
understand, this is not exactly what I am looking for.
I don't think postponing would help either.

Any suggestion will be welcome. I am using texlive 2015 version (nothing newer 
is available yet in OpenBSD). 
Have a nice day,


Damien Thiriet
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___