Re: [NTG-context] simpleslides bug?

2013-02-20 Thread Thomas A. Schmitz

Maybe this is my fault. The simpleslides module works just fine these days and I 
accidentally updated the ConTeXt to the latest version:

context --version

mtx-context | ConTeXt Process Management 0.60
mtx-context |
mtx-context | main context file: 
/opt/context/tex/texmf-context/tex/context/base/context.mkiv
mtx-context | current version: 2013.02.13 18:06

and this small piece of code failed to compile:

\usemodule[simpleslides][style=BigNumber]
\starttext
\SlideTitle{Test}
test
\stoptext



This must be a consequence of the new MP instance code. I can reproduce 
the error, but I can't isolate it. I think the lines


metapost initializing instance 'metafun' using format 'metafun'
metapost loading 'metafun': 
/opt/context/tex/texmf-context/metapost/context/base/metafun.mpiv, using 
method: default

metapost initializing number mode scaled

point to the source of the error, but I don't know where to look.

On 02/18/2013 01:54 PM, Jaroslav Hajtmar wrote:

With older version:
ConTeXt ver: 2013.01.02 18:19 MKIV fmt: 2013.1.7 int: english/english
works too! (Win7 64b).
In actual TeXlive 2012 version this example work too.


It seems that we gradually stop working other variations simpleslides
module.

Jaroslav Hajtmar


I have no idea what this is supposed to mean.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Quick slide templates

2013-02-20 Thread Marco Patzer
On 2013–02–19 Kumar Appaiah wrote:

 I am making a presentation that involves some simple animations. The
 way I make those animations is by:
 
 1. Stopping page numbering.
 2. Flipping through the same slide repeated, but with img0, img1, img2 etc.
 3. Start page numbering.
 
 The problem with my naïve approach of repeating slides is that fixing
 a spelling error or making changes implies that I have to do it several
 times for an “animated” slide, and is error-prone.

You could use buffers:

\newdimen\cnt
\starttext

\startbuffer [greenbar]
  \blackrule[width=4cm, height=5mm, color=green]
\stopbuffer

\dorecurse{10}{%%
  \blackrule[width=\textwidth]
  \advance\cnt1cm \hskip\cnt
  \getbuffer[greenbar]\page}

\stoptext

Marco


signature.asc
Description: Digital signature
___
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] Quick slide templates

2013-02-20 Thread Jaroslav Hajtmar

Hello Kumar.
I make my PDF animations so that I first create a single multi-page PDF 
file whose separate pages are separate animation frames.

Then this auxiliary PDF file I put into another PDF file using \ fieldstack.
Here's how I prepare a separate animation file.


\def\setmyparameter#1#2{%
\global\def\myparameter{#2}#1%
}%

\def\processmyparameters[#1]#2%
  {\processcommalist[#1]{\setmyparameter{#2}}}

\startbuffer [greenbar]
  \blackrule[width=\myparameter, height=5mm, color=green]
\stopbuffer


\starttext

\processmyparameters[1cm,2cm,3.5cm,4.5cm,8cm,11cm]{
  \getbuffer[greenbar]\page}

\stoptext


Greetings
Jaroslav Hajtmar






Dne 20.2.2013 10:16, Marco Patzer napsal(a):

\newdimen\cnt
\starttext

\startbuffer [greenbar]
   \blackrule[width=4cm, height=5mm, color=green]
\stopbuffer

\dorecurse{10}{%%
   \blackrule[width=\textwidth]
   \advance\cnt1cm \hskip\cnt
   \getbuffer[greenbar]\page}

\stoptext


___
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] new tricks in beta

2013-02-20 Thread Hans Hagen

Hi Aditya,

I made a mathstyle mechanism ... used in fences first:

\starttext

\startTEXpage[offset=1ex]

\def\TestMe#1%
  {\NC \ttbf #1
   \NC \ruledhbox{$\setupmathstyle[#1]x + x_j^2 + x_i^{e^2} + \frac{1}{x}$}
   \NC \ruledhbox{$\setupmathstyle[#1,small]x + x_j^2 + x_i^{e^2} + 
\frac{1}{x}$}

   \NC \NR}

\starttabulate[|l|r|l|]
\HL
\NC \NC \NC \ttbf ...,small \NC \NR
\HL
\TestMe{text}
\TestMe{text,cramped}
\TestMe{script}
\TestMe{script,cramped}
\TestMe{scriptscript}
\TestMe{scriptscript,cramped}
\TestMe{display}
\TestMe{display,cramped}
\HL
\stoptabulate

\stopTEXpage

\startTEXpage

$x\begingroup\setupmathstyle[script]x\endgroup x$ \par
$x{\setupmathstyle[script]x}x$ \par
$x\startmathstyle[script]x\stopmathstyle x$

\stopTEXpage

\definemathfence [scriptbracket] [bracket] 
[command=yes,color=red,mathstyle=script]
\definemathfence [smallbracket]  [bracket] 
[command=yes,color=green,mathstyle=small]

\definemathfence [normalbracket] [bracket] [command=yes,color=blue]

\startTEXpage[offset=1ex]

\startbuffer
test 
$a\frac{1}{normal}\scriptbracket{\frac{1}{script}}\normalbracket{\frac{1}{normal}}\smallbracket{\frac{1}{small}}c$ 
test \par

\stopbuffer

\getbuffer \setupmathfences [color=red] \getbuffer

\stopTEXpage

\stoptext

\starttext

\definemathfence [fancybracket] [bracket] [command=yes,color=blue]

test $|x|$ test \par
test $||x||$ test (okay) \par
test $a\left|\frac{1}{b}\right|c$ test \par
test $a\left||\frac{1}{b}\right||c$ test (not okay) \par

\startbuffer
test $a\fenced[bar]{\frac{1}{b}}c$ test \par
test $a\fenced[doublebar]{\frac{1}{b}}c$ test \par
test $a\fenced[bracket]{\frac{1}{b}}c$ test \par
test $a\fancybracket{\frac{1}{b}}c$ test \par
\stopbuffer

\getbuffer \setupmathfences [color=red] \getbuffer

\stoptext

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
___


Re: [NTG-context] pgfplots in newest beta

2013-02-20 Thread Emanuele Sacco
I have the same problem.


2013/2/15 Malte Harder m...@malteharder.de

 Hi list,

 I've got a problem with the latest beta and pgfplots. It already
 happens when the module is loaded and also with a minimal file testing
 pgfplots. Output is attached below. Is this is a known problem that
 has a workaround or will be fixed in the future?

 Not a big problem for me, I guess I'll just downgrade to a working
 version in the meantime.

 Best,
 Malte

 ConTeXt output:

 loading  ConTeXt User Module / Pgfplots
 resolversmodules  already loaded: 'tikz'
 (/opt/context-minimals/texmf-modules/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryplotmarks.code.tex
 (/opt/context-minimals/texmf-modules/tex/generic/pgf/libraries/pgflibraryplotmarks.code.tex))
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/pgfplots.code.tex
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/pgfplotscore.code.tex
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/sys/pgfplotssysgeneric.code.tex
 Package pgfplots notification 'compat/show suggested version=true':
 document has been generated with the most recent feature set
 (\pgfplotsset{compat=\mostrecent }).

 ))
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/libs/pgfplotslibrary.code.tex)
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/oldpgfcompatib/pgfplotsoldpgfsupp_loader.code.tex
 (/opt/context-minimals/texmf-modules/tex/generic/pgf/libraries/pgflibraryfpu.code.tex))
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/util/pgfplotsutil.code.tex
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/liststructure/pgfplotsliststructure.code.tex)
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/liststructure/pgfplotsliststructureext.code.tex)
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/liststructure/pgfplotsarray.code.tex)
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/liststructure/pgfplotsmatrix.code.tex)
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/numtable/pgfplotstableshared.code.tex)
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/liststructure/pgfplotsdeque.code.tex)
 (/opt/context-minimals/texmf
  -modules/tex/generic/pgfplots/util/pgfplotsbinary.code.tex
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/util/pgfplotsbinary.data.code.tex))
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/util/pgfplotsutil.verb.code.tex)
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/libs/pgflibrarypgfplots.surfshading.code.tex
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/sys/pgflibrarypgfplots.surfshading.pgfsys-pdftex.def)))
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/util/pgfplotscolormap.code.tex
 (/opt/context-minimals/texmf-modules/tex/generic/pgfplots/util/pgfplotscolor.code.tex)
 ! Argument of \pgfutil@firstoftwo has an extra }.

 system   tex  error on line 762 in file
 /opt/context-minimals/texmf-modules/tex/generic/pgfplots/util/pgfplotscolormap.code.tex:
 Argument of  ...

 752 \def\pgfplotscolormapaccess@precomputed[#1:#2][#3]#4#5{%
 753 \if m\pgfplots@colormap@access
 754 \pgfplotscolormapfind@precomputed[#1:#2][#3]{#4}{#5}%
 755 \else
 756 \pgfplotscolormapgetindex{#4}{#5}%
 757 \fi
 758 }%
 759
 760
 761 \pgfutil@definecolor{mapped color}{rgb}{0,0,0}% make sure this
 color exists. It will be overwritten if needed.
 762   \pgfplotscreatecolormap{hot}{color(0cm)=(blue);
 color(1cm)=(yellow); color(2cm)=(orange); color(3cm)=(red)}
 763
 764 \def\pgfplotspointmetatransformedrange{0:1000}
 765
 766 % Defines the 'mapped color' on the basis of
 767 % the current color map.
 768 %
 769 % #1: is the value which should be mapped into the color map; it
 770 % is expected in the range [0,1000] (like point meta).
 771 \def\pgfplotscolormapdefinemappedcolor#1{%
 772
 \expandafter\pgfplotscolormapaccess\expandafter[\pgfplotspointmetatransformedrange]

 inserted text
 \par
 to be read again
}
 \pgfplotscolornormalizesequencenext@color ...lor }
   \edef \pgfplots@loc@TMPb
 {...
 \pgfplots@createcolormap@nextcolor ...ncenext {#2}
   \let
 \pgfplots@createcolor...
 \pgfplots@createcolormap@next@ ...r {#1}{color=#2}
   \pgfplots@createcolormap
 @
 \pgfplots@loc@TMPa -color(0cm)=(blue)
   ; color(1cm)=(yellow);
 color(2cm)=(ora...
 ...
 l.762 ...); color(2cm)=(orange); color(3cm)=(red)}

 --
 Malte Harderm...@malteharder.de

 ___
 If your question is of interest to others as well, please add an entry to
 the Wiki!

 maillist : ntg-context@ntg.nl /
 

Re: [NTG-context] Quick slide templates

2013-02-20 Thread Kumar Appaiah
On Wed, Feb 20, 2013 at 11:58:24AM +0100, Jaroslav Hajtmar wrote:
 Hello Kumar.
 I make my PDF animations so that I first create a single multi-page
 PDF file whose separate pages are separate animation frames.
 Then this auxiliary PDF file I put into another PDF file using \ fieldstack.
 Here's how I prepare a separate animation file.
 
 
 \def\setmyparameter#1#2{%
 \global\def\myparameter{#2}#1%
 }%
 
 \def\processmyparameters[#1]#2%
   {\processcommalist[#1]{\setmyparameter{#2}}}
 
 \startbuffer [greenbar]
   \blackrule[width=\myparameter, height=5mm, color=green]
 \stopbuffer
 
 
 \starttext
 
 \processmyparameters[1cm,2cm,3.5cm,4.5cm,8cm,11cm]{
   \getbuffer[greenbar]\page}
 
 \stoptext

Thank you for this solution. I just tried this, and this works well
for me as well!

Kumar
-- 
Kumar Appaiah
___
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] Quick slide templates

2013-02-20 Thread Kumar Appaiah
On Wed, Feb 20, 2013 at 10:16:30AM +0100, Marco Patzer wrote:
  I am making a presentation that involves some simple animations. The
  way I make those animations is by:
  
  1. Stopping page numbering.
  2. Flipping through the same slide repeated, but with img0, img1, img2 etc.
  3. Start page numbering.
  
  The problem with my naïve approach of repeating slides is that fixing
  a spelling error or making changes implies that I have to do it several
  times for an “animated” slide, and is error-prone.
 
 You could use buffers:
 
 \newdimen\cnt
 \starttext
 
 \startbuffer [greenbar]
   \blackrule[width=4cm, height=5mm, color=green]
 \stopbuffer
 
 \dorecurse{10}{%%
   \blackrule[width=\textwidth]
   \advance\cnt1cm \hskip\cnt
   \getbuffer[greenbar]\page}
 
 \stoptext

This is a lovely solution, and I'll put off learning LuaTeX for
now. Thanks! :-)

Kumar
-- 
Kumar Appaiah
___
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] pgfplots in newest beta

2013-02-20 Thread Jaroslav Hajtmar

Hello.
I have the same problem.
Previous versions work properly...

It seems, that there is any problem with colors: See:

\pgfplots@loc@TMPa -color(0cm)=(blue)
  ; color(1cm)=(yellow); 
color(2cm)=(ora...

...
l.726 ...); color(2cm)=(orange); color(3cm)=(red)}

Greetings.
Jaroslav Hajtmar

Here is my log:




C:\$~1da\SKOLA\2012-2013\Dum\mydums\vyroba_pomucekctx grafy-animace

C:\$~1da\SKOLA\2012-2013\Dum\mydums\vyroba_pomucekcontext --autopdf 
grafy-anima

ce
Cannot execute command [DocClose(%s)] (error 16393)

mtx-context | run 1: luatex 
--fmt=C:/context/tex/texmf-cache/luatex-cache/c
ontext/5fe67e0bfe781ce0dde776fb1556f32e/formats/luatex/cont-en 
--jobname=grafy
-animace 
--lua=C:/context/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce
0dde776fb1556f32e/formats/luatex/cont-en.lui --no-parse-first-line 
--c:autopdf
--c:currentrun=1 --c:fulljobname=./grafy-animace 
--c:input=./grafy-animace -

-c:kindofrun=1 cont-yes.mkiv
This is LuaTeX, Version beta-0.70.2-2013021710 (TeX Live 2012/W32TeX)
 \write18 enabled.
(C:/context/tex/texmf-context/tex/context/base/cont-yes.mkiv
job  passes  version mismatch: ?  1.21

ConTeXt  ver: 2013.02.20 14:35 MKIV  fmt: 2013.2.20  int: english/english

system   cont-new.mkiv loaded
(C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv
system   beware: some patches loaded from cont-new.mkiv
)
system   files  jobname: grafy-animace, input: grafy-animace, 
result:

grafy-animace
fontslatin modern fonts are not preloaded
languageslanguage en is active
(grafy-animace.tex
colors   rgb color space is supported
colors   cmyk color space is supported
resolversmodules  loaded: 'pgfplots'
(C:/context/tex/texmf-modules/tex/context/third/pgfplots/t-pgfplots.tex
loading  ConTeXt User Module / Pgfplots
resolversmodules  loaded: 'tikz'
(C:/context/tex/texmf-modules/tex/context/pgf/frontendlayer/t-tikz.tex
loading  ConTeXt User Module / tikz
(C:/context/tex/texmf-modules/tex/context/pgf/basiclayer/t-pgf.tex
loading  ConTeXt User Module / pgf
(C:/context/tex/texmf-modules/tex/context/pgf/basiclayer/t-pgfcor.tex
loading  ConTeXt User Module / pgfcor
(C:/context/tex/texmf-modules/tex/context/pgf/systemlayer/t-pgfsys.tex
loading  ConTeXt User Module / pgfsys
(C:/context/tex/texmf-modules/tex/context/pgf/utilities/t-pgfrcs.tex
loading  ConTeXt User Module / pgfrcs
(C:/context/tex/texmf-modules/tex/context/pgf/utilities/t-pgfmod.tex
loading  ConTeXt User Module / pgfmodules
) 
(C:/context/tex/texmf-modules/tex/generic/pgf/utilities/pgfutil-common.tex) 
(C
:/context/tex/texmf-modules/tex/generic/pgf/utilities/pgfutil-context.def) 
(C:/c
ontext/tex/texmf-modules/tex/generic/pgf/utilities/pgfrcs.code.tex)) 
(C:/context
/tex/texmf-modules/tex/generic/pgf/systemlayer/pgfsys.code.tex 
(C:/context/tex/t
exmf-modules/tex/generic/pgf/utilities/pgfkeys.code.tex 
(C:/context/tex/texmf-mo
dules/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex)) 
(C:/context/tex/texmf
-modules/tex/generic/pgf/systemlayer/pgf.cfg) 
(C:/context/tex/texmf-modules/tex/
generic/pgf/systemlayer/pgfsys-pdftex.def 
(C:/context/tex/texmf-modules/tex/gene
ric/pgf/systemlayer/pgfsys-common-pdf.def)) (grafy-animace.pgf)) 
(C:/context/tex
/texmf-modules/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex) 
(C:/context/
tex/texmf-modules/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex)) 
(C:/cont
ext/tex/texmf-modules/tex/generic/pgf/basiclayer/pgfcore.code.tex 
(C:/context/te
x/texmf-modules/tex/generic/pgf/math/pgfmath.code.tex 
(C:/context/tex/texmf-modu
les/tex/generic/pgf/math/pgfmathcalc.code.tex 
(C:/context/tex/texmf-modules/tex/

generic/pgf/math/pgfmathutil.code.tex
fontsbeware: no fonts are loaded yet, using 'lm mono' in box
) 
(C:/context/tex/texmf-modules/tex/generic/pgf/math/pgfmathparser.code.tex) 
(C:

/context/tex/texmf-modules/tex/generic/pgf/math/pgfmathfunctions.code.tex (C:/co
ntext/tex/texmf-modules/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex) 
(C

:/context/tex/texmf-modules/tex/generic/pgf/math/pgfmathfunctions.trigonometric.
code.tex) 
(C:/context/tex/texmf-modules/tex/generic/pgf/math/pgfmathfunctions.ra
ndom.code.tex) 
(C:/context/tex/texmf-modules/tex/generic/pgf/math/pgfmathfunctio
ns.comparison.code.tex) 
(C:/context/tex/texmf-modules/tex/generic/pgf/math/pgfma
thfunctions.base.code.tex) 
(C:/context/tex/texmf-modules/tex/generic/pgf/math/pg
fmathfunctions.round.code.tex) 
(C:/context/tex/texmf-modules/tex/generic/pgf/mat
h/pgfmathfunctions.misc.code.tex) 
(C:/context/tex/texmf-modules/tex/generic/pgf/
math/pgfmathfunctions.integerarithmetics.code.tex))) 
(C:/context/tex/texmf-modul
es/tex/generic/pgf/math/pgfmathfloat.code.tex)) 
(C:/context/tex/texmf-modules/te
x/generic/pgf/basiclayer/pgfcorepoints.code.tex) 
(C:/context/tex/texmf-modules/t

[NTG-context] extras in \cite

2013-02-20 Thread Devendra Ghate

Hello Everyone,

A while back Aditya provided a patch for using
*alternative=authornum* in *\cite*. The patch adds et al.
for the cases with more than two authors.
I have been using it without a hitch since then.

However, today I tried to use *extras* option with this patch
and it won't work. The MWE works for
*alternative=apa* and *alternative=num*

Please let me know if this can be rectified.

Regards,
Devendra

*MWE*

\setupbibtex[database={bib}]

\unprotect
\def\dobibauthornumref#1%
 {\bibinsertrefsep
  \doifbibreferencefoundelse{#1}
{\begingroup
 \cite[left=,right=,alternative=author][#1]%
 \bibalternative\c!inbetween
 \cite[num][#1]%
 \endgroup}
{}}
\protect

\starttext
  \cite[alternative=authornum,extras={,\S 5.1}][citation1]
  \placepublications
\stoptext

---
bib.bib
---

@article{citation1,
  title = {Kernel independent component analysis},
  author = {Bach, F. R. and Jordan, M. I.},
  journal = {Journal of {M}achine {L}earning {R}esearch},
  volume = {3},
  pages = {1-48},
  year = {2002},
}


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